%{	/* asc.y -- written by Alexis WILKE for Made to Order Software Corp. (c) 2005-2007 */
	/* grammar parser for SSWF Action Scripts */

/*

Copyright (c) 2005-2007 Made to Order Software Corp.

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and
associated documentation files (the "Software"), to
deal in the Software without restriction, including
without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice
shall be included in all copies or substantial
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

*/


#include	"sswf.h"

#define	YYPARSE_PARAM		result
static	void			yyerror(const char *msg);



%}



%union
{
	struct node_t		*node;
	int			unused;
};


/* terminals */

%token	<node>		ABSTRACT
%token	<node>		AS
%token	<node>		ASSIGNMENT_OPERATOR		// = := **= *= %/= %= += -= <<= >>= >>>= !<= !>= &= ^= |= &&= ^^= ||= <?= >?=
%token	<node>		BREAK
%token	<node>		CASE
%token	<node>		CATCH
%token	<node>		CLASS
%token	<node>		CONTINUE
%token	<node>		DECREMENT			// --
%token	<node>		DEFAULT
%token	<node>		DELETE
%token	<node>		DO
%token	<node>		DYNAMIC
%token	<node>		ELIPSIS				// ...
%token	<node>		ELSE
%token	<node>		EQUAL				// ==
%token	<node>		EXACTLY_EQUAL			// ===
%token	<node>		EXACTLY_NOT_EQUAL		// !==
%token	<node>		EXTENDS
%token	<node>		FALSE
%token	<node>		FINAL
%token	<node>		FINALLY
%token	<node>		FOR
%token	<node>		FUNCTION
%token	<node>		GET
%token	<node>		GOTO
%token	<node>		GREATER_EQUAL			// >=
%token	<node>		IDENTIFIER
%token	<node>		IF
%token	<node>		IMPLEMENTS
%token	<node>		IMPORT
%token	<node>		IN
%token	<node>		INCREMENT			// ++
%token	<node>		INSTANCEOF
%token	<node>		INTERFACE
%token	<node>		INTRINSIC
%token	<node>		INTRINSIC_TYPE
%token	<node>		IS
%token	<node>		LESS_EQUAL			// <=
%token	<node>		LOGICAL_AND			// &&
%token	<node>		LOGICAL_OR			// ||
%token	<node>		LOGICAL_XOR			// ^^
%token	<node>		MAX				// >?
%token	<node>		MIN				// <?
%token	<node>		NAMESPACE
%token	<node>		NEW
%token	<node>		NOT_EQUAL			// !=
%token	<node>		NULL_LITERAL			// null
%token	<node>		NUMERIC				// %[0-9]\.[0-9][eE][+-][0-9]
%token	<node>		OVERRIDE
%token	<node>		PACKAGE
%token	<node>		POWER				// **
%token	<node>		PRIVATE
%token	<node>		PROTECTED
%token	<node>		PUBLIC
%token	<node>		RETURN
%token	<node>		ROTATE_LEFT			// !<
%token	<node>		ROTATE_RIGHT			// !>
%token	<node>		SCOPE				// ::
%token	<node>		SET
%token	<node>		SHIFT_LEFT			// <<
%token	<node>		SHIFT_RIGHT			// >>
%token	<node>		SHIFT_RIGHT_UNSIGNED		// >>>
%token	<node>		STATIC
%token	<node>		STRING				// ".*" or '.*'
%token	<node>		SUPER
%token	<node>		SWITCH
%token	<node>		THIS
%token	<node>		THROW
%token	<node>		TRY
%token	<node>		TRUE
%token	<node>		TYPEOF
%token	<node>		UNDEFINED
%token	<node>		USE
%token	<node>		VAR
%token	<node>		VIRTUAL
%token	<node>		VOID
%token	<node>		VOLATILE
%token	<node>		WITH
%token	<node>		WHILE



/* all these yacc expressions are nodes */
%type	<node>		variable_statement




