Feature request: JMESPath lexer #2205
Labels
completed
This item is complete and has been merged/shipped
feature-request
This item refers to a feature request for an existing or new utility
jmespath
This item relates to the JMESPath Utility
Use case
As part of the JMESPath utility implementation we need to define a lexer (short for lexical analyzer).
The purpose of a lexer is to break down the input JMESPath expression into smaller meaningful units (tokens). These tokens represent the building blocks of the JMESPath language and are defined in the language grammar (#2192).
The lexer covers the first step of parsing and applying a JMESPath expression, its output is then used by the Parser that converts the tokens into an abstract syntax tree.
Solution/User Experience
The lexer should be able to tokenize the JMESPath expression walking it character by character and identify sequences of characters that form valid tokens (i.e. a string literal (
max
) followed by opening and closing parentheses (( )
) should be interpreted as a function expression).The lexer should also be able to detect lexical errors like invalid characters or sequences of characters that don't conform to the JMESPath syntax.
All types, classes, and functions should be documented and exposed to customers via API docs.
Alternative solutions
No response
Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered: