summaryrefslogtreecommitdiff
path: root/usr.bin/pcc/cpp/scanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/pcc/cpp/scanner.l')
-rw-r--r--usr.bin/pcc/cpp/scanner.l11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.bin/pcc/cpp/scanner.l b/usr.bin/pcc/cpp/scanner.l
index c22e08a54b4..c2e94b4d5b1 100644
--- a/usr.bin/pcc/cpp/scanner.l
+++ b/usr.bin/pcc/cpp/scanner.l
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: scanner.l,v 1.10 2008/08/17 18:40:13 ragge Exp $ */
+/* $OpenBSD: scanner.l,v 1.11 2008/08/18 20:54:10 ragge Exp $ */
/*
* Copyright (c) 2004 Anders Magnusson. All rights reserved.
@@ -313,6 +313,14 @@ L?\"(\\.|[^\\"])*\" { PRTOUT(STRING); }
}
. {
+ if (contr) {
+ while (input() != '\n')
+ ;
+ unput('\n');
+ BEGIN 0;
+ contr = 0;
+ goto yy;
+ }
if (YYSTATE || slow)
return yytext[0];
if (yytext[0] == 6) { /* PRAGS */
@@ -327,6 +335,7 @@ L?\"(\\.|[^\\"])*\" { PRTOUT(STRING); }
} else {
PRTOUT(yytext[0]);
}
+ yy:;
}
%%