summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/coords.fin
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-03-03 22:52:28 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-03-03 22:52:28 (GMT)
commite7b4d65a7d83358bf1647547112e4b48b830ea76 (patch)
treebe1e99a034db5bd35c8b815d86ba1ce1bd8dcd79 /ds9/parsers/coords.fin
parent1d6ba2b117bdf94a16402ae8e380c6dd9e10ef51 (diff)
downloadblt-e7b4d65a7d83358bf1647547112e4b48b830ea76.zip
blt-e7b4d65a7d83358bf1647547112e4b48b830ea76.tar.gz
blt-e7b4d65a7d83358bf1647547112e4b48b830ea76.tar.bz2
simplify ds9 parsers
Diffstat (limited to 'ds9/parsers/coords.fin')
-rw-r--r--ds9/parsers/coords.fin12
1 files changed, 12 insertions, 0 deletions
diff --git a/ds9/parsers/coords.fin b/ds9/parsers/coords.fin
index 3c72e46..394be49 100644
--- a/ds9/parsers/coords.fin
+++ b/ds9/parsers/coords.fin
@@ -38,3 +38,15 @@ j2000 {return $FK5_}
galactic {return $GALACTIC_}
ecliptic {return $ECLIPTIC_}
+# 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_}
+