We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We sorta document it as a tree-construction specific format. We should give the generic definition most people use.
It's something like the state machine below:
HEADER: "#([^\n]+)" BODY: "([^#][^\n]*)" LF: "\n" start: HEADER -> after_header after_header: LF -> body EOF body: LF -> after_lf BODY -> body EOF after_lf: LF -> after_lf_lf BODY -> body EOF after_lf_lf: LF -> after_lf_lf {add "\n" to body} BODY -> body {add "\n\n" to body} HEADER -> after_header EOF {add "\n" to body}
This shouldn't be much effort to convert into an LR(2) grammar; the LR(1) grammar equivalent may be hell.
The text was updated successfully, but these errors were encountered:
Basically what we want, for the terminals above, is:
test = HEADER LF (BODY | LF)* tests = test (LF LF test)* LF
Which is LR(2).
Sorry, something went wrong.
No branches or pull requests
We sorta document it as a tree-construction specific format. We should give the generic definition most people use.
It's something like the state machine below:
This shouldn't be much effort to convert into an LR(2) grammar; the LR(1) grammar equivalent may be hell.
The text was updated successfully, but these errors were encountered: