From afd48a0fb4e8252f4e8c74c8442dd2a08d2787ca Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 25 Oct 2022 21:31:01 +0300 Subject: Created a commonlisp to html lexer, with an example file and usage script --- homework/0MI0800028/commonlisp2html/lexer.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 homework/0MI0800028/commonlisp2html/lexer.sh (limited to 'homework/0MI0800028/commonlisp2html/lexer.sh') 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 -- cgit v1.3.1-26-gb76a