diff options
author | kukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-04-20 12:39:34 +0000 |
---|---|---|
committer | kukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-04-20 12:39:34 +0000 |
commit | 8c31fbba221be8955375562573573fe019e96893 (patch) | |
tree | 26a494ae28dad1a53d5ca3f7e9b1169746b820e0 /tools | |
parent | d460dc52e2310fc2afe6f003f5c2fa6c93c55236 (diff) |
- fix handling SET/SEQUENCE OF Type if type name contains hyphen
- raise warning if type is not renamed to name with the first letter uppercase
- raise warning if field is not renamed to name with the first letter lowercase
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14147 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tools')
-rw-r--r-- | tools/asn2eth.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/asn2eth.py b/tools/asn2eth.py index adb5663ea2..9a75487340 100644 --- a/tools/asn2eth.py +++ b/tools/asn2eth.py @@ -1410,11 +1410,17 @@ class EthCnf: par = get_par(line, 2, 2, fn=fn, lineno=lineno) if not par: continue self.add_item('TYPE_RENAME', par[0], eth_name=par[1], fn=fn, lineno=lineno) + if not par[1][0].isupper(): + warnings.warn_explicit("Type shoud be renamed to uppercase name (%s)" % (par[1]), + UserWarning, fn, lineno) elif ctx == 'FIELD_RENAME': if empty.match(line): continue par = get_par(line, 2, 2, fn=fn, lineno=lineno) if not par: continue self.add_item('FIELD_RENAME', par[0], eth_name=par[1], fn=fn, lineno=lineno) + if not par[1][0].islower(): + warnings.warn_explicit("Field shoud be renamed to lowercase name (%s)" % (par[1]), + UserWarning, fn, lineno) elif ctx in ('TYPE_ATTR', 'ETYPE_ATTR', 'FIELD_ATTR', 'EFIELD_ATTR'): if empty.match(line): continue par = get_par_nm(line, 1, fn=fn, lineno=lineno) @@ -1874,7 +1880,7 @@ class Type_Ref (Type): ectx.eth_dep_add(ident, self.val) def eth_tname(self): - return self.val + return asn2c(self.val) def GetTTag(self, ectx): if (ectx.type[self.val]['import']): |