%%

/**** START ****/
start:
	  program
	  {
	  }
	| package
	  {
	  }
	;



package:
	  PACKAGE package_name '{' program '}'
	  {
	  }
	;


package_name:
	  STRING
	  {
	  }
	| package_identifiers
	  {
	  }
	;

package_identifiers:
	  IDENTIFIER
	  {
	  }
	| package_identifiers '.' IDENTIFIER
	  {
	  }
	;


import_name_any:
	  package_name
	  {
	  }
	| package_identifiers '.' '*'
	  {
	  }
	;


import_name:
	  import_name_any
	  {
	  }
	| IDENTIFIER '=' import_name_any
	  {
	  }
	;


import_name_list:
	  import_name
	  {
	  }
	| import_name_list ',' import_name
	  {
	  }
	;


program:
	  source_element_list
	  {
	  }
	| import_list source_element_list
	  {
	  }
	;



import_list:
	  import
	  {
	  }
	| import_list import
	  {
	  }
	;


import:
	  IMPORT import_name_list
	  {
	  }
	| USE NAMESPACE import_name_list
	  {
	  }
	;



source_element_list:
	  source_element
	  {
	  }
	| source_element_list source_element
	  {
	  }
	;

source_element:
	  statement
	  {
	  }
	| function_declaration
	  {
	  }
	| object_declaration
	  {
	  }
	| pragma
	  {
	  }
	;



pragma:
	  USE pragma_item_list
	  {
	  }
	;

pragma_item_list:
	  pragma_item
	  {
	  }
	| pragma_item_list ',' pragma_item
	  {
	  }
	;


pragma_item:
	  pragma_expr
	  {
	  }
	| pragma_expr '?'
	  {
	  }
	;


pragma_expr:
	  IDENTIFIER
	  {
	  }
	| IDENTIFIER '(' pragma_argument ')'
	  {
	  }
	;


pragma_argument:
	  TRUE
	  {
	  }
	| FALSE
	  {
	  }
	| NUMERIC
	  {
	  }
	| '-' NUMERIC
	  {
	  }
	| STRING
	  {
	  }
	;


// a valid declaration includes a name; a valid expression doesn't
function_declaration:
	  FUNCTION get_set_opt name_opt '(' variable_arguments ')' typed_opt '{' function_body '}'
	  {
	  }
	| FUNCTION get_set_opt name_opt '(' ')' typed_opt '{' function_body '}'
	  {
	  }
	;


abstract_function_declaration:
	  FUNCTION get_set_opt name_opt '(' variable_arguments ')' typed_opt
	  {
	  }
	| FUNCTION get_set_opt name_opt '(' ')' typed_opt
	  {
	  }
	;




name_opt:
	  /* EMPTY */
	  {
	  }
	| IDENTIFIER
	  {
	  }
	;

// NOTE: the GET and SET must be viewed as IDENTIFIERs and not reserved
// keywords
get_set_opt:
	  /* EMPTY */
	  {
	  }
	| GET
	  {
	  }
	| SET
	  {
	  }
	;


typed_opt:
	  /* EMPTY */
	  {
	  }
	| ':' IDENTIFIER
	  {
	  }
	| ':' INTRINSIC_TYPE /* such as int, char, long... */
	  {
	  }
	;



function_body:
	  source_element_list
	  {
	  }
	;




object_declaration:
	  qualifier_opt CLASS IDENTIFIER extends_opt implements_opt class_definition
	  {
	  }
	| INTERFACE IDENTIFIER extends_opt class_definition
	  {
	  }
	;


qualifier_opt:
	  /* EMPTY */
	  {
	  }
	| DYNAMIC
	  {
	  }
	| INTRINSIC
	  {
	  }
	;

extends_opt:
	  /* EMPTY */
	  {
	  }
	| EXTENDS IDENTIFIER
	  {
	  }
	;

