summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/sexstr.fin
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-06-08 15:35:05 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-06-08 15:35:05 (GMT)
commita287596f8318385c78aa2ea58ad396afce34b443 (patch)
tree8e791b16d481c3af3458c06eaec0ccd90c7e74fb /ds9/parsers/sexstr.fin
parentaebd92373d50b5089581be371cfae3b90fab6c04 (diff)
downloadblt-a287596f8318385c78aa2ea58ad396afce34b443.zip
blt-a287596f8318385c78aa2ea58ad396afce34b443.tar.gz
blt-a287596f8318385c78aa2ea58ad396afce34b443.tar.bz2
update ds9 parsers
Diffstat (limited to 'ds9/parsers/sexstr.fin')
-rw-r--r--ds9/parsers/sexstr.fin11
1 files changed, 11 insertions, 0 deletions
diff --git a/ds9/parsers/sexstr.fin b/ds9/parsers/sexstr.fin
new file mode 100644
index 0000000..6a91acc
--- /dev/null
+++ b/ds9/parsers/sexstr.fin
@@ -0,0 +1,11 @@
+# SEXAGESIMAL
+[+-]?{D}+:{D}+:{D}+"."? |
+[+-]?{D}+:{D}+:{D}*"."{D}+ {set yylval $yytext; return $SEXSTR_}
+
+# HMS
+[+-]?{D}+h{D}+m{D}+"."?s |
+[+-]?{D}+h{D}+m{D}*"."{D}+s {set yylval $yytext; return $HMSSTR_}
+
+# DMS
+[+-]?{D}+d{D}+m{D}+"."?s |
+[+-]?{D}+d{D}+m{D}*"."{D}+s {set yylval $yytext; return $SMSSTR_}