From: Baptiste L. <bl...@us...> - 2004-06-19 15:25:27
|
Update of /cvsroot/cpptool/CppParser/examples/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24175/examples/parser Modified Files: grammar_tree.txt Log Message: * updated with new 'declarations' Index: grammar_tree.txt =================================================================== RCS file: /cvsroot/cpptool/CppParser/examples/parser/grammar_tree.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** grammar_tree.txt 19 Jun 2004 14:46:07 -0000 1.2 --- grammar_tree.txt 19 Jun 2004 15:25:16 -0000 1.3 *************** *** 2,71 **** translation_unit[ ! n declaration_error ! | namespace_alias_def[ ! id ! namespace_specifier[...] ! ~ n id] // +(namespace_name) ! | using_declaration[ ! using_id ! ~ n id] // @todo any_id ! | using_directive[ ! namespace_specifier[...] ] ! | simple_declaration[ ! [ typedef_decl_specifiers ! cv_qualifiers ! [ fundamental_type_specifier ! | type_name ! | enum_specifier[ ! id ! n enumerator_definition[ ! id ! constant_expression[...] ! ] ] ! | class_specifier[...] ! | elaborated_type_specifier[ ! ] ! ? cv_qualifiers ! | friend_specifier[ ! declaration_specifier[...] ] ! | declaration_specifier[ ! //content same as friend_specifier ! ? storage_class_specifier ! ? function_specifier ! ? cv_qualifiers ! workaround_type_specifier ! same as typedef_decl_specifiers ! ? cv_qualifiers ! ] ] ! ? init_declarators[ ! n init_declarator[ ! declarator[...] ! ? assign_initializer[ ! [ assignment_expression[...] // = 1234 ! | n initializer_clause ] // = {1,2,3,4} ! | expression_list[...] // (1,2,3,4) ctor ! ] ] ] ] ] ! | linkage_specification[ ! 'extern' ! $string ! [ '{' !declaration_seq '}' => same as translation_unit ! | declaration[...] ] ! ] ! | named_namespace_def[ ! id ! namespace_body[ !declaration_seq ] ! ] ! | unnamed_namespace_def[ ! namespace_body[ !declaration_seq ] ! ] ! | function_definition[ ... ] ! | template_declaration[ ... ] ! | explicit_template_instantiation[...] ! | explicit_template_specialization[...] --- 2,90 ---- translation_unit[ ! declarations[...] ! ] ! ! ! ///////////////////////////////// declarations /////////////////////////// ! declarations[ ! [ n declaration_error ! | namespace_alias_def[ ! id ! namespace_specifier[...] ! ~ n id] // +(namespace_name) ! | using_declaration[ ! using_id ! ~ n id] // @todo any_id ! | using_directive[ ! namespace_specifier[...] ] ! | simple_declaration[ ! [ typedef_decl_specifiers[ ! type_specifier[...] ] ! | friend_specifier[ ! declaration_specifier[...] ] ! | declaration_specifier[ ! //content same as friend_specifier ! ? storage_class_specifier ! ? function_specifier ! type_specifier[...] ] ! ] ! ? init_declarators[ ! n init_declarator[ ! declarator[...] ! ? assign_initializer[ ! [ assignment_expression[...] // = 1234 ! | n initializer_clause ] // = {1,2,3,4} ! | expression_list[...] // (1,2,3,4) ctor ] ] ] ] ! ] ! | linkage_specification[ ! 'extern' ! $string ! [ '{' !declaration_seq '}' => same as translation_unit ! | declaration[...] ] ! ] ! | named_namespace_def[ ! id ! namespace_body[ !declaration_seq ] ! ] ! | unnamed_namespace_def[ ! namespace_body[ !declaration_seq ] ! ] ! | function_definition[ ... ] ! | template_declaration[ ... ] ! | explicit_template_instantiation[...] ! | explicit_template_specialization[...] ! ] ! ] + ///////////////////////////////// type_specifier /////////////////////////// + + type_specifier[ + cv_qualifiers + [ fundamental_type_specifier + | type_name + | enum_specifier[ + id + n enumerator_definition[ + id + constant_expression[...] + ] ] + | class_specifier[...] + | forward_class_specifier[ + forwarded_type_id[ + ~n id ] ] + | forward_enum_specifier[ // @todo better tree structure + forwarded_type_id[ + ~n id ] ] + | forward_typename_specifier[ + forwarded_type_id[ + ~n id ] ] + ] + ? cv_qualifiers + ] |