mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
Fix bug with references to root node
At present, the lexer token for references to a path doesn't permit a reference to the root node &{/}. Fixing the lexer exposes another bug handling this case. This patch fixes both bugs and adds testcases. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
55a3a8823d
commit
f240527e54
8 changed files with 48 additions and 2 deletions
|
@ -193,7 +193,7 @@ static void lexical_error(const char *fmt, ...);
|
|||
return DT_REF;
|
||||
}
|
||||
|
||||
<*>"&{/"{PATHCHAR}+\} { /* new-style path reference */
|
||||
<*>"&{/"{PATHCHAR}*\} { /* new-style path reference */
|
||||
yytext[yyleng-1] = '\0';
|
||||
DPRINT("Ref: %s\n", yytext+2);
|
||||
yylval.labelref = xstrdup(yytext+2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue