[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

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

2009-11-08 Thread Michael Bedward
rewritten token has been lost and there is just 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/m

[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 : > 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 and > shows

[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: 26635] [antlr-interest] Fixed a Problem

2009-11-03 Thread Michael Pinnegar
I was having issues with that timeout. The problem was in the fact that my CLASSPATH environmental variable wasn't specifying where the javac.exe was located, and the ANTLRworks environment was defaulting to that. So I pointed the environment to the right place, and it was able to connect su

[il-antlr-interest: 26604] [antlr-interest] Cannot launch the debugger Time-out waiting to connect to the remote parser

2009-11-02 Thread Michael Pinnegar
address localhost port49100 I've got my grammar all setup now, and I was even able to find a fix for a compilation problem by adding fragment above the LETTER entry. That said, now I'd like to be able to feed my grammar various inputs and see how it deals with them. When I go to run th

[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

[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: 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 par

[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 cau

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

2009-10-08 Thread michael
cated. If have to do: rule_x: NODE { NodeData d = (NodeData)$NODE; } -> NODE[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 Li

[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 : > Hello, > > I've recently heard about new ANTLR book. Is there any release date for it? > Thanks in advance. > > W

[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 Unsubs

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

2009-08-04 Thread michael
OOPEND ))*; this should match all other characters, then use this token in your parser 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 --~--

[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 are

[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... org.antlr antlr3-maven-plugin 3.1.3-1 antlr

[il-antlr-interest: 24898] Re: [antlr-interest] About AST construction and rewriting for tree parsers?

2009-07-29 Thread Michael Bedward
and MakeRuntime.g all do bits of AST rewriting. Hope 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

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

2009-07-27 Thread Gardner, Michael T
any problems or side effects with just ignoring the error as you suggested in the book? Does anyone have a working definition of the if-then-else statement that does not generate AntlrWorks warnings, compiles cleanly (in Java), and works? Michael T. Gardner List: http://www.antlr.org/mailman

[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/mail

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

2009-07-16 Thread Michael
might need EOF rather just empty alt. I tried that too 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

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

2009-07-16 Thread Michael
for every > 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

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

2009-07-16 Thread Michael
: .* ) '*/' { openComment = false; skip(); }; don't know if this is nice, 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 --~--~-~--~~-

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

2009-06-09 Thread Michael
; // or similar... does it work to change it to: NL: ('\r'? '\n')+ ( '\'' ~('\n'|'\r')* )? ; // 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 jus

[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:

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

2009-06-08 Thread Michael
ral has no associated lexer rule: '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

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

2009-06-08 Thread Michael
} > > a :'A' | 'A' 'B'^; > -- 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. cheer

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

2009-06-08 Thread Michael
here are some differences, 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&

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

2009-06-06 Thread Michael Bedward
. 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 receive

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

2009-06-04 Thread Michael Pasdziernik
Hi, Ok, dot is a simple text file. Replacing "arrowhead = none" with "arrowhead = normal" solves the Problem. Regards Michael On Thursday 04 June 2009 12:17:29 Michael Pasdziernik wrote: > Hi AntlrWorks Users, > I have a problem exporting decision dfas for inclusion

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

2009-06-04 Thread Michael Pasdziernik
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: 24019] Re: [antlr-interest] "Language design patterns" book available in beta

2009-06-03 Thread Michael Bedward
I got the pragprog email late last night (local time) and had the beta book about a minute later :-) I've been looking forward to this for months ! Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-

[il-antlr-interest: 23996] Re: [antlr-interest] ocaml target?

2009-06-03 Thread Michael
he needed runtime. I did only some first steps and did not the complete a running example. I'm not even sure whether using objects or just modules and functions is better. But it's fun to experiement with it :-) Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Uns

[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 Michae

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

2009-05-18 Thread Michael
CHAR(CHAR|' ')*; which later fails since a wrong token is returned. Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~-~--~~~---~--~~ You re

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

2009-05-15 Thread Michael
'\r' | '\t' | ' ')*; if you leave out the dot in the URL rule it works as it should. If the dot is there the IDENT rule is not called but the URL rule is called which raises an exception since the colon is missing. No idea why . c

[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 to the

[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 are

[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: 23679] Re: [antlr-interest] literal has no associated lexer rule...

2009-05-13 Thread Yurushkin Michael
Thanks! Jim Idle писал(а) в своём письме 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 i

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

2009-05-12 Thread Yurushkin Michael
: (expr '+' factor) | (expr '-' factor) | factor;" but the "literal has no associated lexer rule: '+'" error appears. Best regards, Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe:

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

2009-05-12 Thread Michael
TOKEN: (CHAR|DIGIT)+ ; in: typeExpression EOF { print(...) }; typeExpression: '@' v=TOKEN ':' DELIM? param (',' DELIM? param)* { type = $v.text; }; param: TOKEN DELIM? { list.add($TOKEN.text); } ; Michael List: http://www.antl

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

2009-05-12 Thread Michael
t(policies={p}) ; > > and policy looks like this: > > policy: conditionStat > -> policyStat(cond={$conditionStat.st}) > ; should the policy rule in the tree grammar match the generated tree?, like: policy: ^(POLICY targetType conditionStat) -> policyStat(cond={$conditi

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

2009-05-08 Thread Michael
_program EOF I think you should 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 --~--~-~--~~~---~--~~

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

2009-05-07 Thread Michael
E: ('\n' | '\r'); COMMENT: '-*' (~NEWLINE)* NEWLINE; TEXTCHR: ( ~('-') | ('-') ~'*') => '-' ); Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/

[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

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

2009-05-07 Thread Michael
ppear in a "text", > too. > i have a working one-line comment version like this ( comments start with # or // and go until end of the line): NL: ('\r'? '\n')+ { skip();}; SINGLE_COMMENT: ('#' | '//') ~('\r' | '\n')* NL {

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

2009-05-05 Thread Michael
at subtree and do nothing with it, maybe like: bool_function_content[Boolean value] : {value != null && value.booleanValue()}? => function_content* |{value != null && !value.booleanValue()}? => overread_function_content* ; cheer

[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 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 is the definiti

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

2009-05-03 Thread Michael
are referenced properly. > > Is there a version conflict here? The StringTemplate 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

[il-antlr-interest: 23478] Re: [antlr-interest] New Mave n artifacts, some fixes, buidlable source

2009-05-01 Thread Michael Bedward
many thanks for all that 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

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

2009-04-30 Thread Michael
can in the parser say something like: if: IF c=cond THEN b=block (ELSEIF c+=cond THEN b+=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.o

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

2009-04-30 Thread Michael
HEN thens+=expression) (^(ELSEIF ^(conds+=CONDITION condExpression) ^(thens+=THEN expression) ))* (^(ELSE else=expression))? ) Michael Li

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

2009-04-28 Thread Michael Coupland
o the lexer won't throw it out as a CPP_COMMENT. Does anyone have any better ways to solve this problem? Suggestions on how to match the 'foo' comment? Any feedback is appreciated! Thanks! Michael - g

[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: 23363] Re: [antlr-interest] ANTLR + C Target Questions

2009-04-24 Thread Michael Coupland
and there don't appear to be any downloadable artifacts at http://antlr.org/hudson/job/ANTLR_Tool/ Thanks for your response, it was very helpful! Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-em

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

2009-04-24 Thread Michael Coupland
with scope variables, and saw this thread: http://www.antlr.org/pipermail/antlr-interest/2009-March/033769.html but the link to http://antlr.org/downloads doesn't seem to work. http://www.antlr.org/hudson/job/ANTLR_Tool/lastSuccessfulBuild/ seems like a good place to get the latest dev

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

2009-04-22 Thread Michael Bedward
reason not to use > 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.an

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

2009-04-22 Thread Michael Bedward
thing 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/yo

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

2009-04-22 Thread Michael Bedward
been 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 : > 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: 23083] Re: [antlr-interest] Collecting Values in Lists

2009-04-09 Thread Michael Bedward
; y returns [int value] : DIGIT+ { $value = Integer.parseInt($text); } ; DIGIT : '0'..'9' ; WS : (' ' | '\t' | '\n' | '\r') { $channel=HIDDEN; } ; Hope this helps Michae

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

2009-04-08 Thread Michael Bedward
ype. Hope 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 Gr

[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 : > As expected, there were some bugs :-) Here is a implementation that works > fine: > > grammar Test; > > @members{ > >    

[il-antlr-interest: 23000] Re: [antlr-interest] selective debug code generation for maven plugin

2009-04-03 Thread Michael Bedward
day linking to your new docs but it probably would be better just to replace the old with the new. cheers Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-addr

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

2009-03-31 Thread Michael Bedward
2 or 3.1.3 (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.an

[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

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

2009-03-31 Thread Michael Bedward
em 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-ema

[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. Mic

[il-antlr-interest: 22897] Re: [antlr-interest] using the antlr maven repository

2009-03-31 Thread Michael Bedward
cheers Jim - I missed that 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

[il-antlr-interest: 22894] Re: [antlr-interest] using the antlr maven repository

2009-03-31 Thread Michael Bedward
apshot, which is 3.1.4 anyway :-) > I have 3.1.3 in my pom.xml but I notice that both the 3.1.3 and 3.1.3-SNAPSHOT jars are being downloaded (see below). I've looked thought my project's pom hierarchy but can't find anything that might be inadvertently requesting this. Any ide

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

2009-03-31 Thread Michael Bedward
That's terrific, thanks Jim. I notice that in the different examples is sometimes inside and sometimes outside. Is this right ? I ask because when I'm editing the pom.xml file in Netbeans, the editor doesn't suggest the goals element when inside configuration. cheers Michae

[il-antlr-interest: 22867] [antlr-interest] Generic parser class

2009-03-31 Thread Michael Sperber
For an ANTLR project (Java backend), a need a to parameterize the parser class over a generic, e.g. I'd like the generated parser to start with a declaration like this: public class XXXParser extends Parser { ... } Is this possible? Help would be much appreciated! -- Regards, Mike List: ht

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

2009-03-27 Thread Gerz, Michael
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
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

[il-antlr-interest: 22561] Re: [antlr-interest] Small example of local variable semantic analysis for an IDE

2009-03-19 Thread Michael Bedward
Thanks for posting this Sam ! I want to do some editor-related ANTLR work soon so it's nice to have your example. cheers Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-ad

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

2009-03-19 Thread Michael Pasdziernik
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-int

[il-antlr-interest: 22548] Re: [antlr-interest] Tree - Replace nodes in tree

2009-03-18 Thread Michael Bedward
pr) Here I replace an ASSIGN node with an IMAGE_WRITE node conditional on the result of a lookup in the predicate. Michael List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-em

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

2009-03-17 Thread Michael Bedward
is 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 Mi

[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
he 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://www.antlr.org/mailman/

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

2009-03-16 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/

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

2009-03-16 Thread Michael Bedward
the members section of this grammar (just to keep 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 --~--~-

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

2009-03-16 Thread Michael Bedward
> * ?  - Match element one or more times. > > Does that what you mean? I just hadn't seen an asterisk in front of a rule or token name before... *propertyReferenceSuffix* argumentSuffix*) ^ This one. It's probably just an email text thing - sorry to go off an a tangent

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

2009-03-16 Thread Michael Bedward
Hi Annie, One way to pass data between sub-trees is to use global scope. See section 4.5 in the ANTLR book. Hope this helps Michael 2009/3/17 YINGAnnie : > > Hi everyone, > > > What I want to do is to replace var t:Number=Math.ceil(1.5); to var > t:int=int(1.5); The tree

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

2009-03-16 Thread Michael Bedward
t;Math.abs")}? mathabs(x={$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

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

2009-03-16 Thread Michael Bedward
;9' ; fragment Dot : '.' ; fragment NonZeroDigit: '1'..'9' ; fragment FloatExp: ('e'|'E' (PLUS|MINUS)? '0'..'9'+) ; Hope this helps

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

2009-03-16 Thread Michael
int to double for it's first parameter (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/mailma

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

2009-03-15 Thread Michael Bedward
memberExpression indexSuffix * propertyReferenceSuffix* argumentSuffix*) {$memberExpression.text.equals("Math.abs")}? ->mathabs(x={$argumentSuffix.text}) -> [ alternative re-write (or blank to just drop the node from the tree) ] ; Hope this helps Mic

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

2009-03-13 Thread Michael Bedward
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

[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-ad

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

2009-03-11 Thread Michael Bedward
.. http://antlr.org/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/op

[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 : > The whole point of the hidden channel (rather than just discarding) is > that the parser *can* tune to it, or use it for context checking in > predicate

[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: 22148] Re: [antlr-interest] Is this the correct use of ANTLR

2009-02-27 Thread Michael Bedward
R site very helpful, even though my language is not pythonesque... Hope 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 rece

[il-antlr-interest: 22104] Re: [antlr-interest] request for comments on language implementation

2009-02-25 Thread Michael Bedward
general discussion but I'd also be really grateful for further specific feedback on Jiffle. 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: 22063] Re: [antlr-interest] RElease 3.1.2 now in Maven repo

2009-02-23 Thread Michael Bedward
also this wiki page... http://www.antlr.org/wiki/display/ANTLR3/Using+ANTLR+3+with+Maven+2 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: 22045] Re: [antlr-interest] Match A with exception of B .....how do I do that?

2009-02-22 Thread Michael Bedward
xclusive ? I'm guessing they are not otherwise you would not be asking your question. But perhaps if you provide a specific example of something that wasn't working for you during your sleepless weekend you will get better suggestions. Michael List: http://www.antlr.org/mailman

[il-antlr-interest: 22043] Re: [antlr-interest] Match A with exception of B .....how do I do that?

2009-02-22 Thread Michael Bedward
2009/2/23 Vlastimil Adamovsky : > > I want to parse digits, that are from 0 to 9 except those that are from 4 > to 7. > In reality, I want to parse only digits 0,1,2,3,8,9 > A: '0'..'3' | '8' | '9' ; Is this what you want ? Mic

[il-antlr-interest: 22035] Re: [antlr-interest] RElease 3.1.2 now in Maven repo

2009-02-21 Thread Michael Bedward
that version will build using ANTLR 3.1.2 >> Jeepers that's service ! Many thanks Jim and Ter 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: 22024] [antlr-interest] request for comments on language implementation

2009-02-20 Thread Michael Bedward
ANTLR neophyte there is bound to be a lot of inefficient / inappropriate / just plain wrong stuff in the grammars and associated code. Any feedback on how to do things better will be gratefully received. Be brutal ! cheers Michael List: http://www.antlr.org/mailman/listinfo/antlr-interes

  1   2   >