implements_opt:
	  /* EMPTY */
	  {
	  }
	| IMPLEMENTS identifier_list
	  {
	  }
	;

identifier_list:
	  IDENTIFIER
	  {
	  }
	| identifier_list ',' IDENTIFIER
	  {
	  }
	;


class_definition:
	  '{' '}'
	  {
	  }
	| '{' qualified_class_element_list '}'
	  {
	  }
	;


qualified_class_element_list:
	  qualified_class_element
	  {
	  }
	| qualified_class_element_list qualified_class_element
	  {
	  }
	;


qualified_class_element:
	  PRIVATE class_element
	  {
	  }
	| PUBLIC class_element
	  {
	  }
	| PROTECTED class_element
	  {
	  }
	| FINAL class_element
	  {
	  }
	| STATIC class_element
	  {
	  }
	| VIRTUAL class_element
	  {
	  }
	| VOLATILE class_element
	  {
	  }
	| OVERRIDE class_element
	  {
	  }
	| OVERRIDE '(' boolean_literal ')' class_element
	  {
	  }
	| OVERRIDE '(' UNDEFINED ')' class_element
	  {
	  }
	| class_element
	  {
	  }
	;


class_element:
	  /* NOTE: function declarations not allowed in interfaces */
	  function_declaration
	  {
	  }
	| abstract_function_declaration
	  {
	  }
	| ABSTRACT abstract_function_declaration
	  {
	  }
	| object_declaration
	  {
	  }
	| variable_statement
	  {
	  }
	;


statement:
	  block
	  {
	  }
	| variable_statement
	  {
	  }
	| empty_statement
	  {
	  }
	| expression_statement
	  {
	  }
	| if_statement
	  {
	  }
	| iteration_statement
	  {
	  }
	| continue_statement
	  {
	  }
	| break_statement
	  {
	  }
	| return_statement
	  {
	  }
	| with_statement
	  {
	  }
	| labelled_statement
	  {
	  }
	| goto_statement
	  {
	  }
	| switch_statement
	  {
	  }
	| case_clause_statement
	  {
	  }
	| throw_statement
	  {
	  }
	| try_statement
	  {
	  }
	| catch_statement
	  {
	  }
	| finally_statement
	  {
	  }
	| super_statement
	  {
	  }
	;


block:
	  '{' '}'
	  {
	  }
	| '{' statement_list '}'
	  {
	  }
	;


statement_list:
	  statement
	  {
	  }
	| statement_list statement
	  {
	  }
	;


variable_statement:
	  // TODO: see whether the ';' is mandatory for 'var'
	  VAR variable_declaration_list ';'
	;


variable_arguments:
	  var_statement_or_declaration_list
	  {
	  }
	| var_statement_or_declaration_list ',' ELIPSIS
	  {
	  }
	;



var_statement_or_declaration_list:
	  var_statement_or_declaration
	  {
	  }
	| var_statement_or_declaration_list var_statement_or_declaration
	  {
	  }
	;


var_statement_or_declaration:
	  VAR variable_declaration
	  {
	  }
	| variable_declaration
	  {
	  }
	;


variable_declaration_list:
	  variable_declaration
	  {
	  }
	| variable_declaration_list ',' variable_declaration
	  {
	  }
	;


variable_declaration_list_no_in:
	  variable_declaration_no_in
	  {
	  }
	| variable_declaration_list_no_in ',' variable_declaration_no_in
	  {
	  }
	;


variable_declaration:
	  IDENTIFIER typed_opt
	  {
	  }
	| IDENTIFIER typed_opt initializer
	  {
	  }
	;


variable_declaration_no_in:
	  IDENTIFIER typed_opt
	  {
	  }
	| IDENTIFIER typed_opt initializer_no_in
	  {
	  }
	;


initializer:
	  '=' assignment_expression
	  {
	  }
	;


initializer_no_in:
	  '=' assignment_expression_no_in
	  {
	  }
	;



empty_statement:
	  ';'
	;



