2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit f16c582e authored by di68kap's avatar di68kap
Browse files

- Fehlerkorrekturen in ParserCombinators... zur Zeit nicht lauffähig :-(

parent fd01fd31
......@@ -15,3 +15,4 @@ testdata/*.pdf
*.old
DEBUG*
external_resources/
tmp/
This diff is collapsed.
......@@ -34,7 +34,7 @@ regexp = /~?\/(?:[^\/]|(?<=\\)\/)*\/~?/~ # e.g. /\w+/, ~/#.*(?:\n|$)/~
# '~' is a whitespace-marker, if present leading or trailing
# whitespace of a regular expression will be ignored tacitly.
list_ = /\w+\s*(?:,\s*\w+\s*)*/~ # comma separated list of symbols, e.g. BEGIN_LIST, END_LIST,
# BEGIN_QUOTE, END_QUOTE ; see markdown.py for an exmaple
# BEGIN_QUOTE, END_QUOTE ; see CommonMark/markdown.py for an exmaple
EOF = !/./
......@@ -23,4 +23,8 @@ import os
import sys
sys.path.append(os.path.abspath('../'))
from ParserCombinators import run_compiler
run_compiler("MLW.ebnf")
errors = run_compiler("MLW.ebnf")
if errors:
print(errors)
sys.exit(1)
......@@ -23,4 +23,7 @@ import os
import sys
sys.path.append(os.path.abspath('../'))
from ParserCombinators import run_compiler
run_compiler("fascitergula.mlw", os.path.join('..', 'MLW_compiler.py'), ".xml")
errors = run_compiler("fascitergula.mlw", os.path.join('..', 'MLW_compiler.py'), ".xml")
if errors:
print(errors)
sys.exit(1)
Anfang ```code block `` <- keine Ende-Zeichen ! ``` Ebde
Anfang ```code block `` <- keine Ende-Zeichen ! ``` Ende
#!/usr/bin/python3
"""compile_MLW.py - simple utility script for compiling MLW.ebnf
Author: Eckhart Arnold <arnold@badw.de>
Copyright 2017 Bavarian Academy of Sciences and Humanities
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import os
import sys
sys.path.append(os.path.abspath('../../'))
from ParserCombinators import run_compiler, has_source_changed
if (not os.path.exists('PopRetrieve_compiler.py') or
has_source_changed('PopRetrieve.ebnf', 'PopRetrieve_compiler.py')):
errors = run_compiler("PopRetrieve.ebnf")
if errors:
print(errors)
sys.exit(1)
errors = run_compiler("PopRetrieveTest.txt", 'PopRetrieve_compiler.py')
if errors:
print(errors)
sys.exit(1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment