Antlr3.Tool.Grammar.GetNewTokenType C# (CSharp) Method

GetNewTokenType() public method

public GetNewTokenType ( ) : int
return int
        public virtual int GetNewTokenType()
        {
            composite.MaxTokenType++;
            return composite.MaxTokenType;
        }

Usage Example

 protected override void AssignTokenIDTypes( Grammar root )
 {
     // walk token names, assigning values if unassigned
     foreach ( var token in _tokens.Where( pair => pair.Value == Unassigned ).ToArray() )
     {
         _tokens[token.Key] = root.GetNewTokenType();
     }
 }
All Usage Examples Of Antlr3.Tool.Grammar::GetNewTokenType
Grammar