[antlr-interest] grammar to latex

Ana Nelson nelson.ana at gmail.com
Sat Jun 28 08:14:43 PDT 2008


Johannes:
Any target language code gets "delegated" to the pygments grammar for
that language. So this is an issue with the pygments C# grammar. I
have submitted a ticket to let them know about this, I'll update it
with the v1/v2 distinction, that makes more sense.

Jim:
That's a very nice online interactive C# parser. :-) Have you thought
about adding some syntax highlighting to it? ;-)

I know nothing about C# by the way, they were just convenient test
grammars and I'm trying to test this with different languages.



2008/6/28 Johannes Luber <jaluber at gmx.de>:
> 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