protected Ast ParseInput(String code, int whichKind)
	{
		java.io.StringReader codeStream;
		Yylex lexerObj;
		Ast programElement;
		java_cup.runtime.Symbol parseTree = null;
		
		codeStream = new java.io.StringReader(code);
		lexerObj = new Yylex(codeStream);
		
		try
		{
			if(whichKind == PROCEDURE)
			{
				ProcedureParser parserObj = new ProcedureParser();
				parserObj.assignLex(lexerObj);
			
				if(debug)
				{
					parseTree = parserObj.debug_parse();
				}
				else
				{
					parseTree = parserObj.parse();
				}
			}
			if(whichKind == CALL_EXP)
			{
				CallParser parserObj = new CallParser();
				parserObj.assignLex(lexerObj);
			
				if(debug)
				{
					parseTree = parserObj.debug_parse();
				}
				else
				{
					parseTree = parserObj.parse();
				}
			}
			if(whichKind == PROGRAM)
			{
				ProgramParser parserObj = new ProgramParser();
				parserObj.assignLex(lexerObj);
			
				if(debug)
				{
					parseTree = parserObj.debug_parse();
				}
				else
				{
					parseTree = parserObj.parse();
				}
			}
			
			if(parseTree == null)
			{
				programElement = null;
			}
			else
			{
				programElement = (Ast)(parseTree.value);
			}
		}
		catch(Exception e1)
		{
			Output("SYNTAX ERROR: " + e1.getMessage() + "\n");
			programElement = null;
		}
		
		return programElement;
	}