summaryrefslogtreecommitdiffstats
path: root/ds9/parsers
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-11 18:22:51 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-11 18:22:51 (GMT)
commit9f07551b5d68463d04eaefa61e8e5000df610b47 (patch)
tree76c5b23d85983b7fadd7d1d58eb936d8d47b1233 /ds9/parsers
parente69460ddd490adbfa8a46b479aa11d0da659c45a (diff)
downloadblt-9f07551b5d68463d04eaefa61e8e5000df610b47.zip
blt-9f07551b5d68463d04eaefa61e8e5000df610b47.tar.gz
blt-9f07551b5d68463d04eaefa61e8e5000df610b47.tar.bz2
add ds9 pagesetup send parser
Diffstat (limited to 'ds9/parsers')
-rw-r--r--ds9/parsers/pagesetupsendlex.fcl16
-rw-r--r--ds9/parsers/pagesetupsendparser.tac25
2 files changed, 41 insertions, 0 deletions
diff --git a/ds9/parsers/pagesetupsendlex.fcl b/ds9/parsers/pagesetupsendlex.fcl
new file mode 100644
index 0000000..5455834
--- /dev/null
+++ b/ds9/parsers/pagesetupsendlex.fcl
@@ -0,0 +1,16 @@
+#tab pagesetupsendparser.tab.tcl
+
+%{
+%}
+
+#include defs.fin
+
+%%
+
+orient {return $ORIENT_}
+scale {return $SCALE_}
+size {return $SIZE_}
+
+#include ws.fin
+
+%%
diff --git a/ds9/parsers/pagesetupsendparser.tac b/ds9/parsers/pagesetupsendparser.tac
new file mode 100644
index 0000000..a257d8a
--- /dev/null
+++ b/ds9/parsers/pagesetupsendparser.tac
@@ -0,0 +1,25 @@
+%{
+%}
+
+%start pagesetupsend
+
+%token ORIENT_
+%token SCALE_
+%token SIZE_
+
+%%
+
+pagesetupsend : ORIENT_ {ProcessSendCmdGet ps orient}
+ | SCALE_ {ProcessSendCmdGet ps scale}
+ | SIZE_ {ProcessSendCmdGet ps size}
+ ;
+
+%%
+
+proc pagesetupsend::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}