Ejemplo n.º 1
0
        public void http() //throws RecognitionException, TokenStreamException
        {
            returnAST = null;
            ASTPair currentAST = new ASTPair();
            AST     http_AST   = null;
            IToken  h          = null;
            AST     h_AST      = null;

            try {          // for error handling
                h     = LT(1);
                h_AST = astFactory.create(h);
                astFactory.addASTChild(ref currentAST, h_AST);
                match(HTTP);
                if (0 == inputState.guessing)
                {
                    m_bldr.Append(string.Format("<see href=\"{0}\">{0}</see>", h_AST.getText()));
                }
                http_AST = currentAST.root;
            }
            catch (RecognitionException ex)
            {
                if (0 == inputState.guessing)
                {
                    reportError(ex);
                    recover(ex, tokenSet_1_);
                }
                else
                {
                    throw ex;
                }
            }
            returnAST = http_AST;
        }
Ejemplo n.º 2
0
        public void reference() //throws RecognitionException, TokenStreamException
        {
            returnAST = null;
            ASTPair currentAST    = new ASTPair();
            AST     reference_AST = null;
            IToken  r             = null;
            AST     r_AST         = null;

            try {          // for error handling
                r     = LT(1);
                r_AST = astFactory.create(r);
                astFactory.addASTChild(ref currentAST, r_AST);
                match(REFERENCE);
                if (0 == inputState.guessing)
                {
                    m_bldr.Append(string.Format("<c>{0}</c>", r_AST.getText().Replace("#", ".")));
                }
                reference_AST = currentAST.root;
            }
            catch (RecognitionException ex)
            {
                if (0 == inputState.guessing)
                {
                    reportError(ex);
                    recover(ex, tokenSet_1_);
                }
                else
                {
                    throw ex;
                }
            }
            returnAST = reference_AST;
        }
Ejemplo n.º 3
0
        public void other() //throws RecognitionException, TokenStreamException
        {
            returnAST = null;
            ASTPair currentAST = new ASTPair();
            AST     other_AST  = null;

            try {          // for error handling
                switch (LA(1))
                {
                case IDENTIFIER:
                {
                    AST tmp3_AST = null;
                    tmp3_AST = astFactory.create(LT(1));
                    astFactory.addASTChild(ref currentAST, tmp3_AST);
                    match(IDENTIFIER);
                    other_AST = currentAST.root;
                    break;
                }

                case DOLLAR:
                {
                    AST tmp4_AST = null;
                    tmp4_AST = astFactory.create(LT(1));
                    astFactory.addASTChild(ref currentAST, tmp4_AST);
                    match(DOLLAR);
                    other_AST = currentAST.root;
                    break;
                }

                default:
                {
                    throw new NoViableAltException(LT(1), getFilename());
                }
                }
            }
            catch (RecognitionException ex)
            {
                if (0 == inputState.guessing)
                {
                    reportError(ex);
                    recover(ex, tokenSet_1_);
                }
                else
                {
                    throw ex;
                }
            }
            returnAST = other_AST;
        }
Ejemplo n.º 4
0
        public void row() //throws RecognitionException, TokenStreamException
        {
            returnAST = null;
            ASTPair currentAST = new ASTPair();
            AST     row_AST    = null;
            IToken  f          = null;
            AST     f_AST      = null;
            IToken  s          = null;
            AST     s_AST      = null;

            try {          // for error handling
                AST tmp5_AST = null;
                tmp5_AST = astFactory.create(LT(1));
                astFactory.addASTChild(ref currentAST, tmp5_AST);
                match(ROW);
                f     = LT(1);
                f_AST = astFactory.create(f);
                astFactory.addASTChild(ref currentAST, f_AST);
                match(CELL);
                s     = LT(1);
                s_AST = astFactory.create(s);
                astFactory.addASTChild(ref currentAST, s_AST);
                match(CELL);
                AST tmp6_AST = null;
                tmp6_AST = astFactory.create(LT(1));
                astFactory.addASTChild(ref currentAST, tmp6_AST);
                match(RBRACE);
                if (0 == inputState.guessing)
                {
                    currentAST.root.setText(string.Format("<item><term>{0}</term>{2} <description>{2} {1}{2} </description>{2} </item>",
                                                          f_AST.getText(), s_AST.getText(), Environment.NewLine));
                }
                row_AST = currentAST.root;
            }
            catch (RecognitionException ex)
            {
                if (0 == inputState.guessing)
                {
                    reportError(ex);
                    recover(ex, tokenSet_2_);
                }
                else
                {
                    throw ex;
                }
            }
            returnAST = row_AST;
        }
Ejemplo n.º 5
0
	public void n_e_case_stmt() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST n_e_case_stmt_AST = null;

		try {      // for error handling
			n_e_case_label();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			{
				switch ( LA(1) )
				{
				case INT3264:
				case INT64:
				case LBRACKET:
				case SCOPEOP:
				case LITERAL_const:
				case LITERAL_signed:
				case LITERAL_unsigned:
				case LITERAL_octet:
				case LITERAL_any:
				case LITERAL_void:
				case LITERAL_byte:
				case LITERAL_wchar_t:
				case LITERAL_handle_t:
				case LITERAL_small:
				case LITERAL_short:
				case LITERAL_long:
				case LITERAL_int:
				case LITERAL_hyper:
				case LITERAL_char:
				case LITERAL_float:
				case LITERAL_double:
				case LITERAL_boolean:
				case LITERAL_struct:
				case LITERAL_union:
				case LITERAL_enum:
				case LITERAL_sequence:
				case LITERAL_string:
				case IDENT:
				{
					unnamed_element_spec();
					if (0 == inputState.guessing)
					{
						astFactory.addASTChild(ref currentAST, returnAST);
					}
					break;
				}
				case SEMI:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				 }
			}
			AST tmp252_AST = null;
			tmp252_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp252_AST);
			match(SEMI);
			n_e_case_stmt_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_42_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = n_e_case_stmt_AST;
	}
