[il-antlr-interest: 26755] Re: [antlr-interest] tree rewriting - change not propagating upwards

2009-11-09 Thread Michael Bedward
I know this will be something stupid and obvious and trivial And (sigh) it was... The problem was not in the grammar, nor in how ANTLR processed it, but in the way I was using the re-written AST. As Douglas Adams said: you live and learn; at any rate you live... Michael List: http

[il-antlr-interest: 26734] [antlr-interest] tree rewriting - change not propagating upwards

2009-11-08 Thread Michael Bedward
the original ID token type. I know this will be something stupid and obvious and trivial but I just can't spot it. Any tips would be much appreciated. I'm using ANTLR 3.2, Java target. cheers Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org

[il-antlr-interest: 26709] Re: [antlr-interest] Problem parsing unit symbols

2009-11-05 Thread Michael Bedward
Hi Mark, Just out of interest, are working with the units supported by Java JSR-275 which I think are based on UCUM http://unitsofmeasure.org/ ? Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email

[il-antlr-interest: 26710] Re: [antlr-interest] Maven archetype for ANTLR

2009-11-05 Thread Michael Bedward
Many thanks Jim !  Using ANTLR in my maven projects has been a breeze thanks to your efforts. Michael 2009/11/6 Jim Idle j...@temporal-wave.com: I note that the new Maven Archetype for building a starting project for Maven and the Java target is now synced in the Maven central repository

[il-antlr-interest: 26600] Re: [antlr-interest] Cannot d isplay rule X because start state is not found

2009-11-02 Thread Michael Pinnegar
Jim Idle wrote: rules, I get Cannot display rule X because start state is not found comment : !(DIGIT | LETTER | SPACE)* ; Remove the ! from this rule. Looks like you are trying to type a v2 grammar into AntlrWorks, which is for v3 grammars, which is probably what you should

[il-antlr-interest: 26593] [antlr-interest] Cannot display rule X because start state is not found

2009-11-01 Thread Michael Pinnegar
Working on a game project that involves a scripting language that I want to interpret into a virtual machine code that can be executed directly. I've included the grammar below. All the lexer rules are displaying properly in the syntax diagram, but when I click on the bodies of any of the

[il-antlr-interest: 26594] [antlr-interest] Found the problem

2009-11-01 Thread Michael Pinnegar
Poked around at the language a bit and ran the debugger. Realizes that ! needed to be encapsulated in 's MPinnegar List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address

[il-antlr-interest: 26146] [antlr-interest] heterogeneous nodes and tree rewriting

