nasa-pds / api-search-query-lexer Goto Github PK
View Code? Open in Web Editor NEWLexer to parse the search query of the PDS API
License: Other
Lexer to parse the search query of the PDS API
License: Other
Describe the bug
Given the simple URL from pds-api 54 /products?q="lid eq *text*"
and expectation (acceptance criteria), the registry-api-service when nuts and blew up with out of memory. Tracked it down to this module. Turns out there is a simple infinite loop in ANTLR 4.9.2 and earlier that is most likely a fault of the language or how it is being parsed because the ANTL FAQ suggests that not terminating the stream is the biggest problem and the infinite loop is caused by never finding the end of the stream even though all data has been read.
To Reproduce
Run/Debug in Eclipse api.pds.nasa.gov.api_search_query_lexer.TestParsing
.
Expected behavior
TestParsing should run to completion and successfully parse the lid eq *text*
string without running out of memory.
Version of Software Used
ANTLR 4.3, 4.7, 4.9.
The search string a eq b
does not parse while a eq "b"
does. The expectation is that both parse to the same result.
See TestParsing.isParsable() a unit test for this module.
Should pass,
** ๐ฆ Applicable requirements**
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.