summaryrefslogtreecommitdiffstats
path: root/ds9
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-07-13 20:54:34 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-07-13 20:54:34 (GMT)
commit2c2295789e7104c86b6a297cd17bce8fc119682d (patch)
tree4fb408eb98e28df558fcd20a5b3ebcab80b8553d /ds9
parent04e24c993b0f18acbac55eda9156005f37292ace (diff)
downloadblt-2c2295789e7104c86b6a297cd17bce8fc119682d.zip
blt-2c2295789e7104c86b6a297cd17bce8fc119682d.tar.gz
blt-2c2295789e7104c86b6a297cd17bce8fc119682d.tar.bz2
update parser
Diffstat (limited to 'ds9')
-rw-r--r--ds9/library/lex.fcl1
-rw-r--r--ds9/library/parser.tac15
2 files changed, 15 insertions, 1 deletions
diff --git a/ds9/library/lex.fcl b/ds9/library/lex.fcl
index adaac96..b00a978 100644
--- a/ds9/library/lex.fcl
+++ b/ds9/library/lex.fcl
@@ -30,6 +30,7 @@ E [Ee][+-]?{D}+
-cd {return $::CDCMD_}
-console {return $::CONSOLECMD_}
-crop {return $::CROPCMD_}
+-crosshair {return $::CROSSHAIRCMD_}
-cube {return $::CUBECMD_}
-cursor {return $::CURSORCMD_}
-exit {return $::QUITCMD_}
diff --git a/ds9/library/parser.tac b/ds9/library/parser.tac
index 9121322..029cf97 100644
--- a/ds9/library/parser.tac
+++ b/ds9/library/parser.tac
@@ -26,6 +26,7 @@ set file(load) 0
%token CDCMD_
%token CONSOLECMD_
%token CROPCMD_
+%token CROSSHAIRCMD_
%token CUBECMD_
%token CURSORCMD_
%token GREENCMD_
@@ -273,6 +274,7 @@ command : 2MASSCMD_ {2MASSDialog} 2mass
| CDCMD_ cd
| CONSOLECMD_ {global ds9; OpenConsole; InitError $ds9(msg,src)}
| CROPCMD_ {ProcessRealizeDS9} crop
+ | CROSSHAIRCMD_ crosshair
| CUBECMD_ {CubeDialog} cube
| CURSORCMD_ INT_ INT_ {CursorCmd $2 $3}
| FITSCMD_ fits
@@ -601,7 +603,6 @@ crop : numeric numeric numeric numeric {global current; $current(frame) crop cen
| numeric numeric numeric numeric coordsys skyframe sysdist {global current; $current(frame) crop center $1 $2 $5 $6 $3 $4 $5 $7}
| numeric numeric numeric numeric skyframe {global current; $current(frame) crop center $1 $2 wcs $5 $3 $4 wcs degrees}
| numeric numeric numeric numeric skyframe sysdist {global current; $current(frame) crop center $1 $2 wcs $5 $3 $4 wcs $6}
-
| SEXSTR_ SEXSTR_ numeric numeric coordsys {global current; $current(frame) crop center $1 $2 $5 fk5 $3 $4 $5 degrees}
| SEXSTR_ SEXSTR_ numeric numeric coordsys skyframe {global current; $current(frame) crop center $1 $2 $5 $6 $3 $4 $5 degrees}
| SEXSTR_ SEXSTR_ numeric numeric coordsys skyframe sysdist {global current; $current(frame) crop center $1 $2 $5 $6 $3 $4 $5 $7}
@@ -618,6 +619,18 @@ crop : numeric numeric numeric numeric {global current; $current(frame) crop cen
| 3D_ numeric numeric coordsys {global current; $current(frame) crop 3d $2 $3 $4}
;
+crosshair : numeric numeric {CrosshairTo $1 $2 image fk5}
+ | numeric numeric coordsys {CrosshairTo $1 $2 $3 fk5}
+ | numeric numeric coordsys skyframe {CrosshairTo $1 $2 $3 $4}
+ | numeric numeric skyframe {CrosshairTo $1 $2 wcs $3}
+ | SEXSTR_ SEXSTR_ coordsys {CrosshairTo $1 $2 $3 fk5}
+ | SEXSTR_ SEXSTR_ coordsys skyframe {CrosshairTo $1 $2 $3 $4}
+ | SEXSTR_ SEXSTR_ skyframe {CrosshairTo $1 $2 $3 fk5}
+ | MATCH_ coordsys {global crosshair; MatchCrosshairCurrent $2}
+ | LOCK_ coordsys {global crosshair; set crosshair(lock) $2; LockCrosshairCurrent}
+ | LOCK_ NONE_ {global crosshair; set crosshair(lock) none; LockCrosshairCurrent}
+ ;
+
cube : cubeSlice
| OPEN_ {}
| CLOSE_ {CubeDestroyDialog}