Mercurial > repos > rhope
changeset 5:a4d2d633a356
Groundwork for parsing expressions in new parser
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 13 May 2009 00:43:12 -0400 |
parents | 0c5f24b4f69d |
children | f67d9be38ddf |
files | parse.rhope |
diffstat | 1 files changed, 61 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/parse.rhope Wed Apr 29 23:59:13 2009 -0400 +++ b/parse.rhope Wed May 13 00:43:12 2009 -0400 @@ -47,6 +47,67 @@ out <- [node]Outputs <<[[[node]Outputs >>]Append[output]] } +Blueprint Statement +{ + Expression + Assignments + Blocks +} + +Statement[expression,assignments:out] +{ + out <- [[[Build["Statement"]]Expression <<[expression]]Assignments <<[assignments]]Blocks <<[()] +} + +Add Block@Statement[statement,block:out] +{ + out <- [statement]Blocks <<[ [[statement]Blocks >>]Append[block] ] +} + +Blueprint Worker Expression +{ + Worker + Blueprint + Arguments +} + +Blueprint Global Expression +{ + Store + Variable +} + +Blueprint Pipe Expression +{ + Name +} + +Pipe Expression[name:out] +{ + out <- [Build["Pipe Expression"]]Name <<[name] +} + +Blueprint Block +{ + Tree +} + +Block[:out] +{ + out <- [Build["Block"]]Tree <<[()] +} + +Blueprint Field Expression +{ + Name + Set? +} + +Field Expression[name,set?:out] +{ + out <- [[Build["Field Expression"]]Name <<[name]]Set? <<[set?] +} + Body[node,tokens,current,depth:out,out index, done] { Print[["Body: Depth="]Append[depth]]