Mercurial > repos > rhope
view compile.rhope @ 131:0a4682be2db2
Modify lexer and new parser to work in compiler
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 05 Nov 2010 02:43:34 +0000 |
parents | 73e978d590c7 |
children |
line wrap: on
line source
Import lex.rhope Import countstring.rhope Import parse.rhope Main[args] { [args]Index[1] { Print[["Parsing "]Append[~]] file <- [File[~]]Open["r"] data <- String[[file]Read[[file]Length]] tokens <- Lex[Count String[data]] Print[Parse[tokens], ""] }{ Print["Usage: rhope compile.rhope <filename>"] } }