summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/vlaparser.tac
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-03-08 18:39:29 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-03-08 18:39:29 (GMT)
commitbef231e411516b6453f9c7addf9863b0ce0d93c6 (patch)
tree3e88e7f7b145d8589fecf385552114717363c8ff /ds9/parsers/vlaparser.tac
parent8f16be81d8537a9719436104ff9198c33510b8ed (diff)
downloadblt-bef231e411516b6453f9c7addf9863b0ce0d93c6.zip
blt-bef231e411516b6453f9c7addf9863b0ce0d93c6.tar.gz
blt-bef231e411516b6453f9c7addf9863b0ce0d93c6.tar.bz2
add vla/vlss parsers
Diffstat (limited to 'ds9/parsers/vlaparser.tac')
-rw-r--r--ds9/parsers/vlaparser.tac56
1 files changed, 56 insertions, 0 deletions
diff --git a/ds9/parsers/vlaparser.tac b/ds9/parsers/vlaparser.tac
new file mode 100644
index 0000000..9a8369f
--- /dev/null
+++ b/ds9/parsers/vlaparser.tac
@@ -0,0 +1,56 @@
+%{
+%}
+
+#include yesno.tin
+#include imgsvr.tin
+#include base.tin
+
+%start command
+
+%token STRIPE82_
+%token FIRST_
+
+%%
+
+#include yesno.trl
+#include imgsvr.trl
+#include base.trl
+
+command : vla
+ | vla {yyclearin; YYACCEPT} CMD_
+ ;
+
+vla : {IMGSVRApply dvla 1}
+ | OPEN_ {}
+ | CLOSE_ {ARDestroy dvla}
+ | STRING_ {global dvla; set dvla(name) $1; IMGSVRApply dvla 1}
+ | numeric numeric coordOpt {global dvla; set dvla(x) $1; set dvla(y) $2; set dvla(skyformat) degrees; set dvla(skyformat,msg) degrees; IMGSVRApply dvla 1}
+ | SEXSTR_ SEXSTR_ coordOpt {global dvla; set dvla(x) $1; set dvla(y) $2; set dvla(skyformat) sexagesimal; set dvla(skyformat,msg) sexagesimal; IMGSVRApply dvla 1}
+ | SIZE_ numeric numeric sizeOpt {global dvla; set dvla(width) $2; set dvla(height) $3; set dvla(rformat) $4; set dvla(rformat,msg) $4}
+ | SAVE_ yesno {global dvla; set dvla(save) $2}
+ | FRAME_ frame {global dvla; set dvla(mode) $2}
+ | UPDATE_ update
+ | SURVEY_ survey {global dvla; set dvla(survey) $2}
+
+ | COORD_ numeric numeric deg {global dvla; set dvla(x) $2; set dvla(y) $3; set dvla(skyformat) $4; set dvla(skyformat,msg) $4; IMGSVRApply dvla 1}
+ | COORD_ SEXSTR_ SEXSTR_ sex {global dvla; set dvla(x) $2; set dvla(y) $3; set dvla(skyformat) $4; set dvla(skyformat,msg) $4; IMGSVRApply dvla 1}
+ | NAME_ STRING_ {global dvla; set dvla(name) $2; IMGSVRApply dvla 1}
+ ;
+
+update : FRAME_ {IMGSVRUpdate dvla; IMGSVRApply dvla 1}
+ | CROSSHAIR_ {IMGSVRCrosshair dvla; IMGSVRApply dvla 1}
+ ;
+
+survey : STRIPE82_ {set _ stripe82}
+ | FIRST_ {set _ first}
+ ;
+
+%%
+
+proc vla::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}