diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-04-13 21:26:20 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-04-13 21:26:20 (GMT) |
commit | 6789ffe9781b0b50525b2f71eca17709f5a1540e (patch) | |
tree | f5818cd8e0292e8c29504caaf966f3daab987ec1 /ds9/parsers/siaparser.tac | |
parent | a05e03dc6a6b011f0ca615c8abf26962df5ca8a2 (diff) | |
download | blt-6789ffe9781b0b50525b2f71eca17709f5a1540e.zip blt-6789ffe9781b0b50525b2f71eca17709f5a1540e.tar.gz blt-6789ffe9781b0b50525b2f71eca17709f5a1540e.tar.bz2 |
add ds9 sia parser
Diffstat (limited to 'ds9/parsers/siaparser.tac')
-rw-r--r-- | ds9/parsers/siaparser.tac | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/ds9/parsers/siaparser.tac b/ds9/parsers/siaparser.tac new file mode 100644 index 0000000..6a78b58 --- /dev/null +++ b/ds9/parsers/siaparser.tac @@ -0,0 +1,70 @@ +%{ +%} + +#include coords.tin +#include numeric.tin +#include string.tin + +%start command + +%token CANCEL_ +%token CLEAR_ +%token CLOSE_ +%token COORDINATE_ +%token CROSSHAIR_ +%token EXPORT_ +%token NAME_ +%token PRINT_ +%token RETRIEVE_ +%token SAVE_ +%token SIZE_ +%token SKY_ +%token SKYFORMAT_ +%token SYSTEM_ +%token UPDATE_ + +%token 2MASS_ +%token AKARI_ +%token ASTROWISE_ +%token CADC_ +%token CXC_ +%token MAST_ +%token SDSS_ +%token SKYVIEW_ +%token TGSSADR_ + +%% + +#include coords.trl +#include numeric.trl + +command : sia + | sia {yyclearin; YYACCEPT} STRING_ + ; + +sia : CANCEL_ {global cvarname; ARCancel $cvarname} + | CLOSE_ {global cvarname; SIADestroy $cvarname} + | CLEAR_ {global cvarname; SIAOff $cvarname} + | COORDINATE_ + | CROSSHAIR_ {global cvarname; IMGSVRCrosshair $cvarname} + | EXPORT_ + | SAVE_ + | NAME_ + | PRINT_ {global cvarname; CATPrint $cvarname} + | RETRIEVE_ {global cvarname; SIAApply $cvarname 1} + | SIZE_ + | SKY_ + | SKYFORMAT_ + | SYSTEM_ + | UPDATE_ {global cvarname; IMGSVRUpdate $cvarname} + ; + +%% + +proc sia::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} |