summaryrefslogtreecommitdiffstats
path: root/ds9
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-03-07 16:51:33 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-03-07 16:51:33 (GMT)
commit537605d33cb4d01d9a34b61a8205c2259861fe08 (patch)
tree3d49a3d98a5e2c3f87b2133e06bca72ae27f8e5e /ds9
parentb74be73ac819daa3ba27e35f857848d9d4c1a3c4 (diff)
downloadblt-537605d33cb4d01d9a34b61a8205c2259861fe08.zip
blt-537605d33cb4d01d9a34b61a8205c2259861fe08.tar.gz
blt-537605d33cb4d01d9a34b61a8205c2259861fe08.tar.bz2
add ds9 2mass parser
Diffstat (limited to 'ds9')
-rw-r--r--ds9/parsers/twomasslex.fcl4
-rw-r--r--ds9/parsers/twomassparser.tac21
2 files changed, 17 insertions, 8 deletions
diff --git a/ds9/parsers/twomasslex.fcl b/ds9/parsers/twomasslex.fcl
index 86b21f8..aaaee4e 100644
--- a/ds9/parsers/twomasslex.fcl
+++ b/ds9/parsers/twomasslex.fcl
@@ -20,8 +20,8 @@ size {return $SIZE_}
survey {return $SURVEY_}
update {return $UPDATE_}
-#include base.fin
-#include coords.fin
#include yesno.fin
+#include coords.fin
+#include base.fin
%%
diff --git a/ds9/parsers/twomassparser.tac b/ds9/parsers/twomassparser.tac
index 21af3e2..6514b75 100644
--- a/ds9/parsers/twomassparser.tac
+++ b/ds9/parsers/twomassparser.tac
@@ -1,11 +1,11 @@
%{
%}
-%start command
-
-#include base.tin
-#include coords.tin
#include yesno.tin
+#include coords.tin
+#include base.tin
+
+%start command
%token CLOSE_
%token COORD_
@@ -22,9 +22,9 @@
%%
-#include base.trl
-#include coords.trl
#include yesno.trl
+#include coords.trl
+#include base.trl
command : 2mass
| 2mass {yyclearin; YYACCEPT} STRING_
@@ -38,11 +38,20 @@ sex : {set _ sexagesimal}
| SEXAGESIMAL_ {set _ sexagesimal}
;
+opt :
+ | WCS_
+ | FK5_
+ | WCS_ FK5_
+ ;
+
+# COORD_ is depricated
2mass : {IMGSVRApply dtwomass 1}
| OPEN_ {}
| CLOSE_ {ARDestroy dtwomass}
| STRING_ {global dtwomass; set dtwomass(name) $1; IMGSVRApply dtwomass 1}
| NAME_ STRING_ {global dtwomass; set dtwomass(name) $2; IMGSVRApply dtwomass 1}
+ | numeric numeric opt {global dtwomass; set dtwomass(x) $1; set dtwomass(y) $2; set dtwomass(skyformat) degrees; set dtwomass(skyformat,msg) degress; IMGSVRApply dtwomass 1}
+ | SEXSTR_ SEXSTR_ opt {global dtwomass; set dtwomass(x) $1; set dtwomass(y) $2; set dtwomass(skyformat) sexagesimal; set dtwomass(skyformat,msg) sexagesimal; IMGSVRApply dtwomass 1}
| COORD_ numeric numeric deg {global dtwomass; set dtwomass(x) $2; set dtwomass(y) $3; set dtwomass(skyformat) $4; set dtwomass(skyformat,msg) $4; IMGSVRApply dtwomass 1}
| COORD_ SEXSTR_ SEXSTR_ sex {global dtwomass; set dtwomass(x) $2; set dtwomass(y) $3; set dtwomass(skyformat) $4; set dtwomass(skyformat,msg) $4; IMGSVRApply dtwomass 1}
| SIZE_ numeric numeric skyformat {global dtwomass; set dtwomass(width) $2; set dtwomass(height) $3; set dtwomass(rformat) $4; set dtwomass(rformat,msg) $4}