<?xml version="1.0"?>

<xs:schema 
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns="http://www.phpcompiler.org/phc-1.0"
	targetNamespace="http://www.phpcompiler.org/phc-1.0"
	elementFormDefault="qualified">

<!-- root element -->

<xs:element name="AST_php_script" type="AST_php_script"/>

<!-- built in support for attributes on nodes -->

<xs:complexType name="attrs">
	<xs:sequence minOccurs="0" maxOccurs="unbounded">
		<xs:element name="attr">
			<xs:complexType mixed="true">
				<xs:sequence minOccurs="0" maxOccurs="unbounded">
					<xs:any/>
				</xs:sequence>
				<xs:attribute name="key" type="xs:string"/>
			</xs:complexType>
		</xs:element>
	</xs:sequence>
</xs:complexType>

<!-- choice groups representing abstract class types -->

<xs:group name="AST_member">
<xs:choice>
<xs:element name="AST_method" type="AST_method" nillable="false"/>
<xs:element name="AST_attribute" type="AST_attribute" nillable="false"/>
</xs:choice>
</xs:group>

<xs:group name="AST_member_optional">
<xs:choice>
<xs:element name="AST_member" nillable="true"/> <!-- should only have xs:nill=true in instances -->
<xs:group ref="AST_member"/>
</xs:choice>
</xs:group>

<xs:group name="AST_statement">
<xs:choice>
<xs:element name="AST_if" type="AST_if" nillable="false"/>
<xs:element name="AST_while" type="AST_while" nillable="false"/>
<xs:element name="AST_do" type="AST_do" nillable="false"/>
<xs:element name="AST_for" type="AST_for" nillable="false"/>
<xs:element name="AST_foreach" type="AST_foreach" nillable="false"/>
<xs:element name="AST_switch" type="AST_switch" nillable="false"/>
<xs:element name="AST_break" type="AST_break" nillable="false"/>
<xs:element name="AST_continue" type="AST_continue" nillable="false"/>
<xs:element name="AST_return" type="AST_return" nillable="false"/>
<xs:element name="AST_static_declaration" type="AST_static_declaration" nillable="false"/>
<xs:element name="AST_unset" type="AST_unset" nillable="false"/>
<xs:element name="AST_declare" type="AST_declare" nillable="false"/>
<xs:element name="AST_try" type="AST_try" nillable="false"/>
<xs:element name="AST_throw" type="AST_throw" nillable="false"/>
<xs:element name="AST_eval_expr" type="AST_eval_expr" nillable="false"/>
</xs:choice>
</xs:group>

<xs:group name="AST_statement_optional">
<xs:choice>
<xs:element name="AST_statement" nillable="true"/> <!-- should only have xs:nill=true in instances -->
<xs:group ref="AST_statement"/>
</xs:choice>
</xs:group>

<xs:group name="AST_expr">
<xs:choice>
<xs:element name="AST_assignment" type="AST_assignment" nillable="false"/>
<xs:element name="AST_list_assignment" type="AST_list_assignment" nillable="false"/>
<xs:element name="AST_cast" type="AST_cast" nillable="false"/>
<xs:element name="AST_unary_op" type="AST_unary_op" nillable="false"/>
<xs:element name="AST_bin_op" type="AST_bin_op" nillable="false"/>
<xs:element name="AST_conditional_expr" type="AST_conditional_expr" nillable="false"/>
<xs:element name="AST_ignore_errors" type="AST_ignore_errors" nillable="false"/>
<xs:element name="AST_constant" type="AST_constant" nillable="false"/>
<xs:element name="AST_instanceof" type="AST_instanceof" nillable="false"/>
<xs:element name="AST_variable" type="AST_variable" nillable="false"/>
<xs:element name="AST_pre_op" type="AST_pre_op" nillable="false"/>
<xs:element name="AST_post_op" type="AST_post_op" nillable="false"/>
<xs:element name="AST_array" type="AST_array" nillable="false"/>
<xs:element name="AST_method_invocation" type="AST_method_invocation" nillable="false"/>
<xs:element name="AST_new" type="AST_new" nillable="false"/>
<xs:element name="AST_clone" type="AST_clone" nillable="false"/>
<xs:group ref="AST_literal"/>
</xs:choice>
</xs:group>

