management
Thanks
With Regards,
NICK
KSOURCE Inc. 9555, Lebanon Road, Unit # 103, Frisco, Texas - 75035
Tel. Direct: 248-458-1322 X 211 | Email: n...@ksourceinc.com |
www.ksourceinc.com
Note: Under Bill s.1618 Title III passed by the 105th U.S. Congress
this mail cannot be considered Spam as
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
ny
>
> T +49 (621) 400 676-13
> F +49 621 400 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 prob
e intermediate lines (which are
pretty simple) manually??
Thanks!
Nikos
On Tue, Apr 21, 2009 at 3:31 PM, Jim Idle wrote:
> Nick Vlassopoulos wrote:
> > Hi Andreas,
> >
> > Thanks for your fast reply!
> > So it should be something like a "line parser" that'
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 wrote:
> Nick Vlassopoulos wrote:
> > Hi
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 wrote:
>
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 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 wh
Hi Sean,
I am not sure about this, but I think you have to rearrange the order of the
rules. More specifically,
antlr will use rules in the order they appear, therefore, WS should probably
near the end of your list.
Maybe something like this would work:
grammar Phrase;
line : WS? PHRASE EOL?;
P
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 wrote:
>
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
wrote:
> Hi Dmitiry,
>
> I am not sure if this is what you are looking for, but you might want to
> have a look
r your case (since I am a beginner in "the
ways of ANTLR").
Hope this helps!
Nikos
On Wed, Jul 15, 2009 at 12:51 AM, Dmitiry Nagirnyak wrote:
> Hi Nick,
>
> Thanks. It shows some useful techniques.
> Main thing there is LEADING_WS.
>
> But it doesn't demonstra
ome extra cases for tabs and so
on. Personally, I would probably go for Stephen's solution (i.e. writing a
simple preprocessor), as I think
it provides a more "safe" approach.
Nikos.
On Mon, Jul 20, 2009 at 2:22 PM, Dmitiry Nagirnyak wrote:
> Hi,
>
> Nick I think this
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
"Func
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
15 matches
Mail list logo