Ejemplo n.º 6
0
        public void surveyorTags() //throws RecognitionException, TokenStreamException
        {
            returnAST = null;
            ASTPair currentAST       = new ASTPair();
            AST     surveyorTags_AST = null;
            AST     o_AST            = null;

            try {          // for error handling
                {          // ( ... )*
                    for (;;)
                    {
                        switch (LA(1))
                        {
                        case TABLE:
                        {
                            table();
                            if (0 == inputState.guessing)
                            {
                                astFactory.addASTChild(ref currentAST, returnAST);
                            }
                            break;
                        }

                        case REFERENCE:
                        {
                            reference();
                            if (0 == inputState.guessing)
                            {
                                astFactory.addASTChild(ref currentAST, returnAST);
                            }
                            break;
                        }

                        case DOLLAR:
                        case IDENTIFIER:
                        {
                            other();
                            if (0 == inputState.guessing)
                            {
                                o_AST = (AST)returnAST;
                                astFactory.addASTChild(ref currentAST, returnAST);
                            }
                            if (0 == inputState.guessing)
                            {
                                m_bldr.Append(o_AST.getText());
                            }
                            break;
                        }

                        case HTTP:
                        {
                            http();
                            if (0 == inputState.guessing)
                            {
                                astFactory.addASTChild(ref currentAST, returnAST);
                            }
                            break;
                        }

                        default:
                        {
                            goto _loop5_breakloop;
                        }
                        }
                    }
                    _loop5_breakloop :;
                }            // ( ... )*
                surveyorTags_AST = currentAST.root;
            }
            catch (RecognitionException ex)
            {
                if (0 == inputState.guessing)
                {
                    reportError(ex);
                    recover(ex, tokenSet_0_);
                }
                else
                {
                    throw ex;
                }
            }
            returnAST = surveyorTags_AST;
        }
Ejemplo n.º 7
0
	public void member(
		CodeTypeMemberCollection members
	) //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST member_AST = null;

				Hashtable attributes = new Hashtable();
				CodeTypeMember type;
				string name;


		try {      // for error handling
			{
				switch ( LA(1) )
				{
				case LBRACKET:
				{
					field_attribute_list(attributes);
					if (0 == inputState.guessing)
					{
						astFactory.addASTChild(ref currentAST, returnAST);
					}
					break;
				}
				case INT3264:
				case INT64:
				case SCOPEOP:
				case LITERAL_const:
				case LITERAL_signed:
				case LITERAL_unsigned:
				case LITERAL_octet:
				case LITERAL_any:
				case LITERAL_void:
				case LITERAL_byte:
				case LITERAL_wchar_t:
				case LITERAL_handle_t:
				case LITERAL_small:
				case LITERAL_short:
				case LITERAL_long:
				case LITERAL_int:
				case LITERAL_hyper:
				case LITERAL_char:
				case LITERAL_float:
				case LITERAL_double:
				case LITERAL_boolean:
				case LITERAL_struct:
				case LITERAL_union:
				case LITERAL_enum:
				case LITERAL_sequence:
				case LITERAL_string:
				case IDENT:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				 }
			}
			type=type_spec();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			name=declarator_list(attributes);
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			AST tmp248_AST = null;
			tmp248_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp248_AST);
			match(SEMI);
			if (0==inputState.guessing)
			{

							if (type != null && name != string.Empty)
							{
								if (attributes["IsArray"] != null)
								{
									List<string> arraySizes = (List<string>)attributes["IsArray"];
									if (arraySizes.Count > 1)
									{
										Console.WriteLine(string.Format("Can't handle multi dimensional arrays: {0}",
											name));
									}

									if (arraySizes.Count == 1)
									{
										// Add attribute: [MarshalAs(UnmanagedType.ByValArray, SizeConst=x)]
										int val;
										if (int.TryParse(arraySizes[0], out val))
										{
											if (type is CodeMemberField)
												((CodeMemberField)type).Type.ArrayRank = 1;
											else
												Console.WriteLine(string.Format("Unhandled type: {0}", type.GetType()));

											type.CustomAttributes.Add(new CodeAttributeDeclaration("MarshalAs",
												new CodeAttributeArgument(
													new CodeSnippetExpression("UnmanagedType.ByValArray")),
												new CodeAttributeArgument("SizeConst",
													new CodePrimitiveExpression(val))));
										}
										else
										{
											Console.WriteLine(string.Format("Can't handle array dimension spec: '{0}' for {1}",
												arraySizes[0], name));
										}
									}
									attributes.Remove("IsArray");
								}

								type.Name = name;
								members.Add(type);
							}

			}
			member_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_40_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = member_AST;
	}
Ejemplo n.º 8
0
	public void raises_expr() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST raises_expr_AST = null;
		StringCollection ignored = new StringCollection();

		try {      // for error handling
			AST tmp335_AST = null;
			tmp335_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp335_AST);
			match(LITERAL_raises);
			AST tmp336_AST = null;
			tmp336_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp336_AST);
			match(LPAREN);
			scoped_name_list(ignored);
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			AST tmp337_AST = null;
			tmp337_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp337_AST);
			match(RPAREN);
			raises_expr_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_16_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = raises_expr_AST;
	}
Ejemplo n.º 9
0
	public void string_literal_list() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST string_literal_list_AST = null;

		try {      // for error handling
			string_literal();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			{    // ( ... )*
				for (;;)
				{
					if ((LA(1)==COMMA))
					{
						match(COMMA);
						string_literal();
						if (0 == inputState.guessing)
						{
							astFactory.addASTChild(ref currentAST, returnAST);
						}
					}
					else
					{
						goto _loop230_breakloop;
					}

				}
_loop230_breakloop:				;
			}    // ( ... )*
			string_literal_list_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_14_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = string_literal_list_AST;
	}
