Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
badw-it
DHParser
Commits
b2699837
Commit
b2699837
authored
Apr 20, 2017
by
di68kap
Browse files
Merge remote-tracking branch 'origin/master'
parents
c230b2e2
ade77081
Changes
2
Hide whitespace changes
Inline
Side-by-side
DHParser/ebnf.py
View file @
b2699837
...
...
@@ -436,7 +436,7 @@ class EBNFCompiler(CompilerBase):
arg
=
node
.
result
[
-
1
]
argstr
=
str
(
arg
)
if
arg
.
parser
.
name
!=
'symbol'
:
node
.
add_error
((
'Retrieve Operator "%s" requires a symbol
s
, '
node
.
add_error
((
'Retrieve Operator "%s" requires a symbol, '
'and not a %s.'
)
%
(
prefix
,
str
(
arg
.
parser
)))
return
str
(
arg
.
result
)
if
str
(
arg
)
in
self
.
directives
[
'complement'
]:
...
...
examples/LaTeX/LaTeX.ebnf
View file @
b2699837
...
...
@@ -25,9 +25,9 @@ partext = text | PARSEP
text = cfgtext | brackets
cfgtext = chunk | escaped | WSPC
escaped
= /\\[%$&]/
brackets
= /[\[\]]/ # left
and
right square bracket
s
: [ ]
chunk
= /[^\\%$&\{\}\[\]\s\n]+/ # some piece of text excluding whitespace,
ESCAPED
= /\\[%$&]/
BRACKET
= /[\[\]]/ # left
or
right square bracket: [ ]
TEXTCHUNK
= /[^\\%$&\{\}\[\]\s\n]+/ # some piece of text excluding whitespace,
# linefeed and special characters
WSPC = /[ \t]*\n?(?!\s*\n)[ \t]*/ # whitespace, including at most one linefeed
LF = /[ \t]*\n(?!\s*\n)/ # a linefeed, but not an empty line (i.e. par)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment