You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to PlacidSystems.AntlrStudio
First sorry for my English. It is not my native language.
Second I do not know grammars and have not any experience in antlr.
I have some grammar which was written using Antlr Studio plug-in for
Eclipse. I need to generate Java source code from this grammar and
compile using only pure antlr (using ant build file). But there are
many places where some Antlr Studio specific function
getLengthConsumed() is called. For examle:
//Add the error management corresponding to null ID when we work with
several models....
parse_model returns [IModel model]
{
model = new ModelImpl();
String modelID=null;
}
: "model"^ modelID =model_identifier LC model_body[model] RC SEMI
{
model.setModelID(modelID);
}
;
exception catch[RecognitionException ex]
{
int startingPos = this.getLengthConsumed();
this.consume();
int finalPos = this.getLengthConsumed();
this.rewind( startingPos);
So I need to replace (implement) this function. But I have no clue
what it do. Could any one help me with docs/explanation what i do?
Prashant Deva
unread,
Feb 14, 2008, 7:38:58 PM2/14/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to antlr...@googlegroups.com
Hi, To disable ANTLR Studio from inputting any of its own code into the grammar files, disable debugging of grammars.
To disable debugging –
Right-click on your java project, go to Properties and click on the ANTLR Studio node.
Uncheck 'Enable debugging in grammar files'.
When you press Ok, a dialog box will pop up asking you whether to rebuild the project Answer 'Yes' to it. This will rebuild the grammar files too, thus generating release quality code for your grammar files.