-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
parsing erlang terms #51
Comments
Could you show me the file you're trying to parse? Or an equivalent file that also breaks like this? That'd help me see if there's anything that I know is currently unsupported by the Menhir parser or if we need to spend some time digging. Thanks for opening the issue! 🙌🏼 |
the link to it is above but here/s an excerpt:
|
Oh, sorry, I missed the link. The parser I think will have trouble parsing that since its built to parse an entire Erlang module. I started the You could try using that tree-sitter parser with something like |
I don't fully understand! You have the incremental parser menhir defnition - how come you're going FYI, on staring at the format of the wxapi.conf for a while I got the impression it What's your understanding? |
@progman1 let me try to answer your questions :)
Yes, they are.
We could make a new parser that reuses the expression language from the main parser, yes. This is because Menhir allows only one
The Menhir parser is only directly usable within OCaml code, the Tree-sitter parser can be used anywhere with tree-sitter bindings. This is Rust libraries, neovim, github Semantic. The Erlang community benefits more widely from this. The lowest hanging fruit here would be to refactor The strong path forward is to do some work and integrate |
thanks for clarifying. |
I have a parsed file :) if these are actually valid erlang then I'm happy to send up the patch? |
Well I stand corrected! 🙌🏼 I didn't know that, thanks for showing me. Please send a patch 🎉 we can discuss the changes on the PR. |
I run Erlang.Parse.from_file on
https://github.com/erlang/otp/blob/master/lib/wx/api_gen/wxapi.conf
and get the error
probably because the file defines terms to be read by file:consult/1
and is not appropriate to the front door of your parser.
but with a different entry point it could parse terms?
The text was updated successfully, but these errors were encountered: