We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I don't know if it's a BUG.
Example1 results only contain functionRef, Example2 contain functionRef and variableRef.
functionRef
variableRef
Example code is here: https://github.com/vczyh/antlr-c3-maybe-bug-examples
const inputStream = CharStream.fromString("a.b"); core.preferredRules = new Set([ ExprParser.RULE_variableRef, ExprParser.RULE_functionRef, ]); const candidates = core.collectCandidates(2);
Expr.g4
grammar Expr; expression: variableRef | functionRef ; variableRef: identifier dotIdentifier; functionRef: identifier dotIdentifier OPEN_PAR CLOSE_PAR; identifier: ID; dotIdentifier: DOT identifier; OPEN_PAR: '('; CLOSE_PAR: ')'; DOT: '.'; ID: [a-zA-Z] [a-zA-Z0-9_]*; WS: [ \n\r\t] -> channel(HIDDEN);
Result:
This is example1. States processed: 17 Collected rules: functionRef, path: expression Collected tokens: CandidatesCollection { tokens: Map(0) {}, rules: Map(1) { 2 => { startTokenIndex: 0, ruleList: [Array] } } }
grammar Expr; expression: variableRef | functionRef ; variableRef: identifier DOT identifier; functionRef: identifier dotIdentifier OPEN_PAR CLOSE_PAR; identifier: ID; dotIdentifier: DOT identifier; OPEN_PAR: '('; CLOSE_PAR: ')'; DOT: '.'; ID: [a-zA-Z] [a-zA-Z0-9_]*; WS: [ \n\r\t] -> channel(HIDDEN);
This is example2. States processed: 18 Collected rules: functionRef, path: expression variableRef, path: expression Collected tokens: CandidatesCollection { tokens: Map(0) {}, rules: Map(2) { 2 => { startTokenIndex: 0, ruleList: [Array] }, 1 => { startTokenIndex: 0, ruleList: [Array] } } }
Thanks.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I don't know if it's a BUG.
Example1 results only contain
functionRef
, Example2 containfunctionRef
andvariableRef
.Example code is here: https://github.com/vczyh/antlr-c3-maybe-bug-examples
Completion
Example1
Expr.g4
Result:
Example2
Expr.g4
Result:
Thanks.
The text was updated successfully, but these errors were encountered: