Greetings!
On Tue, 2009-11-10 at 23:27 +0300, GreyAx wrote:
> I'm looking for topics to investigate in part of my master thesis. I'm
> interesting in verification,
> static code analysis and so on. I have an idea, which I want to implement and
> integrate with ANTLR,
> please give me any feedba
On Sun, 2009-10-25 at 01:03 +0100, Peter Boughton wrote:
> Thanks John, but this doesn't appear to be working.
> (I'm using antlr 3.2 with antlrworks 1.3)
>
> I tried it both as provided and with changing the comment start/end
> characters, and both of these give the same error in the generated
>
Greetings!
On Sat, 2009-10-24 at 17:40 +0100, Peter Boughton wrote:
> How do I support nested comments with ANTLR?
>
This is what I use:
// multiple-line comments
ML_COMMENT : NESTED_COMMENTARY { $channel=HIDDEN; } ;
fragment NESTED_COMMENTARY :
'/*'
( options {greedy=false;} : . )
Greetings!
Sorry about this message, I think I have broken any threading to the
original message. I am replying from the mail-list archive and seem to
be unable to figure out how to graft my reply into its proper thread.
Sorry.
On Fri Oct 16 12:21:33 PDT 2009, Kaleb Pederson asked:
> I'm getting
Greetings!
On Wed, 2009-10-14 at 16:15 -0400, Bill Andersen wrote:
> FYI, all. The problem described does NOT occur without rewrite = true
>
Isn't rewrite = true for Tree grammars only? -- your rule below looks
like a Parser rule to me - altho can't really tell for sure...
> On Oct 14, 2009, a
Greetings!
On Sat, 2009-10-03 at 18:24 -0400, Pennington, Elliot wrote:
> Howdy All,
>
> I've got an old grammar that used to work in ANTLR 2 but that now
> fails in ANTLR 3. I'd like to make the switch, but I'm at a loss as to
> how to fix this. For the following example code:
>
> -
Greetings!
On Tue, 2009-09-29 at 16:54 +0200, Thierry USO wrote:
> A complete example which shows my problem.
>
remainder snipped
Your grammar does not handle New-Line characters ('\n' and possibly
'\r'). You should have received many "no viable alternative at ..."
error messages
Greetings!
On Wed, 2009-09-23 at 23:35 +0200, Andreas Volz wrote:
> Hello,
>
> I wrote this grammar:
>
> startrule
> : (property comment property)*
> ;
> comment
> : COMMENT { printf("Comment: \%s\n", $COMMENT.text->chars); }
> ;
>
> COMMENT
> : '/*' ( opti
Greetings!
On Fri, 2009-09-11 at 10:20 -0400, Sylvain, Gregory [USA] wrote:
> Great replies thank you, I was assumed the longest-match wins rules
> applied, but I wasn't sure - thanks.
>
> Here is an example of the sort of problems I am trying to figure out.
>
>
> r: 'BEGIN/' f1
Greetings!
On Wed, 2009-09-09 at 10:45 +0200, Martin Potier wrote:
> I've got something on my mind that the Definitive ANTLR Reference
> couldn't solve (yet, I'm not tottally through it).
> Is there a way with ANTLR v3 to automate some rule ?
>
> Id est, while building a small wiki language I wr
Greetings!
Martijn's suggestions are close but need a couple of tweaks, see
below...
On Tue, 2009-08-25 at 18:50 +0200, Martijn Reuvers wrote:
> Hi Safiye,
>
> As Sam said, recursion might be what you need.
>
> Something like this gives your tree I believe:
>
> grammar test;
>
> options {
>
Greetings!
On Sun, 2009-08-16 at 18:25 -0600, consili...@gmail.com wrote:
> I looked at ANTLRStringStreams consume() method and noticed that it
> checks for a '\n'. In the current grammar I'm skip()ing newlines,
> instead of placing them on a hidden channel.
>
> I made the following modificati
On Sun, 2009-07-19 at 12:10 -0700, Bryan S Follins wrote:
> I'm almost done with a lesson grammar but I ran into a problem I get an
> error referencing the TOKEN RULE, which is on Line 17 (TOKEN : ID) It also
> references Line 20, where there is a blank before SEPERATOR.
>
> The error reads
Greetings!
On Sun, 2009-07-19 at 21:02 +0300, hakan eryargi wrote:
> well, i know both trees evaluate to same result, but i want it this
> way for human readability. this will be used for defining requirments
> and later will be presented in a gui. and i guess it's easier to debug
> this way..
>
Greetings!
On Thu, 2009-07-02 at 10:35 -0400, Penningroth, Mark wrote:
> I have the following in my grammar:
>
> sqcon
> : '\'' ( options {greedy=false;} : .)* '\''
> ;
>
> The intent is to get a single text node with everything between the
> sing quotes.
>
> When I parse ‘Los Angeles’
Greetings!
On Sun, 2009-06-28 at 16:04 -0700, Sean O'Dell wrote:
> Thanks for the help Gavin.
>
> Let me see if I understand this correctly; I'm trying to get my head
> down into this.
>
> On "top-level lexer rules should not refer to other top-level lexer
> rules": What constitutes a "top-lev
Greetings!
On Sun, 2009-06-14 at 23:09 -0400, Dukie Banderjee wrote:
> Hi,
> My grammar needs to handle the following situation: A line can have
> multiple fields, separated by a delimiter. A field can have multiple
> components, separated by another delimiter.
> If a field or component is blank,
Greetings!
On Wednesday 03 June 2009 06:14:26 pm Mats Ekberg wrote:
> I cant figure out why this grammar dont work (I have left out some
> not relevant stuff).
> This expression works:[ LOOKUP( A1234567890, 9TN ) ] 93
> This dont:[ LOOKUP( A1234567890, ATN ) ] 93
> Why?
Your lexer rules f
Greetings!
On Friday 22 May 2009 05:07:55 am schlp...@gmx.ch wrote:
> 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:
>
> ABSTRACTOBJECT:
> SERVICEOBJECT | QUERYOBJECT
>
> SERVICEOBJECT: UPPERCASE
Greetings!
On Wednesday 13 May 2009 01:43:06 am Bharath R wrote:
> Hi All ,, Good morning.
> I m very new to ANTLR , I m facing a below problme like the second rule is
> getting matched with the first rule and its not able to be parsed.
>
> This is my grammar
>
> grammar tel;
>
> TEL : T E L COLON
On Tuesday 28 April 2009 05:08:08 pm Gabriel Petrovay wrote:
> 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.
I assume by now you have taken Jim's
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
On Thursday 02 April 2009 10:27:27 am Jim Idle wrote:
> Joseph Klumpp wrote:
> > I'm trying to create tokens for the guards of C header files (with
> > filter=true), e.g. '#define __hello_h_' => > __hello_h_>, and have the following rules defined:
> >
> > GUARD : '#' LETTER+ WS+ IDPART
Greetings!
On Monday 02 March 2009 10:51:20 am Paul Bouché (NSN) wrote:
> I have the following grammer, problem described below.
> start : outerPropertynode | EOF;
> outerPropertynode : outerProperties;
> properties : (property delim)*; // simplified
> property : key '=' value;
> value
Micheal Bedward asked:
> In my parser grammar:
>
> expr_list : (expr (',' expr)* )? -> ^(EXPR_LIST expr*) ;
>
> In my tree grammar:
>
> expr_list returns [List values] : ^(EXPR_LIST expr*)
> { $values = new ArrayList();
> int n = $EXPR_LIST.getChildCount(
Meena Vinod asked:
> I have a new problem now. My application's .g is as follows:
>
> CMD_CD : 'cd';
> CMD_SHOW: 'show';
> CMD_RESET: 'reset';
> CMD_SET: 'set';
> CMD_OPTION: (' -all' | ' -help' | ' -version' | ' -display')*;
> TSEP: ' ' { SKIP(); };
>
> The parser is define
> Started using antlr this weekend...so please bear my lack of understanding
> ( i did buy terence's book and am on page 70... )...
>
> I wrote my first grammar...cut & paste from terence's java grammar...a
> subset just to handle if-else statements...
>
> When I generate java from this ( using ant
for the input "t+1", I have the error:
> line 1:4 mismatched input '+'
>
works for me. no errors reported. using the attached test rig under ANTLR
v3.1, August 12, 2008.
> But when I switch "OPER" to "oper", All work as it should. I don't
> unde
> Hello,
Greetings!
> why such grammar doesn't work properly:
> ---
>--- expr:
> operand ((oper) operand)*
^^
I assume you mean the lexer rule OPER here?
> ;
> //Cor
Dejas Ninethousand wrote:
> Hello,
Greetings!
> I believe I have found a peculiar issue in ANTLR. If memory serves, the
> order of alternatives in a grammar should have no effect on the set of
> inputs it accepts. For example I believe:
>
> program : statement_list | expression
>
> is equivalen
Britta Kiera wrote:
> Don't know if the first reply was sent. Trying it a second time.
>
> > At 23:32 10/11/2008, Britta Kiera wrote:
> > >The lexer was supposed to generate a NAMES token for the feature
> > >name sequence. The definition below shows an approach that I tried
> > >to accomplish this
>...snipped
>> .. but I still have no solution to my
> problem: how can I make the variable in my label rule be anything? That
> is, I would think anything except whitespace and braces and control
> characters would be fine. In particular, it definitely has to accept
> any word in any scr
Greetings!
Hendrik Maryns asked:
> I showed you my grammar yesterday. Now trying it out on some simple
> inputs blows me away right away: it doesn’t even parse anything.
Your problem seems to be with your Lexer rule for LABEL which is :
LABEL : ~(')')+ ;
this means that any sequence of charact
On Thursday 02 October 2008 09:43:44 pm Randall R Schulz wrote:
> Hi,
>
> Sorry for shouting, but I really would like a definitive answer to this
> question. ("Steamroller" referring to creating a flat AST.)
>
> If one is to parse an infix operator notation, exemplified by this
> input:
>
> 1
On Thursday 02 October 2008 09:34:11 pm Randall R Schulz wrote:
> On Thursday 02 October 2008 17:54, you wrote:
> > Mr. Schulz :-
>
> I'm sorry. My father isn't here right now...
I happen to believe that everyone deserves respect...
> > Sorry for this disconnected reply to your last message to m
Greetings!
On Thursday 02 October 2008 05:23:09 pm Randall R Schulz wrote:
> How might I alter a rule such as this one:
>
> op790Formula
> : (op780Formula -> op780Formula)
> (
> Or rDisjunct = op790Formula
> -> ^(Or $op790Formula $rDisjunct)
> ) ?
>
On Thursday 11 September 2008 09:32:11 pm Yixun Liu wrote:
> I want to generate parser code from .g file. How to do it?
at your favorite shell (batch) prompt enter:
java org.antlr.Tool your_grammar_filename_goes_here.g
Hope this helps
--
-jbb
List: http://www.antlr.org:8080/mailman/listinf
Greetings!
On Tuesday 09 September 2008 12:19:30 pm Olya Krachina wrote:
> I still get the same error, even with your suggestion.
>
> Quoting Chris Rebert <[EMAIL PROTECTED]>:
> > I think you might need to left-factor here.
> > Have you tried:
> >
> > FLOAT: INT? '.' INT;
...snipped...
> > On Sep
Greetings!
On Friday 05 September 2008 10:58:35 pm George J. Shannon wrote:
> Attached is a snippet of the grammar in question, where tagCommentNbr is
> the integer value enclosed in brackets that I referred to in my email post.
> George
>
> tagCommentElement returns [ParserTagCommentElement pTag
39 matches
Mail list logo