diff options
Diffstat (limited to 'ds9/library/panlex.tcl')
-rw-r--r-- | ds9/library/panlex.tcl | 332 |
1 files changed, 171 insertions, 161 deletions
diff --git a/ds9/library/panlex.tcl b/ds9/library/panlex.tcl index b0c0a5a..8c88019 100644 --- a/ds9/library/panlex.tcl +++ b/ds9/library/panlex.tcl @@ -195,391 +195,398 @@ proc pan::yylex {} { } set yyleng 0 set matched_rule -1 - # rule 0: close - if {[regexp -start $index_ -indices -line -nocase -- {\A(close)} $yy_current_buffer match] > 0 && \ + # rule 0: -zscale + if {[regexp -start $index_ -indices -line -nocase -- {\A(-zscale)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 0 } - # rule 1: open - if {[regexp -start $index_ -indices -line -nocase -- {\A(open)} $yy_current_buffer match] > 0 && \ + # rule 1: close + if {[regexp -start $index_ -indices -line -nocase -- {\A(close)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 1 } - # rule 2: to - if {[regexp -start $index_ -indices -line -nocase -- {\A(to)} $yy_current_buffer match] > 0 && \ + # rule 2: open + if {[regexp -start $index_ -indices -line -nocase -- {\A(open)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 2 } - # rule 3: wcs - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcs)} $yy_current_buffer match] > 0 && \ + # rule 3: to + if {[regexp -start $index_ -indices -line -nocase -- {\A(to)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 3 } - # rule 4: wcsa - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsa)} $yy_current_buffer match] > 0 && \ + # rule 4: wcs + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcs)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 4 } - # rule 5: wcsb - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsb)} $yy_current_buffer match] > 0 && \ + # rule 5: wcsa + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsa)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 5 } - # rule 6: wcsc - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsc)} $yy_current_buffer match] > 0 && \ + # rule 6: wcsb + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsb)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 6 } - # rule 7: wcsd - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsd)} $yy_current_buffer match] > 0 && \ + # rule 7: wcsc + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsc)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 7 } - # rule 8: wcse - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcse)} $yy_current_buffer match] > 0 && \ + # rule 8: wcsd + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsd)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 8 } - # rule 9: wcsf - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsf)} $yy_current_buffer match] > 0 && \ + # rule 9: wcse + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcse)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 9 } - # rule 10: wcsg - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsg)} $yy_current_buffer match] > 0 && \ + # rule 10: wcsf + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsf)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 10 } - # rule 11: wcsh - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsh)} $yy_current_buffer match] > 0 && \ + # rule 11: wcsg + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsg)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 11 } - # rule 12: wcsi - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsi)} $yy_current_buffer match] > 0 && \ + # rule 12: wcsh + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsh)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 12 } - # rule 13: wcsj - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsj)} $yy_current_buffer match] > 0 && \ + # rule 13: wcsi + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsi)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 13 } - # rule 14: wcsk - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsk)} $yy_current_buffer match] > 0 && \ + # rule 14: wcsj + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsj)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 14 } - # rule 15: wcsl - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsl)} $yy_current_buffer match] > 0 && \ + # rule 15: wcsk + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsk)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 15 } - # rule 16: wcsm - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsm)} $yy_current_buffer match] > 0 && \ + # rule 16: wcsl + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsl)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 16 } - # rule 17: wcsn - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsn)} $yy_current_buffer match] > 0 && \ + # rule 17: wcsm + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsm)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 17 } - # rule 18: wcso - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcso)} $yy_current_buffer match] > 0 && \ + # rule 18: wcsn + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsn)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 18 } - # rule 19: wcsp - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsp)} $yy_current_buffer match] > 0 && \ + # rule 19: wcso + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcso)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 19 } - # rule 20: wcsq - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsq)} $yy_current_buffer match] > 0 && \ + # rule 20: wcsp + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsp)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 20 } - # rule 21: wcsr - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsr)} $yy_current_buffer match] > 0 && \ + # rule 21: wcsq + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsq)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 21 } - # rule 22: wcss - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcss)} $yy_current_buffer match] > 0 && \ + # rule 22: wcsr + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsr)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 22 } - # rule 23: wcst - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcst)} $yy_current_buffer match] > 0 && \ + # rule 23: wcss + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcss)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 23 } - # rule 24: wcsu - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsu)} $yy_current_buffer match] > 0 && \ + # rule 24: wcst + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcst)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 24 } - # rule 25: wcsv - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsv)} $yy_current_buffer match] > 0 && \ + # rule 25: wcsu + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsu)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 25 } - # rule 26: wcsw - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsw)} $yy_current_buffer match] > 0 && \ + # rule 26: wcsv + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsv)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 26 } - # rule 27: wcsx - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsx)} $yy_current_buffer match] > 0 && \ + # rule 27: wcsw + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsw)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 27 } - # rule 28: wcsy - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsy)} $yy_current_buffer match] > 0 && \ + # rule 28: wcsx + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsx)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 28 } - # rule 29: wcsz - if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsz)} $yy_current_buffer match] > 0 && \ + # rule 29: wcsy + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsy)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 29 } - # rule 30: image - if {[regexp -start $index_ -indices -line -nocase -- {\A(image)} $yy_current_buffer match] > 0 && \ + # rule 30: wcsz + if {[regexp -start $index_ -indices -line -nocase -- {\A(wcsz)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 30 } - # rule 31: physical - if {[regexp -start $index_ -indices -line -nocase -- {\A(physical)} $yy_current_buffer match] > 0 && \ + # rule 31: image + if {[regexp -start $index_ -indices -line -nocase -- {\A(image)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 31 } - # rule 32: amplifier - if {[regexp -start $index_ -indices -line -nocase -- {\A(amplifier)} $yy_current_buffer match] > 0 && \ + # rule 32: physical + if {[regexp -start $index_ -indices -line -nocase -- {\A(physical)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 32 } - # rule 33: detector - if {[regexp -start $index_ -indices -line -nocase -- {\A(detector)} $yy_current_buffer match] > 0 && \ + # rule 33: amplifier + if {[regexp -start $index_ -indices -line -nocase -- {\A(amplifier)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 33 } - # rule 34: fk4 - if {[regexp -start $index_ -indices -line -nocase -- {\A(fk4)} $yy_current_buffer match] > 0 && \ + # rule 34: detector + if {[regexp -start $index_ -indices -line -nocase -- {\A(detector)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 34 } - # rule 35: b1950 - if {[regexp -start $index_ -indices -line -nocase -- {\A(b1950)} $yy_current_buffer match] > 0 && \ + # rule 35: fk4 + if {[regexp -start $index_ -indices -line -nocase -- {\A(fk4)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 35 } - # rule 36: fk5 - if {[regexp -start $index_ -indices -line -nocase -- {\A(fk5)} $yy_current_buffer match] > 0 && \ + # rule 36: b1950 + if {[regexp -start $index_ -indices -line -nocase -- {\A(b1950)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 36 } - # rule 37: j2000 - if {[regexp -start $index_ -indices -line -nocase -- {\A(j2000)} $yy_current_buffer match] > 0 && \ + # rule 37: fk5 + if {[regexp -start $index_ -indices -line -nocase -- {\A(fk5)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 37 } - # rule 38: galactic - if {[regexp -start $index_ -indices -line -nocase -- {\A(galactic)} $yy_current_buffer match] > 0 && \ + # rule 38: j2000 + if {[regexp -start $index_ -indices -line -nocase -- {\A(j2000)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 38 } - # rule 39: ecliptic - if {[regexp -start $index_ -indices -line -nocase -- {\A(ecliptic)} $yy_current_buffer match] > 0 && \ + # rule 39: galactic + if {[regexp -start $index_ -indices -line -nocase -- {\A(galactic)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 39 } - # rule 40: [+-]?{D}+ - if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+)} $yy_current_buffer match] > 0 && \ + # rule 40: ecliptic + if {[regexp -start $index_ -indices -line -nocase -- {\A(ecliptic)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 40 } - # rule 41: [+-]?{D}+\.?({E})? - if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+\.?(([Ee][+-]?([0-9])+))?)} $yy_current_buffer match] > 0 && \ + # rule 41: [+-]?{D}+ + if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 41 } - # rule 42: [+-]?{D}*\.{D}+({E})? - if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])*\.([0-9])+(([Ee][+-]?([0-9])+))?)} $yy_current_buffer match] > 0 && \ + # rule 42: [+-]?{D}+\.?({E})? + if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+\.?(([Ee][+-]?([0-9])+))?)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 42 } - # rule 43: [+-]?{D}+:{D}+:{D}+\.? - if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+:([0-9])+:([0-9])+\.?)} $yy_current_buffer match] > 0 && \ + # rule 43: [+-]?{D}*\.{D}+({E})? + if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])*\.([0-9])+(([Ee][+-]?([0-9])+))?)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 43 } - # rule 44: [+-]?{D}+:{D}+:{D}*\.{D}+ - if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+:([0-9])+:([0-9])*\.([0-9])+)} $yy_current_buffer match] > 0 && \ + # rule 44: [+-]?{D}+:{D}+:{D}+\.? + if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+:([0-9])+:([0-9])+\.?)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 44 } - # rule 45: [+-]?{D}+h{D}+m{D}+\.?s - if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+h([0-9])+m([0-9])+\.?s)} $yy_current_buffer match] > 0 && \ + # rule 45: [+-]?{D}+:{D}+:{D}*\.{D}+ + if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+:([0-9])+:([0-9])*\.([0-9])+)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 45 } - # rule 46: [+-]?{D}+h{D}+m{D}*\.{D}+s - if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+h([0-9])+m([0-9])*\.([0-9])+s)} $yy_current_buffer match] > 0 && \ + # rule 46: [+-]?{D}+h{D}+m{D}+\.?s + if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+h([0-9])+m([0-9])+\.?s)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 46 } - # rule 47: [+-]?{D}+d{D}+m{D}+\.?s - if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+d([0-9])+m([0-9])+\.?s)} $yy_current_buffer match] > 0 && \ + # rule 47: [+-]?{D}+h{D}+m{D}*\.{D}+s + if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+h([0-9])+m([0-9])*\.([0-9])+s)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 47 } - # rule 48: [+-]?{D}+d{D}+m{D}*\.{D}+s - if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+d([0-9])+m([0-9])*\.([0-9])+s)} $yy_current_buffer match] > 0 && \ + # rule 48: [+-]?{D}+d{D}+m{D}+\.?s + if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+d([0-9])+m([0-9])+\.?s)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 48 } - # rule 49: \"[^\"]*\" - if {[regexp -start $index_ -indices -line -nocase -- {\A(\"[^\"]*\")} $yy_current_buffer match] > 0 && \ + # rule 49: [+-]?{D}+d{D}+m{D}*\.{D}+s + if {[regexp -start $index_ -indices -line -nocase -- {\A([+-]?([0-9])+d([0-9])+m([0-9])*\.([0-9])+s)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 49 } - # rule 50: \'[^\']*\' - if {[regexp -start $index_ -indices -line -nocase -- {\A(\'[^\']*\')} $yy_current_buffer match] > 0 && \ + # rule 50: \"[^\"]*\" + if {[regexp -start $index_ -indices -line -nocase -- {\A(\"[^\"]*\")} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 50 } - # rule 51: \{[^\}]*\} - if {[regexp -start $index_ -indices -line -nocase -- {\A(\{[^\}]*\})} $yy_current_buffer match] > 0 && \ + # rule 51: \'[^\']*\' + if {[regexp -start $index_ -indices -line -nocase -- {\A(\'[^\']*\')} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 51 } - # rule 52: \S+\S+ - if {[regexp -start $index_ -indices -line -nocase -- {\A(\S+\S+)} $yy_current_buffer match] > 0 && \ + # rule 52: \{[^\}]*\} + if {[regexp -start $index_ -indices -line -nocase -- {\A(\{[^\}]*\})} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 52 } - # rule 53: \s - if {[regexp -start $index_ -indices -line -nocase -- {\A(\s)} $yy_current_buffer match] > 0 && \ + # rule 53: \S+\S+ + if {[regexp -start $index_ -indices -line -nocase -- {\A(\S+\S+)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 53 } - # rule 54: . - if {[regexp -start $index_ -indices -line -nocase -- {\A(.)} $yy_current_buffer match] > 0 && \ + # rule 54: \s + if {[regexp -start $index_ -indices -line -nocase -- {\A(\s)} $yy_current_buffer match] > 0 && \ [lindex $match 1] - $index_ + 1 > $yyleng} { set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] set yyleng [string length $yytext] set matched_rule 54 } + # rule 55: . + if {[regexp -start $index_ -indices -line -nocase -- {\A(.)} $yy_current_buffer match] > 0 && \ + [lindex $match 1] - $index_ + 1 > $yyleng} { + set yytext [string range $yy_current_buffer $index_ [lindex $match 1]] + set yyleng [string length $yytext] + set matched_rule 55 + } if {$matched_rule == -1} { set yytext [string index $yy_current_buffer $index_] set yyleng 1 @@ -593,146 +600,146 @@ proc pan::yylex {} { set numlines [expr {[llength [split $yytext "\n"]] - 1}] switch -- $matched_rule { 0 { -return $pan::CLOSE_ +return $pan::CMD_ } 1 { -return $pan::OPEN_ +return $pan::CLOSE_ } 2 { -return $pan::TO_ +return $pan::OPEN_ } 3 { -return $pan::WCS_ +return $pan::TO_ } 4 { -return $pan::WCSA_ +return $pan::WCS_ } 5 { -return $pan::WCSB_ +return $pan::WCSA_ } 6 { -return $pan::WCSC_ +return $pan::WCSB_ } 7 { -return $pan::WCSD_ +return $pan::WCSC_ } 8 { -return $pan::WCSE_ +return $pan::WCSD_ } 9 { -return $pan::WCSF_ +return $pan::WCSE_ } 10 { -return $pan::WCSG_ +return $pan::WCSF_ } 11 { -return $pan::WCSH_ +return $pan::WCSG_ } 12 { -return $pan::WCSI_ +return $pan::WCSH_ } 13 { -return $pan::WCSJ_ +return $pan::WCSI_ } 14 { -return $pan::WCSK_ +return $pan::WCSJ_ } 15 { -return $pan::WCSL_ +return $pan::WCSK_ } 16 { -return $pan::WCSM_ +return $pan::WCSL_ } 17 { -return $pan::WCSN_ +return $pan::WCSM_ } 18 { -return $pan::WCSO_ +return $pan::WCSN_ } 19 { -return $pan::WCSP_ +return $pan::WCSO_ } 20 { -return $pan::WCSQ_ +return $pan::WCSP_ } 21 { -return $pan::WCSR_ +return $pan::WCSQ_ } 22 { -return $pan::WCSS_ +return $pan::WCSR_ } 23 { -return $pan::WCST_ +return $pan::WCSS_ } 24 { -return $pan::WCSU_ +return $pan::WCST_ } 25 { -return $pan::WCSV_ +return $pan::WCSU_ } 26 { -return $pan::WCSW_ +return $pan::WCSV_ } 27 { -return $pan::WCSX_ +return $pan::WCSW_ } 28 { -return $pan::WCSY_ +return $pan::WCSX_ } 29 { -return $pan::WCSZ_ +return $pan::WCSY_ } 30 { -return $pan::IMAGE_ +return $pan::WCSZ_ } 31 { -return $pan::PHYSICAL_ +return $pan::IMAGE_ } 32 { -return $pan::AMPLIFIER_ +return $pan::PHYSICAL_ } 33 { -return $pan::DETECTOR_ +return $pan::AMPLIFIER_ } 34 { -return $pan::FK4_ +return $pan::DETECTOR_ } 35 { return $pan::FK4_ } 36 { -return $pan::FK5_ +return $pan::FK4_ } 37 { return $pan::FK5_ } 38 { -return $pan::GALACTIC_ +return $pan::FK5_ } 39 { -return $pan::ECLIPTIC_ +return $pan::GALACTIC_ } 40 { +return $pan::ECLIPTIC_ + } + 41 { set pan::yylval $yytext; return $pan::INT_ } - 41 - - 42 { + 42 - + 43 { set pan::yylval $yytext; return $pan::REAL_ } - 43 - - 44 { + 44 - + 45 { set pan::yylval $yytext; return $pan::SEXSTR_ } - 45 - - 46 { + 46 - + 47 { set pan::yylval $yytext; return $pan::HMSSTR_ } - 47 - - 48 { -set pan::yylval $yytext; return $pan::SMSSTR_ - } + 48 - 49 { -set pan::yylval [string range $yytext 1 end-1]; return $pan::STRING_ +set pan::yylval $yytext; return $pan::SMSSTR_ } 50 { set pan::yylval [string range $yytext 1 end-1]; return $pan::STRING_ @@ -741,12 +748,15 @@ set pan::yylval [string range $yytext 1 end-1]; return $pan::STRING_ set pan::yylval [string range $yytext 1 end-1]; return $pan::STRING_ } 52 { -set pan::yylval $yytext; return $pan::STRING_ +set pan::yylval [string range $yytext 1 end-1]; return $pan::STRING_ } 53 { -# ignore whitespace +set pan::yylval $yytext; return $pan::STRING_ } 54 { +# ignore whitespace + } + 55 { set pan::yylval $yytext; return $pan::yylval } default |