diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-05-06 15:23:32 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-05-23 20:34:33 +0200 |
commit | d88ed36e42b1a744d71b5707f3521bca232eefb8 (patch) | |
tree | 91e8827130398ceff5fefa5c691924947211cbdd /src/xtools/pnodes.py | |
parent | d313f7858bb4dd61e96ea8c29239231e61b04ee5 (diff) | |
download | ghdl-d88ed36e42b1a744d71b5707f3521bca232eefb8.tar.gz ghdl-d88ed36e42b1a744d71b5707f3521bca232eefb8.tar.bz2 ghdl-d88ed36e42b1a744d71b5707f3521bca232eefb8.zip |
pnodes: do not allow redeclaration.
Diffstat (limited to 'src/xtools/pnodes.py')
-rwxr-xr-x | src/xtools/pnodes.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/xtools/pnodes.py b/src/xtools/pnodes.py index be43ea9bf..bc31114ea 100755 --- a/src/xtools/pnodes.py +++ b/src/xtools/pnodes.py @@ -403,6 +403,9 @@ def read_nodes(filename, kinds, kinds_ranges, fields, funcs): raise ParseError(lr, 'unknown node') fmt = m.group(2) names.append((name, fmt)) + if name in nodes: + raise ParseError( + lr, 'node {} already described'.format(name)); # There might be several nodes described at once. l = lr.get() m = pat_decl.match(l) |