summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/widthparser.tac
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-05-08 18:13:16 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-05-08 18:13:16 (GMT)
commit86654caa76c90695a985bb5f0dbbcc683411354e (patch)
tree5e81f198826578589f9a5126af8319108a139352 /ds9/parsers/widthparser.tac
parente95361dcf0ecd4af0011315ad839e1076c80ed66 (diff)
downloadblt-86654caa76c90695a985bb5f0dbbcc683411354e.zip
blt-86654caa76c90695a985bb5f0dbbcc683411354e.tar.gz
blt-86654caa76c90695a985bb5f0dbbcc683411354e.tar.bz2
add ds9 width/height parsers
Diffstat (limited to 'ds9/parsers/widthparser.tac')
-rw-r--r--ds9/parsers/widthparser.tac28
1 files changed, 28 insertions, 0 deletions
diff --git a/ds9/parsers/widthparser.tac b/ds9/parsers/widthparser.tac
new file mode 100644
index 0000000..b7d03df
--- /dev/null
+++ b/ds9/parsers/widthparser.tac
@@ -0,0 +1,28 @@
+%{
+%}
+
+#include numeric.tin
+#include string.tin
+
+%start command
+
+%%
+
+#include numeric.trl
+
+command : width
+ | width {yyclearin; YYACCEPT} STRING_
+ ;
+
+width : INT_ {CanvasCmdSet width $1 UpdateView}
+ ;
+
+%%
+
+proc width::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}