Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GAIA Compiler] Refine error handling in antlr grammar #2530

Merged
merged 5 commits into from Mar 19, 2023

Conversation

shirly121
Copy link
Collaborator

@shirly121 shirly121 commented Mar 16, 2023

What do these changes do?

  1. fix bugs when handling exceptions from antlr, to print more meaningful messages (including position with the error text), i.e.
    g.Vd -> syntax error occurs at [line: 1, column: 3]; msg is: [token recognition error at: 'd']
    g.V().order().by('a', 'b') -> syntax error occurs at [line: 1, column: 22]; msg is: [mismatched input '"b"' expecting {'asc', 'Order.asc', 'desc', 'Order.desc', 'shuffle', 'Order.shuffle'}]
  2. throw exceptions when composition of operators is invalid, i.e.
    g.V().subgraph('X') -> edge induced subgraph should follow an edge expand operator [inE, outE, bothE]
    g.V().endV() -> endV should follow a path expand operator [out('$1..$2'), in('$1..$2'), both('$1..$2')]
  3. refine parameters in hasId which should be a non-empty integer list

Related issue number

Related Issue: #2531

@longbinlai longbinlai merged commit ff287e4 into alibaba:main Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants