summaryrefslogtreecommitdiffstats
path: root/taccle/examples/simple_scanner.fcl
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-21 20:21:59 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-21 20:21:59 (GMT)
commit0813099a1937d0e06681609f2ef9a020ea60b451 (patch)
tree843d60b0e86bfae1be7a7ba66c4f1498c5ca07a7 /taccle/examples/simple_scanner.fcl
parentfd4d09aafba1eb096cf9be4e93250087d9af465e (diff)
parentfe273e056b3a237a2d571501d97a8d222d618047 (diff)
downloadblt-0813099a1937d0e06681609f2ef9a020ea60b451.zip
blt-0813099a1937d0e06681609f2ef9a020ea60b451.tar.gz
blt-0813099a1937d0e06681609f2ef9a020ea60b451.tar.bz2
Merge commit 'fe273e056b3a237a2d571501d97a8d222d618047' as 'taccle'
Diffstat (limited to 'taccle/examples/simple_scanner.fcl')
-rw-r--r--taccle/examples/simple_scanner.fcl16
1 files changed, 16 insertions, 0 deletions
diff --git a/taccle/examples/simple_scanner.fcl b/taccle/examples/simple_scanner.fcl
new file mode 100644
index 0000000..99ff67f
--- /dev/null
+++ b/taccle/examples/simple_scanner.fcl
@@ -0,0 +1,16 @@
+# $Id: simple_scanner.fcl,v 1.2 2004/08/18 23:55:31 tang Exp $
+
+%{
+source "simple_calculator.tab.tcl"
+%}
+
+%option interactive
+
+number [0-9]+
+
+%%
+
+{number} { set ::yylval $yytext; return $::ID }
+\n { return $::NEWLINE }
+\s # ignore whitespace
+. { set ::yylval $yytext; return $yytext }