summaryrefslogtreecommitdiffstats
path: root/ds9
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-03-13 19:15:30 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-03-13 19:15:30 (GMT)
commitb334d7f6c99078dae9f0ba702a9194f4fd148a77 (patch)
tree14e7d99bb54cfea7d4a86a44720deb28f98356e6 /ds9
parentfe4317865abb1017007f1bda915c83c86ccc20e9 (diff)
downloadblt-b334d7f6c99078dae9f0ba702a9194f4fd148a77.zip
blt-b334d7f6c99078dae9f0ba702a9194f4fd148a77.tar.gz
blt-b334d7f6c99078dae9f0ba702a9194f4fd148a77.tar.bz2
update ds9 parsers
Diffstat (limited to 'ds9')
-rw-r--r--ds9/parsers/binlex.fcl3
-rw-r--r--ds9/parsers/binparser.tac5
-rw-r--r--ds9/parsers/blocklex.fcl3
-rw-r--r--ds9/parsers/blockparser.tac5
-rw-r--r--ds9/parsers/cmaplex.fcl3
-rw-r--r--ds9/parsers/cmapparser.tac5
-rw-r--r--ds9/parsers/colorbarlex.fcl3
-rw-r--r--ds9/parsers/colorbarparser.tac5
-rw-r--r--ds9/parsers/croplex.fcl3
-rw-r--r--ds9/parsers/cropparser.tac5
-rw-r--r--ds9/parsers/dssesolex.fcl3
-rw-r--r--ds9/parsers/dssesoparser.tac5
-rw-r--r--ds9/parsers/dsssaolex.fcl3
-rw-r--r--ds9/parsers/dsssaoparser.tac5
-rw-r--r--ds9/parsers/dssstscilex.fcl3
-rw-r--r--ds9/parsers/dssstsciparser.tac5
-rw-r--r--ds9/parsers/numeric.fin7
-rw-r--r--ds9/parsers/numeric.tin (renamed from ds9/parsers/base.tin)1
-rw-r--r--ds9/parsers/numeric.trl (renamed from ds9/parsers/base.trl)0
-rw-r--r--ds9/parsers/nvsslex.fcl3
-rw-r--r--ds9/parsers/nvssparser.tac5
-rw-r--r--ds9/parsers/panlex.fcl3
-rw-r--r--ds9/parsers/panparser.tac5
-rw-r--r--ds9/parsers/skyviewlex.fcl3
-rw-r--r--ds9/parsers/skyviewparser.tac5
-rw-r--r--ds9/parsers/string.fin (renamed from ds9/parsers/base.fin)7
-rw-r--r--ds9/parsers/string.tin1
-rw-r--r--ds9/parsers/threedlex.fcl3
-rw-r--r--ds9/parsers/threedparser.tac5
-rw-r--r--ds9/parsers/tilelex.fcl2
-rw-r--r--ds9/parsers/tileparser.tac6
-rw-r--r--ds9/parsers/twomasslex.fcl3
-rw-r--r--ds9/parsers/twomassparser.tac5
-rw-r--r--ds9/parsers/vlalex.fcl3
-rw-r--r--ds9/parsers/vlaparser.tac5
-rw-r--r--ds9/parsers/vlsslex.fcl3
-rw-r--r--ds9/parsers/vlssparser.tac5
-rw-r--r--ds9/parsers/zoomlex.fcl3
-rw-r--r--ds9/parsers/zoomparser.tac5
-rw-r--r--ds9/parsers/zscalelex.fcl3
-rw-r--r--ds9/parsers/zscaleparser.tac11
41 files changed, 100 insertions, 66 deletions
diff --git a/ds9/parsers/binlex.fcl b/ds9/parsers/binlex.fcl
index f1ebadd..76054e8 100644
--- a/ds9/parsers/binlex.fcl
+++ b/ds9/parsers/binlex.fcl
@@ -28,6 +28,7 @@ sum {return $SUM_}
to {return $TO_}
#include yesno.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/binparser.tac b/ds9/parsers/binparser.tac
index dc04007..a9dfc9d 100644
--- a/ds9/parsers/binparser.tac
+++ b/ds9/parsers/binparser.tac
@@ -2,7 +2,8 @@
%}
#include yesno.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -29,7 +30,7 @@
%%
#include yesno.trl
-#include base.trl
+#include numeric.trl
command : bin
| bin {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/blocklex.fcl b/ds9/parsers/blocklex.fcl
index 272cecb..a5acde7 100644
--- a/ds9/parsers/blocklex.fcl
+++ b/ds9/parsers/blocklex.fcl
@@ -17,6 +17,7 @@ out {return $OUT_}
to {return $TO_}
#include yesno.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/blockparser.tac b/ds9/parsers/blockparser.tac
index b77aaad..b3d5eef 100644
--- a/ds9/parsers/blockparser.tac
+++ b/ds9/parsers/blockparser.tac
@@ -2,7 +2,8 @@
%}
#include yesno.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -18,7 +19,7 @@
%%
#include yesno.trl
-#include base.trl
+#include numeric.trl
command : block
| block {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/cmaplex.fcl b/ds9/parsers/cmaplex.fcl
index 75c0a10..da55b06 100644
--- a/ds9/parsers/cmaplex.fcl
+++ b/ds9/parsers/cmaplex.fcl
@@ -20,6 +20,7 @@ tag {return $TAG_}
value {return $VALUE_}
#include yesno.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/cmapparser.tac b/ds9/parsers/cmapparser.tac
index 5e48072..5327ff6 100644
--- a/ds9/parsers/cmapparser.tac
+++ b/ds9/parsers/cmapparser.tac
@@ -2,7 +2,8 @@
%}
#include yesno.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -21,7 +22,7 @@
%%
#include yesno.trl
-#include base.trl
+#include numeric.trl
command : cmap
| cmap {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/colorbarlex.fcl b/ds9/parsers/colorbarlex.fcl
index c996be6..b243abe 100644
--- a/ds9/parsers/colorbarlex.fcl
+++ b/ds9/parsers/colorbarlex.fcl
@@ -21,6 +21,7 @@ vertical {return $VERTICAL_}
#include yesno.fin
#include font.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/colorbarparser.tac b/ds9/parsers/colorbarparser.tac
index eeffc11..2fbc473 100644
--- a/ds9/parsers/colorbarparser.tac
+++ b/ds9/parsers/colorbarparser.tac
@@ -3,7 +3,8 @@
#include yesno.tin
#include font.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -23,7 +24,7 @@
#include yesno.trl
#include font.trl
-#include base.trl
+#include numeric.trl
command : colorbar
| colorbar {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/croplex.fcl b/ds9/parsers/croplex.fcl
index 6825dfe..d1a02b7 100644
--- a/ds9/parsers/croplex.fcl
+++ b/ds9/parsers/croplex.fcl
@@ -18,7 +18,8 @@ reset {return $RESET_}
#include skyformat.fin
#include skyframe.fin
#include coords.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/cropparser.tac b/ds9/parsers/cropparser.tac
index 7977311..bf5026b 100644
--- a/ds9/parsers/cropparser.tac
+++ b/ds9/parsers/cropparser.tac
@@ -4,7 +4,8 @@
#include skyformat.tin
#include skyframe.tin
#include coords.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -21,7 +22,7 @@
#include skyformat.trl
#include skyframe.trl
#include coords.trl
-#include base.trl
+#include numeric.trl
command : crop
| crop {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/dssesolex.fcl b/ds9/parsers/dssesolex.fcl
index 554d012..bad1e7f 100644
--- a/ds9/parsers/dssesolex.fcl
+++ b/ds9/parsers/dssesolex.fcl
@@ -14,6 +14,7 @@ dss2-infrared {return $DSS2INFRARED_}
#include yesno.fin
#include imgsvr.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/dssesoparser.tac b/ds9/parsers/dssesoparser.tac
index fe26c0a..c51517a 100644
--- a/ds9/parsers/dssesoparser.tac
+++ b/ds9/parsers/dssesoparser.tac
@@ -3,7 +3,8 @@
#include yesno.tin
#include imgsvr.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -16,7 +17,7 @@
#include yesno.trl
#include imgsvr.trl
-#include base.trl
+#include numeric.trl
command : dsseso
| dsseso {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/dsssaolex.fcl b/ds9/parsers/dsssaolex.fcl
index 843fd2f..c3359c3 100644
--- a/ds9/parsers/dsssaolex.fcl
+++ b/ds9/parsers/dsssaolex.fcl
@@ -9,6 +9,7 @@
#include yesno.fin
#include imgsvr.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/dsssaoparser.tac b/ds9/parsers/dsssaoparser.tac
index a41ee1e..9b4cff3 100644
--- a/ds9/parsers/dsssaoparser.tac
+++ b/ds9/parsers/dsssaoparser.tac
@@ -3,7 +3,8 @@
#include yesno.tin
#include imgsvr.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -11,7 +12,7 @@
#include yesno.trl
#include imgsvr.trl
-#include base.trl
+#include numeric.trl
command : dsssao
| dsssao {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/dssstscilex.fcl b/ds9/parsers/dssstscilex.fcl
index f02f926..bbecd3a 100644
--- a/ds9/parsers/dssstscilex.fcl
+++ b/ds9/parsers/dssstscilex.fcl
@@ -19,6 +19,7 @@ phase2_gsc1 {return $GSC1_}
#include yesno.fin
#include imgsvr.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/dssstsciparser.tac b/ds9/parsers/dssstsciparser.tac
index e8b15dc..38e6792 100644
--- a/ds9/parsers/dssstsciparser.tac
+++ b/ds9/parsers/dssstsciparser.tac
@@ -3,7 +3,8 @@
#include yesno.tin
#include imgsvr.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -21,7 +22,7 @@
#include yesno.trl
#include imgsvr.trl
-#include base.trl
+#include numeric.trl
command : dssstsci
| dssstsci {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/numeric.fin b/ds9/parsers/numeric.fin
new file mode 100644
index 0000000..1efd552
--- /dev/null
+++ b/ds9/parsers/numeric.fin
@@ -0,0 +1,7 @@
+# INT
+[+-]?{D}+ {set yylval $yytext; return $INT_}
+
+# REAL
+[+-]?{D}+"."?({E})? |
+[+-]?{D}*"."{D}+({E})? {set yylval $yytext; return $REAL_}
+
diff --git a/ds9/parsers/base.tin b/ds9/parsers/numeric.tin
index f885055..95ac7f9 100644
--- a/ds9/parsers/base.tin
+++ b/ds9/parsers/numeric.tin
@@ -1,3 +1,2 @@
%token INT_
%token REAL_
-%token STRING_
diff --git a/ds9/parsers/base.trl b/ds9/parsers/numeric.trl
index be68c70..be68c70 100644
--- a/ds9/parsers/base.trl
+++ b/ds9/parsers/numeric.trl
diff --git a/ds9/parsers/nvsslex.fcl b/ds9/parsers/nvsslex.fcl
index f809d83..977e916 100644
--- a/ds9/parsers/nvsslex.fcl
+++ b/ds9/parsers/nvsslex.fcl
@@ -9,6 +9,7 @@
#include yesno.fin
#include imgsvr.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/nvssparser.tac b/ds9/parsers/nvssparser.tac
index 34add74..ccd9be0 100644
--- a/ds9/parsers/nvssparser.tac
+++ b/ds9/parsers/nvssparser.tac
@@ -3,7 +3,8 @@
#include yesno.tin
#include imgsvr.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -11,7 +12,7 @@
#include yesno.trl
#include imgsvr.trl
-#include base.trl
+#include numeric.trl
command : nvss
| nvss {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/panlex.fcl b/ds9/parsers/panlex.fcl
index 31f18b1..e6b6738 100644
--- a/ds9/parsers/panlex.fcl
+++ b/ds9/parsers/panlex.fcl
@@ -13,7 +13,8 @@ to {return $TO_}
#include skyframe.fin
#include coords.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/panparser.tac b/ds9/parsers/panparser.tac
index 900275d..487ce0c 100644
--- a/ds9/parsers/panparser.tac
+++ b/ds9/parsers/panparser.tac
@@ -3,7 +3,8 @@
#include skyframe.tin
#include coords.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -15,7 +16,7 @@
#include skyframe.trl
#include coords.trl
-#include base.trl
+#include numeric.trl
command : pan
| pan {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/skyviewlex.fcl b/ds9/parsers/skyviewlex.fcl
index 15af544..415463f 100644
--- a/ds9/parsers/skyviewlex.fcl
+++ b/ds9/parsers/skyviewlex.fcl
@@ -23,6 +23,7 @@ update {return $UPDATE_}
#include yesno.fin
#include imgsvr.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/skyviewparser.tac b/ds9/parsers/skyviewparser.tac
index e9da994..cd052fb 100644
--- a/ds9/parsers/skyviewparser.tac
+++ b/ds9/parsers/skyviewparser.tac
@@ -3,7 +3,8 @@
#include yesno.tin
#include imgsvr.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -13,7 +14,7 @@
#include yesno.trl
#include imgsvr.trl
-#include base.trl
+#include numeric.trl
command : skyview
| skyview {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/base.fin b/ds9/parsers/string.fin
index 6a63cac..5f02bf8 100644
--- a/ds9/parsers/base.fin
+++ b/ds9/parsers/string.fin
@@ -1,10 +1,3 @@
-# INT
-[+-]?{D}+ {set yylval $yytext; return $INT_}
-
-# REAL
-[+-]?{D}+"."?({E})? |
-[+-]?{D}*"."{D}+({E})? {set yylval $yytext; return $REAL_}
-
# Quoted STRING
\"[^\"]*\" {set yylval [string range $yytext 1 end-1]; return $STRING_}
diff --git a/ds9/parsers/string.tin b/ds9/parsers/string.tin
new file mode 100644
index 0000000..fefa662
--- /dev/null
+++ b/ds9/parsers/string.tin
@@ -0,0 +1 @@
+%token STRING_
diff --git a/ds9/parsers/threedlex.fcl b/ds9/parsers/threedlex.fcl
index 0a568fb..ecfe7e3 100644
--- a/ds9/parsers/threedlex.fcl
+++ b/ds9/parsers/threedlex.fcl
@@ -30,6 +30,7 @@ view {return $VIEW_}
vp {return $VIEW_}
#include yesno.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/threedparser.tac b/ds9/parsers/threedparser.tac
index 564adf9..54c95d8 100644
--- a/ds9/parsers/threedparser.tac
+++ b/ds9/parsers/threedparser.tac
@@ -2,7 +2,8 @@
%}
#include yesno.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -27,7 +28,7 @@
%%
#include yesno.trl
-#include base.trl
+#include numeric.trl
command : 3d
| 3d {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/tilelex.fcl b/ds9/parsers/tilelex.fcl
index afcddca..8c94187 100644
--- a/ds9/parsers/tilelex.fcl
+++ b/ds9/parsers/tilelex.fcl
@@ -18,6 +18,6 @@ mode {return $MODE_}
row {return $ROW_}
#include yesno.fin
-#include base.fin
+#include string.fin
%%
diff --git a/ds9/parsers/tileparser.tac b/ds9/parsers/tileparser.tac
index 9276a05..4ef0cef 100644
--- a/ds9/parsers/tileparser.tac
+++ b/ds9/parsers/tileparser.tac
@@ -2,7 +2,8 @@
%}
#include yesno.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -19,8 +20,7 @@
%%
#include yesno.trl
-#include base.trl
-
+#include numeric.trl
yes : YES_ {set _ 1}
| ON_ {set _ 1}
diff --git a/ds9/parsers/twomasslex.fcl b/ds9/parsers/twomasslex.fcl
index 2a0d497..833b1b1 100644
--- a/ds9/parsers/twomasslex.fcl
+++ b/ds9/parsers/twomasslex.fcl
@@ -9,6 +9,7 @@
#include yesno.fin
#include imgsvr.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/twomassparser.tac b/ds9/parsers/twomassparser.tac
index c43ac8b..00f8fbb 100644
--- a/ds9/parsers/twomassparser.tac
+++ b/ds9/parsers/twomassparser.tac
@@ -3,7 +3,8 @@
#include yesno.tin
#include imgsvr.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -11,7 +12,7 @@
#include yesno.trl
#include imgsvr.trl
-#include base.trl
+#include numeric.trl
command : 2mass
| 2mass {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/vlalex.fcl b/ds9/parsers/vlalex.fcl
index a7629e8..b772010 100644
--- a/ds9/parsers/vlalex.fcl
+++ b/ds9/parsers/vlalex.fcl
@@ -12,6 +12,7 @@ first {return $FIRST_}
#include yesno.fin
#include imgsvr.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/vlaparser.tac b/ds9/parsers/vlaparser.tac
index d44d77e..b2a7ca8 100644
--- a/ds9/parsers/vlaparser.tac
+++ b/ds9/parsers/vlaparser.tac
@@ -3,7 +3,8 @@
#include yesno.tin
#include imgsvr.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -14,7 +15,7 @@
#include yesno.trl
#include imgsvr.trl
-#include base.trl
+#include numeric.trl
command : vla
| vla {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/vlsslex.fcl b/ds9/parsers/vlsslex.fcl
index 93bba40..1408972 100644
--- a/ds9/parsers/vlsslex.fcl
+++ b/ds9/parsers/vlsslex.fcl
@@ -9,6 +9,7 @@
#include yesno.fin
#include imgsvr.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/vlssparser.tac b/ds9/parsers/vlssparser.tac
index cbf7ab6..6fcaf1f 100644
--- a/ds9/parsers/vlssparser.tac
+++ b/ds9/parsers/vlssparser.tac
@@ -3,7 +3,8 @@
#include yesno.tin
#include imgsvr.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -11,7 +12,7 @@
#include yesno.trl
#include imgsvr.trl
-#include base.trl
+#include numeric.trl
command : vlss
| vlss {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/zoomlex.fcl b/ds9/parsers/zoomlex.fcl
index f2cfd2c..8a505d4 100644
--- a/ds9/parsers/zoomlex.fcl
+++ b/ds9/parsers/zoomlex.fcl
@@ -14,6 +14,7 @@ open {return $OPEN_}
out {return $OUT_}
to {return $TO_}
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/zoomparser.tac b/ds9/parsers/zoomparser.tac
index 41ad906..df3f7a1 100644
--- a/ds9/parsers/zoomparser.tac
+++ b/ds9/parsers/zoomparser.tac
@@ -1,7 +1,8 @@
%{
%}
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -14,7 +15,7 @@
%%
-#include base.trl
+#include numeric.trl
command : zoom
| zoom {yyclearin; YYACCEPT} STRING_
diff --git a/ds9/parsers/zscalelex.fcl b/ds9/parsers/zscalelex.fcl
index cc30329..062e49f 100644
--- a/ds9/parsers/zscalelex.fcl
+++ b/ds9/parsers/zscalelex.fcl
@@ -12,6 +12,7 @@ sample {return $SAMPLE_}
line {return $LINE_}
#include yesno.fin
-#include base.fin
+#include numeric.fin
+#include string.fin
%%
diff --git a/ds9/parsers/zscaleparser.tac b/ds9/parsers/zscaleparser.tac
index 90a4cf6..573674a 100644
--- a/ds9/parsers/zscaleparser.tac
+++ b/ds9/parsers/zscaleparser.tac
@@ -2,7 +2,8 @@
%}
#include yesno.tin
-#include base.tin
+#include numeric.tin
+#include string.tin
%start command
@@ -13,16 +14,16 @@
%%
#include yesno.trl
-#include base.trl
+#include numeric.trl
command : zscale
| zscale {yyclearin; YYACCEPT} STRING_
;
zscale : yesno {global scale; set scale(mode) zscale; ChangeScaleMode}
- | CONTRAST_ {global zscale; set zscale(contrast) zscale; ChangeZScale}
- | SAMPLE_ {global zscale; set zscale(sample) zscale; ChangeZScale}
- | LINE_ {global zscale; set zscale(line) zscale; ChangeZScale}
+ | 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}
;
%%