Mercurial > hg > octave-lyh
diff src/lex.l @ 5279:bd32f770c09a
[project @ 2005-04-12 21:55:31 by jwe]
author | jwe |
---|---|
date | Tue, 12 Apr 2005 21:55:31 +0000 |
parents | 6434e63553f0 |
children | 41273fff034d |
line wrap: on
line diff
--- a/src/lex.l +++ b/src/lex.l @@ -321,7 +321,7 @@ <COMMAND_START>[\;\,] { if (lexer_flags.doing_rawcommand) - TOK_PUSH_AND_RETURN (yytext, STRING); + TOK_PUSH_AND_RETURN (yytext, SQ_STRING); BEGIN (INITIAL); @@ -338,7 +338,7 @@ <COMMAND_START>[^#% \t\r\n\;\,\"\'][^ \t\r\n\;\,]*{S}* { std::string tok = strip_trailing_whitespace (yytext); - TOK_PUSH_AND_RETURN (tok, STRING); + TOK_PUSH_AND_RETURN (tok, SQ_STRING); } %{ @@ -1983,7 +1983,7 @@ std::string s; yyunput (c, yytext); buf << OSSTREAM_ENDS; - if (lexer_flags.doing_rawcommand) + if (lexer_flags.doing_rawcommand || delim == '\'') s = OSSTREAM_STR (buf); else s = do_string_escapes (OSSTREAM_STR(buf)); @@ -2005,7 +2005,7 @@ else if (delim == '\'') gripe_single_quote_string (); - return STRING; + return delim == '"' ? DQ_STRING : SQ_STRING; } } }