[il-antlr-interest: 23559] ONLINE DATA ENTRY AND DATA CONVERSION

2009-05-07 Thread rosean...@gmail.com
ONLINE DATA ENTRY AND DATA CONVERSION http://loanfinans.blogspot.com http://loanfinans.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups il-antlr-interest group. To post to this group,

[il-antlr-interest: 23560] [antlr-interest] match any token in line

2009-05-07 Thread Tobias Wunner
Hello, new to ANTLR I wondered if it is possible to match .* expressions. So I do not have to explicitly define the tokens to be matched and capture all kinds of tokens including UTF-8 characters. My input format I would like to process looks like: @CLASS-IDENTIFIER1: record1 record2 ...

[il-antlr-interest: 23561] [antlr-interest] Doubt regarding Tree grammar

2009-05-07 Thread jevitha
Hi all, Im facing this problem of converting parser grammar to tree grammar. I have some rules which incrementally build ASTs like the following example: postfixExpression : (primary-primary) ( '(' args=expressionList ')' - ^(CALL

[il-antlr-interest: 23562] [antlr-interest] Comments get removed after instrumenting source

2009-05-07 Thread vasanthi a
HI All I have the below code for java grammar comment // Single-line comments SL_COMMENT : // (~('\r'|'\n'))* {$setType(Token.SKIP);} ; After instrumenting the java code, it is removing the java comments . Can you please let me know how to retain the comments after instrumenting the code..

[il-antlr-interest: 23564] ONLINE DATA ENTRY AND DATA CONVERSION

2009-05-07 Thread rosean...@gmail.com
ONLINE DATA ENTRY AND DATA CONVERSION http://loanfinans.blogspot.com http://loanfinans.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups il-antlr-interest group. To post to this group,

[il-antlr-interest: 23565] [antlr-interest] Appending lexer rule disables rule further above. Bug?

2009-05-07 Thread Nukiti Romanova
I'd like to write a parser for some legacy data set definition files. Here is a contrived example what the definitions look like: // A sample data type definition Type foo.bar.Strange name with 1000 weird chars: $\\d[] { required searchable String Simple

[il-antlr-interest: 23566] [antlr-interest] Comment

2009-05-07 Thread Thomas Dill
Hi there. I still got the following Problem: In the syntax, I want to parse, a comment line starts with -* and ends at the end of the line. It's possible that an asterisk can appear in a text, too. I can't find a solution. Below there's what I tried (and many other things). Can

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

2009-05-07 Thread Michael
Am Thursday 07 May 2009 14:10:22 schrieb Thomas Dill: Hi there. I still got the following Problem: In the syntax, I want to parse, a comment line starts with -* and ends at the end of the line. It's possible that an asterisk can appear in a text, too. i have a working one-line

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

2009-05-07 Thread Thomas.dill
Thanks for your reply. It doesn#39;t work, because, as you can see in the example code, after PRINT there is an asterik and there is the problem. If you try it with ANTLRWorks you can see what I mean. Best regards, Tom - Original-Nachricht Von: Michael An:

[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: 23571] [antlr-interest] java.lang.StackOverflowError

2009-05-07 Thread wirving
Helo! I want to create a Tree Grammar from my normal grammar (with the method described in the ANTLR book), and after I corrected some obvious errors (remove AST operators, etc.) I got this one: Exception in thread Thread-5 java.lang.StackOverflowError at

[il-antlr-interest: 23572] Re: [antlr-interest] java.lang.StackOverflowError

2009-05-07 Thread Andreas Meyer
I know this is not a very educating answer :-) But what about increasing the stacksize of the JVM? Andreas wirv...@beats.hu schrieb: Helo! I want to create a Tree Grammar from my normal grammar (with the method described in the ANTLR book), and after I corrected some obvious errors

[il-antlr-interest: 23573] Re: [antlr-interest] java.lang.StackOverflowError

2009-05-07 Thread wirving
thanks, now I got different errors (warnings I guess): error(10): internal error: org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:1242): could not even do k=1 for decision 8; reason: timed out (1000ms) error(10): internal error:

[il-antlr-interest: 23574] Re: [antlr-interest] java.lang.StackOverflowError

2009-05-07 Thread Andreas Meyer
You could try to increase the time-out, I think it was called -Xconversiontimeout. In my grammar, I have to set it to 20 seconds until it works without error. It does not generate huge code, it just takes some time to find out to do nothing. Andreas wirv...@beats.hu schrieb: thanks, now I

[il-antlr-interest: 23575] [antlr-interest] language design

2009-05-07 Thread Edwards, Waverly
This question is not directly aimed at ANTLR but towards language design. If someone wouldn't mind responding or directing me towards the answer to why would I want a primitive type to be treated as an object. In Java and C#, primitive types are treated as objects. It seems to me that by doing

[il-antlr-interest: 23576] Re: [antlr-interest] language design

2009-05-07 Thread Randall R Schulz
On Thursday May 7 2009, Edwards, Waverly wrote: This question is not directly aimed at ANTLR but towards language design. If someone wouldn't mind responding or directing me towards the answer to why would I want a primitive type to be treated as an object. In Java and C#, primitive types

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

