Replies: 3 comments 1 reply
-
A side note: I saw there was this yaml grammar: https://github.com/aofdev/yaml-peg/blob/main/src/parser/grammar/yaml.pest but not sure whether it's complete / correct |
Beta Was this translation helpful? Give feedback.
-
Would there be any appetite for doing this, if I were to look into creating a PR? Or is it something this project actively wants to avoid? Another example of when it would be useful: a rule that starts with either |
Beta Was this translation helpful? Give feedback.
-
This has been completed as of #1092. The syntax is:
This is slightly different from the proposed
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am writing a parser for a subset of yaml (https://github.com/m8rex/yaml-subset) and I need to be able to match for a
) to the stack.
-
but push a a space (The reason for this is that if you place a hash in a list in yaml, you get something like this:
To match the indentation of the inner hash, I would need to push a space onto the stack, when matching the
-
of the list.I would like something like
PUSH_OTHER("-", " ")
.I looked into the code quickly, but it seems that the pushes happen with span's into the source text, which does not make it easy to push something else. Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions