nyacc: minor fixes
authorMatt Wette <matt.wette@gmail.com>
Sun, 8 Jan 2017 21:00:57 +0000 (13:00 -0800)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 8 Jan 2017 21:00:57 +0000 (13:00 -0800)
module/nyacc/ChangeLog
module/nyacc/lang/c99/mach.scm

index 33ddd25e378b8166afbe81dc647f857870706ba5..12409d46bd65a1d75d37912ef8a460ed4b896b8b 100644 (file)
@@ -1,3 +1,8 @@
+2017-01-08  Matt Wette  <mwette@alumni.caltech.edu>
+
+       * ../../test-suite/nyacc/lang/c99/exam.d/ex05.c: C99 does not
+       allow lone `;' outside of functions.  Removed.
+
 2017-01-07  Matt Wette  <mwette@alumni.caltech.edu>
 
        * lang/c99/body.scm (read-cpp-line): cpp statement should not
index 9f29c9e330495e027dc8a4eb02829e84dfc503c6..cac0e46b73f3170460bbe27eb045a8e0c7b733fa 100644 (file)
      )
 
     ;; declarations
-    (declaration
+    (declaration                       ; S 6.7
      (declaration-specifiers
       init-declarator-list
       ($$ (save-typenames `(decl ,(tl->list $1) ,(tl->list $2))))
      (direct-declarator)
      )
 
-    (direct-declarator
+    (direct-declarator                 ; S 6.7.6
      (identifier ($$ $1))
      ("(" declarator ")" ($$ `(scope ,$2)))
 
      (direct-declarator "(" ")" ($$ `(ftn-declr ,$1 (param-list))))
      )
 
-    (pointer
+    (pointer                           ; S 6.7.6
      ("*" type-qualifier-list ($$ `(pointer ,(tl->list $2))))
      ("*" ($$ '(pointer)))
      ("*" type-qualifier-list pointer ($$ `(pointer ,(tl->list $2) ,$3)))
     ;;typedef-name must be hacked w/ the lexical analyzer
     (typedef-name ('typename ($$ `(typename ,$1))))
 
-    (initializer                       ; S 6.7.8
+    (initializer                       ; S 6.7.9
      (assignment-expression ($$ `(initzer ,$1)))
      ("{" initializer-list "}" ($$ `(initzer ,(tl->list $2))))
      ("{" initializer-list "," "}" ($$ `(initzer ,(tl->list $2))))
      )
 
     ;; external definitions
-    (translation-unit (external-declaration-list ($$ (tl->list $1))))
-
+    (translation-unit                  ; S 6.9
+     (external-declaration-list ($$ (tl->list $1))))
+     )
     (external-declaration-list
      (external-declaration ($$ (make-tl 'trans-unit $1)))
      (external-declaration-list
              (tl-append $1 $2))))
      )
 
-    (external-declaration
+    (external-declaration              ; S 6.9
      (function-definition)
      (declaration)
      (lone-comment)