diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-05-08 20:16:01 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-05-08 20:16:01 (GMT) |
commit | 58f6608644d76112394217f1ab6d419a140a1a73 (patch) | |
tree | ffeab1f05a64889a72944cb3e031b9ad20a6d773 /ds9/parsers/minmaxparser.tac | |
parent | a9da761371c99957c0e89ee51b4862b71d64461a (diff) | |
download | blt-58f6608644d76112394217f1ab6d419a140a1a73.zip blt-58f6608644d76112394217f1ab6d419a140a1a73.tar.gz blt-58f6608644d76112394217f1ab6d419a140a1a73.tar.bz2 |
add ds9 minmax parser
Diffstat (limited to 'ds9/parsers/minmaxparser.tac')
-rw-r--r-- | ds9/parsers/minmaxparser.tac | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/ds9/parsers/minmaxparser.tac b/ds9/parsers/minmaxparser.tac new file mode 100644 index 0000000..7b926f2 --- /dev/null +++ b/ds9/parsers/minmaxparser.tac @@ -0,0 +1,47 @@ +%{ +%} + +#include numeric.tin +#include string.tin + +%start command + +%token AUTO_ +%token DATAMIN_ +%token IRAFMIN_ +%token INTERVAL_ +%token MODE_ +%token SAMPLE_ +%token SCAN_ + +%% + +#include numeric.trl + +command : minmax + | minmax {yyclearin; YYACCEPT} STRING_ + ; + +minmax : {ScaleCmdSet mode minmax ChangeScaleMode} + | mode {MinmaxCmdSet mode $1 ChangeMinMax} + | MODE_ mode {MinmaxCmdSet mode $2 ChangeMinMax} + | INTERVAL_ INT_ {MinmaxCmdSet sample $2 ChangeMinMax} + ; + +mode : SCAN_ {set _ scan} + | SAMPLE_ {set _ sample} + | DATAMIN_ {set _ datamin} + | IRAFMIN_ {set _ irafmin} +# backward compatibility + | AUTO_ {set _ scan} + ; + +%% + +proc minmax::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} |