aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorkukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7>2007-11-01 11:56:33 +0000
committerkukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7>2007-11-01 11:56:33 +0000
commitba339e1d965f52c4edf09fee68eda396633e1e5e (patch)
tree50b1ce58d95fae5783f6ae3f1cf39e1728db3972 /tools
parent9b73362a00ca0f54f1f38af8ad32e6ecd243d7cd (diff)
better built-in X.880 support
forward declarations of OPERATION and ERROR classes are not necessary when Remote-Operations-Information-Objects.asn itself is compiled git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23328 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tools')
-rwxr-xr-xtools/asn2wrs.py40
1 files changed, 35 insertions, 5 deletions
diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py
index 5d86811e7d..14801baca5 100755
--- a/tools/asn2wrs.py
+++ b/tools/asn2wrs.py
@@ -5367,8 +5367,13 @@ def p_modulereference (t):
# 12.1
def p_ModuleDefinition (t):
- 'ModuleDefinition : ModuleIdentifier DEFINITIONS TagDefault ASSIGNMENT BEGIN ModuleBody END'
- t[0] = Module (ident = t[1], tag_def = t[3], body = t[6])
+ 'ModuleDefinition : ModuleIdentifier DEFINITIONS TagDefault ASSIGNMENT ModuleBegin BEGIN ModuleBody END'
+ t[0] = Module (ident = t[1], tag_def = t[3], body = t[7])
+
+def p_ModuleBegin (t):
+ 'ModuleBegin : '
+ if t[-4].val == 'Remote-Operations-Information-Objects':
+ x880_module_begin()
def p_TagDefault_1 (t):
'''TagDefault : EXPLICIT TAGS
@@ -7054,6 +7059,7 @@ def get_type_from_class(cls, fld):
return creator()
def set_type_to_class(cls, fld, pars):
+ #print "set_type_to_class", cls, fld, pars
key = cls + '.' + fld
typename = 'OpenType'
if (len(pars) > 0):
@@ -7313,23 +7319,42 @@ x880_classes = {
'&synchronous' : [ 'BooleanType' ],
'&idempotent' : [ 'BooleanType' ],
'&alwaysReturns' : [ 'BooleanType' ],
-# '&InvokePriority' #UNSUPPORTED_FixedTypeValueSetFieldSpec
-# '&ResultPriority' #UNSUPPORTED_FixedTypeValueSetFieldSpec
+ '&InvokePriority' : [ '_FixedTypeValueSetFieldSpec' ],
+ '&ResultPriority' : [ '_FixedTypeValueSetFieldSpec' ],
'&operationCode' : [ 'TypeReference', 'Code' ],
},
'ERROR' : {
'&ParameterType' : [],
'&parameterTypeOptional' : [ 'BooleanType' ],
-# '&ErrorPriority' #UNSUPPORTED_FixedTypeValueSetFieldSpec
+ '&ErrorPriority' : [ '_FixedTypeValueSetFieldSpec' ],
'&errorCode' : [ 'TypeReference', 'Code' ],
},
'OPERATION-PACKAGE' : {
+ '&Both' : [ 'ClassReference', 'OPERATION' ],
+ '&Consumer' : [ 'ClassReference', 'OPERATION' ],
+ '&Supplier' : [ 'ClassReference', 'OPERATION' ],
+ '&id' : [ 'ObjectIdentifierType' ],
},
'CONNECTION-PACKAGE' : {
+ '&bind' : [ 'ClassReference', 'OPERATION' ],
+ '&unbind' : [ 'ClassReference', 'OPERATION' ],
+ '&responderCanUnbind' : [ 'BooleanType' ],
+ '&unbindCanFail' : [ 'BooleanType' ],
+ '&id' : [ 'ObjectIdentifierType' ],
},
'CONTRACT' : {
+ '&connection' : [ 'ClassReference', 'CONNECTION-PACKAGE' ],
+ '&OperationsOf' : [ 'ClassReference', 'OPERATION-PACKAGE' ],
+ '&InitiatorConsumerOf' : [ 'ClassReference', 'OPERATION-PACKAGE' ],
+ '&InitiatorSupplierOf' : [ 'ClassReference', 'OPERATION-PACKAGE' ],
+ '&id' : [ 'ObjectIdentifierType' ],
},
'ROS-OBJECT-CLASS' : {
+ '&Is' : [ 'ClassReference', 'ROS-OBJECT-CLASS' ],
+ '&Initiates' : [ 'ClassReference', 'CONTRACT' ],
+ '&Responds' : [ 'ClassReference', 'CONTRACT' ],
+ '&InitiatesAndResponds' : [ 'ClassReference', 'CONTRACT' ],
+ '&id' : [ 'ObjectIdentifierType' ],
},
}
@@ -7370,6 +7395,11 @@ x880_syntaxes = {
# },
}
+def x880_module_begin():
+ #print "x880_module_begin()"
+ for name in x880_classes.keys():
+ add_class_ident(name)
+
def x880_import(name):
if x880_syntaxes.has_key(name):
class_syntaxes_enabled[name] = True