DefineLexerRuleForAliasedStringLiteral() public method

public DefineLexerRuleForAliasedStringLiteral ( string tokenID, string literal, int tokenType ) : void
tokenID string
literal string
tokenType int
return void
 protected override void AliasTokenIDsAndLiterals( Grammar root )
 {
     if ( root.type == GrammarType.Lexer )
     {
         return; // strings/chars are never token types in LEXER
     }
     // walk aliases if any and assign types to aliased literals if literal
     // was referenced
     foreach ( var alias in _aliases )
     {
         string tokenID = alias.Key;
         string literal = alias.Value;
         if ( literal[0] == '\'' && _stringLiterals.ContainsKey( literal ) )
         {
             int token;
             _tokens.TryGetValue(tokenID, out token);
             _stringLiterals[literal] = token;
             // an alias still means you need a lexer rule for it
             int typeI;
             _tokens.TryGetValue(tokenID, out typeI);
             if ( !tokenRuleDefs.Contains( tokenID ) )
             {
                 root.DefineLexerRuleForAliasedStringLiteral( tokenID, literal, typeI );
             }
         }
     }
 }