Esempio n. 1
0
    protected void pairvalue(
        IDeclarationCollection collection
        ) //throws RecognitionException, TokenStreamException
    {
        Token keyToken = null;

        DefinitionBase definition = null;


        try {              // for error handling
            keyToken = LT(1);
            match(STRING_LITERAL);
            match(COLON);

            String key = keyToken.getText();
            definition = collection.Add(key, ToLexicalInfo(keyToken));

            type_name(definition);
        }
        catch (RecognitionException ex)
        {
            reportError(ex);
            consume();
            consumeUntil(tokenSet_6_);
        }
    }
Esempio n. 2
0
 protected void keytypepair(
     IDeclarationCollection collection
     )     //throws RecognitionException, TokenStreamException
 {
     try { // for error handling
         match(LBRACK);
         {
             {
                 pairvalue(collection);
                 {                        // ( ... )*
                     for (;;)
                     {
                         if ((LA(1) == SEMI))
                         {
                             match(SEMI);
                             pairvalue(collection);
                         }
                         else
                         {
                             goto _loop20_breakloop;
                         }
                     }
                     _loop20_breakloop :;
                 }                        // ( ... )*
             }
         }
         match(RBRACK);
     }
     catch (RecognitionException ex)
     {
         reportError(ex);
         consume();
         consumeUntil(tokenSet_2_);
     }
 }
	protected void pairvalue(
		IDeclarationCollection collection
	) //throws RecognitionException, TokenStreamException
{
		
		IToken  keyToken = null;
		
		DefinitionBase definition = null;
		
		
		try {      // for error handling
			keyToken = LT(1);
			match(STRING_LITERAL);
			match(COLON);
			
			String key = keyToken.getText();
			definition = collection.Add( key, ToLexicalInfo(keyToken) );
			
			type_name(definition);
		}
		catch (RecognitionException ex)
		{
			reportError(ex);
			consume();
			consumeUntil(tokenSet_6_);
		}
	}
	protected void keytypepair(
		IDeclarationCollection collection
	) //throws RecognitionException, TokenStreamException
{
		
		
		try {      // for error handling
			match(LBRACK);
			{
				{
					pairvalue(collection);
					{    // ( ... )*
						for (;;)
						{
							if ((LA(1)==SEMI))
							{
								match(SEMI);
								pairvalue(collection);
							}
							else
							{
								goto _loop20_breakloop;
							}
							
						}
_loop20_breakloop:						;
					}    // ( ... )*
				}
			}
			match(RBRACK);
		}
		catch (RecognitionException ex)
		{
			reportError(ex);
			consume();
			consumeUntil(tokenSet_2_);
		}
	}