blob: 5736183506f1804a54d0415fb334cb17da267fba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
%{
source $ds9(root)/library/parser.tab.tcl
%}
%option noyywrap
%option caseless
%option nodefault
%option nointeractive
%option stack
%option debug
%s CMD
D [0-9]
E [Ee][+-]?{D}+
%%
-2mass {return $::2MASSCMD_}
-3d {return $::3DCMD_}
-align {return $::ALIGNCMD_}
-asinh {return $::ASINHCMD_}
-histequ {return $::HISTEQUCMD_}
-linear {return $::LINEARCMD_}
-log {return $::LOGCMD_}
-pow {return $::POWCMD_}
-scale {return $::SCALECMD_}
-sinh {return $::SINHCMD_}
-squared {return $::SQUAREDCMD_}
-sqrt {return $::SQRTCMD_}
aip {return $::AIP_}
arcmin {return $::ARCMIN_}
arcsec {return $::ARCSEC_}
asinh {return $::ASINH_}
azimuth {return $::AZIMUTH_}
az {return $::AZIMUTH_}
background {return $::BACKGROUND_}
bg {return $::BACKGROUND_}
border {return $::BORDER_}
close {return $::CLOSE_}
color {return $::COLOR_}
compass {return $::COMPASS_}
coord {return $::COORD_}
crosshair {return $::CROSSHAIR_}
current {return $::CURRENT_}
datasec {return $::DATASEC_}
degrees {return $::DEGREES_}
elevation {return $::ELEVATION_}
el {return $::ELEVATION_}
exp {return $::EXP_}
false {return $::FALSE_}
frame {return $::FRAME_}
global {return $::GLOBAL_}
highlite {return $::HIGHLITE_}
histequ {return $::HISTEQU_}
linear {return $::LINEAR_}
limits {return $::LIMITS_}
local {return $::LOCAL_}
lock {return $::LOCK_}
log {return $::LOG_}
match {return $::MATCH_}
method {return $::METHOD_}
minmax {return $::MINMAX_}
mip {return $::MIP_}
mode {return $::MODE_}
name {return $::NAME_}
new {return $::NEW_}
no {return $::NO_}
none {return $::NONE_}
off {return $::OFF_}
on {return $::ON_}
open {return $::OPEN_}
pow {return $::POW_}
save {return $::SAVE_}
scale {return $::SCALE_}
scalelimits {return $::SCALELIMITS_}
scope {return $::SCOPE_}
sexagesimal {return $::SEXAGESIMAL_}
sinh {return $::SINH_}
size {return $::SIZE_}
squared {return $::SQUARED_}
sqrt {return $::SQRT_}
survey {return $::SURVEY_}
true {return $::TRUE_}
update {return $::UPDATE_}
user {return $::USER_}
view {return $::VIEW_}
vp {return $::VIEW_}
yes {return $::YES_}
zscale {return $::ZSCALE_}
zmax {return $::ZMAX_}
# INT
[+-]?{D}+ {set ::yylval $yytext; return $::INT_}
# REAL
[+-]?{D}+"."?({E})? |
[+-]?{D}*"."{D}+({E})? {set ::yylval $yytext; return $::REAL_}
# 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_}
# Quoted STRING
\"[^\"]*\" {set ::yylval [string range $yytext 1 end-1]; return $::STRING_}
# Quoted STRING
\'[^\']*\' {set ::yylval [string range $yytext 1 end-1]; return $::STRING_}
# Quoted STRING
\{[^\}]*\} {set ::yylval [string range $yytext 1 end-1]; return $::STRING_}
# STRING
\S+ {set ::yylval $yytext; return $::STRING_}
\s # ignore whitespace
%%
set ::yy_flex_debug 1
|