diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-05-11 19:27:19 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-05-11 19:27:19 (GMT) |
commit | 94f297496394bcec6e7a9ba0fb9a16471ae266b1 (patch) | |
tree | 4457fcddf56d28bb9f02d74b953d0ed3cd50925e | |
parent | 53b50211e69350789ad170bfe6ce01b0e255c1c0 (diff) | |
download | blt-94f297496394bcec6e7a9ba0fb9a16471ae266b1.zip blt-94f297496394bcec6e7a9ba0fb9a16471ae266b1.tar.gz blt-94f297496394bcec6e7a9ba0fb9a16471ae266b1.tar.bz2 |
add ds9 smosaicwcs parser
-rw-r--r-- | ds9/library/smosaicwcs.tcl | 11 | ||||
-rw-r--r-- | ds9/library/source.tcl | 2 | ||||
-rw-r--r-- | ds9/parsers/mosaicimagewcsparser.tac | 4 | ||||
-rw-r--r-- | ds9/parsers/mosaicwcsparser.tac | 4 |
4 files changed, 14 insertions, 7 deletions
diff --git a/ds9/library/smosaicwcs.tcl b/ds9/library/smosaicwcs.tcl index 6bee0e2..6e7a492 100644 --- a/ds9/library/smosaicwcs.tcl +++ b/ds9/library/smosaicwcs.tcl @@ -21,11 +21,15 @@ proc ProcessSMosaicWCSCmd {varname iname sock fn} { upvar $varname var upvar $iname i - global loadParam - global current + global debug + if {$debug(tcl,parser)} { + smosaicwcs::YY_FLUSH_BUFFER + smosaicwcs::yy_scan_string [lrange $var $i end] + smosaicwcs::yyparse + incr i [expr $smosaicwcs::yycnt-1] + } else { set layer {} - switch -- [string tolower [lindex $var $i]] { new { incr i @@ -67,3 +71,4 @@ proc ProcessSMosaicWCSCmd {varname iname sock fn} { } FinishLoad } +} diff --git a/ds9/library/source.tcl b/ds9/library/source.tcl index 239838d..2030400 100644 --- a/ds9/library/source.tcl +++ b/ds9/library/source.tcl @@ -324,6 +324,8 @@ source $ds9(root)/library/sleepparser.tcl source $ds9(root)/library/sleeplex.tcl source $ds9(root)/library/smoothparser.tcl source $ds9(root)/library/smoothlex.tcl +source $ds9(root)/library/smosaicwcsparser.tcl +source $ds9(root)/library/smosaicwcslex.tcl source $ds9(root)/library/sourceparser.tcl source $ds9(root)/library/sourcelex.tcl source $ds9(root)/library/srgbcubeparser.tcl diff --git a/ds9/parsers/mosaicimagewcsparser.tac b/ds9/parsers/mosaicimagewcsparser.tac index 746bde4..93737c2 100644 --- a/ds9/parsers/mosaicimagewcsparser.tac +++ b/ds9/parsers/mosaicimagewcsparser.tac @@ -17,8 +17,8 @@ command : mosaicimagewcs | mosaicimagewcs {yyclearin; YYACCEPT} STRING_ ; -mosaicimagewcs : sys opts {MosaicImageWCSCmdLoad {} $2 $1} - | sys opts STRING_ {MosaicImageWCSCmdLoad $3 $2 $1} +mosaicimagewcs : opts sys {MosaicImageWCSCmdLoad {} $1 $2} + | opts sys STRING_ {MosaicImageWCSCmdLoad $3 $1 $2} ; sys : {set _ wcs} diff --git a/ds9/parsers/mosaicwcsparser.tac b/ds9/parsers/mosaicwcsparser.tac index f29bff9..bf6df9c 100644 --- a/ds9/parsers/mosaicwcsparser.tac +++ b/ds9/parsers/mosaicwcsparser.tac @@ -17,8 +17,8 @@ command : mosaicwcs | mosaicwcs {yyclearin; YYACCEPT} STRING_ ; -mosaicwcs : sys opts {MosaicWCSCmdLoad {} $2 $1} - | sys opts STRING_ {MosaicWCSCmdLoad $3 $2 $1} +mosaicwcs : opts sys {MosaicWCSCmdLoad {} $1 $2} + | opts sys STRING_ {MosaicWCSCmdLoad $3 $1 $2} ; sys : {set _ wcs} |