[antlr-interest] ANTLR 2.7.7 C# Parser fails WHILE ANTLR 2.7.7 JavaParser
EXTERNAL Abdul-Rahman Atif (Praktikant; AE/PJM-WS)
external.Atif.Abdul-Rahman at de.bosch.com
Thu May 24 01:56:35 PDT 2007
Hi,
Here is the input file:
------------------------------------------------------------------------
-----
chart-file format version 4.2
-- Auto MicroC version 3.3.1
chart :
name : abcde
type : abcde
usage : abcde
created : abcde
creator : abcde
modified : abcde
scale with zoom : NO
arrow style : abcde
used_gds :
change :
time : 1092314866
date : Date: Thu Aug 12 14:47:46 2004
user_name : User: kom2bue
version : New
description :
Check-In Chart(s):
copy of GLOBALS_FCM4_DC_520W from diagnostics
end description
end change
change :
time : 1092999707
date : Date: Fri Aug 20 13:01:47 2004
user_name : User: kom2bue
version : n
description :
Check-In Chart(s):
first draw, not optimized and tested
just for splitting in SW-Group
end description
end change
condition :
name : C_B_ENABLE_UBAT_TV_CHAR_HYST
data_structure : SINGLE
short description :
'UBAT_COMP: Constant enable bit for Mask TV_Ubat at 100% with
Hyst'
definition :
true
end definition
end condition
condition :
name : C_B_ENABLE_TV_IN_HIGH_RES
data_structure : SINGLE
short description :
'PWM_CALC: Constant enable bit for TV_IN resolution < (+/-0,5%)
(else +/-1%)'
definition :
false
end definition
end condition
data_item :
name : C_SCI_FOR_EMC_PRESCALER_LOAD
usage_type : CONSTANT
data_structure : SINGLE
short description :
'SCI_FOR_EMC: Prescaler for sending EMC_VECTOR'
definition :
/* 20ms */
1
end definition
end data_item
------------------------------------------------------------------------
-----
And grammar file is here:
http://www.antlr.org/pipermail/antlr-interest/2007-May/020827.html
Regards,
Atif.
----------------------------------------
Message: 3
Date: Wed, 23 May 2007 18:12:35 +0100
From: "Micheal J" <open.zone at virgin.net>
Subject: Re: [antlr-interest] ANTLR 2.7.7 C# Parser fails WHILE ANTLR
2.7.7 JavaParser succeeds.....why?
To: <antlr-interest at antlr.org>
Message-ID: <001e01c79d5d$9292c4c0$c704a8c0 at hercules>
Content-Type: text/plain; charset="us-ascii"
Hi,
> Hi all,
>
> First of all, thank you for this wonderful tool.
>
> I have developed a working parser (in Java) for a specific
> text format by using ANTLR 2.7.7. However, when i change the
> target language in my grammar file from Java to Csharp, I get
> a generated parser in C# which fails to parse the same input
> file which was successfully parsed by the Java counterpart.
>
> I have tried to compare the generated codes for both Java and
> C# and find them to be similar in behavior. First I thought
> there is some problem with my input streams (due to diff.
> Java and C# Stream Libs.) but I have tested that as well, I
> didnt find any problems there.
>
> Here is my grammar file:
<SNIP>
> In the Csharp version, I always get an exception: unexpected
> token 'end definition' .
>
> I can't figure out what to check now. I have exhausted all
> options I could think of. I am using antlr.bat provided with
> ANTLR 2.7.7 to generate my parsers.
>
> Regards,
> Atif Abdul-Rahman.
Can you attach the input file(s) in question plus the grammar file?
Micheal
-----------------------
The best way to contact me is via the list/forum. My time is very
limited.
More information about the antlr-interest
mailing list