[il-antlr-interest: 25019] Re: [antlr-interest] Hashmaps

2009-08-04 Thread Nick Vlassopoulos
Hi Bryan, I am assuming that you are reffering to the Java HashMap. A Map is a data structure associating two sets. Think of it as a math function (http://en.wikipedia.org/wiki/Map_(mathematics)) where you map an element from a set A to a set B (such that each x\in A has only one image for maps

[il-antlr-interest: 24944] Re: [antlr-interest] Using ANTLR to expand C Macros

2009-07-31 Thread Nick Vlassopoulos
Hi Thomas, I am not sure if this is what you are looking for, but there is a C preprocessor in the example grammars (http://www.antlr.org/grammar/115121622/Cpp.tar). I think the parts you are looking for are in the macroDefine, macroExecution (CppTree.g) and in the getExpansion method in

[il-antlr-interest: 24771] Re: [antlr-interest] Parsing HAML - significant and insignificant whitespaces

2009-07-20 Thread Nick Vlassopoulos
with the whitespace. But I still believe there should be some option to choose a rule dynamically. Anybody knows that? To Nick: I don't think I want to do preprocessing. ANTR should be capable of doing it. Cheers, Dmitriy. 2009/7/15 Nick Vlassopoulos nvlassopou...@gmail.com Hi Dmitiry, I

[il-antlr-interest: 24656] Re: [antlr-interest] Parsing HAML - significant and insignificant whitespaces

2009-07-15 Thread Nick Vlassopoulos
: Execute another rule? } // Otherwise consume the spaces } ; How those HOW TOs can be done? Cheers, Dmitriy. 2009/7/15 Nick Vlassopoulos nvlassopou...@gmail.com Sorry for reposting, but I copied the wrong link, http://www.antlr.org/grammar/1078018002577

[il-antlr-interest: 24641] Re: [antlr-interest] Parsing HAML - significant and insignificant whitespaces

2009-07-14 Thread Nick Vlassopoulos
Hi Dmitiry, I am not sure if this is what you are looking for, but you might want to have a look on how the python grammar handles identation. See for example: http://www.antlr.org/grammar/1200715779785/Python.g Best Regards, Nikos On Tue, Jul 14, 2009 at 5:43 PM, Dmitiry Nagirnyak

[il-antlr-interest: 24642] Re: [antlr-interest] Parsing HAML - significant and insignificant whitespaces

2009-07-14 Thread Nick Vlassopoulos
Sorry for reposting, but I copied the wrong link, http://www.antlr.org/grammar/1078018002577/python.tar.gz Nikos On Tue, Jul 14, 2009 at 5:57 PM, Nick Vlassopoulos nvlassopou...@gmail.comwrote: Hi Dmitiry, I am not sure if this is what you are looking for, but you might want to have

[il-antlr-interest: 23687] Re: [antlr-interest] some difficuilties with C runtime building

2009-05-13 Thread Nick Vlassopoulos
Hi Michael, To my understanding, the reason you get this error is that a warning (unreferenced variable in function body - C4100) is treated as an error because of the Treat Errors as Warnings switch. You can disable this from the Project properties - General C/C++ options (at least that's where

[il-antlr-interest: 23586] Re: [antlr-interest] Guidance for ANTLR Newb

2009-05-07 Thread Nick Vlassopoulos
Hi Chris, I must admit that I am fairly new to antlr, as well. Nevertheless, if I got this correctly, the two possible alternatives are the ones that you mentioned (which are in some sense equivalent) 1. Turn off the parser while being outside the actual language blocks and turn it on again when

[il-antlr-interest: 23336] Re: [antlr-interest] case-insensitive parsing

2009-04-23 Thread Nick Vlassopoulos
Hi Bob, I am in no case an antlr or grammar expert, but it appears to me that what you want is context sensitive parsing. http://www.antlr.org/doc/glossary.html#Context-sensitive has some notes on how to achieve this! Hope this helps, Nikos On Thu, Apr 23, 2009 at 12:11 PM, Bob Sole

[il-antlr-interest: 23300] [antlr-interest] ANTLR running out of memory while parsing huge files

2009-04-21 Thread Nick Vlassopoulos
Hi, I am fairly new to ANTLR and I have come accross a problem. I have written a simple grammar to parse huge data files (several gigabytes each) and antlr seems to crash by running out of memory (I am using C as the target language). The data files have the general format: HEADER DECL BODY

[il-antlr-interest: 23302] Re: [antlr-interest] ANTLR running out of memory while parsing huge files

2009-04-21 Thread Nick Vlassopoulos
67606 Geschäftsführer: Stefan Hetges Amtsgericht Hamburg, HRB 83484 Ust.-ID-Nr.: DE 813489791 Nick Vlassopoulos schrieb: Hi, I am fairly new to ANTLR and I have come accross a problem. I have written a simple grammar to parse huge data files (several gigabytes each) and antlr seems

[il-antlr-interest: 23309] Re: [antlr-interest] ANTLR running out of memory while parsing huge files

2009-04-21 Thread Nick Vlassopoulos
are pretty simple) manually?? Thanks! Nikos On Tue, Apr 21, 2009 at 3:31 PM, Jim Idle j...@temporal-wave.com wrote: Nick Vlassopoulos wrote: Hi Andreas, Thanks for your fast reply! So it should be something like a line parser that's instatiated for each line of the BODY section

[il-antlr-interest: 23312] Re: [antlr-interest] ANTLR running out of memory while parsing huge files

2009-04-21 Thread Nick Vlassopoulos
Andreas, Jim, Yes, this seems the right way to do it, since the actual body data are pretty trivial! I'll try working this the way you suggested! Again, thanks for your replies! Nikos On Tue, Apr 21, 2009 at 4:11 PM, Jim Idle j...@temporal-wave.com wrote: Nick Vlassopoulos wrote: Hi Jim