Update of /cvsroot/cpptool/rfta/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv19544/doc
Modified Files:
AbstractSyntaxSTreeStructure.txt
Log Message:
-- updated documentation for declaration parsing
Index: AbstractSyntaxSTreeStructure.txt
===================================================================
RCS file: /cvsroot/cpptool/rfta/doc/AbstractSyntaxSTreeStructure.txt,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** AbstractSyntaxSTreeStructure.txt 16 Apr 2003 18:43:01 -0000 1.7
--- AbstractSyntaxSTreeStructure.txt 26 Apr 2003 10:47:56 -0000 1.8
***************
*** 56,59 ****
--- 56,97 ----
// mutation not yet defined
+ * Declaration-Level-Elements
+
+ // each declaration consists of a list of specifier and a list of declarators (with optional init)
+ [declaration]
+ declaration-specifiers-property => [declaration-specifier-list] // type specifiers
+ n [init-declarator] // each declaration can declare 'n' identifier
+
+ [declaration-specifier-list]
+ n [{declaration-specifier}] ,
+
+ [init-declarator]
+ ?initializer-property => [expression]
+ declarator-property => [unparsed-declarator] , [declarator]
+
+ [unparsed-declarator]
+ variable-name-property => [#variable-identifier-expression]
+ #mutate: declarator
+
+ [declarator]
+ variable-name-property => [#variable-identifier-expression]
+ ?sub-declarator-property => [declarator] // declarators are organized hierarchical
+ declarator-type-property =>
+ [function-declarator], // ... (...)
+ [array-declarator] // ... [...]
+ [#braces] // (...)
+ [ptr-declarator] // * ...
+ [#declarator-identifier] // user::x
+
+ {declaration-specifier}
+ [#simple-type-specifier] // "simple-type-specifier" (char, wchar_t, bool, etc.) also "cv-qualifier" ---> see C++ Spec.
+ [class-specifier] // full class spec: "class x { ... }" (struct, union and class keyword is allowed)
+ [enum-specifier] // full enum spec
+ [elaborated-type-specifier] // something like "class xxx", "struct y" or simply "UserTypePtr"
+
+ [ptr-declarator]
+ ?ptr-declarator-property => [#unparsed]
+ ?nested-name-property => [#declarator-identifier]
+
* Statements a function/method body level
|