[il-antlr-interest: 23420] [antlr-interest] Grammar Critique: Preserving Certain Comments

2009-04-28 Thread Michael Coupland
I am writing a parser for what is effectively a C declaration syntax, and want to add a somewhat unusual feature. Namely, I'd like to support C/C++ single-line comments, but in certain cases I'd like to retain comments that immediately follow a declaration. An example is probably clearest:

[il-antlr-interest: 23419] Re: [antlr-interest] Regarding handling of special characters

2009-04-28 Thread Simon, Peter
Hi, you can specify the special characters in your lexer rules as Unicode. For example: '\u00dc' for 'Ü' It's also possible to define ranges like: '\u00a0'..'\u00ff' http://jrgraphix.net/research/unicode_blocks.php?block=1 Greetings Peter Von: antlr-interest-boun...@antlr.org [ma

[il-antlr-interest: 23418] [antlr-interest] Error: The following alternatives can never be matched

2009-04-28 Thread Michael Strelnikov
Hi, I have a fairly simple grammar which give me an error I cannot resolve. Could you please look at it? What does it mean and how to fix it? Thanks a lot. [14:20:29] warning(200): C:\tools\verilog\verilog_params\Test.g:4:43: Decision can match input such as "IDENT..ESCAPED_IDENT" using mult

[il-antlr-interest: 23417] [antlr-interest] Regarding handling of special characters

2009-04-28 Thread Raghavendra Anjana (RBEI/EMT2)
Hello, I am new to antlr. I have a peculiar problem working with special characters in my grammar. I have some special characters to be parsed by my grammar. I am getting an error like "line 18685:2 no viable alternative at character 'Ü'". Which I assume is because my parser is unable to iden

[il-antlr-interest: 23416] Re: [antlr-interest] Weird problem with semantic predicates. Incorrect warning message

2009-04-28 Thread Jim Idle
Gabriel Petrovay wrote: Hi Jim, 1. warning(200): exit_test.g:9:3: Decision can match input such as "IF" using multiple alternatives: 1, 3 The IF does not MATCH the first alternative, therefore, the warning is NOT correct. OK - I did not realize that you were the expert - what are you a

[il-antlr-interest: 23415] Re: [antlr-interest] Weird problem with semantic predicates. Incorrect warning message

2009-04-28 Thread Gabriel Petrovay
Hi Jim, 1. warning(200): exit_test.g:9:3: Decision can match input such as "IF" using multiple alternatives: 1, 3 The IF does not MATCH the first alternative, therefore, the warning is NOT correct. Why is the warning disappearing when I delete the second alternative? If the warning were correct

[il-antlr-interest: 23414] Re: [antlr-interest] CSS Grammar failing

2009-04-28 Thread Jim Idle
Brian Nelson wrote: Seems to have a slightly different problem, and my attempt to implement class handling has failed in the same way. added: cssId     : HASH IDENT     ; then added cssId to elementName. No dice, same error. I wonder if it has something to do with the # charac

[il-antlr-interest: 23413] Re: [antlr-interest] CSS Grammar failing

2009-04-28 Thread Jim Idle
Brian Nelson wrote: Sweet, thanks, I will try it out! Any license you want to put on that? Please read the initial comments in the grammar. Free BSD as per ANTLR. Jim On 4/28/09 10:55 AM, Jim Idle wrote: Brian Nelson wrote: So I have been trying to use t

[il-antlr-interest: 23412] Re: [antlr-interest] Implicit Typecasting with a tree grammar

2009-04-28 Thread Tilman Bender
Hi,I love replying to myself ;-)I found some way of achieving the implicit uppercast, but not using a tree grammar.I wrote my grammar to distinguish between int and float expressions right from the start.Unfortunately I now run into trouble. I added boolean expressions to my grammar and cannot find

[il-antlr-interest: 23411] Re: [antlr-interest] CSS Grammar failing

2009-04-28 Thread Brian Nelson
Seems to have a slightly different problem, and my attempt to implement class handling has failed in the same way. added: cssId : HASH IDENT ; then added cssId to elementName. No dice, same error. I wonder if it has something to do with the # character itself? I am using

[il-antlr-interest: 23410] Re: [antlr-interest] CSS Grammar failing