2009-05-07 Thread Michael
Am Thursday 07 May 2009 14:10:22 schrieb Thomas Dill: In the syntax, I want to parse, a comment line starts with -* and ends at the end of the line. It's possible that an asterisk can appear in a text, too. this is a simpler grammar,but it seems it does what you want: grammar Xx; start:

[il-antlr-interest: 23578] Re: [antlr-interest] language design

2009-05-07 Thread Sam Harwell
While this is somewhat true of Java, it's really not true of C#. The built-in primitive types in both languages (int, short, double, char, bool) are passed by value in function calls and kept on the stack as local variables. The process of boxing in both languages takes a primitive type and wraps

[il-antlr-interest: 23579] Re: [antlr-interest] Doubt regarding Tree grammar

2009-05-07 Thread Jim Idle
jevitha wrote: Hi all, Im facing this problem of converting parser grammar to tree grammar. I have some rules which incrementally build ASTs like the following example: postfixExpression : (primary-primary) ( '(' args=expressionList ')' - ^(CALL $postfixExpression

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

2009-05-07 Thread Jim Idle
Thomas Dill wrote: Hi there. I still got the following Problem: In the syntax, I want to parse, a comment line starts with -* and ends at the end of the line. Its possible that an asterisk can appear in a text, too. I cant find a solution. Below theres what I

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

2009-05-07 Thread Jim Idle
Michael wrote: 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

[il-antlr-interest: 23582] Re: [antlr-interest] java.lang.StackOverflowError

2009-05-07 Thread Jim Idle
wirv...@beats.hu wrote: thanks, now I got different errors (warnings I guess): error(10): internal error: org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:1242): could not even do k=1 for decision 8; reason: timed out (1000ms) error(10): internal error:

[il-antlr-interest: 23583] [antlr-interest] Guidance for ANTLR Newb

2009-05-07 Thread Christopher H. Laco
Long story longer, I'm trying to convert a templating language from Perl to C#. I finally settled on ANTLR because of ANTLRWorks. It's invaluable for someone like me just starting. I got my ANTLR Reference from Amazon yesterday and joined the list so I could avoid email bombing our BDFL. :-)

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

2009-05-07 Thread Martijn Reuvers
Hello! I tried it, but neither works. :/ I ran it against a snapshot of 3.1.4 runtime that I built with mave (3.1.3 has the same errors btw): The skip option says when run: * Wildcard invalid as root; wildcard can itself be a tree. As for the | * option it still has a similar error as before:

[il-antlr-interest: 23585] Re: [antlr-interest] match any token in line

2009-05-07 Thread Nukiti Romanova
maybe is this what you want? in : cname*; cname : '@' CHAR* ':' NL param*; param : (CHAR|':')+ NL+; CHAR: ~(NewLineChars|'@'|':')+ ; NL : NewLineChars+; fragment NewLineChars : '\n' | '\r' ; Nukiti Hello, new to ANTLR I wondered if it is possible

[il-antlr-interest: 23586] Re: [antlr-interest] Guidance for ANTLR Newb

2009-05-07 Thread Nick Vlassopoulos
Hi Chris, I must admit that I am fairly new to antlr, as well. Nevertheless, if I got this correctly, the two possible alternatives are the ones that you mentioned (which are in some sense equivalent) 1. Turn off the parser while being outside the actual language blocks and turn it on again when

[il-antlr-interest: 23587] Re: [antlr-interest] language design

2009-05-07 Thread Edwards, Waverly
Thank you very much for your insights regarding the benefits of primitive types as objects. At this time, I don't see the value but I am glad to have your perspective so I can think about it a little more. Are you designing a language? If so, may I recommend that you don't? The world does

[il-antlr-interest: 23588] Re: [antlr-interest] language design

2009-05-07 Thread Edwards, Waverly
In Java, there are two severe limitations to the ability of primitives. First, the language doesn't allow user-defined primitives, so there is no concept of lightweight enums, aggregate data structures, or the ability to create special struct based on an int that has special meaning with no

[il-antlr-interest: 23596] Re: [antlr-interest] Sometimes significant new lines

2009-05-07 Thread Indhu Bharathi
Did you evaluate the option of making semicolon a default token itself instead of hidden token? Unless there is compelling reason to make semicolon hidden token, let's make it default token. That will make the work easy. Now assuming there is some compelling reason to make semicolon hidden

[il-antlr-interest: 23597] [antlr-interest] hasPredicateBlockedByAction ???

2009-05-07 Thread Avid Trober
Hi, does anybody know how to determine the source of an error such as this? the wiki says convert the grammar to v3; it is a v3 grammar. Thanks. ANTLR Parser Generator Version 3.1 (August 12, 2008) 1989-2008 error(10): internal error: JavaScript.g : java.util.NoSuchElementException: no such

[il-antlr-interest: 23598] [antlr-interest] Grammars for network protocols

2009-05-07 Thread Ian Kaplan
In some (many, most) cases Extended Bacus Naur Form (EBNF) grammar is used to describe network protocols. For example, the HTTP protocol RFC published on the W3C web site is described in EBNF. However, the description is ah descriptive, rather than definitive. There are parts of the grammar