diff options
Diffstat (limited to 'ds9/library/parser.tac')
-rw-r--r-- | ds9/library/parser.tac | 195 |
1 files changed, 195 insertions, 0 deletions
diff --git a/ds9/library/parser.tac b/ds9/library/parser.tac index ae3e5a4..adc1388 100644 --- a/ds9/library/parser.tac +++ b/ds9/library/parser.tac @@ -24,6 +24,7 @@ set file(load) 0 %token CONSOLECMD_ %token CURSORCMD_ %token GREENCMD_ +%token FRAMECMD_ %token HELPCMD_ %token HISTEQUCMD_ %token ICONIFYCMD_ @@ -42,6 +43,7 @@ set file(load) 0 %token RAISECMD_ %token REDCMD_ %token SCALECMD_ +%token SINGLECMD_ %token SINHCMD_ %token SLEEPCMD_ %token SOURCECMD_ @@ -49,20 +51,28 @@ set file(load) 0 %token SQRTCMD_ %token THEMECMD_ %token THREADSCMD_ +%token TILECMD_ %token ZOOMCMD_ %token ZSCALECMD_ +%token 3D_ %token AIP_ +%token ALL_ +%token AMPLIFIER_ %token ARCMIN_ %token ARCSEC_ %token ASINH_ %token AZIMUTH_ +%token AUTOMATIC_ +%token BACK_ %token BACKGROUND_ %token BGCOLOR_ %token BORDER_ +%token CENTER_ %token CLEAR_ %token CLOSE_ %token COLOR_ +%token COLUMN_ %token COMPASS_ %token CONTRAST_ %token COORD_ @@ -70,30 +80,45 @@ set file(load) 0 %token CURRENT_ %token DATASEC_ %token DEGREES_ +%token DETECTOR_ +%token DELETE_ +%token DIRECTION_ %token ELEVATION_ %token EXP_ %token FALSE_ +%token FIRST_ %token FIT_ +%token FORWARD_ %token FRAME_ +%token FRAMENO_ +%token GAP_ %token GLOBAL_ +%token GRID_ +%token HIDE_ %token HIGHLITE_ %token HISTEQU_ +%token IMAGE_ %token IN_ %token IRAFALIGN_ +%token LAST_ +%token LAYOUT_ %token LIMITS_ %token LINE_ %token LINEAR_ %token LOCAL_ %token LOCK_ %token LOG_ +%token MANUAL_ %token MATCH_ %token METHOD_ %token MINMAX_ %token MIP_ %token MODE_ +%token MOVE_ %token NAME_ %token NANCOLOR_ %token NEW_ +%token NEXT_ %token NO_ %token NONE_ %token OFF_ @@ -101,12 +126,19 @@ set file(load) 0 %token OPEN_ %token OUT_ %token POW_ +%token PREV_ +%token PHYSICAL_ +%token REFRESH_ +%token RESET_ +%token RGB_ +%token ROW_ %token SAMPLE_ %token SAVE_ %token SCALE_ %token SCALELIMITS_ %token SCOPE_ %token SEXAGESIMAL_ +%token SHOW_ %token SINH_ %token SIZE_ %token SQUARED_ @@ -118,6 +150,33 @@ set file(load) 0 %token UPDATE_ %token USER_ %token VIEW_ +%token WCS_ +%token WCSA_ +%token WCSB_ +%token WCSC_ +%token WCSD_ +%token WCSE_ +%token WCSF_ +%token WCSG_ +%token WCSH_ +%token WCSI_ +%token WCSJ_ +%token WCSK_ +%token WCSL_ +%token WCSM_ +%token WCSN_ +%token WCSO_ +%token WCSP_ +%token WCSQ_ +%token WCSR_ +%token WCSS_ +%token WCST_ +%token WCSU_ +%token WCSV_ +%token WCSW_ +%token WCSX_ +%token WCSY_ +%token WCSZ_ %token X_ %token XY_ %token Y_ @@ -140,6 +199,7 @@ command : 2MASSCMD_ {2MASSDialog} 2mass | CDCMD_ cd | CONSOLECMD_ {global ds9; OpenConsole; InitError $ds9(msg,src)} | CURSORCMD_ INT_ INT_ {CursorCmd $2 $3} + | FRAMECMD_ frame | GREENCMD_ {global current; set current(rgb) green; RGBChannel} | HELPCMD_ {HelpCommand} | HISTEQUCMD_ {global scale; set scale(type) histequ; ChangeScale} @@ -160,6 +220,7 @@ command : 2MASSCMD_ {2MASSDialog} 2mass | QUITCMD_ {QuitDS9} | RAISECMD_ {global ds9; raise $ds9(top)} | REDCMD_ {global current; set current(rgb) red; RGBChannel} + | SINGLECMD_ {global current; ProcessRealizeDS9; set current(display) single; DisplayMode} | SINHCMD_ {global scale; set scale(type) sinh; ChangeScale} | SLEEPCMD_ {UpdateDS9; RealizeDS9} sleep | SOURCECMD_ STRING_ {SourceFileCmd $2} @@ -169,6 +230,7 @@ command : 2MASSCMD_ {2MASSDialog} 2mass # backward compatibility | THEMECMD_ | THREADSCMD_ INT_ {global ds9; set ds9(threads) $2; ChangeThreads} + | TILECMD_ tile | ZOOMCMD_ {ProcessRealizeDS9} zoom | ZSCALECMD_ zscale | STRING_ {CommandLineFileName $1} @@ -213,6 +275,42 @@ optDeg : {set _ degrees} | DEGREES_ {set _ degrees} ; +coordsys : IMAGE_ {set _ image} + | PHYSICAL_ {set _ physical} + | AMPLIFIER_ {set _ amplifier} + | DETECTOR_ {set _ detector} + | wcssys {set _ $1} + ; + +wcssys : WCS_ {set _ wcs} + | WCSA_ {set _ wcsa} + | WCSB_ {set _ wcsb} + | WCSC_ {set _ wcsc} + | WCSD_ {set _ wcsd} + | WCSE_ {set _ wcse} + | WCSF_ {set _ wcsf} + | WCSG_ {set _ wcsg} + | WCSH_ {set _ wcsh} + | WCSI_ {set _ wcsi} + | WCSJ_ {set _ wcsj} + | WCSK_ {set _ wcsk} + | WCSL_ {set _ wcsl} + | WCSM_ {set _ wcsm} + | WCSN_ {set _ wcsn} + | WCSO_ {set _ wcso} + | WCSP_ {set _ wcsp} + | WCSQ_ {set _ wcsq} + | WCSR_ {set _ wcsr} + | WCSS_ {set _ wcss} + | WCST_ {set _ wcst} + | WCSU_ {set _ wcsu} + | WCSV_ {set _ wcsv} + | WCSW_ {set _ wcsw} + | WCSX_ {set _ wcsx} + | WCSY_ {set _ wcsy} + | WCSZ_ {set _ wcsz} + ; + 2mass : {IMGSVRApply dtwomass 1} | STRING_ {global dtwomass; set dtwomass(name) $1; IMGSVRApply dtwomass 1} | NAME_ STRING_ {global dtwomass; set dtwomass(name) $2; IMGSVRApply dtwomass 1} @@ -310,6 +408,74 @@ cd : STRING_ {cd $2} | '/' {cd /} ; +frame : + | MATCH_ coordsys {MatchFrameCurrent $2} + | LOCK_ frameLock + | CENTER_ frameCenter + | CLEAR_ frameClear + | DELETE_ frameDelete + | NEW_ frameNew + | RESET_ frameReset + | REFRESH_ frameRefresh + | HIDE_ frameHide + | SHOW_ frameShow + | MOVE_ frameMove + | FIRST_ {FirstFrame} + | PREV_ {PrevFrame} + | NEXT_ {NextFrame} + | LAST_ {LastFrame} + | FRAMENO_ INT_ {CreateGotoFrame $2 base} + ; + +frameLock : coordsys {global panzoom; set panzoom(lock) $1; LockFrameCurrent} + | NONE_ {global panzoom; set panzoom(lock) none; LockFrameCurrent} + ; + +frameCenter: {CenterCurrentFrame} + | ALL_ {CenterAllFrame} + | INT_ {CenterFrame "Frame$1"} + ; + +frameClear: {ClearCurrentFrame} + | ALL_ {ClearAllFrame} + | INT_ {ClearFrame "Frame$1"} + ; + +frameDelete: {DeleteCurrentFrame} + | ALL_ {DeleteAllFrames} + | INT_ {DeleteFrame "Frame$1"} + ; + +frameNew: {CreateFrame} + | RGB_ {CreateRGBFrame} + | 3D_ {Create3DFrame} + ; + +frameReset: {ResetCurrentFrame} + | ALL_ {ResetAllFrame} + | INT_ {ResetFrame "Frame$1"} + ; + +frameRefresh: {UpdateCurrentFrame} + | ALL_ {UpdateAllFrame} + | INT_ {UpdateFrame "Frame$1"} + ; + +frameHide: {global active; global current; set active($current(frame)) 0; UpdateActiveFrames} + | ALL_ {ActiveFrameNone} + | INT_ {global active; set active("Frame$1") 0; UpdateActiveFrames} + ; + +frameShow: ALL_ {ActiveFrameAll} + | INT_ {global active; set active("Frame$1") 1; UpdateActiveFrames} + ; + +frameMove : FIRST_ {MoveFirstFrame} + | BACK_ {MovePrevFrame} + | FORWARD_ {MoveNextFrame} + | LAST_ {MoveLastFrame} + ; + iconify : {global ds9; wm iconify $ds9(top)} | yes {global ds9; wm iconify $ds9(top)} | no {global ds9; wm deiconify $ds9(top)} @@ -411,6 +577,35 @@ sleep : {after 1000} | numeric {after [expr int($1*1000)]} ; +tile: {global current; set current(display) tile; DisplayMode} + | yes {global current; set current(display) tile; DisplayMode} + | no {global current; set current(display) single; DisplayMode} + | MODE_ tileMode {global tile; set tile(mode) $2; DisplayMode} + | GRID_ tileGrid + | COLUMN_ {global tile; set tile(mode) column; DisplayMode} + | ROW_ {global tile; set tile(mode) row; DisplayMode} + ; + +tileMode : GRID_ {set _ grid} + | COLUMN_ {set _ column} + | ROW_ {set _ row} + ; + +tileGrid : {global tile; set tile(mode) grid; DisplayMode} + | MODE_ tileGridMode {global tile; set tile(grid,mode) $2; DisplayMode} + | DIRECTION_ tileGridDir {global tile; set tile(grid,dir) $2; DisplayMode} + | LAYOUT_ INT_ INT_ {global tile; set tile(grid,col) $2; set tile(grid,row) $3; set tile(grid,mode) manual; DisplayMode} + | GAP_ INT_ {global tile; set tile(grid,gap) $2; DisplayMode} + ; + +tileGridMode : AUTOMATIC_ {set _ automatic} + | MANUAL_ {set _ manual} + ; + +tileGridDir : X_ {set _ x} + | Y_ {set _ y} + ; + zoom : numeric {Zoom $1 $1} | numeric numeric {Zoom $1 $2} | OPEN_ {PanZoomDialog} |