c3.l grammar fixed.

This commit is contained in:
Christoffer Lerno
2024-10-14 12:37:53 +02:00
parent 31cd839063
commit f37f1769ae

View File

@@ -29,7 +29,7 @@ HINT {H}(_?{H})*
OINT {O}(_?{O})* OINT {O}(_?{O})*
BINT {B}(_?{B})* BINT {B}(_?{B})*
%x COMMENT RAW_STRING %x COMMENT CONTRACT_DOC RAW_STRING
%{ %{
#include <stdio.h> #include <stdio.h>
@@ -105,6 +105,12 @@ typedef struct {
[/] { } [/] { }
\n { } \n { }
} }
"<*" { BEGIN(CONTRACT_DOC); }
<CONTRACT_DOC>{
"*>" { BEGIN(INITIAL); }
"*" { }
[^*]+ { }
}
\/\/.* { } \/\/.* { }
"any" { return(ANY); } "any" { return(ANY); }
"anyfault" { return(ANYFAULT); } "anyfault" { return(ANYFAULT); }