10 using System.Collections.Generic;
12 namespace Lextm.SharpSnmpLib.Mib.Elements.Types
48 typeSymbols.Add(type);
67 typeSymbols.Add(current);
68 current = symbols.NextSymbol();
71 _type = typeSymbols.
Join(
" ");
73 if ((_ranges == null) && (_map == null))
75 current = symbols.NextNonEOLSymbol();
87 else if (current != null)
100 Symbol previous = current;
101 Symbol veryPrevious = null;
103 while ((current = symbols.NextSymbol()) != null)
105 if ((veryPrevious ==
Symbol.
EOL) && (previous ==
Symbol.
EOL) && current.IsValidIdentifier())
111 veryPrevious = previous;
115 previous.Assert(
false,
"end of file reached");
120 get {
return _type; }
125 get {
return _ranges; }
128 public IDictionary<long, string> Map
133 #region ITypeAssignment Member 137 get {
return _module; }
142 get {
return _name; }
string Join(string separator)
static ValueRanges DecodeRanges(ISymbolEnumerator symbols)
bool PutBack(Symbol item)
static readonly Symbol EOL
TypeAssignment(IModule module, string name, Symbol type, ISymbolEnumerator symbols, bool isMacroSyntax)
Creates an TypeAssignment.
static ValueMap DecodeEnumerations(ISymbolEnumerator symbols)
static readonly Symbol OpenParentheses
static readonly Symbol OpenBracket
Lexer class that parses MIB files into symbol list.