views:

57

answers:

1

I'm trying to use grammatica to generate a C# parser for a language I'm attempting to build (hobby project). However, everytime I run the grammatica parser, I get an error at line 1 position 1, "unexpected character 'x'" where x is some strange ASCII character (looks kind of like an 'n')

The grammatica output shows 3 such strange characters before my actual grammer file content starts, which seems to lead me to believe grammatica is expecting the grammar file in a different encoding than my grammar file is in, but I can't find any documentation as to what it actually expects. Anyone else know whats going on here?

+1  A: 

Examine your text file in a hex editor. It may be in UTF-8 with a BOM (byte order mark) at the start.

I would expect that the tool expects ASCII.

Barry Kelly
Yeah I managed to figure it out a while back, Visual Studio was creating a UTF8 file by default and the tool expected a plain old ANSI file. Thanks for the answer anyways, you got it...
LorenVS