Skip to content

Commit

Permalink
Add comment about lexical modes to parser + lexer
Browse files Browse the repository at this point in the history
  • Loading branch information
alancai98 committed Jul 15, 2024
1 parent 721be3f commit 5ad1973
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions partiql-parser/src/main/antlr/PartiQLParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,8 @@ comparisonOp
otherOp
: OPERATOR
| AMPERSAND
// TODO introduce a separate lexical mode for GPML MATCH expressions (https://github.com/partiql/partiql-lang-kotlin/issues/1512)
// This will eliminiate the need for this `AMPERSAND` parse branch.
;

// TODO : Opreator precedence of `otherOp` may change in the future.
Expand Down
2 changes: 2 additions & 0 deletions partiql-parser/src/main/antlr/PartiQLTokens.g4
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ fragment OpBasicEnd
fragment OpSpecial
: [~@#%^?] // TODO support backtick (`)?
// graph patterns are not matched
// TODO make GPML MATCH patterns a separate lexical mode (https://github.com/partiql/partiql-lang-kotlin/issues/1512)
// Creating a separate lexical mode will allow us to get rid of the following semantic predicates.
| '|' {_input.LA(1) != '!'}?
| '!' {_input.LA(1) != '%'}?
| '&' {_input.LA(1) != '%'}?
Expand Down

0 comments on commit 5ad1973

Please sign in to comment.