diff options
Diffstat (limited to 'test/generate1.lm')
-rw-r--r-- | test/generate1.lm | 187 |
1 files changed, 187 insertions, 0 deletions
diff --git a/test/generate1.lm b/test/generate1.lm index 99890ba0..db47b76d 100644 --- a/test/generate1.lm +++ b/test/generate1.lm @@ -1,3 +1,4 @@ +##### LM ##### context generate # Regular definitions rl ident_char /[a-zA-Z_]/ @@ -743,3 +744,189 @@ print_stmts( S.tree ) print_target_subscriptions_and_slicings( S.tree ) print_primary_subscriptions_and_slicings( S.tree ) print( '*** SUCCESS ***\n' ) +##### IN ##### + +# dude, this is a comment + # some more +hello +def dude(): + yes + awesome; + + # Here we have a comment + def realy_awesome(): # hi there + in_more + + same_level + def one_liner(): first; second # both inside one_liner + + back_down + +last_statement + +# dude, this is a comment + # some more +hello +if 1: + yes + awesome; + + # Here we have a comment + if ('hello'): # hi there + in_more + + same_level + if ['dude', 'dudess'].horsie(): first; second # both inside one_liner + 1 + + back_down + +last_statement + +hello = 1.1(20); + +# subscription +a[1] = b[2]; + +# simple slicing +c[1:1] = d[2:2]; + +# simple slicing +e[1:1, 2:2] = f[3:3, 4:4]; +##### EXP ##### +*** SUCCESS *** + +hello +def dude(): + yes + awesome; + + # Here we have a comment + def realy_awesome(): # hi there + in_more + + same_level + def one_liner(): first; second # both inside one_liner + + back_down + +last_statement + +# dude, this is a comment + # some more +hello +if 1: + yes + awesome; + + # Here we have a comment + if ('hello'): # hi there + in_more + + same_level + if ['dude', 'dudess'].horsie(): first; second # both inside one_liner + 1 + + back_down + +last_statement + +hello = 1.1(20); + +# subscription +a[1] = b[2]; + +# simple slicing +c[1:1] = d[2:2]; + +# simple slicing +e[1:1, 2:2] = f[3:3, 4:4]; +*** +STMT: hello +STMT: def dude(): + yes + awesome; + + # Here we have a comment + def realy_awesome(): # hi there + in_more + + same_level + def one_liner(): first; second # both inside one_liner + + back_down + +STMT: yes +STMT: awesome; + + # Here we have a comment +STMT: def realy_awesome(): # hi there + in_more + + same_level + def one_liner(): first; second # both inside one_liner + +STMT: in_more + +STMT: same_level +STMT: def one_liner(): first; second # both inside one_liner + +STMT: back_down + +STMT: last_statement + +# dude, this is a comment + # some more +STMT: hello +STMT: if 1: + yes + awesome; + + # Here we have a comment + if ('hello'): # hi there + in_more + + same_level + if ['dude', 'dudess'].horsie(): first; second # both inside one_liner + 1 + + back_down + +STMT: yes +STMT: awesome; + + # Here we have a comment +STMT: if ('hello'): # hi there + in_more + + same_level + if ['dude', 'dudess'].horsie(): first; second # both inside one_liner + 1 + +STMT: in_more + +STMT: same_level +STMT: if ['dude', 'dudess'].horsie(): first; second # both inside one_liner +STMT: 1 + +STMT: back_down + +STMT: last_statement + +STMT: hello = 1.1(20); + +# subscription +STMT: a[1] = b[2]; + +# simple slicing +STMT: c[1:1] = d[2:2]; + +# simple slicing +STMT: e[1:1, 2:2] = f[3:3, 4:4]; +TARGET SUBSCRIPTION: [1] +TARGET SIMPLE SLICING: [1:1] +TARGET EXTENDED SLICING: [1:1, 2:2] +PRIMARY SUBSCRIPTION: [2] +PRIMARY SIMPLE SLICING: [2:2] +PRIMARY EXTENDED SLICING: [3:3, 4:4] +*** SUCCESS *** |