diff options
81319 golang2html lexer (#20)
* Add highlighter for golang
* Add readme with instructions
* Fix readme
1 files changed, 30 insertions, 0 deletions
| -rw-r--r-- | homework/81319/golang2html/README.md | 30 |
diff --git a/homework/81319/golang2html/README.md b/homework/81319/golang2html/README.md new file mode 100644 index 0000000..63c5f53 --- /dev/null +++ b/homework/81319/golang2html/README.md @@ -0,0 +1,30 @@ +# How-to guide + +## Compiling the highlighter + +1. Transpile flex file to c file +``` +flex golang2html.flex +``` + +2. Compile the produced output file + +``` +gcc lex.yy.c -o lexer +``` + +The produced output is the 'lexer' file. You use it to highlight +your own golang source files. + +## Highlighting Golang code + +1. Create your own golang source file with whatever name you wish. For +this example, let your golang source be 'hello_world.go'. + +2. Produce the highlighted html output + +``` +./lexer hello_world.go > hello_world.html +``` + +## Enjoy |
