diff options
-rw-r--r-- | source4/build/pidl/idl.yp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source4/build/pidl/idl.yp b/source4/build/pidl/idl.yp index f780c99662..13f9b05df4 100644 --- a/source4/build/pidl/idl.yp +++ b/source4/build/pidl/idl.yp @@ -247,7 +247,8 @@ sub _Error { print "Syntax error at $file:$line near '$last_token'\n"; } -sub _Lexer { +sub _Lexer($) +{ my($parser)=shift; $parser->YYData->{INPUT} @@ -257,9 +258,12 @@ again: $parser->YYData->{INPUT} =~ s/^[ \t]*//; for ($parser->YYData->{INPUT}) { - if (s/^\# (\d+) \"(.*?)\"( \d+|)//) { - $parser->YYData->{LINE} = $1; - $parser->YYData->{INPUT_FILENAME} = $2; + if (/^\#/) { + if (s/^\# (\d+) \"(.*?)\"( \d+|)//) { + $parser->YYData->{LINE} = $1-1; + $parser->YYData->{INPUT_FILENAME} = $2; + goto again; + } goto again; } if (s/^(\n)//) { |