2009-04-28 Thread Brian Nelson
Sweet, thanks, I will try it out! Any license you want to put on that? On 4/28/09 10:55 AM, Jim Idle wrote: > Brian Nelson wrote: >> So I have been trying to use the CSS3 grammar from the website >> (http://www.antlr.org/grammar/1214945003224/csst3.g) and I can't seem >> to figure out how it is

[il-antlr-interest: 23409] Re: [antlr-interest] CSS Grammar failing

2009-04-28 Thread Jim Idle
Brian Nelson wrote: So I have been trying to use the CSS3 grammar from the website (http://www.antlr.org/grammar/1214945003224/csst3.g) and I can't seem to figure out how it is failing on the following test case: #foo {    color: black; } I took a look at that grammar because your post

[il-antlr-interest: 23408] [antlr-interest] CSS Grammar failing

2009-04-28 Thread Brian Nelson
So I have been trying to use the CSS3 grammar from the website (http://www.antlr.org/grammar/1214945003224/csst3.g) and I can't seem to figure out how it is failing on the following test case: #foo { color: black; } It seems to be failing on the # in #foo. If I change the 2nd case in elem

[il-antlr-interest: 23407] Re: [antlr-interest] Weird pr oblem with semantic predicates. Incorrect warning message

2009-04-28 Thread Jim Idle
Gabriel Petrovay wrote: > Hi, > > Thanks a lot John for make it it clear. Although I see the problem and > I think that generates everyting, there are at least a couple of > problems with ANTLR: > > 1. The Warning is incorrect: Decision can match input such as "IF" > using multiple alternatives: 1

[il-antlr-interest: 23406] Re: [antlr-interest] Weird pr oblem with semantic predicates. Incorrect warning message

2009-04-28 Thread Jim Idle
Gabriel Petrovay wrote: Why don't you run the grammar check in ANTLRWorks, which then points out the ambiguity pretty instantly. Also, if posting a grammar, make sure it is one that can be pasted into ANTLRWorks and just used - yours is a parser grammar without the lexer tokens, which means it

[il-antlr-interest: 23405] Re: [antlr-interest] Weird problem with semantic predicates. Incorrect warning message

2009-04-28 Thread Gabriel Petrovay
Hi, Thanks a lot John for make it it clear. Although I see the problem and I think that generates everyting, there are at least a couple of problems with ANTLR: 1. The Warning is incorrect: Decision can match input such as "IF" using multiple alternatives: 1, 4. As a result, alternative(s) 4 we

[il-antlr-interest: 23404] Re: [antlr-interest] Weird problem with semantic predicates. Incorrect warning message

2009-04-28 Thread John B. Brodie
Greetings! On Tuesday 28 April 2009 08:10:43 am Gabriel Petrovay wrote: > Hi all, > > I have the parser grammar posted at the bottom of this e-mail. (there > is a corresponding lexer grammar that provides all the necessary > tokens). > > If I try to build the parser for this grammar, I get the fo

[il-antlr-interest: 23403] Re: [antlr-interest] Weird problem with semantic predicates. Incorrect warning message

2009-04-28 Thread Gabriel Petrovay
The warning can be stopped and the behavior corrected if the grammar is made incomplete by commenting the last p_ExprSingle in either the p_ReplaceExpr or the p_ExitExpr. Any ideas why is this? Regads, Gabriel On Tue, Apr 28, 2009 at 2:10 PM, Gabriel Petrovay wrote: > Hi all, > > I have the pa

[il-antlr-interest: 23402] Online Dating and friend finder

2009-04-28 Thread shamili
Online Dating and friend finder http://friendfinder.com/go/g1100916 http://friendfinder.com/go/g1100916 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to

[il-antlr-interest: 23401] Re: [antlr-interest] Weird problem with semantic predicates. Incorrect warning message

2009-04-28 Thread Gabriel Petrovay
Hi, That is true, but that only happened while I was trimming the huge grammar down to this example. That correction does not solve the problem. But thanks for the tip. Any ideas? Regards, Gabriel On Tue, Apr 28, 2009 at 2:47 PM, Gavin Lambert wrote: > At 00:10 29/04/2009, Gabriel Petrovay wr

[il-antlr-interest: 23400] SEXY AND MODERN NUDE ACTRESS VIDEOS

2009-04-28 Thread rosean...@gmail.com
SEXY AND MODERN NUDE ACTRESS VIDEOS SIMLE JIONING FORM FILL IT FREE http://amigos.com/go/g1055727 http://amigos.com/go/g1055727 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to

[il-antlr-interest: 23399] Re: [antlr-interest] Weird problem with semantic predicates. Incorrect warning message

2009-04-28 Thread Gavin Lambert
At 00:10 29/04/2009, Gabriel Petrovay wrote: >pm_Expr > : p_ExprSingle EOF > ; [...] >p_IfExpr > : IF LPAREN pm_Expr RPAREN > ; [...] >p_EnclosedExpr > : LBRACKET pm_Expr RBRACKET > ; While I don't have a direc

[il-antlr-interest: 23398] [antlr-interest] Weird problem with semantic predicates. Incorrect warning message

2009-04-28 Thread Gabriel Petrovay
Hi all, I have the parser grammar posted at the bottom of this e-mail. (there is a corresponding lexer grammar that provides all the necessary tokens). If I try to build the parser for this grammar, I get the following warning: --- warning(200): exit_test.g:13:3: Decision can match input

[il-antlr-interest: 23397] Re: [antlr-interest] How to ignore tokens during lexingh

2009-04-28 Thread Laurent Caillette
With your grammar, the lexer will eat everything that looks like a token. When parsing URLs, I ran into the following problem. It's a big grammar with many other concerns, but finally it worked by defining every single letter as a token, and define words as rules (your "metadata" would become a r