-
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
Simplify grammar #557
Comments
xcoulon
added a commit
to xcoulon/libasciidoc
that referenced
this issue
May 13, 2020
use `[^...]` wherever possible require a blank line between a paragraph and its following block also, refactor ContinuedListItemElement rule to not rely on Blankline elements, so they can be processed earlier in the DocumentBlock rule. also, update the `make bench-parser` goal to run benchmarks with the standard grammar on 2 large files, provide stats on smaller samples. Fixes bytesparadise#557 Signed-off-by: Xavier Coulon <[email protected]>
xcoulon
added a commit
to xcoulon/libasciidoc
that referenced
this issue
May 13, 2020
Refactor multiple rules to simplify the grammar and make the parser more efficient: - use character groups instead of choices whenever applicable - refactor `ContinuedListItemElement` rule: ignore BlankLine, but take into account during preprocessing (when building lists) - move `LabeledListItem` alone before `SimpleParagraph` to simplify the latter - remove multiple occurrences of `!EOL !LineBreak` and `!EOF !BlankLine rules - simplify single quote/double quote bokld/monospace/italic text rules - merge TextOnlyLinkAttributes and TextAndMoreLinkAttributes rules - simplify FoonoteContent rule - simplify InlineElement rule - remove Anychars and Parenthesis rules, simplify AnyChar also: - define a makefile goal for the bench, using a separate .go file with a custom build tag so we can have the parse options. Fixes bytesparadise#557 Signed-off-by: Xavier Coulon <[email protected]>
xcoulon
added a commit
to xcoulon/libasciidoc
that referenced
this issue
May 13, 2020
Refactor multiple rules to simplify the grammar and make the parser more efficient: - use character groups instead of choices whenever applicable - refactor `ContinuedListItemElement` rule: ignore BlankLine, but take into account during preprocessing (when building lists) - move `LabeledListItem` alone before `SimpleParagraph` to simplify the latter - remove multiple occurrences of `!EOL !LineBreak` and `!EOF !BlankLine rules - simplify single quote/double quote bokld/monospace/italic text rules - merge TextOnlyLinkAttributes and TextAndMoreLinkAttributes rules - simplify FoonoteContent rule - simplify InlineElement rule - remove Anychars and Parenthesis rules, simplify AnyChar also: - define a makefile goal for the bench, using a separate .go file with a custom build tag so we can have the parse options. Fixes bytesparadise#557 Signed-off-by: Xavier Coulon <[email protected]>
xcoulon
added a commit
that referenced
this issue
May 14, 2020
Refactor multiple rules to simplify the grammar and make the parser more efficient: - use character groups instead of choices whenever applicable - refactor `ContinuedListItemElement` rule: ignore BlankLine, but take into account during preprocessing (when building lists) - move `LabeledListItem` alone before `SimpleParagraph` to simplify the latter - remove multiple occurrences of `!EOL !LineBreak` and `!EOF !BlankLine rules - simplify single quote/double quote bokld/monospace/italic text rules - merge TextOnlyLinkAttributes and TextAndMoreLinkAttributes rules - simplify FoonoteContent rule - simplify InlineElement rule - remove Anychars and Parenthesis rules, simplify AnyChar also: - define a makefile goal for the bench, using a separate .go file with a custom build tag so we can have the parse options. Fixes #557 Signed-off-by: Xavier Coulon <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use the
[^...]
syntax when a rule consists of an exclusion of one of more characters.Eg:
instead of
The text was updated successfully, but these errors were encountered: