Skip to main content
1 vote
1 answer
76 views

I'm trying to convert the ActionSplitter.g grammar to ANTLR4 and came across a problem wrt. semantic predicates. The grammar has rules like this: QUALIFIED_ATTR : '$' x=ID '.' y=ID {input.LA(1)!=...
Mike Lischke's user avatar
  • 54.3k
0 votes
0 answers
38 views

I have to use ANTLR 3 with C target and I have some problems to understand how to output different messages if the parsing is successfull or not. What I have to add to my main.c file to obtain this ...
Simone's user avatar
  • 1
0 votes
1 answer
141 views

I have some project with antlr3 grammar, I managed to migrate it to antlr4 (antlr4 accepts it and generates code). But this project also uses this grammar to generate protobuf to implement some typing ...
Orlov Pavel's user avatar
-2 votes
1 answer
232 views

I'm working with ANTLR4 in Java to create a custom language parser. I've generated my lexer and parser using a grammar file (CCAL.g4), and I'm implementing a visitor class (EvalVisitor) extending ...
Cian Sullivan's user avatar
0 votes
0 answers
75 views

I'm creating a parser for formulas. I encountered unexpected behavior of IDENT (see code below). Theoretically, it should match 1 or more occurrences of Upper/Lower case letters + digits + '_'. But in ...
Hello_Own_World's user avatar
0 votes
1 answer
103 views

I am currently working on rewriting a parser project of mine from java to C. I'd love to stick with ANTLR as I find it easy to use, but unfortunately ANTLR4 no longer supports C targets. Luckily, ...
primevibetime's user avatar
0 votes
0 answers
86 views

Eclipse version: 2022-09 Eclipse m2e version: 2.0.4 antlr version: 3 antlr3-maven-plugin: 3.5.3 I have a project with a Logic.g file. Everything was working OK on a previous version of Eclipse (where ...
mmalmeida's user avatar
  • 1,055
0 votes
0 answers
54 views

For the below grammar: grammar Test; options { language = Java; output=AST; } reference : TASK | NAME ; TASK : (~'^')+ EOF ; NAME : ('A'..'Z')+ ; I get the following error: error(208): ...
Adithya Chakilam's user avatar
1 vote
1 answer
135 views

I am working on a legacy project which needs to be upgraded to use Java8. During the upgrade we are facing issues with ANTL3.3 as it not compatible with Java8. Now because of certain dependencies we ...
Paul Phoenix's user avatar
  • 1,447
0 votes
1 answer
264 views

how to add relational operations to my code Thanks My code is grammar denem1; options { output=AST; } tokens { ROOT; } parse : stat+ EOF -> ^(ROOT stat+) ; ...
Berkay Ünsal's user avatar
0 votes
1 answer
195 views

I'm running antlr with maven. Antlr generates .java file from .g file and I need to post process generated java file (do some changes in it). How can I do it? <plugin> <groupId>...
Andrei Filipchyk's user avatar
3 votes
1 answer
2k views

Hi I'm currently trying to extract all tokens from ANTLR in C#, i'm using Antlr4.CodeGenerator and Antlr4.Runtime packages. I want them structured in a way i can manipulate them, change their content ...
Jean Carlos Sanson's user avatar
3 votes
1 answer
95 views

We have this exercise that we have to do in class and the professor asked us to figure out good reasons to choose the listener method over visitor method in order to implement a solution for a ...
Juan Vega Seco's user avatar
0 votes
1 answer
281 views

As a simple example, let's say I have the following. parse_rule0 : parse_rule1 ',' parse_rule2 ';' ; pare_rule1 : ... ; parse_rule2: ... ; PUNCTUATION : ',' | '.'| ';' | ':' ; When Antlr4 (...
chickenslips's user avatar
0 votes
0 answers
149 views

I've been recently working on a small demo expression grammar in Xtext: The Grammar grammar org.example.expressions.Expressions with org.eclipse.xtext.common.Terminals generate expressions "http:...
Tomer Vax's user avatar

15 30 50 per page
1
2 3 4 5
61