From ee5175fefc56a10665b77c59fdae814ca5328faf Mon Sep 17 00:00:00 2001 From: Samuel Pastva Date: Wed, 4 Jan 2017 11:17:38 +0100 Subject: [PATCH] final comment fix --- src/main/antlr/com/github/sybila/ctl/antlr/CTL.g4 | 4 ++-- src/main/antlr/com/github/sybila/huctl/antlr/HUCTL.g4 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/antlr/com/github/sybila/ctl/antlr/CTL.g4 b/src/main/antlr/com/github/sybila/ctl/antlr/CTL.g4 index 027945d..be73d05 100755 --- a/src/main/antlr/com/github/sybila/ctl/antlr/CTL.g4 +++ b/src/main/antlr/com/github/sybila/ctl/antlr/CTL.g4 @@ -100,5 +100,5 @@ NEWLINE : '\r'?'\n'; WS : [ \t]+ -> channel(HIDDEN) ; Block_comment : '/*' (Block_comment|.)*? '*/' -> channel(HIDDEN) ; // nesting allow -C_Line_comment : '//' ~('\n')* -> channel(HIDDEN) ; -Python_Line_comment : '#' ~('\n')* -> channel(HIDDEN) ; \ No newline at end of file +C_Line_comment : '//' ~('\n'|'\r')* -> channel(HIDDEN) ; +Python_Line_comment : '#' ~('\n'|'\r')* -> channel(HIDDEN) ; \ No newline at end of file diff --git a/src/main/antlr/com/github/sybila/huctl/antlr/HUCTL.g4 b/src/main/antlr/com/github/sybila/huctl/antlr/HUCTL.g4 index 5a351ad..2cfc482 100644 --- a/src/main/antlr/com/github/sybila/huctl/antlr/HUCTL.g4 +++ b/src/main/antlr/com/github/sybila/huctl/antlr/HUCTL.g4 @@ -147,5 +147,5 @@ NEWLINE : '\r'?'\n'; WS : [ \t]+ -> channel(HIDDEN) ; Block_comment : '/*' (Block_comment|.)*? '*/' -> channel(HIDDEN) ; // nesting allow -C_Line_comment : '//' .*? ('\n' | EOF) -> channel(HIDDEN) ; -Python_Line_comment : '#' .*? ('\n' | EOF) -> channel(HIDDEN) ; \ No newline at end of file +C_Line_comment : '//' ~('\n'|'\r')* -> channel(HIDDEN) ; +Python_Line_comment : '#' ~('\n'|'\r')* -> channel(HIDDEN) ; \ No newline at end of file