src/module-parse.lisp: Use `dotted-name', not `dotted-identifier'.
[sod] / src / module-parse.lisp
index 028ad87..63d75cd 100644 (file)
                 ;; Parse a declarator or dotted-declarator, i.e., one whose
                 ;; centre is
                 ;;
-                ;; maybe-dotted-identifier ::= [id `.'] id
+                ;; maybe-dotted-name ::= [id `.'] id
                 ;;
                 ;; A plain identifier is returned as a string, as usual; a
                 ;; dotted identifier is returned as a cons cell of the two
                 (parse (seq ((body (or (seq ("extern" #\;) nil)
                                        (parse-delimited-fragment
                                         scanner #\{ #\}))))
-                         (make-sod-method class sub-nick name type
-                                          body sub-pset scanner))))
+                         (restart-case
+                             (make-sod-method class sub-nick name type
+                                              body sub-pset scanner)
+                           (continue () :report "Continue")))))
 
               (parse-initializer ()
                 ;; initializer ::= `=' c-fragment
                 ;;
                 ;; init-declarator ::= declarator [initializer]
                 (flet ((make-it (name type init)
-                         (make-sod-slot class name type
-                                        sub-pset scanner)
-                         (when init
-                           (make-sod-instance-initializer class
-                                                          nick name
-                                                          init
-                                                          sub-pset
-                                                          scanner))))
+                         (restart-case
+                             (progn
+                               (make-sod-slot class name type
+                                              sub-pset scanner)
+                               (when init
+                                 (make-sod-instance-initializer class
+                                                                nick name
+                                                                init
+                                                                sub-pset
+                                                                scanner)))
+                           (continue () :report "Continue"))))
                   (parse (and (seq ((init (? (parse-initializer))))
                                 (make-it name type init))
                               (skip-many ()
                   (parse (and (skip-many ()
                                 (seq ((name-a :id) #\. (name-b :id)
                                       (init (funcall parse-init)))
-                                  (funcall constructor class
-                                           name-a name-b init
-                                           sub-pset scanner))
+                                  (restart-case
+                                      (funcall constructor class
+                                               name-a name-b init
+                                               sub-pset scanner)
+                                    (continue () :report "Continue")))
                                 #\,)
                               #\;))))