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,
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
...
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
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..
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,
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
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
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
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:
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
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
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
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:
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
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
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
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:
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
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
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
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
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:
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. :-)
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:
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
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
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
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
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
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
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
31 matches
Mail list logo