commit 560a823bf54ffa11ef04d04a0be9dc29e2ea413a
parent 0c0bb9ead221d27d327b6d4a348ed1134c48cc4b
Author: William Casarin <jb55@jb55.com>
Date: Tue, 24 Oct 2017 10:23:38 -0700
fun: use square bracket examples as well
Diffstat:
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
@@ -2,8 +2,8 @@
CFLAGS=-O2
GEN=parser.tab.c parser.tab.h lex.yy.c oplookup.c oplookup.o script.o oplookup.h
-FORBIN=script.o parser.tab.c lex.yy.c oplookup.o
-DEPS=oplookup.h script.h misc.h Makefile
+FORBIN=script.o parser.tab.c lex.yy.c oplookup.o op.o
+DEPS=oplookup.h script.h misc.h Makefile op.h
PREFIX ?= /usr/local
BIN=btcs
diff --git a/lexer.l b/lexer.l
@@ -18,6 +18,10 @@
\<[^\>]+\> { yylval.str = yytext; return T_EXAMPLE; }
+\[[^\]]+\] { yylval.str = yytext; return T_EXAMPLE; }
+
+
+
[oO][pP]_ {}
[a-zA-Z0-9]+ {