antlr3
Iterating/processing a list of Tokens parsed in ANTLR
I have a rule ((cns=IDENT \'->\')* IDENT | (cns=IDENT \'->\')* \'STOP\') 开发者_运维知识库-> ^(PREFIX ^(EVENTS $cns*) ^(ENDS $procn? STOP?))[详细]
2023-03-11 01:58 分类:问答Problem with an antlr grammar
I\'m trying to figure out the grammar for the following syntax. foreach where x = 1 when some_variable = true[详细]
2023-03-10 17:31 分类:问答Non-empty closures and the question mark: only first element is put into the AST?
I\'m haunted by a strange phenomenon: Only the first in x in z: x | \'<\'! y? \'>\', where y: x (\',\'! x)*, occurs in the resulting AST. But only if I compile the code using Antlr3 as deployed[详细]
2023-03-09 20:02 分类:问答ANTLR grammar for reStructuredText (rule priorities)
First question stream Hello everyone, This could be a follow-up on this question: Antlr rule priorities[详细]
2023-03-09 19:16 分类:问答Problem with parameter passing for stringtemplate
Given this rules : 开发者_如何学运维 defServ: \'service\' path bodyServ? SEP ->Serv(....); path: t+=ID (\'/\' t+=ID)* ->path(...);[详细]
2023-03-08 15:05 分类:问答Can I add Antlr tokens at runtime?
I have a situation where my language contains some words that aren\'t known at build time but will be known at run time causing the need to constantly rebuild / redeploy the program to take into accou[详细]
2023-03-08 10:15 分类:问答Use of StringTemplate in Antlr
I would have this problem : Given this rules defField: type VAR ( \',\' VAR)* SEP ; VAR : (\'a\'..\'z\'|\'A\'..\'Z\')+ ;[详细]
2023-03-07 20:16 分类:问答Ignore tokens in the token characters?
I have the following token definition in my lexer defining a CharacterString (e.g. \'abcd\'): CharacterString:[详细]
2023-03-07 05:37 分类:问答Antlr3 AST creation : how to test an optional subrule?
I am looking for a way to know if an optional sub rule has been used or not. For example: my_rule returns [node* n = 0]:[详细]
2023-03-06 14:04 分类:问答Is there a way to improve this ANTLR 3 Grammar for positive and negative integer and decimal numbers?
Is there a way to express this in a less repeative fashion with the optional positive and negative signs?[详细]
2023-03-06 02:26 分类:问答