[antlr-interest] grammar to latex

Johannes Luber jaluber at gmx.de
Sat Jun 28 08:10:57 PDT 2008


Jim Idle schrieb:
> On Fri, 2008-06-27 at 23:42 +0100, Ana Nelson wrote:
>> Okay, I think I've worked out the last few kinks in the pygments
>> grammar. Examples are (temporarily) here:
>>
> 
>>
>> A few of the C Sharp grammars do have 1 error in them, in lines such as this:
>>
>> @header {
>>     #pragma warning disable 0219
>> }
>>
>> The # before pragma is showing up as an error. Maybe someone can tell
>> me, is that valid C sharp? 
> 
> It is, but strictly speaking the # should be at column position zero. If 
> you use VS 2008 you will find that it auto moves the # to the first column.

Actually, the whitespace before # is okay. Another possibility is that 
Ana is using a C# 1 compiler. C# 1 doesn't know pragma and some other 
preprocessor constructs added in C# 2. BTW, which grammars do you refer 
to, Ana?

Johannes
> 
> If you are interested in C#, then you can view my online C# parser at 
> www.temporal-wave.com <http://www.temporal-wave.com> where there is a 
> nice example of an AST for C# too. Go on, you know you guys want to!!! ;-)
> 
> Jim



More information about the antlr-interest mailing list