<xs:group name="AST_expr_optional">
<xs:choice>
<xs:element name="AST_expr" nillable="true"/> <!-- should only have xs:nill=true in instances -->
<xs:group ref="AST_expr"/>
</xs:choice>
</xs:group>

<xs:group name="AST_literal">
<xs:choice>
<xs:element name="Token_int" type="Token_int" nillable="false"/>
<xs:element name="Token_real" type="Token_real" nillable="false"/>
<xs:element name="Token_string" type="Token_string" nillable="false"/>
<xs:element name="Token_bool" type="Token_bool" nillable="false"/>
<xs:element name="Token_null" type="Token_null" nillable="false"/>
</xs:choice>
</xs:group>

<xs:group name="AST_literal_optional">
<xs:choice>
<xs:element name="AST_literal" nillable="true"/> <!-- should only have xs:nill=true in instances -->
<xs:group ref="AST_literal"/>
</xs:choice>
</xs:group>

<xs:group name="AST_list_element">
<xs:choice>
<xs:element name="AST_variable" type="AST_variable" nillable="false"/>
<xs:element name="AST_list_elements" type="AST_list_elements" nillable="false"/>
</xs:choice>
</xs:group>

<xs:group name="AST_list_element_optional">
<xs:choice>
<xs:element name="AST_list_element" nillable="true"/> <!-- should only have xs:nill=true in instances -->
<xs:group ref="AST_list_element"/>
</xs:choice>
</xs:group>

<xs:group name="AST_variable_name">
<xs:choice>
<xs:element name="Token_variable_name" type="Token_variable_name" nillable="false"/>
<xs:element name="AST_reflection" type="AST_reflection" nillable="false"/>
</xs:choice>
</xs:group>

<xs:group name="AST_variable_name_optional">
<xs:choice>
<xs:element name="AST_variable_name" nillable="true"/> <!-- should only have xs:nill=true in instances -->
<xs:group ref="AST_variable_name"/>
</xs:choice>
</xs:group>

<xs:group name="AST_target">
<xs:choice>
<xs:group ref="AST_expr"/>
<xs:element name="Token_class_name" type="Token_class_name" nillable="false"/>
</xs:choice>
</xs:group>

<xs:group name="AST_target_optional">
<xs:choice>
<xs:element name="AST_target" nillable="true"/> <!-- should only have xs:nill=true in instances -->
<xs:group ref="AST_target"/>
</xs:choice>
</xs:group>

<xs:group name="AST_method_name">
<xs:choice>
<xs:element name="Token_method_name" type="Token_method_name" nillable="false"/>
<xs:element name="AST_reflection" type="AST_reflection" nillable="false"/>
</xs:choice>
</xs:group>

<xs:group name="AST_method_name_optional">
<xs:choice>
<xs:element name="AST_method_name" nillable="true"/> <!-- should only have xs:nill=true in instances -->
<xs:group ref="AST_method_name"/>
</xs:choice>
</xs:group>

<xs:group name="AST_class_name">
<xs:choice>
<xs:element name="Token_class_name" type="Token_class_name" nillable="false"/>
<xs:element name="AST_reflection" type="AST_reflection" nillable="false"/>
</xs:choice>
</xs:group>

<xs:group name="AST_class_name_optional">
<xs:choice>
<xs:element name="AST_class_name" nillable="true"/> <!-- should only have xs:nill=true in instances -->
<xs:group ref="AST_class_name"/>
</xs:choice>
</xs:group>



<!-- complex types representing lists -->

