aboutsummaryrefslogtreecommitdiffstats
path: root/tools/asn2wrs.py
diff options
context:
space:
mode:
authorTomas Kukosa <tomas.kukosa@siemens.com>2013-03-22 07:30:32 +0000
committerTomas Kukosa <tomas.kukosa@siemens.com>2013-03-22 07:30:32 +0000
commit109c2326e236514acc873d735cff8a4d30557690 (patch)
tree0ca08382d3026b7bf326a4fe22da2ccc87df38a8 /tools/asn2wrs.py
parented88660c9fca00d763e29ada878ba2f595ba987a (diff)
OPERATION and ERROR tables can loop through only items with either local or global CODEs
svn path=/trunk/; revision=48476
Diffstat (limited to 'tools/asn2wrs.py')
-rwxr-xr-xtools/asn2wrs.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py
index 1c1d67fb11..9e210fde8f 100755
--- a/tools/asn2wrs.py
+++ b/tools/asn2wrs.py
@@ -1905,7 +1905,7 @@ class EthCtx:
fx.write('\n')
if rep['var']:
var = rep['var']
- var_list = var.split('.')
+ var_list = var.split('.', 1)
cls = var_list[0]
del var_list[0]
if (cls in self.oassign_cls):
@@ -7127,11 +7127,18 @@ def p_cls_syntax_3 (t):
def p_cls_syntax_4 (t):
'''cls_syntax : ARGUMENT Type
| RESULT Type
- | PARAMETER Type
- | CODE Value '''
+ | PARAMETER Type '''
t[0] = { get_class_fieled(t[1]) : t[2] }
def p_cls_syntax_5 (t):
+ 'cls_syntax : CODE Value'
+ fld = get_class_fieled(t[1]);
+ t[0] = { fld : t[2] }
+ if isinstance(t[2], ChoiceValue):
+ fldt = fld + '.' + t[2].choice
+ t[0][fldt] = t[2]
+
+def p_cls_syntax_6 (t):
'''cls_syntax : ARGUMENT Type OPTIONAL BooleanValue
| RESULT Type OPTIONAL BooleanValue
| PARAMETER Type OPTIONAL BooleanValue '''