aboutsummaryrefslogtreecommitdiff
path: root/Auxiliary
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2012-02-06 19:23:35 -0600
committerIan Hinder <ian.hinder@aei.mpg.de>2012-02-06 19:23:35 -0600
commit3cc6aee48df9407f27df03237911bb4279cddcd5 (patch)
tree797eb59b69e35d4b21c6bc0604591c0b0c3a0fde /Auxiliary
parent79d6ce944d7b946633abddabebbe3a7cda33af17 (diff)
kranc2.peg: Add derivative name to parse tree
Diffstat (limited to 'Auxiliary')
-rw-r--r--Auxiliary/Grammars/kranc2.peg3
1 files changed, 2 insertions, 1 deletions
diff --git a/Auxiliary/Grammars/kranc2.peg b/Auxiliary/Grammars/kranc2.peg
index 91ea573..054eaa4 100644
--- a/Auxiliary/Grammars/kranc2.peg
+++ b/Auxiliary/Grammars/kranc2.peg
@@ -9,7 +9,8 @@ indices = (\_{lower_index}+|\^{upper_index}+)*
index_symbol = [a-zA-Z]'*|[0-9]
index_expr = {index_symbol}([+-]{int}|)
tensor = {name}{indices}
-dtensor = D[a-z0-9]*{indices}? {tensor}
+dname = D[a-z0-9]*
+dtensor = {dname}{indices}? {tensor}
number = -?[0-9]+(\.[0-9]*|)([eEdD][+-]?[0-9]+|)
func = {name} \( ({expr}( , {expr})*|) \)
value = {func}|{dtensor}|-?{tensor}|{number}|-?\( {expr} \)