diff options
| Commit | afd48a0fb4e8252f4e8c74c8442dd2a08d2787ca (patch) | |
|---|---|---|
| Author | 2022-10-25 21:31:01 +0300 | |
| Committer | 2022-10-25 21:31:01 +0300 | |
| Files | d9400f53e5d3fd4db129594a71f726f976783648 /homework/0MI0800028/commonlisp2html/lexer.sh | |
| IPL-homework1.tar IPL-homework1.tar.gz IPL-homework1.zip | ||
| Parent | a502d9eec7d768f757da5784aac7bd91ab10daf8 (diff) | |
Created a commonlisp to html lexer, with an example file and usage script homework1
1 files changed, 20 insertions, 0 deletions
| -rwxr-xr-x | homework/0MI0800028/commonlisp2html/lexer.sh | 20 |
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 |
