From aefab5110bd5ddf2b3906493b1bce676596937ce Mon Sep 17 00:00:00 2001 From: aet Date: Mon, 25 Aug 2003 09:29:42 +0000 Subject: [PATCH] Add fix by Olaf to handle CRLF style text files as well git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1390 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/scconf/lex-parse.l | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scconf/lex-parse.l b/src/scconf/lex-parse.l index 7e28350d..39b5ffe9 100644 --- a/src/scconf/lex-parse.l +++ b/src/scconf/lex-parse.l @@ -36,17 +36,17 @@ static scconf_parser *parser; %% -"#"[^\n]* scconf_parse_token(parser, TOKEN_TYPE_COMMENT, yytext); +"#"[^\r\n]* scconf_parse_token(parser, TOKEN_TYPE_COMMENT, yytext); \n scconf_parse_token(parser, TOKEN_TYPE_NEWLINE, NULL); -[ \t]+ /* eat up whitespace */ +[ \t\r]+ /* eat up whitespace */ [,{}=;] scconf_parse_token(parser, TOKEN_TYPE_PUNCT, yytext); -\"[^\"\n]*[\"\n] scconf_parse_token(parser, TOKEN_TYPE_STRING, yytext); +\"[^\"\n\r]*\r*[\"\n] scconf_parse_token(parser, TOKEN_TYPE_STRING, yytext); -[^;, \t\n]+ scconf_parse_token(parser, TOKEN_TYPE_STRING, yytext); +[^;, \t\r\n]+ scconf_parse_token(parser, TOKEN_TYPE_STRING, yytext); %%