summaryrefslogtreecommitdiffstats
path: root/taccle/examples/simple_calculator.tac
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-21 19:51:40 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-21 19:51:40 (GMT)
commit67f7b317d8c54c06c71a8f645129b6646de5ab5f (patch)
treede86d46a2bdc2556d5684d58fc2def1889575d8c /taccle/examples/simple_calculator.tac
parentfa52e6c892d06e9f4d9b23dc70538585068ef2b2 (diff)
downloadblt-67f7b317d8c54c06c71a8f645129b6646de5ab5f.zip
blt-67f7b317d8c54c06c71a8f645129b6646de5ab5f.tar.gz
blt-67f7b317d8c54c06c71a8f645129b6646de5ab5f.tar.bz2
update taccle
Diffstat (limited to 'taccle/examples/simple_calculator.tac')
-rw-r--r--taccle/examples/simple_calculator.tac36
1 files changed, 0 insertions, 36 deletions
diff --git a/taccle/examples/simple_calculator.tac b/taccle/examples/simple_calculator.tac
deleted file mode 100644
index ea104aa..0000000
--- a/taccle/examples/simple_calculator.tac
+++ /dev/null
@@ -1,36 +0,0 @@
-# $Id: simple_calculator.tac,v 1.1 2004/08/18 23:53:43 tang Exp $
-
-# This example demonstrates symbol and synthesized values.
-
-%{
-#!/usr/bin/tclsh
-
-%}
-
-%token ID NEWLINE
-%start start
-
-%%
-
-start: E NEWLINE { puts "Result is $1" }
- | E { puts "Result is $1" }
- ;
-
-E: E '+' T { set _ [expr {$1 + $3}] }
- | E '-' T { set _ [expr {$1 - $3}] }
- | T
- ;
-
-T: T '*' F { set _ [expr {$1 * $3}] }
- | T '/' F { set _ [expr {$1 / $3}] }
- | F
- ;
-
-F: '(' E ')' { set _ $2 }
- | ID { set _ $::yylval }
- ;
-
-%%
-
-source simple_scanner.tcl
-yyparse