Commit a616dc15 authored by eckhart's avatar eckhart
Browse files

- log.logging()-context manager. Log dir's will not be created before needed any more

parent 7cdf646a
......@@ -42,7 +42,7 @@ div = factor "/" term
#######################################################################
factor = [sign] ([element] tail | element) ~
tail = seq | tail_elem
tail = (seq | tail_elem) [imaginary]
seq = tail_elem tail
sign = PLUS | MINUS
......@@ -58,7 +58,7 @@ pow = value `^` [sign] element
value = (number | tail_value) [imaginary]
tail_elem = tail_pow | tail_value
tail_pow = tail_value `^` pow
tail_pow = tail_value [imaginary] `^` element
tail_value = special | function | VARIABLE | group
group = `(` §expression `)`
......
......@@ -60,11 +60,10 @@ class ArithmeticExperimentalGrammar(Grammar):
"""
element = Forward()
expression = Forward()
pow = Forward()
sign = Forward()
tail = Forward()
term = Forward()
source_hash__ = "275cee2bc98d92d9330bcc71dde3afe3"
source_hash__ = "01e521bb6dbca853cb7eef515c2dc8d7"
static_analysis_pending__ = [True]
parser_initialization__ = ["upon instantiation"]
resume_rules__ = {}
......@@ -88,14 +87,14 @@ class ArithmeticExperimentalGrammar(Grammar):
function = Alternative(sin, cos, tan, log)
group = Series(DropToken("("), expression, DropToken(")"), mandatory=1)
tail_value = Alternative(special, function, VARIABLE, group)
tail_pow = Series(tail_value, DropToken("^"), pow)
tail_pow = Series(tail_value, Option(imaginary), DropToken("^"), element)
tail_elem = Alternative(tail_pow, tail_value)
value = Series(Alternative(number, tail_value), Option(imaginary))
pow.set(Series(value, DropToken("^"), Option(sign), element))
pow = Series(value, DropToken("^"), Option(sign), element)
element.set(Alternative(pow, value))
sign.set(Alternative(PLUS, MINUS))
seq = Series(tail_elem, tail)
tail.set(Alternative(seq, tail_elem))
tail.set(Series(Alternative(seq, tail_elem), Option(imaginary)))
factor = Series(Option(sign), Alternative(Series(Option(element), tail), element), dwsp__)
div = Series(factor, Series(DropToken("/"), dwsp__), term)
mul = Series(factor, Series(DropToken("*"), dwsp__), term)
......
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