-
Notifications
You must be signed in to change notification settings - Fork 192
Feature request: JMESPath lexer #2205
Copy link
Copy link
Closed
Labels
completedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedfeature-requestThis item refers to a feature request for an existing or new utilityThis item refers to a feature request for an existing or new utilityjmespathThis item relates to the JMESPath UtilityThis item relates to the JMESPath Utility
Metadata
Metadata
Assignees
Labels
completedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedfeature-requestThis item refers to a feature request for an existing or new utilityThis item refers to a feature request for an existing or new utilityjmespathThis item relates to the JMESPath UtilityThis item relates to the JMESPath Utility
Type
Projects
Status
Shipped
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.