Hello again,
since you helped me nicely last time a have an other question:
Is it now possible to use a list in a tree grammar? I found a mail from
2007 saying it will be implemented soon.
But when I try it, I get a very long error Message.
Here is the grammar:
tree grammar TreeWalker;
Dear Jim
On 01.02.2011 18:15, Jim Idle wrote:
snip
I think
that in 3.3 I have fixed a bug that was not releasing memory references
when building a tree until the tree was freed. Try making a version that
does not build a tree and see how it differs.
snip
Ok, made a version of my grammar
I think that the fix is in there, which means that your input is too big
to build the tree in the way it is being done. Write an input stream
wrapper that splits the input by just returning EOF at the split point
then resets to the next unit.
How are you ending up with 640,000 lines of C input?
I was reading about the following grammar on page 287 of the PDF document
grammar t;
s : X r A B
| Y r B
;
r : A
|
;
I don't see where the problem is since the alternatives in s begin with two
different tokens X and Y. I think that since these two tokens are different I
can easily
On 02.02.2011 18:01, Jim Idle wrote:
I think that the fix is in there, which means that your input is too big
to build the tree in the way it is being done. Write an input stream
wrapper that splits the input by just returning EOF at the split point
then resets to the next unit.
Actually I
Please contact Brent at brero...@cisco.com if you are interested in the job
opening listed below.
Regards,
Brent
Senior Software Engineer
Location San Jose, California
Security Technology Business Unit (STBU) within WSRTG, is seeking a Software
Engineer. STBU offers network and content
try for rule 'r' though ;)
Ter
On Feb 2, 2011, at 9:07 AM, Alan D. Cabrera wrote:
I was reading about the following grammar on page 287 of the PDF document
grammar t;
s : X r A B
| Y r B
;
r : A
|
;
I don't see where the problem is since the alternatives in s begin with two
Hi there. I am having trouble with the error handling.
I have a grammar for recoignize linear expression. And it works great!.
The grammar for a linear expresion is the following:
tokens
{
PLUS= '+';
MINUS = '-';
MUL = '*';
DIV = '/';
Your grammar does not mention the EOF token. (more below...)
On Wed, 2011-02-02 at 16:18 -0300, Victor Giordano wrote:
Hi there. I am having trouble with the error handling.
I have a grammar for recoignize linear expression. And it works great!.
The grammar for a linear expresion is the
Ahh, the DFA for the 'r' rule. That makes sense now. Interesting example.
Thanks Terence and Sam!
Regards,
Alan
On Feb 2, 2011, at 11:17 AM, Terence Parr wrote:
try for rule 'r' though ;)
Ter
On Feb 2, 2011, at 9:07 AM, Alan D. Cabrera wrote:
I was reading about the following grammar
Just a little more on the issue below, when I swapped the tree
grammars that were provoking the Can't set single child to a list
error from pattern matching mode (filter = true) to complete grammars
(filter = false) the tree rewrites run successfully.
I'd still be interested to hear if issue
Okey. So adding and EOF forces the parser to go to the end of the input
in search of others tokens in correct order.
1)But a still have a problem, consider the following grammar:
grammar LinearMath;
tokens
{
PLUS = '+';
MINUS = '-';
MUL= '*';
DIV=
So would it be better to have an example like the Pie language use a
tree grammar or is the hand-written visitor code a better approach? What
are the pros and cons? Any help appreciated.
A pure interpreter would read statements one by one and execute them directly.
A compiler would read the whole
13 matches
Mail list logo