Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Change ecpg lexer to accept comments with line breaks in CPP lines.
authorMichael Meskes <meskes@postgresql.org>
Tue, 16 Feb 2016 13:23:50 +0000 (14:23 +0100)
committerMichael Meskes <meskes@postgresql.org>
Tue, 16 Feb 2016 13:24:54 +0000 (14:24 +0100)
src/interfaces/ecpg/preproc/pgc.l

index ede45170821919210a29e9e69943653d7596ffa8..397f14ef26fe6d4525a619db7dc41fcfc8b63e71 100644 (file)
@@ -354,7 +354,7 @@ cppinclude_next     {space}*#{include_next}{space}*
 /* first a general line for all commands not starting with "i" */
 /* and then the other commands starting with "i", we have to add these
  * separately because the cppline production would match on "include" too */
-cppline            {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})(.*\\{space})*.*{newline}
+cppline            {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+\/)|.)*{newline}
 
 /*
  * Dollar quoted strings are totally opaque, and no escaping is done on them.