fsprojects / FsLexYacc

Lexer and parser generators for F#
http://fsprojects.github.io/FsLexYacc/
MIT License
203 stars 68 forks source link

add Fable support to FsLexYacc.Runtime #203

Closed dawedawe closed 2 months ago

dawedawe commented 2 months ago

This allows easy usage of FsLexYacc-generated lexers/parsers with Fable.

nojaf commented 2 months ago

I'm a little confused what this does. Does it allow you to consume the generated pars.fs and lex.fs? Or are you generating those file with Fable? In what language did this work for you?

dawedawe commented 2 months ago

Does it allow you to consume the generated pars.fs and lex.fs?

Yes, with this PR I can

No need for WASM or a full fledged .NET backend just to parse sources and give feedback to the user.

Would be really, really helpful for me to have this.

dawedawe commented 2 months ago

Thanks! A new release is all I need for the showcase.

dawedawe commented 2 months ago

Yeah, I'm ok with having this, thanks 🤘! (Would be cool to have a branch in https://github.com/dawedawe/agentleintroductiontofslexyacc showcasing this.)

image

I added a new project to showcase in the browser: https://github.com/dawedawe/agentleintroductiontofslexyacc/tree/main/src/AfLang.Js