diff --git a/source/tbsp.l b/source/tbsp.l index 220d41a..3ad91a6 100644 --- a/source/tbsp.l +++ b/source/tbsp.l @@ -58,7 +58,7 @@ leave[[:space:]] { return LEAVE; } return IDENTIFIER; } \/\/ { BEGIN IN_COMMENT; } -\/\* { BEGIN IN_COMMENT; } +\/\* { BEGIN IN_MULTILINE_COMMENT; } \%\% { BEGIN IN_CODE_SECTION; return SEPARATOR; @@ -71,7 +71,7 @@ leave[[:space:]] { return LEAVE; } } { -. { ; } +.|\n { ; } \*\/ { BEGIN IN_RULE_SECTION; } } diff --git a/test/function_collector.tbsp b/test/function_collector.tbsp index a8ea814..e196d6f 100644 --- a/test/function_collector.tbsp +++ b/test/function_collector.tbsp @@ -11,7 +11,8 @@ %% // this is a comment -/* so is this */ +/* so is this +*/ enter function_definition { char * name = tbget_node_text($$->"declarator"->"declarator"); functions.insert(name);