diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-07-07 19:38:46 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-07-07 19:38:46 (GMT) |
commit | 8e9a3390fc8daf5626cb006904bac5ff3700dbf2 (patch) | |
tree | 02e94ccc4e3628ab3d1fe723b6520b4d96a1464b /ds9 | |
parent | 357b16a4562dd55303d0914056b29304ab5a789f (diff) | |
download | blt-8e9a3390fc8daf5626cb006904bac5ff3700dbf2.zip blt-8e9a3390fc8daf5626cb006904bac5ff3700dbf2.tar.gz blt-8e9a3390fc8daf5626cb006904bac5ff3700dbf2.tar.bz2 |
update parser
Diffstat (limited to 'ds9')
-rw-r--r-- | ds9/library/lex.fcl | 10 | ||||
-rw-r--r-- | ds9/library/parser.tac | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ds9/library/lex.fcl b/ds9/library/lex.fcl index 03ab914..9e0c1a1 100644 --- a/ds9/library/lex.fcl +++ b/ds9/library/lex.fcl @@ -6,6 +6,8 @@ source $ds9(root)/library/parser.tab.tcl %option caseless %option nodefault %option nointeractive +%option stack +%option debug D [0-9] E [Ee][+-]?{D}+ @@ -115,12 +117,10 @@ zmax {return $::ZMAX_} \{[^\}]*\} {set ::yylval [string range $yytext 1 end-1]; return $::STRING_} # STRING -# at least 2 printable chars -[!-~][!-~]+ {set ::yylval $yytext; return $::STRING_} +\S+ {set ::yylval $yytext; return $::STRING_} -\n # ignore return \s # ignore whitespace -. {set ::yylval $yytext; return $yytext} - +%% +set ::yy_flex_debug 1 diff --git a/ds9/library/parser.tac b/ds9/library/parser.tac index 68183ae..8568285 100644 --- a/ds9/library/parser.tac +++ b/ds9/library/parser.tac @@ -96,7 +96,7 @@ command : 2MASSCMD_ {2MASSDialog} 2mass | SQUAREDCMD_ {global scale; set scale(type) squared; ChangeScale} | SQRTCMD_ {global scale; set scale(type) sqrt; ChangeScale} | SCALECMD_ scale - | STRING_ {puts "STRING: $::yylval"} + | STRING_ {puts " STRING: $::yylval"} ; numeric : REAL_ {set _ $1} |