Next: Name Analysis
 Up: The Abstract Syntax Tree
 Previous: External definitions
An abstract syntax tree does not distinguish symbols of the original
grammar that are semantically identical.
If a symbol in the abstract syntax tree corresponds to a number of
distinct grammar symbols, that correspondence must be given as part of the
specification.
This is the role of a file of type map:
 
MAPSYM
parameter_type_list ::=
  empty_parameter_type_list .
Arguments ::= argument_expression_list_opt .
statement ::= selection_statement expression_statement jump_statement
  labeled_statement .
Expression ::=
  constant
  primary_expression postfix_expression unary_expression cast_expression
  multiplicative_expression additive_expression shift_expression
  relational_expression equality_expression AND_expression
  exclusive_OR_expression inclusive_OR_expression logical_AND_expression
  logical_OR_expression conditional_expression assignment_expression
  expression .
constant_expression ::= constant_exp_opt .
Exp1or3 ::=
  expression_opt1 .
Exp2 ::=
  expression_opt2 .
normal_operator ::= unary_operator .
Specifiers ::=
  declaration_specifiers empty_declaration_specifiers
  type_qualifier_list_opt specifier_qualifier_list .
Specifier ::=
  storage_class_specifier
  type_qualifier .
declarator ::=
  direct_declarator .
member_declarator ::=
  member_direct_declarator .
abstract_declarator ::= direct_abstract_declarator .
MAPRULE
function_definition:
  empty_declaration_specifiers declarator declaration_list function_body
  < $1 $3 $2 $4 > .
function_definition:
  declaration_specifiers declarator declaration_list function_body
  < $1 $3 $2 $4 > .
This macro is attached to a product file.
2008-08-30