[il-antlr-interest: 31906] Re: [antlr-interest] Grammar issue

2011-03-23 Thread maulattu
Ok Jim, let me understand if I'm missing something with a short example. Take this little section of the grammar parameter_with_index : parameterName = 'PARAM_' parameterIndex '=' numericLiteral ; It shall be changed to parameter_with_index : parameterNameLiteral parameterIndex

[il-antlr-interest: 31907] [antlr-interest] [CSharp3] rule visibility in composite grammars

2011-03-23 Thread Ranco Marcus
Hi all/Sam, While using the CSharp3 target on a composite grammar, I came across a few issues regarding rule visibility. If no modifier (private, protected, public, ...) is specified for a rule, the Java target generates public methods (since it is not implemented IIRC) and the CSharp3 target

[il-antlr-interest: 31910] Re: [antlr-interest] [CSharp3] rule visibility in composite grammars

2011-03-23 Thread Sam Harwell
Hi Ranco, I'll add a simple delegate grammar example to the tests I use here and find a way to make it work. :) If you are using Visual Studio (or MSBuild in particular, which is the standard VS build system), then you'll definitely want to use the C# port of the tool. I highly recommend this

[il-antlr-interest: 31911] Re: [antlr-interest] Grammar issue

2011-03-23 Thread Kevin J. Cummings
On 03/23/2011 05:41 AM, maulattu wrote: Ok Jim, let me understand if I'm missing something with a short example. Take this little section of the grammar parameter_with_index : parameterName = 'PARAM_' parameterIndex '=' numericLiteral ; It shall be changed to

[il-antlr-interest: 31912] Re: [antlr-interest] Q: move from v2 to v3 parser grammar. Rewrite tree rule

2011-03-23 Thread Kevin J. Cummings
On 03/23/2011 08:41 AM, Ruslan Zasukhin wrote: On 3/23/11 1:54 AM, Jim Idle j...@temporal-wave.com wrote: Hi Jim, You can do it the same way in v3, but when you generate the code, ANTLR will make up token names and you won't be able to write a good error display routine/handler because

[il-antlr-interest: 31913] Re: [antlr-interest] help for URL grammar

2011-03-23 Thread Christian CORMIER
Hi, Right, with debugger and minor changes. Thanks a lot. Regards Le 22 mars 11 à 17:07, Jim Idle a écrit : Use the debugger, not the interpreter, then if it does not work you can find out why. It might well be just the interpreter that cannot run that grammar. Jim -Original

[il-antlr-interest: 31914] Re: [antlr-interest] antlr v4 wish list

2011-03-23 Thread Jim Idle
Gary, -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of Gary Miller - The ability to have actions on the right side of an ast re-write operator. r: ( alt - ^(X alt) ) {action} ; - A different rule @init that only

[il-antlr-interest: 31915] Re: [antlr-interest] Q: move from v2 to v3 parser grammar. Rewrite tree rule

2011-03-23 Thread Ruslan Zasukhin
On 3/23/11 4:37 PM, Kevin J. Cummings cummi...@kjchome.homeip.net wrote: You can do it the same way in v3, but when you generate the code, ANTLR will make up token names and you won't be able to write a good error display routine/handler because you won't know the tokens. You will just have

[il-antlr-interest: 31918] [antlr-interest] Ignore reserved word and treat it as TOKEN

2011-03-23 Thread Hiten R
Hi, Working on this problem for two days and I don`t seem to be any closer than where I started. I have defined a combination of reserved words in grammar something like //grammar | ‘ip’ ‘route’ call_parser_method | ‘some’ do_something_else But when a parser encounters a line “some other

[il-antlr-interest: 31920] Re: [antlr-interest] Q: move from v2 to v3 parser grammar. Rewrite tree rule

2011-03-23 Thread Justin Murray
Jim, I have a question regarding your comment on case insensitivity. I have been using the slowest case insensitive lexer technique, as this is the first I have seen a viable alternative (on the page that you linked to). The grammar I am working with is a bit strange in that all of the

[il-antlr-interest: 31872] Re: [antlr-interest] Q: move from v2 to v3 parser grammar. Rewrite tree rule

2011-03-23 Thread Jim Idle
Check the article as it should tell you this, but it is only the MATCH that is done in uppercase, and the text for the tokens is taken directly from the input stream. As you only have a single character to test and not two for every character position, the lexer is smaller and should be faster

[il-antlr-interest: 31922] [antlr-interest] Code Generation Concerns

2011-03-23 Thread Kevin Cherry
Maybe this is ANTLR Works doing this, but every time code is generated, the full file path to my grammar file is displayed in comments throughout the entire file (i.e. // dir/dir/file.g put in like 50 different places all over the class definition). I find this both a security and privacy issue if

[il-antlr-interest: 31872] Re: [antlr-interest] Code Generation Concerns

2011-03-23 Thread Jim Idle
Copy the code gen template and take those pieces out. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of Kevin Cherry Sent: Wednesday, March 23, 2011 10:39 AM To: antlr-interest Subject: [antlr-interest] Code

[il-antlr-interest: 31872] Re: [antlr-interest] Code Generation Concerns

2011-03-23 Thread The Researcher
On Wed, Mar 23, 2011 at 1:55 PM, Jim Idle j...@temporal-wave.com wrote: Copy the code gen template and take those pieces out. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of Kevin Cherry Sent: Wednesday,

[il-antlr-interest: 31925] Re: [antlr-interest] Code Generation Concerns

2011-03-23 Thread Jim Idle
If your OS HAS symbolic links. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of The Researcher Sent: Wednesday, March 23, 2011 11:22 AM To: antlr-interest@antlr.org Subject: Re: [antlr-interest] Code Generation

[il-antlr-interest: 31927] [antlr-interest] antlr v4 wish list

2011-03-23 Thread Gary Miller
Hey Jim, - The ability to have actions on the right side of an ast re-write operator. r: ( alt - ^(X alt) ) {action} ; Thanks, I don't recall seeing this anywhere else. Do you use it often? Or is a bad form? - A different rule @init that only executes during when not backtracking. - The

[il-antlr-interest: 31928] Re: [antlr-interest] antlr v4 wish list

2011-03-23 Thread Matt Fowles
Terence~ Better location management. Tokens and Trees should both have methods for: getStartLine() getEndLine() getStartCharPosition() getEndCharPosition() Trees should base them on the tokens that they include. Synthetic tokens should get them from the original token or the full production

[il-antlr-interest: 31930] Re: [antlr-interest] Ignore reserved word and treat it as TOKEN

2011-03-23 Thread Hiten R
Thanks Jim. It worked. :) Appreciate your help. Hiten 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

[il-antlr-interest: 31931] Re: [antlr-interest] How to ignore TOKEN in a String

2011-03-23 Thread Hiten R
It works !!! Appreciate your help. Hiten 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 group. To