Exemplo n.º 1
0
        public ILexemeFactory Get(LexerRuleType lexerRuleType)
        {
            ILexemeFactory lexemeFactory = null;

            if (!_registry.TryGetValue(lexerRuleType, out lexemeFactory))
            {
                return(null);
            }
            return(lexemeFactory);
        }
Exemplo n.º 2
0
 public void Register(ILexemeFactory factory)
 {
     _registry.Add(factory.LexerRuleType, factory);
 }
Exemplo n.º 3
0
 public void Register(ILexemeFactory factory)
 {
     _registry.Add(factory.LexerRuleType.GetHashCode(), factory);
 }
Exemplo n.º 4
0
 public Lexer(IInputStream inputStream, IKeywordLexemeTypeMap lexemeMapper, ILexemeFactory lexemeFactory)
 {
     this.inputStream   = inputStream;
     this.lexemeMapper  = lexemeMapper;
     this.lexemeFactory = lexemeFactory;
 }
Exemplo n.º 5
0
 public void Register(ILexemeFactory factory)
 {
     _registry.Add(factory.LexerRuleType, factory);
 }