From f37f1769aeb6e7362a3c925a2b2447ad3eea6041 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Mon, 14 Oct 2024 12:37:53 +0200 Subject: [PATCH] c3.l grammar fixed. --- resources/grammar/c3.l | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/grammar/c3.l b/resources/grammar/c3.l index 4dfc2de78..e942eb13f 100644 --- a/resources/grammar/c3.l +++ b/resources/grammar/c3.l @@ -29,7 +29,7 @@ HINT {H}(_?{H})* OINT {O}(_?{O})* BINT {B}(_?{B})* -%x COMMENT RAW_STRING +%x COMMENT CONTRACT_DOC RAW_STRING %{ #include @@ -105,6 +105,12 @@ typedef struct { [/] { } \n { } } +"<*" { BEGIN(CONTRACT_DOC); } +{ + "*>" { BEGIN(INITIAL); } + "*" { } + [^*]+ { } +} \/\/.* { } "any" { return(ANY); } "anyfault" { return(ANYFAULT); }