Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81319 / golang2html / README.md
diff options
context:
space:
mode:
1 files changed, 30 insertions, 0 deletions
-rw-r--r--homework/81319/golang2html/README.md30
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