On Thursday 04 June 2009 00:14:26 Mats Ekberg wrote:
> > Hi!
> >
> > I cant figure out why this grammar dont work (I have left out some
> > not relevant stuff).
> > This expression works:[ LOOKUP( A1234567890, 9TN ) ] 93
I think the lexer sees for "9TN" a UNIT here
> > This dont:[ LOOK
On Friday 22 May 2009 11:07:55 schlp...@gmx.ch wrote:
> Dear all
>
> I'm trying to write a grammar to check the correctness of package names in
> respect to our meta modell. Thereby I ran into to following problems:
>
use syntactic predicates or/and action in lexer rules to change the type of
th
On Sunday 17 May 2009 13:22:37 Jesper Larsson wrote:
> On Sun, 2009-05-17 at 12:48 +0200, Micha wrote:
> > On Sunday 17 May 2009 11:01:36 Jesper Larsson wrote:
> > > Not always so easy, however. My original example was, even more
> > > simplified, something like thi
On Sunday 17 May 2009 11:01:36 Jesper Larsson wrote:
> > If you want the longest match, then left factor everything and let it
> > do that:
> >
> > A ( B (C|) |) ;
> >
> > And set the token type at the appropriate points.
>
> Not always so easy, however. My original example was, even more
> simpli
On Saturday 16 May 2009 12:52:13 Jesper Larsson wrote:
> On Sat, 2009-05-16 at 08:27 +0530, Indhu Bharathi wrote:
> > This is because on seeing 'f' of foo lexer has two options - 1. IDENT
> > 2. URL. And it takes the second options since that seems to be longer
> > that the first alternative. Note
On Thursday 14 May 2009 19:02:56 Ratul Bhadury wrote:
> Hello all,
>
> I've been trying to achieve something using Antlr v3, but have been
> struggling for a while now, and think its now time to ask the help of more
> experienced users, hence this mail.
>
> What I basically want to achieve is a si
On Wednesday 06 May 2009 23:05:09 Tilman Bender wrote:
>
> 1. How can I throw a detailed Error Message saying something like "The
> operator + is invald for the types of "+ $a.returntype + " and "+
> $b.returntype
either throw an exception (in your if-statements) or print to stderr (or use
java
On Monday 04 May 2009 21:08:50 Brian Nelson wrote:
> The input would be "aa, bb, cc" and I simply want a list of
> ['aa','bb','cc']. I am not trying to process it, just get the list out
> of it, ignoring the commas, in a variable I can use.
>
> prog : rone (COMMA rone)*
>;
>
>
Am Thursday 30 April 2009 13:06:02 schrieb Florian Barth:
> Hi there!
> Thank you for this hint. It works and the conds and thens are properly
> computed.
> This solved problem number one, but the number two is still there.
> If I feed the template with a list of values (that need further rules
>
Am Monday 02 March 2009 22:09:23 schrieb YingAnnie:
> Hello,
>
>
> I am playing with Tree grammar, I got the error today:
>
> F:\Treegrammar.g: node from after line 9:15 required (...)+ loop did not
> match anything at input 'UP' F:\Treegrammar.g: node from after line 9:15
> mismatched input 'MULT
On Tuesday 10 February 2009 16:50:48 Carter Cheng wrote:
> Hello,
>
> I am getting a missing attribute access error on a number of rules which I
> do not quite understand and was hoping I might be able to get some help
> fixing them. The errors point to the following rules in the tree grammar.
>
in this docu:
http://www.antlr.org/wiki/display/ANTLR3/Tree+construction#Treeconstruction-
treegrammarAST
there is as sample on how to use the node token option to indicate node types
for parsers and tree parsers.
I've tried this and the parser allocates my new class correctly, but how do I
a
On Monday 12 January 2009 21:59:12 Dominic Tardif wrote:
>
> OK, I've removed the NEWLINE token and changed stmt+ by stmt* and it works
> just fine, except that I want to be able to support the ' ' operator, which
> acts like a '*'. If I didn't support it, I don't think I would have had
> any pr
On Friday 05 December 2008 07:46:10 Kenny Leung wrote:
> Hi All.
>
> One of the interesting things I found was that this is legal:
>
> NUMBER : '0'..'9';
that's a lexer rule
> but this is not:
>
> number : '0'..'9';
that's a parser rule, the ".." syntax is only allowed in lexer rules.
On Wednesday 03 December 2008 15:27:29 you wrote:
>
> | ('/' ~'*') => '/'
> | ('*' ~'/') => '*'
> | MULTI_COMMENT
..with a syntactic predicate, nice.
thanks,
Michael
List: http://www.antlr.org:8080/mailman/lis
Hi,
I don't get the lexer rules correct to lex my nested comments.
As a workaround I use the following, see below. What are the right rules for
this ?
thanks
Michael
--
one lexer rule:
MULTI_COMMENT: '/*' { nestedComment(0); skip(); }
and in the @
On Saturday 29 November 2008 00:53:09 Randall R Schulz wrote:
> On Friday 28 November 2008 04:30, micha wrote:
>
> So the answer is basically "no."
>
> However, the TokenStream interface can reconstruct the text of one or a
> sub-sequence of the tokens it has produced
Hi,
maybe I'm not seeing the obvious, but how can I output the whole source line,
when an error occurs (while parsing) ?
thanks for answering,
Michael
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org:8080/mailman/options/antlr-interest/your-em
On Monday 24 November 2008 01:22:52 Ilya Sterin wrote:
> So in my grammar, I capture blocks of JSON-like structures. I don't
> want antlr to try to parse that structure, but rather to evaluate it
> as a string.
I think, that's similar to having to switch two grammars (or lexers) , so I
would do
On Tuesday 18 November 2008 17:05:44 Sam Harwell wrote:
> You might try the following:
>
> : NumberFormat
>
> ( POINT NumberFormat POINT NumberFormat POINT NumberFormat {$type =
> IP;}
> ( SLASH NumberFormat {$type = IPNET;}
> )?
> )?
> ;
>
nice, it's the first try with an
On Tuesday 18 November 2008 13:54:18 micha wrote:
>
> then I get 22MB output (!)
>
> Is this o.k.? I didn't thought, that this rule requires so much code :-)
answering myself:
the error was with antlr 3.0.x (the debian package). With antlr 3.1.1 it
works...
Micha
the followinig lexer grammar:
lexer grammar Lexbug;
SLASH: '/';
POINT: '.';
fragment DIGIT: '0'..'9';
fragment BYTE: DIGIT | '1'..'9' DIGIT | '1' DIGIT DIGIT | '2' '0'..'4'
DIGIT | '25' '0'..'6';
IP: BYTE POINT BYTE POINT BYTE POINT BYTE;
NUMBER: '0' | '1'..'9' DIGIT*;
produces 13kb o
22 matches
Mail list logo