Lugaru's Epsilon
Programmer's
Editor

Context:
Epsilon User's Manual and Reference
   Epsilon Extension Language
      . . .
      Scope of Variables
      Data Types
         Declarations
         Simple Declarators
         Pointer Declarators
         . . .
      Initialization
      . . .

Previous   Up    Next
Data Types  Epsilon Extension Language   Simple Declarators


Epsilon User's Manual and Reference > Epsilon Extension Language > Data Types >

Declarations

Declarations in EEL associate a type with an identifier. The structure of EEL declarations mimics the recursive nature of EEL types.

A declaration is of the form:

declaration:
        type-specifier ;
        type-specifier declarator-list ;

declarator-list:
        declarator
        declarator , declarator-list

A type specifier names one of the basic types, a structure or union (described in Structures and Unions), or a typedef, a type abbreviation (described in Typedefs).

type-specifier:
        char
        short
        int
        struct struct-or-union-specifier
        union struct-or-union-specifier
        spot
        typedef-name

typedef-name:
        identifier

A declarator, on the other hand, specifies the relationship of the identifier being declared to the type named by the type specifier. If this is a recursive type, the relationship of the identifier's type to the basic type of the type specifier is indicated by the form of the declarator.

Declarators are of the following form:


declarator:
        identifier
        ( declarator )
        * declarator
        declarator [ constant-expression ]
        declarator [ ]
        declarator ()

If D is a declarator, then (D) is identical to D. Use parentheses to alter the binding of composed declarators. We discuss this more in Complex Declarators.



Previous   Up    Next
Data Types  Epsilon Extension Language   Simple Declarators


Lugaru Copyright (C) 1984, 2012 Lugaru Software Ltd. All Rights Reserved.