2009-10-08 Thread michael
is not duplicated. If have to do: rule_x: NODE { NodeData d = (NodeData)$NODE; } - NODENodeData[d] ; I thought the incoming data is copied in case of an empty rule (see Tree construction during tree parsing in http://www.antlr.org/wiki/display/ANTLR3/Tree+construction ) ?? cheers Michael

[il-antlr-interest: 26147] Re: [antlr-interest] heterogeneous nodes and tree rewriting

2009-10-08 Thread michael
Am Donnerstag, 8. Oktober 2009 16:54:01 schrieb michael: I have a tree parser which output a new ast (tree rewriting). The parser has attached some NodeData to some tree nodes, and one of my tree rewrite rules should just copy this node, like: sorry for the noise, it was of cause my bug

[il-antlr-interest: 25886] Re: [antlr-interest] ANTLR book

2009-09-23 Thread Michael Bedward
Hi Ivan, Details and advanced draft are here: http://www.pragprog.com/titles/tpdsl/language-implementation-patterns Michael 2009/9/23 Ivan Yu Titov iti...@beeline.ru: Hello, I've recently heard about new ANTLR book. Is there any release date for it? Thanks in advance. With best wishes

[il-antlr-interest: 25682] [antlr-interest] Difficulty Building C runtime on Solaris with Configure

2009-09-09 Thread Michael Boyer
Hi, I can't get the system specific include built with configure on a Solaris Unix system. I downloaded the 3.1.3 source distribution. There wasn't a configure script in the C runtime area but there was a configure.ac. So I ran autoconf on it which generated a configure. Running

[il-antlr-interest: 25218] Re: [antlr-interest] case-insensitivity in ANTLR (Java)

2009-08-13 Thread Michael Bedward
Hi Bruce, Just like this... ANTLRNoCaseFileStream strm = new ANTLRNoCaseFileStream( myfilename ); MyLexer lexer = new MyLexer( strm ); That's all there is to it really. If only all things in life were so easy :) Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe

[il-antlr-interest: 25023] Re: [antlr-interest] 'match not' not working

2009-08-04 Thread michael
rules... allthough Ihave not tried it... cheers Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received this message because you

[il-antlr-interest: 25013] Re: [antlr-interest] Reload an AST from serialized form.

2009-08-03 Thread Michael Bedward
Thanks Tommy, this is a very good idea. Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received this message because you

[il-antlr-interest: 24959] Re: [antlr-interest] Help with compile errors in generated source

2009-07-31 Thread Michael Bedward
Here's a fragment of the pom.xml that I use... build plugins plugin groupIdorg.antlr/groupId artifactIdantlr3-maven-plugin/artifactId version3.1.3-1/version executions execution

[il-antlr-interest: 24871] [antlr-interest] Parser Generator Error

2009-07-27 Thread Gardner, Michael T
warnings, compiles cleanly (in Java), and works? Michael T. Gardner List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received this message because

[il-antlr-interest: 24726] Re: [antlr-interest] Multiple evaluations of the same tree

2009-07-17 Thread Michael Bedward
Hello Hugo, Try this: BufferedTreeNodeStream nodes = new BufferedTreeNodeStream(myTree); LangWalker evaluator = new LangWalker(nodes); for(int i = 0; i 1; i++) evaluator.rule(); evaluator.reset(); end Hope this helps, Michael List: http://www.antlr.org/mailman/listinfo

[il-antlr-interest: 24682] Re: [antlr-interest] Reg Multi-line comments

2009-07-16 Thread Michael
, but it works :-) Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[il-antlr-interest: 24686] Re: [antlr-interest] Reg Multi-line comments

2009-07-16 Thread Michael
nextToken call might be slightly costly. I thought that too, but after profiling my app with the java interactive profiler (jip) I saw that the cost for nextToken was under 0.02% compared to the total runtime. cheers Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest

[il-antlr-interest: 24689] Re: [antlr-interest] Reg Multi-line comments

2009-07-16 Thread Michael
and it gives an error: lexer grammar C; MLB : '/*' ( options { greedy = false; } : .* ) ( '*/' | EOF { print error message } ) { skip(); } ; error(201): C.g:3:44: The following alternatives can never be matched: 1 with and without the EOF Michael List: http://www.antlr.org/mailman/listinfo

[il-antlr-interest: 24136] Re: [antlr-interest] Parser Problem for comment

2009-06-09 Thread Michael
')* )? ; // to include a following comment or a semantic predicate which tests the column number or maybe it's easier to use a file reader which just drops the lines beginning with a ' :-) cheers, Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http

[il-antlr-interest: 24099] Re: [antlr-interest] packrat vs. LL(*)

2009-06-08 Thread Michael
, the biggest is in a packrat parser you have ordered choises: if in a rule e1 | e2 the first (e1) succeeds. the second is ignored. So unlike normal BNF definitions you cannot simply switch the order of the alternatives. And you don't use a separate lexer, it's all in one grammar Michael List

[il-antlr-interest: 24101] Re: [antlr-interest] packrat vs. LL(*)

2009-06-08 Thread Michael
'^; -- I see. Maybe one should find an example grammar which needs different lexers, this is easy with an packrat grammar (since you have no lexer), but not so with a normal lexer / parser combi. cheers, Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http

[il-antlr-interest: 24103] Re: [antlr-interest] packrat vs. LL(*)

2009-06-08 Thread Michael
: 'a' if I use instead: grammar P; // missing parser keyword // rest the same it works but generates a lexer. cheers, Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address

[il-antlr-interest: 24105] Re: [antlr-interest] Newbie grammar question...

2009-06-08 Thread Michael
Am Monday 08 June 2009 14:33:28 schrieb Sylvain, Gregory [USA]: stmt :SUBJ_TOK COLON PHRASE+ NL+ ; it works for me after adding EOF to the stmt rule: stmt :SUBJ_TOK COLON PHRASE+ NL+ EOF; Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http

[il-antlr-interest: 24081] Re: [antlr-interest] Language design patterns book available in beta

