Good day,
Is it possible to write the following:
"int_literal: CHAR_STRING "_" kind ..."
or I must specify the token UNDERSCORE in lexer grammar and write
"int_literal: CHAR_STRING UNDERSCORE kind ...".
C target. Last version of Antlr
--
Best regards,
Michael
List: http://www.antlr.org/mailm
And additional question:
"
constant[BlockStatement *stmntBlock]
returns [ExpressionBase *resultConstant]
: resultConstant = literal_constant// this line is wrong. Name
conflict with result value //
| T_IDENT { resultConstant = action.constant($T_IDENT, stmntBlock); }
Good day,
I have downloaded 3.1.3 version for Windows.
I try to compile it in MS Visual Studio 2005. Not older.
"Dubug" version is compiled, but "Release" - not.
Error 1 error C2220: warning treated as error - no 'object' file
generated
...\libantlr3c-3.1.3\src\antlr3collections.c138
attr = attr". But I suggest to change the setting
> (either manually in the config file or in the VisualStudio gui settings).
>
>
> Hope that helps
> Marco
>
>
> Юрушкин Михаил wrote:
>> Good day,
>> I have downloaded 3.1.3 version for Windows.
>> I
there is following problem. I have made simple grammar, generated c. file But when I try to get "tokens text", the error is occured. here is a code of getters: #define getTokenText(token) string((char*)token->tokText.chars) #define getTokenInteger(token) atoi((char*)token->tokText.chars)I think,
Good day,
I use C target:
> char_selector[FortranDeclarations *decls]
returns [TypeParam *len, TypeParam *kind]
len, kind - return values.
but how can i obtain them vaues in grammar?
i.e.
> len = new TypeParam
is not correct, because result .C file contains only "retval" variable
(not len).
There is also one question. I haven't found the answer on this one yet :(
I use C target, but compile it as C++ code. there is a following problem:
all variables are initialized by NULL value. So I get something like that:
> string a = NULL;
How can I exclude such definitions?
--
Best regards
good day.
I have some questions about an errors-processing alogirthm in Antlr:
1) Antlr generates strange code. If no alternatives are right, it does the
following:
...
default:
CONSTRUCTEX();
EXCEPTION->type = ANTLR3_NO_VIABLE
Good day...
I generated parser grammar with -debug option, but nothing works.
I haven't understood how to customize parser init code - there are no
examples.
There is antlr3DebugListenerNew() method, but i don't know how to use it.
Could u help me, please?
--
Best regards,
Michael
List: http
> Then you have something wrong in one of your rules. Specifically, you
> have a line that says "progName = $program_stmt.progName" in the wrong
> place, or using the wrong syntax; ANTLR is trying to treat it as a
> predicate instead of an action. This also might explain why the
> debugg
> >1) I generate lexer and parser using -debug option.
> >2) I run my project. It starts to listen antlrworks (standard port,
> >I checked).
> >3) I open MyParser.g grammar and click "Remote debug". I use
> >standard port.
> >4) My parser continies to work... and stops when it reach
> >
Use C traget.
Have added -trace option... But it have generated JAVA code for every rule
"System.out.println("exit entity_decl "+LT(1)+" failed="+failed+"
backtracking="+BACKTRACKING);"
??? why java not C?
What about -debug option? It's also not working (see my last message).
Could u write
this option doesn't work. But i want to use it... what can i do?
--
Best regards,
Michael
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~-~--~~~---~--~~
You r
line 2086
ErrorType: last closing scope is redundant.
> while ( (stream_term != NULL && stream_term->hasNext(stream_term))
> ||stream_SIGN != NULL && stream_SIGN->hasNext(stream_SIGN)) )
LEXER:
lexer grammar MathLexer;
options {
language = C;
}
APOSTROPHE: '\''
Good evening.
thanks for your support!
Could u give me one tip.
I user C target and want to parse such input
"a = 3.14
f(x) = 3x^2 - 4x + 2
print "The value of f for " a " is " f(a)
print "The derivative of " f() " is " f'()
list variables
list functions
g(y) = 2y^3 + 6y - 5
h = f + g
print
I know, you don't like be already))
Excuse me for my annoyance, but currently it's very important for me to
understand some antlr features.
I have my own AST (on C++)... I use C target, because there are no another
ways.
At first I didn't use AST building... but it was difficult to support
писал(а) в своём письме Fri, 23 Oct 2009 08:46:24 +0400:
> Kevin J. Cummings писал(а) в своём письме
> Fri, 23 Oct 2009 04:15:18 +0400:
>
>> On 10/22/2009 06:08 PM, Юрушкин Михаил wrote:
>>> Good evening.
>>> thanks for your support!
>>>
>>&g
David-Sarah Hopwood писал(а) в своём письме
Fri, 23 Oct 2009 09:20:32 +0400:
> Юрушкин Михаил wrote:
>> first example: stmnt <\n> stmnt <\n> stmnt <;> <\n> // i mean <\n> is
>> enough to seperate statements.
>
> For most languages that do
David-Sarah Hopwood писал(а) в своём письме
Fri, 23 Oct 2009 09:35:08 +0400:
> Юрушкин Михаил wrote:
>> David-Sarah Hopwood писал(а) в своём письме
>> Fri, 23 Oct 2009 09:20:32 +0400:
>>
>>> Юрушкин Михаил wrote:
>>>> first example: stmnt <\n
Good evening.
I use antlrworks 1.3, c target, parser (output=AST) grammar.
I can't group my rules by sections (in the left panel). I mean that
tree-structure of sections isn't built in this panel. It's difficult to
navigate...
--
Best regards,
Michael
List: http://www.antlr.org/mailman/list
Good day...
I have parser that creates AST, I compile it with -debug option.
but debugger doesn't work - it stops one time and after pushing "continue"
button doesn't stop...
AST isn't drown in AntlrWorks.
What can I do in such sitiation?
--
Best regards,
Michael
List: http://www.antlr.org/m
generates:
ANTLR3_PRINTF("exit execution_part %d failed=%s backtracking=%s\n", LT(1),
failed, BACKTRACKING);
failed - isn't declared... please, fix this bug
--
Best regards,
Michael
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/option
if "k" options isn't set parset doesn't construct and initialize exceptions
for example, if k=somevalue, than the following code is generated:
CONSTRUCTEX();
EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
EXCEPTION->message = (voi
23 matches
Mail list logo