File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717(eval-when (:compile-toplevel )
1818 #+ sbcl (terpri )
19- (format t " ;;; Compiling Python grammar for CL-Yacc: this may take a while ...~% " ))
20-
19+ (format t " ;;; Compiling Python grammar for CL-Yacc...~% " ))
20+
2121#. `(yacc :define-parser *cl-yacc-python-parser*
2222 (:terminals , *terminals* )
2323 (:precedence , (nreverse (get-precedence-and-associativity :left :right :nonassoc )))
24- (:start-symbol clpython.parser :: python-grammar)
24+ (:start-symbol python-grammar)
2525
2626 ,@ (loop for name being each hash-key in *python-prods*
2727 using (hash-value rules)
3131 for func = ` (lambda , args
3232 (declare (ignorable ,@ args))
3333 , outcome)
34- collect ` (,@ (or terms ` (())) ; ; splice term or insert ()
34+ collect ` (,@ (or terms ` (())) ; ; splice terms or insert ()
3535 , func)))))
3636
3737; ;; Lexer
6767 (raise-syntax-error
6868 (format nil " Parse error at line ~A , at token `~A '. ~
6969 ~_ Expected one of: ~{ `~A '~^ ~} ."
70- ; ;~%~[Internal error ~S caught due to ~S]"
70+ ; ;~%~[Internal error ~S caught due to ~S]"
7171 line value expected-tokens
72- ; ; c '*catch-yacc-conditions*
72+ ; ; c '*catch-yacc-conditions*
7373 ))))))))
You can’t perform that action at this time.
0 commit comments