2009-06-06 Thread Michael Bedward
downloadable. I like this approach. Yep, I'll add my voice in support of that too Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received

[il-antlr-interest: 24028] [antlr-interest] AntlrWorks export to dot files

2009-06-04 Thread Michael Pasdziernik
. This is not too bad in general, but for cyclic dfas it is. Is this known? Are there workarounds available? Thanks Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address

[il-antlr-interest: 23841] [antlr-interest] some questions about C runtime

2009-05-21 Thread Yurushkin Michael
Good evening! I have IR, that was written in C++. But there is only C runtime. 1) How can I add namespaces block in *.c file? 2) Is it possible to create some (e.g. 2) objects of ParserClass (or LexerClass)? Yacc, as I know, generates C code with global variables. So.. what about antlr? --

[il-antlr-interest: 23814] Re: [antlr-interest] *** GMX Spamverdacht *** ANTLR grammar processing returns strange warnings

2009-05-20 Thread Michael
while this may not be the problem, it's a good idea to add catching of EOF to your top grammar rule: main: STATIC_MAIN '{' stats '}' EOF; can't you narrow down the error, stripping away as much as possible? It would be easier to find then... cheers Michael List: http://www.antlr.org

[il-antlr-interest: 23768] Re: [antlr-interest] Selective ignoring of whitespace

2009-05-18 Thread Michael
is below. if you write a space after your keyword_field then the lexer sees that the KEYWORD rule gives a longer match than keyword_field and so matches to the KEYWORD rule (it includes the spaces): KEYWORD: CHAR(CHAR|' ')*; which later fails since a wrong token is returned. Michael List

[il-antlr-interest: 23728] Re: [antlr-interest] Lexer matching non-matching rule

2009-05-15 Thread Michael
is not called but the URL rule is called which raises an exception since the colon is missing. No idea why . cheers Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address

[il-antlr-interest: 23718] Re: [antlr-interest] Can antlr be used for this?

2009-05-14 Thread Michael Bedward
build comprehensive translators ? Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received this message because you are subscribed

[il-antlr-interest: 23679] Re: [antlr-interest] literal has no associated lexer rule...

2009-05-13 Thread Yurushkin Michael
Thanks! Jim Idle j...@temporal-wave.com писал(а) в своём письме Wed, 13 May 2009 01:45:11 +0400: Yurushkin Michael wrote: Good day! I use Antlr 3. There are 2 grammar files (lexer and parser). Lexer contains tokens definitions and parser imports tokens tabel. Is it possible to avoid

[il-antlr-interest: 23684] [antlr-interest] some difficuilties with C runtime building