<xs:complexType name="AST_interface_def_list">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="AST_interface_def" type="AST_interface_def" nillable="false"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_class_def_list">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="AST_class_def" type="AST_class_def" nillable="false"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Token_interface_name_list">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="Token_interface_name" type="Token_interface_name" nillable="false"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_member_list">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group ref="AST_member"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_statement_list">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group ref="AST_statement"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_formal_parameter_list">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="AST_formal_parameter" type="AST_formal_parameter" nillable="false"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_switch_case_list">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="AST_switch_case" type="AST_switch_case" nillable="false"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_directive_list">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="AST_directive" type="AST_directive" nillable="false"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_catch_list">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="AST_catch" type="AST_catch" nillable="false"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_list_element_list_optionals">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group ref="AST_list_element_optional"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_expr_list_optionals">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group ref="AST_expr_optional"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_array_elem_list">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="AST_array_elem" type="AST_array_elem" nillable="false"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_actual_parameter_list">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="AST_actual_parameter" type="AST_actual_parameter" nillable="false"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>



<!-- complex types for concrete classes (compound rules) -->

<xs:complexType name="AST_php_script">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="AST_interface_def_list" type="AST_interface_def_list" nillable="false"/>
<xs:element name="AST_class_def_list" type="AST_class_def_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_interface_def">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="Token_interface_name" type="Token_interface_name" nillable="false"/>
<xs:element name="Token_interface_name_list" type="Token_interface_name_list" nillable="false"/>
<xs:element name="AST_member_list" type="AST_member_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_class_def">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="AST_class_mod" type="AST_class_mod" nillable="false"/>
<xs:element name="Token_class_name" type="Token_class_name" nillable="false"/>
<xs:element name="Token_class_name" type="Token_class_name" nillable="true"/>
<xs:element name="Token_interface_name_list" type="Token_interface_name_list" nillable="false"/>
<xs:element name="AST_member_list" type="AST_member_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_class_mod">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_method">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="AST_signature" type="AST_signature" nillable="false"/>
<xs:element name="AST_statement_list" type="AST_statement_list" nillable="true"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_signature">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="AST_method_mod" type="AST_method_mod" nillable="false"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:element name="Token_method_name" type="Token_method_name" nillable="false"/>
<xs:element name="AST_formal_parameter_list" type="AST_formal_parameter_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_method_mod">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_formal_parameter">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="AST_type" type="AST_type" nillable="false"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:element name="Token_variable_name" type="Token_variable_name" nillable="false"/>
<xs:group ref="AST_expr_optional"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_type">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:element name="Token_class_name" type="Token_class_name" nillable="true"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_attribute">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="AST_attr_mod" type="AST_attr_mod" nillable="false"/>
<xs:element name="Token_variable_name" type="Token_variable_name" nillable="false"/>
<xs:group ref="AST_expr_optional"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_attr_mod">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_if">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr"/>
<xs:element name="AST_statement_list" type="AST_statement_list" nillable="false"/>
<xs:element name="AST_statement_list" type="AST_statement_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_while">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr"/>
<xs:element name="AST_statement_list" type="AST_statement_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_do">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="AST_statement_list" type="AST_statement_list" nillable="false"/>
<xs:group ref="AST_expr"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_for">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr_optional"/>
<xs:group ref="AST_expr_optional"/>
<xs:group ref="AST_expr_optional"/>
<xs:element name="AST_statement_list" type="AST_statement_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_foreach">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr"/>
<xs:element name="AST_variable" type="AST_variable" nillable="true"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:element name="AST_variable" type="AST_variable" nillable="false"/>
<xs:element name="AST_statement_list" type="AST_statement_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_switch">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr"/>
<xs:element name="AST_switch_case_list" type="AST_switch_case_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_switch_case">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr_optional"/>
<xs:element name="AST_statement_list" type="AST_statement_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_break">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr_optional"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_continue">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr_optional"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_return">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr_optional"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_static_declaration">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="Token_variable_name" type="Token_variable_name" nillable="false"/>
<xs:group ref="AST_expr_optional"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_unset">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="AST_variable" type="AST_variable" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_declare">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="AST_directive_list" type="AST_directive_list" nillable="false"/>
<xs:element name="AST_statement_list" type="AST_statement_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_directive">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="Token_directive_name" type="Token_directive_name" nillable="false"/>
<xs:group ref="AST_expr"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_try">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="AST_statement_list" type="AST_statement_list" nillable="false"/>
<xs:element name="AST_catch_list" type="AST_catch_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_catch">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="Token_class_name" type="Token_class_name" nillable="false"/>
<xs:element name="Token_variable_name" type="Token_variable_name" nillable="false"/>
<xs:element name="AST_statement_list" type="AST_statement_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_throw">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_eval_expr">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_assignment">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="AST_variable" type="AST_variable" nillable="false"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:group ref="AST_expr"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_list_assignment">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="AST_list_elements" type="AST_list_elements" nillable="false"/>
<xs:group ref="AST_expr"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_list_elements">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="AST_list_element_list" type="AST_list_element_list_optionals" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_cast">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="Token_cast" type="Token_cast" nillable="false"/>
<xs:group ref="AST_expr"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_unary_op">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="Token_op" type="Token_op" nillable="false"/>
<xs:group ref="AST_expr"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_bin_op">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr"/>
<xs:element name="Token_op" type="Token_op" nillable="false"/>
<xs:group ref="AST_expr"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_conditional_expr">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr"/>
<xs:group ref="AST_expr"/>
<xs:group ref="AST_expr"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_ignore_errors">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_constant">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="Token_class_name" type="Token_class_name" nillable="false"/>
<xs:element name="Token_constant_name" type="Token_constant_name" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_instanceof">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr"/>
<xs:group ref="AST_class_name"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_variable">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_target_optional"/>
<xs:group ref="AST_variable_name"/>
<xs:element name="AST_expr_list" type="AST_expr_list_optionals" nillable="false"/>
<xs:group ref="AST_expr_optional"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_reflection">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_pre_op">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="Token_op" type="Token_op" nillable="false"/>
<xs:element name="AST_variable" type="AST_variable" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_post_op">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="AST_variable" type="AST_variable" nillable="false"/>
<xs:element name="Token_op" type="Token_op" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_array">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="AST_array_elem_list" type="AST_array_elem_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_array_elem">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr_optional"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:group ref="AST_expr"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_method_invocation">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_target"/>
<xs:group ref="AST_method_name"/>
<xs:element name="AST_actual_parameter_list" type="AST_actual_parameter_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_actual_parameter">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="bool" type="xs:boolean" nillable="false"/>
<xs:group ref="AST_expr"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_new">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_class_name"/>
<xs:element name="AST_actual_parameter_list" type="AST_actual_parameter_list" nillable="false"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AST_clone">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:group ref="AST_expr"/>
</xs:sequence>
</xs:complexType>



