Replies: 1 comment 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.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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