-
Notifications
You must be signed in to change notification settings - Fork 120
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
Execute user code in Parse() rather than Execute() #53
Comments
Or, will |
Some PEGs do support early code execution (http://piumarta.com/software/peg/), On Sat, Aug 20, 2016 at 1:25 PM, wvxvw [email protected] wrote:
|
&{ ... } is a predicate Line 1407 in 1d0268d
is the code generated for a predicate. Example: a <- &{ false } is a rule that will always fail. If you want to put code inline with peg you could use !{ ... } On Sat, Aug 20, 2016 at 2:05 PM, Andrew Snodgrass [email protected]
|
Re' go-yaml: it's a very problematic library. To put it simply: it doesn't work. It even fails to parse examples from the spec. It doesn't handle custom types. It has wrong interface for parsing custom literals etc. Meaning, not only it will be difficult to patch, but if I wanted to make it work properly, I'd need to make a change which is not compatible with the current interface. Re' |
@wvxvw I would really liked to see your completed parser. |
@awalterschulze That will take time :) YAML is a surprisingly difficult language to parse. Whatever its creators had in mind it was definitely not simplicity or friendliness to parsring. But I'm intending to do this anyway. |
Ok I just skimmed the yaml spec. I think I will be preferring your PEG spec :) I am patient. |
I was hoping to use this parser generator to parse YAML, but to do this, I need to depend on indenting while matching rules. Executing user code in
Execute()
thus is too late for me.Is it possible, and if not, how difficult would it be to add functionality needed to do something that'd enable early code execution?
The text was updated successfully, but these errors were encountered: