Commit 1f6ad770 authored by eckhart's avatar eckhart
Browse files

- cython c-compiler switched back to gcc (slower, but more likely to be

parent 6217db53
......@@ -11,6 +11,7 @@ rm DHParser/*.so
# rm DHParser/transform.c
# rm DHParser/transform.cpython*.so
# CFLAGS="-O3 -march=native -mtune=native"
export CC=clang; python3 setup.py build_ext --inplace
# export CFLAGS="-O3 -march=native -mtune=native"
# export CC=clang; python3 setup.py build_ext --inplace
python3 setup.py build_ext --inplace
strip `ls DHParser/*.so`
......@@ -83,7 +83,7 @@ class ArithmeticGrammar(Grammar):
root__ = expression
def get_grammar() -> ArithmeticGrammar:
global GLOBALS
"""Returns a thread/process-exclusive ArithmeticGrammar-singleton."""
try:
grammar = GLOBALS.Arithmetic_00000001_grammar_singleton
except AttributeError:
......
......@@ -105,6 +105,7 @@ class ArithmeticRightRecursiveGrammar(Grammar):
root__ = expression
def get_grammar() -> ArithmeticRightRecursiveGrammar:
"""Returns a thread/process-exclusive ArithmeticRightRecursiveGrammar-singleton."""
try:
grammar = GLOBALS.ArithmeticRightRecursive_00000001_grammar_singleton
except AttributeError:
......
......@@ -89,7 +89,7 @@ class EBNFGrammar(Grammar):
root__ = syntax
def get_grammar() -> EBNFGrammar:
global GLOBALS
"""Returns a thread/process-exclusive EBNFGrammar-singleton."""
try:
grammar = GLOBALS.EBNF_00000001_grammar_singleton
except AttributeError:
......
......@@ -154,7 +154,7 @@ class LaTeXGrammar(Grammar):
root__ = latexdoc
def get_grammar() -> LaTeXGrammar:
global GLOBALS
"""Returns a thread/process-exclusive LaTeXGrammar-singleton."""
try:
grammar = GLOBALS.LaTeX_00000001_grammar_singleton
except AttributeError:
......
......@@ -94,7 +94,7 @@ class LyrikGrammar(Grammar):
root__ = gedicht
def get_grammar() -> LyrikGrammar:
global GLOBALS
"""Returns a thread/process-exclusive LyrikGrammar-singleton."""
try:
grammar = GLOBALS.Lyrik_00000001_grammar_singleton
except AttributeError:
......
......@@ -94,7 +94,7 @@ class Lyrik_explicit_whitespaceGrammar(Grammar):
root__ = gedicht
def get_grammar() -> Lyrik_explicit_whitespaceGrammar:
global GLOBALS
"""Returns a thread/process-exclusive Lyrik_explicit_whitespaceGrammar-singleton."""
try:
grammar = GLOBALS.Lyrik_explicit_whitespace_00000002_grammar_singleton
except AttributeError:
......
......@@ -174,7 +174,7 @@ class XMLGrammar(Grammar):
root__ = document
def get_grammar() -> XMLGrammar:
global GLOBALS
"""Returns a thread/process-exclusive XMLGrammar-singleton."""
try:
grammar = GLOBALS.XML_00000001_grammar_singleton
except AttributeError:
......
......@@ -121,7 +121,7 @@ class XMLSnippetGrammar(Grammar):
root__ = document
def get_grammar() -> XMLSnippetGrammar:
global GLOBALS
"""Returns a thread/process-exclusive XMLSnippetGrammar-singleton."""
try:
grammar = GLOBALS.XMLSnippet_00000001_grammar_singleton
except AttributeError:
......
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