# $Id: X-exprcode.def,v 1.11 2002/02/16 20:55:31 msato Exp $
# $RWC_Release: Omni-1.6 $
# $RWC_Copyright:
#  Omni Compiler Software Version 1.5-1.6
#  Copyright (C) 2002 PC Cluster Consortium
#  
#  This software is free software; you can redistribute it and/or modify
#  it under the terms of the GNU Lesser General Public License version
#  2.1 published by the Free Software Foundation.
#  
#  Omni Compiler Software Version 1.0-1.4
#  Copyright (C) 1999, 2000, 2001.
#   Tsukuba Research Center, Real World Computing Partnership, Japan.
#  
#  Please check the Copyright and License information in the files named
#  COPYRIGHT and LICENSE under the top  directory of the Omni Compiler
#  Software release kit.
#  
#  
#  $
#
# Expression code definition
#  L: list, general
#  S: statement
#  B: binaryOp
#  A: asgOp
#  U: unaryOp
#  T: terminal
#
# FOR any list this must be first LIST = 0
L    LIST
# The following codes are terminal node. Don't change
T    IDENT		
T    STRING_CONSTANT	
T    INT_CONSTANT	
T    LONG_CONSTANT	
T    FLOAT_CONSTANT	
T    LONGLONG_CONSTANT	

# FOR declaration
L    FUNCTION_DEFINITION
    
# For statement
S    COMPOUND_STATEMENT
S    IF_STATEMENT
S    WHILE_STATEMENT
S    DO_STATEMENT
S    FOR_STATEMENT
S    SWITCH_STATEMENT
S    BREAK_STATEMENT
S    RETURN_STATEMENT
S    GOTO_STATEMENT
S    CONTINUE_STATEMENT
S    STATEMENT_LABEL
S    CASE_LABEL
S    DEFAULT_LABEL

# For expression
L    CONDITIONAL_EXPR		?
B    COMMA_EXPR			,
A    ASSIGN_EXPR		=
B    PLUS_EXPR			+
A    ASG_PLUS_EXPR		+=
B    MINUS_EXPR			-
A    ASG_MINUS_EXPR		-=
U    UNARY_MINUS_EXPR		-
B    MUL_EXPR			*
A    ASG_MUL_EXPR		*=
B    DIV_EXPR			/
A    ASG_DIV_EXPR		/=
B    MOD_EXPR			%
A    ASG_MOD_EXPR		%=
B    LSHIFT_EXPR		<<
A    ASG_LSHIFT_EXPR		<<=
B    RSHIFT_EXPR		>>
A    ASG_RSHIFT_EXPR		>>=
B    BIT_AND_EXPR		&
A    ASG_BIT_AND_EXPR		&=
B    BIT_OR_EXPR		|
A    ASG_BIT_OR_EXPR		|=
B    BIT_XOR_EXPR		^
A    ASG_BIT_XOR_EXPR		^=
U    BIT_NOT_EXPR		~
# logical expression
B    LOG_EQ_EXPR		==
B    LOG_NEQ_EXPR		!=
B    LOG_GE_EXPR		>=
B    LOG_GT_EXPR		>
B    LOG_LE_EXPR		<=
B    LOG_LT_EXPR		<
B    LOG_AND_EXPR		&&
B    LOG_OR_EXPR		||
U    LOG_NOT_EXPR		!

#    /* primary expr */
P    POINTER_REF	
P    ARRAY_REF
P    STRUCT_REF
P    ADDR_OF
P    FUNCTION_CALL	
P    SIZE_OF_EXPR
P    CAST_EXPR		
A    POST_INCR_EXPR	
A    POST_DECR_EXPR	

# for internal use
S    EXPR_STATEMENT
T    VAR_ADDR
T    PARAM_ADDR
T    LVAR_ADDR
T    PARAM_VAR
T    LVAR
T    VAR
T    LARRAY_ADDR
T    ARRAY_ADDR
T    FUNC_ADDR
T    ID_LIST
L    VAR_DECL
L    EXT_DECL
L    MEMBER_REF
L    MEMBER_ADDR
L    MEMBER_ARRAY_ADDR
L    ARRAY_AREF
T    MOE_CONSTANT

L    OMP_PRAGMA
#  register, temporary variable generated by compiler
T    REG
#  join operator in SSA
B    JOIN
#  external pragma
L    PRAGMA_LINE
L    TEA_PRAGMA
# fortran variable extention, FPARAM: dummy argument, FCOMM: common var
T    FPARAM_ARRAY_ADDR
T    FPARAM_VAR_ADDR
T    FPARAM_VAR
L    FCOMM_ARRAY_ADDR
L    FCOMM_VAR_ADDR
L    FCOMM_VAR
# for OpenMP code transformation
L    OMP_PARALLEL
L    OMP_FORALL
L    OMP_SECTIONS
L    OMP_SINGLE
L    OMP_MASTER
L    OMP_CRITICAL
L    OMP_ORDERED
L    OMP_ATOMIC
L    OMP_BARRIER
L    OMP_FLUSH

L    OMP_SETARG
L    OMP_GETARG
L    OMP_BCAST
L    OMP_BCAST_THDPRV
L    OMP_SHARE
L    OMP_REDUCTION
L    OMP_LAST_UPDATE

L    ALLOCA

# for C++
L    TYPE_DEFINITION
L    NEW_EXPR
L    DELETE_EXPR
T    CXX_ATTR_DECL
# EOF
