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
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
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
: 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
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
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
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
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
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
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
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
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
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
13 matches
Mail list logo