summaryrefslogtreecommitdiff
path: root/dtc-lexer.l
diff options
context:
space:
mode:
author David Gibson <david@gibson.dropbear.id.au> 2014-05-09 20:48:49 +1000
committer David Gibson <david@gibson.dropbear.id.au> 2014-05-09 20:48:49 +1000
commitf240527e54021f82d70d8a09035e575f864c1fbd (patch)
tree5f0741ac7d48cad3fbba9182fa21a6d175a4e806 /dtc-lexer.l
parent55a3a8823d433f2922cce7bf424ee32e241076c4 (diff)
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>
Diffstat (limited to 'dtc-lexer.l')
-rw-r--r--dtc-lexer.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/dtc-lexer.l b/dtc-lexer.l
index 0821bde..5c9969f 100644
--- a/dtc-lexer.l
+++ b/dtc-lexer.l
@@ -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);