Ejemplo n.º 10
0
	public CodeParameterDeclarationExpression  param_dcl() //throws RecognitionException, TokenStreamException
{
		CodeParameterDeclarationExpression param;

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST param_dcl_AST = null;
		AST strType_AST = null;

				param = new CodeParameterDeclarationExpression();
				Hashtable attributes = new Hashtable();
				string name = string.Empty;


		try {      // for error handling
			{
				switch ( LA(1) )
				{
				case LBRACKET:
				{
					AST tmp292_AST = null;
					tmp292_AST = astFactory.create(LT(1));
					astFactory.addASTChild(ref currentAST, tmp292_AST);
					match(LBRACKET);
					param_attributes(attributes);
					if (0 == inputState.guessing)
					{
						astFactory.addASTChild(ref currentAST, returnAST);
					}
					AST tmp293_AST = null;
					tmp293_AST = astFactory.create(LT(1));
					astFactory.addASTChild(ref currentAST, tmp293_AST);
					match(RBRACKET);
					break;
				}
				case INT3264:
				case INT64:
				case SCOPEOP:
				case LITERAL_const:
				case LITERAL_signed:
				case LITERAL_unsigned:
				case LITERAL_octet:
				case LITERAL_any:
				case LITERAL_void:
				case LITERAL_byte:
				case LITERAL_wchar_t:
				case LITERAL_handle_t:
				case LITERAL_small:
				case LITERAL_short:
				case LITERAL_long:
				case LITERAL_int:
				case LITERAL_hyper:
				case LITERAL_char:
				case LITERAL_float:
				case LITERAL_double:
				case LITERAL_boolean:
				case LITERAL_string:
				case LITERAL_SAFEARRAY:
				case IDENT:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				 }
			}
			{
				switch ( LA(1) )
				{
				case LITERAL_const:
				{
					AST tmp294_AST = null;
					tmp294_AST = astFactory.create(LT(1));
					astFactory.addASTChild(ref currentAST, tmp294_AST);
					match(LITERAL_const);
					break;
				}
				case INT3264:
				case INT64:
				case SCOPEOP:
				case LITERAL_signed:
				case LITERAL_unsigned:
				case LITERAL_octet:
				case LITERAL_any:
				case LITERAL_void:
				case LITERAL_byte:
				case LITERAL_wchar_t:
				case LITERAL_handle_t:
				case LITERAL_small:
				case LITERAL_short:
				case LITERAL_long:
				case LITERAL_int:
				case LITERAL_hyper:
				case LITERAL_char:
				case LITERAL_float:
				case LITERAL_double:
				case LITERAL_boolean:
				case LITERAL_string:
				case LITERAL_SAFEARRAY:
				case IDENT:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				 }
			}
			param_type_spec();
			if (0 == inputState.guessing)
			{
				strType_AST = (AST)returnAST;
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			{
				switch ( LA(1) )
				{
				case LITERAL_const:
				{
					AST tmp295_AST = null;
					tmp295_AST = astFactory.create(LT(1));
					astFactory.addASTChild(ref currentAST, tmp295_AST);
					match(LITERAL_const);
					break;
				}
				case COMMA:
				case RPAREN:
				case IDENT:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				 }
			}
			{
				switch ( LA(1) )
				{
				case IDENT:
				{
					name=declarator(attributes);
					if (0 == inputState.guessing)
					{
						astFactory.addASTChild(ref currentAST, returnAST);
					}
					break;
				}
				case COMMA:
				case RPAREN:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				 }
			}
			if (0==inputState.guessing)
			{

							string str = null;
							if (strType_AST != null && name != string.Empty)
							{
								str = strType_AST.ToStringList();
								param.Name = IDLConversions.ConvertParamName(name);
								param.Type = m_Conv.ConvertParamType(str, param, attributes);
							}

			}
			param_dcl_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_15_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = param_dcl_AST;
		return param;
	}
Ejemplo n.º 11
0
	public void attribute_list(
		IDictionary attributes
	) //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST attribute_list_AST = null;

		try {      // for error handling
			attribute(attributes);
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			{    // ( ... )*
				for (;;)
				{
					if ((LA(1)==COMMA))
					{
						AST tmp19_AST = null;
						tmp19_AST = astFactory.create(LT(1));
						astFactory.addASTChild(ref currentAST, tmp19_AST);
						match(COMMA);
						attribute(attributes);
						if (0 == inputState.guessing)
						{
							astFactory.addASTChild(ref currentAST, returnAST);
						}
					}
					else
					{
						goto _loop25_breakloop;
					}

				}
_loop25_breakloop:				;
			}    // ( ... )*
			attribute_list_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_4_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = attribute_list_AST;
	}
Ejemplo n.º 12
0
	public string  enumerator(
		ref string e
	) //throws RecognitionException, TokenStreamException
{
		string s;

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST enumerator_AST = null;
		AST name_AST = null;

				s = string.Empty;
				e = string.Empty;


		try {      // for error handling
			switch ( LA(1) )
			{
			case IDENT:
			{
				identifier();
				if (0 == inputState.guessing)
				{
					name_AST = (AST)returnAST;
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				{
					switch ( LA(1) )
					{
					case ASSIGN:
					{
						AST tmp265_AST = null;
						tmp265_AST = astFactory.create(LT(1));
						astFactory.addASTChild(ref currentAST, tmp265_AST);
						match(ASSIGN);
						e=const_exp();
						if (0 == inputState.guessing)
						{
							astFactory.addASTChild(ref currentAST, returnAST);
						}
						break;
					}
					case RBRACE:
					case COMMA:
					{
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					 }
				}
				if (0==inputState.guessing)
				{

								s = name_AST.getText();

				}
				enumerator_AST = currentAST.root;
				break;
			}
			case RBRACE:
			case COMMA:
			{
				enumerator_AST = currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			 }
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_46_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = enumerator_AST;
		return s;
	}
Ejemplo n.º 13
0
	public void enumerator_value() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST enumerator_value_AST = null;

		try {      // for error handling
			{
				switch ( LA(1) )
				{
				case MINUS:
				{
					AST tmp266_AST = null;
					tmp266_AST = astFactory.create(LT(1));
					astFactory.addASTChild(ref currentAST, tmp266_AST);
					match(MINUS);
					break;
				}
				case INT:
				case HEX:
				case IDENT:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				 }
			}
			{
				switch ( LA(1) )
				{
				case INT:
				{
					AST tmp267_AST = null;
					tmp267_AST = astFactory.create(LT(1));
					astFactory.addASTChild(ref currentAST, tmp267_AST);
					match(INT);
					break;
				}
				case HEX:
				{
					AST tmp268_AST = null;
					tmp268_AST = astFactory.create(LT(1));
					astFactory.addASTChild(ref currentAST, tmp268_AST);
					match(HEX);
					break;
				}
				case IDENT:
				{
					identifier();
					if (0 == inputState.guessing)
					{
						astFactory.addASTChild(ref currentAST, returnAST);
					}
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				 }
			}
			enumerator_value_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_16_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = enumerator_value_AST;
	}
Ejemplo n.º 14
0
	public void element_spec() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST element_spec_AST = null;

				Hashtable attributes = new Hashtable();
				CodeTypeMember type;
				string ignored;


		try {      // for error handling
			{
				switch ( LA(1) )
				{
				case LBRACKET:
				{
					field_attribute_list(attributes);
					if (0 == inputState.guessing)
					{
						astFactory.addASTChild(ref currentAST, returnAST);
					}
					break;
				}
				case INT3264:
				case INT64:
				case SCOPEOP:
				case LITERAL_const:
				case LITERAL_signed:
				case LITERAL_unsigned:
				case LITERAL_octet:
				case LITERAL_any:
				case LITERAL_void:
				case LITERAL_byte:
				case LITERAL_wchar_t:
				case LITERAL_handle_t:
				case LITERAL_small:
				case LITERAL_short:
				case LITERAL_long:
				case LITERAL_int:
				case LITERAL_hyper:
				case LITERAL_char:
				case LITERAL_float:
				case LITERAL_double:
				case LITERAL_boolean:
				case LITERAL_struct:
				case LITERAL_union:
				case LITERAL_enum:
				case LITERAL_sequence:
				case LITERAL_string:
				case IDENT:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				 }
			}
			type=type_spec();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			ignored=declarator(attributes);
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			element_spec_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_16_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = element_spec_AST;
	}
Ejemplo n.º 15
0
	public void enumerator_list(
		string enumName, CodeTypeMemberCollection members
	) //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST enumerator_list_AST = null;

				string s1 = string.Empty;
				string s2 = string.Empty;
				string expr1 = string.Empty;
				string expr2 = string.Empty;


		try {      // for error handling
			s1=enumerator(ref expr1);
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			{    // ( ... )*
				for (;;)
				{
					if ((LA(1)==COMMA))
					{
						AST tmp264_AST = null;
						tmp264_AST = astFactory.create(LT(1));
						astFactory.addASTChild(ref currentAST, tmp264_AST);
						match(COMMA);
						s2=enumerator(ref expr2);
						if (0 == inputState.guessing)
						{
							astFactory.addASTChild(ref currentAST, returnAST);
						}
						if (0==inputState.guessing)
						{

												members.Add(IDLConversions.CreateEnumMember(enumName, s1, expr1));
												s1 = s2;
												expr1 = expr2;

						}
					}
					else
					{
						goto _loop174_breakloop;
					}

				}
_loop174_breakloop:				;
			}    // ( ... )*
			if (0==inputState.guessing)
			{

							if (s1 != string.Empty)
								members.Add(IDLConversions.CreateEnumMember(enumName, s1, expr1));

			}
			enumerator_list_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_9_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = enumerator_list_AST;
	}
Ejemplo n.º 16
0
	public void case_label() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST case_label_AST = null;
		string ignored;

		try {      // for error handling
			switch ( LA(1) )
			{
			case LITERAL_case:
			{
				AST tmp260_AST = null;
				tmp260_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp260_AST);
				match(LITERAL_case);
				ignored=const_exp();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				AST tmp261_AST = null;
				tmp261_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp261_AST);
				match(COLON);
				case_label_AST = currentAST.root;
				break;
			}
			case LITERAL_default:
			{
				AST tmp262_AST = null;
				tmp262_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp262_AST);
				match(LITERAL_default);
				AST tmp263_AST = null;
				tmp263_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp263_AST);
				match(COLON);
				case_label_AST = currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			 }
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_45_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = case_label_AST;
	}
Ejemplo n.º 17
0
	public void case_label_list() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST case_label_list_AST = null;

		try {      // for error handling
			{ // ( ... )+
				int _cnt163=0;
				for (;;)
				{
					if ((LA(1)==LITERAL_default||LA(1)==LITERAL_case))
					{
						case_label();
						if (0 == inputState.guessing)
						{
							astFactory.addASTChild(ref currentAST, returnAST);
						}
					}
					else
					{
						if (_cnt163 >= 1) { goto _loop163_breakloop; } else { throw new NoViableAltException(LT(1), getFilename());; }
					}

					_cnt163++;
				}
_loop163_breakloop:				;
			}    // ( ... )+
			case_label_list_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_3_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = case_label_list_AST;
	}
Ejemplo n.º 18
0
	public void case_stmt() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST case_stmt_AST = null;

		try {      // for error handling
			case_label_list();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			unnamed_element_spec();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			AST tmp259_AST = null;
			tmp259_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp259_AST);
			match(SEMI);
			case_stmt_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_44_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = case_stmt_AST;
	}
Ejemplo n.º 19
0
	public void function_attribute(
		IDictionary attributes
	) //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST function_attribute_AST = null;

		try {      // for error handling
			switch ( LA(1) )
			{
			case LITERAL_callback:
			{
				AST tmp282_AST = null;
				tmp282_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp282_AST);
				match(LITERAL_callback);
				function_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_broadcast:
			{
				AST tmp283_AST = null;
				tmp283_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp283_AST);
				match(LITERAL_broadcast);
				function_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_ref:
			case LITERAL_unique:
			case LITERAL_ptr:
			{
				ptr_attr();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				function_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_string:
			{
				string_type();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				function_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_ignore:
			{
				AST tmp284_AST = null;
				tmp284_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp284_AST);
				match(LITERAL_ignore);
				function_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_context_handle:
			{
				AST tmp285_AST = null;
				tmp285_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp285_AST);
				match(LITERAL_context_handle);
				function_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_propget:
			{
				AST tmp286_AST = null;
				tmp286_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp286_AST);
				match(LITERAL_propget);
				if (0==inputState.guessing)
				{

								attributes.Add("propget", new CodeAttributeArgument());

				}
				function_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_propput:
			{
				AST tmp287_AST = null;
				tmp287_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp287_AST);
				match(LITERAL_propput);
				if (0==inputState.guessing)
				{

								attributes.Add("propput", new CodeAttributeArgument());

				}
				function_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_propputref:
			{
				AST tmp288_AST = null;
				tmp288_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp288_AST);
				match(LITERAL_propputref);
				if (0==inputState.guessing)
				{

								attributes.Add("propputref", new CodeAttributeArgument());

				}
				function_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_uidefault:
			{
				AST tmp289_AST = null;
				tmp289_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp289_AST);
				match(LITERAL_uidefault);
				function_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_usesgetlasterror:
			{
				AST tmp290_AST = null;
				tmp290_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp290_AST);
				match(LITERAL_usesgetlasterror);
				function_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_vararg:
			{
				AST tmp291_AST = null;
				tmp291_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp291_AST);
				match(LITERAL_vararg);
				function_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_uuid:
			case LITERAL_version:
			case LITERAL_async_uuid:
			case LITERAL_local:
			case LITERAL_object:
			case LITERAL_pointer_default:
			case LITERAL_endpoint:
			case LITERAL_odl:
			case LITERAL_optimize:
			case LITERAL_proxy:
			case LITERAL_aggregatable:
			case LITERAL_appobject:
			case LITERAL_bindable:
			case LITERAL_control:
			case LITERAL_custom:
			case LITERAL_default:
			case LITERAL_defaultbind:
			case LITERAL_defaultcollelem:
			case LITERAL_defaultvtable:
			case LITERAL_displaybind:
			case LITERAL_dllname:
			case LITERAL_dual:
			case LITERAL_entry:
			case LITERAL_helpcontext:
			case LITERAL_helpfile:
			case LITERAL_helpstring:
			case LITERAL_helpstringdll:
			case LITERAL_hidden:
			case LITERAL_id:
			case LITERAL_idempotent:
			case LITERAL_immediatebind:
			case LITERAL_lcid:
			case LITERAL_licensed:
			case LITERAL_message:
			case LITERAL_nonbrowsable:
			case LITERAL_noncreatable:
			case LITERAL_nonextensible:
			case LITERAL_oleautomation:
			case LITERAL_restricted:
			{
				attribute(attributes);
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				function_attribute_AST = currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			 }
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_12_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = function_attribute_AST;
	}
Ejemplo n.º 20
0
	public void opt_pos_int() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST opt_pos_int_AST = null;

		try {      // for error handling
			{
				switch ( LA(1) )
				{
				case COMMA:
				{
					AST tmp269_AST = null;
					tmp269_AST = astFactory.create(LT(1));
					astFactory.addASTChild(ref currentAST, tmp269_AST);
					match(COMMA);
					positive_int_const();
					if (0 == inputState.guessing)
					{
						astFactory.addASTChild(ref currentAST, returnAST);
					}
					break;
				}
				case GT:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				 }
			}
			opt_pos_int_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_47_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = opt_pos_int_AST;
	}
Ejemplo n.º 21
0
	public void except_dcl() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST except_dcl_AST = null;
		CodeTypeMemberCollection ignored = new CodeTypeMemberCollection();

		try {      // for error handling
			AST tmp16_AST = null;
			tmp16_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp16_AST);
			match(LITERAL_exception);
			identifier();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			AST tmp17_AST = null;
			tmp17_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp17_AST);
			match(LBRACE);
			{    // ( ... )*
				for (;;)
				{
					if ((tokenSet_3_.member(LA(1))))
					{
						member(ignored);
						if (0 == inputState.guessing)
						{
							astFactory.addASTChild(ref currentAST, returnAST);
						}
					}
					else
					{
						goto _loop195_breakloop;
					}

				}
_loop195_breakloop:				;
			}    // ( ... )*
			AST tmp18_AST = null;
			tmp18_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp18_AST);
			match(RBRACE);
			except_dcl_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_2_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = except_dcl_AST;
	}
Ejemplo n.º 22
0
	public void array_bounds() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST array_bounds_AST = null;

		try {      // for error handling
			switch ( LA(1) )
			{
			case LPAREN:
			case SCOPEOP:
			case PLUS:
			case MINUS:
			case TILDE:
			case LITERAL_TRUE:
			case LITERAL_true:
			case LITERAL_FALSE:
			case LITERAL_false:
			case INT:
			case HEX:
			case OCTAL:
			case LITERAL_L:
			case STRING_LITERAL:
			case CHAR_LITERAL:
			case IDENT:
			{
				array_bound();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				{
					switch ( LA(1) )
					{
					case RANGE:
					{
						AST tmp270_AST = null;
						tmp270_AST = astFactory.create(LT(1));
						astFactory.addASTChild(ref currentAST, tmp270_AST);
						match(RANGE);
						array_bound();
						if (0 == inputState.guessing)
						{
							astFactory.addASTChild(ref currentAST, returnAST);
						}
						break;
					}
					case RBRACKET:
					{
						break;
					}
					default:
					{
						throw new NoViableAltException(LT(1), getFilename());
					}
					 }
				}
				array_bounds_AST = currentAST.root;
				break;
			}
			case STAR:
			{
				AST tmp271_AST = null;
				tmp271_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp271_AST);
				match(STAR);
				array_bounds_AST = currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			 }
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_4_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = array_bounds_AST;
	}
Ejemplo n.º 23
0
	public void param_attribute(
		IDictionary attributes
	) //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST param_attribute_AST = null;

		try {      // for error handling
			switch ( LA(1) )
			{
			case LITERAL_in:
			{
				AST tmp297_AST = null;
				tmp297_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp297_AST);
				match(LITERAL_in);
				if (0==inputState.guessing)
				{
					attributes["in"] = true;
				}
				param_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_out:
			{
				AST tmp298_AST = null;
				tmp298_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp298_AST);
				match(LITERAL_out);
				if (0==inputState.guessing)
				{
					attributes["out"] = true;
				}
				param_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_retval:
			{
				AST tmp299_AST = null;
				tmp299_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp299_AST);
				match(LITERAL_retval);
				if (0==inputState.guessing)
				{
					attributes["retval"] = true;
				}
				param_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_defaultvalue:
			{
				AST tmp300_AST = null;
				tmp300_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp300_AST);
				match(LITERAL_defaultvalue);
				AST tmp301_AST = null;
				tmp301_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp301_AST);
				match(LPAREN);
				{ // ( ... )+
					int _cnt219=0;
					for (;;)
					{
						if ((tokenSet_7_.member(LA(1))))
						{
							AST tmp302_AST = null;
							tmp302_AST = astFactory.create(LT(1));
							astFactory.addASTChild(ref currentAST, tmp302_AST);
							matchNot(RPAREN);
						}
						else
						{
							if (_cnt219 >= 1) { goto _loop219_breakloop; } else { throw new NoViableAltException(LT(1), getFilename());; }
						}

						_cnt219++;
					}
_loop219_breakloop:					;
				}    // ( ... )+
				AST tmp303_AST = null;
				tmp303_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp303_AST);
				match(RPAREN);
				param_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_optional:
			{
				AST tmp304_AST = null;
				tmp304_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp304_AST);
				match(LITERAL_optional);
				param_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_readonly:
			{
				AST tmp305_AST = null;
				tmp305_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp305_AST);
				match(LITERAL_readonly);
				param_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_requestedit:
			{
				AST tmp306_AST = null;
				tmp306_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp306_AST);
				match(LITERAL_requestedit);
				param_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_iid_is:
			{
				AST tmp307_AST = null;
				tmp307_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp307_AST);
				match(LITERAL_iid_is);
				AST tmp308_AST = null;
				tmp308_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp308_AST);
				match(LPAREN);
				attr_vars();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				AST tmp309_AST = null;
				tmp309_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp309_AST);
				match(RPAREN);
				param_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_range:
			{
				AST tmp310_AST = null;
				tmp310_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp310_AST);
				match(LITERAL_range);
				AST tmp311_AST = null;
				tmp311_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp311_AST);
				match(LPAREN);
				integer_literal();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				AST tmp312_AST = null;
				tmp312_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp312_AST);
				match(COMMA);
				integer_literal();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				AST tmp313_AST = null;
				tmp313_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp313_AST);
				match(RPAREN);
				param_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_uuid:
			case LITERAL_version:
			case LITERAL_async_uuid:
			case LITERAL_local:
			case LITERAL_object:
			case LITERAL_pointer_default:
			case LITERAL_endpoint:
			case LITERAL_odl:
			case LITERAL_optimize:
			case LITERAL_proxy:
			case LITERAL_aggregatable:
			case LITERAL_appobject:
			case LITERAL_bindable:
			case LITERAL_control:
			case LITERAL_custom:
			case LITERAL_default:
			case LITERAL_defaultbind:
			case LITERAL_defaultcollelem:
			case LITERAL_defaultvtable:
			case LITERAL_displaybind:
			case LITERAL_dllname:
			case LITERAL_dual:
			case LITERAL_entry:
			case LITERAL_helpcontext:
			case LITERAL_helpfile:
			case LITERAL_helpstring:
			case LITERAL_helpstringdll:
			case LITERAL_hidden:
			case LITERAL_id:
			case LITERAL_idempotent:
			case LITERAL_immediatebind:
			case LITERAL_lcid:
			case LITERAL_licensed:
			case LITERAL_message:
			case LITERAL_nonbrowsable:
			case LITERAL_noncreatable:
			case LITERAL_nonextensible:
			case LITERAL_oleautomation:
			case LITERAL_restricted:
			case LITERAL_ref:
			case LITERAL_unique:
			case LITERAL_ptr:
			case LITERAL_string:
			case LITERAL_ignore:
			case LITERAL_size_is:
			case LITERAL_max_is:
			case LITERAL_length_is:
			case LITERAL_first_is:
			case LITERAL_last_is:
			case LITERAL_switch_is:
			case LITERAL_source:
			{
				field_attribute(attributes);
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				param_attribute_AST = currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			 }
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_12_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = param_attribute_AST;
	}