expression_statement:
	  // BUT NOT '{' or FUNCTION
	  expression ';'
	  {
	  }
	;


if_statement:
	  IF list_parenthesis_expression statement ELSE statement
	  {
	  }
	| IF list_parenthesis_expression statement
	  {
	  }
	;


iteration_statement:
	  DO statement WHILE list_parenthesis_expression ';'
	  {
	  }
	| WHILE list_parenthesis_expression statement
	  {
	  }
	| FOR '(' expression_no_in_opt ';' expression_no_in_opt ';' expression_no_in_opt ')' statement
	  {
	  }
	| FOR '(' VAR variable_declaration_list_no_in ';' expression_no_in_opt ';' expression_no_in_opt ')' statement
	  {
	  }
	| FOR '(' postfix_expression IN expression ')' statement
	  {
	  }
	| FOR '(' VAR variable_declaration_list_no_in IN expression ')' statement
	  {
	  }
	;



continue_statement:
	  CONTINUE
	  {
	  }
	| CONTINUE /*no line terminator*/ IDENTIFIER
	  {
	  }
	;


break_statement:
	  BREAK
	  {
	  }
	| BREAK /*no line terminator*/ IDENTIFIER
	  {
	  }
	;


return_statement:
	  RETURN
	  {
	  }
	| RETURN /*no line terminator*/ expression
	  {
	  }
	;





with_statement:
	  WITH list_parenthesis_expression statement
	  {
	  }
	;


switch_statement:
	  SWITCH list_parenthesis_expression block
	  {
	  }
	;



case_clause_statement:
	  CASE expression ':'
	  {
	  }
	| DEFAULT ':'
	  {
	  }
	;



labelled_statement:
	  IDENTIFIER ':'
	  {
	  }
	;


goto_statement:
	  GOTO IDENTIFIER
	  {
	  }
	;


throw_statement:
	  THROW /*no line terminator*/ expression
	  {
	  }
	;


try_statement:
	  TRY block
	  {
	  }
	;


catch_statement:
	  CATCH '(' IDENTIFIER typed_opt ')' block
	  {
	  }
	;


finally_statement:
	  FINALLY block
	  {
	  }
	;


super_statement:
	  SUPER arguments
	  {
	  }
	;



/* IDENTIFIER includes some special identifiers as follow:
	[_]parent
	[_]root
	[_]quality
	[_]global
	[_]level
	NaN
	Infinity
	pi
	e
*/

simple_qualified_identifier:
	  IDENTIFIER
	  {
	  }
	| IDENTIFIER SCOPE IDENTIFIER
	  {
	  }
	| reserved_namespace SCOPE IDENTIFIER
	;



expression_qualified_identifier:
	  parenthesis_expression SCOPE IDENTIFIER
	  {
	  }
	;



qualified_identifier:
	  simple_qualified_identifier
	  {
	  }
	| expression_qualified_identifier
	  {
	  }
	;



primary_expression:
	  THIS
	  {
	  }
	| literal
	  {
	  }
	| array_literal
	  {
	  }
	| object_literal
	  {
	  }
	| list_parenthesis_expression
	  {
	  }
	| reserved_namespace
	  {
	  }
	;

literal:
	  NULL_LITERAL
	  {
	  }
	| UNDEFINED
	  {
	  }
	| boolean_literal
	  {
	  }
	| NUMERIC
	  {
	  }
	| STRING
	  {
	  }
	;


boolean_literal:
	  TRUE
	  {
	  }
	| FALSE
	  {
	  }
	;




parenthesis_expression:
	  '(' assignment_expression ')'
	  {
	  }
	;


list_parenthesis_expression:
	  '(' expression ')'
	  {
	  }
	;


parenthesis_expression_with_rest:
	  parenthesis_expression
	  {
	  }
	| '('  ')'
	  {
	  }
	| '(' expression_with_rest ')'
	  {
	  }
	;


