Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Welcome

Welcome to Confluence

Confluence is where your team collaborates and shares knowledge — create, share and discuss your files, ideas, minutes, specs, mockups, diagrams, and projects.

This ANTLR 3 wiki complements and supports the ANTLR 3 website. Inside you will find documentation, tutorials and a FAQ.

We hope that you find what you need to learn more about ANTLR 3 on this wiki. If this is not the case, you may register and help (please read our entire welcome message first).

ANTLR has a mailing list.

Wiki News

problem: antlr not generating .java files for .g file

hi

I am new to antlr. I have installed antlr3 on eclipse helios. I am using Ubuntu 10.04. I started with the basic example for creating a parser, but my antlr is not generating .java files for my .g file. kindly help.

Thanks!

How do I deal with Tab + new line chars in Antlr?

Hello everyone,

I'm having some trouble dealing with a tab character comes before a new line character. 

The image below (the second line of the image) exemplifies what I'm talking about:

-----> FAIL

-------> OK

The grammar I've made doesn't consider TAB + NL the same way that just using NL.

The section that I define the rules for white spaces and new lines is the following:

WS : (' ' | '\t' | '\f')+ {$channel = HIDDEN;};
NL : ('\n' | '\r')+ ;

Any hint on that? I've tried already '\t\n', '\t\r'.

thanks

I am sure this is worthy of an RTFM, but given the sheer weight of documentation for a newbie, I will risk the flames. In fact, whatever else I might get, one thing that might help me is a list of chapters and/or links in the ANTLR documentation, that would lead me reasonably efficiently towards my goal.

My goal:

I am interested in understanding in an orderly, principled way (if such is possible), the manner in which one might build a 'config-file'-driven translation of data into code, that can also be used to de-compile the very same code or "properly" edited code, back into the data that generated it or would have generated it in the first place.

Specifically, I want to translate an XML document into an editor and editing structures, that allow some 'valid' set of actions, that translate back into the XML that could have generated in in the first place. But I am less interested in tips and techniques for how to accomplish my goal than in the principles to guide thinking about the problem. To some extent, that is because I recognize (admit defeat?) the open-ended nature of the problem. Or should I?

Thanks,

Nick

ANTLR3.3.jar VS ANTLR2.7.7 jar
3.3 released!

Get it while it's hot! ANTLR 3.3.


Recent updates

Wiki Contents

  • No labels