Ejemplo n.º 24
0
	public void const_dcl() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST const_dcl_AST = null;
		string ignored;

		try {      // for error handling
			AST tmp14_AST = null;
			tmp14_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp14_AST);
			match(LITERAL_const);
			const_type();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			identifier();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			AST tmp15_AST = null;
			tmp15_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp15_AST);
			match(ASSIGN);
			ignored=const_exp();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			const_dcl_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_2_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = const_dcl_AST;
	}
Ejemplo n.º 25
0
	public void field_attribute(
		IDictionary attributes
	) //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST field_attribute_AST = null;
		string val;

		try {      // for error handling
			switch ( LA(1) )
			{
			case LITERAL_ignore:
			{
				AST tmp314_AST = null;
				tmp314_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp314_AST);
				match(LITERAL_ignore);
				field_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_size_is:
			{
				AST tmp315_AST = null;
				tmp315_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp315_AST);
				match(LITERAL_size_is);
				AST tmp316_AST = null;
				tmp316_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp316_AST);
				match(LPAREN);
				{    // ( ... )*
					for (;;)
					{
						if ((LA(1)==STAR))
						{
							AST tmp317_AST = null;
							tmp317_AST = astFactory.create(LT(1));
							astFactory.addASTChild(ref currentAST, tmp317_AST);
							match(STAR);
						}
						else
						{
							goto _loop225_breakloop;
						}

					}
_loop225_breakloop:					;
				}    // ( ... )*
				val=const_exp();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				AST tmp318_AST = null;
				tmp318_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp318_AST);
				match(RPAREN);
				if (0==inputState.guessing)
				{
					attributes.Add("size_is", val);
				}
				field_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_max_is:
			{
				AST tmp319_AST = null;
				tmp319_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp319_AST);
				match(LITERAL_max_is);
				AST tmp320_AST = null;
				tmp320_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp320_AST);
				match(LPAREN);
				attr_vars();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				AST tmp321_AST = null;
				tmp321_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp321_AST);
				match(RPAREN);
				field_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_length_is:
			{
				AST tmp322_AST = null;
				tmp322_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp322_AST);
				match(LITERAL_length_is);
				AST tmp323_AST = null;
				tmp323_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp323_AST);
				match(LPAREN);
				attr_vars();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				AST tmp324_AST = null;
				tmp324_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp324_AST);
				match(RPAREN);
				field_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_first_is:
			{
				AST tmp325_AST = null;
				tmp325_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp325_AST);
				match(LITERAL_first_is);
				AST tmp326_AST = null;
				tmp326_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp326_AST);
				match(LPAREN);
				attr_vars();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				AST tmp327_AST = null;
				tmp327_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp327_AST);
				match(RPAREN);
				field_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_last_is:
			{
				AST tmp328_AST = null;
				tmp328_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp328_AST);
				match(LITERAL_last_is);
				AST tmp329_AST = null;
				tmp329_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp329_AST);
				match(LPAREN);
				attr_vars();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				AST tmp330_AST = null;
				tmp330_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp330_AST);
				match(RPAREN);
				field_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_switch_is:
			{
				AST tmp331_AST = null;
				tmp331_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp331_AST);
				match(LITERAL_switch_is);
				AST tmp332_AST = null;
				tmp332_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp332_AST);
				match(LPAREN);
				attr_var();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				AST tmp333_AST = null;
				tmp333_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp333_AST);
				match(RPAREN);
				field_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_source:
			{
				AST tmp334_AST = null;
				tmp334_AST = astFactory.create(LT(1));
				astFactory.addASTChild(ref currentAST, tmp334_AST);
				match(LITERAL_source);
				field_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_string:
			{
				string_type();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				if (0==inputState.guessing)
				{
					attributes.Add("string", new CodeAttributeArgument());
				}
				field_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_ref:
			case LITERAL_unique:
			case LITERAL_ptr:
			{
				ptr_attr();
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				field_attribute_AST = currentAST.root;
				break;
			}
			case LITERAL_uuid:
			case LITERAL_version:
			case LITERAL_async_uuid:
			case LITERAL_local:
			case LITERAL_object:
			case LITERAL_pointer_default:
			case LITERAL_endpoint:
			case LITERAL_odl:
			case LITERAL_optimize:
			case LITERAL_proxy:
			case LITERAL_aggregatable:
			case LITERAL_appobject:
			case LITERAL_bindable:
			case LITERAL_control:
			case LITERAL_custom:
			case LITERAL_default:
			case LITERAL_defaultbind:
			case LITERAL_defaultcollelem:
			case LITERAL_defaultvtable:
			case LITERAL_displaybind:
			case LITERAL_dllname:
			case LITERAL_dual:
			case LITERAL_entry:
			case LITERAL_helpcontext:
			case LITERAL_helpfile:
			case LITERAL_helpstring:
			case LITERAL_helpstringdll:
			case LITERAL_hidden:
			case LITERAL_id:
			case LITERAL_idempotent:
			case LITERAL_immediatebind:
			case LITERAL_lcid:
			case LITERAL_licensed:
			case LITERAL_message:
			case LITERAL_nonbrowsable:
			case LITERAL_noncreatable:
			case LITERAL_nonextensible:
			case LITERAL_oleautomation:
			case LITERAL_restricted:
			{
				attribute(attributes);
				if (0 == inputState.guessing)
				{
					astFactory.addASTChild(ref currentAST, returnAST);
				}
				field_attribute_AST = currentAST.root;
				break;
			}
			default:
			{
				throw new NoViableAltException(LT(1), getFilename());
			}
			 }
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_12_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = field_attribute_AST;
	}
