GraphPlanar: Fix the highlighter.

Comment used to be ignored. They are now in the Hidden channel.
This commit is contained in:
ArthurSonzogni
2023-05-08 17:45:59 +02:00
parent 4badcfceff
commit 3a4a549c17
2 changed files with 8 additions and 5 deletions
+3
View File
@@ -5,5 +5,8 @@
- See CVE-2023-31194. Do not add twice an edge in the graph. This caused Boost
algorithms to misbehave.
## Bug fix
- Fix highlighter for the GraphPlanar translator.
## Build
- Set MSVC_RUNTIME_LIBRARY to /MT for static builds
+5 -5
View File
@@ -1,5 +1,10 @@
grammar GraphPlanar;
// Ignored TOKENS
WS: [ \t]+ -> channel(HIDDEN);
COMMENT: '/*' .*? '*/' -> channel(HIDDEN);
LINE_COMMENT: '//' .*? ('\r'? '\n' | EOF) -> channel(HIDDEN);
graph: EOL* edges (EOL+ edges)* EOL* EOF;
edges: node (arrow node)+;
arrow: RIGHT_ARROW | NONE_ARROW | LEFT_RIGHT_ARROW | LEFT_ARROW;
@@ -16,9 +21,4 @@ fragment LETTER: ~[ \t\n\r\-<>"];
EOL: '\r\n' | '\n';
// Ignored TOKENS
WS: [ \t] -> skip;
COMMENT: '/*' .*? '*/' -> skip;
LINE_COMMENT: '//' .*? '\r'? '\n' -> skip;
// vim: filetype=antlr