<!-- complex types for terminal symbols -->

<xs:complexType name="encoded_string">
	<xs:simpleContent>
		<xs:extension base="xs:string">
			<xs:attribute name="encoding" type="xs:string" default="none"/>
		</xs:extension>
	</xs:simpleContent>
</xs:complexType>

<xs:complexType name="Token_interface_name">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="value" type="encoded_string"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Token_class_name">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="value" type="encoded_string"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Token_method_name">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="value" type="encoded_string"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Token_variable_name">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="value" type="encoded_string"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Token_directive_name">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="value" type="encoded_string"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Token_int">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="value" type="encoded_string"/>
<xs:element name="source_rep" type="encoded_string"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Token_real">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="value" type="encoded_string"/>
<xs:element name="source_rep" type="encoded_string"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Token_string">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="value" type="encoded_string"/>
<xs:element name="source_rep" type="encoded_string"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Token_bool">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="value" type="encoded_string"/>
<xs:element name="source_rep" type="encoded_string"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Token_null">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="source_rep" type="encoded_string"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Token_cast">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="value" type="encoded_string"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Token_op">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="value" type="encoded_string"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Token_constant_name">
<xs:sequence>
<xs:element name="attrs" type="attrs"/>
<xs:element name="value" type="encoded_string"/>
</xs:sequence>
</xs:complexType>

</xs:schema>