Ejemplo n.º 26
0
	public void array_bound() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST array_bound_AST = null;

		try {      // for error handling
			positive_int_const();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			array_bound_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_48_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = array_bound_AST;
	}
Ejemplo n.º 27
0
	public void context_expr() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST context_expr_AST = null;

		try {      // for error handling
			AST tmp338_AST = null;
			tmp338_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp338_AST);
			match(LITERAL_context);
			AST tmp339_AST = null;
			tmp339_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp339_AST);
			match(LPAREN);
			string_literal_list();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			AST tmp340_AST = null;
			tmp340_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp340_AST);
			match(RPAREN);
			context_expr_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_16_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = context_expr_AST;
	}
Ejemplo n.º 28
0
	public void switch_body() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST switch_body_AST = null;

		try {      // for error handling
			case_stmt_list();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			switch_body_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_9_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = switch_body_AST;
	}
Ejemplo n.º 29
0
	public void library() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST library_AST = null;

		try {      // for error handling
			AST tmp20_AST = null;
			tmp20_AST = astFactory.create(LT(1));
			astFactory.makeASTRoot(ref currentAST, tmp20_AST);
			match(LITERAL_library);
			identifier();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			AST tmp21_AST = null;
			tmp21_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp21_AST);
			match(LBRACE);
			{ // ( ... )+
				int _cnt17=0;
				for (;;)
				{
					if ((tokenSet_0_.member(LA(1))))
					{
						definition();
						if (0 == inputState.guessing)
						{
							astFactory.addASTChild(ref currentAST, returnAST);
						}
					}
					else
					{
						if (_cnt17 >= 1) { goto _loop17_breakloop; } else { throw new NoViableAltException(LT(1), getFilename());; }
					}

					_cnt17++;
				}
_loop17_breakloop:				;
			}    // ( ... )+
			AST tmp22_AST = null;
			tmp22_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp22_AST);
			match(RBRACE);
			match(SEMI);
			library_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_1_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = library_AST;
	}