2009-05-13 Thread Yurushkin Michael
Good day. I have some problems with C runtime. 1) At first, when I try to load C.sln, VS2008 says that associated source control plug-in is not installed on this computer. Source control will be disabled for this project. What plug-in I need to install (I haven't seen something about it in

[il-antlr-interest: 23693] Re: [antlr-interest] ToStringTree

2009-05-13 Thread Michael Bedward
Very nice - thanks for the link Steve Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received this message because you

[il-antlr-interest: 23663] Re: [antlr-interest] Problem with AST parsing for ST

2009-05-12 Thread Michael
rule in the tree grammar match the generated tree?, like: policy: ^(POLICY targetType conditionStat) - policyStat(cond={$conditionStat.st}) cheers, Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your

[il-antlr-interest: 23664] Re: [antlr-interest] simple return value problem

2009-05-12 Thread Michael
':' DELIM? param (',' DELIM? param)* { type = $v.text; }; param: TOKEN DELIM? { list.add($TOKEN.text); } ; Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address

[il-antlr-interest: 23607] Re: [antlr-interest] Recursive not supposed behaivor when finding EOF

2009-05-08 Thread Michael
include the EOF token into your grammar. cheers, Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received this message because you

[il-antlr-interest: 23567] Re: [antlr-interest] Comment

2009-05-07 Thread Michael
comment version like this ( comments start with # or // and go until end of the line): NL: ('\r'? '\n')+ { skip();}; SINGLE_COMMENT: ('#' | '//') ~('\r' | '\n')* NL { skip();}; so change this to: SINGLE_COMMENT: '-*' ~('\r' | '\n')* NL { skip();}; doesn't work? cheers, Michael List: http

[il-antlr-interest: 23570] Re: [antlr-interest] Comment

2009-05-07 Thread Michael
Am Thursday 07 May 2009 14:10:22 schrieb Thomas Dill: grammar FexParser; options {k=3; backtrack=true; memoize=true;} report:(comment | text | NEWLINE)+ ; comment :(COMMENT_START ~(NEWLINE))* ; I think this does only read one -* and the next character (not till end of

[il-antlr-interest: 23577] Re: [antlr-interest] Comment

2009-05-07 Thread Michael
: ( ~('-') | ('-') ~'*') = '-' ); Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups il

[il-antlr-interest: 23518] Re: [antlr-interest] Skip subtree in tree grammar

2009-05-05 Thread Michael
with it, maybe like: bool_function_content[Boolean value] : {value != null value.booleanValue()}? = function_content* |{value != null !value.booleanValue()}? = overread_function_content* ; cheers, Michael List: http://www.antlr.org/mailman/listinfo/antlr

[il-antlr-interest: 23493] Re: [antlr-interest] Problem with StringTemplate

2009-05-04 Thread Michael
comes with antlr 2.7.7 but I don't want to use that. I want to use antlr v3. Can anyone help me out here? you are using it: antlr3 depends on it, so add it to the classpath cheers Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman

[il-antlr-interest: 23501] Re: [antlr-interest] Problems defining a simple Integer Match

2009-05-04 Thread Michael Strelnikov
Try to add fragment prefix before DIGITO On Mon, May 4, 2009 at 10:49 PM, Marwan Ajraoui marwan.ale...@gmail.com wrote: Hi There; I'm currently defining a grammar for a based tag language using ANTLR; The problem I'm facing is that a single digit doesn't match my defined rule INTEGER, here

[il-antlr-interest: 23437] Re: [antlr-interest] invoke subtemplates on multivalue attribute

2009-04-30 Thread Michael
^(conds+=CONDITION condExpression) ^(thens+=THEN expression) ))* (^(ELSE else=expression))? ) Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe

[il-antlr-interest: 23438] Re: [antlr-interest] invoke subtemplates on multivalue attribute

2009-04-30 Thread Michael
+=block)* else? - ^IF(cond+, block*, else) to generate a tree which allready has the conds and elseif nodes collected. Your tree is then like: ^(IF cond+ block+ else?) Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr

