Replaced %section and %subsection by %heading with an adjustable level number
git-svn-id: svn://10.0.0.236/trunk@105853 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -4442,8 +4442,7 @@
|
||||
|
||||
(:command
|
||||
(%highlight scan-%highlight depict-%highlight) ;For internal use only; use ? instead.
|
||||
(%section scan-% depict-%section)
|
||||
(%subsection scan-% depict-%subsection)
|
||||
(%heading scan-% depict-%heading)
|
||||
(%text scan-% depict-%text)
|
||||
(grammar-argument scan-% depict-grammar-argument)
|
||||
(%rule scan-% depict-%rule)
|
||||
|
||||
@@ -88,8 +88,9 @@
|
||||
;;; DEPICT-ENV
|
||||
|
||||
; A depict-env holds state that helps in depicting a grammar or lexer.
|
||||
(defstruct (depict-env (:constructor make-depict-env (visible-semantics)))
|
||||
(visible-semantics t :type bool) ;Nil if semantics are not to be depicted
|
||||
(defstruct (depict-env (:constructor make-depict-env (visible-semantics heading-offset)))
|
||||
(visible-semantics t :type bool :read-only t) ;Nil if semantics are not to be depicted
|
||||
(heading-offset 0 :type integer :read-only t) ;Offset to be added to each heading level when depicting it
|
||||
(grammar-info nil :type (or null grammar-info)) ;The current grammar-info or nil if none
|
||||
(seen-nonterminals nil :type (or null hash-table)) ;Hash table (nonterminal -> t) of nonterminals already depicted
|
||||
(seen-grammar-arguments nil :type (or null hash-table)) ;Hash table (grammar-argument -> t) of grammar-arguments already depicted
|
||||
@@ -158,8 +159,8 @@
|
||||
|
||||
|
||||
; Emit markup paragraphs for the world's commands.
|
||||
(defun depict-world-commands (markup-stream world &key (visible-semantics t))
|
||||
(let ((depict-env (make-depict-env visible-semantics)))
|
||||
(defun depict-world-commands (markup-stream world &key (visible-semantics t) (heading-offset 0))
|
||||
(let ((depict-env (make-depict-env visible-semantics heading-offset)))
|
||||
(depict-commands markup-stream world depict-env (world-commands-source world))
|
||||
(depict-clear-grammar markup-stream world depict-env)))
|
||||
|
||||
@@ -1243,39 +1244,27 @@
|
||||
(depict-commands markup-stream world depict-env commands))))
|
||||
|
||||
|
||||
; (%section "section-name")
|
||||
; (%section <mode> "section-name")
|
||||
; (%heading <level> "heading-name")
|
||||
; (%heading (<level <mode>) "heading-name")
|
||||
; <mode> is one of:
|
||||
; :syntax This is a comment about the syntax
|
||||
; :semantics This is a comment about the semantics (not displayed when semantics are not displayed)
|
||||
; nil This is a general comment
|
||||
(defun depict-%section (markup-stream world depict-env mode &optional section-name)
|
||||
(defun depict-%heading (markup-stream world depict-env level-mode heading-name)
|
||||
(declare (ignore world))
|
||||
(depict-section-or-subsection markup-stream depict-env mode section-name :section-heading))
|
||||
|
||||
|
||||
; (%subsection "subsection-name")
|
||||
; (%subsection <mode> "subsection-name")
|
||||
; <mode> is one of:
|
||||
; :syntax This is a comment about the syntax
|
||||
; :semantics This is a comment about the semantics (not displayed when semantics are not displayed)
|
||||
; nil This is a general comment
|
||||
(defun depict-%subsection (markup-stream world depict-env mode &optional section-name)
|
||||
(declare (ignore world))
|
||||
(depict-section-or-subsection markup-stream depict-env mode section-name :subsection-heading))
|
||||
|
||||
|
||||
; Common routine for depict-%section and depict-%subsection.
|
||||
(defun depict-section-or-subsection (markup-stream depict-env mode section-name paragraph-style)
|
||||
(when (stringp mode)
|
||||
(when section-name
|
||||
(error "Bad %section or %subsection"))
|
||||
(setq section-name mode)
|
||||
(setq mode nil))
|
||||
(assert-type section-name string)
|
||||
(when (quiet-depict-mode depict-env mode)
|
||||
(depict-paragraph (markup-stream paragraph-style)
|
||||
(depict markup-stream section-name))))
|
||||
(let ((level level-mode)
|
||||
(mode nil))
|
||||
(unless (integerp level-mode)
|
||||
(assert-type level-mode (tuple integer symbol))
|
||||
(setq level (first level-mode))
|
||||
(setq mode (second level-mode)))
|
||||
(unless (stringp heading-name)
|
||||
(error "~S should be a string" heading-name))
|
||||
(let* ((heading-level (+ level (depict-env-heading-offset depict-env)))
|
||||
(heading-style (svref #(:heading1 :heading2 :heading3 :heading4 :heading5 :heading6) (1- heading-level))))
|
||||
(when (quiet-depict-mode depict-env mode)
|
||||
(depict-paragraph (markup-stream heading-style)
|
||||
(depict markup-stream heading-name))))))
|
||||
|
||||
|
||||
; (%text <mode> . <styled-text>)
|
||||
|
||||
@@ -469,8 +469,12 @@
|
||||
(:js2 (div (class "js2")))
|
||||
(:es4 (div (class "es4")))
|
||||
(:body-text p)
|
||||
(:section-heading h2)
|
||||
(:subsection-heading h3)
|
||||
(:heading1 h1)
|
||||
(:heading2 h2)
|
||||
(:heading3 h3)
|
||||
(:heading4 h4)
|
||||
(:heading5 h5)
|
||||
(:heading6 h6)
|
||||
(:grammar-header h4)
|
||||
(:grammar-rule (div (class "grammar-rule")))
|
||||
(:grammar-lhs (div (class "grammar-lhs")))
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
"J"
|
||||
'((grammar code-grammar :lr-1 :program)
|
||||
|
||||
(%section "Expressions")
|
||||
(%heading 1 "Expressions")
|
||||
(grammar-argument :alpha normal initial)
|
||||
(grammar-argument :beta allow-in no-in)
|
||||
|
||||
(%subsection "Primary Expressions")
|
||||
(%heading 2 "Primary Expressions")
|
||||
(production (:primary-expression :alpha) (:simple-expression) primary-expression-simple-expression)
|
||||
(production (:primary-expression normal) (:function-expression) primary-expression-function-expression)
|
||||
(production (:primary-expression normal) (:object-literal) primary-expression-object-literal)
|
||||
@@ -35,12 +35,12 @@
|
||||
(production :parenthesized-expression (\( (:expression normal allow-in) \)) parenthesized-expression-expression)
|
||||
|
||||
|
||||
(%subsection "Function Expressions")
|
||||
(%heading 2 "Function Expressions")
|
||||
(production :function-expression (:anonymous-function) function-expression-anonymous-function)
|
||||
(production :function-expression (:named-function) function-expression-named-function)
|
||||
|
||||
|
||||
(%subsection "Object Literals")
|
||||
(%heading 2 "Object Literals")
|
||||
(production :object-literal (\{ \}) object-literal-empty)
|
||||
(production :object-literal (\{ :field-list \}) object-literal-list)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
(production :literal-field ($identifier \: (:assignment-expression normal allow-in)) literal-field-assignment-expression)
|
||||
|
||||
|
||||
(%subsection "Array Literals")
|
||||
(%heading 2 "Array Literals")
|
||||
(production :array-literal ([ ]) array-literal-empty)
|
||||
(production :array-literal ([ :element-list ]) array-literal-list)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
(production :literal-element ((:assignment-expression normal allow-in)) literal-element-assignment-expression)
|
||||
|
||||
|
||||
(%subsection "Left-Side Expressions")
|
||||
(%heading 2 "Left-Side Expressions")
|
||||
(production (:left-side-expression :alpha) ((:call-expression :alpha)) left-side-expression-call-expression)
|
||||
(production (:left-side-expression :alpha) (:short-new-expression) left-side-expression-short-new-expression)
|
||||
|
||||
@@ -90,13 +90,13 @@
|
||||
(production :argument-list (:argument-list \, (:assignment-expression normal allow-in)) argument-list-more)
|
||||
|
||||
|
||||
(%subsection "Postfix Operators")
|
||||
(%heading 2 "Postfix Operators")
|
||||
(production (:postfix-expression :alpha) ((:left-side-expression :alpha)) postfix-expression-left-side-expression)
|
||||
(production (:postfix-expression :alpha) ((:left-side-expression :alpha) ++) postfix-expression-increment)
|
||||
(production (:postfix-expression :alpha) ((:left-side-expression :alpha) --) postfix-expression-decrement)
|
||||
|
||||
|
||||
(%subsection "Unary Operators")
|
||||
(%heading 2 "Unary Operators")
|
||||
(production (:unary-expression :alpha) ((:postfix-expression :alpha)) unary-expression-postfix)
|
||||
(production (:unary-expression :alpha) (delete (:left-side-expression normal)) unary-expression-delete)
|
||||
(production (:unary-expression :alpha) (void (:unary-expression normal)) unary-expression-void)
|
||||
@@ -109,27 +109,27 @@
|
||||
(production (:unary-expression :alpha) (! (:unary-expression normal)) unary-expression-logical-not)
|
||||
|
||||
|
||||
(%subsection "Multiplicative Operators")
|
||||
(%heading 2 "Multiplicative Operators")
|
||||
(production (:multiplicative-expression :alpha) ((:unary-expression :alpha)) multiplicative-expression-unary)
|
||||
(production (:multiplicative-expression :alpha) ((:multiplicative-expression :alpha) * (:unary-expression normal)) multiplicative-expression-multiply)
|
||||
(production (:multiplicative-expression :alpha) ((:multiplicative-expression :alpha) / (:unary-expression normal)) multiplicative-expression-divide)
|
||||
(production (:multiplicative-expression :alpha) ((:multiplicative-expression :alpha) % (:unary-expression normal)) multiplicative-expression-remainder)
|
||||
|
||||
|
||||
(%subsection "Additive Operators")
|
||||
(%heading 2 "Additive Operators")
|
||||
(production (:additive-expression :alpha) ((:multiplicative-expression :alpha)) additive-expression-multiplicative)
|
||||
(production (:additive-expression :alpha) ((:additive-expression :alpha) + (:multiplicative-expression normal)) additive-expression-add)
|
||||
(production (:additive-expression :alpha) ((:additive-expression :alpha) - (:multiplicative-expression normal)) additive-expression-subtract)
|
||||
|
||||
|
||||
(%subsection "Bitwise Shift Operators")
|
||||
(%heading 2 "Bitwise Shift Operators")
|
||||
(production (:shift-expression :alpha) ((:additive-expression :alpha)) shift-expression-additive)
|
||||
(production (:shift-expression :alpha) ((:shift-expression :alpha) << (:additive-expression normal)) shift-expression-left)
|
||||
(production (:shift-expression :alpha) ((:shift-expression :alpha) >> (:additive-expression normal)) shift-expression-right-signed)
|
||||
(production (:shift-expression :alpha) ((:shift-expression :alpha) >>> (:additive-expression normal)) shift-expression-right-unsigned)
|
||||
|
||||
|
||||
(%subsection "Relational Operators")
|
||||
(%heading 2 "Relational Operators")
|
||||
(exclude (:relational-expression initial no-in))
|
||||
(production (:relational-expression :alpha :beta) ((:shift-expression :alpha)) relational-expression-shift)
|
||||
(production (:relational-expression :alpha :beta) ((:relational-expression :alpha :beta) < (:shift-expression normal)) relational-expression-less)
|
||||
@@ -140,7 +140,7 @@
|
||||
(production (:relational-expression :alpha allow-in) ((:relational-expression :alpha allow-in) in (:shift-expression normal)) relational-expression-in)
|
||||
|
||||
|
||||
(%subsection "Equality Operators")
|
||||
(%heading 2 "Equality Operators")
|
||||
(exclude (:equality-expression initial no-in))
|
||||
(production (:equality-expression :alpha :beta) ((:relational-expression :alpha :beta)) equality-expression-relational)
|
||||
(production (:equality-expression :alpha :beta) ((:equality-expression :alpha :beta) == (:relational-expression normal :beta)) equality-expression-equal)
|
||||
@@ -149,7 +149,7 @@
|
||||
(production (:equality-expression :alpha :beta) ((:equality-expression :alpha :beta) !== (:relational-expression normal :beta)) equality-expression-strict-not-equal)
|
||||
|
||||
|
||||
(%subsection "Binary Bitwise Operators")
|
||||
(%heading 2 "Binary Bitwise Operators")
|
||||
(exclude (:bitwise-and-expression initial no-in))
|
||||
(production (:bitwise-and-expression :alpha :beta) ((:equality-expression :alpha :beta)) bitwise-and-expression-equality)
|
||||
(production (:bitwise-and-expression :alpha :beta) ((:bitwise-and-expression :alpha :beta) & (:equality-expression normal :beta)) bitwise-and-expression-and)
|
||||
@@ -163,7 +163,7 @@
|
||||
(production (:bitwise-or-expression :alpha :beta) ((:bitwise-or-expression :alpha :beta) \| (:bitwise-xor-expression normal :beta)) bitwise-or-expression-or)
|
||||
|
||||
|
||||
(%subsection "Binary Logical Operators")
|
||||
(%heading 2 "Binary Logical Operators")
|
||||
(exclude (:logical-and-expression initial no-in))
|
||||
(production (:logical-and-expression :alpha :beta) ((:bitwise-or-expression :alpha :beta)) logical-and-expression-bitwise-or)
|
||||
(production (:logical-and-expression :alpha :beta) ((:logical-and-expression :alpha :beta) && (:bitwise-or-expression normal :beta)) logical-and-expression-and)
|
||||
@@ -173,13 +173,13 @@
|
||||
(production (:logical-or-expression :alpha :beta) ((:logical-or-expression :alpha :beta) \|\| (:logical-and-expression normal :beta)) logical-or-expression-or)
|
||||
|
||||
|
||||
(%subsection "Conditional Operator")
|
||||
(%heading 2 "Conditional Operator")
|
||||
(exclude (:conditional-expression initial no-in))
|
||||
(production (:conditional-expression :alpha :beta) ((:logical-or-expression :alpha :beta)) conditional-expression-logical-or)
|
||||
(production (:conditional-expression :alpha :beta) ((:logical-or-expression :alpha :beta) ? (:assignment-expression normal :beta) \: (:assignment-expression normal :beta)) conditional-expression-conditional)
|
||||
|
||||
|
||||
(%subsection "Assignment Operators")
|
||||
(%heading 2 "Assignment Operators")
|
||||
(exclude (:assignment-expression initial no-in))
|
||||
(production (:assignment-expression :alpha :beta) ((:conditional-expression :alpha :beta)) assignment-expression-conditional)
|
||||
(production (:assignment-expression :alpha :beta) ((:left-side-expression :alpha) = (:assignment-expression normal :beta)) assignment-expression-assignment)
|
||||
@@ -198,7 +198,7 @@
|
||||
(production :compound-assignment (\|=) compound-assignment-xor)
|
||||
|
||||
|
||||
(%subsection "Expressions")
|
||||
(%heading 2 "Expressions")
|
||||
(exclude (:expression initial no-in))
|
||||
(production (:expression :alpha :beta) ((:assignment-expression :alpha :beta)) expression-assignment)
|
||||
(production (:expression :alpha :beta) ((:expression :alpha :beta) \, (:assignment-expression normal :beta)) expression-comma)
|
||||
@@ -207,7 +207,7 @@
|
||||
(production :optional-expression () optional-expression-empty)
|
||||
|
||||
|
||||
(%section "Statements")
|
||||
(%heading 1 "Statements")
|
||||
|
||||
(grammar-argument :omega
|
||||
no-short-if ;optional semicolon, but statement must not end with an if without an else
|
||||
@@ -233,15 +233,15 @@
|
||||
(production :optional-semicolon (\;) optional-semicolon-semicolon)
|
||||
|
||||
|
||||
(%subsection "Empty Statement")
|
||||
(%heading 2 "Empty Statement")
|
||||
(production :empty-statement (\;) empty-statement-semicolon)
|
||||
|
||||
|
||||
(%subsection "Expression Statement")
|
||||
(%heading 2 "Expression Statement")
|
||||
(production :expression-statement ((:expression initial allow-in)) expression-statement-expression)
|
||||
|
||||
|
||||
(%subsection "Variable Definition")
|
||||
(%heading 2 "Variable Definition")
|
||||
(production :variable-definition (var (:variable-declaration-list allow-in)) variable-definition-declaration)
|
||||
|
||||
(production (:variable-declaration-list :beta) ((:variable-declaration :beta)) variable-declaration-list-one)
|
||||
@@ -253,7 +253,7 @@
|
||||
(production (:variable-initializer :beta) (= (:assignment-expression normal :beta)) variable-initializer-assignment-expression)
|
||||
|
||||
|
||||
(%subsection "Block")
|
||||
(%heading 2 "Block")
|
||||
(production :block ({ :block-statements }) block-block-statements)
|
||||
|
||||
(production :block-statements () block-statements-one)
|
||||
@@ -263,17 +263,17 @@
|
||||
(production :block-statements-prefix (:block-statements-prefix (:statement full)) block-statements-prefix-more)
|
||||
|
||||
|
||||
(%subsection "Labeled Statements")
|
||||
(%heading 2 "Labeled Statements")
|
||||
(production (:labeled-statement :omega) ($identifier \: (:statement :omega)) labeled-statement-label)
|
||||
|
||||
|
||||
(%subsection "If Statement")
|
||||
(%heading 2 "If Statement")
|
||||
(production (:if-statement full) (if :parenthesized-expression (:statement full)) if-statement-if-then-full)
|
||||
(production (:if-statement :omega) (if :parenthesized-expression (:statement no-short-if)
|
||||
else (:statement :omega)) if-statement-if-then-else)
|
||||
|
||||
|
||||
(%subsection "Switch Statement")
|
||||
(%heading 2 "Switch Statement")
|
||||
(production :switch-statement (switch :parenthesized-expression { }) switch-statement-empty)
|
||||
(production :switch-statement (switch :parenthesized-expression { :case-groups :last-case-group }) switch-statement-cases)
|
||||
|
||||
@@ -291,15 +291,15 @@
|
||||
(production :case-guard (default \:) case-guard-default)
|
||||
|
||||
|
||||
(%subsection "Do-While Statement")
|
||||
(%heading 2 "Do-While Statement")
|
||||
(production :do-statement (do (:statement full) while :parenthesized-expression) do-statement-do-while)
|
||||
|
||||
|
||||
(%subsection "While Statement")
|
||||
(%heading 2 "While Statement")
|
||||
(production (:while-statement :omega) (while :parenthesized-expression (:statement :omega)) while-statement-while)
|
||||
|
||||
|
||||
(%subsection "For Statements")
|
||||
(%heading 2 "For Statements")
|
||||
(production (:for-statement :omega) (for \( :for-initializer \; :optional-expression \; :optional-expression \)
|
||||
(:statement :omega)) for-statement-c-style)
|
||||
(production (:for-statement :omega) (for \( :for-in-binding in (:expression normal allow-in) \) (:statement :omega)) for-statement-in)
|
||||
@@ -312,11 +312,11 @@
|
||||
(production :for-in-binding (var (:variable-declaration no-in)) for-in-binding-variable-declaration)
|
||||
|
||||
|
||||
(%subsection "With Statement")
|
||||
(%heading 2 "With Statement")
|
||||
(production (:with-statement :omega) (with :parenthesized-expression (:statement :omega)) with-statement-with)
|
||||
|
||||
|
||||
(%subsection "Continue and Break Statements")
|
||||
(%heading 2 "Continue and Break Statements")
|
||||
(production :continue-statement (continue :optional-label) continue-statement-optional-label)
|
||||
|
||||
(production :break-statement (break :optional-label) break-statement-optional-label)
|
||||
@@ -325,15 +325,15 @@
|
||||
(production :optional-label ($identifier) optional-label-identifier)
|
||||
|
||||
|
||||
(%subsection "Return Statement")
|
||||
(%heading 2 "Return Statement")
|
||||
(production :return-statement (return :optional-expression) return-statement-optional-expression)
|
||||
|
||||
|
||||
(%subsection "Throw Statement")
|
||||
(%heading 2 "Throw Statement")
|
||||
(production :throw-statement (throw (:expression normal allow-in)) throw-statement-throw)
|
||||
|
||||
|
||||
(%subsection "Try Statement")
|
||||
(%heading 2 "Try Statement")
|
||||
(production :try-statement (try :block :catch-clauses) try-statement-catch-clauses)
|
||||
(production :try-statement (try :block :finally-clause) try-statement-finally-clause)
|
||||
(production :try-statement (try :block :catch-clauses :finally-clause) try-statement-catch-clauses-finally-clause)
|
||||
@@ -346,7 +346,7 @@
|
||||
(production :finally-clause (finally :block) finally-clause-block)
|
||||
|
||||
|
||||
(%subsection "Function Definition")
|
||||
(%heading 2 "Function Definition")
|
||||
(production :function-definition (:named-function) function-definition-named-function)
|
||||
|
||||
(production :anonymous-function (function :formal-parameters-and-body) anonymous-function-formal-parameters-and-body)
|
||||
@@ -364,8 +364,7 @@
|
||||
(production :formal-parameter ($identifier) formal-parameter-identifier)
|
||||
|
||||
|
||||
(%section "Programs")
|
||||
|
||||
(%heading 1 "Programs")
|
||||
(production :program (:top-statements) program)
|
||||
|
||||
(production :top-statements () top-statements-one)
|
||||
@@ -387,14 +386,14 @@
|
||||
"JS14/ParserGrammar.rtf"
|
||||
"JavaScript 1.4 Parser Grammar"
|
||||
#'(lambda (markup-stream)
|
||||
(depict-world-commands markup-stream *jw* :visible-semantics nil)))
|
||||
(depict-world-commands markup-stream *jw* :heading-offset 1 :visible-semantics nil)))
|
||||
|
||||
(depict-html-to-local-file
|
||||
"JS14/ParserGrammar.html"
|
||||
"JavaScript 1.4 Parser Grammar"
|
||||
t
|
||||
#'(lambda (markup-stream)
|
||||
(depict-world-commands markup-stream *jw* :visible-semantics nil)))
|
||||
(depict-world-commands markup-stream *jw* :heading-offset 1 :visible-semantics nil)))
|
||||
|
||||
(with-local-output (s "JS14/ParserGrammar.txt") (print-grammar *jg* s))
|
||||
|#
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
(deftag syntax-error)
|
||||
(deftype semantic-exception (tag syntax-error))
|
||||
|
||||
(%section "Unicode Character Classes")
|
||||
(%heading 1 "Unicode Character Classes")
|
||||
(%charclass :unicode-character)
|
||||
(%charclass :unicode-initial-alphabetic)
|
||||
(%charclass :unicode-alphanumeric)
|
||||
@@ -98,7 +98,7 @@
|
||||
(%charclass :a-s-c-i-i-digit)
|
||||
(%print-actions)
|
||||
|
||||
(%section "Comments")
|
||||
(%heading 1 "Comments")
|
||||
(production :line-comment (#\/ #\/ :line-comment-characters) line-comment)
|
||||
|
||||
(production :line-comment-characters () line-comment-characters-empty)
|
||||
@@ -126,13 +126,13 @@
|
||||
multi-line-block-comment-characters-rest)
|
||||
(%print-actions)
|
||||
|
||||
(%section "White space")
|
||||
(%heading 1 "White Space")
|
||||
|
||||
(production :white-space () white-space-empty)
|
||||
(production :white-space (:white-space :white-space-character) white-space-character)
|
||||
(production :white-space (:white-space :single-line-block-comment) white-space-single-line-block-comment)
|
||||
|
||||
(%section "Line breaks")
|
||||
(%heading 1 "Line Breaks")
|
||||
|
||||
(production :line-break (:line-terminator) line-break-line-terminator)
|
||||
(production :line-break (:line-comment :line-terminator) line-break-line-comment)
|
||||
@@ -141,7 +141,7 @@
|
||||
(production :line-breaks (:line-break) line-breaks-first)
|
||||
(production :line-breaks (:line-breaks :white-space :line-break) line-breaks-rest)
|
||||
|
||||
(%section "Input elements")
|
||||
(%heading 1 "Input Elements")
|
||||
|
||||
(grammar-argument :nu re div unit)
|
||||
(grammar-argument :nu_2 re div)
|
||||
@@ -184,7 +184,7 @@
|
||||
(production :end-of-input (:line-comment $end) end-of-input-line-comment)
|
||||
(%print-actions)
|
||||
|
||||
(%section "Keywords and identifiers")
|
||||
(%heading 1 "Keywords and Identifiers")
|
||||
|
||||
(rule :identifier-name
|
||||
((lex-name string) (contains-escapes boolean))
|
||||
@@ -261,7 +261,7 @@
|
||||
(return (new identifier id)))))))
|
||||
(%print-actions)
|
||||
|
||||
(%section "Punctuators")
|
||||
(%heading 1 "Punctuators")
|
||||
|
||||
(rule :punctuator ((lex token))
|
||||
(production :punctuator (#\!) punctuator-not (lex (new punctuator "!")))
|
||||
@@ -326,7 +326,7 @@
|
||||
(production :division-punctuator (#\/ #\=) punctuator-divide-equals (lex (new punctuator "/="))))
|
||||
(%print-actions)
|
||||
|
||||
(%section "Numeric literals")
|
||||
(%heading 1 "Numeric Literals")
|
||||
|
||||
(rule :numeric-literal ((lex token))
|
||||
(production :numeric-literal (:decimal-literal) numeric-literal-decimal
|
||||
@@ -402,7 +402,7 @@
|
||||
(%charclass :hex-digit)
|
||||
(%print-actions)
|
||||
|
||||
(%section "String literals")
|
||||
(%heading 1 "String Literals")
|
||||
|
||||
(grammar-argument :theta single double)
|
||||
(rule :string-literal ((lex token))
|
||||
@@ -469,7 +469,7 @@
|
||||
|
||||
(%print-actions)
|
||||
|
||||
(%section "Regular expression literals")
|
||||
(%heading 1 "Regular Expression Literals")
|
||||
|
||||
(rule :reg-exp-literal ((lex token))
|
||||
(production :reg-exp-literal (:reg-exp-body :reg-exp-flags) reg-exp-literal
|
||||
@@ -527,25 +527,25 @@
|
||||
"JS20/LexerGrammar.rtf"
|
||||
"JavaScript 2 Lexical Grammar"
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *lw* :visible-semantics nil)))
|
||||
(depict-world-commands rtf-stream *lw* :heading-offset 1 :visible-semantics nil)))
|
||||
(depict-rtf-to-local-file
|
||||
"JS20/LexerSemantics.rtf"
|
||||
"JavaScript 2 Lexical Semantics"
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *lw*)))
|
||||
(depict-world-commands rtf-stream *lw* :heading-offset 1)))
|
||||
(depict-html-to-local-file
|
||||
"JS20/LexerGrammar.html"
|
||||
"JavaScript 2 Lexical Grammar"
|
||||
t
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *lw* :visible-semantics nil))
|
||||
(depict-world-commands rtf-stream *lw* :heading-offset 1 :visible-semantics nil))
|
||||
:external-link-base "notation.html")
|
||||
(depict-html-to-local-file
|
||||
"JS20/LexerSemantics.html"
|
||||
"JavaScript 2 Lexical Semantics"
|
||||
t
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *lw*))
|
||||
(depict-world-commands rtf-stream *lw* :heading-offset 1))
|
||||
:external-link-base "notation.html"))
|
||||
|
||||
(with-local-output (s "JS20/LexerGrammar.txt") (print-lexer *ll* s) (print-grammar *lg* s))
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
(defparameter *jw-source*
|
||||
'((line-grammar code-grammar :lr-1 :program)
|
||||
|
||||
(%section :semantics "Errors")
|
||||
(%heading (1 :semantics) "Data Model")
|
||||
(%heading (2 :semantics) "Errors")
|
||||
|
||||
(deftag syntax-error)
|
||||
(deftag reference-error)
|
||||
@@ -27,25 +28,25 @@
|
||||
(deftype semantic-exception (union early-exit semantic-error))
|
||||
|
||||
|
||||
(%section :semantics "Objects")
|
||||
(%subsection :semantics "Undefined")
|
||||
(%heading (2 :semantics) "Objects")
|
||||
(%heading (3 :semantics) "Undefined")
|
||||
(deftag undefined)
|
||||
(deftype undefined (tag undefined))
|
||||
|
||||
|
||||
(%subsection :semantics "Null")
|
||||
(%heading (3 :semantics) "Null")
|
||||
(deftag null)
|
||||
(deftype null (tag null))
|
||||
|
||||
|
||||
(%subsection :semantics "Namespaces")
|
||||
(%heading (3 :semantics) "Namespaces")
|
||||
(defrecord namespace (name string))
|
||||
(deftype namespace-opt (union null namespace))
|
||||
|
||||
(define public-namespace namespace (new namespace "public"))
|
||||
|
||||
|
||||
(%subsection :semantics "Attributes")
|
||||
(%heading (3 :semantics) "Attributes")
|
||||
(deftag dynamic)
|
||||
(deftag fixed)
|
||||
(deftype class-modifier (tag null dynamic fixed))
|
||||
@@ -74,7 +75,7 @@
|
||||
(unused boolean))
|
||||
|
||||
|
||||
(%subsection :semantics "Classes")
|
||||
(%heading (3 :semantics) "Classes")
|
||||
(defrecord class
|
||||
(super class-opt)
|
||||
(prototype object)
|
||||
@@ -129,13 +130,13 @@
|
||||
(return (and (is-ancestor c d) (/= c d class))))
|
||||
|
||||
|
||||
(%subsection :semantics "Method Closures")
|
||||
(%heading (3 :semantics) "Method Closures")
|
||||
(deftuple method-closure
|
||||
(this object)
|
||||
(method method))
|
||||
|
||||
|
||||
(%subsection :semantics "General Instances")
|
||||
(%heading (3 :semantics) "Class Instances")
|
||||
(defrecord instance
|
||||
(type class)
|
||||
(model instance-opt)
|
||||
@@ -151,7 +152,7 @@
|
||||
(value object))
|
||||
|
||||
|
||||
(%subsection :semantics "Objects")
|
||||
(%heading (3 :semantics) "Objects")
|
||||
|
||||
(deftype object (union undefined null boolean float64 string namespace attribute class method-closure instance))
|
||||
|
||||
@@ -239,7 +240,7 @@
|
||||
(return (u-int32-to-int32 (to-u-int32 x))))
|
||||
|
||||
|
||||
(%subsection :semantics "Slots")
|
||||
(%heading (3 :semantics) "Slots")
|
||||
(defrecord slot-id (type class))
|
||||
|
||||
(defrecord slot
|
||||
@@ -259,7 +260,7 @@
|
||||
(value object :var))
|
||||
|
||||
|
||||
(%section :semantics "References")
|
||||
(%heading (2 :semantics) "References")
|
||||
(deftuple qualified-name (namespace namespace) (name string))
|
||||
|
||||
(deftuple partial-name (namespaces (list-set namespace)) (name string))
|
||||
@@ -305,7 +306,7 @@
|
||||
(:narrow reference (return (& base r)))))
|
||||
|
||||
|
||||
(%section :semantics "Signatures")
|
||||
(%heading (2 :semantics) "Signatures")
|
||||
(deftuple signature
|
||||
(required-positional (vector class))
|
||||
(optional-positional (vector class))
|
||||
@@ -319,7 +320,7 @@
|
||||
(type class))
|
||||
|
||||
|
||||
(%section :semantics "Argument Lists")
|
||||
(%heading (2 :semantics) "Argument Lists")
|
||||
(deftuple named-argument (name string) (value object))
|
||||
|
||||
(deftuple argument-list
|
||||
@@ -330,7 +331,7 @@
|
||||
(deftype invoker (-> (object argument-list) object))
|
||||
|
||||
|
||||
(%subsection :semantics "Members")
|
||||
(%heading (3 :semantics) "Members")
|
||||
(defrecord method
|
||||
(type signature)
|
||||
(f instance-opt)) ;Method code (may be undefined)
|
||||
@@ -460,7 +461,7 @@
|
||||
(todo))
|
||||
|
||||
|
||||
(%section :semantics "Validation Environments")
|
||||
(%heading (2 :semantics) "Validation Environments")
|
||||
(deftuple validation-env
|
||||
(enclosing-class class-opt)
|
||||
(labels (vector string))
|
||||
@@ -478,7 +479,7 @@
|
||||
(return (/= (& enclosing-class v) null class-opt)))
|
||||
|
||||
|
||||
(%section :semantics "Dynamic Environments")
|
||||
(%heading (2 :semantics) "Dynamic Environments")
|
||||
(defrecord dynamic-env
|
||||
(parent dynamic-env-opt)
|
||||
(enclosing-class class-opt)
|
||||
@@ -517,7 +518,7 @@
|
||||
(todo))
|
||||
|
||||
|
||||
(%section :semantics "Unary Operators")
|
||||
(%heading (2 :semantics) "Unary Operators")
|
||||
(deftuple unary-method
|
||||
(operand-type class)
|
||||
(f (-> (object object argument-list) object)))
|
||||
@@ -546,7 +547,7 @@
|
||||
(throw property-not-found-error)))
|
||||
|
||||
|
||||
(%subsection :semantics "Unary Operator Tables")
|
||||
(%heading (3 :semantics) "Unary Operator Tables")
|
||||
|
||||
(define (plus-object (this object :unused) (a object) (args argument-list :unused)) object
|
||||
(return (to-number a)))
|
||||
@@ -617,7 +618,7 @@
|
||||
(return (not (to-boolean a))))
|
||||
|
||||
|
||||
(%section :semantics "Binary Operators")
|
||||
(%heading (2 :semantics) "Binary Operators")
|
||||
(deftuple binary-method
|
||||
(left-type class)
|
||||
(right-type class)
|
||||
@@ -645,7 +646,7 @@
|
||||
(throw property-not-found-error)))
|
||||
|
||||
|
||||
(%subsection :semantics "Binary Operator Tables")
|
||||
(%heading (3 :semantics) "Binary Operator Tables")
|
||||
|
||||
(define (add-objects (a object) (b object)) object
|
||||
(const ap object (to-primitive a null))
|
||||
@@ -764,7 +765,11 @@
|
||||
(defvar bitwise-or-table (list-set binary-method) (list-set (new binary-method object-class object-class bitwise-or-objects)))
|
||||
|
||||
|
||||
(%section "Terminal Actions")
|
||||
(%heading 1 "Expressions")
|
||||
(grammar-argument :beta allow-in no-in)
|
||||
|
||||
|
||||
(%heading (2 :semantics) "Terminal Actions")
|
||||
|
||||
(declare-action name $identifier string :action nil
|
||||
(terminal-action name $identifier identity))
|
||||
@@ -775,10 +780,7 @@
|
||||
(%print-actions)
|
||||
|
||||
|
||||
(%section "Expressions")
|
||||
(grammar-argument :beta allow-in no-in)
|
||||
|
||||
(%subsection "Identifiers")
|
||||
(%heading 2 "Identifiers")
|
||||
(rule :identifier ((name string))
|
||||
(production :identifier ($identifier) identifier-identifier (name (name $identifier)))
|
||||
(production :identifier (get) identifier-get (name "get"))
|
||||
@@ -788,7 +790,7 @@
|
||||
(production :identifier (named) identifier-named (name "named")))
|
||||
(%print-actions)
|
||||
|
||||
(%subsection "Qualified Identifiers")
|
||||
(%heading 2 "Qualified Identifiers")
|
||||
(rule :qualifier ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) namespace)))
|
||||
(production :qualifier (:identifier) qualifier-identifier
|
||||
((validate (v :unused)) (todo))
|
||||
@@ -848,7 +850,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Unit Expressions")
|
||||
(%heading 2 "Unit Expressions")
|
||||
(rule :unit-expression ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) obj-or-ref)))
|
||||
(production :unit-expression (:paren-list-expression) unit-expression-paren-list-expression
|
||||
((validate v) ((validate :paren-list-expression) v))
|
||||
@@ -861,7 +863,7 @@
|
||||
((eval (e :unused)) (todo))))
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
(%subsection "Primary Expressions")
|
||||
(%heading 2 "Primary Expressions")
|
||||
(rule :primary-expression ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) obj-or-ref)))
|
||||
(production :primary-expression (null) primary-expression-null
|
||||
((validate (v :unused)))
|
||||
@@ -926,7 +928,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Function Expressions")
|
||||
(%heading 2 "Function Expressions")
|
||||
(rule :function-expression ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) obj-or-ref)))
|
||||
(production :function-expression (function :function-signature :block) function-expression-anonymous
|
||||
((validate (v :unused)) (todo))
|
||||
@@ -937,7 +939,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Object Literals")
|
||||
(%heading 2 "Object Literals")
|
||||
(production :object-literal (\{ \}) object-literal-empty)
|
||||
(production :object-literal (\{ :field-list \}) object-literal-list)
|
||||
|
||||
@@ -972,7 +974,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Array Literals")
|
||||
(%heading 2 "Array Literals")
|
||||
(production :array-literal ([ :element-list ]) array-literal-list)
|
||||
|
||||
(production :element-list (:literal-element) element-list-one)
|
||||
@@ -983,7 +985,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Super Expressions")
|
||||
(%heading 2 "Super Expressions")
|
||||
(rule :super-expression ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) object)) (super (-> (dynamic-env) class)))
|
||||
(production :super-expression (super) super-expression-super
|
||||
((validate v)
|
||||
@@ -1012,7 +1014,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Postfix Expressions")
|
||||
(%heading 2 "Postfix Expressions")
|
||||
(rule :postfix-expression ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) obj-or-ref)))
|
||||
(production :postfix-expression (:attribute-expression) postfix-expression-attribute-expression
|
||||
(validate (validate :attribute-expression))
|
||||
@@ -1187,7 +1189,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Member Operators")
|
||||
(%heading 2 "Member Operators")
|
||||
(rule :member-operator ((validate (-> (validation-env) void)) (eval (-> (dynamic-env object) obj-or-ref)))
|
||||
(production :member-operator (:dot-operator) member-operator-dot-operator
|
||||
((validate v) ((validate :dot-operator) v))
|
||||
@@ -1269,7 +1271,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Unary Operators")
|
||||
(%heading 2 "Unary Operators")
|
||||
(rule :unary-expression ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) obj-or-ref)))
|
||||
(production :unary-expression (:postfix-expression) unary-expression-postfix
|
||||
((validate v) ((validate :postfix-expression) v))
|
||||
@@ -1350,7 +1352,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Multiplicative Operators")
|
||||
(%heading 2 "Multiplicative Operators")
|
||||
(rule :multiplicative-expression ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) obj-or-ref)))
|
||||
(production :multiplicative-expression (:unary-expression) multiplicative-expression-unary
|
||||
((validate v) ((validate :unary-expression) v))
|
||||
@@ -1398,7 +1400,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Additive Operators")
|
||||
(%heading 2 "Additive Operators")
|
||||
(rule :additive-expression ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) obj-or-ref)))
|
||||
(production :additive-expression (:multiplicative-expression) additive-expression-multiplicative
|
||||
((validate v) ((validate :multiplicative-expression) v))
|
||||
@@ -1436,7 +1438,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Bitwise Shift Operators")
|
||||
(%heading 2 "Bitwise Shift Operators")
|
||||
(rule :shift-expression ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) obj-or-ref)))
|
||||
(production :shift-expression (:additive-expression) shift-expression-additive
|
||||
((validate v) ((validate :additive-expression) v))
|
||||
@@ -1484,7 +1486,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Relational Operators")
|
||||
(%heading 2 "Relational Operators")
|
||||
(rule (:relational-expression :beta) ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) obj-or-ref)))
|
||||
(production (:relational-expression :beta) (:shift-expression) relational-expression-shift
|
||||
((validate v) ((validate :shift-expression) v))
|
||||
@@ -1562,7 +1564,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Equality Operators")
|
||||
(%heading 2 "Equality Operators")
|
||||
(rule (:equality-expression :beta) ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) obj-or-ref)))
|
||||
(production (:equality-expression :beta) ((:relational-expression :beta)) equality-expression-relational
|
||||
((validate v) ((validate :relational-expression) v))
|
||||
@@ -1620,7 +1622,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Binary Bitwise Operators")
|
||||
(%heading 2 "Binary Bitwise Operators")
|
||||
(rule (:bitwise-and-expression :beta) ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) obj-or-ref)))
|
||||
(production (:bitwise-and-expression :beta) ((:equality-expression :beta)) bitwise-and-expression-equality
|
||||
((validate v) ((validate :equality-expression) v))
|
||||
@@ -1699,7 +1701,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Binary Logical Operators")
|
||||
(%heading 2 "Binary Logical Operators")
|
||||
(rule (:logical-and-expression :beta) ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) obj-or-ref)))
|
||||
(production (:logical-and-expression :beta) ((:bitwise-or-expression :beta)) logical-and-expression-bitwise-or
|
||||
((validate v) ((validate :bitwise-or-expression) v))
|
||||
@@ -1745,7 +1747,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Conditional Operator")
|
||||
(%heading 2 "Conditional Operator")
|
||||
(rule (:conditional-expression :beta) ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) obj-or-ref)))
|
||||
(production (:conditional-expression :beta) ((:logical-or-expression :beta)) conditional-expression-logical-or
|
||||
((validate v) ((validate :logical-or-expression) v))
|
||||
@@ -1765,7 +1767,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Assignment Operators")
|
||||
(%heading 2 "Assignment Operators")
|
||||
(rule (:assignment-expression :beta) ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) obj-or-ref)))
|
||||
(production (:assignment-expression :beta) ((:conditional-expression :beta)) assignment-expression-conditional
|
||||
((validate v) ((validate :conditional-expression) v))
|
||||
@@ -1827,7 +1829,7 @@
|
||||
(return result))
|
||||
|
||||
|
||||
(%subsection "Comma Expressions")
|
||||
(%heading 2 "Comma Expressions")
|
||||
(rule (:list-expression :beta) ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) obj-or-ref)) (eval-as-list (-> (dynamic-env) (vector object))))
|
||||
(production (:list-expression :beta) ((:assignment-expression :beta)) list-expression-assignment
|
||||
((validate v) ((validate :assignment-expression) v))
|
||||
@@ -1852,12 +1854,12 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Type Expressions")
|
||||
(%heading 2 "Type Expressions")
|
||||
(production (:type-expression :beta) ((:non-assignment-expression :beta)) type-expression-non-assignment-expression)
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%section "Statements")
|
||||
(%heading 1 "Statements")
|
||||
|
||||
(grammar-argument :omega
|
||||
abbrev ;optional semicolon when followed by a '}', 'else', or 'while' in a do-while
|
||||
@@ -1930,11 +1932,11 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Empty Statement")
|
||||
(%heading 2 "Empty Statement")
|
||||
(production :empty-statement (\;) empty-statement-semicolon)
|
||||
|
||||
|
||||
(%subsection "Expression Statement")
|
||||
(%heading 2 "Expression Statement")
|
||||
(rule :expression-statement ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) object)))
|
||||
(production :expression-statement ((:- function {) (:list-expression allow-in)) expression-statement-list-expression
|
||||
((validate v) ((validate :list-expression) v))
|
||||
@@ -1942,12 +1944,12 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Super Statement")
|
||||
(%heading 2 "Super Statement")
|
||||
(production :super-statement (super :arguments) super-statement-super-arguments)
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Block Statement")
|
||||
(%heading 2 "Block Statement")
|
||||
(rule :annotated-block ((validate (-> (validation-env) void)) (eval (-> (dynamic-env object) object)))
|
||||
(production :annotated-block (:attributes :block) annotated-block-attributes-and-block
|
||||
(validate (validate :block)) ;******
|
||||
@@ -1984,7 +1986,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Labeled Statements")
|
||||
(%heading 2 "Labeled Statements")
|
||||
(rule (:labeled-statement :omega) ((validate (-> (validation-env) void)) (eval (-> (dynamic-env object) object)))
|
||||
(production (:labeled-statement :omega) (:identifier \: (:substatement :omega)) labeled-statement-label
|
||||
((validate v) ((validate :substatement) (add-label v (name :identifier))))
|
||||
@@ -1996,7 +1998,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "If Statement")
|
||||
(%heading 2 "If Statement")
|
||||
(rule (:if-statement :omega) ((validate (-> (validation-env) void)) (eval (-> (dynamic-env object) object)))
|
||||
(production (:if-statement abbrev) (if :paren-list-expression (:substatement abbrev)) if-statement-if-then-abbrev
|
||||
((validate v)
|
||||
@@ -2027,7 +2029,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Switch Statement")
|
||||
(%heading 2 "Switch Statement")
|
||||
(production :switch-statement (switch :paren-list-expression { :case-statements }) switch-statement-cases)
|
||||
|
||||
(production :case-statements () case-statements-none)
|
||||
@@ -2045,17 +2047,17 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Do-While Statement")
|
||||
(%heading 2 "Do-While Statement")
|
||||
(production :do-statement (do (:substatement abbrev) while :paren-list-expression) do-statement-do-while)
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "While Statement")
|
||||
(%heading 2 "While Statement")
|
||||
(production (:while-statement :omega) (while :paren-list-expression (:substatement :omega)) while-statement-while)
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "For Statements")
|
||||
(%heading 2 "For Statements")
|
||||
(production (:for-statement :omega) (for \( :for-initialiser \; :optional-expression \; :optional-expression \)
|
||||
(:substatement :omega)) for-statement-c-style)
|
||||
(production (:for-statement :omega) (for \( :for-in-binding in (:list-expression allow-in) \) (:substatement :omega)) for-statement-in)
|
||||
@@ -2069,12 +2071,12 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "With Statement")
|
||||
(%heading 2 "With Statement")
|
||||
(production (:with-statement :omega) (with :paren-list-expression (:substatement :omega)) with-statement-with)
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Continue and Break Statements")
|
||||
(%heading 2 "Continue and Break Statements")
|
||||
(rule :continue-statement ((validate (-> (validation-env) void)) (eval (-> (dynamic-env object) object)))
|
||||
(production :continue-statement (continue) continue-statement-unlabeled
|
||||
((validate (v :unused)) (todo))
|
||||
@@ -2093,7 +2095,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Return Statement")
|
||||
(%heading 2 "Return Statement")
|
||||
(rule :return-statement ((validate (-> (validation-env) void)) (eval (-> (dynamic-env) object)))
|
||||
(production :return-statement (return) return-statement-default
|
||||
((validate v)
|
||||
@@ -2109,12 +2111,12 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Throw Statement")
|
||||
(%heading 2 "Throw Statement")
|
||||
(production :throw-statement (throw :no-line-break (:list-expression allow-in)) throw-statement-throw)
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Try Statement")
|
||||
(%heading 2 "Try Statement")
|
||||
(production :try-statement (try :block :catch-clauses) try-statement-catch-clauses)
|
||||
(production :try-statement (try :block :finally-clause) try-statement-finally-clause)
|
||||
(production :try-statement (try :block :catch-clauses :finally-clause) try-statement-catch-clauses-finally-clause)
|
||||
@@ -2128,7 +2130,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%section "Directives")
|
||||
(%heading 1 "Directives")
|
||||
(rule (:directive :omega_2) ((validate (-> (validation-env) void)) (eval (-> (dynamic-env object) object)))
|
||||
(production (:directive :omega_2) ((:statement :omega_2)) directive-statement
|
||||
((validate v) ((validate :statement) v))
|
||||
@@ -2162,7 +2164,7 @@
|
||||
(%print-actions ("Validation" validate) ("Evaluation" eval))
|
||||
|
||||
|
||||
(%subsection "Attributes")
|
||||
(%heading 2 "Attributes")
|
||||
(production :attributes () attributes-none)
|
||||
(production :attributes (:attribute :no-line-break :attributes) attributes-more)
|
||||
|
||||
@@ -2178,7 +2180,7 @@
|
||||
|
||||
|
||||
|
||||
(%subsection "Use Directive")
|
||||
(%heading 2 "Use Directive")
|
||||
(production :use-directive (use namespace :paren-list-expression :includes-excludes) use-directive-normal)
|
||||
|
||||
(production :includes-excludes () includes-excludes-none)
|
||||
@@ -2209,7 +2211,7 @@
|
||||
|#
|
||||
|
||||
|
||||
(%subsection "Import Directive")
|
||||
(%heading 2 "Import Directive")
|
||||
(production :import-directive (import :import-binding :includes-excludes) import-directive-import)
|
||||
(production :import-directive (import :import-binding \, namespace :paren-list-expression :includes-excludes)
|
||||
import-directive-import-namespaces)
|
||||
@@ -2222,11 +2224,11 @@
|
||||
|
||||
|
||||
(? js2
|
||||
(%subsection "Include Directive")
|
||||
(%heading 2 "Include Directive")
|
||||
(production :include-directive (include :no-line-break $string) include-directive-include))
|
||||
|
||||
|
||||
(%subsection "Pragma")
|
||||
(%heading 2 "Pragma")
|
||||
(production :pragma (use :pragma-items) pragma-pragma-items)
|
||||
|
||||
(production :pragma-items (:pragma-item) pragma-items-one)
|
||||
@@ -2239,8 +2241,8 @@
|
||||
(production :pragma-expr (:identifier :paren-list-expression) pragma-expr-identifier-and-arguments)
|
||||
|
||||
|
||||
(%section "Definitions")
|
||||
(%subsection "Export Definition")
|
||||
(%heading 1 "Definitions")
|
||||
(%heading 2 "Export Definition")
|
||||
(production :export-definition (export :export-binding-list) export-definition-definition)
|
||||
|
||||
(production :export-binding-list (:export-binding) export-binding-list-one)
|
||||
@@ -2250,7 +2252,7 @@
|
||||
(production :export-binding (:function-name = :function-name) export-binding-initialiser)
|
||||
|
||||
|
||||
(%subsection "Variable Definition")
|
||||
(%heading 2 "Variable Definition")
|
||||
(production :variable-definition (:variable-definition-kind (:variable-binding-list allow-in)) variable-definition-definition)
|
||||
|
||||
(production :variable-definition-kind (var) variable-definition-kind-var)
|
||||
@@ -2286,7 +2288,7 @@
|
||||
(production :untyped-variable-binding (:identifier = (:variable-initialiser allow-in)) untyped-variable-binding-initialised)
|
||||
|
||||
|
||||
(%subsection "Function Definition")
|
||||
(%heading 2 "Function Definition")
|
||||
(production (:function-definition :omega_2) (:function-declaration :block) function-definition-definition)
|
||||
(production (:function-definition :omega_2) (:function-declaration (:semicolon :omega_2)) function-definition-declaration)
|
||||
|
||||
@@ -2343,7 +2345,7 @@
|
||||
;(production :result-signature ((:- {) (:type-expression allow-in)) result-signature-type-expression)
|
||||
|
||||
|
||||
(%subsection "Class Definition")
|
||||
(%heading 2 "Class Definition")
|
||||
(production (:class-definition :omega_2) (class :identifier :inheritance :block) class-definition-definition)
|
||||
(production (:class-definition :omega_2) (class :identifier (:semicolon :omega_2)) class-definition-declaration)
|
||||
|
||||
@@ -2353,7 +2355,7 @@
|
||||
(production :inheritance (implements :type-expression-list) inheritance-implements)
|
||||
(production :inheritance (extends (:type-expression allow-in) implements :type-expression-list) inheritance-extends-implements)
|
||||
|
||||
(%subsection "Interface Definition")
|
||||
(%heading 2 "Interface Definition")
|
||||
(production (:interface-definition :omega_2) (interface :identifier :extends-list :block) interface-definition-definition)
|
||||
(production (:interface-definition :omega_2) (interface :identifier (:semicolon :omega_2)) interface-definition-declaration)
|
||||
|
||||
@@ -2364,11 +2366,11 @@
|
||||
(production :type-expression-list (:type-expression-list \, (:type-expression allow-in)) type-expression-list-more))
|
||||
|
||||
|
||||
(%subsection "Namespace Definition")
|
||||
(%heading 2 "Namespace Definition")
|
||||
(production :namespace-definition (namespace :identifier) namespace-definition-normal)
|
||||
|
||||
|
||||
(%subsection "Package Definition")
|
||||
(%heading 2 "Package Definition")
|
||||
(production :package-definition (package :block) package-definition-anonymous)
|
||||
(production :package-definition (package :package-name :block) package-definition-named)
|
||||
|
||||
@@ -2376,7 +2378,7 @@
|
||||
(production :package-name (:package-name \. :identifier) package-name-more)
|
||||
|
||||
|
||||
(%section "Programs")
|
||||
(%heading 1 "Programs")
|
||||
(rule :program ((eval-program object))
|
||||
(production :program (:directives) program-directives
|
||||
(eval-program
|
||||
@@ -2452,7 +2454,7 @@
|
||||
(terminalset-list grammar (terminalset-intersection (terminalset-union regexp-predecessors virtual-predecessors) div-predecessors))))))
|
||||
|
||||
|
||||
(defun depict-js-terminals (markup-stream grammar)
|
||||
(defun depict-js-terminals (markup-stream grammar heading)
|
||||
(labels
|
||||
((production-first-terminal (production)
|
||||
(first (production-rhs production)))
|
||||
@@ -2492,7 +2494,7 @@
|
||||
(setf (svref bins 2) (delete terminal (svref bins 2)))
|
||||
(setf (svref bins 4) (delete terminal (svref bins 4)))
|
||||
(push terminal (svref bins (terminal-bin terminal))))))
|
||||
(depict-paragraph (markup-stream :section-heading)
|
||||
(depict-paragraph (markup-stream heading)
|
||||
(depict-link (markup-stream :definition "terminals" "" nil)
|
||||
(depict markup-stream "Terminals")))
|
||||
(mapc #'depict-terminal-bin '("General tokens: " "Punctuation tokens: " "Future punctuation tokens: "
|
||||
@@ -2507,26 +2509,26 @@
|
||||
"JS20/ParserGrammarJS2.rtf"
|
||||
"JavaScript 2.0 Syntactic Grammar"
|
||||
#'(lambda (markup-stream)
|
||||
(depict-js-terminals markup-stream *jg*)
|
||||
(depict-js-terminals markup-stream *jg* :heading1)
|
||||
(depict-world-commands markup-stream *jw* :visible-semantics nil)))
|
||||
(depict-rtf-to-local-file
|
||||
"JS20/ParserSemanticsJS2.rtf"
|
||||
"JavaScript 2.0 Syntactic Semantics"
|
||||
#'(lambda (markup-stream)
|
||||
(depict-js-terminals markup-stream *jg*)
|
||||
(depict-js-terminals markup-stream *jg* :heading1)
|
||||
(depict-world-commands markup-stream *jw*)))
|
||||
(compute-ecma-subset)
|
||||
(depict-rtf-to-local-file
|
||||
"JS20/ParserGrammarES4.rtf"
|
||||
"ECMAScript Edition 4 Syntactic Grammar"
|
||||
#'(lambda (markup-stream)
|
||||
(depict-js-terminals markup-stream *eg*)
|
||||
(depict-js-terminals markup-stream *eg* :heading1)
|
||||
(depict-world-commands markup-stream *ew* :visible-semantics nil)))
|
||||
(depict-rtf-to-local-file
|
||||
"JS20/ParserSemanticsES4.rtf"
|
||||
"ECMAScript Edition 4 Syntactic Semantics"
|
||||
#'(lambda (markup-stream)
|
||||
(depict-js-terminals markup-stream *eg*)
|
||||
(depict-js-terminals markup-stream *eg* :heading1)
|
||||
(depict-world-commands markup-stream *ew*)))
|
||||
|
||||
(length (grammar-states *jg*))
|
||||
@@ -2535,15 +2537,15 @@
|
||||
"JavaScript 2.0 Syntactic Grammar"
|
||||
t
|
||||
#'(lambda (markup-stream)
|
||||
(depict-js-terminals markup-stream *jg*)
|
||||
(depict-world-commands markup-stream *jw* :visible-semantics nil))
|
||||
(depict-js-terminals markup-stream *jg* :heading2)
|
||||
(depict-world-commands markup-stream *jw* :heading-offset 1 :visible-semantics nil))
|
||||
:external-link-base "notation.html")
|
||||
(depict-html-to-local-file
|
||||
"JS20/ParserSemanticsJS2.html"
|
||||
"JavaScript 2.0 Syntactic Semantics"
|
||||
t
|
||||
#'(lambda (markup-stream)
|
||||
(depict-js-terminals markup-stream *jg*)
|
||||
(depict-js-terminals markup-stream *jg* :heading1)
|
||||
(depict-world-commands markup-stream *jw*))
|
||||
:external-link-base "notation.html")
|
||||
(compute-ecma-subset)
|
||||
@@ -2552,15 +2554,15 @@
|
||||
"ECMAScript Edition 4 Syntactic Grammar"
|
||||
t
|
||||
#'(lambda (markup-stream)
|
||||
(depict-js-terminals markup-stream *eg*)
|
||||
(depict-world-commands markup-stream *ew* :visible-semantics nil))
|
||||
(depict-js-terminals markup-stream *eg* :heading2)
|
||||
(depict-world-commands markup-stream *ew* :heading-offset 1 :visible-semantics nil))
|
||||
:external-link-base "notation.html")
|
||||
(depict-html-to-local-file
|
||||
"JS20/ParserSemanticsES4.html"
|
||||
"ECMAScript Edition 4 Syntactic Semantics"
|
||||
t
|
||||
#'(lambda (markup-stream)
|
||||
(depict-js-terminals markup-stream *eg*)
|
||||
(depict-js-terminals markup-stream *eg* :heading1)
|
||||
(depict-world-commands markup-stream *ew*))
|
||||
:external-link-base "notation.html"))
|
||||
|
||||
@@ -2569,7 +2571,7 @@
|
||||
"JS20/ParserSemanticsJS2.rtf"
|
||||
"JavaScript 2.0 Syntactic Semantics"
|
||||
#'(lambda (markup-stream)
|
||||
(depict-js-terminals markup-stream *jg*)
|
||||
(depict-js-terminals markup-stream *jg* :heading1)
|
||||
(depict-world-commands markup-stream *jw*)))
|
||||
|
||||
(depict-html-to-local-file
|
||||
@@ -2577,7 +2579,7 @@
|
||||
"JavaScript 2.0 Syntactic Semantics"
|
||||
t
|
||||
#'(lambda (markup-stream)
|
||||
(depict-js-terminals markup-stream *jg*)
|
||||
(depict-js-terminals markup-stream *jg* :heading1)
|
||||
(depict-world-commands markup-stream *jw*))
|
||||
:external-link-base "notation.html")
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
(deftag syntax-error)
|
||||
(deftype semantic-exception (tag syntax-error))
|
||||
|
||||
(%section "Unicode Character Classes")
|
||||
(%heading 1 "Unicode Character Classes")
|
||||
(%charclass :unicode-character)
|
||||
(%charclass :unicode-alphanumeric)
|
||||
(%charclass :line-terminator)
|
||||
@@ -56,7 +56,7 @@
|
||||
(%print-actions)
|
||||
|
||||
|
||||
(%section "Regular Expression Definitions")
|
||||
(%heading 1 "Regular Expression Definitions")
|
||||
(deftuple r-e-input (str string) (ignore-case boolean) (multiline boolean) (span boolean))
|
||||
(%text :semantics
|
||||
"Field " (:label r-e-input str) " is the input string. "
|
||||
@@ -133,7 +133,7 @@
|
||||
(%print-actions)
|
||||
|
||||
|
||||
(%section "Regular Expression Patterns")
|
||||
(%heading 1 "Regular Expression Patterns")
|
||||
|
||||
(rule :regular-expression-pattern ((execute (-> (r-e-input integer) r-e-result)))
|
||||
(production :regular-expression-pattern (:disjunction) regular-expression-pattern-disjunction
|
||||
@@ -154,7 +154,7 @@
|
||||
(return (append (fill-capture (- i 1)) (vector-of capture undefined)))))
|
||||
|
||||
|
||||
(%subsection "Disjunctions")
|
||||
(%heading 2 "Disjunctions")
|
||||
|
||||
(rule :disjunction ((gen-matcher (-> (integer) matcher)) (count-parens integer))
|
||||
(production :disjunction (:alternative) disjunction-one
|
||||
@@ -175,7 +175,7 @@
|
||||
(%print-actions)
|
||||
|
||||
|
||||
(%subsection "Alternatives")
|
||||
(%heading 2 "Alternatives")
|
||||
|
||||
(rule :alternative ((gen-matcher (-> (integer) matcher)) (count-parens integer))
|
||||
(production :alternative () alternative-none
|
||||
@@ -198,7 +198,7 @@
|
||||
(%print-actions)
|
||||
|
||||
|
||||
(%subsection "Terms")
|
||||
(%heading 2 "Terms")
|
||||
|
||||
(rule :term ((gen-matcher (-> (integer) matcher)) (count-parens integer))
|
||||
(production :term (:assertion) term-assertion
|
||||
@@ -308,7 +308,7 @@
|
||||
(%print-actions)
|
||||
|
||||
|
||||
(%subsection "Assertions")
|
||||
(%heading 2 "Assertions")
|
||||
|
||||
(rule :assertion ((test-assertion (-> (r-e-input r-e-match) boolean)))
|
||||
(production :assertion (#\^) assertion-beginning
|
||||
@@ -339,7 +339,7 @@
|
||||
(return (set-in (nth s i) re-word-characters))))
|
||||
|
||||
|
||||
(%section "Atoms")
|
||||
(%heading 1 "Atoms")
|
||||
|
||||
(rule :atom ((gen-matcher (-> (integer) matcher)) (count-parens integer))
|
||||
(production :atom (:pattern-character) atom-pattern-character
|
||||
@@ -410,7 +410,7 @@
|
||||
(%print-actions)
|
||||
|
||||
|
||||
(%section "Escapes")
|
||||
(%heading 1 "Escapes")
|
||||
|
||||
(production :null-escape (#\\ #\_) null-escape-underscore)
|
||||
|
||||
@@ -471,7 +471,7 @@
|
||||
(%print-actions)
|
||||
|
||||
|
||||
(%subsection "Decimal Escapes")
|
||||
(%heading 2 "Decimal Escapes")
|
||||
|
||||
(rule :decimal-escape ((escape-value integer))
|
||||
(production :decimal-escape (:decimal-integer-literal (:- :decimal-digit)) decimal-escape-integer
|
||||
@@ -493,7 +493,7 @@
|
||||
(%print-actions)
|
||||
|
||||
|
||||
(%subsection "Hexadecimal Escapes")
|
||||
(%heading 2 "Hexadecimal Escapes")
|
||||
|
||||
(rule :hex-escape ((character-value character))
|
||||
(production :hex-escape (#\x :hex-digit :hex-digit) hex-escape-2
|
||||
@@ -508,7 +508,7 @@
|
||||
(%print-actions)
|
||||
|
||||
|
||||
(%subsection "Character Class Escapes")
|
||||
(%heading 2 "Character Class Escapes")
|
||||
|
||||
(rule :character-class-escape ((acceptance-set (range-set character)))
|
||||
(production :character-class-escape (#\s) character-class-escape-whitespace
|
||||
@@ -526,7 +526,7 @@
|
||||
(%print-actions)
|
||||
|
||||
|
||||
(%section "User-Specified Character Classes")
|
||||
(%heading 1 "User-Specified Character Classes")
|
||||
|
||||
(rule :character-class ((acceptance-set (range-set character)) (invert boolean))
|
||||
(production :character-class (#\[ (:- #\^) :class-ranges #\]) character-class-positive
|
||||
@@ -569,7 +569,7 @@
|
||||
(throw syntax-error)))
|
||||
|
||||
|
||||
(%subsection "Character Class Range Atoms")
|
||||
(%heading 2 "Character Class Range Atoms")
|
||||
|
||||
(rule (:class-atom :delta) ((acceptance-set (range-set character)))
|
||||
(production (:class-atom :delta) ((:class-character :delta)) class-atom-character
|
||||
@@ -615,25 +615,25 @@
|
||||
"JS20/RegExpGrammar.rtf"
|
||||
"Regular Expression Grammar"
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *rw* :visible-semantics nil)))
|
||||
(depict-world-commands rtf-stream *rw* :heading-offset 1 :visible-semantics nil)))
|
||||
(depict-rtf-to-local-file
|
||||
"JS20/RegExpSemantics.rtf"
|
||||
"Regular Expression Semantics"
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *rw*)))
|
||||
(depict-world-commands rtf-stream *rw* :heading-offset 1)))
|
||||
(depict-html-to-local-file
|
||||
"JS20/RegExpGrammar.html"
|
||||
"Regular Expression Grammar"
|
||||
t
|
||||
#'(lambda (html-stream)
|
||||
(depict-world-commands html-stream *rw* :visible-semantics nil))
|
||||
(depict-world-commands html-stream *rw* :heading-offset 1 :visible-semantics nil))
|
||||
:external-link-base "notation.html")
|
||||
(depict-html-to-local-file
|
||||
"JS20/RegExpSemantics.html"
|
||||
"Regular Expression Semantics"
|
||||
t
|
||||
#'(lambda (html-stream)
|
||||
(depict-world-commands html-stream *rw*))
|
||||
(depict-world-commands html-stream *rw* :heading-offset 1))
|
||||
:external-link-base "notation.html"))
|
||||
|
||||
(with-local-output (s "JS20/RegExpGrammar.txt") (print-lexer *rl* s) (print-grammar *rg* s))
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
(%print-actions)
|
||||
|
||||
|
||||
(%section "White Space")
|
||||
(%heading 1 "White Space")
|
||||
|
||||
(grammar-argument :sigma wsopt wsreq)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
(production (:white-space :sigma) (:required-white-space) white-space-required-white-space)
|
||||
(production (:white-space wsopt) () white-space-empty)
|
||||
|
||||
(%section "Unit Patterns")
|
||||
(%heading 1 "Unit Patterns")
|
||||
|
||||
(rule :unit-pattern ((value unit-list))
|
||||
(production :unit-pattern ((:white-space wsopt) :unit-quotient) unit-pattern-quotient
|
||||
@@ -98,7 +98,7 @@
|
||||
(%print-actions)
|
||||
|
||||
|
||||
(%section "Signed Integers")
|
||||
(%heading 1 "Signed Integers")
|
||||
(rule :signed-integer ((integer-value integer))
|
||||
(production :signed-integer (:decimal-digits) signed-integer-no-sign
|
||||
(integer-value (integer-value :decimal-digits)))
|
||||
@@ -117,7 +117,7 @@
|
||||
(%print-actions)
|
||||
|
||||
|
||||
(%section "Identifiers")
|
||||
(%heading 1 "Identifiers")
|
||||
(rule :identifier ((name string))
|
||||
(production :identifier (:initial-identifier-character) identifier-initial
|
||||
(name (vector ($default-action :initial-identifier-character))))
|
||||
@@ -155,25 +155,25 @@
|
||||
"JS20/UnitGrammar.rtf"
|
||||
"JavaScript 2 Unit Grammar"
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *uw* :visible-semantics nil)))
|
||||
(depict-world-commands rtf-stream *uw* :heading-offset 1 :visible-semantics nil)))
|
||||
(depict-rtf-to-local-file
|
||||
"JS20/UnitSemantics.rtf"
|
||||
"JavaScript 2 Unit Semantics"
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *uw*)))
|
||||
(depict-world-commands rtf-stream *uw* :heading-offset 1)))
|
||||
(depict-html-to-local-file
|
||||
"JS20/UnitGrammar.html"
|
||||
"JavaScript 2 Unit Grammar"
|
||||
t
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *uw* :visible-semantics nil))
|
||||
#'(lambda (html-stream)
|
||||
(depict-world-commands html-stream *uw* :heading-offset 1 :visible-semantics nil))
|
||||
:external-link-base "notation.html")
|
||||
(depict-html-to-local-file
|
||||
"JS20/UnitSemantics.html"
|
||||
"JavaScript 2 Unit Semantics"
|
||||
t
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *uw*))
|
||||
#'(lambda (html-stream)
|
||||
(depict-world-commands html-stream *uw* :heading-offset 1))
|
||||
:external-link-base "notation.html"))
|
||||
|
||||
(with-local-output (s "JS20/UnitGrammar.txt") (print-lexer *ul* s) (print-grammar *ug* s))
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
((character-value character nil identity)
|
||||
($digit-value integer digit-value digit-char-36)))
|
||||
|
||||
(%section "Comments")
|
||||
(%heading 1 "Comments")
|
||||
(production :line-comment (#\/ #\/ :line-comment-characters) line-comment)
|
||||
|
||||
(production :line-comment-characters () line-comment-characters-empty)
|
||||
@@ -90,14 +90,14 @@
|
||||
(production :multi-line-block-comment-characters (:multi-line-block-comment-characters :block-comment-characters :line-terminator)
|
||||
multi-line-block-comment-characters-rest)
|
||||
|
||||
(%section "White space")
|
||||
(%heading 1 "White space")
|
||||
|
||||
(production :white-space () white-space-empty)
|
||||
(production :white-space (:white-space :white-space-character) white-space-character)
|
||||
(production :white-space (:white-space :single-line-block-comment) white-space-single-line-block-comment)
|
||||
(%charclass :white-space-character)
|
||||
|
||||
(%section "Line breaks")
|
||||
(%heading 1 "Line breaks")
|
||||
|
||||
(production :line-break (:line-terminator) line-break-line-terminator)
|
||||
(production :line-break (:line-comment :line-terminator) line-break-line-comment)
|
||||
@@ -107,7 +107,7 @@
|
||||
(production :line-breaks (:line-break) line-breaks-first)
|
||||
(production :line-breaks (:line-breaks :white-space :line-break) line-breaks-rest)
|
||||
|
||||
(%section "Tokens")
|
||||
(%heading 1 "Tokens")
|
||||
|
||||
(declare-action token :next-token token)
|
||||
(production :next-token (:white-space :token) next-token
|
||||
@@ -133,7 +133,7 @@
|
||||
(deftype token (oneof (identifier string) (reserved-word string) (punctuator string) (number float64) (string string) line-breaks end))
|
||||
(%print-actions)
|
||||
|
||||
(%section "Keywords")
|
||||
(%heading 1 "Keywords")
|
||||
|
||||
(declare-action name :identifier-name string)
|
||||
(production :identifier-name (:identifier-letter) identifier-name-letter
|
||||
@@ -172,7 +172,7 @@
|
||||
(oneof identifier id)))))
|
||||
(%print-actions)
|
||||
|
||||
(%section "Punctuators")
|
||||
(%heading 1 "Punctuators")
|
||||
|
||||
(declare-action punctuator :punctuator string)
|
||||
(production :punctuator (#\=) punctuator-assignment (punctuator "="))
|
||||
@@ -225,7 +225,7 @@
|
||||
(production :punctuator (#\;) punctuator-semicolon (punctuator ";"))
|
||||
(%print-actions)
|
||||
|
||||
(%section "Numeric literals")
|
||||
(%heading 1 "Numeric literals")
|
||||
|
||||
(declare-action float64-value :numeric-literal float64)
|
||||
(production :numeric-literal (:decimal-literal) numeric-literal-decimal
|
||||
@@ -320,7 +320,7 @@
|
||||
(%charclass :octal-digit)
|
||||
(%print-actions)
|
||||
|
||||
(%section "String literals")
|
||||
(%heading 1 "String literals")
|
||||
|
||||
(grammar-argument :quote single double)
|
||||
(declare-action string-value :string-literal string)
|
||||
@@ -443,14 +443,14 @@
|
||||
"JSECMA/LexerSemantics.rtf"
|
||||
"ECMAScript 1 Lexer Semantics"
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *lw*)))
|
||||
(depict-world-commands rtf-stream *lw* :heading-offset 1)))
|
||||
|
||||
(depict-html-to-local-file
|
||||
"JSECMA/LexerSemantics.html"
|
||||
"ECMAScript 1 Lexer Semantics"
|
||||
t
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *lw*)))
|
||||
#'(lambda (html-stream)
|
||||
(depict-world-commands html-stream *lw* :heading-offset 1)))
|
||||
|
||||
(with-local-output (s "JSECMA/LexerGrammar.txt") (print-lexer *ll* s) (print-grammar *lg* s))
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"G"
|
||||
'((grammar code-grammar :lr-1 :program)
|
||||
|
||||
(%section "Types")
|
||||
(%heading 1 "Types")
|
||||
|
||||
(deftype value (oneof undefined-value
|
||||
null-value
|
||||
@@ -67,7 +67,7 @@
|
||||
(deftype reference-or-exception (oneof (normal reference) (abrupt exception)))
|
||||
(deftype value-list-or-exception (oneof (normal (vector value)) (abrupt exception)))
|
||||
|
||||
(%section "Helper Functions")
|
||||
(%heading 1 "Helper Functions")
|
||||
|
||||
(define (object-or-null-to-value (o object-or-null)) value
|
||||
(case o
|
||||
@@ -89,7 +89,7 @@
|
||||
(define (object-result (o object)) value-or-exception
|
||||
(oneof normal (oneof object-value o)))
|
||||
|
||||
(%section "Exceptions")
|
||||
(%heading 1 "Exceptions")
|
||||
|
||||
(deftype exception (oneof (exception value) (error error)))
|
||||
(deftype error (oneof coerce-to-primitive-error
|
||||
@@ -101,10 +101,10 @@
|
||||
(define (make-error (err error)) exception
|
||||
(oneof error err))
|
||||
|
||||
(%section "Objects")
|
||||
(%heading 1 "Objects")
|
||||
|
||||
|
||||
(%section "Conversions")
|
||||
(%heading 1 "Conversions")
|
||||
|
||||
(define (reference-get-value (rv reference)) value-or-exception
|
||||
(case rv
|
||||
@@ -118,7 +118,7 @@
|
||||
((place-reference r place) ((& put (& base r)) (& property r) v))
|
||||
(virtual-reference (bottom))))
|
||||
|
||||
(%section "Coercions")
|
||||
(%heading 1 "Coercions")
|
||||
|
||||
(define (coerce-to-boolean (v value)) boolean
|
||||
(case v
|
||||
@@ -184,13 +184,13 @@
|
||||
(string-value (bottom))
|
||||
((object-value o object) (oneof normal o))))
|
||||
|
||||
(%section "Environments")
|
||||
(%heading 1 "Environments")
|
||||
|
||||
(deftype env (tuple (this object-or-null)))
|
||||
(define (lookup-identifier (e env :unused) (id string :unused)) reference-or-exception
|
||||
(bottom))
|
||||
|
||||
(%section "Terminal Actions")
|
||||
(%heading 1 "Terminal Actions")
|
||||
|
||||
(declare-action eval-identifier $identifier string)
|
||||
(declare-action eval-number $number float64)
|
||||
@@ -201,7 +201,7 @@
|
||||
(terminal-action eval-string $string cdr)
|
||||
(%print-actions)
|
||||
|
||||
(%section "Primary Expressions")
|
||||
(%heading 1 "Primary Expressions")
|
||||
|
||||
(declare-action eval :primary-rvalue (-> (env) value-or-exception))
|
||||
(production :primary-rvalue (this) primary-rvalue-this
|
||||
@@ -233,7 +233,7 @@
|
||||
(eval (eval :lvalue)))
|
||||
(%print-actions)
|
||||
|
||||
(%section "Left-Side Expressions")
|
||||
(%heading 1 "Left-Side Expressions")
|
||||
|
||||
(grammar-argument :expr-kind any-value no-l-value)
|
||||
(grammar-argument :member-expr-kind call no-call)
|
||||
@@ -335,7 +335,7 @@
|
||||
(letexc (res object ((& construct o) arguments))
|
||||
(object-result res)))))
|
||||
|
||||
(%section "Postfix Expressions")
|
||||
(%heading 1 "Postfix Expressions")
|
||||
|
||||
(declare-action eval (:postfix-expression :expr-kind) (-> (env) value-or-exception))
|
||||
(production (:postfix-expression :expr-kind) ((:new-expression :expr-kind)) postfix-expression-new
|
||||
@@ -360,7 +360,7 @@
|
||||
(float64-result operand)))))))
|
||||
(%print-actions)
|
||||
|
||||
(%section "Unary Operators")
|
||||
(%heading 1 "Unary Operators")
|
||||
|
||||
(declare-action eval (:unary-expression :expr-kind) (-> (env) value-or-exception))
|
||||
(production (:unary-expression :expr-kind) ((:postfix-expression :expr-kind)) unary-expression-postfix
|
||||
@@ -437,7 +437,7 @@
|
||||
(string-value "string")
|
||||
((object-value o object) (& typeof-name o))))
|
||||
|
||||
(%section "Multiplicative Operators")
|
||||
(%heading 1 "Multiplicative Operators")
|
||||
|
||||
(declare-action eval (:multiplicative-expression :expr-kind) (-> (env) value-or-exception))
|
||||
(production (:multiplicative-expression :expr-kind) ((:unary-expression :expr-kind)) multiplicative-expression-unary
|
||||
@@ -464,7 +464,7 @@
|
||||
(letexc (right-number float64 (coerce-to-float64 right-value))
|
||||
(float64-result (operator left-number right-number)))))
|
||||
|
||||
(%section "Additive Operators")
|
||||
(%heading 1 "Additive Operators")
|
||||
|
||||
(declare-action eval (:additive-expression :expr-kind) (-> (env) value-or-exception))
|
||||
(production (:additive-expression :expr-kind) ((:multiplicative-expression :expr-kind)) additive-expression-multiplicative
|
||||
@@ -487,7 +487,7 @@
|
||||
(apply-binary-float64-operator float64-subtract left-value right-value)))))
|
||||
(%print-actions)
|
||||
|
||||
(%section "Bitwise Shift Operators")
|
||||
(%heading 1 "Bitwise Shift Operators")
|
||||
|
||||
(declare-action eval (:shift-expression :expr-kind) (-> (env) value-or-exception))
|
||||
(production (:shift-expression :expr-kind) ((:additive-expression :expr-kind)) shift-expression-additive
|
||||
@@ -516,7 +516,7 @@
|
||||
(integer-result (bitwise-shift bitmap (neg (bitwise-and count #x1F))))))))))
|
||||
(%print-actions)
|
||||
|
||||
(%section "Relational Operators")
|
||||
(%heading 1 "Relational Operators")
|
||||
|
||||
(declare-action eval (:relational-expression :expr-kind) (-> (env) value-or-exception))
|
||||
(production (:relational-expression :expr-kind) ((:shift-expression :expr-kind)) relational-expression-shift
|
||||
@@ -568,7 +568,7 @@
|
||||
greater
|
||||
(compare-strings (subseq left 1) (subseq right 1) less equal greater))))))))
|
||||
|
||||
(%section "Equality Operators")
|
||||
(%heading 1 "Equality Operators")
|
||||
|
||||
(declare-action eval (:equality-expression :expr-kind) (-> (env) value-or-exception))
|
||||
(production (:equality-expression :expr-kind) ((:relational-expression :expr-kind)) equality-expression-relational
|
||||
@@ -675,7 +675,7 @@
|
||||
(address-equal (& properties left-obj) (& properties right-obj)))
|
||||
(((undefined-value null-value boolean-value number-value string-value)) false)))))
|
||||
|
||||
(%section "Binary Bitwise Operators")
|
||||
(%heading 1 "Binary Bitwise Operators")
|
||||
|
||||
(declare-action eval (:bitwise-and-expression :expr-kind) (-> (env) value-or-exception))
|
||||
(production (:bitwise-and-expression :expr-kind) ((:equality-expression :expr-kind)) bitwise-and-expression-equality
|
||||
@@ -710,7 +710,7 @@
|
||||
(letexc (right-int integer (coerce-to-int32 right-value))
|
||||
(integer-result (operator left-int right-int)))))
|
||||
|
||||
(%section "Binary Logical Operators")
|
||||
(%heading 1 "Binary Logical Operators")
|
||||
|
||||
(declare-action eval (:logical-and-expression :expr-kind) (-> (env) value-or-exception))
|
||||
(production (:logical-and-expression :expr-kind) ((:bitwise-or-expression :expr-kind)) logical-and-expression-bitwise-or
|
||||
@@ -733,7 +733,7 @@
|
||||
((eval :logical-and-expression) e)))))
|
||||
(%print-actions)
|
||||
|
||||
(%section "Conditional Operator")
|
||||
(%heading 1 "Conditional Operator")
|
||||
|
||||
(declare-action eval (:conditional-expression :expr-kind) (-> (env) value-or-exception))
|
||||
(production (:conditional-expression :expr-kind) ((:logical-or-expression :expr-kind)) conditional-expression-logical-or
|
||||
@@ -746,7 +746,7 @@
|
||||
((eval :assignment-expression 2) e)))))
|
||||
(%print-actions)
|
||||
|
||||
(%section "Assignment Operators")
|
||||
(%heading 1 "Assignment Operators")
|
||||
|
||||
(declare-action eval (:assignment-expression :expr-kind) (-> (env) value-or-exception))
|
||||
(production (:assignment-expression :expr-kind) ((:conditional-expression :expr-kind)) assignment-expression-conditional
|
||||
@@ -786,7 +786,7 @@
|
||||
(letexc (right-number float64 (coerce-to-float64 right-value))
|
||||
(oneof normal (oneof number-value (operator left-number right-number)))))))
|
||||
|#
|
||||
(%section "Expressions")
|
||||
(%heading 1 "Expressions")
|
||||
|
||||
(declare-action eval (:comma-expression :expr-kind) (-> (env) value-or-exception))
|
||||
(production (:comma-expression :expr-kind) ((:assignment-expression :expr-kind)) comma-expression-assignment
|
||||
@@ -798,7 +798,7 @@
|
||||
(eval (eval :comma-expression)))
|
||||
(%print-actions)
|
||||
|
||||
(%section "Programs")
|
||||
(%heading 1 "Programs")
|
||||
|
||||
(declare-action eval :program value-or-exception)
|
||||
(production :program (:expression $end) program
|
||||
@@ -837,14 +837,14 @@
|
||||
"JSECMA/ParserSemantics.rtf"
|
||||
"ECMAScript 1 Parser Semantics"
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *gw*)))
|
||||
(depict-world-commands rtf-stream *gw* :heading-offset 1)))
|
||||
|
||||
(depict-html-to-local-file
|
||||
"JSECMA/ParserSemantics.html"
|
||||
"ECMAScript 1 Parser Semantics"
|
||||
t
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *gw*)))
|
||||
#'(lambda (html-stream)
|
||||
(depict-world-commands html-stream *gw* :heading-offset 1)))
|
||||
|
||||
(with-local-output (s "JSECMA/ParserGrammar.txt") (print-grammar *gg* s))
|
||||
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
(:10-pt fs 20)
|
||||
(:12-pt fs 24)
|
||||
(:14-pt fs 28)
|
||||
(:18-pt fs 36)
|
||||
(:no-language lang 1024)
|
||||
(:english-us lang 1033)
|
||||
(:english-uk lang 2057)
|
||||
@@ -406,17 +407,15 @@
|
||||
|
||||
|
||||
(:heading1-num 61)
|
||||
(:heading1 s :heading1-num qj fi -720 li 720 sb 240 sa 180 keep keepn widctlpar :asian-keywords hyphpar 0 level 1 b :14-pt :english)
|
||||
(:heading1 s :heading1-num qj fi -720 li 720 sb 360 sa 180 keep keepn widctlpar :asian-keywords hyphpar 0 level 1 b :18-pt :english)
|
||||
((+ :styles) (:heading1 sbasedon :normal-num snext :body-text-num "heading 1;"))
|
||||
(:section-heading :heading1)
|
||||
|
||||
(:heading2-num 62)
|
||||
(:heading2 s :heading2-num qj fi -720 li 720 sb 120 sa 180 keep keepn widctlpar :asian-keywords hyphpar 0 level 2 b :12-pt :english)
|
||||
(:heading2 s :heading2-num qj fi -720 li 720 sb 120 sa 180 keep keepn widctlpar :asian-keywords hyphpar 0 level 2 b :14-pt :english)
|
||||
((+ :styles) (:heading2 sbasedon :heading1-num snext :body-text-num "heading 2;"))
|
||||
(:subsection-heading :heading2)
|
||||
|
||||
(:heading3-num 63)
|
||||
(:heading3 s :heading3-num qj fi -720 li 720 sb 60 sa 120 keep keepn widctlpar :asian-keywords hyphpar 0 level 3 b :10-pt :english)
|
||||
(:heading3 s :heading3-num qj fi -720 li 720 sb 60 sa 120 keep keepn widctlpar :asian-keywords hyphpar 0 level 3 b :12-pt :english)
|
||||
((+ :styles) (:heading3 sbasedon :heading2-num snext :body-text-num "heading 3;"))
|
||||
|
||||
(:heading4-num 64)
|
||||
|
||||
@@ -52,13 +52,13 @@
|
||||
"Test/BaseExampleSemantics.rtf"
|
||||
"Base Example Semantics"
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *bew*)))
|
||||
(depict-world-commands rtf-stream *bew* :heading-offset 1)))
|
||||
(depict-html-to-local-file
|
||||
"Test/BaseExampleSemantics.html"
|
||||
"Base Example Semantics"
|
||||
t
|
||||
#'(lambda (html-stream)
|
||||
(depict-world-commands html-stream *bew*))
|
||||
(depict-world-commands html-stream *bew* :heading-offset 1))
|
||||
:external-link-base ""))
|
||||
|
||||
|
||||
|
||||
@@ -48,14 +48,14 @@
|
||||
"Test/CanonicalLRTestGrammar.rtf"
|
||||
"Canonical LR(1) Test Grammar"
|
||||
#'(lambda (markup-stream)
|
||||
(depict-world-commands markup-stream *clrtw* :visible-semantics nil)))
|
||||
(depict-world-commands markup-stream *clrtw* :heading-offset 1 :visible-semantics nil)))
|
||||
|
||||
(depict-html-to-local-file
|
||||
"Test/CanonicalLRTestGrammar.html"
|
||||
"Canonical LR(1) Test Grammar"
|
||||
t
|
||||
#'(lambda (markup-stream)
|
||||
(depict-world-commands markup-stream *clrtw* :visible-semantics nil)))
|
||||
(depict-world-commands markup-stream *clrtw* :heading-offset 1 :visible-semantics nil)))
|
||||
|
||||
(print-grammar *clrtg*)
|
||||
(with-local-output (s "Test/CanonicalLRTestGrammar.txt") (print-grammar *clrtg* s))
|
||||
|
||||
@@ -54,14 +54,14 @@
|
||||
"Test/ConstraintTestGrammar.rtf"
|
||||
"Constraint Test Grammar"
|
||||
#'(lambda (markup-stream)
|
||||
(depict-world-commands markup-stream *ctw* :visible-semantics nil)))
|
||||
(depict-world-commands markup-stream *ctw* :heading-offset 1 :visible-semantics nil)))
|
||||
|
||||
(depict-html-to-local-file
|
||||
"Test/ConstraintTestGrammar.html"
|
||||
"Constraint Test Grammar"
|
||||
t
|
||||
#'(lambda (markup-stream)
|
||||
(depict-world-commands markup-stream *ctw* :visible-semantics nil)))
|
||||
(depict-world-commands markup-stream *ctw* :heading-offset 1 :visible-semantics nil)))
|
||||
|
||||
(with-local-output (s "Test/ConstraintTestGrammar.txt") (print-grammar *ctg* s))
|
||||
|
||||
|
||||
@@ -50,14 +50,14 @@
|
||||
"Test/LineTestGrammar.rtf"
|
||||
"Line Test Grammar"
|
||||
#'(lambda (markup-stream)
|
||||
(depict-world-commands markup-stream *ltw* :visible-semantics nil)))
|
||||
(depict-world-commands markup-stream *ltw* :heading-offset 1 :visible-semantics nil)))
|
||||
|
||||
(depict-html-to-local-file
|
||||
"Test/LineTestGrammar.html"
|
||||
"Line Test Grammar"
|
||||
t
|
||||
#'(lambda (markup-stream)
|
||||
(depict-world-commands markup-stream *ltw* :visible-semantics nil)))
|
||||
(depict-world-commands markup-stream *ltw* :heading-offset 1 :visible-semantics nil)))
|
||||
|
||||
(print-grammar *ltg*)
|
||||
(with-local-output (s "Test/LineTestGrammar.txt") (print-grammar *ltg* s))
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
(deftype getter (-> (value) value))
|
||||
(deftype setter (-> (value value) value))
|
||||
|
||||
(%section "Namespaces")
|
||||
(%heading 1 "Namespaces")
|
||||
|
||||
(define (create-namespace (supernamespaces (vector namespace))) namespace
|
||||
(bottom))
|
||||
|
||||
(%section "Classes and Intefaces")
|
||||
(%heading 1 "Classes and Intefaces")
|
||||
|
||||
(define (create-class (interface boolean) (superclasses (vector class)) (implementees (vector class))) class
|
||||
(bottom))
|
||||
@@ -37,7 +37,7 @@
|
||||
(define (create-instance (c class)) value
|
||||
(bottom))
|
||||
|
||||
(%section "Members")
|
||||
(%heading 1 "Members")
|
||||
|
||||
(define (add-getter-member (visibility scope) (n namespace) (c class) (name string) (g getter)) void
|
||||
(bottom))
|
||||
@@ -57,7 +57,7 @@
|
||||
"Test/NameResolutionSemantics.rtf"
|
||||
"Name Resolution Semantics"
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *nw*)))
|
||||
(depict-world-commands rtf-stream *nw* :heading-offset 1)))
|
||||
|#
|
||||
|
||||
(depict-html-to-local-file
|
||||
@@ -65,7 +65,7 @@
|
||||
"Name Resolution Semantics"
|
||||
t
|
||||
#'(lambda (html-stream)
|
||||
(depict-world-commands html-stream *nw*))
|
||||
(depict-world-commands html-stream *nw* :heading-offset 1))
|
||||
:external-link-base "")
|
||||
|
||||
(length (grammar-states *ng*))
|
||||
|
||||
@@ -48,13 +48,13 @@
|
||||
"Test/StandardFunctionSemantics.rtf"
|
||||
"Standard Function Semantics"
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *sfw*)))
|
||||
(depict-world-commands rtf-stream *sfw* :heading-offset 1)))
|
||||
(depict-html-to-local-file
|
||||
"Test/StandardFunctionSemantics.html"
|
||||
"Standard Function Semantics"
|
||||
t
|
||||
#'(lambda (html-stream)
|
||||
(depict-world-commands html-stream *sfw*))
|
||||
(depict-world-commands html-stream *sfw* :heading-offset 1))
|
||||
:external-link-base ""))
|
||||
|#
|
||||
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
"Test/ThrowCatchSemantics.rtf"
|
||||
"Throw-Catch Semantics"
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *tcw*)))
|
||||
(depict-world-commands rtf-stream *tcw* :heading-offset 1)))
|
||||
|
||||
(depict-html-to-local-file
|
||||
"Test/ThrowCatchSemantics.html"
|
||||
"Throw-Catch Semantics"
|
||||
t
|
||||
#'(lambda (html-stream)
|
||||
(depict-world-commands html-stream *tcw*))
|
||||
(depict-world-commands html-stream *tcw* :heading-offset 1))
|
||||
:external-link-base "")
|
||||
|
||||
|
||||
|
||||
@@ -47,14 +47,14 @@
|
||||
"Test/WritableActionSemantics.rtf"
|
||||
"Writable Action Semantics"
|
||||
#'(lambda (rtf-stream)
|
||||
(depict-world-commands rtf-stream *waw*)))
|
||||
(depict-world-commands rtf-stream *waw* :heading-offset 1)))
|
||||
|
||||
(depict-html-to-local-file
|
||||
"Test/WritableActionSemantics.html"
|
||||
"Writable Action Semantics"
|
||||
t
|
||||
#'(lambda (html-stream)
|
||||
(depict-world-commands html-stream *waw*))
|
||||
(depict-world-commands html-stream *waw* :heading-offset 1))
|
||||
:external-link-base "")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user