> Jim, thanks I may use that in the future. I am using C# on Windows and
> would have to do some work to get it working on my machine.
The specific problem I had was that I created a token in source code with
one token type and text implying another token type. Using ToTreeString
only showed the
Use the built in code to produce the .dot file, then use Graphviz to
produce a .png and then you can see what is going wrong very easily. I
have posted the code to do this to the list lots of times so you should
find it on antlr.markmail.org
Jim
> -Original Message-
> From: antlr-interest
For some AST transformations I have to resort to writing code. A recent bug
of mine was due to incorrectly building a AST. Is there any code to
validate the structure of an AST?
Thanks, Eric
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/opti
program:command+ EOF; // Force the parser to consume token stream
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of Hélder Silva
> Sent: Tuesday, April 12, 2011 7:07 AM
> To: antlr-interest@antlr.org
> Subje
This is my current grammar:
grammar Oven;
options
{
language=CSharp2;
//language=Java;
output=AST;
ASTLabelType=CommonTree; // Cria arvore para ser utilizada por outro
parser a executar funções
}
@lexer::members
{
bool emailMode = false;
}
@members
{
//to create more un
Hi Joe,
This feature is not yet implemented in v3. I may be able to get it
implemented for release 3.4, but there are some technical issues that
prevent it from working in a few cases that make it difficult.
Sam
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr-inte
Joe Lemmer wrote:
>
> I'd like to throw a Non-Antlr exception from one of my rules in a Parser. I'm
> using ANTLR v3
> I've tried to find some documentation and came across some stuff for ANTLR v2
> that says the following:
>
> To specify that your parser (or
> tree parser rule) can throw a non
There is not enough info in the e-mail for me to determine the exact
problem.
If there is a problem with the grammar ANTLRWorks should catch it when
building. If ANTLRWorks correctly builds the lexer and parser, and then the
error appears when parsing, I would check the input against what the gram
Hi there,
I'd like to throw a Non-Antlr exception from one of my rules in a Parser. I'm
using ANTLR v3
I've tried to find some documentation and came across some stuff for ANTLR v2
that says the following:
"
To specify that your parser (or
tree parser rule) can throw a non-ANTLR specific exc
My two cents worth.
I prefer rewrites as I can create virtual tokens.
Regards
Gary
expr
: or -> ^(EXPR or)
;
or : (and -> and)
(
OR b=and-> ^( LOGICAL_OR $or $b )
)*
;
and : (atom -> atom)
(
AND b=atom -> ^(LOGICAL_AND $and $b)
)*
;
atom
: id
;
id
10 matches
Mail list logo