[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

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

2009-04-28 Thread Michael Coupland
have any better ways to solve this problem? Suggestions on how to match the 'foo' comment? Any feedback is appreciated! Thanks! Michael - grammar KeepSomeComments; root:declaration* EOF

[il-antlr-interest: 23360] [antlr-interest] ANTLR + C Target Questions

2009-04-24 Thread Michael Coupland
doesn't seem to work. http://www.antlr.org/hudson/job/ANTLR_Tool/lastSuccessfulBuild/ seems like a good place to get the latest development build, but I can't seem to actually find a download link anywhere? Thanks! Michael Coupland List: http://www.antlr.org/mailman/listinfo/antlr-interest

[il-antlr-interest: 23363] Re: [antlr-interest] ANTLR + C Target Questions

2009-04-24 Thread Michael Coupland
helpful! Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups il-antlr

[il-antlr-interest: 23326] Re: [antlr-interest] Resetting an AST tree walker

2009-04-22 Thread Michael Bedward
highlighted in the release notes for 3.1.3. It seems like a fairly major change and it caused me a lot of grief for a while ! Michael 2009/4/22 Steve Souza st...@stevesouza.com: This question in the antlr archives is the same one I have:  Is this now the correct practice where a tree walker

[il-antlr-interest: 23328] Re: [antlr-interest] Resetting an AST tree walker

2009-04-22 Thread Michael Bedward
there anymore ! I don't like this at all, but I believe in the thread that you cited earlier someone says it is the intended behaviour. Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address

[il-antlr-interest: 23330] Re: [antlr-interest] Resetting an AST tree walker

2009-04-22 Thread Michael Bedward
BufferedTreeNodeStream instead of CommonTreeNodeStream? Yep - BufferedTreeNodeStream does what I want. But as to the logic of the changes, or when either class is preferable, I'm afraid I don't know. More docs on this would be nice. Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest

[il-antlr-interest: 23083] Re: [antlr-interest] Collecting Values in Lists

2009-04-09 Thread Michael Bedward
returns [int value] : DIGIT+ { $value = Integer.parseInt($text); } ; DIGIT : '0'..'9' ; WS : (' ' | '\t' | '\n' | '\r') { $channel=HIDDEN; } ; Hope this helps Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe

[il-antlr-interest: 23052] Re: [antlr-interest] Collecting Values in Lists

2009-04-08 Thread Michael Bedward
this helps Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups il

[il-antlr-interest: 23001] Re: [antlr-interest] A Simple Question on Channels

2009-04-03 Thread Michael Bedward
Hi Indhu, Thanks very much for posting this example - it explains something that I want to do too. Michael 2009/4/3 Indhu Bharathi indh...@s7software.com: As expected, there were some bugs :-) Here is a implementation that works fine: grammar Test; @members{     private

[il-antlr-interest: 22898] Re: [antlr-interest] Maven plugin documentation...

2009-03-31 Thread Michael Bedward
2009/4/1 Jim Idle wrote: I'll check the examples, but: The Libraries example has goals within configuration. The Netbeans editor, following the pom schema I guess, doesn't suggest goals as an element when you are within a configuration block, only outside. Michael List: http://www.antlr.org

[il-antlr-interest: 22900] [antlr-interest] reset method on a tree parser

2009-03-31 Thread Michael Bedward
to happen. I've looked at the release notes but they are silent on this issue. Any tips much appreciated. Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address

[il-antlr-interest: 22901] Re: [antlr-interest] reset method on a tree parser

2009-03-31 Thread Michael Bedward
Sorry, that should have been migrating an app from ANTLR 3.1.1 to 3.1.3 I've now also looked in the release notes for 3.1.2 but don't see my answer there either (or perhaps I just don't understand it :). So, still hoping for advice. cheers Michael 2009/4/1 Michael Bedward michael.bedw

[il-antlr-interest: 22902] Re: [antlr-interest] reset method on a tree parser

2009-03-31 Thread Michael Bedward
(someone please let me know if I'm missing the obvious). Give the tree walker a BufferedTreeNodeStream stream instead of CommonTreeNodeStream seems to fix the problem. Is this now the correct practice where a tree walker is to be invoked repeatedly ? cheers Michael List: http://www.antlr.org/mailman

[il-antlr-interest: 22804] [antlr-interest] ANTLR 3.1.3 performance issue

2009-03-27 Thread Gerz, Michael
will be fixed eventually? Best regards, Michael Dr. Michael Gerz FGAN e.V. Phone: +49 228 9435-414 Department FKIE/ITF Fax:+49 228 9435-685 Neuenahrer Straße 20

[il-antlr-interest: 22564] Re: [antlr-interest] gunit with custom AST nodes

2009-03-20 Thread Michael Pasdziernik
and runTreeParser behind the parser constructor call. Now it works :) Regards Michael On Thursday 19 March 2009 15:55:01 Michael Pasdziernik wrote: Hi, I have some problems using gUnit with a custom tree class. I have tried to patch gunit as described in the corresponding thread from march 2008

[il-antlr-interest: 22504] Re: [antlr-interest] failed predicate problem

2009-03-17 Thread Michael Bedward
Hi Annie, Sorry for the confusion on my part. I haven't used StringTemplate yet and so went off in the wrong direction... But luckily, I see that Johannes has proposed a solution for you on the other thread about your question. Michael List: http://www.antlr.org/mailman/listinfo/antlr

[il-antlr-interest: 22524] Re: [antlr-interest] How can I modify a tree node value according to the value of another tree node ?

2009-03-17 Thread Michael Bedward
= parser.getList(); Then it gives the AST and the list to Bwalker... CommonTreeNodeStream nodes = new CommonTreeNodeStream(primaryAST); nodes.setTokenStream(tokens); BWalker bwalker = new BWalker(nodes); bwalker.setList( listFromA ); BWalker.start_return r = bwalker.start(); Hope this helps Michael List: http

[il-antlr-interest: 22526] Re: [antlr-interest] A newbie's question

2009-03-17 Thread Michael Bedward
this is practical, but if it is, or if there are multiple tree walking stages (ie. step 4, step 5 etc each of which generates a new AST) then it can get tricky. There was a recent discussion of this here... http://www.antlr.org/pipermail/antlr-interest/2009-February/032799.html Hope this helps Michael

[il-antlr-interest: 22464] Re: [antlr-interest] distinguishing between int and double in a tree grammar

2009-03-16 Thread Michael
(or force you to write a coercion)... if / gets a boolean and a char it can throw a type error... Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address

[il-antlr-interest: 22492] Re: [antlr-interest] failed predicate problem

2009-03-16 Thread Michael Bedward
={$argumentSuffix.text}) ; what are the asterisks for ? Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received this message because you are subscribed

[il-antlr-interest: 22499] Re: [antlr-interest] failed predicate problem

2009-03-16 Thread Michael Bedward
the grammar a little more readable). I hope I'm answering the right question ! Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received

