summaryrefslogtreecommitdiffstats
path: root/ds9/parsers
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-18 20:48:23 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-18 20:48:23 (GMT)
commit3e121d75852a441cb087ae5225fe9ef7d363173b (patch)
treed7c4db55c19de8c3628edf77fe2689deae3fe5d2 /ds9/parsers
parent2a2c1efa881b41e32e272b3686b8102a9ec6d234 (diff)
downloadblt-3e121d75852a441cb087ae5225fe9ef7d363173b.zip
blt-3e121d75852a441cb087ae5225fe9ef7d363173b.tar.gz
blt-3e121d75852a441cb087ae5225fe9ef7d363173b.tar.bz2
add ds9 preserve send parser
Diffstat (limited to 'ds9/parsers')
-rw-r--r--ds9/parsers/preservesendlex.fcl16
-rw-r--r--ds9/parsers/preservesendparser.tac25
-rw-r--r--ds9/parsers/xpasendparser.tac4
3 files changed, 43 insertions, 2 deletions
diff --git a/ds9/parsers/preservesendlex.fcl b/ds9/parsers/preservesendlex.fcl
new file mode 100644
index 0000000..24652fc
--- /dev/null
+++ b/ds9/parsers/preservesendlex.fcl
@@ -0,0 +1,16 @@
+#tab preservesendparser.tab.tcl
+
+%{
+%}
+
+#include defs.fin
+
+%%
+
+pan {return $PAN_}
+regions {return $REGIONS_}
+scale {return $SCALE_}
+
+#include ws.fin
+
+%%
diff --git a/ds9/parsers/preservesendparser.tac b/ds9/parsers/preservesendparser.tac
new file mode 100644
index 0000000..b1576f0
--- /dev/null
+++ b/ds9/parsers/preservesendparser.tac
@@ -0,0 +1,25 @@
+%{
+%}
+
+%start preservesend
+
+%token PAN_
+%token REGIONS_
+%token SCALE_
+
+%%
+
+preservesend : SCALE_ {ProcessSendCmdTxt "no"}
+ | PAN_ {ProcessSendCmdYesNo panzoom preserve}
+ | REGIONS_ {ProcessSendCmdYesNo marker preserve}
+ ;
+
+%%
+
+proc preservesend::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}
diff --git a/ds9/parsers/xpasendparser.tac b/ds9/parsers/xpasendparser.tac
index c27b80f..63a44ec 100644
--- a/ds9/parsers/xpasendparser.tac
+++ b/ds9/parsers/xpasendparser.tac
@@ -7,8 +7,8 @@
%%
-xpasend : {global parse; $parse(proc) $parse(id) [XPAInfoResult]}
- | INFO_ {global parse; $parse(proc) $parse(id) [XPAInfoResult]}
+xpasend : {ProcessSendCmd XPAInfoResult}
+ | INFO_ {ProcessSendCmd XPAInfoResult}
;
%%