diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-05-11 17:09:54 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-05-11 17:09:54 (GMT) |
commit | 92fc6a10347cc38b62c621728ed33aa267dcc75b (patch) | |
tree | 6ac59b5cf01d562cf2290505cc5fc9104c852a89 /ds9/parsers | |
parent | 44b298577ac9f07ec6560fe0a1f6bbd37f8bd250 (diff) | |
download | blt-92fc6a10347cc38b62c621728ed33aa267dcc75b.zip blt-92fc6a10347cc38b62c621728ed33aa267dcc75b.tar.gz blt-92fc6a10347cc38b62c621728ed33aa267dcc75b.tar.bz2 |
add ds9 mosaicwcs/mosiciraf parsers
Diffstat (limited to 'ds9/parsers')
-rw-r--r-- | ds9/parsers/mosaiciraflex.fcl | 15 | ||||
-rw-r--r-- | ds9/parsers/mosaicirafparser.tac | 34 | ||||
-rw-r--r-- | ds9/parsers/mosaicwcslex.fcl | 16 | ||||
-rw-r--r-- | ds9/parsers/mosaicwcsparser.tac | 41 |
4 files changed, 106 insertions, 0 deletions
diff --git a/ds9/parsers/mosaiciraflex.fcl b/ds9/parsers/mosaiciraflex.fcl new file mode 100644 index 0000000..aaf5a95 --- /dev/null +++ b/ds9/parsers/mosaiciraflex.fcl @@ -0,0 +1,15 @@ +#tab mosaicirafparser.tab.tcl + +%{ +%} + +#include defs.fin + +%% + +mask {return $MASK_} +new {return $NEW_} + +#include string.fin + +%% diff --git a/ds9/parsers/mosaicirafparser.tac b/ds9/parsers/mosaicirafparser.tac new file mode 100644 index 0000000..1ecf784 --- /dev/null +++ b/ds9/parsers/mosaicirafparser.tac @@ -0,0 +1,34 @@ +%{ +%} + +#include string.tin + +%start command + +%token MASK_ +%token NEW_ + +%% + +command : mosaiciraf + | mosaiciraf {yyclearin; YYACCEPT} STRING_ + ; + +mosaiciraf : opts {MosaicIRAFCmdLoad {} $1} + | opts STRING_ {MosaicIRAFCmdLoad $2 $1} + ; + +opts : + | NEW_ {CreateFrame; set _ {}} + | MASK_ {set _ mask} + ; + +%% + +proc mosaiciraf::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} diff --git a/ds9/parsers/mosaicwcslex.fcl b/ds9/parsers/mosaicwcslex.fcl new file mode 100644 index 0000000..807a62e --- /dev/null +++ b/ds9/parsers/mosaicwcslex.fcl @@ -0,0 +1,16 @@ +#tab mosaicwcsparser.tab.tcl + +%{ +%} + +#include defs.fin + +%% + +mask {return $MASK_} +new {return $NEW_} + +#include coords.fin +#include string.fin + +%% diff --git a/ds9/parsers/mosaicwcsparser.tac b/ds9/parsers/mosaicwcsparser.tac new file mode 100644 index 0000000..f29bff9 --- /dev/null +++ b/ds9/parsers/mosaicwcsparser.tac @@ -0,0 +1,41 @@ +%{ +%} + +#include coords.tin +#include string.tin + +%start command + +%token MASK_ +%token NEW_ + +%% + +#include coords.trl + +command : mosaicwcs + | mosaicwcs {yyclearin; YYACCEPT} STRING_ + ; + +mosaicwcs : sys opts {MosaicWCSCmdLoad {} $2 $1} + | sys opts STRING_ {MosaicWCSCmdLoad $3 $2 $1} + ; + +sys : {set _ wcs} + | wcssys {set _ $1} + ; + +opts : + | NEW_ {CreateFrame; set _ {}} + | MASK_ {set _ mask} + ; + +%% + +proc mosaicwcs::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} |