[il-antlr-interest: 22446] Re: [antlr-interest] Doc-comments in generated Java

2009-03-13 Thread Michael Bedward
-end code, I would have thought it was straightforward to check if there is a need for List etc. and only add the imports when required. Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address

[il-antlr-interest: 22407] Re: [antlr-interest] SVN repository for ANTLR Maven plugin?

2009-03-11 Thread Michael Bedward
/hudson/job/Maven_Plugin/39/changes ...and then perhaps get back to us on the ANTLR list to discuss the plugin with Jim Idle, the author of the current code. All the best Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest

[il-antlr-interest: 22409] Re: [antlr-interest] SVN repository for ANTLR Maven plugin?

2009-03-11 Thread Michael Bedward
rustle, rustle... that's the sound of me rubbing my hands together in anticipation :) Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address

[il-antlr-interest: 22387] Re: [antlr-interest] skipping whitespaces in code and avoiding it in comments

2009-03-10 Thread Michael Bedward
Have a look at this page... http://www.antlr.org/wiki/pages/viewpage.action?pageId=557063 Michael 2009/3/9 Sam Barnett-Cormack s.barnett-corm...@lancaster.ac.uk: The whole point of the hidden channel (rather than just discarding) is that the parser *can* tune to it, or use it for context

[il-antlr-interest: 22326] Re: [antlr-interest] unary minus

2009-03-07 Thread Michael Bedward
but it works. Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[il-antlr-interest: 22009] Re: [antlr-interest] When a comment not a comment

2009-02-19 Thread Michael Bedward
' ('\n')? | '\n'; Mmmm... I tried that one after seeing Joe's previous message, but doesn't it have the same problem ? ie. it will eats a line: #ABCD foo ...as a comment ? Does for me in ANTLRWorks. I must be missing something... cheers Michael List: http://www.antlr.org/mailman/listinfo

[il-antlr-interest: 22013] Re: [antlr-interest] When a comment not a comment

2009-02-19 Thread Michael Bedward
Shouldn't do - you are using the debug mode and not the interpreting mode? yep I must be doing something wrong but I can't spot it... (probably too close to my nose :) Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr

[il-antlr-interest: 21995] Re: [antlr-interest] When a comment not a comment

2009-02-18 Thread Michael Bedward
Hi Joe, How about this... NONCOMMENT : '#ABCD' { $channel = HIDDEN; } ; COMMENT : '#' ~('\r' | '\n')* NEWLINE { $channel = HIDDEN; } ; NEWLINE : '\r' ('\n')? | '\n' ; Michael List: http://www.antlr.org/mailman/listinfo/antlr

[il-antlr-interest: 21883] [antlr-interest] maven plugin always regenerates sources

2009-02-12 Thread Michael Bedward
goalantlr/goal /goals /execution /executions /plugin cheers Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your

[il-antlr-interest: 21886] Re: [antlr-interest] Summing values from +=

2009-02-12 Thread Michael Bedward
At the start of the rule the generated parser code will have... var e:Token=null; var list_e:Array=null; and then in the sumStat rule loop... if (list_e==null) list_e=new Array(); list_e.push(e); Hope this helps, Michael 2009/2/12 Des Hartman d...@deshartman.com: I have a simple function

[il-antlr-interest: 21901] Re: [antlr-interest] maven plugin always regenerates sources

