Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
badw-it
DHParser
Commits
39ea46fb
Commit
39ea46fb
authored
Nov 16, 2017
by
di68kap
Browse files
- MLW ergänzt
parent
fc3aa0d1
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
examples/MLW/MLW.ebnf
View file @
39ea46fb
...
...
@@ -86,8 +86,8 @@ ArtikelKopf = < SchreibweisenPosition | StrukturPosition | GebrauchPositio
SchreibweisenPosition = "SCHREIBWEISE" [LZ] { SWKategorie }+
SWKategorie = SWTyp DPP [LZ]
§
(Varianten | { SWKategorie }+) [LZ]
SWTyp = scriptfat | scriptform | script | form | gen | abl |
OFFEN
SWKategorie = SWTyp
§
DPP [LZ] (
Varianten | { SWKategorie }+
) [LZ]
SWTyp = scriptfat | scriptform | script | form | gen | abl |
FREITEXT
scriptfat = "script." "fat-"
scriptform = "script. " "form"
...
...
@@ -97,34 +97,33 @@ form = "form"
gen = "gen."
abl = "abl."
OFFEN = FREITEXT
#### STRUKTUR-POSITION #######################################################
StrukturPosition = "STRUKTUR" [LZ] { STKategorie }+
STKategorie = STTyp DPP [LZ]
§
(Varianten | { STKategorie }+) [LZ]
STTyp =
"form."
ZEICHENFOLGE
StrukturPosition = "STRUKTUR" [LZ]
§
{ STKategorie }+
STKategorie = STTyp
§
DPP [LZ] (
Varianten | { STKategorie }+
) [LZ]
STTyp = ZEICHENFOLGE
#### GEBRAUCH-POSITION #######################################################
GebrauchPosition = "GEBRAUCH"
GebrauchPosition = "GEBRAUCH" [LZ] §{ GBKategorie }+
GBKategorie = GBTyp §DPP [LZ] ( Varianten | { GBKategorie }+ ) [LZ]
GBTyp = ZEICHENFOLGE
#### METRIK-POSITION #########################################################
MetrikPosition = "METRIK"
MetrikPosition = "METRIK" [LZ] §{ MTKategorie }+
MTKategorie = MTTyp §DPP [LZ] ( Varianten | { MTKategorie }+ ) [LZ]
MTTyp = ZEICHENFOLGE
#### VERWECHSLUNGS-POSITION ##################################################
VerwechslungsPosition = "VERWECHSELBAR" [LZ] [Confunditur]
VerwechselungsVariante { ABS VerwechselungsVariante }+ [LZ]
Confunditur = "confunditur c." DPP [LZ]
VerwechselungsVariante = !KATEGORIENZEILE Verwechselung DPP Beleg
Verwechselung = ZEICHENFOLGE
VerwechselungsPosition = "VERWECHSELBAR" [LZ] §{ VWKategorie }+
VWKategorie = VWTyp §DPP [LZ] ( Varianten | { VWKategorie }+ ) [LZ]
VWTyp = ZEICHENFOLGE
#### ARTIKELKOPF POSITIONEN VARIANTEN ########################################
...
...
examples/MLW/MLWCompiler.py
View file @
39ea46fb
This diff is collapsed.
Click to expand it.
examples/MLW/MLW_ebnf_ERRORS.txt
View file @
39ea46fb
line: 81, column: 40, Error: Missing definition for symbol 'VerwechselungsPosition'
line: 126, column: 1, Warning: Rule "VerwechslungsPosition" is not connected to parser root "Artikel" !
line: 128, column: 1, Warning: Rule "Confunditur" is not connected to parser root "Artikel" !
line: 129, column: 1, Warning: Rule "VerwechselungsVariante" is not connected to parser root "Artikel" !
line: 130, column: 1, Warning: Rule "Verwechselung" is not connected to parser root "Artikel" !
line: 188, column: 1, Warning: Rule "VerweisZiel" is not connected to parser root "Artikel" !
line: 204, column: 1, Warning: Rule "DEU_GROSS" is not connected to parser root "Artikel" !
line: 205, column: 1, Warning: Rule "DEU_KLEIN" is not connected to parser root "Artikel" !
line: 208, column: 1, Warning: Rule "GROSSSCHRIFT" is not connected to parser root "Artikel" !
line: 212, column: 1, Warning: Rule "SATZZEICHEN" is not connected to parser root "Artikel" !
line: 216, column: 1, Warning: Rule "ERW_FREITEXT" is not connected to parser root "Artikel" !
line: 233, column: 1, Warning: Rule "RZS" is not connected to parser root "Artikel" !
line: 240, column: 1, Warning: Rule "NIEMALS" is not connected to parser root "Artikel" !
line: 242, column: 1, Warning: Rule "DUMMY" is not connected to parser root "Artikel" !
line: 191, column: 1, Warning: Rule "VerweisZiel" is not connected to parser root "Artikel" !
line: 207, column: 1, Warning: Rule "DEU_GROSS" is not connected to parser root "Artikel" !
line: 208, column: 1, Warning: Rule "DEU_KLEIN" is not connected to parser root "Artikel" !
line: 211, column: 1, Warning: Rule "GROSSSCHRIFT" is not connected to parser root "Artikel" !
line: 215, column: 1, Warning: Rule "SATZZEICHEN" is not connected to parser root "Artikel" !
line: 219, column: 1, Warning: Rule "ERW_FREITEXT" is not connected to parser root "Artikel" !
line: 236, column: 1, Warning: Rule "RZS" is not connected to parser root "Artikel" !
line: 243, column: 1, Warning: Rule "NIEMALS" is not connected to parser root "Artikel" !
line: 245, column: 1, Warning: Rule "DUMMY" is not connected to parser root "Artikel" !
examples/MLW/grammar_tests/REPORT/01_test_regexes.md
View file @
39ea46fb
Test of parser: "SCHLUESSELWORT"
================================
Match-test "m1"
---------------
### Test-code:
AUTORIN
### AST
(SCHLUESSELWORT
(:RegExp
""
""
)
(:RegExp
"AUTORIN "
)
)
Test of parser: "RZS"
=====================
Match-test "1"
--------------
Match-test "
m
1"
--------------
-
### Test-code:
...
...
@@ -22,8 +45,8 @@ Test of parser: "LEERZEILE"
===========================
Match-test "1"
--------------
Match-test "
m
1"
--------------
-
### Test-code:
...
...
@@ -39,8 +62,8 @@ Match-test "1"
)
)
Match-test "2"
--------------
Match-test "
m
2"
--------------
-
### Test-code:
...
...
@@ -59,8 +82,8 @@ Match-test "2"
)
)
Match-test "3"
--------------
Match-test "
m
3"
--------------
-
### Test-code:
...
...
@@ -78,13 +101,31 @@ Match-test "3"
)
)
Fail-test "f1"
--------------
### Test-code:
Fail-test "f2"
--------------
### Test-code:
# Kommentar
# Kommentar
Test of parser: "LÜCKE"
=======================
Match-test "1"
--------------
Match-test "
m
1"
--------------
-
### Test-code:
...
...
@@ -102,8 +143,8 @@ Match-test "1"
)
)
Match-test "2"
--------------
Match-test "
m
2"
--------------
-
### Test-code:
...
...
@@ -131,8 +172,8 @@ Match-test "2"
)
)
Match-test "3"
--------------
Match-test "
m
3"
--------------
-
### Test-code:
...
...
@@ -152,8 +193,8 @@ Match-test "3"
)
)
Match-test "4"
--------------
Match-test "
m
4"
--------------
-
### Test-code:
...
...
@@ -196,8 +237,8 @@ Match-test "4"
)
)
Match-test "5"
--------------
Match-test "
m
5"
--------------
-
### Test-code:
#Kommentar
...
...
@@ -238,13 +279,41 @@ Match-test "5"
)
)
Fail-test "f1"
--------------
### Test-code:
Fail-test "f2"
--------------
### Test-code:
Fail-test "f3"
--------------
### Test-code:
# Kommentar
Fail-test "f4"
--------------
### Test-code:
#Kommentar
# Kommentar
# Kommentar
Test of parser: "LEERRAUM"
==========================
Match-test "1"
--------------
Match-test "
m
1"
--------------
-
### Test-code:
...
...
@@ -256,8 +325,8 @@ Match-test "1"
)
)
Match-test "2"
--------------
Match-test "
m
2"
--------------
-
### Test-code:
# Kommentar
...
...
@@ -272,8 +341,8 @@ Match-test "2"
)
)
Match-test "3"
--------------
Match-test "
m
3"
--------------
-
### Test-code:
...
...
@@ -285,8 +354,8 @@ Match-test "3"
)
)
Match-test "4"
--------------
Match-test "
m
4"
--------------
-
### Test-code:
# Kommentar
...
...
@@ -298,8 +367,8 @@ Match-test "4"
)
)
Match-test "5"
--------------
Match-test "
m
5"
--------------
-
### Test-code:
# Kommentar
...
...
@@ -316,8 +385,8 @@ Match-test "5"
)
)
Match-test "6"
--------------
Match-test "
m
6"
--------------
-
### Test-code:
...
...
@@ -351,8 +420,8 @@ Match-test "6"
)
)
Match-test "7"
--------------
Match-test "
m
7"
--------------
-
### Test-code:
...
...
@@ -370,13 +439,19 @@ Match-test "7"
)
)
Fail-test "f1"
--------------
### Test-code:
X
Test of parser: "ZWW"
=====================
Match-test "1"
--------------
Match-test "
m
1"
--------------
-
### Test-code:
...
...
@@ -392,8 +467,8 @@ Match-test "1"
)
)
Match-test "2"
--------------
Match-test "
m
2"
--------------
-
### Test-code:
...
...
@@ -412,8 +487,8 @@ Match-test "2"
)
)
Match-test "3"
--------------
Match-test "
m
3"
--------------
-
### Test-code:
...
...
@@ -439,8 +514,8 @@ Match-test "3"
)
)
Match-test "4"
--------------
Match-test "
m
4"
--------------
-
### Test-code:
...
...
@@ -465,13 +540,19 @@ Match-test "4"
)
)
Fail-test "f1"
--------------
### Test-code:
Test of parser: "ZW"
====================
Match-test "1"
--------------
Match-test "
m
1"
--------------
-
### Test-code:
...
...
@@ -487,8 +568,8 @@ Match-test "1"
)
)
Match-test "2"
--------------
Match-test "
m
2"
--------------
-
### Test-code:
...
...
@@ -505,4 +586,12 @@ Match-test "2"
"# Kommentar"
)
)
)
\ No newline at end of file
)
Fail-test "f1"
--------------
### Test-code:
\ No newline at end of file
examples/MLW/grammar_tests/REPORT/02_test_lemmaposition.md
View file @
39ea46fb
...
...
@@ -13,8 +13,10 @@ Match-test "1"
### AST
(Lemma
(LemmaWort
(LAT_WORT_TEIL
"facitergula"
(LAT_WORT
(:RegExp
"facitergula"
)
)
)
)
...
...
@@ -25,21 +27,31 @@ Match-test "2"
### Test-code:
facitergul|a
### Error:
Match test "2" for parser "Lemma" failed:
Expr.: facitergul|a
line: 1, column: 11, Error: Parser stopped before end! trying to recover but stopping history recording at this point.
line: 1, column: 11, Error: Parser did not match! Invalid source file?
Most advanced: line 1, column 11: Lemma->LemmaWort->LAT_WORT->/[a-z]+/ "facitergul"
Last match: line 1, column 11: Lemma->LemmaWort->LAT_WORT->:Whitespace "";
### AST
(Lemma
(LemmaWort
(LAT_WORT_TEIL
"facitergul"
)
(:Series
(:Token
"|"
)
(LAT_WORT_TEIL
"a"
(__ZOMBIE__
(Lemma
(LemmaWort
(LAT_WORT
(:RegExp
"facitergul"
)
)
)
)
(__ZOMBIE__
"|a"
)
)
Match-test "3"
...
...
@@ -48,23 +60,36 @@ Match-test "3"
### Test-code:
fasc|itergula
### Error:
Match test "3" for parser "Lemma" failed:
Expr.: fasc|itergula
line: 1, column: 5, Error: Parser stopped before end! trying to recover but stopping history recording at this point.
### AST
(Lemma
(LemmaWort
(LAT_WORT_TEIL
"fasc"
)
(:Series
(:Token
"|"
)
(LAT_WORT_TEIL
"itergula"
(__ZOMBIE__
(Lemma
(LemmaWort
(LAT_WORT
(:RegExp
"fasc"
)
)
)
)
(__ZOMBIE__
"|iter"
)
)
Fail-test "99"
--------------
### Test-code:
duo vocabula
Test of parser: "LemmaVarianten"
================================
...
...
@@ -89,7 +114,7 @@ Match-test "1"
)
(:OneOrMore
(:Series
(Lemma
Wort
(Lemma
Variante
(LAT_WORT_TEIL
"fasc"
)
...
...
@@ -112,7 +137,7 @@ Match-test "1"
)
)
(:Series
(Lemma
Wort
(Lemma
Variante
(LAT_WORT_TEIL
"fac"
)
...
...
@@ -145,7 +170,7 @@ Match-test "1"
)
)
(:Series
(Lemma
Wort
(Lemma
Variante
(LAT_WORT_TEIL
"fac"
)
...
...
@@ -178,7 +203,7 @@ Match-test "1"
)
)
(:Series
(Lemma
Wort
(Lemma
Variante
(LAT_WORT_TEIL
"fa"
)
...
...
@@ -225,7 +250,7 @@ Match-test "2"
" "
)
(:Series
(Lemma
Wort
(Lemma
Variante
(LAT_WORT_TEIL
"fasc"
)
...
...
@@ -258,7 +283,7 @@ Match-test "3"
)
(:OneOrMore
(:Series
(Lemma
Wort
(Lemma
Variante
(LAT_WORT_TEIL
"fasc"
)
...
...
@@ -276,7 +301,7 @@ Match-test "3"
)
)
(:Series
(Lemma
Wort
(Lemma
Variante
(LAT_WORT_TEIL
"fac"
)
...
...
@@ -304,31 +329,37 @@ Match-test "3"
)
)
)
(:Series
(LemmaZusatz
(:Token
(:RegExp
"ZUSATZ"
)
(:Whitespace
" "
)
(Zusatz
(:Token
(:RegExp
"ZUSATZ"
)
(
lzs_typ
"
sim.
"
(
:Whitespace
"
"
)
)
(ZWW
(ZEILENSPRUNG
(:RegExp
""
""
(:Series
(zusatz_typ
"sim."
)
(ZWW
(ZEILENSPRUNG
(:RegExp
""
""
)
)
)
)
)
)
Fail-test "99"
--------------
### Test-code:
*
fascitergula