Cygwin--rror: Lexical mistake
If you get this error when trying to compile your grammar and voca files:
$ mkdfa.pl sample
sample.grammar has 3 rules
sample.voca has 6 categories and 18 words
---
Now parsing grammar file
"rror: Lexical mistake "
---
no .dfa or .dict file generated
use the Cygwin "dos2unix" command in the same directory as your grammar and voca files, for example:
$ cd temp
$ ls
sample.grammar sample.voca
$ dos2unix *.*
sample.grammar: done.
sample.term: done.
sample.voca: done.
$ mkdfa.pl sample
sample.grammar has 3 rules
sample.voca has 6 categories and 18 words
---
Now parsing grammar file
Now modifying grammar to minimize states[-1]
Now parsing vocabulary file
Now making nondeterministic finite automaton[6/6]
Now making deterministic finite automaton[6/6]
Now making triplet list[6/6]
---
generated: sample.dfa sample.term sample.dict
$ ls
sample.dfa sample.dict sample.grammar sample.term sample.voca