2009-02-12 Thread Michael Bedward
FORGOTTEN Is the plugin source available ? I'm no expert but I've done a bit of maven plugin hacking and I'd be happy to look at it. cheers Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address

[il-antlr-interest: 21903] Re: [antlr-interest] maven plugin always regenerates sources

2009-02-12 Thread Michael Bedward
super - thanks Jim Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[il-antlr-interest: 21909] Re: [antlr-interest] Maven plugin source etc now available from ANTLR Hudson

2009-02-12 Thread Michael Bedward
that's terrific Jim - many thanks Michael 2009/2/13 Jim Idle j...@temporal-wave.com: As well as deploying the source and javadoc jars to the ANTLR snapshot repository (which means they will go to the maven central respository at the next point release), the ANTLR Hudson continuous build

[il-antlr-interest: 21846] Re: [antlr-interest] multiple tree walkers

2009-02-10 Thread Michael Bedward
the value to write to the output image pixel. Dunno if that makes sense... If you read this far perhaps you can tell me where the above transformations fit into your taxonomy. And any other comments would also be welcome of course. cheers Michael List: http://www.antlr.org/mailman/listinfo/antlr

[il-antlr-interest: 21851] Re: [antlr-interest] grammar highlighting in Netbeans

2009-02-10 Thread Michael Bedward
Yes - I like what I see so far. It needs some updates for actions and stuff like that (most of my grammar shows up red ;-), but I think that it will be really good as it develops. Well your grammars would probably make excellent advanced test cases for the developer Jim... Michael List

[il-antlr-interest: 21814] Re: [antlr-interest] multiple tree walkers

2009-02-09 Thread Michael Bedward
it with only the positional components to be evaluated at each image pixel position. Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You

[il-antlr-interest: 21790] [antlr-interest] multiple tree walkers

2009-02-08 Thread Michael Bedward
to error as the language evolves since it depends on keeping all of clones in sync. Are there other approaches / best-practices for writing multiple tree walkers ? cheers Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr

[il-antlr-interest: 21629] [antlr-interest] error with modulo operator in tree grammar action

2009-01-29 Thread Michael Bedward
option or similar that I'm missing (?) Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received this message because you are subscribed

[il-antlr-interest: 21607] [antlr-interest] expression list in tree grammar

2009-01-28 Thread Michael Bedward
direction here :-) Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups il

[il-antlr-interest: 21014] Re: [antlr-interest] ANTLR seminar in Europe

2008-12-18 Thread Michael Fogeborg
I guess a topographic map of the user-base in europe gives the answer ? On Thu, 18 Dec 2008 01:34:32 +0100, Terence Parr pa...@cs.usfca.edu wrote: On Dec 17, 2008, at 4:25 PM, Michael Fogeborg wrote: What about an Antlr seminar in Europe ? Maybe in Finland ? Might be fun to do one

[il-antlr-interest: 21004] [antlr-interest] ANTLR seminar in Europe

2008-12-17 Thread Michael Fogeborg
What about an Antlr seminar in Europe ? Maybe in Finland ? --~--~-~--~~~---~--~~ 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@googlegroups.com To

[il-antlr-interest: 20402] Re: [antlr-interest] Creating a simple expression language

2008-11-10 Thread Michael Lee
= walker.expression(); Expression.evaluate has one argument - Msg. You can expand this to include context-binding instead of Msg. Basically, an expression is compiled during the program start time and evaluate them during the runtime with some context. I hope this helps. Michael J. Lee James Abley wrote

[il-antlr-interest: 20015] [antlr-interest] Problem With CLASSPATH During Generate When Using ANTLRWorks

2008-10-17 Thread Michael Duffy
I'm using the latest ANTLRWorks plug-in with IntelliJ 7.0.4 and ANTLR 3.1.1. I'm working my way through Definitive ANTLR Reference to climb the learning curve. So far, so good. Brilliantly done - kudos to Terence Parr and everyone who contributes. I've hit a snag in section 3.2 when I start

[il-antlr-interest: 20018] [antlr-interest] Cannot Find Eval.tokens File

2008-10-17 Thread Michael Duffy
When I went to generate a grammar for walking the AST for the expression evaluation I got the following pop-up message: cannot find tokens file unset-dir\Expr.tokens Consult the console for more information. The console is empty. I tell ANTLRWorks to write generated files to a directory