Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 0MI0800028 / commonlisp2html / lexer.sh
diff options
context:
space:
mode:
1 files changed, 20 insertions, 0 deletions
-rwxr-xr-xhomework/0MI0800028/commonlisp2html/lexer.sh20
diff --git a/homework/0MI0800028/commonlisp2html/lexer.sh b/homework/0MI0800028/commonlisp2html/lexer.sh
new file mode 100755
index 0000000..39bc21d
--- /dev/null
+++ b/homework/0MI0800028/commonlisp2html/lexer.sh
@@ -0,0 +1,20 @@
+#! /bin/bash
+
+if [ "$1" = "-b" ]; then
+ shift
+ flex $@
+ gcc lex.yy.c -lfl
+fi
+
+if [ "$1" = "-r" ]; then
+ shift
+ ./a.out < $@
+fi
+
+if [ "$1" = "-p" ]; then
+ filename="highlighted.html"
+ cat ./page_top.html > $filename
+ shift
+ ./a.out < $@ >> $filename
+ cat ./page_bottom.html >> $filename
+fi