[il-antlr-interest: 25159] [antlr-interest] tokens in parser grammar

2009-08-12 Thread Юрушкин Михаил
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

[il-antlr-interest: 25164] [antlr-interest] tokens in parser grammar

2009-08-12 Thread Юрушкин Михаил
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); }

[il-antlr-interest: 25540] [antlr-interest] can't build C target (release version).

2009-08-30 Thread Юрушкин Михаил
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

[il-antlr-interest: 25542] Re: [antlr-interest] can't build C target (release version).

2009-08-30 Thread Юрушкин Михаил
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

[il-antlr-interest: 25543] [antlr-interest] proplem with tokens value (C target)

2009-08-30 Thread Юрушкин Михаил
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,

[il-antlr-interest: 25852] [antlr-interest] c target - rhow can i obtain retval values

2009-09-20 Thread Юрушкин Михаил
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).

[il-antlr-interest: 25854] [antlr-interest] c target: "string a = NULL; " generated

2009-09-20 Thread Юрушкин Михаил
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

[il-antlr-interest: 25960] [antlr-interest] [c target] some questions about errors catching

2009-09-27 Thread Юрушкин Михаил
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

[il-antlr-interest: 26065] [antlr-interest] [c target] debugging using antlrworks

2009-10-03 Thread Юрушкин Михаил
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

[il-antlr-interest: 26084] [antlr-interest] [c target] debugging using antlrworks

2009-10-05 Thread Юрушкин Михаил
> 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

[il-antlr-interest: 26101] Re: [antlr-interest] [c target] debugging using antlrworks

2009-10-06 Thread Юрушкин Михаил
> >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 > >

[il-antlr-interest: 26129] Re: [antlr-interest] [c target] tracing

2009-10-07 Thread Юрушкин Михаил
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

[il-antlr-interest: 26222] [antlr-interest] caseSensitive = false in C taget ??

2009-10-13 Thread Юрушкин Михаил
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

[il-antlr-interest: 26440] [antlr-interest] c target - bug

2009-10-22 Thread Юрушкин Михаил
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: '\''

[il-antlr-interest: 26442] [antlr-interest] [C target] how to skip empty lines

2009-10-22 Thread Юрушкин Михаил
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

[il-antlr-interest: 26443] [antlr-interest] [C target] INPUT -> TOKENS->AST ->MyAST problems

2009-10-22 Thread Юрушкин Михаил
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

[il-antlr-interest: 26455] Re: [antlr-interest] [C target] how to skip empty lines

2009-10-22 Thread Юрушкин Михаил
писал(а) в своём письме 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

[il-antlr-interest: 26458] Re: [antlr-interest] [C target] how to skip empty lines

2009-10-22 Thread Юрушкин Михаил
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

[il-antlr-interest: 26461] Re: [antlr-interest] [C target] how to skip empty lines

2009-10-23 Thread Юрушкин Михаил
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

[il-antlr-interest: 26467] [antlr-interest] Antlrworks: grouping of rules bug

2009-10-23 Thread Юрушкин Михаил
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

[il-antlr-interest: 26493] [antlr-interest] [C target] can't debug parser

2009-10-24 Thread Юрушкин Михаил
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

[il-antlr-interest: 26505] [antlr-interest] [C target] -trace option bug

2009-10-25 Thread Юрушкин Михаил
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

[il-antlr-interest: 26587] [antlr-interest] [C target] constructex bug

2009-10-31 Thread Юрушкин Михаил
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