Ejemplo n.º 30
0
	public string  fixed_array_size() //throws RecognitionException, TokenStreamException
{
		string s;

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST fixed_array_size_AST = null;
		AST bounds_AST = null;
		s = string.Empty;

		try {      // for error handling
			AST tmp246_AST = null;
			tmp246_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp246_AST);
			match(LBRACKET);
			{
				switch ( LA(1) )
				{
				case LPAREN:
				case SCOPEOP:
				case STAR:
				case PLUS:
				case MINUS:
				case TILDE:
				case LITERAL_TRUE:
				case LITERAL_true:
				case LITERAL_FALSE:
				case LITERAL_false:
				case INT:
				case HEX:
				case OCTAL:
				case LITERAL_L:
				case STRING_LITERAL:
				case CHAR_LITERAL:
				case IDENT:
				{
					array_bounds();
					if (0 == inputState.guessing)
					{
						bounds_AST = (AST)returnAST;
						astFactory.addASTChild(ref currentAST, returnAST);
					}
					break;
				}
				case RBRACKET:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				 }
			}
			AST tmp247_AST = null;
			tmp247_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp247_AST);
			match(RBRACKET);
			if (0==inputState.guessing)
			{

							if (bounds_AST != null)
								s = bounds_AST.getText();

			}
			fixed_array_size_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_39_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = fixed_array_size_AST;
		return s;
	}
