Modified error message language.
svn: r7267
This commit is contained in:
parent
53379938f8
commit
a7ec07121a
|
@ -120,7 +120,7 @@
|
|||
(> (length winners) max-choice-depth))
|
||||
(collapse-message
|
||||
(add-to-message
|
||||
(msg (format "An error occurred in this ~a. Program resembles one of: ~a.~n"
|
||||
(msg (format "An error occurred in this ~a. Program resembles these: ~a.~n"
|
||||
name (nice-list non-dup-tops)))
|
||||
name #f message-to-date))]
|
||||
[(and (> (length winners) 1)
|
||||
|
@ -158,7 +158,7 @@
|
|||
(> (length winners) 1))
|
||||
(collapse-message
|
||||
(add-to-message
|
||||
(msg (format "Expected a ~a, possible options are ~a." name
|
||||
(msg (format "Expected a ~a, possible options include ~a." name
|
||||
(nice-list (first-n max-choice-depth no-dup-names))))
|
||||
name #f message-to-date))]
|
||||
[(and (<= (choice-fail-options fail-type) max-choice-depth)
|
||||
|
@ -167,7 +167,7 @@
|
|||
(equal? top-names no-dup-names))
|
||||
(collapse-message
|
||||
(add-to-message
|
||||
(msg (format "An error occured in this ~a, expected one of: ~a."
|
||||
(msg (format "An error occured in this ~a; expected ~a instead."
|
||||
name (nice-list no-dup-names)))
|
||||
name #f message-to-date))]
|
||||
[(and (<= (choice-fail-options fail-type) max-choice-depth)
|
||||
|
@ -179,13 +179,13 @@
|
|||
(collapse-message
|
||||
(add-to-message (car messages) #f #f
|
||||
(add-to-message
|
||||
(msg (format "An error occured in this ~a, expected one of: ~a."
|
||||
(msg (format "An error occured in this ~a, expected ~a instead."
|
||||
name (nice-list no-dup-names))
|
||||
name #f message-to-date))))]
|
||||
[else
|
||||
(collapse-message
|
||||
(add-to-message
|
||||
(msg (format "An error occured in this ~a, expected one of: ~a. Possible errors were:~n~a"
|
||||
(msg (format "An error occured in this ~a; expected ~a instead. Possible errors were:~n~a"
|
||||
name (nice-list no-dup-names)
|
||||
(alternate-error-list (map err-msg messages))))
|
||||
name #f message-to-date))]))]
|
||||
|
@ -193,7 +193,7 @@
|
|||
(> (length winners) 1))
|
||||
(collapse-message
|
||||
(add-to-message
|
||||
(msg (format "An error occured in this ~a. Possible options are ~a.~n"
|
||||
(msg (format "An error occured in this ~a. Possible options include ~a.~n"
|
||||
name (nice-list
|
||||
(first-n max-choice-depth no-dup-names))))
|
||||
name #f message-to-date))]
|
||||
|
@ -203,7 +203,7 @@
|
|||
(add-to-message
|
||||
(msg (format "An error occured in this ~a~a.~a~n"
|
||||
name
|
||||
(if (equal? name top-name) "" (format ", it is likely that you intended ~a ~a here"
|
||||
(if (equal? name top-name) "" (format ", it is possible you intended ~a ~a here"
|
||||
(a/an top-name) top-name))
|
||||
(if show-options " To see all options click here." "")))
|
||||
name #f message-to-date))]))])))
|
||||
|
|
|
@ -422,8 +422,8 @@
|
|||
(cond
|
||||
[else?
|
||||
(choose ((sequence (ifT O_PAREN expression C_PAREN stmt elseT stmt) id)
|
||||
(sequence (ifT O_PAREN expression C_PAREN stmt) id)) "if")]
|
||||
[else (sequence (ifT O_PAREN expression C_PAREN stmt elseT stmt) id "if")]))
|
||||
(sequence (ifT O_PAREN expression C_PAREN stmt) id)) "if statement")]
|
||||
[else (sequence (ifT O_PAREN expression C_PAREN stmt elseT stmt) id "if statement")]))
|
||||
|
||||
(define (return-s opt?)
|
||||
(cond
|
||||
|
@ -662,7 +662,7 @@
|
|||
(sequence (unique-base (repeat-greedy unique-end)) id "expression"))
|
||||
|
||||
(define statement
|
||||
(choose ((if-s (block #f) #f) (return-s #f)) "statement"))
|
||||
(choose ((return-s #f) (if-s (block #f) #f)) "statement"))
|
||||
|
||||
(define field (make-field #f (value+name-type prim-type) expression #f))
|
||||
|
||||
|
@ -731,15 +731,15 @@
|
|||
|
||||
(define (statement-c interact?)
|
||||
(if interact?
|
||||
(choose ((if-s (block #t) #f)
|
||||
(return-s #t)
|
||||
(choose ((return-s #t)
|
||||
(if-s (block #t) #f)
|
||||
(assignment
|
||||
(choose (identifier
|
||||
(sequence (unique-base (repeat unique-end) field-access-end) id))
|
||||
"assignee") EQUAL)
|
||||
(block #t)) "statement")
|
||||
(choose ((if-s (block #t) #f)
|
||||
(return-s #t)
|
||||
(choose ((return-s #t)
|
||||
(if-s (block #t) #f)
|
||||
(block #t)
|
||||
(variable-declaration (value+name-type prim-type) expression #f "local variable")
|
||||
(sequence (stmt-expr SEMI_COLON) id)) "statement")))
|
||||
|
@ -780,8 +780,8 @@
|
|||
|
||||
(define interact
|
||||
(choose (field
|
||||
(if-s (block #t) #f)
|
||||
(return-s #t)
|
||||
(if-s (block #t) #f)
|
||||
(assignment
|
||||
(choose (identifier
|
||||
(sequence (unique-base (repeat unique-end) field-access-end) id))
|
||||
|
@ -833,13 +833,13 @@
|
|||
|
||||
(define (statement-c interact?)
|
||||
(if (not interact?)
|
||||
(choose ((if-s (block #t) #f)
|
||||
(return-s #t)
|
||||
(choose ((return-s #t)
|
||||
(if-s (block #t) #f)
|
||||
(variable-declaration (value+name-type prim-type) expression #f "local variable")
|
||||
(block #t)
|
||||
(sequence (stmt-expr SEMI_COLON) id)) "statement")
|
||||
(choose ((if-s (block #t) #f)
|
||||
(return-s #t)
|
||||
(choose ((return-s #t)
|
||||
(if-s (block #t) #f)
|
||||
(assignment
|
||||
(choose (identifier
|
||||
(sequence (unique-base (repeat unique-end) field-access-end) id))
|
||||
|
@ -938,8 +938,8 @@
|
|||
|
||||
(define (statement-c interact?)
|
||||
(if interact?
|
||||
(choose ((if-s #t (eta statement))
|
||||
(return-s #t)
|
||||
(choose ((return-s #t)
|
||||
(if-s #t (eta statement))
|
||||
(block #t)
|
||||
(for-l (choose ((variable-declaration (array-type (value+name-type prim-type)) expression #t "for loop variable")
|
||||
(comma-sep stmt-expr "initializations")) "for loop initialization")
|
||||
|
@ -956,8 +956,8 @@
|
|||
"asignee")
|
||||
assignment-ops)
|
||||
) "statement")
|
||||
(choose ((if-s #t (eta statement))
|
||||
(return-s #t)
|
||||
(choose ((return-s #t)
|
||||
(if-s #t (eta statement))
|
||||
(variable-declaration (array-type (value+name-type prim-type)) expression #t "local variable")
|
||||
(block #t)
|
||||
(sequence (stmt-expr SEMI_COLON) id)
|
||||
|
|
Loading…
Reference in New Issue
Block a user