Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace current line based parsing #37

Open
mholthausen opened this issue May 4, 2021 · 1 comment
Open

Replace current line based parsing #37

mholthausen opened this issue May 4, 2021 · 1 comment

Comments

@mholthausen
Copy link
Member

Maybe consider a replacement for the current line based parser, as mentioned in this comment

@geographika
Copy link

@mholthausen - a few notes you might find useful.

There is a full Mapfile grammar in Python at https://github.com/geographika/mappyfile/blob/master/mappyfile/mapfile.lalr.g which uses Lark. It has been tested on all the Mapfiles that are used in the MapServer CI testing.

Lark has a converter from nearly to Lark, but not currently the other way round. However

These might get added in the future, if enough users ask for them.

https://github.com/lark-parser/lark/blob/master/docs/tools.md

So it might be worth considering https://github.com/kach/nearley as the parsing engine so the same source grammar could be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants