aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-06-21 05:50:15 +0200
committerTristan Gingold <tgingold@free.fr>2018-06-21 05:50:15 +0200
commit1013d3e7c2af31ce7cf5720d03e39d9861755fdb (patch)
tree5198595e38ffbefea4e78454c33f301035dfe957
parentc00074985783c13dce54de3814c39e76cf269268 (diff)
downloadghdl-1013d3e7c2af31ce7cf5720d03e39d9861755fdb.tar.gz
ghdl-1013d3e7c2af31ce7cf5720d03e39d9861755fdb.tar.bz2
ghdl-1013d3e7c2af31ce7cf5720d03e39d9861755fdb.zip
pnodes.py: error message on undescribed node.
-rwxr-xr-xsrc/xtools/pnodes.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xtools/pnodes.py b/src/xtools/pnodes.py
index 4777a4ce3..82c1a69b2 100755
--- a/src/xtools/pnodes.py
+++ b/src/xtools/pnodes.py
@@ -186,7 +186,7 @@ def read_kinds(filename):
continue
m = pat_comment.match(l)
if not m:
- raise ParseError(lr, 'Unknow line within kind declaration')
+ raise ParseError(lr, 'Unknown line within kind declaration')
# Check subtypes
pat_subtype = re.compile(' subtype ' + r'(\w+) is '
@@ -391,7 +391,7 @@ def read_nodes(filename, kinds, kinds_ranges, fields, funcs):
while True:
l = lr.get()
if l == ' -- End of ' + type_name + '.\n':
- return nodes
+ break
if l == '\n':
continue
m = pat_decl.match(l)
@@ -428,6 +428,10 @@ def read_nodes(filename, kinds, kinds_ranges, fields, funcs):
if pat_comment_line.match(l) or pat_comment_box.match(l):
continue
raise ParseError(lr, 'bad line in node description')
+
+ for k in kinds:
+ if k not in nodes:
+ raise ParseError(lr, 'no desription for "{}"'.format(k))
return nodes