doc of Parser.cc, Parser.hh

[email protected] (Gilles J. Seguin)
Newsgroups gmane.comp.documentation.synopsis
Message-ID <[email protected]>
the documentation is using assignment-expression

_______________________________________________
Synopsis-devel mailing list
[email protected]
http://lists.fresco.org/cgi-bin/listinfo/synopsis-devel
Parser.cc-diff (text/x-patch, 1.4 KB)
Index: Parser.cc
===================================================================
--- Parser.cc	(revision 1537)
+++ Parser.cc	(working copy)
@@ -3175,8 +3175,8 @@
 }
 
 //. expression:
-//.   assign-expression
-//.   expression , assign-expression
+//.   assignment-expression
+//.   expression , assignment-expression
 bool Parser::expression(PTree::Node *&exp)
 {
   Trace trace("Parser::expression", Trace::PARSING);
@@ -3194,7 +3194,7 @@
   return true;
 }
 
-//. assign-expression:
+//. assignment-expression:
 //.   conditional-expression
 //.   logical-or-expression assignment-operator assignment-expression
 //.   throw-expression
@@ -3544,7 +3544,7 @@
 //.   -- cast-expression
 //.   unary-operator cast-expression
 //.   sizeof unary-expression
-//.   sizeof ( unary-expression )
+//.   sizeof ( type-id )
 //.   new-expression
 //.   delete-expression
 //.
@@ -3609,7 +3609,10 @@
     Token op;
     my_lexer.get_token(op);
     PTree::Node *tname;
-    if(!type_id(tname)) return false;
+    if(!type_id(tname)) {
+      // FIXME, we must also check for expression
+      return false;
+    }
     Token cp;
     if(my_lexer.get_token(cp) != ')') return false;
     
@@ -4296,7 +4299,7 @@
 
 //. condition:
 //.   expression
-//.   type-specifier-seq declarator = assign-expr
+//.   type-specifier-seq declarator = assignment-expression
 bool Parser::condition(PTree::Node *&exp)
 {
   Trace trace("Parser::condition", Trace::PARSING);
Parser.hh-diff (text/x-patch, 842 B)
Index: Parser.hh
===================================================================
--- Parser.hh	(revision 1537)
+++ Parser.hh	(working copy)
@@ -134,7 +134,7 @@
 
   //. condition:
   //.   expression
-  //.   type-specifier-seq declarator = assign-expr
+  //.   type-specifier-seq declarator = assignment-expression
   bool condition(PTree::Node *&);
 
   bool is_constructor_decl();
@@ -211,11 +211,11 @@
   bool user_access_spec(PTree::Node *&);
   
   //. expression:
-  //.   assign-expression
-  //.   expression , assign-expression
+  //.   assignment-expression
+  //.   expression , assignment-expression
   bool expression(PTree::Node *&);
 
-  //. assign-expression:
+  //. assignment-expression:
   //.   conditional-expression
   //.   logical-or-expression assignment-operator assignment-expression
   //.   throw-expression
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.