You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all many thanks for making the auto-completion feature available. It saved me lot of work.
I am able to use the CodeCompletionCore and get the list of tokens rules and token names (using vocabulary). But is there a way to extract the actual values used in the grammar?
For ex: l have the following lexer rule AndorOr: ‘&’ | ‘|’ ;
From the CodeCompletionCore I can get AndorOr . How can I get the values & , | ?
The text was updated successfully, but these errors were encountered:
There's no built-in support to directly return the values a lexer rule is made of. Keep in mind that can be complex, involving other lexer rules (also fragment rules), predicates etc.
You could use a symbol table to get that info (still not perfect) or do an LL1 walk over the lexer ATN for a given rule (see the LL1Analyzer class, which does this for parser rules).
First of all many thanks for making the auto-completion feature available. It saved me lot of work.
I am able to use the CodeCompletionCore and get the list of tokens rules and token names (using vocabulary). But is there a way to extract the actual values used in the grammar?
For ex: l have the following lexer rule
AndorOr: ‘&’ | ‘|’ ;
From the CodeCompletionCore I can get
AndorOr
. How can I get the values & , | ?The text was updated successfully, but these errors were encountered: