mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
c3.l grammar fixed.
This commit is contained in:
@@ -29,7 +29,7 @@ HINT {H}(_?{H})*
|
||||
OINT {O}(_?{O})*
|
||||
BINT {B}(_?{B})*
|
||||
|
||||
%x COMMENT RAW_STRING
|
||||
%x COMMENT CONTRACT_DOC RAW_STRING
|
||||
|
||||
%{
|
||||
#include <stdio.h>
|
||||
@@ -105,6 +105,12 @@ typedef struct {
|
||||
[/] { }
|
||||
\n { }
|
||||
}
|
||||
"<*" { BEGIN(CONTRACT_DOC); }
|
||||
<CONTRACT_DOC>{
|
||||
"*>" { BEGIN(INITIAL); }
|
||||
"*" { }
|
||||
[^*]+ { }
|
||||
}
|
||||
\/\/.* { }
|
||||
"any" { return(ANY); }
|
||||
"anyfault" { return(ANYFAULT); }
|
||||
|
||||
Reference in New Issue
Block a user