aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/compile/snmpc_mib_gram.yrl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2010-12-03 16:40:27 +0100
committerMicael Karlberg <[email protected]>2010-12-03 16:40:27 +0100
commitc5c4c480f559b805a73d31448e211235da1a2098 (patch)
tree08e914cf84b59a617cbe9f20c0b88646b8a16f6e /lib/snmp/src/compile/snmpc_mib_gram.yrl
parent314e80f58bbee2924bf61bdc7b987750d58ca2ef (diff)
downloadotp-c5c4c480f559b805a73d31448e211235da1a2098.tar.gz
otp-c5c4c480f559b805a73d31448e211235da1a2098.tar.bz2
otp-c5c4c480f559b805a73d31448e211235da1a2098.zip
The parser exports even more of the module-complience data for future use.
In later stages, the compiler curently dropps this info.
Diffstat (limited to 'lib/snmp/src/compile/snmpc_mib_gram.yrl')
-rw-r--r--lib/snmp/src/compile/snmpc_mib_gram.yrl56
1 files changed, 32 insertions, 24 deletions
diff --git a/lib/snmp/src/compile/snmpc_mib_gram.yrl b/lib/snmp/src/compile/snmpc_mib_gram.yrl
index 5b91cb5d01..18e9b4f1f2 100644
--- a/lib/snmp/src/compile/snmpc_mib_gram.yrl
+++ b/lib/snmp/src/compile/snmpc_mib_gram.yrl
@@ -102,6 +102,17 @@ textualconvention
objectgroup
notificationgroup
modulecompliance
+mc_modulepart
+mc_modules
+mc_module
+mc_modulenamepart
+mc_mandatorypart
+mc_compliancepart
+mc_compliances
+mc_compliance
+mc_compliancegroup
+mc_object
+mc_accesspart
agentcapabilities
ac_status
ac_modulepart
@@ -114,19 +125,8 @@ ac_variation
ac_accesspart
ac_access
ac_creationpart
-mc_modulepart
-mc_modules
-mc_module
-mc_modulenamepart
-mc_mandatorypart
-mc_compliancepart
-mc_compliances
-mc_compliance
-mc_compliancegroup
-object
syntaxpart
writesyntaxpart
-accesspart
fsyntax
defbitsvalue
defbitsnames
@@ -622,28 +622,29 @@ mc_modulenamepart -> '$empty' : undefined.
mc_mandatorypart -> 'MANDATORY-GROUPS' '{' objects '}' : lists:reverse('$3').
mc_mandatorypart -> '$empty' : [].
-mc_compliancepart -> mc_compliances.
-mc_compliancepart -> '$empty'.
+mc_compliancepart -> mc_compliances : lists:reverse('$1').
+mc_compliancepart -> '$empty' : [].
-mc_compliances -> mc_compliance.
-mc_compliances -> mc_compliances mc_compliance.
+mc_compliances -> mc_compliance : '$1'.
+mc_compliances -> mc_compliances mc_compliance : ['$2' | '$1'].
-mc_compliance -> mc_compliancegroup.
-mc_compliance -> object.
+mc_compliance -> mc_compliancegroup : '$1'.
+mc_compliance -> mc_object : '$1'.
mc_compliancegroup -> 'GROUP' objectname description :
make_mc_compliance_group('$2', '$3').
-object -> 'OBJECT' objectname syntaxpart writesyntaxpart accesspart description.
+mc_object -> 'OBJECT' objectname syntaxpart writesyntaxpart mc_accesspart description :
+ make_mc_object('$2', '$3', '$4', '$5', '$6').
-syntaxpart -> 'SYNTAX' syntax.
-syntaxpart -> '$empty'.
+syntaxpart -> 'SYNTAX' syntax : '$2'.
+syntaxpart -> '$empty' : undefined.
-writesyntaxpart -> 'WRITE-SYNTAX' syntax.
-writesyntaxpart -> '$empty'.
+writesyntaxpart -> 'WRITE-SYNTAX' syntax : '$2'.
+writesyntaxpart -> '$empty' : undefined.
-accesspart -> 'MIN-ACCESS' accessv2.
-accesspart -> '$empty'.
+mc_accesspart -> 'MIN-ACCESS' accessv2 : '$2'.
+mc_accesspart -> '$empty' : undefined.
objecttypev2 -> objectname 'OBJECT-TYPE'
'SYNTAX' syntax
@@ -899,6 +900,13 @@ make_mc_compliance_group(Name, Desc) ->
#mc_mc_compliance_group{name = Name,
description = Desc}.
+make_mc_object(Name, Syntax, WriteSyntax, Access, Desc) ->
+ #mc_mc_object{name = Name,
+ syntax = Syntax,
+ write_syntax = WriteSyntax,
+ access = Access,
+ description = Desc}.
+
make_object_group(Name, Objs, Status, Desc, Ref, NA) ->
#mc_object_group{name = Name,
objects = Objs,