diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-02-20 20:17:57 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-02-20 20:17:57 (GMT) |
commit | f9ed678902dea0db45cd88c6da96da79310dfdfb (patch) | |
tree | e9a9785561e658f314c9e1b1ed112e6ca7688da7 /taccle/examples/if_then_else.tac | |
parent | a0baa564b54177527964fae8f0cc0d64d7db8ac7 (diff) | |
parent | a591c85cba3570d69a809b2099c3f108c7e26eb8 (diff) | |
download | blt-f9ed678902dea0db45cd88c6da96da79310dfdfb.zip blt-f9ed678902dea0db45cd88c6da96da79310dfdfb.tar.gz blt-f9ed678902dea0db45cd88c6da96da79310dfdfb.tar.bz2 |
Merge commit 'a591c85cba3570d69a809b2099c3f108c7e26eb8' as 'taccle'
Diffstat (limited to 'taccle/examples/if_then_else.tac')
-rw-r--r-- | taccle/examples/if_then_else.tac | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/taccle/examples/if_then_else.tac b/taccle/examples/if_then_else.tac new file mode 100644 index 0000000..eee631a --- /dev/null +++ b/taccle/examples/if_then_else.tac @@ -0,0 +1,18 @@ +# $Id: if_then_else.tac,v 1.1 2004/08/18 23:53:42 tang Exp $ + +# The classical if/then/else ambiguity. taccle resolves this by +# giving higher precedence to shifting else. +# +# References: +# Dragon book, page 250 +# lex & yacc, pages 233-235 + +%token IF ELSE TERMINAL + +%% + +stmt: IF '(' cond ')' stmt + | IF '(' cond ')' stmt ELSE stmt + | TERMINAL; + +cond: TERMINAL; |