summaryrefslogtreecommitdiff
path: root/src/cgil/rlhc-main.lm
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2020-10-18 11:44:43 -0700
committerAdrian Thurston <thurston@colm.net>2020-10-18 11:44:43 -0700
commit85b76476de71f43d3eb25d6bef4ee6d84cb71f6c (patch)
tree65c127fbcf70e62d8a4848be2c9c4ff7d74d86a1 /src/cgil/rlhc-main.lm
parent86bb5882a70224a29650ccfa1e46c9b023c2a3ef (diff)
downloadcolm-into-src.tar.gz
lift all source code into src/ dirinto-src
Diffstat (limited to 'src/cgil/rlhc-main.lm')
-rw-r--r--src/cgil/rlhc-main.lm19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/cgil/rlhc-main.lm b/src/cgil/rlhc-main.lm
new file mode 100644
index 00000000..f9abea7e
--- /dev/null
+++ b/src/cgil/rlhc-main.lm
@@ -0,0 +1,19 @@
+InputFile: str = argv->pop()
+OutputFile: str = argv->pop()
+
+#
+# Open input and parse
+#
+Input: stream = open( InputFile, "r" )
+parse Start: start[ Input ]
+if ( !Start ) {
+ print( error, '\n' )
+ exit(1)
+}
+
+#
+# Translate
+#
+Output: stream = open( OutputFile, "w" )
+trans( Output, Start )
+