diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-05-31 21:32:01 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-05-31 21:32:01 (GMT) |
commit | adbf89acf2d2393e65f78481838a72fc6fbcc35c (patch) | |
tree | af378cc5e8102b6261f4a3a10eded717487432ca /ds9/parsers | |
parent | 2887fd30571298c2c34d815675339ad57bff902a (diff) | |
download | blt-adbf89acf2d2393e65f78481838a72fc6fbcc35c.zip blt-adbf89acf2d2393e65f78481838a72fc6fbcc35c.tar.gz blt-adbf89acf2d2393e65f78481838a72fc6fbcc35c.tar.bz2 |
add ds9 parser grid send
Diffstat (limited to 'ds9/parsers')
-rw-r--r-- | ds9/parsers/gridsendlex.fcl | 52 | ||||
-rw-r--r-- | ds9/parsers/gridsendparser.tac | 167 |
2 files changed, 219 insertions, 0 deletions
diff --git a/ds9/parsers/gridsendlex.fcl b/ds9/parsers/gridsendlex.fcl new file mode 100644 index 0000000..eadbb27 --- /dev/null +++ b/ds9/parsers/gridsendlex.fcl @@ -0,0 +1,52 @@ +#tab gridsendparser.tab.tcl + +%{ +%} + +#include defs.fin + +%% + +axes {return $AXES_} +border {return $BORDER_} +color {return $COLOR_} +dash {return $DASH_} +def {return $DEF_} +def1 {return $DEF1_} +def2 {return $DEF2_} +format1 {return $FORMAT1_} +format2 {return $FORMAT2_} +gap {return $GAP_} +gap1 {return $GAP1_} +gap2 {return $GAP2_} +gap3 {return $GAP3_} +grid {return $GRID_} +label {return $LABELS_} +labels {return $LABELS_} +textlab {return $LABELS_} +numlab {return $NUMERICS_} +numbers {return $NUMBERS_} +numeric {return $NUMERICS_} +numerics {return $NUMERICS_} +origin {return $ORIGIN_} +sky {return $SKYFRAME_} +skyframe {return $SKYFRAME_} +skyformat {return $SKYFORMAT_} +style {return $STYLE_} +system {return $SYSTEM_} +text {return $TEXT_} +text1 {return $TEXT1_} +text2 {return $TEXT2_} +tick {return $TICKMARKS_} +tickmark {return $TICKMARKS_} +tickmarks {return $TICKMARKS_} +title {return $TITLE_} +type {return $TYPE_} +vertical {return $VERTICAL_} +view {return $VIEW_} +width {return $WIDTH_} + +#include font.fin +#include string.fin + +%% diff --git a/ds9/parsers/gridsendparser.tac b/ds9/parsers/gridsendparser.tac new file mode 100644 index 0000000..769c824 --- /dev/null +++ b/ds9/parsers/gridsendparser.tac @@ -0,0 +1,167 @@ +%{ +%} + +#include font.tin +#include string.tin + +%token AXES_ +%token BORDER_ +%token COLOR_ +%token DASH_ +%token DEF_ +%token DEF1_ +%token DEF2_ +%token FORMAT1_ +%token FORMAT2_ +%token GAP_ +%token GAP1_ +%token GAP2_ +%token GAP3_ +%token GRID_ +%token LABELS_ +%token NUMBERS_ +%token NUMERICS_ +%token ORIGIN_ +%token SKYFRAME_ +%token SKYFORMAT_ +%token STYLE_ +%token SYSTEM_ +%token TEXT_ +%token TEXT1_ +%token TEXT2_ +%token TICKMARKS_ +%token TITLE_ +%token TYPE_ +%token VERTICAL_ +%token WIDTH_ +%token VIEW_ + +%% + +gridsend : {ProcessSendCmdYesNo grid view} + | TYPE_ type + | SYSTEM_ {ProcessSendCmdGet grid system} + | SKYFRAME_ {ProcessSendCmdGet grid sky} + | SKYFORMAT_ {ProcessSendCmdGet grid skyformat} + | GRID_ grid + | AXES_ axes + | FORMAT1_ {ProcessSendCmdGet grid format1} + | FORMAT2_ {ProcessSendCmdGet grid format2} + | TICKMARKS_ tickmarks + | BORDER_ border + | NUMERICS_ numerics + | TITLE_ title + | LABELS_ labels +# backward compatibility + | VIEW_ view + ; + +type : {ProcessSendCmdGet grid type} +# backward compatibility + | AXES_ {ProcessSendCmdGet grid axis,type} +# backward compatibility + | NUMERICS_ {ProcessSendCmdGet grid numlab,type} + ; + +grid : {ProcessSendCmdYesNo grid grid} + | COLOR_ {ProcessSendCmdGet grid grid,color} + | WIDTH_ {ProcessSendCmdGet grid grid,width} + | DASH_ {ProcessSendCmdYesNo grid grid,style} + | STYLE_ {ProcessSendCmdGet grid grid,style} + | GAP1_ {ProcessSendCmdGet grid grid,gap1} + | GAP2_ {ProcessSendCmdGet grid grid,gap2} + | GAP3_ {ProcessSendCmdGet grid grid,gap3} + ; + +axes: {ProcessSendCmdYesNo grid axes} + | COLOR_ {ProcessSendCmdGet grid axes,color} + | WIDTH_ {ProcessSendCmdGet grid axes,width} + | DASH_ {ProcessSendCmdYesNo grid axes,style} +# backward compatibility + | STYLE_ {ProcessSendCmdGet grid axes,style} + | TYPE_ {ProcessSendCmdGet grid axes,type} + | ORIGIN_ {ProcessSendCmdGet grid axes,origin} + ; + +tickmarks : {ProcessSendCmdYesNo grid tick} + | COLOR_ {ProcessSendCmdGet grid tick,color} + | WIDTH_ {ProcessSendCmdGet grid tick,width} + | DASH_ {ProcessSendCmdYesNo grid tick,style} +# backward compatibility + | STYLE_ {ProcessSendCmdGet grid tick,style} + ; + +border : {ProcessSendCmdYesNo grid border} + | COLOR_ {ProcessSendCmdGet grid border,color} + | WIDTH_ {ProcessSendCmdGet grid border,width} + | DASH_ {ProcessSendCmdYesNo grid border,style} +# backward compatibility + | STYLE_ {ProcessSendCmdGet grid border,style} + ; + +numerics : {ProcessSendCmdYesNo grid numlab} + | FONT_ {ProcessSendCmdGet grid numlab,font} + | FONTSIZE_ {ProcessSendCmdGet grid numlab,size} + | FONTWEIGHT_ {ProcessSendCmdGet grid numlab,weight} + | FONTSLANT_ {ProcessSendCmdGet grid numlab,slant} +# backward compatibility + | FONTSTYLE_ {ProcessSendCmdGet grid numlab,weight} + | COLOR_ {ProcessSendCmdGet grid numlab,color} + | GAP1_ {ProcessSendCmdGet grid numlab,gap1} + | GAP2_ {ProcessSendCmdGet grid numlab,gap2} + | GAP3_ {ProcessSendCmdGet grid numlab,gap3} + | TYPE_ {ProcessSendCmdGet grid numlab,type} + | VERTICAL_ {ProcessSendCmdGet grid numlab,vertical} + ; + +title : {ProcessSendCmdYesNo grid title} + | TEXT_ {ProcessSendCmdGet grid title,text} + | DEF_ {ProcessSendCmdYesNo grid title,def} + | GAP_ {ProcessSendCmdGet grid title,gap} + | FONT_ {ProcessSendCmdGet grid title,font} + | FONTSIZE_ {ProcessSendCmdGet grid title,size} + | FONTWEIGHT_ {ProcessSendCmdGet grid title,weight} + | FONTSLANT_ {ProcessSendCmdGet grid title,slant} +# backward compatibility + | FONTSTYLE_ {ProcessSendCmdGet grid title,weight} + | COLOR_ {ProcessSendCmdGet grid title,color} + ; + +labels : {ProcessSendCmdYesNo grid textlab} + | TEXT1_ {ProcessSendCmdGet grid textlab,text1} + | TEXT2_ {ProcessSendCmdGet grid textlab,text2} + | DEF1_ {ProcessSendCmdYesNo grid textlab,def1} + | DEF2_ {ProcessSendCmdYesNo grid textlab,def2} + | GAP1_ {ProcessSendCmdGet grid textlab,gap1} + | GAP2_ {ProcessSendCmdGet grid textlab,gap2} + | FONT_ {ProcessSendCmdGet grid textlab,font} + | FONTSIZE_ {ProcessSendCmdGet grid textlab,size} + | FONTWEIGHT_ {ProcessSendCmdGet grid textlab,weight} + | FONTSLANT_ {ProcessSendCmdGet grid textlab,slant} +# backward compatibility + | FONTSTYLE_ {ProcessSendCmdGet grid textlab,weight} + | COLOR_ {ProcessSendCmdGet grid textlab,color} + ; + +view : GRID_ {ProcessSendCmdYesNo grid grid} + | AXES_ viewaxes + | TITLE_ {ProcessSendCmdYesNo grid title} + | BORDER_ {ProcessSendCmdYesNo grid border} + | VERTICAL_ {ProcessSendCmdYesNo grid numlab,vertical} + ; + +viewaxes : {ProcessSendCmdYesNo grid axes} + | NUMBERS_ {ProcessSendCmdYesNo grid numlab} + | TICKMARKS_ {ProcessSendCmdYesNo grid tick} + | LABELS_ {ProcessSendCmdYesNo grid textlab} + ; + +%% + +proc gridsend::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} |