[il-antlr-interest: 27979] Re: [antlr-interest] Request for Change regarding Lexer (?)

2010-02-18 Thread Gavin Lambert
At 09:27 17/02/2010, I wrote: It'd be nice if there was some way to express a negative match via a syntactic predicate, eg: FOOLIST: 'foo[' (('foo') = ~ | ID)+ ']'; (where '~' in an alt basically means break, ie. match nothing and terminate the innermost loop.) Or, perhaps better:

[il-antlr-interest: 27980] [antlr-interest] C# example of lexical filter mode ??

2010-02-18 Thread John Pool
In The Definitive ANTLR Reference, at page 113 there is an example of a lexer grammar, with at the end of the section the remark 'Lexical filter mode is generally not used with a parser because the lexer yields an incomplete stream of tokens.' I declared the fuzzy parser as follows:

[il-antlr-interest: 27981] Re: [antlr-interest] C# example of lexical filter mode ??

2010-02-18 Thread Bart Kiers
Hi John, On Thu, Feb 18, 2010 at 7:52 PM, John Pool j.p...@ision.nl wrote: ... Question: how do I 'execute' such a grammar lexer in C# without feeding it into a parser? You probably meant to instantiate a FuzzyLexer instead of a FuzzyParser (unless your lexer grammar is called

[il-antlr-interest: 27982] [antlr-interest] Java Grammar that outputs AST

2010-02-18 Thread venkat medhaj
Hi, Is there any Java grammar file available that outputs the AST. Say for example, I have a Java file and I want to output the AST for that file on the eclipse console like the one thats done in the video tutorials. I am trying to see how an AST looks like for a test Java file. All I could

[il-antlr-interest: 27983] Re: [antlr-interest] Request for Change regarding Lexer (?)

2010-02-18 Thread kferrio
Gavin, Of your three ideas ...two equivalents in one post and a third more powerful one in this post ... I currently like the second equivalent from the first post...viz ~= for two reasons. First I think your third form is so powerful as to encourage abuse and expose a lot of strange