pegasus icon indicating copy to clipboard operation
pegasus copied to clipboard

can you add \r?\n to the pegasus.grammar file and regenerate the grammar_parser for windows?

Open dsisnero opened this issue 2 years ago • 4 comments

Not able to use in windows - each grammar is breaking because of windows newline

dsisnero avatar Aug 24 '23 23:08 dsisnero

Woah, Crystal on Windows! That wasn't a thing around when I was working on Pegasus actively (as you can probably tell). Let me see what I can do.

DanilaFe avatar Aug 28 '23 03:08 DanilaFe

Should be working on master, let me know if you run into any other problems :)

DanilaFe avatar Aug 28 '23 03:08 DanilaFe

Still getting an error. Not sure why

f:\programming\source\repos\git\dsisnero\crystal_examples\pegasus>git pull
Already up to date.
f:\programming\source\repos\git\dsisnero\crystal_examples\pegasus>shards build --release
Dependencies are satisfied
Building: pegasus
Building: pegasus-dot
Building: pegasus-sim
Building: pegasus-c
Building: pegasus-csem
Building: pegasus-crystal
Building: pegasus-crystalsem

f:\programming\source\repos\git\dsisnero\crystal_examples\pegasus>echo 'token hello = "Hello world!"; rule S = hello;' > test.grammar

f:\programming\source\repos\git\dsisnero\crystal_examples\pegasus>.\bin\pegasus.exe < test.grammar
an error has occured while parsing the grammar definition: Invalid character 39 at position 0

f:\programming\source\repos\git\dsisnero\crystal_examples\pegasus>

dsisnero avatar Aug 29 '23 18:08 dsisnero

Never mind. It works now. Updated README.md to fix example for token

dsisnero avatar Aug 29 '23 18:08 dsisnero