[il-antlr-interest: 34507] Re: [antlr-interest] (no subject)

2011-10-21 Thread Premkumar
Hi! Congratulate me, please! My first site is very nice and useful! I want you to visit it!.. http://alpha-photo.fr/com.page.php?uspage=92b5 List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You rec

[il-antlr-interest: 34506] [antlr-interest] Using Ant with Antlr3

2011-10-21 Thread Evan Driscoll
I have a problem with ant and Antlr and I don't know what's going on. I took the SimpleCalc grammar from and put it into a directory with the following build.xml: (This is taken from about halfway down

[il-antlr-interest: 34505] Re: [antlr-interest] More problems with ANTRL C#3 target and tools

2011-10-21 Thread Voelkel, Andy
Indeed, it seems that the generated code contains no namespace definitions, and the template code generated by your tool contains a namespace declaration which it the name of the project. So two questions: Does this mean that every C# grammar should have a @namespace declaration? Why does this no

[il-antlr-interest: 34504] Re: [antlr-interest] More problems with ANTRL C#3 target and tools

2011-10-21 Thread Sam Harwell
For the first problem, you probably have your grammar and helper files in different namespaces. It looks like you're using a combined grammar, which means you'll want this in the grammar: @lexer::namespace{Namespace.Goes.Here} @parser::namespace{Namespace.Goes.Here} Then you'll use a matching nam

[il-antlr-interest: 34503] [antlr-interest] More problems with ANTRL C#3 target and tools

2011-10-21 Thread Voelkel, Andy
Hi, I got over a first round of problems and got a few trivial example working. I then moved on to trying to convert on of the examples from "The Definitive Guide to ANTLR" from Java-compatible to C# compatible: http://media.pragprog.com/titles/tpantlr/code/tour/eval/Expr.g It is a simple calcula

[il-antlr-interest: 34502] Re: [antlr-interest] Objective C Runtime with IOS

2011-10-21 Thread Jim Idle
It works IOS as an external C library that you add to your xcode project. You need to compile it with the cross compiler though. At least one person has done this already, and I started to do it to prove the point, and can't see any issues with it. Use the configure script to add the necessary CC a

[il-antlr-interest: 34501] [antlr-interest] Objective C Runtime with IOS

2011-10-21 Thread Paul Gardiner
Is it possible to use antlr with iPhone/IOS applications? The runtime has headers, so my apps don't compile with the generated code. Is there an alternate framework package for IOS? Thanks, Paul List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailm

[il-antlr-interest: 34500] Re: [antlr-interest] getText()

2011-10-21 Thread Jim Idle
I wouldn't even bother doing this here in the lexer, it is extra work. Just process the token if you use it later. However: STRINGLITERAL : (QUOTE (ESCAPEQUOTE | CHARNOQUOTE)* QUOTE) | (APOS st=EC {setText("\"" + $st.text + "\"");} ; fragment EC : (ESCAPEAPOS | C

[il-antlr-interest: 34499] Re: [antlr-interest] Beginner needing help with tree grammar

2011-10-21 Thread Jim Idle
A node with no children is specified as simply: space: WS Not space: ^(WS WS) Jim > -Original Message- > From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- > boun...@antlr.org] On Behalf Of Yves Weißig > Sent: Friday, October 21, 2011 5:00 AM > To: antlr-interest@antlr.org

[il-antlr-interest: 34498] Re: [antlr-interest] Getting names of lexer/parser rules from a Runtime

2011-10-21 Thread Jim Idle
Again, why do you want the NAMES of the rules? But there is no automated way to program this. Jim > -Original Message- > From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- > boun...@antlr.org] On Behalf Of Udo Weik > Sent: Friday, October 21, 2011 4:45 AM > To: antlr-interest@

[il-antlr-interest: 34497] Re: [antlr-interest] [C target] About disable recovery ... [Solution?]

2011-10-21 Thread Jim Idle
If you read through the source code, you would have seen that you did not need to do this. Jim > -Original Message- > From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- > boun...@antlr.org] On Behalf Of Ruslan Zasukhin > Sent: Friday, October 21, 2011 1:24 AM > To: antlr-inter

[il-antlr-interest: 34496] Re: [antlr-interest] [C target][HEELP :-] About disable recovery ... Override recoverFromMismatchedToken() ... Linker error

2011-10-21 Thread Jim Idle
In the baserecognizer code, the functions are called directly, but they are all available indirectly via the pointer interface. I think you are not fundamentally understanding this. So, they are all static to their source code files and do not pollute the namespace, and when they are not being call

[il-antlr-interest: 34495] [antlr-interest] getText()

2011-10-21 Thread Tim Poole
Hi, I have just had to use this to change the single quotes around a string to double quotes: STRINGLITERAL : (QUOTE (ESCAPEQUOTE | CHARNOQUOTE)* QUOTE) | (APOS (ESCAPEAPOS | CHARNOAPOS)* APOS) {setText(getText().replace('\'','\"'));} ; It's an adaptation of: http://antlr.org/

[il-antlr-interest: 34492] [antlr-interest] Beginner needing help with tree grammar

2011-10-21 Thread Yves Weißig
Hi list, I'm stucked with a problem in a tree grammar. I'm trying to extent my grammar from my previous post by adding an output module using TreeGrammar and String Template. My TreeGrammar looks like this: prog : (space | group)+ ; plaintext : TEXT | AZ | HYPHEN | UNDERSCORE | TILDE | APOS

[il-antlr-interest: 34491] [antlr-interest] Getting names of lexer/parser rules from a Runtime

2011-10-21 Thread Udo Weik
Hello, I already asked Jim that question concerning the C-Runtime. His answer: > No - you have to code that. But they are rarely useful. If you want them > as indicators for error refinement, then implement a global scope and add > it to each rule, in the rule set a scope member variable to a p

[il-antlr-interest: 34490] [antlr-interest] Traverse Switch case to If-else

2011-10-21 Thread Roohul
Hi, I am translating from one language to another using ANTLR. The language which I am translating is having Switch case and the target language does not have Switch Case. I need to traverse the Switch Cases to If-elseif-else . How I can do that ??  I appreciate you help in this regard.    Reg

[il-antlr-interest: 34489] [antlr-interest] [C target] About disable recovery ... [Solution?]

2011-10-21 Thread Ruslan Zasukhin
Hi All, I want describe for archive of this list solution which I have found after 3 days learning issue. So ... Story is. 1) I have read book ... Here info only for Java ... Overrite this. Catch exception.. But in C no exception, so it is clear I must find info for C. 2) I jump to site -> docs