Extended C Syntax
This syntax is an extension of the Standard C syntax and uses the same notation as the C Standard. Symbols are shown in italics, and those defined in the C Standard are also shown in bold face. Undefined terminals are shown in typewriter face.
<I><B>external-declaration:</B></I> <I><B>function-definition</B></I> <I><B>declaration</B></I> <I>class-declaration</I> <I>method-implementation</I> <I>class-definition</I> <I>class-declaration:</I> <I>class-methods-declaration class-members-declaration</I> class-methods-declaration: DCL_METHODS (<I> Classname , basename , constructorparameters </I>) <I>methodlist</I><I>opt</I> END_METHODS <I>constructor-parameters:</I> <I>method-parameters</I> <I>method-list:</I> <I>method-declaration method-list</I><I>opt</I> <I>method-declaration:</I> DCL_METHOD ( <I>method-name , method-parameters , method-return-type </I>) DCL_ABSTRACT (<I> method-name , method-parameters , method-return-type )</I> REDCL_METHOD <I>( method-name , method-parameters , method-return-type )</I> <I>class-members-declaration:</I> DCL_MEMBERS <I>( class-name , base-name ) member-list</I><I>opt</I><I> </I>END_MEMBERS <I>member-list:</I> <I><B>struct-declaration-list</B></I> <I>method-implementation:</I> METHOD <I>(method-specififier) method-body </I>END_METHOD CONSTRUCTOR <I>( class-name , method-parameters ) constructor-body </I>END_CONSTRUCTOR DESTRUCTOR <I>( class-name ) method-body </I>END_DESTRUCTOR <I>method-specififier:</I> <I>class-name , method-name , method-parameters , method-return-type</I> <I>method-parameters:</I> (<I> parameter-type-list </I>) <I>method-return-type:</I> <I><B>declaration-specifiers</I></B><I><B>opt</I></B> <I>constructor-body:</I> CONSTRUCT <I>( base-name , constructor-arguments ) method-body</I> <I>method-body:</I> <I><B>declaration-list</I></B><I><B>opt</I></B><I><B> statement-list</I></B><I><B>opt</I></B> <I>class-definition:</I> DEF_CLASS (<I> class-name , base-name ) method-definition-list</I> END_CLASS <I>method-definition-list:</I> <I>method-definition</I> <I>method-definition method-definition-list</I> <I>method-definition:</I> DEF_METHOD (<I> base-name , method-name</I> )<I>;</I> DEF_ABSTRACT<I> </I>(<I> base-name , method-name</I> )<I>;</I> REOEF_METHOD<I> </I>(<I> base-name , class-name , method-name</I> ); <I><B>declaration:</B></I> <I><B>declaration-specifiers init-declarator-list</I></B><I><B>opt</I></B> PUSH ( <I>object-pointer, class-name , constructor-arguments</I> ); <I><B>primary-expression:</B></I> <I><B>identifier</B></I> <I><B>constant</B></I> <I><B>string</B></I> <B>( </B><I><B>expression</I></B><B> )</B> USE (<I> class-name </I>) SEND ( <I>object-pointer , base-name , method-name , method-arguments</I> ) CALL (<I> object-pointer , class-name , base-name , method-name , method-arguments </I>) NEW (<I> class-name , constructor-arguments </I>) DELETE ( <I>object-pointer </I>) POP (<I> object-pointer </I>) IS_A ( <I>object-pointer , class-name</I> ) CLASS_NAME (<I> object-pointer </I>) <I>constructor-arguments:</I> <I>method-arguments</I> <I>method-arguments:</I> <B>( </B><I><B>argument-expression-list</I></B><B> )</B> <I>base-name:</I> <I>class-name</I> <I>Object</I> <I>class-name:</I> <I><B>identifier</B></I> <I>object-pointer:</I> <I><B>identifier</B></I> <I>method-name:</I> <I><B>identifier</B></I>