Ejemplo n.º 31
0
        public void table() //throws RecognitionException, TokenStreamException
        {
            returnAST = null;
            ASTPair currentAST = new ASTPair();
            AST     table_AST  = null;
            AST     r_AST      = null;

            try {          // for error handling
                AST tmp1_AST = null;
                tmp1_AST = astFactory.create(LT(1));
                astFactory.addASTChild(ref currentAST, tmp1_AST);
                match(TABLE);
                if (0 == inputState.guessing)
                {
                    m_bldr.Append("<list type=\"table\">");
                }
                {         // ( ... )+
                    int _cnt9 = 0;
                    for (;;)
                    {
                        if ((LA(1) == ROW))
                        {
                            row();
                            if (0 == inputState.guessing)
                            {
                                r_AST = (AST)returnAST;
                                astFactory.addASTChild(ref currentAST, returnAST);
                            }
                            if (0 == inputState.guessing)
                            {
                                m_bldr.Append(r_AST.getText());
                            }
                        }
                        else
                        {
                            if (_cnt9 >= 1)
                            {
                                goto _loop9_breakloop;
                            }
                            else
                            {
                                throw new NoViableAltException(LT(1), getFilename());;
                            }
                        }

                        _cnt9++;
                    }
                    _loop9_breakloop :;
                }            // ( ... )+
                AST tmp2_AST = null;
                tmp2_AST = astFactory.create(LT(1));
                astFactory.addASTChild(ref currentAST, tmp2_AST);
                match(RBRACE);
                if (0 == inputState.guessing)
                {
                    m_bldr.Append("</list>");
                }
                table_AST = currentAST.root;
            }
            catch (RecognitionException ex)
            {
                if (0 == inputState.guessing)
                {
                    reportError(ex);
                    recover(ex, tokenSet_1_);
                }
                else
                {
                    throw ex;
                }
            }
            returnAST = table_AST;
        }
