From f118aeff4651a6cd93c7ee346c45bcd1ce2a8905 Mon Sep 17 00:00:00 2001 From: William Joye Date: Mon, 10 Dec 2018 12:47:44 -0500 Subject: add numeric to Contour Levels command --- ds9/make.include | 8 ++++---- ds9/parsers/contourparser.tac | 9 +++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ds9/make.include b/ds9/make.include index 0d0e028..37a7189 100644 --- a/ds9/make.include +++ b/ds9/make.include @@ -7,13 +7,13 @@ vpath %.fcl $(prefix)/ds9/parsers # -w generate warnings # -d generate lexer table $(prefix)/ds9/parsers/%parser.tcl : %parser.tac - tclsh $(prefix)/taccle/taccle.tcl -p $* -d $< -# tclsh $(prefix)/taccle/taccle.tcl -p $* -d -w -v $< +# tclsh $(prefix)/taccle/taccle.tcl -p $* -d $< + tclsh $(prefix)/taccle/taccle.tcl -p $* -d -w -v $< # -d debug $(prefix)/ds9/parsers/%lex.tcl : %lex.fcl - tclsh $(prefix)/fickle/fickle.tcl -P $* $< -# tclsh $(prefix)/fickle/fickle.tcl -P $* -d $< +# tclsh $(prefix)/fickle/fickle.tcl -P $* $< + tclsh $(prefix)/fickle/fickle.tcl -P $* -d $< #--------------------------library diff --git a/ds9/parsers/contourparser.tac b/ds9/parsers/contourparser.tac index 3647f31..417b06b 100644 --- a/ds9/parsers/contourparser.tac +++ b/ds9/parsers/contourparser.tac @@ -91,8 +91,13 @@ contour : yesno {ProcessCmdSet contour view $1 UpdateContour} | GENERATE_ {ContourDialog; ContourGenerateDialog; UpdateContour} ; -levels : STRING_ {ContourCmdLevels $1} - | numeric {ContourCmdLevels $1} +levels : numerics {ContourCmdLevels $1} +# backward compatible + | STRING_ {ContourCmdLevels $1} + ; + +numerics : numerics numeric {append _ " $2"} + | numeric ; load : STRING_ {ContourCmdLoad $1} -- cgit v0.12