- (set-state :normal) nil))
- (defevaluator :beginning-of-separators-with-space :eof
- (constantly "Must not end with empty line"))
- (defevaluator :beginning-of-separators-with-space "\\n"
- (constantly "Must not have two empty lines in a row"))
- (defevaluator :begin ".*"
- (constantly "Must begin with in-package form"))
- (defevaluator :normal "\\( *in-package "
- (constantly "Only one in-package per file"))
+ (push (list *line-no* *col-no*) *form-stack*)
+ (set-state :first-symbol)))
+ (defevaluator :first-symbol "\\("
+ (lambda ()
+ (cond
+ ((and (not *form-stack*) (not (zerop *col-no*))) "Top level forms must begin on first column")
+ ((and *form-stack* (/= (1+ (cadr (car *form-stack*))) *col-no*))
+ "All form elements must be indented equally")
+ (t
+ (push (list *line-no* *col-no*) *form-stack*)
+ (set-state :first-symbol)))))
+ (defevaluator :all "\\t" (constantly "Must not use tabs"))
+ (defevaluator :begin "\\(in-package[^\\)]*\\)" (lambda () (set-state :normal)))
+ (defevaluator :beginning-of-line-with-separator :eof (constantly "Must not end with empty line"))
+ (defevaluator :beginning-of-line-with-separator "\\n" (constantly "Must not have two empty lines in a row"))
+ (defevaluator :begin ".*" (constantly "Must begin with in-package form"))
+ (defevaluator :all "\\( *in-package " (constantly "Only one in-package per file"))