diff options
Diffstat (limited to 'ds9/parsers')
-rw-r--r-- | ds9/parsers/catparser.tac | 2 | ||||
-rw-r--r-- | ds9/parsers/catsendlex.fcl | 13 | ||||
-rw-r--r-- | ds9/parsers/catsendparser.tac | 28 | ||||
-rw-r--r-- | ds9/parsers/viewlex.fcl | 2 | ||||
-rw-r--r-- | ds9/parsers/viewparser.tac | 2 | ||||
-rw-r--r-- | ds9/parsers/viewsendlex.fcl | 39 | ||||
-rw-r--r-- | ds9/parsers/viewsendparser.tac | 76 |
7 files changed, 159 insertions, 3 deletions
diff --git a/ds9/parsers/catparser.tac b/ds9/parsers/catparser.tac index 97dd79c..b5f9f40 100644 --- a/ds9/parsers/catparser.tac +++ b/ds9/parsers/catparser.tac @@ -174,7 +174,7 @@ coordinate : numeric numeric {CatalogCmdCoord $1 $2 fk5} | SEXSTR_ SEXSTR_ skyframe {CatalogCmdCoord $1 $2 $3} ; -filter : LOAD_ STRING_ {ProcessCmdCVAR filter $2 CATTable} +filter : LOAD_ STRING_ {CatalogCmdFilterLoad $2} | STRING_ {ProcessCmdCVAR filter $1 CATTable} ; diff --git a/ds9/parsers/catsendlex.fcl b/ds9/parsers/catsendlex.fcl new file mode 100644 index 0000000..3f1c5e5 --- /dev/null +++ b/ds9/parsers/catsendlex.fcl @@ -0,0 +1,13 @@ +#tab catsendparser.tab.tcl + +%{ +%} + +#include defs.fin + +%% + +header {return $HEADER_} + +#include string.fin +%% diff --git a/ds9/parsers/catsendparser.tac b/ds9/parsers/catsendparser.tac new file mode 100644 index 0000000..6c36111 --- /dev/null +++ b/ds9/parsers/catsendparser.tac @@ -0,0 +1,28 @@ +%{ +%} + +#include string.tin + +%token HEADER_ + +%start catsend + +%% + +catsend : {if {![CatalogCmdCheck]} {cat::YYABORT}} catsendCmd + | STRING_ {if {![CatalogSendCmdRef cat${1}]} {plot::YYABORT}} catsendCmd + ; + +catsendCmd : {ProcessSendCmdGet icat cats} + | HEADER_ {global cvarname; ProcessSendCmdResult {.txt} [CATGetHeader $cvarname]} + ; + +%% + +proc catsend::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} diff --git a/ds9/parsers/viewlex.fcl b/ds9/parsers/viewlex.fcl index 1fe719c..f980b7d 100644 --- a/ds9/parsers/viewlex.fcl +++ b/ds9/parsers/viewlex.fcl @@ -10,7 +10,7 @@ blue {return $BLUE_} buttons {return $BUTTONS_} colorbar {return $COLORBAR_} -colorbarnumerics {return $COLORBARNUMERICS_} +colorbarnumerics {return $COLORBARNUMERICS_} filename {return $FILENAME_} frame {return $FRAME_} graph {return $GRAPH_} diff --git a/ds9/parsers/viewparser.tac b/ds9/parsers/viewparser.tac index 283b954..f7bbfcc 100644 --- a/ds9/parsers/viewparser.tac +++ b/ds9/parsers/viewparser.tac @@ -64,7 +64,7 @@ view : layout | KEYWORD_ yesno {ProcessCmdSet view info,keyword $2 UpdateView} | MINMAX_ yesno {ProcessCmdSet view info,minmax $2 UpdateView} | LOWHIGH_ yesno {ProcessCmdSet view info,lowhigh $2 UpdateView} - | UNITS_ yesno {ProcessCmdSet view info,units $2 UpdateView} + | UNITS_ yesno {ProcessCmdSet view info,bunit $2 UpdateView} | coordsys yesno {ProcessCmdSet view info,$1 $2 UpdateView} | wcssys yesno {ProcessCmdSet view info,$1 $2 UpdateView} | FRAME_ yesno {ProcessCmdSet view info,frame $2 UpdateView} diff --git a/ds9/parsers/viewsendlex.fcl b/ds9/parsers/viewsendlex.fcl new file mode 100644 index 0000000..9cd0469 --- /dev/null +++ b/ds9/parsers/viewsendlex.fcl @@ -0,0 +1,39 @@ +#tab viewsendparser.tab.tcl + +%{ +%} + +#include defs.fin + +%% + +blue {return $BLUE_} +buttons {return $BUTTONS_} +colorbar {return $COLORBAR_} +colorbarnumerics {return $COLORBARNUMERICS_} +filename {return $FILENAME_} +frame {return $FRAME_} +graph {return $GRAPH_} +green {return $GREEN_} +horz {return $HORIZONTAL_} +horizontal {return $HORIZONTAL_} +horzgraph {return $HORZGRAPH_} +info {return $INFO_} +keyvalue {return $KEYVALUE_} +keyword {return $KEYWORD_} +layout {return $LAYOUT_} +lowhigh {return $LOWHIGH_} +magnifier {return $MAGNIFIER_} +minmax {return $MINMAX_} +object {return $OBJECT_} +panner {return $PANNER_} +red {return $RED_} +units {return $UNITS_} +vert {return $VERTICAL_} +vertical {return $VERTICAL_} +vertgraph {return $VERTGRAPH_} + +#include coords.fin +#include string.fin + +%% diff --git a/ds9/parsers/viewsendparser.tac b/ds9/parsers/viewsendparser.tac new file mode 100644 index 0000000..e39b556 --- /dev/null +++ b/ds9/parsers/viewsendparser.tac @@ -0,0 +1,76 @@ +%{ +%} + +#include coords.tin +#include string.tin + +%start viewsend + +%token BUTTONS_ +%token COLORBAR_ +%token COLORBARNUMERICS_ +%token FILENAME_ +%token FRAME_ +%token GRAPH_ +%token HORIZONTAL_ +%token HORZGRAPH_ +%token INFO_ +%token KEYWORD_ +%token KEYVALUE_ +%token LAYOUT_ +%token LOWHIGH_ +%token MAGNIFIER_ +%token MINMAX_ +%token OBJECT_ +%token PANNER_ +%token UNITS_ +%token VERTGRAPH_ +%token VERTICAL_ + +%% + +#include coords.trl + +viewsend : + | LAYOUT_ {ProcessSendCmdGet view layout} + | KEYVALUE_ {ProcessSendCmdGet view info,keyvalue} + | INFO_ {ProcessSendCmdYesNo view info} + | PANNER_ {ProcessSendCmdYesNo view panner} + | MAGNIFIER_ {ProcessSendCmdYesNo view magnifier} + | BUTTONS_ {ProcessSendCmdYesNo view buttons} + | COLORBAR_ {ProcessSendCmdYesNo view colorbar} +# backward compatibility + | COLORBARNUMERICS_ {ProcessSendCmdYesNo colorbar numerics} + | GRAPH_ graph +# backward compatibility + | HORZGRAPH_ {ProcessSendCmdYesNo view graph,horz} +# backward compatibility + | VERTGRAPH_ {ProcessSendCmdYesNo view graph,graph} + + | FILENAME_ {ProcessSendCmdYesNo view info,filename} + | OBJECT_ {ProcessSendCmdYesNo view info,object} + | KEYWORD_ {ProcessSendCmdYesNo view info,keyword} + | MINMAX_ {ProcessSendCmdYesNo view info,minmax} + | LOWHIGH_ {ProcessSendCmdYesNo view info,lowhigh} + | UNITS_ {ProcessSendCmdYesNo view info,bunit} + + | coordsys {ProcessSendCmdYesNo view info,$1} + | wcssys {ProcessSendCmdYesNo view info,$1} + + | FRAME_ {ProcessSendCmdYesNo view info,frame} + ; + +graph : + | HORIZONTAL_ {ProcessSendCmdYesNo view graph,horz} + | VERTICAL_ {ProcessSendCmdYesNo view graph,vert} + ; + +%% + +proc viewsend::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} |