Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fc1ae7d

Browse files
author
Michael Meskes
committed
Change ecpg lexer to accept comments with line breaks in CPP lines.
1 parent bdc309c commit fc1ae7d

File tree

1 file changed

+1
-1
lines changed
  • src/interfaces/ecpg/preproc

1 file changed

+1
-1
lines changed

src/interfaces/ecpg/preproc/pgc.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ cppinclude_next {space}*#{include_next}{space}*
354354
/* first a general line for all commands not starting with "i" */
355355
/* and then the other commands starting with "i", we have to add these
356356
* separately because the cppline production would match on "include" too */
357-
cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})(.*\\{space})*.*{newline}
357+
cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+\/)|.)*{newline}
358358

359359
/*
360360
* Dollar quoted strings are totally opaque, and no escaping is done on them.

0 commit comments

Comments
 (0)