added some optimalizations

This commit is contained in:
eck
1990-09-06 11:32:51 +00:00
parent 9915ed4bc2
commit 2f0275ba3c
4 changed files with 51 additions and 19 deletions

View File

@@ -67,13 +67,13 @@ declaration
short typedef yepp;
makes all hope of writing a specific grammar for typedefs illusory.
*/
/* Accept a single declaration specifier. Then accept zero or more
type-specifiers. There can be a conflict on both TYPE_IDENTIFIER
and IDENTIFIER.
/* Accept a single declaration specifier. Then accept zero or more
declaration specifiers. There can be a conflict on both
TYPE_IDENTIFIER and IDENTIFIER.
The following rule is used:
When we see a TYPE_IDENTIFIER, we accept it if no type-specifier
was given, and it is not directly followed by an identifier.
If no type-dpecifier was given, it is taken as the identifier being
When we see a TYPE_IDENTIFIER, we accept it if no type-specifier was
given, and it is not directly followed by an identifier. If a
type-specifier was given, it is taken as the identifier being
declared. If it is followed by an identifier, we assume that an
error has been made, (e.g. unsigned typedeffed_int x;) and that
this will be detected later on.