Mercurial > repos > rhope
comparison parser_old_c.rhope @ 101:f4fc0a98088a
Fixed some bugs that were preventing compiled compiler from working correctly. Need to address memory usage
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 09 Aug 2010 23:53:20 -0400 |
parents | f51c4c17457c |
children | fd23ab2c1a73 25a205094f9b |
comparison
equal
deleted
inserted
replaced
100:f51c4c17457c | 101:f4fc0a98088a |
---|---|
854 body lines <- [body]Split["\n"] | 854 body lines <- [body]Split["\n"] |
855 more lines <- [[[body lines]Length] - [1]] + [name lines] | 855 more lines <- [[[body lines]Length] - [1]] + [name lines] |
856 fields <- Fold[Process Blueprint Field[?, ?, params], (), Filter[Map[body lines, Trim[?,"\n\r\t "]], Not Empty[?]]] | 856 fields <- Fold[Process Blueprint Field[?, ?, params], (), Filter[Map[body lines, Trim[?,"\n\r\t "]], Not Empty[?]]] |
857 new tree <- [tree]Blueprints << [ [[tree]Blueprints >>]Set[name, New Blueprint Definition[name, fields]] ] | 857 new tree <- [tree]Blueprints << [ [[tree]Blueprints >>]Set[name, New Blueprint Definition[name, fields]] ] |
858 out <- Null[~, params, new tree, [lines] + [more lines]] | 858 out <- Null[~, params, new tree, [lines] + [more lines]] |
859 } {} { | 859 } {} {} { |
860 out <- [tree]Errors <<[ [[tree]Errors >>]Append[Parse Error["Error",[["Blueprint is missing an block close symbol \""]Append[[params]Block End >>]]Append["\""], lines]] ] | 860 out <- [tree]Errors <<[ [[tree]Errors >>]Append[Parse Error["Error",[["Blueprint is missing an block close symbol \""]Append[[params]Block End >>]]Append["\""], lines]] ] |
861 } | 861 } |
862 | 862 |
863 } {} { | 863 } {} {} { |
864 out <- [tree]Errors <<[ [[tree]Errors >>]Append[Parse Error["Error",[["Blueprint is missing an block open symbol \""]Append[[params]Block Begin >>]]Append["\""], lines]] ] | 864 out <- [tree]Errors <<[ [[tree]Errors >>]Append[Parse Error["Error",[["Blueprint is missing an block open symbol \""]Append[[params]Block Begin >>]]Append["\""], lines]] ] |
865 } | 865 } |
866 } | 866 } |
867 | 867 |
868 Parse Import[string,params,tree,lines:out] | 868 Parse Import[string,params,tree,lines:out] |