diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-07-12 20:47:14 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-07-12 20:47:14 (GMT) |
commit | 455209f8c1a47721cd65c1b7742e06ac8aa3bf1a (patch) | |
tree | e76e74d1372391bd7f43983cf1aee4b4aadd4202 /ds9/library | |
parent | f26e6918e7f5b68a17e9043485395c3e9ef53363 (diff) | |
download | blt-455209f8c1a47721cd65c1b7742e06ac8aa3bf1a.zip blt-455209f8c1a47721cd65c1b7742e06ac8aa3bf1a.tar.gz blt-455209f8c1a47721cd65c1b7742e06ac8aa3bf1a.tar.bz2 |
update parser
Diffstat (limited to 'ds9/library')
-rw-r--r-- | ds9/library/lex.fcl | 11 | ||||
-rw-r--r-- | ds9/library/parser.tac | 30 |
2 files changed, 38 insertions, 3 deletions
diff --git a/ds9/library/lex.fcl b/ds9/library/lex.fcl index b75d3eb..87c411a 100644 --- a/ds9/library/lex.fcl +++ b/ds9/library/lex.fcl @@ -42,6 +42,7 @@ E [Ee][+-]?{D}+ -log {return $::LOGCMD_} -lower {return $::LOWERCMD_} -minmax {return $::MINMAXCMD_} +-mode {return $::MODECMD_} -nan {return $::NANCMD_} -orient {return $::ORIENTCMD_} -pan {return $::PANCMD_} @@ -85,10 +86,12 @@ bg {return $::BACKGROUND_} bgcolor {return $::BGCOLOR_} border {return $::BORDER_} buffersize {return $::BUFFERSIZE_} +catalog {return $::CATALOG_} center {return $::CENTER_} clear {return $::CLEAR_} close {return $::CLOSE_} color {return $::COLOR_} +colorbar {return $::COLORBAR_} cols {return $::COLS_} column {return $::COLUMN_} colsz {return $::COLSZ_} @@ -106,6 +109,7 @@ degrees {return $::DEGREES_} direction {return $::DIRECTION_} elevation {return $::ELEVATION_} el {return $::ELEVATION_} +examine {return $::EXAMINE_} exp {return $::EXP_} factor {return $::FACTOR_} false {return $::FALSE_} @@ -157,14 +161,18 @@ off {return $::OFF_} on {return $::ON_} open {return $::OPEN_} out {return $::OUT_} +pan {return $::PAN_} +pointer {return $::POINTER_} pow {return $::POW_} prev {return $::PREV_} physical {return $::PHYSICAL_} +region {return $::REGION_} refresh {return $::REFRESH_} reset {return $::RESET_} rgb {return $::RGB_} rgbcube {return $::RGBCUBE_} rgbimage {return $::RGBIMAGE_} +rotate {return $::ROTATE_} row {return $::ROW_} sample {return $::SAMPLE_} save {return $::SAVE_} @@ -219,8 +227,9 @@ x {return $::X_} xy {return $::XY_} y {return $::Y_} yes {return $::YES_} -zscale {return $::ZSCALE_} zmax {return $::ZMAX_} +zoom {return $::ZOOM_} +zscale {return $::ZSCALE_} # INT [+-]?{D}+ {set ::yylval $yytext; return $::INT_} diff --git a/ds9/library/parser.tac b/ds9/library/parser.tac index cd8264b..fd7448c 100644 --- a/ds9/library/parser.tac +++ b/ds9/library/parser.tac @@ -37,6 +37,7 @@ set file(load) 0 %token LOGCMD_ %token LOWERCMD_ %token MINMAXCMD_ +%token MODECMD_ %token NANCMD_ %token ORIENTCMD_ %token PANCMD_ @@ -78,10 +79,12 @@ set file(load) 0 %token BGCOLOR_ %token BORDER_ %token BUFFERSIZE_ +%token CATALOG_ %token CENTER_ %token CLEAR_ %token CLOSE_ %token COLOR_ +%token COLORBAR_ %token COLS_ %token COLUMN_ %token COLSZ_ @@ -98,6 +101,7 @@ set file(load) 0 %token DELETE_ %token DIRECTION_ %token ELEVATION_ +%token EXAMINE_ %token EXP_ %token FACTOR_ %token FALSE_ @@ -149,14 +153,18 @@ set file(load) 0 %token ON_ %token OPEN_ %token OUT_ +%token PAN_ +%token POINTER_ %token POW_ %token PREV_ %token PHYSICAL_ %token REFRESH_ +%token REGION_ %token RESET_ %token RGB_ %token RGBCUBE_ %token RGBIMAGE_ +%token ROTATE_ %token ROW_ %token SAMPLE_ %token SAVE_ @@ -210,8 +218,9 @@ set file(load) 0 %token XY_ %token Y_ %token YES_ -%token ZSCALE_ %token ZMAX_ +%token ZOOM_ +%token ZSCALE_ %% @@ -243,6 +252,7 @@ command : 2MASSCMD_ {2MASSDialog} 2mass | LOGCMD_ {global scale; set scale(type) log; ChangeScale} | LOWERCMD_ {global ds9; lower $ds9(top)} | MINMAXCMD_ minmax + | MODECMD_ mode | NANCMD_ STRING_ {global pds9; set pds9(nan) $2; PrefsNanColor} | ORIENTCMD_ orient | PANCMD_ pan @@ -633,7 +643,23 @@ minmax : {global scale; set scale(mode) minmax; ChangeScaleMode} | INTERVAL_ INT_ {global minmax; set minmax(sample) $2; ChangeMinMax} ; -minmaxMode : +minmaxMode : SCAN_ {set _ scan} + | SAMPLE_ {set _ sample} + | DATAMIN_ {set _ datamin} + | IRAFMIN_ {set _ irafmin} + ; + +mode : NONE_ {global current; set current(mode) none; ChangeMode} + # backward compatibility + | POINTER_ {global current; set current(mode) none; ChangeMode} + | REGION_ {global current; set current(mode) region; ChangeMode} + | CROSSHAIR_ {global current; set current(mode) crosshair; ChangeMode} + | COLORBAR_ {global current; set current(mode) colorbar; ChangeMode} + | PAN_ {global current; set current(mode) pan; ChangeMode} + | ZOOM_ {global current; set current(mode) zoom; ChangeMode} + | ROTATE_ {global current; set current(mode) rotate; ChangeMode} + | CATALOG_ {global current; set current(mode) catalog; ChangeMode} + | EXAMINE_ {global current; set current(mode) examine; ChangeMode} ; orient : orientation {global current; set current(orient) $1; ChangeOrient} |