Ejemplo n.º 32
0
	public CodeParameterDeclarationExpressionCollection  parameter_dcls() //throws RecognitionException, TokenStreamException
{
		CodeParameterDeclarationExpressionCollection paramColl;

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST parameter_dcls_AST = null;

				paramColl = new CodeParameterDeclarationExpressionCollection();
				CodeParameterDeclarationExpression param;


		try {      // for error handling
			match(LPAREN);
			{
				switch ( LA(1) )
				{
				case INT3264:
				case INT64:
				case LBRACKET:
				case SCOPEOP:
				case LITERAL_const:
				case LITERAL_signed:
				case LITERAL_unsigned:
				case LITERAL_octet:
				case LITERAL_any:
				case LITERAL_void:
				case LITERAL_byte:
				case LITERAL_wchar_t:
				case LITERAL_handle_t:
				case LITERAL_small:
				case LITERAL_short:
				case LITERAL_long:
				case LITERAL_int:
				case LITERAL_hyper:
				case LITERAL_char:
				case LITERAL_float:
				case LITERAL_double:
				case LITERAL_boolean:
				case LITERAL_string:
				case LITERAL_SAFEARRAY:
				case IDENT:
				{
					param=param_dcl();
					if (0 == inputState.guessing)
					{
						astFactory.addASTChild(ref currentAST, returnAST);
					}
					if (0==inputState.guessing)
					{
						paramColl.Add(param);
					}
					{    // ( ... )*
						for (;;)
						{
							if ((LA(1)==COMMA))
							{
								match(COMMA);
								param=param_dcl();
								if (0 == inputState.guessing)
								{
									astFactory.addASTChild(ref currentAST, returnAST);
								}
								if (0==inputState.guessing)
								{
									paramColl.Add(param);
								}
							}
							else
							{
								goto _loop208_breakloop;
							}

						}
_loop208_breakloop:						;
					}    // ( ... )*
					break;
				}
				case RPAREN:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				 }
			}
			match(RPAREN);
			parameter_dcls_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_51_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = parameter_dcls_AST;
		return paramColl;
	}
Ejemplo n.º 33
0
	public void param_type_spec() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST param_type_spec_AST = null;

		try {      // for error handling
			{
				switch ( LA(1) )
				{
				case INT3264:
				case INT64:
				case LITERAL_signed:
				case LITERAL_unsigned:
				case LITERAL_octet:
				case LITERAL_any:
				case LITERAL_void:
				case LITERAL_byte:
				case LITERAL_wchar_t:
				case LITERAL_handle_t:
				case LITERAL_small:
				case LITERAL_short:
				case LITERAL_long:
				case LITERAL_int:
				case LITERAL_hyper:
				case LITERAL_char:
				case LITERAL_float:
				case LITERAL_double:
				case LITERAL_boolean:
				{
					base_type_spec();
					if (0 == inputState.guessing)
					{
						astFactory.addASTChild(ref currentAST, returnAST);
					}
					break;
				}
				case LITERAL_string:
				{
					string_type();
					if (0 == inputState.guessing)
					{
						astFactory.addASTChild(ref currentAST, returnAST);
					}
					break;
				}
				case SCOPEOP:
				case IDENT:
				{
					scoped_name();
					if (0 == inputState.guessing)
					{
						astFactory.addASTChild(ref currentAST, returnAST);
					}
					{    // ( ... )*
						for (;;)
						{
							if ((LA(1)==STAR))
							{
								AST tmp272_AST = null;
								tmp272_AST = astFactory.create(LT(1));
								astFactory.addASTChild(ref currentAST, tmp272_AST);
								match(STAR);
							}
							else
							{
								goto _loop235_breakloop;
							}

						}
_loop235_breakloop:						;
					}    // ( ... )*
					break;
				}
				case LITERAL_SAFEARRAY:
				{
					AST tmp273_AST = null;
					tmp273_AST = astFactory.create(LT(1));
					astFactory.addASTChild(ref currentAST, tmp273_AST);
					match(LITERAL_SAFEARRAY);
					AST tmp274_AST = null;
					tmp274_AST = astFactory.create(LT(1));
					astFactory.addASTChild(ref currentAST, tmp274_AST);
					match(LPAREN);
					base_type_spec();
					if (0 == inputState.guessing)
					{
						astFactory.addASTChild(ref currentAST, returnAST);
					}
					AST tmp275_AST = null;
					tmp275_AST = astFactory.create(LT(1));
					astFactory.addASTChild(ref currentAST, tmp275_AST);
					match(RPAREN);
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				 }
			}
			param_type_spec_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_49_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = param_type_spec_AST;
	}
Ejemplo n.º 34
0
	public void n_e_case_list() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST n_e_case_list_AST = null;

		try {      // for error handling
			{ // ( ... )+
				int _cnt152=0;
				for (;;)
				{
					if ((LA(1)==LBRACKET))
					{
						n_e_case_stmt();
						if (0 == inputState.guessing)
						{
							astFactory.addASTChild(ref currentAST, returnAST);
						}
					}
					else
					{
						if (_cnt152 >= 1) { goto _loop152_breakloop; } else { throw new NoViableAltException(LT(1), getFilename());; }
					}

					_cnt152++;
				}
_loop152_breakloop:				;
			}    // ( ... )+
			n_e_case_list_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_9_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = n_e_case_list_AST;
	}
Ejemplo n.º 35
0
	public void function_attribute_list(
		IDictionary attributes
	) //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST function_attribute_list_AST = null;

		try {      // for error handling
			AST tmp276_AST = null;
			tmp276_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp276_AST);
			match(LBRACKET);
			{
				switch ( LA(1) )
				{
				case LITERAL_uuid:
				case LITERAL_version:
				case LITERAL_async_uuid:
				case LITERAL_local:
				case LITERAL_object:
				case LITERAL_pointer_default:
				case LITERAL_endpoint:
				case LITERAL_odl:
				case LITERAL_optimize:
				case LITERAL_proxy:
				case LITERAL_aggregatable:
				case LITERAL_appobject:
				case LITERAL_bindable:
				case LITERAL_control:
				case LITERAL_custom:
				case LITERAL_default:
				case LITERAL_defaultbind:
				case LITERAL_defaultcollelem:
				case LITERAL_defaultvtable:
				case LITERAL_displaybind:
				case LITERAL_dllname:
				case LITERAL_dual:
				case LITERAL_entry:
				case LITERAL_helpcontext:
				case LITERAL_helpfile:
				case LITERAL_helpstring:
				case LITERAL_helpstringdll:
				case LITERAL_hidden:
				case LITERAL_id:
				case LITERAL_idempotent:
				case LITERAL_immediatebind:
				case LITERAL_lcid:
				case LITERAL_licensed:
				case LITERAL_message:
				case LITERAL_nonbrowsable:
				case LITERAL_noncreatable:
				case LITERAL_nonextensible:
				case LITERAL_oleautomation:
				case LITERAL_restricted:
				case LITERAL_context_handle:
				case LITERAL_ref:
				case LITERAL_unique:
				case LITERAL_ptr:
				case LITERAL_string:
				case LITERAL_callback:
				case LITERAL_broadcast:
				case LITERAL_ignore:
				case LITERAL_propget:
				case LITERAL_propput:
				case LITERAL_propputref:
				case LITERAL_uidefault:
				case LITERAL_usesgetlasterror:
				case LITERAL_vararg:
				{
					function_attribute(attributes);
					if (0 == inputState.guessing)
					{
						astFactory.addASTChild(ref currentAST, returnAST);
					}
					{    // ( ... )*
						for (;;)
						{
							if ((LA(1)==COMMA))
							{
								AST tmp277_AST = null;
								tmp277_AST = astFactory.create(LT(1));
								astFactory.addASTChild(ref currentAST, tmp277_AST);
								match(COMMA);
								function_attribute(attributes);
								if (0 == inputState.guessing)
								{
									astFactory.addASTChild(ref currentAST, returnAST);
								}
							}
							else
							{
								goto _loop203_breakloop;
							}

						}
_loop203_breakloop:						;
					}    // ( ... )*
					break;
				}
				case RBRACKET:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(LT(1), getFilename());
				}
				 }
			}
			AST tmp278_AST = null;
			tmp278_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp278_AST);
			match(RBRACKET);
			function_attribute_list_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_50_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = function_attribute_list_AST;
	}
Ejemplo n.º 36
0
	public void sequence_type() //throws RecognitionException, TokenStreamException
{

		returnAST = null;
		ASTPair currentAST = new ASTPair();
		AST sequence_type_AST = null;

		try {      // for error handling
			AST tmp243_AST = null;
			tmp243_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp243_AST);
			match(LITERAL_sequence);
			AST tmp244_AST = null;
			tmp244_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp244_AST);
			match(LT_);
			simple_type_spec();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			opt_pos_int();
			if (0 == inputState.guessing)
			{
				astFactory.addASTChild(ref currentAST, returnAST);
			}
			AST tmp245_AST = null;
			tmp245_AST = astFactory.create(LT(1));
			astFactory.addASTChild(ref currentAST, tmp245_AST);
			match(GT);
			sequence_type_AST = currentAST.root;
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_36_);
			}
			else
			{
				throw ex;
			}
		}
		returnAST = sequence_type_AST;
	}