expression_with_rest:
	  expression ',' rest_expression
	  {
	  }
	| rest_expression
	  {
	  }
	;


rest_expression:
	  ELIPSIS assignment_expression
	  {
	  }
	;


reserved_namespace:
	  PRIVATE
	  {
	  }
	| PUBLIC
	  {
	  }
	;



array_literal:
	  '[' ']'
	  {
	  }
	| '[' elision ']'
	  {
	  }
	| '[' element_list ']'
	  {
	  }
	| '[' element_list elision ']'
	  {
	  }
	;


element_list:
	  assignment_expression
	  {
	  }
	| elision assignment_expression
	  {
	  }
	| element_list elision assignment_expression
	  {
	  }
	;


elision:
	  ','
	  {
	  }
	| elision ','
	  {
	  }
	;


object_literal:
	  '{' '}'
	  {
	  }
	| '{' property_name_and_value_list '}'
	  {
	  }
	;


property_name_and_value_list:
	  property
	  {
	  }
	| property_name_and_value_list ',' property
	  {
	  }
	;

property:
	  property_name ':' assignment_expression
	  {
	  }
	;


property_name:
	  qualified_identifier
	  {
	  }
	| STRING
	  {
	  }
	| NUMERIC
	  {
	  }
	| parenthesis_expression
	  {
	  }
	;



super_expression:
	  SUPER
	  {
	  }
	| SUPER parenthesis_expression
	  {
	  }
	;


/*

function_expression:
	  function_declaration
	  {
	  }
	;

member_expression:
	  primary_expression
	  {
	  }
	| function_expression
	  {
	  }
	| member_expression '[' expression ']'
	  {
	  }
	| member_expression '.' IDENTIFIER
	  {
	  }
	| NEW member_expression arguments
	  {
	  }
	;


new_expression:
	  member_expression
	  {
	  }
	| NEW new_expression
	  {
	  }
	;



// NOTE: if call_expression represents a type, the call is a cast
call_expression:
	  member_expression arguments
	  {
	  }
	| call_expression arguments
	  {
	  }
	| call_expression '[' expression ']'
	  {
	  }
	| call_expression '.' IDENTIFIER
	  {
	  }
	;





left_hand_side_expression:
	  new_expression
	  {
	  }
	| call_expression
	  {
	  }
	;


postfix_expression:
	  left_hand_side_expression
	  {
	  }
	| left_hand_side_expression INCREMENT
	  {
	  }
	| left_hand_side_expression DECREMENT
	  {
	  }
	;

*/


brackets:
	  '[' ']'
	  {
	  }
	| '[' expression_with_rest ']'
	  {
	  }
	;


arguments:
	  '(' ')'
	  {
	  }
	| parenthesis_expression_with_rest
	  {
	  }
	;

full_new_expression:
	  NEW full_new_subexpression arguments
	  {
	  }
	;

full_new_subexpression:
	  primary_expression
	  {
	  }
	| qualified_identifier
	  {
	  }
	| full_new_expression
	  {
	  }
	| full_new_subexpression property_operator
	  {
	  }
	| super_expression property_operator
	  {
	  }
	;

short_new_subexpression:
	  full_new_subexpression
	  {
	  }
	| short_new_expression
	  {
	  }
	;


short_new_expression:
	  NEW short_new_subexpression
	  {
	  }
	;


attribute_expression:
	  simple_qualified_identifier
	  {
	  }
	| attribute_expression property_operator
	  {
	  }
	| attribute_expression arguments
	  {
	  }
	;



property_operator:
	  '.' qualified_identifier
	  {
	  }
	| brackets
	  {
	  }
	;



full_postfix_expression:
	  primary_expression
	  {
	  }
	| expression_qualified_identifier
	  {
	  }
	| full_new_expression
	  {
	  }
	| full_postfix_expression property_operator
	  {
	  }
	| super_expression property_operator
	  {
	  }
	| full_postfix_expression arguments
	  {
	  }
	| postfix_expression INCREMENT
	  {
	  }
	| postfix_expression DECREMENT
	  {
	  }
	;


