dtc: Generate useful error message for properties after subnodes

On several occasions, I've accidentally put properties after subnodes
in a dts file.  I've then spent ages thinking that the resulting
syntax error was because of something else.

This patch arranges for this specific syntax error to generate a more
specific and useful error message.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson
2007-12-05 10:27:04 +11:00
committed by Jon Loeliger
parent 2b67c632df
commit c048102f5b
2 changed files with 14 additions and 0 deletions

View File

@@ -276,6 +276,11 @@ subnodes:
{
$$ = chain_node($1, $2);
}
| subnode propdef
{
yyerror("syntax error: properties must precede subnodes\n");
YYERROR;
}
;
subnode: