diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-07-11 21:42:55 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-07-11 21:42:55 (GMT) |
commit | c31ed60391ecafda1369e2c97605e87067958686 (patch) | |
tree | 0fb7e5177cd723f3e95797734693415e8ef77bb3 /ds9/library | |
parent | 1ef07119b2a3fef008b118dbf354a39ec546a695 (diff) | |
download | blt-c31ed60391ecafda1369e2c97605e87067958686.zip blt-c31ed60391ecafda1369e2c97605e87067958686.tar.gz blt-c31ed60391ecafda1369e2c97605e87067958686.tar.bz2 |
update parser
Diffstat (limited to 'ds9/library')
-rw-r--r-- | ds9/library/command.tcl | 1 | ||||
-rw-r--r-- | ds9/library/lex.fcl | 9 | ||||
-rw-r--r-- | ds9/library/parser.tac | 19 |
3 files changed, 27 insertions, 2 deletions
diff --git a/ds9/library/command.tcl b/ds9/library/command.tcl index fa3f683..26e09ad 100644 --- a/ds9/library/command.tcl +++ b/ds9/library/command.tcl @@ -25,7 +25,6 @@ proc ProcessCommandLineFirst {} { switch -- $item { -debug {incr i; ProcessDebugTclCmd argv i} -title { - incr i set ds9(title) [lindex $argv $i] set t "SAOImage[string toupper $ds9(title)]" wm title $ds9(top) "$t" diff --git a/ds9/library/lex.fcl b/ds9/library/lex.fcl index 6bd679c..8dfb2ae 100644 --- a/ds9/library/lex.fcl +++ b/ds9/library/lex.fcl @@ -16,21 +16,25 @@ E [Ee][+-]?{D}+ %% +-? {return $::HELPCMD_} -2mass {return $::2MASSCMD_} -3d {return $::3DCMD_} -align {return $::ALIGNCMD_} -asinh {return $::ASINHCMD_} --? {return $::HELPCMD_} +-exit {return $::QUITCMD_} -help {return $::HELPCMD_} -histequ {return $::HISTEQUCMD_} -linear {return $::LINEARCMD_} -log {return $::LOGCMD_} -private {return $::PRIVATECMD_} -pow {return $::POWCMD_} +-quit {return $::QUITCMD_} -scale {return $::SCALECMD_} -sinh {return $::SINHCMD_} +-sleep {return $::SLEEPCMD_} -squared {return $::SQUAREDCMD_} -sqrt {return $::SQRTCMD_} +-zscale {return $::ZSCALECMD_} aip {return $::AIP_} arcmin {return $::ARCMIN_} @@ -44,6 +48,7 @@ border {return $::BORDER_} close {return $::CLOSE_} color {return $::COLOR_} compass {return $::COMPASS_} +contrast {return $::CONTRAST_} coord {return $::COORD_} crosshair {return $::CROSSHAIR_} current {return $::CURRENT_} @@ -59,6 +64,7 @@ highlite {return $::HIGHLITE_} histequ {return $::HISTEQU_} linear {return $::LINEAR_} limits {return $::LIMITS_} +line {return $::LINE_} local {return $::LOCAL_} lock {return $::LOCK_} log {return $::LOG_} @@ -75,6 +81,7 @@ off {return $::OFF_} on {return $::ON_} open {return $::OPEN_} pow {return $::POW_} +sample {return $::SAMPLE_} save {return $::SAVE_} scale {return $::SCALE_} scalelimits {return $::SCALELIMITS_} diff --git a/ds9/library/parser.tac b/ds9/library/parser.tac index fb07e44..8d95f81 100644 --- a/ds9/library/parser.tac +++ b/ds9/library/parser.tac @@ -24,10 +24,13 @@ set file(load) 0 %token LOGCMD_ %token PRIVATECMD_ %token POWCMD_ +%token QUITCMD_ %token SCALECMD_ %token SINHCMD_ +%token SLEEPCMD_ %token SQUAREDCMD_ %token SQRTCMD_ +%token ZSCALECMD_ %token AIP_ %token ARCMIN_ @@ -39,6 +42,7 @@ set file(load) 0 %token CLOSE_ %token COLOR_ %token COMPASS_ +%token CONTRAST_ %token COORD_ %token CROSSHAIR_ %token CURRENT_ @@ -52,6 +56,7 @@ set file(load) 0 %token HIGHLITE_ %token HISTEQU_ %token LIMITS_ +%token LINE_ %token LINEAR_ %token LOCAL_ %token LOCK_ @@ -69,6 +74,7 @@ set file(load) 0 %token ON_ %token OPEN_ %token POW_ +%token SAMPLE_ %token SAVE_ %token SCALE_ %token SCALELIMITS_ @@ -105,11 +111,14 @@ command : 2MASSCMD_ {2MASSDialog} 2mass # backword compatibility } | POWCMD_ {global scale; set scale(type) pow; ChangeScale} + | QUITCMD_ {QuitDS9} | SINHCMD_ {global scale; set scale(type) sinh; ChangeScale} + | SLEEPCMD_ {UpdateDS9; RealizeDS9} sleep | SQUAREDCMD_ {global scale; set scale(type) squared; ChangeScale} | SQRTCMD_ {global scale; set scale(type) sqrt; ChangeScale} | SCALECMD_ scale | STRING_ {CommandLineFileName $1} + | ZSCALECMD_ zscale ; numeric : REAL_ {set _ $1} @@ -286,6 +295,16 @@ scaleScope : LOCAL_ {set _ local} | GLOBAL_ {set _ global} ; +sleep : {after 1000} + | numeric {after [expr int($1*1000)]} + ; + +zscale : {global zscale; set scale(mode) zscale; ChangeScaleMode} + | CONTRAST_ numeric {global zscale; set zscale(contrast) $2; ChangeZScale} + | SAMPLE_ INT_ {global zscale; set zscale(sample) $2; ChangeZScale} + | LINE_ INT_ {global zscale; set zscale(line) $2; ChangeZScale} + ; + %% proc yyerror {s} { |