postfix_expression:
	  attribute_expression
	  {
	  }
	| full_postfix_expression
	  {
	  }
	| short_new_expression
	  {
	  }
	;




unary_expression:
	  postfix_expression
	  {
	  }
	| DELETE unary_expression
	  {
	  }
	| VOID unary_expression
	  {
	  }
	| TYPEOF unary_expression
	  {
	  }
	| INCREMENT unary_expression
	  {
	  }
	| DECREMENT unary_expression
	  {
	  }
	| '+' unary_expression
	  {
	  }
	| '-' unary_expression
	  {
	  }
	| '~' unary_expression
	  {
	  }
	| '!' unary_expression
	  {
	  }
	;


power_expression:
	  unary_expression
	  {
	  }
	| unary_expression POWER power_expression
	  {
	  }
	;


multiplicative_expression:
	  power_expression
	  {
	  }
	| multiplicative_expression '*' power_expression
	  {
	  }
	| multiplicative_expression '/' power_expression
	  {
	  }
	| multiplicative_expression '%' unary_expression
	  {
	  }
	;



additive_expression:
	  multiplicative_expression
	  {
	  }
	| additive_expression '+' multiplicative_expression
	  {
	  }
	| additive_expression '-' multiplicative_expression
	  {
	  }
	;



shift_expression:
	  additive_expression
	  {
	  }
	| shift_expression SHIFT_LEFT additive_expression
	  {
	  }
	| shift_expression SHIFT_RIGHT additive_expression
	  {
	  }
	| shift_expression SHIFT_RIGHT_UNSIGNED additive_expression
	  {
	  }
	| shift_expression ROTATE_LEFT additive_expression
	  {
	  }
	| shift_expression ROTATE_RIGHT additive_expression
	  {
	  }
	;


relational_expression:
	  shift_expression
	  {
	  }
	| relational_expression '<' shift_expression
	  {
	  }
	| relational_expression '>' shift_expression
	  {
	  }
	| relational_expression LESS_EQUAL shift_expression
	  {
	  }
	| relational_expression GREATER_EQUAL shift_expression
	  {
	  }
	| relational_expression INSTANCEOF shift_expression
	  {
	  }
	| relational_expression IN shift_expression
	  {
	  }
	| relational_expression IS shift_expression
	  {
	  }
	| relational_expression AS shift_expression
	  {
	  }
	;



relational_expression_no_in:
	  shift_expression
	  {
	  }
	| relational_expression_no_in '<' shift_expression
	  {
	  }
	| relational_expression_no_in '>' shift_expression
	  {
	  }
	| relational_expression_no_in LESS_EQUAL shift_expression
	  {
	  }
	| relational_expression_no_in GREATER_EQUAL shift_expression
	  {
	  }
	| relational_expression_no_in INSTANCEOF shift_expression
	  {
	  }
	;


equality_expression:
	  relational_expression
	  {
	  }
	| equality_expression EQUAL relational_expression
	  {
	  }
	| equality_expression NOT_EQUAL relational_expression
	  {
	  }
	| equality_expression EXACTLY_EQUAL relational_expression
	  {
	  }
	| equality_expression EXACTLY_NOT_EQUAL relational_expression
	  {
	  }
	;




equality_expression_no_in:
	  relational_expression_no_in
	  {
	  }
	| equality_expression_no_in EQUAL relational_expression_no_in
	  {
	  }
	| equality_expression_no_in NOT_EQUAL relational_expression_no_in
	  {
	  }
	| equality_expression_no_in EXACTLY_EQUAL relational_expression_no_in
	  {
	  }
	| equality_expression_no_in EXACTLY_NOT_EQUAL relational_expression_no_in
	  {
	  }
	;



bitwise_and_expression:
	  equality_expression
	  {
	  }
	| bitwise_and_expression '&' equality_expression
	  {
	  }
	;

