diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2007-12-05 10:27:04 +1100 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2007-12-05 08:27:46 -0600 |
commit | c048102f5bcafb9a316bd7532fe3958c99af6b74 (patch) | |
tree | 3b7106828d9f8fd50ddeb37eb3248423099385a4 /dtc-parser.y | |
parent | 2b67c632df15ab57e5bf1a59f23cbcac8cda6acd (diff) | |
download | dtc-c048102f5bcafb9a316bd7532fe3958c99af6b74.zip dtc-c048102f5bcafb9a316bd7532fe3958c99af6b74.tar.gz dtc-c048102f5bcafb9a316bd7532fe3958c99af6b74.tar.bz2 |
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>
Diffstat (limited to 'dtc-parser.y')
-rw-r--r-- | dtc-parser.y | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dtc-parser.y b/dtc-parser.y index 2407af4..43182fd 100644 --- a/dtc-parser.y +++ b/dtc-parser.y @@ -276,6 +276,11 @@ subnodes: { $$ = chain_node($1, $2); } + | subnode propdef + { + yyerror("syntax error: properties must precede subnodes\n"); + YYERROR; + } ; subnode: |