view compile.rhope @ 136:fc3815b7462f

Javascript backend now produces working code for some simple examples, still more of the standard lib that needs to be ported.
author Mike Pavone <pavone@retrodev.com>
date Sun, 14 Nov 2010 23:07:55 -0500
parents 0a4682be2db2
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>"]
	}
}