bitwise_and_expression_no_in:
	  equality_expression_no_in
	  {
	  }
	| bitwise_and_expression_no_in '&' equality_expression_no_in
	  {
	  }
	;


bitwise_xor_expression:
	  bitwise_and_expression
	  {
	  }
	| bitwise_xor_expression '^' bitwise_and_expression
	  {
	  }
	;

bitwise_xor_expression_no_in:
	  bitwise_and_expression_no_in
	  {
	  }
	| bitwise_xor_expression_no_in '^' bitwise_and_expression_no_in
	  {
	  }
	;


bitwise_or_expression:
	  bitwise_xor_expression
	  {
	  }
	| bitwise_or_expression '|' bitwise_xor_expression
	  {
	  }
	;

bitwise_or_expression_no_in:
	  bitwise_xor_expression_no_in
	  {
	  }
	| bitwise_or_expression_no_in '|' bitwise_xor_expression_no_in
	  {
	  }
	;




logical_and_expression:
	  bitwise_or_expression
	  {
	  }
	| logical_and_expression LOGICAL_AND bitwise_or_expression
	  {
	  }
	;

logical_and_expression_no_in:
	  bitwise_or_expression_no_in
	  {
	  }
	| logical_and_expression_no_in LOGICAL_AND bitwise_or_expression_no_in
	  {
	  }
	;




logical_xor_expression:
	  logical_and_expression
	  {
	  }
	| logical_xor_expression LOGICAL_XOR logical_and_expression
	  {
	  }
	;

logical_xor_expression_no_in:
	  logical_and_expression_no_in
	  {
	  }
	| logical_xor_expression_no_in LOGICAL_XOR logical_and_expression_no_in
	  {
	  }
	;


logical_or_expression:
	  logical_xor_expression
	  {
	  }
	| logical_or_expression LOGICAL_OR logical_xor_expression
	  {
	  }
	;

logical_or_expression_no_in:
	  logical_xor_expression_no_in
	  {
	  }
	| logical_or_expression_no_in LOGICAL_OR logical_xor_expression_no_in
	  {
	  }
	;


min_max_expression:
	  logical_or_expression
	  {
	  }
	| min_max_expression MIN logical_or_expression
	  {
	  }
	| min_max_expression MAX logical_or_expression
	  {
	  }
	;


min_max_expression_no_in:
	  logical_or_expression_no_in
	  {
	  }
	| min_max_expression_no_in MIN logical_or_expression_no_in
	  {
	  }
	| min_max_expression_no_in MAX logical_or_expression_no_in
	  {
	  }
	;


conditional_expression:
	  min_max_expression
	  {
	  }
	| min_max_expression '?' assignment_expression ':' assignment_expression
	  {
	  }
	;


conditional_expression_no_in:
	  min_max_expression_no_in
	  {
	  }
	| min_max_expression_no_in '?' assignment_expression ':' assignment_expression_no_in
	  {
	  }
	;



assignment_expression:
	  conditional_expression
	  {
	  }
	| postfix_expression ASSIGNMENT_OPERATOR assignment_expression
	  {
	  }
	;

assignment_expression_no_in:
	  conditional_expression_no_in
	  {
	  }
	| postfix_expression ASSIGNMENT_OPERATOR assignment_expression_no_in
	  {
	  }
	;



expression:
	  assignment_expression
	  {
	  }
	| expression ',' assignment_expression
	  {
	  }
	;

expression_no_in:
	  assignment_expression_no_in
	  {
	  }
	| expression_no_in ',' assignment_expression_no_in
	  {
	  }
	;


expression_no_in_opt:
	  /* EMPTY */
	  {
	  }
	| expression_no_in
	  {
	  }
	;



%%


void yyerror(const char *msg)
{
	printf("YACC ERROR at line #%d in file \"%s\": %s.\n", yylloc.first_line, lex_filename, msg);
}




