Description
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
- This feature request meets Powertools for AWS Lambda (TypeScript) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status