* Break-out RFC 7950 Section 6.1 tokenization

* This enables full string lexical parsing of some rules previously not fully compliant, including:
    * refine
    * user-augment
    * if-feature
  * Also solves previous tokenization issues
This commit is contained in:
Olof hagsand 2022-07-22 09:17:43 +02:00
parent f9eacebf68
commit 9d65fb81d7
21 changed files with 811 additions and 218 deletions

View file

@ -94,7 +94,6 @@ int clixon_text_syntax_parsewrap(void)
<INITIAL>[^\n\r \t\[\]\{\}\;\"]+ {
clixon_text_syntax_parselval.string = strdup(yytext);
return TOKEN; }
<INITIAL>. { return -1; }
<COMMENT>\n { _TS->ts_linenum++; BEGIN(_TS->ts_lex_state);}
<COMMENT><<EOF>> { return MY_EOF; }
@ -106,7 +105,6 @@ int clixon_text_syntax_parsewrap(void)
<STRING>\" { BEGIN(_TS->ts_lex_state); return *yytext; }
<STRING>[^\n\"]+ { clixon_text_syntax_parselval.string = strdup(yytext);
return TOKEN; }
<STRING>. { return -1; }
%%