From 236a0028ce197db03d71f17bc9e4a01306686c9e Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Sun, 29 Jan 2012 23:46:44 -0600 Subject: Add options and features to the script language --- Auxiliary/Grammars/kranc2.peg | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Auxiliary') diff --git a/Auxiliary/Grammars/kranc2.peg b/Auxiliary/Grammars/kranc2.peg index 35c9ece..3cbe0c1 100644 --- a/Auxiliary/Grammars/kranc2.peg +++ b/Auxiliary/Grammars/kranc2.peg @@ -16,7 +16,12 @@ expr = {mul}( {addop} {mul})* eqn = ({dtensor}|{tensor}) \= {expr}{-end} eqns = {eqn}( {eqn})* schedule = scheduled[ \t]+at[ \t]{uname} -thorn = begin[ ]+thorn {name}{-end}( {calculation}| {variables}| {temporaries})* end[ ]+thorn +thorn = begin[ ]+thorn {name}{-end}( {calculation}| {variables}| {temporaries}| {option})* end[ ]+thorn calculation = begin[ \t]+calculation[ \t]+{uname}[ \t]+{schedule}{-end} {eqns} end[ \t]+calculation variables = begin[ \t]+variables{-end} {tensor}( end[ \t]+variables\b{brk}| {tensor})*{-end} temporaries = begin[ \t]+temporaries{-end} {tensor}( end[ \t]+temporaries\b{brk}| {tensor})*{-end} +option = {inherit}|{use}|{disable} +inherit = inherit[ \t]+({uname}[ \t]*)+{-end} +feature = loopcontrol|vectors|opencl|jacobian|cse +use = use[ \t]+({feature}[ \t]*)+ +disable = disable[ \t]+({feature}[ \t]*)+ -- cgit v1.2.3