11 using System.Collections.Generic;
13 namespace Lextm.SharpSnmpLib.Mib.Elements.Types
34 private bool _isEnumeration;
47 Types? t = GetExactType(type);
48 type.Assert(t.HasValue,
"Unknown symbol for unsigned type!");
51 _isEnumeration =
false;
56 _isEnumeration =
true;
64 current.Assert(!_ranges.
IsSizeDeclaration,
"SIZE keyword is not allowed for ranges of integer types!");
79 get {
return _ranges; }
82 public bool IsEnumeration
86 return _isEnumeration;
92 get {
return _isEnumeration ? _map : null; }
101 return Types.Integer;
106 return Types.Integer32;
112 internal static bool IsIntegerType(
Symbol symbol)
114 return GetExactType(symbol).HasValue;
static ValueRanges DecodeRanges(ISymbolEnumerator symbols)
bool PutBack(Symbol item)
IntegerType(IModule module, string name, Symbol type, ISymbolEnumerator symbols)
Creates an IntegerType instance.
static readonly Symbol Integer
static ValueMap DecodeEnumerations(ISymbolEnumerator symbols)
The INTEGER type represents a list of alternatives, or a range of numbers.. Includes Integer32 as it'...
static readonly Symbol OpenParentheses
static readonly Symbol OpenBracket
Lexer class that parses MIB files into symbol list.
static readonly Symbol Integer32