equals symbol, declarer;
mode symbol, defining indicant,
equals symbol, void symbol;
+ public symbol, mode symbol, defining indicant,
+ equals symbol, declarer;
+ public symbol, mode symbol, defining indicant,
+ equals symbol, void symbol;
mode declaration, comma symbol,
defining indicant, equals symbol, declarer;
mode declaration, comma symbol,
}
else
{
- gcc_assert (IS (SUB (p), MODE_SYMBOL));
- defining_indicant = NEXT (SUB (p));
+ if (IS (SUB (p), PUBLIC_SYMBOL))
+ {
+ gcc_assert (IS (NEXT (SUB (p)), MODE_SYMBOL));
+ defining_indicant = NEXT (NEXT (SUB (p)));
+ }
+ else
+ {
+ gcc_assert (IS (SUB (p), MODE_SYMBOL));
+ defining_indicant = NEXT (SUB (p));
+ }
}
/* Create a TYPE_DECL declaration for the defined mode and chain it in the
qualifier, declarer, defining identifier;
declarer, defining identifier, assign symbol, unit;
declarer, defining identifier;
+ public symbol, qualifier, declarer, defining identifier,
+ assign symbol, unit;
+ public symbol, qualifier, declarer, defining identiifer;
+ qualifier, declarer, defining identifier;
+ public symbol, declarer, defining identifier, assign symbol, unit;
+ declarer, defining identifier;
variable declaration, comma symbol,
defining identifier, assign symbol, unit;
variable declaration, comma symbol,
sub_expr = a68_lower_tree (SUB (p), new_ctx);
defining_identifier = NEXT (NEXT (SUB (p)));
}
- else if (IS (SUB (p), QUALIFIER))
- {
- /* The qualifier determines what kind of generator is used in the
- variable declaration. This is already annotated in the tax entry for
- the definining identifier. */
- declarer = NEXT (SUB (p));
- defining_identifier = NEXT (NEXT (SUB (p)));
- }
- else if (IS (SUB (p), DECLARER))
+ else
{
- declarer = SUB (p);
- defining_identifier = NEXT (SUB (p));
+ NODE_T *q = SUB (p);
+
+ if (IS (q, PUBLIC_SYMBOL))
+ FORWARD (q);
+
+ if (IS (q, QUALIFIER))
+ {
+ /* The qualifier determines what kind of generator is used in the
+ variable declaration. This is already annotated in the tax entry
+ for the definining identifier. */
+ declarer = NEXT (q);
+ defining_identifier = NEXT (NEXT (q));
+ }
+ else if (IS (q, DECLARER))
+ {
+ declarer = q;
+ defining_identifier = NEXT (q);
+ }
+ else
+ gcc_unreachable ();
}
- else
- gcc_unreachable ();
/* Communicate declarer upward. */
if (ctx.declarer != NULL)
identity declaration : declarer, defining identifier,
equals symbol, unit;
+ public symbol, declarer, defining identifier,
+ equals symbol, unit;
identity declaration, comma symbol,
defining identifier, equals symbol, unit;
sub_expr = a68_lower_tree (SUB (p), ctx);
defining_identifier = NEXT (NEXT (SUB (p)));
}
+ else if (IS (SUB (p), PUBLIC_SYMBOL))
+ {
+ defining_identifier = NEXT (NEXT (SUB (p)));
+ }
else if (IS (SUB (p), DECLARER))
{
defining_identifier = NEXT (SUB (p));
/* Lower a procedure declaration.
procedure declaration : proc symbol, defining identifier, assign symbol, routine text;
+ public symbol, proc symbol, defining identifier, assign symbol, routine text;
procedure declaration, comma symbol,
defining identifier, equals symbol, routine text.
sub_func_decl = a68_lower_tree (SUB (p), ctx);
defining_identifier = NEXT (NEXT (SUB (p)));
}
+ else if (IS (SUB (p), PUBLIC_SYMBOL))
+ {
+ defining_identifier = NEXT (NEXT (SUB (p)));
+ }
else if (IS (SUB (p), PROC_SYMBOL))
{
defining_identifier = NEXT (SUB (p));
procedure variable declaration
: proc symbol, defining identifier, assign symbol, routine text;
qualifier, proc symbol, defining identifier, assign symbol, routine text;
+ public symbol, proc symbol, defining identifier, assign symbol, routine text;
+ public symbol, qualifier, proc symbol, defining identifier, assign symbol, routine text;
procedure variable declaration, comma symbol, defining identiier, assign symbol, routine text.
This lowers into the declaration of a VAR_DECL which is a pointer to the
sub_decl = a68_lower_tree (SUB (p), ctx);
defining_identifier = NEXT (NEXT (SUB (p)));
}
- else if (IS (SUB (p), PROC_SYMBOL))
- defining_identifier = NEXT (SUB (p));
- else if (IS (SUB (p), QUALIFIER))
- /* The qualifier determines what kind of generator is used in the variable
- declaration. This is already annotated in the tax entry for the
- definining identifier. */
- defining_identifier = NEXT (NEXT (SUB (p)));
else
- gcc_unreachable ();
+ {
+ NODE_T *q = SUB (p);
+
+ if (IS (q, PUBLIC_SYMBOL))
+ FORWARD (q);
+
+ if (IS (q, PROC_SYMBOL))
+ defining_identifier = NEXT (q);
+ else if (IS (q, QUALIFIER))
+ /* The qualifier determines what kind of generator is used in the
+ variable declaration. This is already annotated in the tax entry
+ for the definining identifier. */
+ defining_identifier = NEXT (NEXT (q));
+ else
+ gcc_unreachable ();
+ }
+
NODE_T *routine_text = NEXT (NEXT (defining_identifier));
/* The routine text lowers into a pointer to function. */
brief operator declaration
: op symbol, defining operator, equals symbol, routine text;
+ public symbol, op symbol, defining operator, equals symbol, routine text;
brief operator declaration, comma symbol, defining operator, equals symbol, routine text.
The declarations low in a series of FUNCTION_DECLs, one per declared
defining_operator = NEXT (NEXT (SUB (p)));
}
else
- defining_operator = NEXT (SUB (p));
+ {
+ if (IS (SUB (p), PUBLIC_SYMBOL))
+ {
+ gcc_assert (IS (NEXT (SUB (p)), OP_SYMBOL));
+ defining_operator = NEXT (NEXT (SUB (p)));
+ }
+ else
+ defining_operator = NEXT (SUB (p));
+ }
NODE_T *routine_text = NEXT (NEXT (defining_operator));
/* Lower the routine text to get a function decl. */
/* Lower an operator declaration.
operator declaration : operator plan, defining operator, equals symbol, unit;
+ public symbol, operator plan, defining operator, equals symbol, unit;
operator declaration, comma symbol, defining operator, equals symbol, unit.
Each operator declaration lowers into a declaration. */
defining_operator = NEXT (NEXT (SUB (p)));
}
else
- defining_operator = NEXT (SUB (p));
+ {
+ if (IS (SUB (p), PUBLIC_SYMBOL))
+ defining_operator = NEXT (NEXT (SUB (p)));
+ else
+ defining_operator = NEXT (SUB (p));
+ }
NODE_T *unit = NEXT (NEXT (defining_operator));
tree op_decl = TAX_TREE_DECL (TAX (defining_operator));
tax_identity_dec (SUB (p), m);
tax_identity_dec (NEXT (p), m);
}
+ else if (IS (p, PUBLIC_SYMBOL))
+ {
+ tax_identity_dec (NEXT (p), m);
+ }
else if (IS (p, DECLARER))
{
tax_tags (SUB (p));
tax_variable_dec (SUB (p), q, m, e);
tax_variable_dec (NEXT (p), q, m, e);
}
+ else if (IS (p, PUBLIC_SYMBOL))
+ {
+ tax_variable_dec (NEXT (p), q, m, e);
+ }
else if (IS (p, DECLARER))
{
tax_tags (SUB (p));
*q = ATTRIBUTE (SUB (p));
tax_proc_variable_dec (NEXT (p), q, true);
}
- else if (a68_is_one_of (p, PROC_SYMBOL, COMMA_SYMBOL, STOP))
+ else if (a68_is_one_of (p, PUBLIC_SYMBOL, PROC_SYMBOL, COMMA_SYMBOL, STOP))
{
tax_proc_variable_dec (NEXT (p), q, e);
}
tax_proc_dec (SUB (p));
tax_proc_dec (NEXT (p));
}
- else if (a68_is_one_of (p, PROC_SYMBOL, COMMA_SYMBOL, STOP))
+ else if (a68_is_one_of (p, PUBLIC_SYMBOL, PROC_SYMBOL, COMMA_SYMBOL, STOP))
{
tax_proc_dec (NEXT (p));
}
{
tax_op_dec (NEXT (p), m);
}
- else if (IS (p, COMMA_SYMBOL))
+ else if (a68_is_one_of (p, PUBLIC_SYMBOL, COMMA_SYMBOL, STOP))
{
tax_op_dec (NEXT (p), m);
}
tax_brief_op_dec (SUB (p));
tax_brief_op_dec (NEXT (p));
}
- else if (a68_is_one_of (p, OP_SYMBOL, COMMA_SYMBOL, STOP))
+ else if (a68_is_one_of (p, PUBLIC_SYMBOL, OP_SYMBOL, COMMA_SYMBOL, STOP))
{
tax_brief_op_dec (NEXT (p));
}
tax_prio_dec (SUB (p));
tax_prio_dec (NEXT (p));
}
- else if (a68_is_one_of (p, PRIO_SYMBOL, COMMA_SYMBOL, STOP))
+ else if (a68_is_one_of (p, PUBLIC_SYMBOL, PRIO_SYMBOL, COMMA_SYMBOL, STOP))
{
tax_prio_dec (NEXT (p));
}