diff --git a/TODO.TXT b/TODO.TXT index ed861b3..976313c 100644 --- a/TODO.TXT +++ b/TODO.TXT @@ -1,4 +1,4 @@ - resolve all TODO in source codes +X resolve all TODO in source codes remove f16/f32/f64 types partial code generation for C (divide decls and functions) release v1.0.1 diff --git a/biner.l b/biner.l index c98bf4b..a58ce7c 100644 --- a/biner.l +++ b/biner.l @@ -20,11 +20,18 @@ D [0-9] I [A-Za-z_] H [0-9A-Fa-f] +%x IN_COMMENT + %% [ \t\r\n]+ count_(); "//".* count_(); -[/][*][^*]*[*]+([^*/][^*]*[*]+)*[/] count_(); /* TODO: detect unterminated comment */ + +"/*" { count_(); BEGIN(IN_COMMENT); } +"*/" { count_(); BEGIN(INITIAL); } +[^\*\n]+ count_(); +"*" count_(); +"\n" count_(); "==" { count_(); return EQUAL; } "!=" { count_(); return NEQUAL; }