The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

LaTeX.ebnf 1.54 KB
Newer Older
Eckhart Arnold's avatar
Eckhart Arnold committed
1
2
# latex Grammar

3
@ whitespace = /[ \t]*\n?(?!\s*\n)[ \t]*/  # whitespace, including at most one linefeed
4
@ comment    = /%.*(?:\n|$)/
Eckhart Arnold's avatar
Eckhart Arnold committed
5

6
7
8
latexdoc   = preamble document
preamble   = { command }+

9
10
document   = { [PARSEP] paragraph } [PARSEP] §EOF

11
genericenv = beginenv sequence §endenv
12
13
beginenv   = "\begin" §( "{" NAME "}" )
endenv     = "\end" §( "{" ::NAME "}" )
Eckhart Arnold's avatar
Eckhart Arnold committed
14

15
command    = CMDNAME [ config ] block
16
config     = "[" cfgtext §"]"
Eckhart Arnold's avatar
Eckhart Arnold committed
17

18
sequence   = { partext | parblock }
Eckhart Arnold's avatar
Eckhart Arnold committed
19

20
parblock   = "{" paragraph §"}"
21
block      = "{" { text | block } §"}"
Eckhart Arnold's avatar
Eckhart Arnold committed
22

23
24
25
paragraph  = { partext | parblock }

partext    = !blockcmd (text | PARSEP)
26
text       = cfgtext | BRACKETS
27
28
cfgtext    = word_sequence | ESCAPED | WSPC
word_sequence = { TEXTCHUNK WSPC }+
29
30

blockcmd   = "\subsection" | "\section" | "\chapter" | "\subsubsection"
31
32
             | "\paragraph" | "\subparagraph" | "\begin{enumerate}"
             | "\begin{itemize}" | "\begin{figure}"
33
34
35

CMDNAME    = /\\\w+/~
NAME       = /\w+/~
Eckhart Arnold's avatar
Eckhart Arnold committed
36

Eckhart Arnold's avatar
Eckhart Arnold committed
37
ESCAPED    = /\\[%$&]/
38
BRACKETS   = /[\[\]]/                   # left or right square bracket: [ ]
Eckhart Arnold's avatar
Eckhart Arnold committed
39
TEXTCHUNK  = /[^\\%$&\{\}\[\]\s\n]+/    # some piece of text excluding whitespace,
40
                                        # linefeed and special characters
41
42
43
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)
PARSEP     = /\s*\n\s*\n/               # at least one empty line, i.e.
44
                                        # [whitespace] linefeed [whitespace] linefeed
45

46
EOF        = !/./