Oh, and thanks. I've put your code through a bunch of crazy scenarios after
adapting it to my full needs and it works perfectly. I can now move forward
with changes to the tree parser and interpreter. Thanks again.
On Wed, May 4, 2011 at 6:19 PM, John B. Brodie wrote:
> I think that basically yo
This does indeed work as expected. Wouldn't have been able to come up with
that on my own. I started down the path of putting function calls in between
term and booleanExpression, and that was *sort of* working. But I also
uncovered some other issues with properties (what you are calling
projection
Greetings!
On Wed, 2011-05-04 at 12:27 -0400, Jeff Hair wrote:
> Hello all,
>
> I have a simple C/JavaScript-style grammar for my interpreter project. Right
> now, functions can be called via identifier(), or identifier(param1,
> param2). This works fine for simple cases, but in my language funct
Right. That's basically what I'm doing right now. The problem is that I
can't call do stuff like anonymous function calls (which can be generated by
an expression). So I'm trying to figure out how to do enable that without
getting the recursion errors.
JavaScript allows you to do stuff like (funct
Don't use the interpreter, use the debugger.
Jim
> -Original Message-
> From: Jean-Sebastien Vachon [mailto:jean-
> sebastien.vac...@wantedtech.com]
> Sent: Wednesday, May 04, 2011 9:33 AM
> To: Jim Idle; antlr-interest@antlr.org
> Subject: RE: [antlr-interest] Inserting missing nodes
>
>
Generally when parsing you do this:
expr
...
atom
: i=ID
(
LPAREN e=exprList RPAREN ->^(FUNC $i $e)
| -> ^(IDENT $i)
)
...
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of Jef
Ok I've changed my lexer and parser as you suggested but it didn't help.
However, I found why the interpreter
Is not able to generate the tree in Eclipse. I found the cause but not the
explanation...
It has something to do with the definition of the and_expr rule
and_expr
: (u1=or_expr (AND
Hello all,
I have a simple C/JavaScript-style grammar for my interpreter project. Right
now, functions can be called via identifier(), or identifier(param1,
param2). This works fine for simple cases, but in my language functions are
first-class objects. I'm in the process of redoing my identifier
You need to fix your lexer first:
WORDLIST: ((PREFIX | WORD | SENTENCE)(','(WS)* (PREFIX | WORD |
> SENTENCE))+);
is ambiguous with:
> PREFIX: WORDCHAR+(STAR);
> WORD: WORDCHAR+(('-'|'+')WORDCHAR*)*;
You need to contstruct the lists in the parser not the lexer and shoul
Thanks for your input. So here is the whole thing with two use cases that are
not giving me the expected results...
(Sorry for the long post)
INPUT = abc def zyx toto
RESULT = (DEFAULT_OP abc def) (DEFAULT_OP zyx toto)
EXPECTED = (DEFAULT_OP (DEFAULT_OP abc def) (DEFAULT_OP zyx toto))
INPUT = s
That just means you are calling a compiler that has a default level less
than 1.5. So, chance the javacc command in the preferences or remove the
old compiler and install 1.6, or makes sure that 1.6 is the first on the
command line. ANTLR works does not influence the Java compiler - it only
calls t
You should not be using backtrack=true if you are short on memory, but
without seeing your grammar I cannot comment on the ram usage. It might be
that your grammar causes the generation of huge DFA tables. Backtracking
itself does not cost lots of memory though.
jim
> -Original Message-
>
On Wed, May 4, 2011 at 4:12 PM, Jean-Sebastien Vachon <
jean-sebastien.vac...@wantedtech.com> wrote:
> No one can help me with this? :S
> Let me know if something is not clear. I need to fix this issue as soon as
> I can.
>
> Thanks
The fact that you didn't provide the lexer rules (although they
No one can help me with this? :S
Let me know if something is not clear. I need to fix this issue as soon as I
can.
Thanks
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Jean-Sebastien Vachon
Sent: April-28-11 4:07 PM
To:
Hi
Is there a way to set the source code level of antlrworks?
I've checked the preferences pane and launchers with no avail.
I need to set it to > 1.5, since I'm using Java Generics:
[15:47:58] 102. ERROR in
/home/bcorne/Downloads/at2-parser-3/grammar/output/ATGrammar3Lexer.java (at
line 114)
[1
Hi all
doing some unit test of Oracle SQL grammar I'm facing problems with
memory requirements when parsing input having many parenthesis.
In general the grammar can have three types of statements which can be
enclosed in parens.
1. value expression like (A),(1+2).
For an sql_expression there
16 matches
Mail list logo