From b3b5766af3ce9a584a5d3dbaae3c6d4820b0289c Mon Sep 17 00:00:00 2001 From: William Joye Date: Fri, 8 Jun 2018 12:34:05 -0400 Subject: update ds9 parsers --- ds9/parsers/catlex.fcl | 3 +-- ds9/parsers/catparser.tac | 6 ++--- ds9/parsers/coords.fin | 59 ------------------------------------------ ds9/parsers/coords.tin | 48 ---------------------------------- ds9/parsers/coords.trl | 52 ------------------------------------- ds9/parsers/cropsendlex.fcl | 5 +++- ds9/parsers/cropsendparser.tac | 10 +++++-- ds9/parsers/sialex.fcl | 5 +++- ds9/parsers/siaparser.tac | 9 +++++-- ds9/parsers/wcsformat.fin | 5 ++++ ds9/parsers/wcsformat.tin | 5 ++++ ds9/parsers/wcsformat.trl | 8 ++++++ 12 files changed, 44 insertions(+), 171 deletions(-) delete mode 100644 ds9/parsers/coords.fin delete mode 100644 ds9/parsers/coords.tin delete mode 100644 ds9/parsers/coords.trl create mode 100644 ds9/parsers/wcsformat.fin create mode 100644 ds9/parsers/wcsformat.tin create mode 100644 ds9/parsers/wcsformat.trl diff --git a/ds9/parsers/catlex.fcl b/ds9/parsers/catlex.fcl index e68c765..29b1590 100644 --- a/ds9/parsers/catlex.fcl +++ b/ds9/parsers/catlex.fcl @@ -98,8 +98,7 @@ saao {return $SAAO_} #include font.fin #include wcssys.fin #include skyframe.fin -#include skyformat.fin -#include rformat.fin +#include wcsformat.fin #include numeric.fin #include sexstr.fin #include string.fin diff --git a/ds9/parsers/catparser.tac b/ds9/parsers/catparser.tac index 95b386c..089a026 100644 --- a/ds9/parsers/catparser.tac +++ b/ds9/parsers/catparser.tac @@ -5,8 +5,7 @@ #include font.tin #include wcssys.tin #include skyframe.tin -#include skyformat.tin -#include rformat.tin +#include wcsformat.tin #include numeric.tin #include sexstr.tin #include string.tin @@ -107,8 +106,7 @@ #include font.trl #include wcssys.trl #include skyframe.trl -#include skyformat.trl -#include rformat.trl +#include wcsformat.trl #include numeric.trl command : catalog diff --git a/ds9/parsers/coords.fin b/ds9/parsers/coords.fin deleted file mode 100644 index 42afb3a..0000000 --- a/ds9/parsers/coords.fin +++ /dev/null @@ -1,59 +0,0 @@ -wcs {return $WCS_} -wcsa {return $WCSA_} -wcsb {return $WCSB_} -wcsc {return $WCSC_} -wcsd {return $WCSD_} -wcse {return $WCSE_} -wcsf {return $WCSF_} -wcsg {return $WCSG_} -wcsh {return $WCSH_} -wcsi {return $WCSI_} -wcsj {return $WCSJ_} -wcsk {return $WCSK_} -wcsl {return $WCSL_} -wcsm {return $WCSM_} -wcsn {return $WCSN_} -wcso {return $WCSO_} -wcsp {return $WCSP_} -wcsq {return $WCSQ_} -wcsr {return $WCSR_} -wcss {return $WCSS_} -wcst {return $WCST_} -wcsu {return $WCSU_} -wcsv {return $WCSV_} -wcsw {return $WCSW_} -wcsx {return $WCSX_} -wcsy {return $WCSY_} -wcsz {return $WCSZ_} - -image {return $IMAGE_} -physical {return $PHYSICAL_} -amplifier {return $AMPLIFIER_} -detector {return $DETECTOR_} - -fk4 {return $FK4_} -b1950 {return $FK4_} -fk5 {return $FK5_} -j2000 {return $FK5_} -icrs {return $ICRS_} -galactic {return $GALACTIC_} -ecliptic {return $ECLIPTIC_} - -degrees {return $DEGREES_} -arcmin {return $ARCMIN_} -arcsec {return $ARCSEC_} - -sexagesimal {return $SEXAGESIMAL_} - -# SEXAGESIMAL -[+-]?{D}+:{D}+:{D}+"."? | -[+-]?{D}+:{D}+:{D}*"."{D}+ {set yylval $yytext; return $SEXSTR_} - -# HMS -[+-]?{D}+h{D}+m{D}+"."?s | -[+-]?{D}+h{D}+m{D}*"."{D}+s {set yylval $yytext; return $HMSSTR_} - -# DMS -[+-]?{D}+d{D}+m{D}+"."?s | -[+-]?{D}+d{D}+m{D}*"."{D}+s {set yylval $yytext; return $SMSSTR_} - diff --git a/ds9/parsers/coords.tin b/ds9/parsers/coords.tin deleted file mode 100644 index 5a507ba..0000000 --- a/ds9/parsers/coords.tin +++ /dev/null @@ -1,48 +0,0 @@ -%token SEXSTR_ - -%token IMAGE_ -%token PHYSICAL_ -%token AMPLIFIER_ -%token DETECTOR_ - -%token WCS_ -%token WCSA_ -%token WCSB_ -%token WCSC_ -%token WCSD_ -%token WCSE_ -%token WCSF_ -%token WCSG_ -%token WCSH_ -%token WCSI_ -%token WCSJ_ -%token WCSK_ -%token WCSL_ -%token WCSM_ -%token WCSN_ -%token WCSO_ -%token WCSP_ -%token WCSQ_ -%token WCSR_ -%token WCSS_ -%token WCST_ -%token WCSU_ -%token WCSV_ -%token WCSW_ -%token WCSX_ -%token WCSY_ -%token WCSZ_ - -%token FK4_ -%token B1950_ -%token FK5_ -%token J2000_ -%token ICRS_ -%token GALACTIC_ -%token ECLIPTIC_ - -%token DEGREES_ -%token ARCMIN_ -%token ARCSEC_ - -%token SEXAGESIMAL_ diff --git a/ds9/parsers/coords.trl b/ds9/parsers/coords.trl deleted file mode 100644 index 9699780..0000000 --- a/ds9/parsers/coords.trl +++ /dev/null @@ -1,52 +0,0 @@ -coordsys : IMAGE_ {set _ image} - | PHYSICAL_ {set _ physical} - | AMPLIFIER_ {set _ amplifier} - | DETECTOR_ {set _ detector} - ; - -wcssys : WCS_ {set _ wcs} - | WCSA_ {set _ wcsa} - | WCSB_ {set _ wcsb} - | WCSC_ {set _ wcsc} - | WCSD_ {set _ wcsd} - | WCSE_ {set _ wcse} - | WCSF_ {set _ wcsf} - | WCSG_ {set _ wcsg} - | WCSH_ {set _ wcsh} - | WCSI_ {set _ wcsi} - | WCSJ_ {set _ wcsj} - | WCSK_ {set _ wcsk} - | WCSL_ {set _ wcsl} - | WCSM_ {set _ wcsm} - | WCSN_ {set _ wcsn} - | WCSO_ {set _ wcso} - | WCSP_ {set _ wcsp} - | WCSQ_ {set _ wcsq} - | WCSR_ {set _ wcsr} - | WCSS_ {set _ wcss} - | WCST_ {set _ wcst} - | WCSU_ {set _ wcsu} - | WCSV_ {set _ wcsv} - | WCSW_ {set _ wcsw} - | WCSX_ {set _ wcsx} - | WCSY_ {set _ wcsy} - | WCSZ_ {set _ wcsz} - ; - -skyframe : FK4_ {set _ fk4} - | B1950_ {set _ fk4} - | FK5_ {set _ fk5} - | J2000_ {set _ fk5} - | ICRS_ {set _ icrs} - | GALACTIC_ {set _ galactic} - | ECLIPTIC_ {set _ ecliptic} - ; - -skyformat : DEGREES_ {set _ degrees} - | SEXAGESIMAL_ {set _ sexagesimal} - ; - -rformat : DEGREES_ {set _ degrees} - | ARCMIN_ {set _ arcmin} - | ARCSEC_ {set _ arcsec} - ; diff --git a/ds9/parsers/cropsendlex.fcl b/ds9/parsers/cropsendlex.fcl index 8441e5d..9dafff6 100644 --- a/ds9/parsers/cropsendlex.fcl +++ b/ds9/parsers/cropsendlex.fcl @@ -10,7 +10,10 @@ 3d {return $3D_} lock {return $LOCK_} -#include coords.fin +#include coordsys.fin +#include wcssys.fin +#include skyframe.fin +#include wcsformat.fin #include ws.fin %% diff --git a/ds9/parsers/cropsendparser.tac b/ds9/parsers/cropsendparser.tac index 7e1b3f7..a65d44b 100644 --- a/ds9/parsers/cropsendparser.tac +++ b/ds9/parsers/cropsendparser.tac @@ -1,7 +1,10 @@ %{ %} -#include coords.tin +#include coordsys.tin +#include wcssys.tin +#include skyframe.tin +#include wcsformat.tin %start cropsend @@ -10,7 +13,10 @@ %% -#include coords.trl +#include coordsys.trl +#include wcssys.trl +#include skyframe.trl +#include wcsformat.trl cropsend : {ProcessSendCmdCurrent frame "get crop center physical fk5 degrees physical degrees"} | coordsys {ProcessSendCmdCurrent frame "get crop center $1 fk5 degrees $1 degrees"} diff --git a/ds9/parsers/sialex.fcl b/ds9/parsers/sialex.fcl index ff8094b..36295f1 100644 --- a/ds9/parsers/sialex.fcl +++ b/ds9/parsers/sialex.fcl @@ -40,8 +40,11 @@ starbase {return $STARBASE_} csv {return $CSV_} tsv {return $TSV_} -#include coords.fin +#include wcssys.fin +#include skyframe.fin +#include wcsformat.fin #include numeric.fin +#include sexstr.fin #include string.fin #include ws.fin diff --git a/ds9/parsers/siaparser.tac b/ds9/parsers/siaparser.tac index ac3274a..0732fe2 100644 --- a/ds9/parsers/siaparser.tac +++ b/ds9/parsers/siaparser.tac @@ -1,8 +1,11 @@ %{ %} -#include coords.tin +#include wcssys.tin +#include skyframe.tin +#include wcsformat.tin #include numeric.tin +#include sexstr.tin #include string.tin %start command @@ -42,7 +45,9 @@ %% -#include coords.trl +#include wcssys.trl +#include skyframe.trl +#include wcsformat.trl #include numeric.trl command : sia diff --git a/ds9/parsers/wcsformat.fin b/ds9/parsers/wcsformat.fin new file mode 100644 index 0000000..baf2b19 --- /dev/null +++ b/ds9/parsers/wcsformat.fin @@ -0,0 +1,5 @@ +degrees {return $DEGREES_} +arcmin {return $ARCMIN_} +arcsec {return $ARCSEC_} + +sexagesimal {return $SEXAGESIMAL_} diff --git a/ds9/parsers/wcsformat.tin b/ds9/parsers/wcsformat.tin new file mode 100644 index 0000000..f7269c8 --- /dev/null +++ b/ds9/parsers/wcsformat.tin @@ -0,0 +1,5 @@ +%token DEGREES_ +%token ARCMIN_ +%token ARCSEC_ + +%token SEXAGESIMAL_ diff --git a/ds9/parsers/wcsformat.trl b/ds9/parsers/wcsformat.trl new file mode 100644 index 0000000..10511e7 --- /dev/null +++ b/ds9/parsers/wcsformat.trl @@ -0,0 +1,8 @@ +skyformat : DEGREES_ {set _ degrees} + | SEXAGESIMAL_ {set _ sexagesimal} + ; + +rformat : DEGREES_ {set _ degrees} + | ARCMIN_ {set _ arcmin} + | ARCSEC_ {set _ arcsec} + ; -- cgit v0.12