diff options
author | Anders Magnusson <ragge@cvs.openbsd.org> | 2008-08-18 20:54:11 +0000 |
---|---|---|
committer | Anders Magnusson <ragge@cvs.openbsd.org> | 2008-08-18 20:54:11 +0000 |
commit | 818b1964c08fb132a1747d3214872b2f8fbbdf24 (patch) | |
tree | 3302b5f21f30158939ed22b2401fa6cab589909e /usr.bin/pcc/cpp/scanner.l | |
parent | 5e62f8ce615c4a1321b8f031c70bf4e1812be09b (diff) |
Updates from master repo: Fix two bugs reported by Art Grabowski.
Diffstat (limited to 'usr.bin/pcc/cpp/scanner.l')
-rw-r--r-- | usr.bin/pcc/cpp/scanner.l | 11 |
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:; } %% |