Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
Don't abort on unknown keywords by default
Browse files Browse the repository at this point in the history
Just warn unless --strict is used.  This allows to use the same .vcc in
4.0 and 4.1.
  • Loading branch information
fgsch committed Feb 12, 2016
1 parent 3d5911a commit dec0da3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/libvcc/vmodtool.py
Expand Up @@ -791,7 +791,15 @@ def parse(self, vx):
o = parse_func(self, pobj=vx[1].nam)
vx[1].add_method(o)
else:
raise FormatError("Unknown keyword: %s" % t.str, "")
if opts.strict:
raise FormatError("Unknown keyword: %s" %
t.str, "")
else:
print("WARNING: Unknown keyword: %s:" %
t.str, file=sys.stderr)
o = None
while len(self.tl) > 0:
self.get_token()

assert len(self.tl) == 0
if o is None and len(self.l) > 0:
Expand Down

0 comments on commit dec0da3

Please sign in to comment.