diff --git a/mozilla/js/semantics/Calculus.lisp b/mozilla/js/semantics/Calculus.lisp new file mode 100644 index 00000000000..12a912d7399 --- /dev/null +++ b/mozilla/js/semantics/Calculus.lisp @@ -0,0 +1,2747 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; ECMAScript semantic calculus +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + +(defvar *trace-variables* nil) + + +#+mcl (dolist (indent-spec '((production . 3) (letexc . 1) (deftype . 1))) + (pushnew indent-spec ccl:*fred-special-indent-alist* :test #'equal)) + + +; A strict version of and. +(defun and2 (a b) + (and a b)) + +; A strict version of or. +(defun or2 (a b) + (or a b)) + +; A strict version of xor. +(defun xor2 (a b) + (or (and a (not b)) (and (not a) b))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; DOUBLE-PRECISION FLOATING-POINT NUMBERS + +(deftype double () + '(or float (member :+inf :-inf :nan))) + +(defun double? (n) + (or (floatp n) + (member n '(:+inf :-inf :nan)))) + +; Evaluate expr. If it evaluates successfully, return its values. +; If not, evaluate sign; if it returns a positive value, return :+inf; +; otherwise return :-inf. sign should not return zero. +(defmacro handle-overflow (expr &body sign) + `(handler-case ,expr + (floating-point-overflow () (if (minusp (progn ,@sign)) :-inf :+inf)))) + + +(defun rational-to-double (r) + (handle-overflow (coerce r 'double-float) r)) + + +; Return true if n is +0 or -0 and false otherwise. +(declaim (inline double-is-zero)) +(defun double-is-zero (n) + (and (floatp n) (zerop n))) + + +; Return true if n is NaN and false otherwise. +(declaim (inline double-is-nan)) +(defun double-is-nan (n) + (eq n :nan)) + + +; Return true if n is :+inf or :-inf and false otherwise. +(declaim (inline double-is-infinite)) +(defun double-is-infinite (n) + (or (eq n :+inf) (eq n :-inf))) + + +; Return: +; less if nm; +; unordered if either n or m is :nan. +(defun double-compare (n m less equal greater unordered) + (cond + ((or (double-is-nan n) (double-is-nan m)) unordered) + ((eql n m) equal) + ((or (eq n :+inf) (eq m :-inf)) greater) + ((or (eq m :+inf) (eq n :-inf)) less) + ((< n m) less) + ((> n m) greater) + (t equal))) + + +; Return +; 1 if n is +0.0, :+inf, or any positive floating-point number; +; -1 if n is -0.0, :-inf, or any positive floating-point number; +; 0 if n is :nan. +(defun double-sign (n) + (case n + (:+inf 1) + (:-inf -1) + (:nan 0) + (t (round (float-sign n))))) + + +; Return +; 0 if either n or m is :nan; +; 1 if n and m have the same double-sign; +; -1 if n and m have different double-signs. +(defun double-sign-xor (n m) + (* (double-sign n) (double-sign m))) + + +; Return the absolute value of n. +(defun double-abs (n) + (case n + ((:+inf :-inf) :+inf) + (:nan :nan) + (t (abs n)))) + + +; Return -n. +(defun double-neg (n) + (case n + (:+inf :-inf) + (:-inf :+inf) + (:nan :nan) + (t (- n)))) + + +; Return n+m. +(defun double-add (n m) + (case n + (:+inf (case m + (:-inf :nan) + (:nan :nan) + (t :+inf))) + (:-inf (case m + (:+inf :nan) + (:nan :nan) + (t :-inf))) + (:nan :nan) + (t (case m + (:+inf :+inf) + (:-inf :-inf) + (:nan :nan) + (t (handle-overflow (+ n m) + (let ((n-sign (float-sign n)) + (m-sign (float-sign m))) + (assert-true (= n-sign m-sign)) ;If the signs are opposite, we can't overflow. + n-sign))))))) + + +; Return n-m. +(defun double-subtract (n m) + (double-add n (double-neg m))) + + +; Return n*m. +(defun double-multiply (n m) + (let ((sign (double-sign-xor n m)) + (n (double-abs n)) + (m (double-abs m))) + (let ((result (cond + ((zerop sign) :nan) + ((eq n :+inf) (if (double-is-zero m) :nan :+inf)) + ((eq m :+inf) (if (double-is-zero n) :nan :+inf)) + (t (handle-overflow (* n m) 1))))) + (if (minusp sign) + (double-neg result) + result)))) + + +; Return n/m. +(defun double-divide (n m) + (let ((sign (double-sign-xor n m)) + (n (double-abs n)) + (m (double-abs m))) + (let ((result (cond + ((zerop sign) :nan) + ((eq n :+inf) (if (eq m :+inf) :nan :+inf)) + ((eq m :+inf) 0d0) + ((zerop m) (if (zerop n) :nan :+inf)) + (t (handle-overflow (/ n m) 1))))) + (if (minusp sign) + (double-neg result) + result)))) + + +; Return n%m, using the ECMAScript definition of %. +(defun double-remainder (n m) + (cond + ((or (double-is-nan n) (double-is-nan m) (double-is-infinite n) (double-is-zero m)) :nan) + ((or (double-is-infinite m) (double-is-zero n)) n) + (t (float (rem (rational n) (rational m)))))) + + +; Return d truncated towards zero into a 32-bit integer. Overflows wrap around. +(defun double-to-uint32 (d) + (case d + ((:+inf :-inf :nan) 0) + (t (mod (truncate d) #x100000000)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; CODE GENERATION + +; Return `(progn ,@statements), optimizing where possible. +(defun gen-progn (&rest statements) + (if (and (= (length statements) 1) + (let ((first-statement (first statements))) + (not (and (consp first-statement) + (eq (first first-statement) 'declare))))) + (first statements) + (cons 'progn statements))) + + +; Return `(funcall ,function-value ,@arg-values), optimizing where possible. +(defun gen-apply (function-value &rest arg-values) + (if (and (consp function-value) + (eq (first function-value) 'function) + (consp (rest function-value)) + (second function-value) + (null (cddr function-value))) + (let ((stripped-function-value (second function-value))) + (if (and (consp stripped-function-value) + (eq (first stripped-function-value) 'lambda) + (listp (second stripped-function-value)) + (cddr stripped-function-value) + (every #'(lambda (arg) + (and (identifier? arg) + (not (eql (first-symbol-char arg) #\&)))) + (second stripped-function-value))) + (let ((lambda-args (second stripped-function-value)) + (lambda-body (cddr stripped-function-value))) + (assert-true (= (length lambda-args) (length arg-values))) + (if lambda-args + (list* 'let + (mapcar #'list lambda-args arg-values) + lambda-body) + (apply #'gen-progn lambda-body))) + (cons stripped-function-value arg-values))) + (list* 'funcall function-value arg-values))) + + +; Return `#'(lambda ,args (declare (ignore-if-unused ,@args)) ,body-code), optimizing +; where possible. +(defun gen-lambda (args body-code) + (if args + `#'(lambda ,args (declare (ignore-if-unused . ,args)) ,body-code) + `#'(lambda () ,body-code))) + + +; If expr is a lambda-expression, return an equivalent expression that has +; the given name (which may be a symbol or a string; if it's a string, it is interned +; in the given package). Otherwise, return expr unchanged. +; Attaching a name to lambda-expressions helps in debugging code by identifying +; functions in debugger backtraces. +(defun name-lambda (expr name &optional package) + (if (and (consp expr) + (eq (first expr) 'function) + (consp (rest expr)) + (consp (second expr)) + (eq (first (second expr)) 'lambda) + (null (cddr expr))) + (let ((name (if (symbolp name) + name + (intern name package)))) + ;Avoid trouble when name is a lisp special form like if or lambda. + (when (special-form-p name) + (setq name (gensym name))) + `(flet ((,name ,@(rest (second expr)))) + #',name)) + expr)) + + +; Intern n symbols in the current package with names 0, 1, ..., +; n-1, where is the value of the prefix string. +; Return a list of these n symbols concatenated to the front of rest. +(defun intern-n-vars-with-prefix (prefix n rest) + (if (zerop n) + rest + (intern-n-vars-with-prefix prefix (1- n) (cons (intern (format nil "~A~D" prefix n)) rest)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR-INFO + +(defstruct (grammar-info (:constructor make-grammar-info (name grammar &optional lexer)) + (:copier nil) + (:predicate grammar-info?)) + (name nil :type symbol :read-only t) ;The name of this grammar + (grammar nil :type grammar :read-only t) ;This grammar + (lexer nil :type (or null lexer) :read-only t)) ;This grammar's lexer if this is a lexer grammar; nil if not + + +; Return the charclass that defines the given lexer nonterminal or nil if none. +(defun grammar-info-charclass (grammar-info nonterminal) + (let ((lexer (grammar-info-lexer grammar-info))) + (and lexer (lexer-charclass lexer nonterminal)))) + + +; Return the charclass or partition that defines the given lexer nonterminal or nil if none. +(defun grammar-info-charclass-or-partition (grammar-info nonterminal) + (let ((lexer (grammar-info-lexer grammar-info))) + (and lexer (or (lexer-charclass lexer nonterminal) + (gethash nonterminal (lexer-partitions lexer)))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; WORLDS + +(defstruct (world (:constructor allocate-world) + (:copier nil) + (:predicate world?)) + (package nil :type package) ;The package in which this world's identifiers are interned + (n-type-names 0 :type integer) ;Number of type names defined so far + (types-reverse nil :type (or null hash-table)) ;Hash table of (kind tags parameters) -> type; nil if invalid + (oneof-tags nil :type (or null hash-table)) ;Hash table of (oneof-tag . field-type) -> (must-be-unique oneof-type ... oneof-type); nil if invalid + (void-type nil :type (or null type)) ;Type used for placeholders + (boolean-type nil :type (or null type)) ;Type used for booleans + (integer-type nil :type (or null type)) ;Type used for integers + (rational-type nil :type (or null type)) ;Type used for rational numbers + (double-type nil :type (or null type)) ;Type used for double-precision floating-point numbers + (character-type nil :type (or null type)) ;Type used for characters + (string-type nil :type (or null type)) ;Type used for strings (vectors of characters) + (grammar-infos nil :type list) ;List of grammar-info + (commands-source nil :type list)) ;List of source code of all commands applied to this world + + +; Return the name of the world. +(defun world-name (world) + (package-name (world-package world))) + + +; Return a symbol in the given package whose value is that package's world structure. +(defun world-access-symbol (package) + (find-symbol "*WORLD*" package)) + + +; Return the world that created the given package. +(declaim (inline package-world)) +(defun package-world (package) + (symbol-value (world-access-symbol package))) + + +; Return the world that contains the given symbol. +(defun symbol-world (symbol) + (package-world (symbol-package symbol))) + + +; Delete the world and its package. +(defun delete-world (world) + (let ((package (world-package world))) + (when package + (delete-package package))) + (setf (world-package world) nil)) + + +; Create a world using a package with the given name. +; If the package is already used for another world, its contents +; are erased and the other world deleted. +(defun make-world (name) + (assert-type name string) + (let ((p (find-package name))) + (when p + (let* ((access-symbol (world-access-symbol p)) + (p-world (and (boundp access-symbol) (symbol-value access-symbol)))) + (unless p-world + (error "Package ~A already in use" name)) + (assert-true (eq (world-package p-world) p)) + (delete-world p-world)))) + (let* ((p (make-package name :use nil)) + (world (allocate-world + :package p + :types-reverse (make-hash-table :test #'equal) + :oneof-tags (make-hash-table :test #'equal))) + (access-symbol (intern "*WORLD*" p))) + (set access-symbol world) + (export access-symbol p) + world)) + + +; Intern s (which should be a symbol or a string) in this world's +; package and return the resulting symbol. +(defun world-intern (world s) + (intern (string s) (world-package world))) + + +; Export symbol in its package, which must belong to some world. +(defun export-symbol (symbol) + (assert-true (symbol-in-any-world symbol)) + (export symbol (symbol-package symbol))) + + +; Call f on each external symbol defined in the world's package. +(declaim (inline each-world-external-symbol)) +(defun each-world-external-symbol (world f) + (each-package-external-symbol (world-package world) f)) + + +; Call f on each external symbol defined in the world's package that has +; a property with the given name. +; f takes two arguments: +; the symbol +; the value of the property +(defun each-world-external-symbol-with-property (world property f) + (each-world-external-symbol + world + #'(lambda (symbol) + (let ((value (get symbol property *get2-nonce*))) + (unless (eq value *get2-nonce*) + (funcall f symbol value)))))) + + +; Return a list of all external symbols defined in the world's package that have +; a property with the given name. +; The list is sorted by symbol names. +(defun all-world-external-symbols-with-property (world property) + (let ((list nil)) + (each-world-external-symbol + world + #'(lambda (symbol) + (let ((value (get symbol property *get2-nonce*))) + (unless (eq value *get2-nonce*) + (push symbol list))))) + (sort list #'string<))) + + +; Return true if s is a symbol that is defined in this world's package. +(declaim (inline symbol-in-world)) +(defun symbol-in-world (world s) + (and (symbolp s) (eq (symbol-package s) (world-package world)))) + + +; Return true if s is a symbol that is defined in any world's package. +(defun symbol-in-any-world (s) + (and (symbolp s) + (let* ((package (symbol-package s)) + (access-symbol (world-access-symbol package))) + (and (boundp access-symbol) (typep (symbol-value access-symbol) 'world))))) + + +; Return a list of grammars in the world +(defun world-grammars (world) + (mapcar #'grammar-info-grammar (world-grammar-infos world))) + + +; Return the grammar-info with the given name in the world +(defun world-grammar-info (world name) + (find name (world-grammar-infos world) :key #'grammar-info-name)) + + +; Return the grammar with the given name in the world +(defun world-grammar (world name) + (let ((grammar-info (world-grammar-info world name))) + (and grammar-info (grammar-info-grammar grammar-info)))) + + +; Return the lexer with the given name in the world +(defun world-lexer (world name) + (let ((grammar-info (world-grammar-info world name))) + (and grammar-info (grammar-info-lexer grammar-info)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; SYMBOLS + +;;; The following properties are attached to exported symbols in the world: +;;; +;;; :preprocess preprocessor function ((preprocessor-state id . form-arg-list) -> form-list re-preprocess) if this identifier +;;; is a preprocessor command like 'grammar, 'lexer, or 'production +;;; +;;; :command expression code generation function ((world grammar-info-var . form-arg-list) -> void) if this identifier +;;; is a command like 'deftype or 'define +;;; :special-form expression code generation function ((world type-env id . form-arg-list) -> code, type, annotated-expr) +;;; if this identifier is a special form like 'if or 'lambda +;;; +;;; :primitive primitive structure if this identifier is a primitive +;;; +;;; :macro lisp expansion function ((world type-env . form-arg-list) -> expansion) if this identifier is a macro +;;; +;;; :type-constructor expression code generation function ((world allow-forward-references . form-arg-list) -> type) if this +;;; identifier is a type constructor like '->, 'vector, 'tuple, 'oneof, or 'address +;;; :deftype type if this identifier is a type; nil if this identifier is a forward-referenced type +;;; +;;; value of this identifier if it is a variable +;;; :value-code lisp code that was evaluated to produce +;;; :value-expr unparsed expression defining the value of this identifier if it is a variable +;;; :type type of this identifier if it is a variable +;;; :type-expr unparsed expression defining the type of this identifier if it is a variable +;;; +;;; :action list of (grammar-info . grammar-symbol) that declare this action if this identifier is an action name +;;; +;;; :depict-command depictor function ((markup-stream world depict-env . form-arg-list) -> void) +;;; :depict-type-constructor depictor function ((markup-stream world level . form-arg-list) -> void) +;;; :depict-special-form depictor function ((markup-stream world level . form-annotated-arg-list) -> void) +;;; :depict-macro depictor function ((markup-stream world level . form-annotated-arg-list) -> void) +;;; + + +; Return the code of the value associated with the given symbol or default if none. +; This macro is appropriate for use with setf. +(defmacro symbol-code (symbol &optional default) + `(get ,symbol :code ,@(and default (list default)))) + + +; Return the preprocessor action associated with the given symbol or nil if none. +; This macro is appropriate for use with setf. +(defmacro symbol-preprocessor-function (symbol) + `(get ,symbol :preprocess)) + + +; Return the macro definition associated with the given symbol or nil if none. +; This macro is appropriate for use with setf. +(defmacro symbol-macro (symbol) + `(get ,symbol :macro)) + + +; Return the primitive definition associated with the given symbol or nil if none. +; This macro is appropriate for use with setf. +(defmacro symbol-primitive (symbol) + `(get ,symbol :primitive)) + + +; Return the type definition associated with the given symbol. +; Return nil if the symbol is a forward-referenced type. +; If the symbol has no type definition at all, return default +; (or nil if not specified). +; This macro is appropriate for use with setf. +(defmacro symbol-type-definition (symbol &optional default) + `(get ,symbol :deftype ,@(and default (list default)))) + + +; Call f on each type definition, including forward-referenced types, in the world. +; f takes two arguments: +; the symbol +; the type (nil if forward-referenced) +(defun each-type-definition (world f) + (each-world-external-symbol-with-property world :deftype f)) + + +; Return a sorted list of the names of all type definitions, including +; forward-referenced types, in the world. +(defun world-type-definitions (world) + (all-world-external-symbols-with-property world :deftype)) + + +; Return the type of the variable associated with the given symbol or nil if none. +; This macro is appropriate for use with setf. +(defmacro symbol-type (symbol) + `(get ,symbol :type)) + + +; Return true if there is a variable associated with the given symbol. +(declaim (inline symbol-has-variable)) +(defun symbol-has-variable (symbol) + (not (eq (get symbol *get2-nonce*) *get2-nonce*))) + + +; Return a list of (grammar-info . grammar-symbol) pairs that each indicate +; a grammar and a grammar-symbol in that grammar that has an action named by the given symbol. +; This macro is appropriate for use with setf. +(defmacro symbol-action (symbol) + `(get ,symbol :action)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; TYPES + +(deftype typekind () + '(member ;tags ;parameters + :void ;nil ;nil + :boolean ;nil ;nil + :integer ;nil ;nil + :rational ;nil ;nil + :double ;nil ;nil + :character ;nil ;nil + :-> ;nil ;(result-type arg1-type arg2-type ... argn-type) + :vector ;nil ;(element-type) + :tuple ;(tag1 ... tagn) ;(element1-type ... elementn-type) + :oneof ;(tag1 ... tagn) ;(element1-type ... elementn-type) + :address)) ;nil ;(element-type) + + +(defstruct (type (:constructor allocate-type (kind tags parameters)) + (:predicate type?)) + (name nil :type symbol) ;This type's name; nil if this type is anonymous + (name-serial-number nil :type (or null integer)) ;This type's name's serial number; nil if this type is anonymous + (kind nil :type typekind :read-only t) ;This type's kind + (tags nil :type list :read-only t) ;List of tuple or oneof tags + (parameters nil :type list :read-only t)) ;List of parameter types (either types or symbols if forward-referenced) describing a compound type + + +(declaim (inline make-->-type)) +(defun make-->-type (world argument-types result-type) + (make-type world :-> nil (cons result-type argument-types))) + +(declaim (inline ->-argument-types)) +(defun ->-argument-types (type) + (assert-true (eq (type-kind type) :->)) + (cdr (type-parameters type))) + +(declaim (inline ->-result-type)) +(defun ->-result-type (type) + (assert-true (eq (type-kind type) :->)) + (car (type-parameters type))) + + +(declaim (inline make-vector-type)) +(defun make-vector-type (world element-type) + (make-type world :vector nil (list element-type))) + +(declaim (inline vector-element-type)) +(defun vector-element-type (type) + (assert-true (eq (type-kind type) :vector)) + (car (type-parameters type))) + + +; Return the type of the oneof's or tuple's field corresponding to the given tag +; or nil if the tag is not present in the oneof's or tuple's tags. +(defun field-type (type tag) + (assert-true (member (type-kind type) '(:oneof :tuple))) + (let ((pos (position tag (type-tags type)))) + (and pos (nth pos (type-parameters type))))) + + +(declaim (inline make-address-type)) +(defun make-address-type (world element-type) + (make-type world :address nil (list element-type))) + +(declaim (inline address-element-type)) +(defun address-element-type (type) + (assert-true (eq (type-kind type) :address)) + (car (type-parameters type))) + + +; Return true if serial-number-1 is less than serial-number-2. +; Each serial-number is either an integer or nil, which is considered to +; be positive infinity. +(defun serial-number-< (serial-number-1 serial-number-2) + (and serial-number-1 + (or (null serial-number-2) + (< serial-number-1 serial-number-2)))) + + +; Print the type nicely on the given stream. If expand1 is true then print +; the type's top level even if it has a name. In all other cases expand +; anonymous types but abbreviate named types by their names. +(defun print-type (type &optional (stream t) expand1) + (if (and (type-name type) (not expand1)) + (write-string (symbol-name (type-name type)) stream) + (labels + ((print-tuple-or-oneof (kind-string) + (pprint-logical-block (stream (mapcar #'cons (type-tags type) (type-parameters type)) + :prefix "(" :suffix ")") + (write-string kind-string stream) + (pprint-exit-if-list-exhausted) + (format stream " ~@_") + (pprint-indent :current 0 stream) + (loop + (let ((tag-and-type (pprint-pop))) + (pprint-logical-block (stream nil :prefix "(" :suffix ")") + (write (car tag-and-type) :stream stream) + (format stream " ~@_") + (print-type (cdr tag-and-type) stream)) + (pprint-exit-if-list-exhausted) + (format stream " ~:_"))) + (format stream " ~_") + (print-type (->-result-type type) stream)))) + + (case (type-kind type) + (:void (write-string "void" stream)) + (:boolean (write-string "boolean" stream)) + (:integer (write-string "integer" stream)) + (:rational (write-string "rational" stream)) + (:double (write-string "double" stream)) + (:character (write-string "character" stream)) + (:-> (pprint-logical-block (stream nil :prefix "(" :suffix ")") + (format stream "-> ~@_") + (pprint-indent :current 0 stream) + (pprint-logical-block (stream (->-argument-types type) :prefix "(" :suffix ")") + (pprint-exit-if-list-exhausted) + (loop + (print-type (pprint-pop) stream) + (pprint-exit-if-list-exhausted) + (format stream " ~:_"))) + (format stream " ~_") + (print-type (->-result-type type) stream))) + (:vector (pprint-logical-block (stream nil :prefix "(" :suffix ")") + (format stream "vector ~@_") + (print-type (vector-element-type type) stream))) + (:tuple (print-tuple-or-oneof "tuple")) + (:oneof (print-tuple-or-oneof "oneof")) + (:address (pprint-logical-block (stream nil :prefix "(" :suffix ")") + (format stream "address ~@_") + (print-type (address-element-type type) stream))) + (t (error "Bad typekind ~S" (type-kind type))))))) + + +; Same as print-type except that accumulates the output in a string +; and returns that string. +(defun print-type-to-string (type &optional expand1) + (with-output-to-string (stream) + (print-type type stream expand1))) + + +(defmethod print-object ((type type) stream) + (print-unreadable-object (type stream) + (format stream "type ~@_") + (let ((name (type-name type))) + (when name + (format stream "~A = ~@_" name))) + (print-type type stream t))) + + +; Register all of the oneof type's tags in the world's oneof-tags hash table. +; The hash table is indexed by pairs (tag . field-type) and is used to look up a +; oneof type given just a tag and its field's type. The data in the hash table +; consists of lists (flag oneof-type ... oneof-type). The flag is true if such a +; lookup has been performed (in which case the data must contain exactly one oneof-type +; and it is an error to add another one). +(defun register-oneof-tags (world oneof-type) + (let ((oneof-tags-hash (world-oneof-tags world))) + (mapc #'(lambda (tag field-type) + (let* ((key (cons tag field-type)) + (data (gethash key oneof-tags-hash))) + (cond + ((null data) + (setf (gethash key oneof-tags-hash) (list nil oneof-type))) + ((not (car data)) + (push oneof-type (cdr data))) + (t (error "Ambiguous oneof lookup of tag ~A: ~A. Possibilities are ~A or ~A" + tag + (print-type-to-string field-type) + (print-type-to-string (second data)) + (print-type-to-string oneof-type)))))) + (type-tags oneof-type) + (type-parameters oneof-type)))) + + +; Look up a oneof type given one of its tag and the corresponding field type. +; Signal an error if there is no such type or there is more than one matching type. +(defun lookup-oneof-tag (world tag field-type) + (let ((data (gethash (cons tag field-type) (world-oneof-tags world)))) + (cond + ((null data) + (error "No known oneof type with tag ~A: ~A" tag (print-type-to-string field-type))) + ((cddr data) + (error "Ambiguous oneof lookup of tag ~A: ~A. Possibilities are ~S" tag (print-type-to-string field-type) (cdr data))) + (t + (setf (first data) t) + (second data))))) + + +; Create or reuse a type with the given kind, tags, and parameters. +; A type is reused if one already exists with equal kind, tags, and parameters. +; Return the type. +(defun make-type (world kind tags parameters) + (let ((reverse-key (list kind tags parameters))) + (or (gethash reverse-key (world-types-reverse world)) + (let ((type (allocate-type kind tags parameters))) + (when (eq kind :oneof) + (register-oneof-tags world type)) + (setf (gethash reverse-key (world-types-reverse world)) type))))) + + +; Provide a new symbol for the type. A type can have zero or more names. +; Signal an error if the name is already used. +(defun add-type-name (world type symbol) + (assert-true (symbol-in-world world symbol)) + (when (symbol-type-definition symbol) + (error "Attempt to redefine type ~A" symbol)) + ;If the old type was anonymous, give it this name. + (unless (type-name type) + (setf (type-name type) symbol) + (setf (type-name-serial-number type) (world-n-type-names world))) + (incf (world-n-type-names world)) + (setf (symbol-type-definition symbol) type) + (export-symbol symbol)) + + +; Return an existing type with the given symbol, which must be interned in a world's package. +; Signal an error if there isn't an existing type. If allow-forward-references is true and +; symbol is an undefined type identifier, allow it, create a forward-referenced type, and return symbol. +(defun get-type (symbol &optional allow-forward-references) + (or (symbol-type-definition symbol) + (if allow-forward-references + (progn + (setf (symbol-type-definition symbol) nil) + symbol) + (error "Undefined type ~A" symbol)))) + + +; Scan a type-expr to produce a type. Return that type. +; If allow-forward-references is true and type-expr is an undefined type identifier, +; allow it, create a forward-referenced type in the world, and return type-expr unchanged. +; If allow-forward-references is true, also allow undefined type +; identifiers deeper within type-expr (anywhere except at its top level). +; If type-expr is already a type, return it unchanged. +(defun scan-type (world type-expr &optional allow-forward-references) + (cond + ((identifier? type-expr) + (get-type (world-intern world type-expr) allow-forward-references)) + ((type? type-expr) + type-expr) + (t (let ((type-constructor (and (consp type-expr) + (symbolp (first type-expr)) + (get (world-intern world (first type-expr)) :type-constructor)))) + (if type-constructor + (apply type-constructor world allow-forward-references (rest type-expr)) + (error "Bad type ~S" type-expr)))))) + + +; Same as scan-type except that ensure that the type has the expected kind. +; Return the type. +(defun scan-kinded-type (world type-expr expected-type-kind) + (let ((type (scan-type world type-expr))) + (unless (eq (type-kind type) expected-type-kind) + (error "Expected ~(~A~) but got ~A" expected-type-kind (print-type-to-string type))) + type)) + + +; (-> ( ... ) ) +(defun scan--> (world allow-forward-references arg-type-exprs result-type-expr) + (unless (listp arg-type-exprs) + (error "Bad -> argument type list ~S" arg-type-exprs)) + (make-->-type world + (mapcar #'(lambda (te) (scan-type world te allow-forward-references)) arg-type-exprs) + (scan-type world result-type-expr allow-forward-references))) + + +; (vector ) +(defun scan-vector (world allow-forward-references element-type) + (make-vector-type world (scan-type world element-type allow-forward-references))) + + +; (address ) +(defun scan-address (world allow-forward-references element-type) + (make-address-type world (scan-type world element-type allow-forward-references))) + + +(defun scan-tuple-or-oneof (world allow-forward-references kind tag-pairs tags-so-far types-so-far) + (if tag-pairs + (let ((tag-pair (car tag-pairs))) + (when (and (identifier? tag-pair) (eq kind :oneof)) + (setq tag-pair (list tag-pair 'void))) + (unless (and (consp tag-pair) (identifier? (first tag-pair)) + (second tag-pair) (null (cddr tag-pair))) + (error "Bad oneof or tuple pair ~S" tag-pair)) + (let ((tag (first tag-pair))) + (when (member tag tags-so-far) + (error "Duplicate oneof or tuple tag ~S" tag)) + (scan-tuple-or-oneof + world + allow-forward-references + kind + (cdr tag-pairs) + (cons tag tags-so-far) + (cons (scan-type world (second tag-pair) allow-forward-references) types-so-far)))) + (make-type world kind (nreverse tags-so-far) (nreverse types-so-far)))) + +; (oneof ( ) ... ( )) +(defun scan-oneof (world allow-forward-references &rest tags-and-types) + (scan-tuple-or-oneof world allow-forward-references :oneof tags-and-types nil nil)) + +; (tuple ( ) ... ( )) +(defun scan-tuple (world allow-forward-references &rest tags-and-types) + (scan-tuple-or-oneof world allow-forward-references :tuple tags-and-types nil nil)) + + +; Scan tag to produce a tag that is present in the given tuple or oneof type. +; Return the tag and its field type. +(defun scan-tag (type tag) + (let ((field-type (field-type type tag))) + (unless field-type + (error "Tag ~S not present in ~A" tag (print-type-to-string type))) + (values tag field-type))) + + +; Resolve all forward type references to refer to their target types. +; Signal an error if any unresolved type references remain. +; Only types reachable from some type name are affected. It is the caller's +; responsibility to make sure that these are the only types that exist. +; Return a list of all type structures encountered. +(defun resolve-forward-types (world) + (setf (world-types-reverse world) nil) + (setf (world-oneof-tags world) nil) + (let ((visited-types (make-hash-table :test #'eq))) + (labels + ((resolve-in-type (type) + (unless (gethash type visited-types) + (setf (gethash type visited-types) t) + (do ((parameter-types (type-parameters type) (cdr parameter-types))) + ((endp parameter-types)) + (let ((parameter-type (car parameter-types))) + (unless (typep parameter-type 'type) + (setq parameter-type (get-type parameter-type)) + (setf (car parameter-types) parameter-type)) + (resolve-in-type parameter-type)))))) + (each-type-definition + world + #'(lambda (symbol type) + (unless type + (error "Undefined type ~A" symbol)) + (resolve-in-type type)))) + (hash-table-keys visited-types))) + + +; Recompute the types-reverse and oneof-tags hash tables from the types in the types +; hash table and their constituents. +(defun recompute-type-caches (world) + (let ((types-reverse (make-hash-table :test #'equal))) + (setf (world-oneof-tags world) (make-hash-table :test #'equal)) + (labels + ((visit-type (type) + (let ((reverse-key (list (type-kind type) (type-tags type) (type-parameters type)))) + (assert-true (eq (gethash reverse-key types-reverse type) type)) + (unless (gethash reverse-key types-reverse) + (setf (gethash reverse-key types-reverse) type) + (when (eq (type-kind type) :oneof) + (register-oneof-tags world type)) + (mapc #'visit-type (type-parameters type)))))) + (each-type-definition + world + #'(lambda (symbol type) + (declare (ignore symbol)) + (visit-type type)))) + (setf (world-types-reverse world) types-reverse))) + + + +; Make all equivalent types be eq. Only types reachable from some type name +; are affected, and names may be redirected to different type structures than +; the ones to which they currently point. It is the caller's responsibility +; to make sure that there are no current outstanding references to types other +; than via type names. +; +; This function calls resolve-forward-types before making equivalent types be eq +; and recompute-type-caches just before returning. +; +; This function works by initially assuming that all types with the same kind +; and tags are the same type and then iterately determining which ones must be +; different because they contain different parameter types. +(defun unite-types (world) + (let* ((types (resolve-forward-types world)) + (n-types (length types))) + (labels + ((gen-cliques-1 (get-key) + (let ((types-to-cliques (make-hash-table :test #'eq :size n-types)) + (keys-to-cliques (make-hash-table :test #'equal)) + (n-cliques 0)) + (dolist (type types) + (let* ((key (funcall get-key type)) + (clique (gethash key keys-to-cliques))) + (unless clique + (setq clique n-cliques) + (incf n-cliques) + (setf (gethash key keys-to-cliques) clique)) + (setf (gethash type types-to-cliques) clique))) + (values n-cliques types-to-cliques))) + + (gen-cliques (n-old-cliques types-to-old-cliques) + (labels + ((get-old-clique (type) + (assert-non-null (gethash type types-to-old-cliques))) + (get-type-key (type) + (cons (get-old-clique type) + (mapcar #'get-old-clique (type-parameters type))))) + (multiple-value-bind (n-new-cliques types-to-new-cliques) (gen-cliques-1 #'get-type-key) + (assert-true (>= n-new-cliques n-old-cliques)) + (if (/= n-new-cliques n-old-cliques) + (gen-cliques n-new-cliques types-to-new-cliques) + (translate-types n-new-cliques types-to-new-cliques))))) + + (translate-types (n-cliques types-to-cliques) + (let ((clique-representatives (make-array n-cliques :initial-element nil))) + (maphash #'(lambda (type clique) + (let ((representative (svref clique-representatives clique))) + (when (or (null representative) + (serial-number-< (type-name-serial-number type) (type-name-serial-number representative))) + (setf (svref clique-representatives clique) type)))) + types-to-cliques) + (assert-true (every #'identity clique-representatives)) + (labels + ((map-type (type) + (svref clique-representatives (gethash type types-to-cliques)))) + (dolist (type types) + (do ((parameter-types (type-parameters type) (cdr parameter-types))) + ((endp parameter-types)) + (setf (car parameter-types) (map-type (car parameter-types))))) + (each-type-definition + world + #'(lambda (symbol type) + (setf (symbol-type-definition symbol) (map-type type)))))))) + + (multiple-value-call + #'gen-cliques + (gen-cliques-1 #'(lambda (type) (cons (type-kind type) (type-tags type))))) + (recompute-type-caches world)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; SPECIALS + + +(defun checked-callable (f) + (let ((fun (callable f))) + (unless fun + (warn "Undefined function ~S" f)) + fun)) + + +; Add a macro, command, or special form definition. symbol is a symbol that names the +; preprocessor directive, macro, command, or special form. When a semantic form +; (id arg1 arg2 ... argn) +; is encountered and id is a symbol with the same name as symbol, the form is +; replaced by the result of calling one of: +; (expander preprocessor-state id arg1 arg2 ... argn) if property is :preprocess +; (expander world type-env arg1 arg2 ... argn) if property is :macro +; (expander world grammar-info-var arg1 arg2 ... argn) if property is :command +; (expander world type-env id arg1 arg2 ... argn) if property is :special-form +; (expander world allow-forward-references arg1 arg2 ... argn) if property is :type-constructor +; expander must be a function or a function symbol. +; +; depictor is used instead of expander when emitting markup for the macro, command, or special form. +; depictor is called via: +; (depictor markup-stream world level arg1 arg2 ... argn) if property is :macro +; (depictor markup-stream world depict-env arg1 arg2 ... argn) if property is :command +; (depictor markup-stream world level arg1 arg2 ... argn) if property is :special-form +; (depictor markup-stream world level arg1 arg2 ... argn) if property is :type-constructor +; +(defun add-special (property symbol expander &optional depictor) + (let ((emit-property (cdr (assoc property '((:macro . :depict-macro) + (:command . :depict-command) + (:special-form . :depict-special-form) + (:type-constructor . :depict-type-constructor)))))) + (assert-true (or emit-property (not depictor))) + (assert-type symbol identifier) + (when *value-asserts* + (checked-callable expander) + (when depictor (checked-callable depictor))) + (when (or (get symbol property) (and emit-property (get symbol emit-property))) + (error "Attempt to redefine ~A ~A" property symbol)) + (setf (get symbol property) expander) + (when emit-property + (if depictor + (setf (get symbol emit-property) depictor) + (remprop symbol emit-property))) + (export-symbol symbol))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; PRIMITIVES + +(defstruct (primitive (:constructor make-primitive (type-expr value-code appearance &key markup1 markup2 level level1 level2)) + (:predicate primitive?)) + (type nil :type (or null type)) ;Type of this primitive; nil if not computed yet + (type-expr nil :read-only t) ;Source type expression that designates the type of this primitive + (value-code nil :read-only t) ;Lisp expression that computes the value of this primitive + (appearance nil :read-only t) ;One of the possible primitive appearances (see below) + (markup1 nil :read-only t) ;Markup (item or list) for this primitive + (markup2 nil :read-only t) ;:unary primitives: markup (item or list) for this primitive's closer + ; ;:infix primitives: true if spaces should be put around primitive + (level nil :read-only t) ;Precedence level of markup for this primitive + (level1 nil :read-only t) ;Precedence level required for first argument of this primitive + (level2 nil :read-only t)) ;Precedence level required for second argument of this primitive + +;appearance is one of the following: +; :global The primitive appears as a regular, global function or constant; its markup is in markup1 +; :infix The primitive is an infix binary primitive; its markup is in markup1; if markup2 is true, put spaces around markup1 +; :unary The primitive is a prefix and/or suffix unary primitive; the prefix is in markup1 and suffix in markup2 +; :phantom The primitive disappears when emitting markup for it + + +; Call this to declare all primitives when initially constructing a world, +; before types have been constructed. +(defun declare-primitive (symbol type-expr value-code appearance &rest key-args) + (when (symbol-primitive symbol) + (error "Attempt to redefine primitive ~A" symbol)) + (setf (symbol-primitive symbol) (apply #'make-primitive type-expr value-code appearance key-args)) + (export-symbol symbol)) + + +; Call this to compute the primitive's type from its type-expr. +(defun define-primitive (world primitive) + (setf (primitive-type primitive) (scan-type world (primitive-type-expr primitive)))) + + +; If name is an identifier not already used by a special form, command, primitive, or macro, +; return it interened into the world's package. If not, generate an error. +(defun scan-name (world name) + (unless (identifier? name) + (error "~S should be an identifier" name)) + (let ((symbol (world-intern world name))) + (when (get-properties (symbol-plist symbol) '(:command :special-form :primitive :macro :type-constructor)) + (error "~A is reserved" symbol)) + symbol)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; TYPE ENVIRONMENTS + +;;; A type environment is an alist that associates bound variables with their types. +;;; A variable may be bound multiple times; the first binding in the environment list +;;; shadows ones further in the list. +;;; The following kinds of bindings are allowed in a type environment: +;;; +;;; (symbol . type) +;;; Normal local variable, where: +;;; symbol is a world-interned name of the local variable; +;;; type is that variable's type. +;;; +;;; (:lhs-symbol . symbol) +;;; The lhs nonterminal's symbol if this is a type environment for an action function. +;;; +;;; ((action symbol . index) local-symbol type general-grammar-symbol) +;;; Action variable, where: +;;; action is a world-interned symbol denoting the action function being called +;;; symbol is a terminal or nonterminal's symbol on which the action is called +;;; index is the one-based index used to distinguish among identical +;;; symbols in the rhs of a production. The first occurrence of this +;;; symbol has index 1, the second has index 2, and so on. +;;; local-symbol is a unique local variable name used to represent the action +;;; function's value in the generated lisp code +;;; type is the type of the action function's value +;;; general-grammar-symbol is the general-grammar-symbol corresponding to the index-th +;;; instance of symbol in the production's rhs +;;; +;;; (:no-code-gen) +;;; If present, this indicates that the code returned from this scan-value or related call +;;; will be discarded; only the type is important. This flag is used as an optimization. + +(defconstant *null-type-env* nil) + + +; If symbol is a local variable, return two values: +; the name to use to refer to it from the generated lisp code; +; the variable's type. +; Otherwise, return nil. +; symbol must already be world-interned. +(declaim (inline type-env-local)) +(defun type-env-local (type-env symbol) + (let ((binding (assoc symbol type-env :test #'eq))) + (when binding + (values (car binding) (cdr binding))))) + + +; If the currently generated function is an action, return that action production's +; lhs nonterminal's symbol; otherwise return nil. +(defun type-env-lhs-symbol (type-env) + (cdr (assoc ':lhs-symbol type-env :test #'eq))) + + +; If the currently generated function is an action for a rule with at least index +; instances of the given grammar-symbol's symbol on the right-hand side, and if action is +; a legal action for that symbol, return three values: +; the name to use from the generated lisp code to refer to the result of calling +; the action on the index-th instance of this symbol; +; the action result's type; +; the general-grammar-symbol corresponding to the index-th instance of this symbol in the rhs. +; Otherwise, return nil. +; action must already be world-interned. +(defun type-env-action (type-env action symbol index) + (let ((binding (assoc (list* action symbol index) type-env :test #'equal))) + (when binding + (values (second binding) (third binding) (fourth binding))))) + + +; Append bindings to the front of the type-env. The bindings list is destroyed. +(declaim (inline type-env-add-bindings)) +(defun type-env-add-bindings (type-env bindings) + (nconc bindings type-env)) + + +; Return an environment obtained from the type-env by adding a :no-code-gen binding. +(defun inhibit-code-gen (type-env) + (cons (list ':no-code-gen) type-env)) + + +; Return true if the type-env indicates that its code will be discarded. +(defun code-gen-inhibited (type-env) + (assoc ':no-code-gen type-env)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; VALUES + +;;; A value is one of the following: +;;; A void value (represented by nil) +;;; A boolean (nil for false; non-nil for true) +;;; An integer +;;; A rational number +;;; A double-precision floating-point number (or :+inf, :-inf, or :nan) +;;; A character +;;; A function (represented by a lisp function) +;;; A vector (represented by a list) +;;; A tuple (represented by a list of elements' values) +;;; A oneof (represented by a pair: tag . value) +;;; An address (represented by a cons cell whose cdr contains the value and car contains a serial number) + + +(defvar *address-counter*) ;Last used address serial number + + +; Return true if the value appears to have the given type. This function +; may return false positives (return true when the value doesn't actually +; have the given type) but never false negatives. +; If shallow is true, only test at the top level. +(defun value-has-type (value type &optional shallow) + (case (type-kind type) + (:void (null value)) + (:boolean t) + (:integer (integerp value)) + (:rational (rationalp value)) + (:double (double? value)) + (:character (characterp value)) + (:-> (functionp value)) + (:vector (let ((element-type (vector-element-type type))) + (if (eq (type-kind element-type) :character) + (stringp value) + (labels + ((test (value) + (or (null value) + (and (consp value) + (or shallow (value-has-type (car value) element-type)) + (test (cdr value)))))) + (test value))))) + (:tuple (labels + ((test (value types) + (or (and (null value) (null types)) + (and (consp value) + (consp types) + (or shallow (value-has-type (car value) (car types))) + (test (cdr value) (cdr types)))))) + (test value (type-parameters type)))) + (:oneof (and (consp value) + (let ((field-type (field-type type (car value)))) + (and field-type + (or shallow (value-has-type (cdr value) field-type)))))) + (:address (and (consp value) + (integerp (car value)) + (or shallow (value-has-type (cdr value) (address-element-type type))))) + (t (error "Bad typekind ~S" (type-kind type))))) + + +; Print the value nicely on the given stream. type is the value's type. +(defun print-value (value type &optional (stream t)) + (assert-true (value-has-type value type t)) + (case (type-kind type) + (:void (assert-true (null value)) + (write-string "unit" stream)) + (:boolean (write-string (if value "true" "false") stream)) + ((:integer :rational :character :->) (write value :stream stream)) + (:double (case value + (:+inf (write-string "+infinity" stream)) + (:-inf (write-string "-infinity" stream)) + (:nan (write-string "NaN" stream)) + (t (write value :stream stream)))) + (:vector (let ((element-type (vector-element-type type))) + (if (eq (type-kind element-type) :character) + (prin1 value stream) + (pprint-logical-block (stream value :prefix "(" :suffix ")") + (pprint-exit-if-list-exhausted) + (loop + (print-value (pprint-pop) element-type stream) + (pprint-exit-if-list-exhausted) + (format stream " ~:_")))))) + (:tuple (print-values value (type-parameters type) stream :prefix "[" :suffix "]")) + (:oneof (pprint-logical-block (stream nil :prefix "{" :suffix "}") + (let* ((tag (car value)) + (field-type (field-type type tag))) + (format stream "~A" tag) + (unless (eq (type-kind field-type) :void) + (format stream " ~:_") + (print-value (cdr value) field-type stream))))) + (:address (pprint-logical-block (stream nil :prefix "{" :suffix "}") + (format stream "~D ~:_" (car value)) + (print-value (cdr value) (address-element-type type) stream))) + (t (error "Bad typekind ~S" (type-kind type))))) + + +; Print a list of values nicely on the given stream. types is the list of the +; values' types (and should have the same length as the list of values). +; If prefix and/or suffix are non-null, use them as beginning and ending +; delimiters of the printed list. +(defun print-values (values types &optional (stream t) &key prefix suffix) + (assert-true (= (length values) (length types))) + (pprint-logical-block (stream values :prefix prefix :suffix suffix) + (pprint-exit-if-list-exhausted) + (dolist (type types) + (print-value (pprint-pop) type stream) + (pprint-exit-if-list-exhausted) + (format stream " ~:_")))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; VALUE EXPRESSIONS + +;;; Expressions are annotated to avoid having to duplicate the expression scanning logic when +;;; emitting markup for expressions. Expression forms are prefixed with an expr-annotation symbol +;;; to indicate their kinds. These symbols are in their own package to avoid potential confusion +;;; with keywords, variable names, terminals, etc. +(eval-when (:compile-toplevel :load-toplevel :execute) + (defpackage "EXPR-ANNOTATION" + (:use) + (:export "CONSTANT" ;(expr-annotation:constant ) + "PRIMITIVE" ;(expr-annotation:primitive ) + "LOCAL" ;(expr-annotation:local ) ;Local or lexically scoped variable + "GLOBAL" ;(expr-annotation:global ) ;Global variable + "CALL" ;(expr-annotation:call ... ) + "ACTION" ;(expr-annotation:action ) + "SPECIAL-FORM" ;(expr-annotation:special-form ...) + "MACRO"))) ;(expr-annotation:macro ) + + +; Return true if the annotated-expr is a special form annotated expression with +; the given special-form. special-form must be a symbol but does not have to be interned +; in the world's package. +(defun special-form-annotated-expr? (special-form annotated-expr) + (and (eq (first annotated-expr) 'expr-annotation:special-form) + (string= (symbol-name (second annotated-expr)) (symbol-name special-form)))) + + +; Return true if the annotated-expr is a macro annotated expression with the given macro. +; macro must be a symbol but does not have to be interned in the world's package. +(defun macro-annotated-expr? (macro annotated-expr) + (and (eq (first annotated-expr) 'expr-annotation:macro) + (string= (symbol-name (second annotated-expr)) (symbol-name macro)))) + + +; Return the value of the variable with the given symbol. +; Compute the value if the variable was unbound. +; Use the *busy-variables* list to prevent infinite recursion while computing variable values. +(defmacro fetch-value (symbol) + `(if (boundp ',symbol) + (symbol-value ',symbol) + (compute-variable-value ',symbol))) + + +; Generate a lisp expression that will compute the value of value-expr. +; type-env is the type environment. The expression may refer to free variables +; present in the type-env. +; Return three values: +; The expression's value (a lisp expression) +; The expression's type +; The annotated value-expr +(defun scan-value (world type-env value-expr) + (labels + ((syntax-error () + (error "Syntax error: ~S" value-expr)) + + ;Scan a function call. The function has already been scanned into its value and type, + ;but the arguments are still unprocessed. + (scan-call (function-value function-type function-annotated-expr arg-exprs) + (let ((arg-values nil) + (arg-types nil) + (arg-annotated-exprs nil)) + (dolist (arg-expr arg-exprs) + (multiple-value-bind (arg-value arg-type arg-annotated-expr) (scan-value world type-env arg-expr) + (push arg-value arg-values) + (push arg-type arg-types) + (push arg-annotated-expr arg-annotated-exprs))) + (let ((arg-values (nreverse arg-values)) + (arg-types (nreverse arg-types)) + (arg-annotated-exprs (nreverse arg-annotated-exprs))) + (unless (and (eq (type-kind function-type) :->) + (equal (->-argument-types function-type) arg-types)) + (error "~@" + value-expr + (print-type-to-string function-type) + (mapcar #'print-type-to-string arg-types))) + (values (apply #'gen-apply function-value arg-values) + (->-result-type function-type) + (list* 'expr-annotation:call function-annotated-expr arg-annotated-exprs))))) + + ;Scan an action call + (scan-action-call (action symbol &optional (index 1 index-supplied)) + (unless (integerp index) + (error "Production rhs grammar symbol index ~S must be an integer" index)) + (multiple-value-bind (symbol-code symbol-type general-grammar-symbol) (type-env-action type-env action symbol index) + (unless symbol-code + (error "Action ~S not found" (list action symbol index))) + (let ((multiple-symbols (type-env-action type-env action symbol 2))) + (when (and (not index-supplied) multiple-symbols) + (error "Ambiguous index in action ~S" (list action symbol))) + (values symbol-code + symbol-type + (list* 'expr-annotation:action action general-grammar-symbol + (and (or multiple-symbols + (grammar-symbol-= symbol (assert-non-null (type-env-lhs-symbol type-env)))) + (list index))))))) + + ;Scan an interned identifier + (scan-identifier (symbol) + (multiple-value-bind (symbol-code symbol-type) (type-env-local type-env symbol) + (if symbol-code + (values symbol-code symbol-type (list 'expr-annotation:local symbol)) + (let ((primitive (symbol-primitive symbol))) + (if primitive + (values (primitive-value-code primitive) (primitive-type primitive) (list 'expr-annotation:primitive symbol)) + (let ((type (symbol-type symbol))) + (if type + (values (list 'fetch-value symbol) type (list 'expr-annotation:global symbol)) + (syntax-error)))))))) + + ;Scan a call or macro expansion + (scan-cons (first rest) + (if (identifier? first) + (let* ((symbol (world-intern world first)) + (expander (symbol-macro symbol))) + (if expander + (multiple-value-bind (expansion-code expansion-type expansion-annotated-expr) + (scan-value world type-env (apply expander world type-env rest)) + (values + expansion-code + expansion-type + (list 'expr-annotation:macro symbol expansion-annotated-expr))) + (let ((handler (get symbol :special-form))) + (if handler + (apply handler world type-env symbol rest) + (if (and (symbol-action symbol) (not (type-env-local type-env symbol))) + (apply #'scan-action-call symbol rest) + (multiple-value-call #'scan-call (scan-identifier symbol) rest)))))) + (multiple-value-call #'scan-call (scan-value world type-env first) rest))) + + (scan-constant (value-expr type) + (values value-expr type (list 'expr-annotation:constant value-expr)))) + + (assert-three-values + (cond + ((consp value-expr) (scan-cons (first value-expr) (rest value-expr))) + ((identifier? value-expr) (scan-identifier (world-intern world value-expr))) + ((integerp value-expr) (scan-constant value-expr (world-integer-type world))) + ((floatp value-expr) (scan-constant value-expr (world-double-type world))) + ((characterp value-expr) (scan-constant value-expr (world-character-type world))) + ((stringp value-expr) (scan-constant value-expr (world-string-type world))) + (t (syntax-error)))))) + + +; Same as scan-value except that return only the expression's type. +(defun scan-value-type (world type-env value-expr) + (nth-value 1 (scan-value world (inhibit-code-gen type-env) value-expr))) + + +; Same as scan-value except that ensure that the value has the expected type. +; Return two values: +; The expression's value (a lisp expression) +; The annotated value-expr +(defun scan-typed-value (world type-env value-expr expected-type) + (multiple-value-bind (value type annotated-expr) (scan-value world type-env value-expr) + (unless (eq type expected-type) + (error "Expected type ~A for ~:W but got type ~A" + (print-type-to-string expected-type) + value-expr + (print-type-to-string type))) + (values value annotated-expr))) + + +; Same as scan-value except that ensure that the value has the expected type kind. +; Return three values: +; The expression's value (a lisp expression) +; The expression's type +; The annotated value-expr +(defun scan-kinded-value (world type-env value-expr expected-type-kind) + (multiple-value-bind (value type annotated-expr) (scan-value world type-env value-expr) + (unless (eq (type-kind type) expected-type-kind) + (error "Expected ~(~A~) for ~:W but got type ~A" + expected-type-kind + value-expr + (print-type-to-string type))) + (values value type annotated-expr))) + + +(defvar *busy-variables* nil) + +; Compute the value of a world's variable named by symbol. Return two values: +; The variable's value +; The variable's type +; If the variable already has a computed value, return it unchanged. +; If computing the value requires the values of other variables, compute them as well. +; Use the *busy-variables* list to prevent infinite recursion while computing variable values. +(defun compute-variable-value (symbol) + (cond + ((member symbol *busy-variables*) (error "Definition of ~A refers to itself" symbol)) + ((boundp symbol) (values (symbol-value symbol) (symbol-type symbol))) + (t (let* ((*busy-variables* (cons symbol *busy-variables*)) + (value-expr (get symbol :value-expr))) + (handler-bind (((or error warning) + #'(lambda (condition) + (declare (ignore condition)) + (format *error-output* "~&~@<~2IWhile computing ~A: ~_~:W~:>~%" + symbol value-expr)))) + (multiple-value-bind (value-code type) (scan-value (symbol-world symbol) *null-type-env* value-expr) + (unless (eq type (symbol-type symbol)) + (error "~A evaluates to type ~A, but is defined with type ~A" + symbol + (print-type-to-string type) + (print-type-to-string (symbol-type symbol)))) + (let ((named-value-code (name-lambda value-code symbol))) + (setf (symbol-code symbol) named-value-code) + (when *trace-variables* + (format *trace-output* "~&~S := ~:W~%" symbol named-value-code)) + (values (set symbol (eval named-value-code)) type)))))))) + + +; Compute the initial type-env to use for the given general-production's action code. +; The first cell of the type-env gives the production's lhs nonterminal's symbol; +; the remaining cells give the action arguments in order. +(defun general-production-action-env (grammar general-production) + (let* ((current-indices nil) + (lhs-general-nonterminal (general-production-lhs general-production)) + (bound-arguments-alist (nonterminal-sample-bound-argument-alist grammar lhs-general-nonterminal))) + (acons ':lhs-symbol (general-grammar-symbol-symbol lhs-general-nonterminal) + (mapcan + #'(lambda (general-grammar-symbol) + (let* ((symbol (general-grammar-symbol-symbol general-grammar-symbol)) + (index (incf (getf current-indices symbol 0))) + (grammar-symbol (instantiate-general-grammar-symbol bound-arguments-alist general-grammar-symbol))) + (mapcar + #'(lambda (declaration) + (let* ((action-symbol (car declaration)) + (action-type (cdr declaration)) + (local-symbol (gensym (symbol-name action-symbol)))) + (list + (list* action-symbol symbol index) + local-symbol + action-type + general-grammar-symbol))) + (grammar-symbol-signature grammar grammar-symbol)))) + (general-production-rhs general-production))))) + + +; Return the number of arguments that a function returned by compute-action-code +; would expect. +(defun n-action-args (grammar production) + (let ((n-args 0)) + (dolist (grammar-symbol (production-rhs production)) + (incf n-args (length (grammar-symbol-signature grammar grammar-symbol)))) + n-args)) + + +; Compute the code for evaluating body-expr to obtain the value of one of the +; production's actions. Verify that the result has the given type. +; The code is a lambda-expression that takes as arguments the results of all +; defined actions on the production's rhs. The arguments are listed in the +; same order as the grammar symbols in the rhs. If a grammar symbol in the rhs +; has more than one associated action, arguments are used corresponding to all +; of the actions in the same order as they were declared. If a grammar symbol +; in the rhs has no associated actions, no argument is used for it. +(defun compute-action-code (world grammar production action-symbol body-expr type) + (handler-bind ((error #'(lambda (condition) + (declare (ignore condition)) + (format *error-output* "~&~@<~2IWhile processing action ~A on ~S: ~_~:W~:>~%" + action-symbol (production-name production) body-expr)))) + (let* ((initial-env (general-production-action-env grammar production)) + (args (mapcar #'cadr (cdr initial-env))) + (body-code (scan-typed-value world initial-env body-expr type)) + (named-body-code (name-lambda body-code + (concatenate 'string (symbol-name (production-name production)) + "~" (symbol-name action-symbol)) + (world-package world)))) + (gen-lambda args named-body-code)))) + + +; Return a list of all grammar symbols's symbols that are present in at least one expr-annotation:action +; in the annotated expression. The symbols are returned in no particular order. +(defun annotated-expr-grammar-symbols (annotated-expr) + (let ((symbols nil)) + (labels + ((scan (annotated-expr) + (when (consp annotated-expr) + (if (eq (first annotated-expr) 'expr-annotation:action) + (pushnew (general-grammar-symbol-symbol (third annotated-expr)) symbols :test *grammar-symbol-=*) + (mapc #'scan annotated-expr))))) + (scan annotated-expr) + symbols))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; SPECIAL FORMS + +;;; Control structures + +(defun eval-bottom () + (error "Reached a BOTTOM statement")) + +; (bottom ) +; Raises an error. type is its phantom result type to satisfy type-checking +; even though bottom never returns. +(defun scan-bottom (world type-env special-form type-expr) + (declare (ignore type-env)) + (let ((type (scan-type world type-expr))) + (values + '(eval-bottom) + type + (list 'expr-annotation:special-form special-form type-expr)))) + + +; (lambda (( [:unused]) ... ( [:unused])) ) +(defun scan-lambda (world type-env special-form arg-binding-exprs body-expr) + (flet + ((scan-arg-binding (arg-binding-expr) + (unless (and (consp arg-binding-expr) + (consp (cdr arg-binding-expr)) + (member (cddr arg-binding-expr) '(nil (:unused)) :test #'equal)) + (error "Bad lambda binding ~S" arg-binding-expr)) + (let ((arg-symbol (scan-name world (first arg-binding-expr))) + (arg-type (scan-type world (second arg-binding-expr)))) + (cons arg-symbol arg-type)))) + + (unless (listp arg-binding-exprs) + (error "Bad lambda bindings ~S" arg-binding-exprs)) + (let* ((arg-bindings (mapcar #'scan-arg-binding arg-binding-exprs)) + (args (mapcar #'car arg-bindings)) + (arg-types (mapcar #'cdr arg-bindings)) + (unused-args (mapcan #'(lambda (arg arg-binding-expr) + (when (eq (third arg-binding-expr) ':unused) + (list arg))) + args arg-binding-exprs)) + (type-env (type-env-add-bindings type-env arg-bindings))) + (multiple-value-bind (body-code body-type body-annotated-expr) (scan-value world type-env body-expr) + (values (if unused-args + `#'(lambda ,args (declare (ignore . ,unused-args)) ,body-code) + `#'(lambda ,args ,body-code)) + (make-->-type world arg-types body-type) + (list 'expr-annotation:special-form special-form arg-binding-exprs body-annotated-expr)))))) + + +; (if ) +(defun scan-if (world type-env special-form condition-expr true-expr false-expr) + (multiple-value-bind (condition-code condition-annotated-expr) + (scan-typed-value world type-env condition-expr (world-boolean-type world)) + (multiple-value-bind (true-code true-type true-annotated-expr) (scan-value world type-env true-expr) + (multiple-value-bind (false-code false-type false-annotated-expr) (scan-value world type-env false-expr) + (unless (eq true-type false-type) + (error "~S: ~A and ~S: ~A used as alternatives in an if" + true-expr (print-type-to-string true-type) + false-expr (print-type-to-string false-type))) + (values + (list 'if condition-code true-code false-code) + true-type + (list 'expr-annotation:special-form special-form condition-annotated-expr true-annotated-expr false-annotated-expr)))))) + + +;;; Vectors + +(defmacro non-empty-vector (v operation-name) + `(or ,v (error ,(concatenate 'string operation-name " called on empty vector")))) + +; (vector ... ) +; Makes a vector of one or more elements. +(defun scan-vector-form (world type-env special-form element-expr &rest element-exprs) + (multiple-value-bind (element-code element-type element-annotated-expr) (scan-value world type-env element-expr) + (multiple-value-map-bind (rest-codes rest-annotated-exprs) + #'(lambda (element-expr) + (scan-typed-value world type-env element-expr element-type)) + (element-exprs) + (let ((elements-code (list* 'list element-code rest-codes))) + (values + (if (eq element-type (world-character-type world)) + (if element-exprs + (list 'coerce elements-code ''string) + (list 'string element-code)) + elements-code) + (make-vector-type world element-type) + (list* 'expr-annotation:special-form special-form element-annotated-expr rest-annotated-exprs)))))) + + +; (vector-of ) +; Makes a zero-element vector of elements of the given type. +(defun scan-vector-of (world type-env special-form element-type-expr) + (declare (ignore type-env)) + (let ((element-type (scan-type world element-type-expr))) + (values + (if (eq element-type (world-character-type world)) + "" + nil) + (make-vector-type world element-type) + (list 'expr-annotation:special-form special-form element-type-expr)))) + + +; (empty ) +; Returns true if the vector has zero elements. +(defun scan-empty (world type-env special-form vector-expr) + (multiple-value-bind (vector-code vector-type vector-annotated-expr) (scan-kinded-value world type-env vector-expr :vector) + (values + (if (eq vector-type (world-string-type world)) + `(= (length ,vector-code) 0) + (list 'endp vector-code)) + (world-boolean-type world) + (list 'expr-annotation:special-form special-form vector-annotated-expr)))) + + +; (length ) +; Returns the number of elements in the vector. +(defun scan-length (world type-env special-form vector-expr) + (multiple-value-bind (vector-code vector-type vector-annotated-expr) (scan-kinded-value world type-env vector-expr :vector) + (declare (ignore vector-type)) + (values + (list 'length vector-code) + (world-integer-type world) + (list 'expr-annotation:special-form special-form vector-annotated-expr)))) + + +; (first ) +; Returns the first element of the vector. Throws an error if the vector is empty. +(defun scan-first (world type-env special-form vector-expr) + (multiple-value-bind (vector-code vector-type vector-annotated-expr) (scan-kinded-value world type-env vector-expr :vector) + (values + (if (eq vector-type (world-string-type world)) + `(char ,vector-code 0) + `(car (non-empty-vector ,vector-code "first"))) + (vector-element-type vector-type) + (list 'expr-annotation:special-form special-form vector-annotated-expr)))) + + +; (last ) +; Returns the last element of the vector. Throws an error if the vector is empty. +(defun scan-last (world type-env special-form vector-expr) + (multiple-value-bind (vector-code vector-type vector-annotated-expr) (scan-kinded-value world type-env vector-expr :vector) + (values + (if (eq vector-type (world-string-type world)) + (let ((var (gensym "STR"))) + `(let ((,var ,vector-code)) + (char ,var (1- (length ,var))))) + `(car (last (non-empty-vector ,vector-code "last")))) + (vector-element-type vector-type) + (list 'expr-annotation:special-form special-form vector-annotated-expr)))) + + +; (nth ) +; Returns the nth element of the vector. Throws an error if the vector's length is less than n. +(defun scan-nth (world type-env special-form vector-expr n-expr) + (multiple-value-bind (vector-code vector-type vector-annotated-expr) (scan-kinded-value world type-env vector-expr :vector) + (multiple-value-bind (n-code n-annotated-expr) (scan-typed-value world type-env n-expr (world-integer-type world)) + (values + (if (eq vector-type (world-string-type world)) + `(char ,vector-code ,n-code) + (let ((n (gensym "N"))) + `(let ((,n ,n-code)) + (car (non-empty-vector (nthcdr ,n ,vector-code) "nth"))))) + (vector-element-type vector-type) + (list 'expr-annotation:special-form special-form vector-annotated-expr n-annotated-expr))))) + + +; (rest ) +; Returns all but the first elements of the vector. Throws an error if the vector is empty. +(defun scan-rest (world type-env special-form vector-expr) + (multiple-value-bind (vector-code vector-type vector-annotated-expr) (scan-kinded-value world type-env vector-expr :vector) + (values + (if (eq vector-type (world-string-type world)) + `(subseq ,vector-code 1) + `(cdr (non-empty-vector ,vector-code "rest"))) + vector-type + (list 'expr-annotation:special-form special-form vector-annotated-expr)))) + + +; (butlast ) +; Returns all but the last elements of the vector. Throws an error if the vector is empty. +(defun scan-butlast (world type-env special-form vector-expr) + (multiple-value-bind (vector-code vector-type vector-annotated-expr) (scan-kinded-value world type-env vector-expr :vector) + (values + (if (eq vector-type (world-string-type world)) + (let ((var (gensym "STR"))) + `(let ((,var ,vector-code)) + (subseq ,var 0 (1- (length ,var))))) + `(butlast (non-empty-vector ,vector-code "butlast"))) + vector-type + (list 'expr-annotation:special-form special-form vector-annotated-expr)))) + + +; (append ) +; Returns a vector contatenating the two given vectors, which must have the same element type. +(defun scan-append (world type-env special-form vector1-expr vector2-expr) + (multiple-value-bind (vector1-code vector-type vector1-annotated-expr) (scan-kinded-value world type-env vector1-expr :vector) + (multiple-value-bind (vector2-code vector2-annotated-expr) (scan-typed-value world type-env vector2-expr vector-type) + (values + (if (eq vector-type (world-string-type world)) + `(concatenate 'string ,vector1-code ,vector2-code) + (list 'append vector1-code vector2-code)) + vector-type + (list 'expr-annotation:special-form special-form vector1-annotated-expr vector2-annotated-expr))))) + + +;;; Oneofs + +; (oneof ) +; oneof-type is inferred from the tag. +(defun scan-oneof-form (world type-env special-form tag &optional (value-expr nil has-value-expr)) + (multiple-value-bind (value-code value-type value-annotated-expr) + (if has-value-expr + (scan-value world type-env value-expr) + (values nil (world-void-type world) nil)) + (values + `(cons ',tag ,value-code) + (lookup-oneof-tag world tag value-type) + (list 'expr-annotation:special-form special-form tag value-annotated-expr)))) + + +; (typed-oneof ) +(defun scan-typed-oneof (world type-env special-form type-expr tag &optional (value-expr nil has-value-expr)) + (let ((type (scan-kinded-type world type-expr :oneof))) + (multiple-value-bind (tag field-type) (scan-tag type tag) + (multiple-value-bind (value-code value-annotated-expr) + (cond + (has-value-expr (scan-typed-value world type-env value-expr field-type)) + ((eq (type-kind field-type) :void) (values nil nil)) + (t (error "Missing oneof value expression"))) + (values + `(cons ',tag ,value-code) + type + (list 'expr-annotation:special-form special-form type-expr tag value-annotated-expr)))))) + + +; (case ( ) ( ) ... ( )) +; where each is either or ( [:unused]) or (( ... )) +(defun scan-case (world type-env special-form oneof-expr &rest cases) + (multiple-value-bind (oneof-code oneof-type oneof-annotated-expr) (scan-kinded-value world type-env oneof-expr :oneof) + (let ((unseen-tags (copy-list (type-tags oneof-type))) + (case-codes nil) + (case-annotated-exprs nil) + (body-type nil) + (oneof-var (gensym "ONEOF"))) + (unless cases + (error "Empty case statement")) + (dolist (case cases) + (unless (and (consp case) (= (length case) 2)) + (error "Bad case ~S" case)) + (let ((tag-spec (first case)) + (tags nil) + (var nil) + (var-type-expr nil) + (local-type-env type-env)) + (cond + ((atom tag-spec) + (setq tags (list tag-spec))) + ((atom (first tag-spec)) + (unless (and (consp (cdr tag-spec)) + (consp (cddr tag-spec)) + (member (cdddr tag-spec) '(nil (:unused)) :test #'equal)) + (error "Bad case tag ~S" tag-spec)) + (setq tags (list (first tag-spec))) + (when (second tag-spec) + (setq var (scan-name world (second tag-spec))) + (setq var-type-expr (third tag-spec)))) + (t (when (rest tag-spec) + (error "Bad case tag ~S" tag-spec)) + (setq tags (first tag-spec)))) + (dolist (tag tags) + (multiple-value-bind (tag field-type) (scan-tag oneof-type tag) + (if (member tag unseen-tags) + (setq unseen-tags (delete tag unseen-tags)) + (error "Duplicate case tag ~A" tag)) + (when var + (unless (eq field-type (scan-type world var-type-expr)) + (error "Case tag ~A type mismatch: ~A and ~S" tag + (print-type-to-string field-type) var-type-expr)) + (setq local-type-env (type-env-add-bindings local-type-env (list (cons var field-type))))))) + (multiple-value-bind (value-code value-type value-annotated-expr) (scan-value world local-type-env (second case)) + (cond + ((null body-type) (setq body-type value-type)) + ((not (eq body-type value-type)) + (error "Case result type mismatch: ~A and ~A" (print-type-to-string body-type) (print-type-to-string value-type)))) + (push (list tags + (if var + `(let ((,var (cdr ,oneof-var))) + ,@(when (eq (fourth tag-spec) ':unused) + `((declare (ignore ,var)))) + ,value-code) + value-code)) + case-codes) + (push (list (list tags var var-type-expr) value-annotated-expr) case-annotated-exprs)))) + (when unseen-tags + (error "Missing case tags ~S" unseen-tags)) + (values + `(let ((,oneof-var ,oneof-code)) + (ecase (car ,oneof-var) ,@(nreverse case-codes))) + body-type + (list* 'expr-annotation:special-form special-form oneof-annotated-expr (nreverse case-annotated-exprs)))))) + + +; (select ) +; Returns the tag's value or bottom if has a different tag. +(defun scan-select (world type-env special-form tag oneof-expr) + (multiple-value-bind (oneof-code oneof-type oneof-annotated-expr) (scan-kinded-value world type-env oneof-expr :oneof) + (multiple-value-bind (tag field-type) (scan-tag oneof-type tag) + (values + `(select-field ',tag ,oneof-code) + field-type + (list 'expr-annotation:special-form special-form tag oneof-annotated-expr))))) + +(defun select-field (tag value) + (if (eq (car value) tag) + (cdr value) + (error "Select ~S got tag ~S" tag (car value)))) + + +; (is ) +(defun scan-is (world type-env special-form tag oneof-expr) + (multiple-value-bind (oneof-code oneof-type oneof-annotated-expr) (scan-kinded-value world type-env oneof-expr :oneof) + (let ((tag (scan-tag oneof-type tag))) + (values + `(eq ',tag (car ,oneof-code)) + (world-boolean-type world) + (list 'expr-annotation:special-form special-form tag oneof-annotated-expr))))) + + +;;; Tuples + +; (tuple ... ) +(defun scan-tuple-form (world type-env special-form type-expr &rest value-exprs) + (let* ((type (scan-kinded-type world type-expr :tuple)) + (field-types (type-parameters type))) + (unless (= (length value-exprs) (length field-types)) + (error "Wrong number of tuple fields given in ~A constructor: ~S" (print-type-to-string type) value-exprs)) + (multiple-value-map-bind (value-codes value-annotated-exprs) + #'(lambda (field-type value-expr) + (scan-typed-value world type-env value-expr field-type)) + (field-types value-exprs) + (values + (cons 'list value-codes) + type + (list* 'expr-annotation:special-form special-form type-expr value-annotated-exprs))))) + + +; (& ) +; Return the tuple field's value. +(defun scan-& (world type-env special-form tag tuple-expr) + (multiple-value-bind (tuple-code tuple-type tuple-annotated-expr) (scan-kinded-value world type-env tuple-expr :tuple) + (multiple-value-bind (tag field-type) (scan-tag tuple-type tag) + (values + (list 'nth (position tag (type-tags tuple-type)) tuple-code) + field-type + (list 'expr-annotation:special-form special-form tag tuple-annotated-expr))))) + + +;;; Addresses + +; (new ) +; Makes a mutable cell with the given initial value. +(defun scan-new (world type-env special-form value-expr) + (multiple-value-bind (value-code value-type value-annotated-expr) (scan-value world type-env value-expr) + (values + (let ((var (gensym "VAL"))) + `(let ((,var ,value-code)) + (cons (incf *address-counter*) ,var))) + (make-address-type world value-type) + (list 'expr-annotation:special-form special-form value-annotated-expr)))) + + +; (@ ) +; Reads the value of the mutable cell. +(defun scan-@ (world type-env special-form address-expr) + (multiple-value-bind (address-code address-type address-annotated-expr) (scan-kinded-value world type-env address-expr :address) + (values + `(cdr ,address-code) + (address-element-type address-type) + (list 'expr-annotation:special-form special-form address-annotated-expr)))) + + +; (@= ) +; Writes the value of the mutable cell. Returns void. +(defun scan-@= (world type-env special-form address-expr value-expr) + (multiple-value-bind (address-code address-type address-annotated-expr) (scan-kinded-value world type-env address-expr :address) + (multiple-value-bind (value-code value-annotated-expr) (scan-typed-value world type-env value-expr (address-element-type address-type)) + (values + `(progn + (rplacd ,address-code ,value-code) + nil) + (world-void-type world) + (list 'expr-annotation:special-form special-form address-annotated-expr value-annotated-expr))))) + + +; (address-equal ) +; Returns true if the two addresses are the same. +(defun scan-address-equal (world type-env special-form address1-expr address2-expr) + (multiple-value-bind (address1-code address1-type address1-annotated-expr) (scan-kinded-value world type-env address1-expr :address) + (multiple-value-bind (address2-code address2-annotated-expr) (scan-typed-value world type-env address2-expr address1-type) + (values + `(eq ,address1-code ,address2-code) + (world-boolean-type world) + (list 'expr-annotation:special-form special-form address1-annotated-expr address2-annotated-expr))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MACROS + + +(defun let-binding? (form) + (and (consp form) + (consp (cdr form)) + (consp (cddr form)) + (member (cdddr form) '(nil (:unused)) :test #'equal) + (identifier? (first form)))) + + +; (let (( [:unused]) ... ( [:unused])) ) ==> +; ((lambda (( [:unused]) ... ( [:unused])) ) ... ) +(defun expand-let (world type-env bindings &rest body) + (declare (ignore type-env)) + (declare (ignore world)) + (unless (and (listp bindings) + (every #'let-binding? bindings)) + (error "Bad let bindings ~S" bindings)) + (cons (list* 'lambda (mapcar #'(lambda (binding) + (list* (first binding) (second binding) (cdddr binding))) + bindings) body) + (mapcar #'third bindings))) + + +; (letexc ( [:unused]) ) ==> +; (case +; ((abrupt x exception) (typed-oneof abrupt x)) +; ((normal [:unused]) ))) +; where is the type of . +(defun expand-letexc (world type-env binding &rest body) + (unless (let-binding? binding) + (error "Bad letexc binding ~S" binding)) + (let* ((var (first binding)) + (type (second binding)) + (expr (third binding)) + (body-type (->-result-type (scan-value-type world type-env `(lambda ((,var ,type)) ,@body))))) + `(case ,expr + ((abrupt x exception) (typed-oneof ,body-type abrupt x)) + ((normal ,var ,type ,@(cdddr binding)) ,@body)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; COMMANDS + +; (%... ...) +; Ignore any command that starts with a %. These commands are hints for printing. +(defun scan-% (world grammar-info-var &rest rest) + (declare (ignore world grammar-info-var rest))) + + +; (deftype ) +; Create the type in the world and set its contents. +(defun scan-deftype (world grammar-info-var name type-expr) + (declare (ignore grammar-info-var)) + (let* ((symbol (scan-name world name)) + (type (scan-type world type-expr t))) + (unless (typep type 'type) + (error "~:W undefined in type definition of ~A" type-expr symbol)) + (add-type-name world type symbol))) + + +; (define ) +; Create the variable in the world but do not evaluate its type or value yet. +; is a flag that is true if this define was originally in the form: +; (define ( ( ) ... ( )) ) +(defun scan-define (world grammar-info-var name type-expr value-expr destructured) + (declare (ignore grammar-info-var destructured)) + (let ((symbol (scan-name world name))) + (unless (eq (get symbol :value-expr *get2-nonce*) *get2-nonce*) + (error "Attempt to redefine variable ~A" symbol)) + (setf (get symbol :value-expr) value-expr) + (setf (get symbol :type-expr) type-expr) + (export-symbol symbol))) + + +; (set-grammar ) +; Set the current grammar to the grammar or lexer with the given name. +(defun scan-set-grammar (world grammar-info-var name) + (let ((grammar-info (world-grammar-info world name))) + (unless grammar-info + (error "Unknown grammar ~A" name)) + (setf (car grammar-info-var) grammar-info))) + + +; (clear-grammar) +; Clear the current grammar. +(defun scan-clear-grammar (world grammar-info-var) + (declare (ignore world)) + (setf (car grammar-info-var) nil)) + + +; Get the grammar-info-var's grammar. Signal an error if there isn't one. +(defun checked-grammar (grammar-info-var) + (let ((grammar-info (car grammar-info-var))) + (if grammar-info + (grammar-info-grammar grammar-info) + (error "Grammar needed")))) + + +; (declare-action ) +(defun scan-declare-action (world grammar-info-var action-name general-grammar-symbol-source type-expr) + (let* ((grammar (checked-grammar grammar-info-var)) + (action-symbol (scan-name world action-name)) + (general-grammar-symbol (grammar-parametrization-intern grammar general-grammar-symbol-source))) + (declare-action grammar general-grammar-symbol action-symbol type-expr) + (dolist (grammar-symbol (general-grammar-symbol-instances grammar general-grammar-symbol)) + (push (cons (car grammar-info-var) grammar-symbol) (symbol-action action-symbol))) + (export-symbol action-symbol))) + + +; (action ) +; is a flag that is true if this define was originally in the form: +; (action ( ( ) ... ( )) ) +(defun scan-action (world grammar-info-var action-name production-name body destructured) + (declare (ignore destructured)) + (let ((grammar (checked-grammar grammar-info-var)) + (action-symbol (world-intern world action-name))) + (define-action grammar production-name action-symbol body))) + + +; (terminal-action ) +(defun scan-terminal-action (world grammar-info-var action-name terminal function-name) + (let ((grammar (checked-grammar grammar-info-var)) + (action-symbol (world-intern world action-name))) + (define-terminal-action grammar terminal action-symbol (symbol-function function-name)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; INITIALIZATION + +(defparameter *default-specials* + '((:preprocess + (define preprocess-define) + (action preprocess-action) + (grammar preprocess-grammar) + (lexer preprocess-lexer) + (grammar-argument preprocess-grammar-argument) + (production preprocess-production)) + + (:macro + (let expand-let depict-let) + (letexc expand-letexc depict-letexc)) + + (:command + (%section scan-% depict-%section) + (%subsection scan-% depict-%subsection) + (grammar-argument scan-% depict-grammar-argument) + (%rule scan-% depict-%rule) + (%charclass scan-% depict-%charclass) + (%print-actions scan-% depict-%print-actions) + (deftype scan-deftype depict-deftype) + (define scan-define depict-define) + (set-grammar scan-set-grammar depict-set-grammar) + (clear-grammar scan-clear-grammar depict-clear-grammar) + (declare-action scan-declare-action depict-declare-action) + (action scan-action depict-action) + (terminal-action scan-terminal-action depict-terminal-action)) + + (:special-form + ;;Control structures + (bottom scan-bottom depict-bottom) + (lambda scan-lambda depict-lambda) + (if scan-if depict-if) + + ;;Vectors + (vector scan-vector-form depict-vector-form) + (vector-of scan-vector-of depict-vector-of) + (empty scan-empty depict-empty) + (length scan-length depict-length) + (first scan-first depict-first) + (last scan-last depict-last) + (nth scan-nth depict-nth) + (rest scan-rest depict-rest) + (butlast scan-butlast depict-butlast) + (append scan-append depict-append) + + ;;Oneofs + (oneof scan-oneof-form depict-oneof-form) + (typed-oneof scan-typed-oneof depict-typed-oneof) + (case scan-case depict-case) + (select scan-select depict-select-or-&) + (is scan-is depict-is) + + ;;Tuples + (tuple scan-tuple-form depict-tuple-form) + (& scan-& depict-select-or-&) + + ;;Addresses + (new scan-new depict-new) + (@ scan-@ depict-@) + (@= scan-@= depict-@=) + (address-equal scan-address-equal depict-address-equal)) + + (:type-constructor + (-> scan--> depict-->) + (vector scan-vector depict-vector) + (oneof scan-oneof depict-oneof) + (tuple scan-tuple depict-tuple) + (address scan-address depict-address)))) + + +(defparameter *default-types* + '((void . :void) + (boolean . :boolean) + (integer . :integer) + (rational . :rational) + (double . :double) + (character . :character))) + + +(defparameter *default-primitives* + '((unit void nil :global :unit) + (true boolean t :global :true) + (false boolean nil :global :false) + (+infinity double :+inf :global ("+" :infinity)) + (-infinity double :-inf :global (:minus :infinity)) + (nan double :nan :global "NaN") + + (neg (-> (integer) integer) #'- :unary :minus nil 2 2) + (+ (-> (integer integer) integer) #'+ :infix "+" t 5 5 5) + (- (-> (integer integer) integer) #'- :infix :minus t 5 5 4) + (* (-> (integer integer) integer) #'* :infix "*" nil 4 4 4) + (= (-> (integer integer) boolean) #'= :infix "=" t 6 5 5) + (!= (-> (integer integer) boolean) #'/= :infix :not-equal t 6 5 5) + (< (-> (integer integer) boolean) #'< :infix "<" t 6 5 5) + (> (-> (integer integer) boolean) #'> :infix ">" t 6 5 5) + (<= (-> (integer integer) boolean) #'<= :infix :less-or-equal t 6 5 5) + (>= (-> (integer integer) boolean) #'>= :infix :greater-or-equal t 6 5 5) + + (rational-neg (-> (rational) rational) #'- :unary "-" nil 2 2) + (rational+ (-> (rational rational) rational) #'+ :infix "+" t 5 5 5) + (rational- (-> (rational rational) rational) #'- :infix :minus t 5 5 4) + (rational* (-> (rational rational) rational) #'* :infix "*" nil 4 4 4) + (rational/ (-> (rational rational) rational) #'/ :infix "/" nil 4 4 3) + + (not (-> (boolean) boolean) #'not :unary ((:semantic-keyword "not") " ") nil 7 6) + (and (-> (boolean boolean) boolean) #'and2 :infix ((:semantic-keyword "and")) t 7 6 6) + (or (-> (boolean boolean) boolean) #'or2 :infix ((:semantic-keyword "or")) t 7 6 6) + (xor (-> (boolean boolean) boolean) #'xor2 :infix ((:semantic-keyword "xor")) t 7 6 6) + + (bitwise-and (-> (integer integer) integer) #'logand) + (bitwise-or (-> (integer integer) integer) #'logior) + (bitwise-xor (-> (integer integer) integer) #'logxor) + (bitwise-shift (-> (integer integer) integer) #'ash) + + (integer-to-rational (-> (integer) rational) #'identity :phantom) + (rational-to-double (-> (rational) double) #'rational-to-double) + + (double-is-zero (-> (double) boolean) #'double-is-zero) + (double-is-nan (-> (double) boolean) #'double-is-nan) + (double-compare (-> (double double boolean boolean boolean boolean) boolean) #'double-compare) + (double-to-uint32 (-> (double) integer) #'double-to-uint32) + (double-abs (-> (double double) double) #'double-abs) + (double-negate (-> (double) double) #'double-neg) + (double-add (-> (double double) double) #'double-add) + (double-subtract (-> (double double) double) #'double-subtract) + (double-multiply (-> (double double) double) #'double-multiply) + (double-divide (-> (double double) double) #'double-divide) + (double-remainder (-> (double double) double) #'double-remainder) + + (code-to-character (-> (integer) character) #'code-char) + (character-to-code (-> (character) integer) #'char-code) + + (string-equal (-> (string string) boolean) #'string=))) + + +; Return the tail end of the lambda list for make-primitive. The returned list always starts with +; an appearance constant and is followed by additional keywords as appropriate for that appearance. +(defun process-primitive-spec-appearance (name primitive-spec-appearance) + (if primitive-spec-appearance + (let ((appearance (first primitive-spec-appearance)) + (args (rest primitive-spec-appearance))) + (cons + appearance + (ecase appearance + (:global + (assert-type args (tuple t)) + (list ':markup1 (first args) ':level 1)) + (:infix + (assert-type args (tuple t bool integer integer integer)) + (list ':markup1 (first args) ':markup2 (second args) ':level (third args) ':level1 (fourth args) ':level2 (fifth args))) + (:unary + (assert-type args (tuple t t integer integer)) + (list ':markup1 (first args) ':markup2 (second args) ':level (third args) ':level1 (fourth args))) + (:phantom + (assert-true (null args)) + (list ':level 0))))) + `(:global :markup1 ((:global-variable ,(symbol-lower-mixed-case-name name))) :level 0))) + + +; Create a world with the given name and set up the built-in properties of its symbols. +(defun init-world (name) + (let ((world (make-world name))) + (dolist (specials-list *default-specials*) + (let ((property (car specials-list))) + (dolist (special-spec (cdr specials-list)) + (apply #'add-special + property + (world-intern world (first special-spec)) + (rest special-spec))))) + (dolist (primitive-spec *default-primitives*) + (let ((name (world-intern world (first primitive-spec)))) + (apply #'declare-primitive + name + (second primitive-spec) + (third primitive-spec) + (process-primitive-spec-appearance name (cdddr primitive-spec))))) + (dolist (type-spec *default-types*) + (add-type-name world (make-type world (cdr type-spec) nil nil) (world-intern world (car type-spec)))) + (add-type-name world (make-vector-type world (make-type world :character nil nil)) (world-intern world 'string)) + world)) + + +(defun print-world (world &optional (stream t) (all t)) + (pprint-logical-block (stream nil) + (labels + ((default-print-contents (symbol value stream) + (declare (ignore symbol)) + (write value :stream stream)) + + (print-symbols-and-contents (property title separator print-contents) + (let ((symbols (all-world-external-symbols-with-property world property))) + (when symbols + (pprint-logical-block (stream symbols) + (write-string title stream) + (pprint-indent :block 2 stream) + (pprint-newline :mandatory stream) + (loop + (let ((symbol (pprint-pop))) + (pprint-logical-block (stream nil) + (if separator + (format stream "~A ~@_~:I~A " symbol separator) + (format stream "~A " symbol)) + (funcall print-contents symbol (get symbol property) stream))) + (pprint-exit-if-list-exhausted) + (pprint-newline :mandatory stream))) + (pprint-newline :mandatory stream) + (pprint-newline :mandatory stream))))) + + (when all + (print-symbols-and-contents + :preprocess "Preprocessor actions:" "::" #'default-print-contents) + (print-symbols-and-contents + :command "Commands:" "::" #'default-print-contents) + (print-symbols-and-contents + :special-form "Special Forms:" "::" #'default-print-contents) + (print-symbols-and-contents + :primitive "Primitives:" ":" + #'(lambda (symbol primitive stream) + (declare (ignore symbol)) + (let ((type (primitive-type primitive))) + (if type + (print-type type stream) + (format stream "~@<<<~;~W~;>>~:>" (primitive-type-expr primitive)))) + (format stream " ~_= ~@<<~;~W~;>~:>" (primitive-value-code primitive)))) + (print-symbols-and-contents + :macro "Macros:" "::" #'default-print-contents) + (print-symbols-and-contents + :type-constructor "Type Constructors:" "::" #'default-print-contents)) + + (print-symbols-and-contents + :deftype "Types:" "==" + #'(lambda (symbol type stream) + (if type + (print-type type stream (eq symbol (type-name type))) + (format stream "")))) + (print-symbols-and-contents + :value-expr "Values:" ":" + #'(lambda (symbol value-expr stream) + (let ((type (symbol-type symbol))) + (if type + (print-type type stream) + (format stream "~@<<<~;~W~;>>~:>" (get symbol :type-expr))) + (format stream " ~_= ") + (if (boundp symbol) + (print-value (symbol-value symbol) type stream) + (format stream "~@<<<~;~W~;>>~:>" value-expr))))) + (print-symbols-and-contents + :action "Actions:" nil + #'(lambda (action-symbol grammar-info-and-symbols stream) + (pprint-newline :miser stream) + (pprint-logical-block (stream (reverse grammar-info-and-symbols)) + (pprint-exit-if-list-exhausted) + (loop + (let* ((grammar-info-and-symbol (pprint-pop)) + (grammar-info (car grammar-info-and-symbol)) + (grammar (grammar-info-grammar grammar-info)) + (grammar-symbol (cdr grammar-info-and-symbol))) + (write-string ": " stream) + (multiple-value-bind (has-type type) (action-declaration grammar grammar-symbol action-symbol) + (declare (ignore has-type)) + (pprint-logical-block (stream nil) + (print-type type stream) + (format stream " ~_{~S ~S}" (grammar-info-name grammar-info) grammar-symbol)))) + (pprint-exit-if-list-exhausted) + (pprint-newline :mandatory stream)))))))) + + +(defmethod print-object ((world world) stream) + (print-unreadable-object (world stream) + (format stream "world ~A" (world-name world)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; EVALUATION + +; Scan a command. Create types and variables in the world +; but do not evaluate variables' types or values yet. +; grammar-info-var is a cons cell whose car is either nil +; or a grammar-info for the grammar currently being defined. +(defun scan-command (world grammar-info-var command) + (handler-bind ((error #'(lambda (condition) + (declare (ignore condition)) + (format *error-output* "~&~@<~2IWhile processing: ~_~:W~:>~%" command)))) + (let ((handler (and (consp command) + (identifier? (first command)) + (get (world-intern world (first command)) :command)))) + (if handler + (apply handler world grammar-info-var (rest command)) + (error "Bad command"))))) + + +; Compute the primitives' types from their type-exprs. +(defun define-primitives (world) + (each-world-external-symbol-with-property + world + :primitive + #'(lambda (symbol primitive) + (declare (ignore symbol)) + (define-primitive world primitive)))) + + +; Compute the types and values of all variables accumulated by scan-command. +(defun eval-variables (world) + ;Compute the variables' types first. + (each-world-external-symbol-with-property + world + :type-expr + #'(lambda (symbol type-expr) + (setf (get symbol :type) (scan-type world type-expr)))) + + ;Then compute the variables' values. + (each-world-external-symbol-with-property + world + :value-expr + #'(lambda (symbol value-expr) + (declare (ignore value-expr)) + (compute-variable-value symbol)))) + + +; Compute the types of all grammar declarations accumulated by scan-declare-action. +(defun eval-action-declarations (world) + (dolist (grammar (world-grammars world)) + (each-action-declaration + grammar + #'(lambda (grammar-symbol action-declaration) + (declare (ignore grammar-symbol)) + (setf (cdr action-declaration) (scan-type world (cdr action-declaration))))))) + + +; Compute the bodies of all grammar actions accumulated by scan-action. +(defun eval-action-definitions (world) + (dolist (grammar (world-grammars world)) + (maphash + #'(lambda (terminal action-bindings) + (dolist (action-binding action-bindings) + (unless (cdr action-binding) + (error "Missing action ~S for terminal ~S" (car action-binding) terminal)))) + (grammar-terminal-actions grammar)) + (each-grammar-production + grammar + #'(lambda (production) + (let* ((n-action-args (n-action-args grammar production)) + (codes + (mapcar + #'(lambda (action-binding) + (let ((action-symbol (car action-binding)) + (action (cdr action-binding))) + (unless action + (error "Missing action ~S for production ~S" (car action-binding) (production-name production))) + (multiple-value-bind (has-type type) (action-declaration grammar (production-lhs production) action-symbol) + (declare (ignore has-type)) + (let ((code (compute-action-code world grammar production action-symbol (action-expr action) type))) + (setf (action-code action) code) + (when *trace-variables* + (format *trace-output* "~&~@<~S[~S] := ~2I~_~:W~:>~%" action-symbol (production-name production) code)) + code)))) + (production-actions production))) + (production-code + (if codes + (let* ((vars-and-rest (intern-n-vars-with-prefix "ARG" n-action-args '(stack-rest))) + (vars (nreverse (butlast vars-and-rest))) + (applied-codes (mapcar #'(lambda (code) (apply #'gen-apply code vars)) + (nreverse codes)))) + `#'(lambda (stack) + (list*-bind ,vars-and-rest stack + (list* ,@applied-codes stack-rest)))) + `#'(lambda (stack) + (nthcdr ,n-action-args stack)))) + (named-production-code (name-lambda production-code (production-name production)))) + (setf (production-n-action-args production) n-action-args) + (setf (production-evaluator-code production) named-production-code) + (when *trace-variables* + (format *trace-output* "~&~@~%" (production-name production) named-production-code)) + (handler-bind ((warning #'(lambda (condition) + (declare (ignore condition)) + (format *error-output* "~&While computing production ~S:~%" (production-name production))))) + (setf (production-evaluator production) (eval named-production-code)))))))) + + +; Evaluate the given commands in the world. +; This method can only be called once. +(defun eval-commands (world commands) + (ensure-proper-form commands) + (assert-true (null (world-commands-source world))) + (setf (world-commands-source world) commands) + (let ((grammar-info-var (list nil))) + (dolist (command commands) + (scan-command world grammar-info-var command))) + (unite-types world) + (setf (world-void-type world) (make-type world :void nil nil)) + (setf (world-boolean-type world) (make-type world :boolean nil nil)) + (setf (world-integer-type world) (make-type world :integer nil nil)) + (setf (world-rational-type world) (make-type world :rational nil nil)) + (setf (world-double-type world) (make-type world :double nil nil)) + (setf (world-character-type world) (make-type world :character nil nil)) + (setf (world-string-type world) (make-vector-type world (world-character-type world))) + (define-primitives world) + (eval-action-declarations world) + (eval-variables world) + (eval-action-definitions world)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; PREPROCESSING + +(defstruct preprocessor-state + (kind nil :type (member nil :grammar :lexer)) ;The kind of grammar being accumulated or nil if none + (kind2 nil :type (member nil :lalr-1 :lr-1)) ;The kind of parser + (name nil :type symbol) ;Name of the grammar being accumulated or nil if none + (parametrization nil :type (or null grammar-parametrization)) ;Parametrization of the grammar being accumulated or nil if none + (start-symbol nil :type symbol) ;Start symbol of the grammar being accumulated or nil if none + (grammar-source-reverse nil :type list) ;List of productions in the grammar being accumulated (in reverse order) + (charclasses-source nil) ;List of charclasses in the lexical grammar being accumulated + (lexer-actions-source nil) ;List of lexer actions in the lexical grammar being accumulated + (grammar-infos-reverse nil :type list)) ;List of grammar-infos already completed (in reverse order) + + +; Ensure that the preprocessor-state is accumulating a grammar or a lexer. +(defun preprocess-ensure-grammar (preprocessor-state) + (unless (preprocessor-state-kind preprocessor-state) + (error "No active grammar at this point"))) + + +; Finish generating the current grammar-info if one is in progress. +; Return any extra commands needed for this grammar-info. +; The result list can be mutated using nconc. +(defun preprocessor-state-finish-grammar (preprocessor-state) + (let ((kind (preprocessor-state-kind preprocessor-state))) + (and kind + (let ((parametrization (preprocessor-state-parametrization preprocessor-state)) + (start-symbol (preprocessor-state-start-symbol preprocessor-state)) + (grammar-source (nreverse (preprocessor-state-grammar-source-reverse preprocessor-state)))) + (multiple-value-bind (grammar lexer extra-commands) + (ecase kind + (:grammar + (values (make-and-compile-grammar (preprocessor-state-kind2 preprocessor-state) + parametrization start-symbol grammar-source) + nil + nil)) + (:lexer + (multiple-value-bind (lexer extra-commands) + (make-lexer-and-grammar + (preprocessor-state-kind2 preprocessor-state) + (preprocessor-state-charclasses-source preprocessor-state) + (preprocessor-state-lexer-actions-source preprocessor-state) + parametrization start-symbol grammar-source) + (values (lexer-grammar lexer) lexer extra-commands)))) + (let ((grammar-info (make-grammar-info (preprocessor-state-name preprocessor-state) grammar lexer))) + (setf (preprocessor-state-kind preprocessor-state) nil) + (setf (preprocessor-state-kind2 preprocessor-state) nil) + (setf (preprocessor-state-name preprocessor-state) nil) + (setf (preprocessor-state-parametrization preprocessor-state) nil) + (setf (preprocessor-state-start-symbol preprocessor-state) nil) + (setf (preprocessor-state-grammar-source-reverse preprocessor-state) nil) + (setf (preprocessor-state-charclasses-source preprocessor-state) nil) + (setf (preprocessor-state-lexer-actions-source preprocessor-state) nil) + (push grammar-info (preprocessor-state-grammar-infos-reverse preprocessor-state)) + (append extra-commands (list '(clear-grammar))))))))) + + +; source is a list of preprocessor directives and commands. Preprocess these commands +; and return the following results: +; a list of preprocessed commands; +; a list of grammar-infos extracted from preprocessor directives. +(defun preprocess-source (world source) + (let ((preprocessor-state (make-preprocessor-state))) + (labels + ((preprocess-one (form) + (when (consp form) + (let ((first (car form))) + (when (identifier? first) + (let* ((symbol (world-intern world first)) + (action (symbol-preprocessor-function symbol))) + (when action + (handler-bind ((error #'(lambda (condition) + (declare (ignore condition)) + (format *error-output* "~&~@<~2IWhile preprocessing: ~_~:W~:>~%" form)))) + (multiple-value-bind (preprocessed-form re-preprocess) (apply action preprocessor-state form) + (return-from preprocess-one + (if re-preprocess + (mapcan #'preprocess-one preprocessed-form) + preprocessed-form))))))))) + (list form))) + + (let* ((commands (mapcan #'preprocess-one source)) + (commands (nconc commands (preprocessor-state-finish-grammar preprocessor-state)))) + (values commands (nreverse (preprocessor-state-grammar-infos-reverse preprocessor-state))))))) + + +; Create a new world with the given name and preprocess and evaluate the given +; source commands in it. +(defun generate-world (name source) + (let ((world (init-world name))) + (multiple-value-bind (commands grammar-infos) (preprocess-source world source) + (dolist (grammar-info grammar-infos) + (clear-actions (grammar-info-grammar grammar-info))) + (setf (world-grammar-infos world) grammar-infos) + (eval-commands world commands) + world))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; PREPROCESSOR ACTIONS + + +; (define ) +; ==> +; (define nil) +; +; (define ( ( ) ... ( )) ) +; ==> +; (define (-> ( ... ) ) +; (lambda (( ) ... ( )) ) +; t) +(defun preprocess-define (preprocessor-state command name type value) + (declare (ignore preprocessor-state)) + (values (list + (if (consp name) + (let ((name (first name)) + (bindings (rest name))) + (list command + name + (list '-> (mapcar #'second bindings) type) + (list 'lambda bindings value) + t)) + (list command name type value nil))) + nil)) + + +; (action ) +; ==> +; (action nil) +; +; (action ( ( ) ... ( )) ) +; ==> +; (action (lambda (( ) ... ( )) ) t) +(defun preprocess-action (preprocessor-state command action-name production-name body) + (declare (ignore preprocessor-state)) + (values (list + (if (consp action-name) + (let ((action-name (first action-name)) + (bindings (rest action-name))) + (list command + action-name + production-name + (list 'lambda bindings body) + t)) + (list command action-name production-name body nil))) + nil)) + + +(defun preprocess-grammar-or-lexer (preprocessor-state kind kind2 name start-symbol) + (assert-type name identifier) + (let ((commands (preprocessor-state-finish-grammar preprocessor-state))) + (when (find name (preprocessor-state-grammar-infos-reverse preprocessor-state) :key #'grammar-info-name) + (error "Duplicate grammar ~S" name)) + (setf (preprocessor-state-kind preprocessor-state) kind) + (setf (preprocessor-state-kind2 preprocessor-state) kind2) + (setf (preprocessor-state-name preprocessor-state) name) + (setf (preprocessor-state-parametrization preprocessor-state) (make-grammar-parametrization)) + (setf (preprocessor-state-start-symbol preprocessor-state) start-symbol) + (values + (nconc commands (list (list 'set-grammar name))) + nil))) + + +; (grammar ) +; ==> +; grammar: +; Begin accumulating a grammar with the given name and start symbol; +; commands: +; (set-grammar ) +(defun preprocess-grammar (preprocessor-state command name kind2 start-symbol) + (declare (ignore command)) + (preprocess-grammar-or-lexer preprocessor-state :grammar kind2 name start-symbol)) + + +; (lexer ) +; ==> +; grammar: +; Begin accumulating a lexer with the given name, start symbol, charclasses, and lexer actions; +; commands: +; (set-grammar ) +(defun preprocess-lexer (preprocessor-state command name kind2 start-symbol charclasses-source lexer-actions-source) + (declare (ignore command)) + (multiple-value-prog1 + (preprocess-grammar-or-lexer preprocessor-state :lexer kind2 name start-symbol) + (setf (preprocessor-state-charclasses-source preprocessor-state) charclasses-source) + (setf (preprocessor-state-lexer-actions-source preprocessor-state) lexer-actions-source))) + + +; (grammar-argument ... ) +; ==> +; grammar parametrization: +; ( ... ) +; commands: +; (grammar-argument ... ) +(defun preprocess-grammar-argument (preprocessor-state command argument &rest attributes) + (preprocess-ensure-grammar preprocessor-state) + (grammar-parametrization-declare-argument (preprocessor-state-parametrization preprocessor-state) argument attributes) + (values (list (list* command argument attributes)) + nil)) + + +; (production ( ) ... ( )) +; ==> +; grammar: +; ( ); +; commands: +; (%rule ) +; (action ) +; ... +; (action ) +(defun preprocess-production (preprocessor-state command lhs rhs name &rest actions) + (declare (ignore command)) + (assert-type actions (list (tuple t t))) + (preprocess-ensure-grammar preprocessor-state) + (push (list lhs rhs name) (preprocessor-state-grammar-source-reverse preprocessor-state)) + (values + (cons (list '%rule lhs) + (mapcar #'(lambda (action) + (list 'action (first action) name (second action))) + actions)) + t)) + diff --git a/mozilla/js/semantics/CalculusMarkup.lisp b/mozilla/js/semantics/CalculusMarkup.lisp new file mode 100644 index 00000000000..9c64f292ac3 --- /dev/null +++ b/mozilla/js/semantics/CalculusMarkup.lisp @@ -0,0 +1,998 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; ECMAScript semantic calculus markup emitters +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; ------------------------------------------------------------------------------------------------------ +;;; SEMANTIC DEPICTION UTILITIES + +(defparameter *semantic-keywords* + '(not and or is type oneof tuple action lambda if then else in new case of end let letexc)) + +; Emit markup for one of the semantic keywords, as specified by keyword-symbol. +(defun depict-semantic-keyword (markup-stream keyword-symbol) + (assert-true (find keyword-symbol *semantic-keywords* :test #'eq)) + (depict-char-style (markup-stream :semantic-keyword) + (depict markup-stream (string-downcase (symbol-name keyword-symbol))))) + + +; If test is true, depict an opening parenthesis, evaluate body, and depict a closing +; parentheses. Otherwise, just evaluate body. +; Return the result value of body. +(defmacro depict-optional-parentheses ((markup-stream test) &body body) + (let ((temp (gensym "PAREN"))) + `(let ((,temp ,test)) + (when ,temp + (depict ,markup-stream "(")) + (prog1 + (progn ,@body) + (when ,temp + (depict ,markup-stream ")")))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; DEPICT-ENV + +; A depict-env holds state that helps in depicting a grammar or lexer. +(defstruct depict-env + (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 + (mode nil :type (member nil :syntax :semantics)) ;Current heading (:syntax or :semantics) or nil if none + (pending-actions-reverse nil :type list)) ;Reverse-order list of closures of actions pending for a %print-actions + + +(defun checked-depict-env-grammar-info (depict-env) + (or (depict-env-grammar-info depict-env) + (error "Grammar needed"))) + + +(defvar *visible-modes* t) + +; Set the mode to the given mode, emitting a heading if necessary. +(defun depict-mode (markup-stream depict-env mode) + (unless (eq mode (depict-env-mode depict-env)) + (when *visible-modes* + (ecase mode + (:syntax (depict-paragraph (markup-stream ':grammar-header) + (depict markup-stream "Syntax"))) + (:semantics (depict-paragraph (markup-stream ':grammar-header) + (depict markup-stream "Semantics"))) + ((nil)))) + (setf (depict-env-mode depict-env) mode))) + + +; Emit markup paragraphs for a command. +(defun depict-command (markup-stream world depict-env command) + (handler-bind ((error #'(lambda (condition) + (declare (ignore condition)) + (format *error-output* "~&While depicting: ~:W~%" command)))) + (let ((depictor (and (consp command) + (identifier? (first command)) + (get (world-intern world (first command)) :depict-command)))) + (if depictor + (apply depictor markup-stream world depict-env (rest command)) + (error "Bad command: ~S" command))))) + + +; Emit markup paragraphs for the world's commands. +(defun depict-world-commands (markup-stream world) + (let ((depict-env (make-depict-env))) + (dolist (command (world-commands-source world)) + (depict-command markup-stream world depict-env command)) + (depict-clear-grammar markup-stream world depict-env))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; DEPICTING TYPES + +(defconstant *type-level-min* 0) +(defconstant *type-level-suffix* 1) +(defconstant *type-level-function* 2) +(defconstant *type-level-max* 2) +;;; +;;; The level argument indicates what kinds of component types may be represented without being placed +;;; in parentheses. +;;; level kinds +;;; 0 id, oneof, tuple, (type) +;;; 1 id, oneof, tuple, (type), type[], type^ +;;; 2 id, oneof, tuple, (type), type[], type^, type x type -> type + + +; Emit markup for the name of a type, which must be a symbol. +(defun depict-type-name (markup-stream type-name) + (depict-char-style (markup-stream :type-name) + (depict markup-stream (symbol-upper-mixed-case-name type-name)))) + + +; Emit markup for the name of a tuple or oneof field, which must be a symbol. +(defun depict-field-name (markup-stream field-name) + (depict-char-style (markup-stream :field-name) + (depict markup-stream (symbol-lower-mixed-case-name field-name)))) + + +; If level < threshold, depict an opening parenthesis, evaluate body, and depict a closing +; parentheses. Otherwise, just evaluate body. +; Return the result value of body. +(defmacro depict-type-parentheses ((markup-stream level threshold) &body body) + `(depict-optional-parentheses (,markup-stream (< ,level ,threshold)) + ,@body)) + + +; Emit markup for the given type expression. level is non-nil if this is a recursive +; call to depict-type-expr for which the markup-stream's style is :type-expression. +; In this case level indicates the binding level imposed by the enclosing type expression. +(defun depict-type-expr (markup-stream world type-expr &optional level) + (cond + ((identifier? type-expr) + (depict-type-name markup-stream type-expr)) + ((type? type-expr) + (let ((type-str (print-type-to-string type-expr))) + (warn "Depicting raw type ~A" type-str) + (depict markup-stream "<<<" type-str ">>>"))) + (t (let ((depictor (get (world-intern world (first type-expr)) :depict-type-constructor))) + (if level + (apply depictor markup-stream world level (rest type-expr)) + (depict-char-style (markup-stream :type-expression) + (apply depictor markup-stream world *type-level-max* (rest type-expr)))))))) + + +; (-> ( ... ) ) +; Level 2 +; "@1 x ... x @1 -> @1" +(defun depict--> (markup-stream world level arg-type-exprs result-type-expr) + (depict-type-parentheses (markup-stream level *type-level-function*) + (depict-list markup-stream + #'(lambda (markup-stream arg-type-expr) + (depict-type-expr markup-stream world arg-type-expr *type-level-suffix*)) + arg-type-exprs + :separator '(" " :cartesian-product-10 " ") + :empty "()") + (depict markup-stream " " :function-arrow-10 " ") + (depict-type-expr markup-stream world result-type-expr *type-level-suffix*))) + + +; (vector ) +; Level 1 +; "@1[]" +(defun depict-vector (markup-stream world level element-type-expr) + (depict-type-parentheses (markup-stream level *type-level-suffix*) + (depict-type-expr markup-stream world element-type-expr *type-level-suffix*) + (depict markup-stream "[]"))) + + +; (address ) +; Level 1 +; "@1^" +(defun depict-address (markup-stream world level element-type-expr) + (depict-type-parentheses (markup-stream level *type-level-suffix*) + (depict-type-expr markup-stream world element-type-expr *type-level-suffix*) + (depict markup-stream :up-arrow-10))) + + +(defun depict-tuple-or-oneof (markup-stream world keyword-symbol tag-pairs) + (depict-semantic-keyword markup-stream keyword-symbol) + (depict-list + markup-stream + #'(lambda (markup-stream tag-pair) + (if (identifier? tag-pair) + (depict-field-name markup-stream tag-pair) + (progn + (depict-field-name markup-stream (first tag-pair)) + (depict markup-stream ": ") + (depict-type-expr markup-stream world (second tag-pair) *type-level-function*)))) + tag-pairs + :indent 6 + :prefix " {" + :prefix-break 0 + :suffix "}" + :separator ";" + :break 1 + :empty nil)) + +; (oneof ( ) ... ( )) +; Level 0 +; "ONEOF{: @0; ...; :@0}" +(defun depict-oneof (markup-stream world level &rest tags-and-types) + (declare (ignore level)) + (depict-tuple-or-oneof markup-stream world 'oneof tags-and-types)) + +; (tuple ( ) ... ( )) +; Level 0 +; "TUPLE{: @0; ...; :@0}" +(defun depict-tuple (markup-stream world level &rest tags-and-types) + (declare (ignore level)) + (depict-tuple-or-oneof markup-stream world 'tuple tags-and-types)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; DEPICTING EXPRESSIONS + + +(defconstant *primitive-level-min* 0) +(defconstant *primitive-level-unary-suffix* 1) +(defconstant *primitive-level-unary-prefix* 2) +(defconstant *primitive-level-unary* 3) +(defconstant *primitive-level-multiplicative* 4) +(defconstant *primitive-level-additive* 5) +(defconstant *primitive-level-relational* 6) +(defconstant *primitive-level-logical* 7) +(defconstant *primitive-level-unparenthesized-new* 8) +(defconstant *primitive-level-expr* 9) +(defconstant *primitive-level-stmt* 10) +(defconstant *primitive-level-max* 10) +;;; +;;; The level argument indicates what kinds of subexpressions may be represented without being placed +;;; in parentheses (or on a separate line for the case of lambda and if/then/else). +;;; level kinds +;;; 0 id, constant, (e) +;;; 1 id, constant, (e), f(...), new(v), a[i] +;;; 2 id, constant, (e), -e, @ +;;; 3 id, constant, (e), f(...), new(v), a[i], -e, @ +;;; 4 id, constant, (e), f(...), new(v), a[i], -e, @, /, * +;;; 5 id, constant, (e), f(...), new(v), a[i], -e, @, /, *, +, - +;;; 6 id, constant, (e), f(...), new(v), a[i], -e, @, /, *, +, -, relationals +;;; 7 id, constant, (e), f(...), new(v), a[i], -e, @, /, *, +, -, relationals, logicals +;;; 8 id, constant, (e), f(...), new(v), a[i], -e, @, /, *, +, -, relationals, logicals, new v +;;; 9 id, constant, (e), f(...), new(v), a[i], -e, @, /, *, +, -, relationals, logicals, new v +;;; 10 id, constant, (e), f(...), new(v), a[i], -e, @, /, *, +, -, relationals, logicals, new v, :=, lambda, if/then/else + +; Return true if primitive-level1 is a superset of primitive-level2 +; in the partial order of primitive levels. +(defun primitive-level->= (primitive-level1 primitive-level2) + (and (>= primitive-level1 primitive-level2) + (or (/= primitive-level1 *primitive-level-unary-prefix*) + (/= primitive-level2 *primitive-level-unary-suffix*)))) + + +; If primitive-level is not a superset of threshold, depict an opening parenthesis, +; evaluate body, and depict a closing parentheses. Otherwise, just evaluate body. +; Return the result value of body. +(defmacro depict-expr-parentheses ((markup-stream primitive-level threshold) &body body) + `(depict-optional-parentheses (,markup-stream (not (primitive-level->= ,primitive-level ,threshold))) + ,@body)) + + +; Emit markup for the name of a global variable, which must be a symbol. +(defun depict-global-variable (markup-stream name) + (depict-char-style (markup-stream :global-variable) + (depict markup-stream (symbol-lower-mixed-case-name name)))) + + +; Emit markup for the name of a local variable, which must be a symbol. +(defun depict-local-variable (markup-stream name) + (depict-char-style (markup-stream :local-variable) + (depict markup-stream (symbol-lower-mixed-case-name name)))) + + +; Emit markup for the name of an action, which must be a symbol. +(defun depict-action-name (markup-stream action-name) + (depict-char-style (markup-stream :action-name) + (depict markup-stream (symbol-upper-mixed-case-name action-name)))) + + +; Emit markup for the value constant. +(defun depict-constant (markup-stream constant) + (cond + ((integerp constant) + (depict-integer markup-stream constant)) + ((floatp constant) + (depict markup-stream (format nil (if (= constant (floor constant 1)) "~,1F" "~F") constant))) + ((characterp constant) + (depict markup-stream ':left-single-quote) + (depict-char-style (markup-stream ':character-literal) + (depict-character markup-stream constant nil)) + (depict markup-stream ':right-single-quote)) + ((stringp constant) + (depict-string markup-stream constant)) + (t (error "Bad constant ~S" constant)))) + + +; Emit markup for the primitive when it is not called in a function call. +(defun depict-primitive (markup-stream primitive) + (unless (eq (primitive-appearance primitive) ':global) + (error "Can't depict primitive ~S outside a call" primitive)) + (depict-item-or-group-list markup-stream (primitive-markup1 primitive))) + + +; Emit markup for the parameters to a function call. +(defun depict-call-parameters (markup-stream world annotated-parameters) + (depict-list markup-stream + #'(lambda (markup-stream parameter) + (depict-annotated-value-expr markup-stream world parameter)) + annotated-parameters + :indent 4 + :prefix "(" + :prefix-break 0 + :suffix ")" + :separator "," + :break 1 + :empty nil)) + + +; Emit markup for the function or primitive call. level indicates the binding level imposed +; by the enclosing expression. +(defun depict-call (markup-stream world level annotated-function-expr &rest annotated-arg-exprs) + (if (eq (first annotated-function-expr) 'expr-annotation:primitive) + (let ((primitive (symbol-primitive (second annotated-function-expr)))) + (depict-expr-parentheses (markup-stream level (primitive-level primitive)) + (ecase (primitive-appearance primitive) + (:global + (depict-primitive markup-stream primitive) + (depict-call-parameters markup-stream world annotated-arg-exprs)) + (:infix + (assert-true (= (length annotated-arg-exprs) 2)) + (depict-logical-block (markup-stream 0) + (depict-annotated-value-expr markup-stream world (first annotated-arg-exprs) (primitive-level1 primitive)) + (let ((spaces (primitive-markup2 primitive))) + (when spaces + (depict-space markup-stream)) + (depict-item-or-group-list markup-stream (primitive-markup1 primitive)) + (depict-break markup-stream (if spaces 1 0))) + (depict-annotated-value-expr markup-stream world (second annotated-arg-exprs) (primitive-level2 primitive)))) + (:unary + (assert-true (= (length annotated-arg-exprs) 1)) + (depict-item-or-group-list markup-stream (primitive-markup1 primitive)) + (depict-annotated-value-expr markup-stream world (first annotated-arg-exprs) (primitive-level1 primitive)) + (depict-item-or-group-list markup-stream (primitive-markup2 primitive))) + (:phantom + (assert-true (= (length annotated-arg-exprs) 1)) + (depict-annotated-value-expr markup-stream world (first annotated-arg-exprs) level))))) + (depict-expr-parentheses (markup-stream level *primitive-level-unary-suffix*) + (depict-annotated-value-expr markup-stream world annotated-function-expr *primitive-level-unary-suffix*) + (depict-call-parameters markup-stream world annotated-arg-exprs)))) + + +; Emit markup for the reference to the action on the given general grammar symbol. +(defun depict-action-reference (markup-stream action-name general-grammar-symbol &optional index) + (depict-action-name markup-stream action-name) + (depict markup-stream :action-begin) + (depict-general-grammar-symbol markup-stream general-grammar-symbol index) + (depict markup-stream :action-end)) + + +; Emit markup for the given annotated value expression. level indicates the binding level imposed +; by the enclosing expression. +(defun depict-annotated-value-expr (markup-stream world annotated-expr &optional (level *primitive-level-expr*)) + (let ((annotation (first annotated-expr)) + (args (rest annotated-expr))) + (ecase annotation + (expr-annotation:constant (depict-constant markup-stream (first args))) + (expr-annotation:primitive (depict-primitive markup-stream (symbol-primitive (first args)))) + (expr-annotation:local (depict-local-variable markup-stream (first args))) + (expr-annotation:global (depict-global-variable markup-stream (first args))) + (expr-annotation:call (apply #'depict-call markup-stream world level args)) + (expr-annotation:action (apply #'depict-action-reference markup-stream args)) + (expr-annotation:special-form + (apply (get (first args) :depict-special-form) markup-stream world level (rest args))) + (expr-annotation:macro + (let ((depictor (get (first args) :depict-macro))) + (if depictor + (apply depictor markup-stream world level (rest args)) + (depict-annotated-value-expr markup-stream world (second args) level))))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; DEPICTING SPECIAL FORMS + +(defmacro depict-statement ((markup-stream keyword &optional (space t)) &body body) + `(depict-logical-block (,markup-stream 0) + (when (< level *primitive-level-stmt*) + (depict-break ,markup-stream)) + (depict-expr-parentheses (,markup-stream level *primitive-level-stmt*) + (depict-semantic-keyword ,markup-stream ,keyword) + ,@(and space `((depict-space ,markup-stream))) + ,@body))) + + +; (bottom ) +(defun depict-bottom (markup-stream world level type-expr) + (declare (ignore world level type-expr)) + (depict markup-stream ':bottom-10)) + + +(defun depict-lambda-bindings (markup-stream world arg-binding-exprs) + (depict-list markup-stream + #'(lambda (markup-stream arg-binding) + (depict-local-variable markup-stream (first arg-binding)) + (depict markup-stream ": ") + (depict-type-expr markup-stream world (second arg-binding))) + arg-binding-exprs + :prefix "(" + :suffix ")" + :separator ", " + :empty nil)) + +; (lambda (( [:unused]) ... ( [:unused])) ) +(defun depict-lambda (markup-stream world level arg-binding-exprs body-annotated-expr) + (depict-statement (markup-stream 'lambda nil) + (depict-lambda-bindings markup-stream world arg-binding-exprs) + (depict-logical-block (markup-stream 4) + (depict-break markup-stream) + (depict-annotated-value-expr markup-stream world body-annotated-expr *primitive-level-stmt*)))) + + +; (if ) +(defun depict-if (markup-stream world level condition-annotated-expr true-annotated-expr false-annotated-expr) + (depict-statement (markup-stream 'if) + (depict-logical-block (markup-stream 4) + (depict-annotated-value-expr markup-stream world condition-annotated-expr)) + (depict-break markup-stream) + (depict-semantic-keyword markup-stream 'then) + (depict-space markup-stream) + (depict-logical-block (markup-stream 7) + (depict-annotated-value-expr markup-stream world true-annotated-expr *primitive-level-stmt*)) + (depict-break markup-stream) + (depict-semantic-keyword markup-stream 'else) + (depict-space markup-stream) + (depict-logical-block (markup-stream (if (special-form-annotated-expr? 'if false-annotated-expr) nil 6)) + (depict-annotated-value-expr markup-stream world false-annotated-expr *primitive-level-stmt*)))) + + +;;; Vectors + +; (vector ... ) +(defun depict-vector-form (markup-stream world level &rest element-annotated-exprs) + (declare (ignore level)) + (depict-list markup-stream + #'(lambda (markup-stream element-annotated-expr) + (depict-annotated-value-expr markup-stream world element-annotated-expr)) + element-annotated-exprs + :indent 1 + :prefix ':vector-begin + :suffix ':vector-end + :separator "," + :break 1)) + + +(defun depict-subscript-type-expr (markup-stream world type-expr) + (depict-char-style (markup-stream 'sub) + (depict-type-expr markup-stream world type-expr))) + + +; (vector-of ) +(defun depict-vector-of (markup-stream world level element-type-expr) + (declare (ignore level)) + (depict markup-stream ':empty-vector) + (depict-subscript-type-expr markup-stream world element-type-expr)) + + +(defun depict-special-function (markup-stream world name-str &rest arg-annotated-exprs) + (depict-char-style (markup-stream :global-variable) + (depict markup-stream name-str)) + (depict-call-parameters markup-stream world arg-annotated-exprs)) + + +; (empty ) +(defun depict-empty (markup-stream world level vector-annotated-expr) + (declare (ignore level)) + (depict-special-function markup-stream world "empty" vector-annotated-expr)) + + +; (length ) +(defun depict-length (markup-stream world level vector-annotated-expr) + (declare (ignore level)) + (depict-special-function markup-stream world "length" vector-annotated-expr)) + + +; (first ) +(defun depict-first (markup-stream world level vector-annotated-expr) + (declare (ignore level)) + (depict-special-function markup-stream world "first" vector-annotated-expr)) + + +; (last ) +(defun depict-last (markup-stream world level vector-annotated-expr) + (declare (ignore level)) + (depict-special-function markup-stream world "last" vector-annotated-expr)) + + +; (rest ) +(defun depict-rest (markup-stream world level vector-annotated-expr) + (declare (ignore level)) + (depict-special-function markup-stream world "rest" vector-annotated-expr)) + + +; (butlast ) +(defun depict-butlast (markup-stream world level vector-annotated-expr) + (declare (ignore level)) + (depict-special-function markup-stream world "butLast" vector-annotated-expr)) + + +; (nth ) +(defun depict-nth (markup-stream world level vector-annotated-expr n-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-unary-suffix*) + (depict-annotated-value-expr markup-stream world vector-annotated-expr *primitive-level-unary-suffix*) + (depict markup-stream "[") + (depict-annotated-value-expr markup-stream world n-annotated-expr) + (depict markup-stream "]"))) + + +; (append ) +(defun depict-append (markup-stream world level vector1-annotated-expr vector2-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-additive*) + (depict-logical-block (markup-stream 0) + (depict-annotated-value-expr markup-stream world vector1-annotated-expr *primitive-level-additive*) + (depict markup-stream " " :vector-append) + (depict-break markup-stream 1) + (depict-annotated-value-expr markup-stream world vector2-annotated-expr *primitive-level-additive*)))) + + +;;; Oneofs + +; (oneof ) +(defun depict-oneof-form (markup-stream world level tag &optional value-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-unary-prefix*) + (depict-field-name markup-stream tag) + (when value-annotated-expr + (depict-logical-block (markup-stream 4) + (depict-break markup-stream 1) + (depict-annotated-value-expr markup-stream world value-annotated-expr *primitive-level-unary*))))) + + +; (typed-oneof ) +(defun depict-typed-oneof (markup-stream world level type-expr tag &optional value-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-unary-prefix*) + (depict-field-name markup-stream tag) + (depict-subscript-type-expr markup-stream world type-expr) + (when value-annotated-expr + (depict-logical-block (markup-stream 4) + (depict-break markup-stream 1) + (depict-annotated-value-expr markup-stream world value-annotated-expr *primitive-level-unary*))))) + + +; (case ( ) ( ) ... ( )) +; where each is either (( ... ) nil nil) or (() ) +(defun depict-case (markup-stream world level oneof-annotated-expr &rest annotated-cases) + (depict-statement (markup-stream 'case) + (depict-logical-block (markup-stream 6) + (depict-annotated-value-expr markup-stream world oneof-annotated-expr)) + (depict-space markup-stream) + (depict-semantic-keyword markup-stream 'of) + (depict-logical-block (markup-stream 3) + (mapl #'(lambda (annotated-cases) + (let* ((annotated-case (first annotated-cases)) + (tag-spec (first annotated-case)) + (tags (first tag-spec)) + (var (second tag-spec)) + (value-annotated-expr (second annotated-case))) + (depict-break markup-stream) + (depict-logical-block (markup-stream 6) + (depict-list markup-stream + #'depict-field-name + tags + :indent 0 + :separator "," + :break 1) + (when var + (depict markup-stream "(") + (depict-local-variable markup-stream var) + (depict markup-stream ": ") + (depict-type-expr markup-stream world (third tag-spec)) + (depict markup-stream ")")) + (depict markup-stream ":") + (depict-break markup-stream 1) + (depict-annotated-value-expr markup-stream world value-annotated-expr *primitive-level-stmt*) + (when (cdr annotated-cases) + (depict markup-stream ";"))))) + annotated-cases) + (depict-break markup-stream) + (depict-semantic-keyword markup-stream 'end)))) + + +; (select ) +; (& ) +(defun depict-select-or-& (markup-stream world level tag annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-unary-suffix*) + (depict-annotated-value-expr markup-stream world annotated-expr *primitive-level-unary-suffix*) + (depict markup-stream ".") + (depict-field-name markup-stream tag))) + + +; (is ) +(defun depict-is (markup-stream world level tag oneof-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-relational*) + (depict-annotated-value-expr markup-stream world oneof-annotated-expr *primitive-level-unary-suffix*) + (depict-space markup-stream) + (depict-semantic-keyword markup-stream 'is) + (depict-space markup-stream) + (depict-field-name markup-stream tag))) + + +;;; Tuples + +; (tuple ... ) +(defun depict-tuple-form (markup-stream world level type-expr &rest annotated-exprs) + (declare (ignore level)) + (depict-list markup-stream + #'(lambda (markup-stream parameter) + (depict-annotated-value-expr markup-stream world parameter)) + annotated-exprs + :indent 4 + :prefix ':tuple-begin + :prefix-break 0 + :suffix ':tuple-end + :separator "," + :break 1 + :empty nil) + (depict-subscript-type-expr markup-stream world type-expr)) + + +;;; Addresses + +; (new ) +(defun depict-new (markup-stream world level value-annotated-expr) + (depict-logical-block (markup-stream 5) + (depict-semantic-keyword markup-stream 'new) + (depict-space markup-stream) + (depict-expr-parentheses (markup-stream level *primitive-level-unparenthesized-new*) + (depict-annotated-value-expr markup-stream world value-annotated-expr + (if (< level *primitive-level-unparenthesized-new*) + *primitive-level-expr* + *primitive-level-unary-prefix*))))) + + +; (@ ) +(defun depict-@ (markup-stream world level address-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-unary-prefix*) + (depict-logical-block (markup-stream 2) + (depict markup-stream "@") + (depict-annotated-value-expr markup-stream world address-annotated-expr *primitive-level-unary-prefix*)))) + + +; (@= ) +(defun depict-@= (markup-stream world level address-annotated-expr value-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-stmt*) + (depict-logical-block (markup-stream 0) + (depict markup-stream "@") + (depict-annotated-value-expr markup-stream world address-annotated-expr *primitive-level-unary-prefix*) + (depict markup-stream " :=") + (depict-logical-block (markup-stream 6) + (depict-break markup-stream 1) + (depict-annotated-value-expr markup-stream world value-annotated-expr *primitive-level-stmt*))))) + + +; (address-equal ) +(defun depict-address-equal (markup-stream world level address1-annotated-expr address2-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-relational*) + (depict-logical-block (markup-stream 0) + (depict-annotated-value-expr markup-stream world address1-annotated-expr *primitive-level-additive*) + (depict markup-stream " " :identical-10) + (depict-break markup-stream 1) + (depict-annotated-value-expr markup-stream world address2-annotated-expr *primitive-level-additive*)))) + + +;;; Macros + +(defun depict-let-binding (markup-stream world var type-expr value-annotated-expr) + (depict-logical-block (markup-stream 4) + (depict-local-variable markup-stream var) + (depict markup-stream ": ") + (depict-type-expr markup-stream world type-expr) + (depict-break markup-stream 1) + (depict-logical-block (markup-stream 3) + (depict markup-stream "= ") + (depict-annotated-value-expr markup-stream world value-annotated-expr *primitive-level-stmt*)))) + + +(defun depict-let-body (markup-stream world body-annotated-expr) + (depict-break markup-stream) + (depict-semantic-keyword markup-stream 'in) + (depict-space markup-stream) + (depict-logical-block (markup-stream (if (or (macro-annotated-expr? 'let body-annotated-expr) + (macro-annotated-expr? 'letexc body-annotated-expr)) + nil + 4)) + (depict-annotated-value-expr markup-stream world body-annotated-expr *primitive-level-stmt*))) + + +; (let (( [:unused]) ... ( [:unused])) ) ==> +; ((lambda (( [:unused]) ... ( [:unused])) ) ... ) +(defun depict-let (markup-stream world level annotated-expansion) + (assert-true (eq (first annotated-expansion) 'expr-annotation:call)) + (let ((lambda-annotated-expr (second annotated-expansion)) + (arg-annotated-exprs (cddr annotated-expansion))) + (assert-true (special-form-annotated-expr? 'lambda lambda-annotated-expr)) + (let ((arg-binding-exprs (third lambda-annotated-expr)) + (body-annotated-expr (fourth lambda-annotated-expr))) + (depict-statement (markup-stream 'let) + (depict-list markup-stream + #'(lambda (markup-stream arg-binding) + (depict-let-binding markup-stream world (first arg-binding) (second arg-binding) (pop arg-annotated-exprs))) + arg-binding-exprs + :indent 4 + :separator ";" + :break t + :empty nil) + (depict-let-body markup-stream world body-annotated-expr))))) + + +; (letexc ( [:unused]) ) ==> +; (case +; ((abrupt x exception) (typed-oneof abrupt x)) +; ((normal [:unused]) ))) +(defun depict-letexc (markup-stream world level annotated-expansion) + (assert-true (special-form-annotated-expr? 'case annotated-expansion)) + (let* ((expr-annotated-expr (third annotated-expansion)) + (abrupt-binding (fourth annotated-expansion)) + (abrupt-tag-spec (first abrupt-binding)) + (normal-binding (fifth annotated-expansion)) + (normal-tag-spec (first normal-binding))) + (assert-true (equal (first abrupt-tag-spec) '(abrupt))) + (assert-true (equal (first normal-tag-spec) '(normal))) + (let* ((var (second normal-tag-spec)) + (type-expr (third normal-tag-spec)) + (body-annotated-expr (second normal-binding))) + (depict-statement (markup-stream 'letexc) + (depict-logical-block (markup-stream 9) + (depict-let-binding markup-stream world var type-expr expr-annotated-expr)) + (depict-let-body markup-stream world body-annotated-expr))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; DEPICTING COMMANDS + + +(defmacro depict-semantics ((markup-stream depict-env &optional (paragraph-style ':semantics)) &body body) + `(progn + (depict-mode ,markup-stream ,depict-env :semantics) + (depict-paragraph (,markup-stream ,paragraph-style) + ,@body))) + + +; (%section "section-name") +(defun depict-%section (markup-stream world depict-env section-name) + (declare (ignore world)) + (assert-type section-name string) + (depict-mode markup-stream depict-env nil) + (depict-paragraph (markup-stream :section-heading) + (depict markup-stream section-name))) + + +; (%subsection "subsection-name") +(defun depict-%subsection (markup-stream world depict-env section-name) + (declare (ignore world)) + (assert-type section-name string) + (depict-mode markup-stream depict-env nil) + (depict-paragraph (markup-stream :subsection-heading) + (depict markup-stream section-name))) + + +; (grammar-argument ... ) +(defun depict-grammar-argument (markup-stream world depict-env argument &rest attributes) + (declare (ignore world)) + (depict-mode markup-stream depict-env :syntax) + (depict-paragraph (markup-stream :grammar-argument) + (depict-nonterminal-argument markup-stream argument) + (depict markup-stream " " :member-10 " ") + (depict-list markup-stream + #'(lambda (markup-stream attribute) + (depict-nonterminal-attribute markup-stream attribute)) + attributes + :prefix "{" + :suffix "}" + :separator ", "))) + + +; (%rule ) +(defun depict-%rule (markup-stream world depict-env general-nonterminal-source) + (declare (ignore world)) + (let* ((grammar-info (checked-depict-env-grammar-info depict-env)) + (grammar (grammar-info-grammar grammar-info)) + (general-nonterminal (grammar-parametrization-intern grammar general-nonterminal-source)) + (seen-nonterminals (depict-env-seen-nonterminals depict-env))) + (when (grammar-info-charclass grammar-info general-nonterminal) + (error "Shouldn't use %rule on a lexer charclass nonterminal ~S" general-nonterminal)) + (labels + ((seen-nonterminal? (nonterminal) + (gethash nonterminal seen-nonterminals))) + (unless (every #'seen-nonterminal? (general-grammar-symbol-instances grammar general-nonterminal)) + (depict-mode markup-stream depict-env :syntax) + (dolist (general-rule (grammar-general-rules grammar general-nonterminal)) + (let ((rule-lhs-nonterminals (general-grammar-symbol-instances grammar (general-rule-lhs general-rule)))) + (unless (every #'seen-nonterminal? rule-lhs-nonterminals) + (when (some #'seen-nonterminal? rule-lhs-nonterminals) + (warn "General rule for ~S listed before specific ones; use %rule to disambiguate" general-nonterminal)) + (depict-general-rule markup-stream general-rule) + (dolist (nonterminal rule-lhs-nonterminals) + (setf (gethash nonterminal seen-nonterminals) t))))))))) +;******** May still have a problem when a specific rule precedes a general one. + + +; (%charclass ) +(defun depict-%charclass (markup-stream world depict-env nonterminal) + (let* ((grammar-info (checked-depict-env-grammar-info depict-env)) + (charclass (grammar-info-charclass grammar-info nonterminal))) + (unless charclass + (error "%charclass with a non-charclass ~S" nonterminal)) + (if (gethash nonterminal (depict-env-seen-nonterminals depict-env)) + (warn "Duplicate charclass ~S" nonterminal) + (progn + (depict-mode markup-stream depict-env :syntax) + (depict-charclass markup-stream charclass) + (dolist (action-cons (charclass-actions charclass)) + (depict-charclass-action world depict-env (cdr action-cons) nonterminal)) + (setf (gethash nonterminal (depict-env-seen-nonterminals depict-env)) t))))) + + +; (%print-actions) +(defun depict-%print-actions (markup-stream world depict-env) + (declare (ignore world)) + (dolist (pending-action (nreverse (depict-env-pending-actions-reverse depict-env))) + (funcall pending-action markup-stream depict-env)) + (setf (depict-env-pending-actions-reverse depict-env) nil)) + + +; (deftype ) +(defun depict-deftype (markup-stream world depict-env name type-expr) + (depict-semantics (markup-stream depict-env) + (depict-logical-block (markup-stream 2) + (depict-semantic-keyword markup-stream 'type) + (depict-space markup-stream) + (depict-type-name markup-stream name) + (depict-break markup-stream 1) + (depict-logical-block (markup-stream 3) + (depict markup-stream "= ") + (depict-type-expr markup-stream world type-expr))))) + + +; (define ) +; is a flag that is true if this define was originally in the form +; (define ( ( ) ... ( )) ) +; and converted into +; (define (-> ( ... ) ) +; (lambda (( ) ... ( )) ) +; t) +(defun depict-define (markup-stream world depict-env name type-expr value-expr destructured) + (depict-semantics (markup-stream depict-env) + (depict-logical-block (markup-stream 2) + (depict-global-variable markup-stream name) + (flet + ((depict-type-and-value (markup-stream type-expr annotated-value-expr) + (depict-logical-block (markup-stream 0) + (depict-break markup-stream 1) + (depict markup-stream ": ") + (depict-type-expr markup-stream world type-expr)) + (depict-break markup-stream 1) + (depict-logical-block (markup-stream 3) + (depict markup-stream "= ") + (depict-annotated-value-expr markup-stream world annotated-value-expr *primitive-level-max*)))) + + (let ((annotated-value-expr (nth-value 2 (scan-value world *null-type-env* value-expr)))) + (if destructured + (progn + (assert-true (eq (first type-expr) '->)) + (assert-true (special-form-annotated-expr? 'lambda annotated-value-expr)) + (depict-lambda-bindings markup-stream world (third annotated-value-expr)) + (depict-type-and-value markup-stream (third type-expr) (fourth annotated-value-expr))) + (depict-type-and-value markup-stream type-expr annotated-value-expr))))))) + + +; (set-grammar ) +(defun depict-set-grammar (markup-stream world depict-env name) + (depict-clear-grammar markup-stream world depict-env) + (let ((grammar-info (world-grammar-info world name))) + (unless grammar-info + (error "Unknown grammar ~A" name)) + (setf (depict-env-grammar-info depict-env) grammar-info) + (setf (depict-env-seen-nonterminals depict-env) (make-hash-table :test #'eq)))) + + +; (clear-grammar) +(defun depict-clear-grammar (markup-stream world depict-env) + (depict-%print-actions markup-stream world depict-env) + (depict-mode markup-stream depict-env nil) + (let ((grammar-info (depict-env-grammar-info depict-env))) + (when grammar-info + (let ((seen-nonterminals (depict-env-seen-nonterminals depict-env)) + (missed-nonterminals nil)) + (dolist (nonterminal (grammar-nonterminals-list (grammar-info-grammar grammar-info))) + (unless (or (gethash nonterminal seen-nonterminals) + (eq nonterminal *start-nonterminal*)) + (push nonterminal missed-nonterminals))) + (when missed-nonterminals + (warn "Nonterminals not printed: ~S" missed-nonterminals))) + (setf (depict-env-grammar-info depict-env) nil) + (setf (depict-env-seen-nonterminals depict-env) nil)))) + + +(defmacro depict-delayed-action ((markup-stream depict-env) &body depictor) + `(push #'(lambda (,markup-stream ,depict-env) ,@depictor) + (depict-env-pending-actions-reverse ,depict-env))) + + +(defun depict-declare-action-contents (markup-stream world action-name general-grammar-symbol type-expr) + (depict-semantic-keyword markup-stream 'action) + (depict-space markup-stream) + (depict-action-name markup-stream action-name) + (depict markup-stream :action-begin) + (depict-general-grammar-symbol markup-stream general-grammar-symbol) + (depict markup-stream :action-end) + (depict-break markup-stream 1) + (depict-logical-block (markup-stream 2) + (depict markup-stream ": ") + (depict-type-expr markup-stream world type-expr))) + + +; (declare-action ) +(defun depict-declare-action (markup-stream world depict-env action-name general-grammar-symbol-source type-expr) + (declare (ignore markup-stream)) + (let* ((grammar-info (checked-depict-env-grammar-info depict-env)) + (general-grammar-symbol (grammar-parametrization-intern (grammar-info-grammar grammar-info) general-grammar-symbol-source))) + (unless (grammar-info-charclass-or-partition grammar-info general-grammar-symbol) + (depict-delayed-action (markup-stream depict-env) + (depict-semantics (markup-stream depict-env) + (depict-logical-block (markup-stream 4) + (depict-declare-action-contents markup-stream world action-name general-grammar-symbol type-expr))))))) + + +; Declare and define the lexer-action on the charclass given by nonterminal. +(defun depict-charclass-action (world depict-env lexer-action nonterminal) + (depict-delayed-action (markup-stream depict-env) + (depict-semantics (markup-stream depict-env) + (depict-logical-block (markup-stream 4) + (depict-declare-action-contents markup-stream world (lexer-action-name lexer-action) + nonterminal (lexer-action-type-expr lexer-action)) + (depict-break markup-stream 1) + (depict-logical-block (markup-stream 3) + (depict markup-stream "= ") + (depict-lexer-action markup-stream lexer-action nonterminal)))))) + + +; (action ) +; is a flag that is true if this define was originally in the form +; (action ( ( ) ... ( )) ) +; and converted into +; (action (lambda (( ) ... ( )) ) t) +(defun depict-action (markup-stream world depict-env action-name production-name body-expr destructured) + (declare (ignore markup-stream)) + (let* ((grammar-info (checked-depict-env-grammar-info depict-env)) + (grammar (grammar-info-grammar grammar-info)) + (general-production (grammar-general-production grammar production-name))) + (unless (grammar-info-charclass grammar-info (general-production-lhs general-production)) + (depict-delayed-action (markup-stream depict-env) + (depict-semantics (markup-stream depict-env :semantics-next) + (depict-logical-block (markup-stream 2) + (let* ((initial-env (general-production-action-env grammar general-production)) + (body-annotated-expr (nth-value 2 (scan-value world initial-env body-expr))) + (action-grammar-symbols (annotated-expr-grammar-symbols body-annotated-expr))) + (depict-action-name markup-stream action-name) + (depict markup-stream :action-begin) + (depict-general-production markup-stream general-production action-grammar-symbols) + (depict markup-stream :action-end) + (flet + ((depict-body (markup-stream body-annotated-expr) + (depict-break markup-stream 1) + (depict-logical-block (markup-stream 3) + (depict markup-stream "= ") + (depict-annotated-value-expr markup-stream world body-annotated-expr *primitive-level-stmt*)))) + + (if destructured + (progn + (assert-true (special-form-annotated-expr? 'lambda body-annotated-expr)) + (depict-logical-block (markup-stream 10) + (depict-break markup-stream 0) + (depict-lambda-bindings markup-stream world (third body-annotated-expr))) + (depict-body markup-stream (fourth body-annotated-expr))) + (depict-body markup-stream body-annotated-expr)))))))))) + + +; (terminal-action ) +(defun depict-terminal-action (markup-stream world depict-env action-name terminal function-name) + (declare (ignore markup-stream world depict-env action-name terminal function-name))) diff --git a/mozilla/js/semantics/ECMA Grammar.html b/mozilla/js/semantics/ECMA Grammar.html new file mode 100644 index 00000000000..4ea97edbcd3 --- /dev/null +++ b/mozilla/js/semantics/ECMA Grammar.html @@ -0,0 +1,3059 @@ + + + +ECMA Grammar + + + + +

Types

+ +

Semantics

+ +

type Value
+  = oneof {
+           undefinedValue;
+           nullValue;
+           booleanValueBoolean;
+           doubleValueDouble;
+           stringValueString;
+           objectValueObject}

+ +

type ObjectOrNull = oneof {nullObjectOrNullobjectObjectOrNullObject}

+ +

type Object
+  = tuple {
+           propertiesProperty[]­;
+           typeofNameString;
+           prototypeObjectOrNull;
+           getPropName ® ValueOrException;
+           putPropName × Value ® VoidOrException;
+           deletePropName ® BooleanOrException;
+           callObjectOrNull × Value[] ® ReferenceOrException;
+           constructValue[] ® ObjectOrException;
+           defaultValueDefaultValueHint ® ValueOrException}

+ +

type DefaultValueHint = oneof {noHintnumberHintstringHint}

+ +

type Property
+  = tuple {
+           nameString;
+           readOnlyBoolean;
+           enumerableBoolean;
+           permanentBoolean;
+           valueValue­}

+ +

type PropName = String

+ +

type Place = tuple {baseObjectpropertyPropName}

+ +

type Reference
+  = oneof {valueReferenceValueplaceReferencePlacevirtualReferencePropName}

+ +

type IntegerOrException = oneof {normalIntegerabruptException}

+ +

type VoidOrException = oneof {normalabruptException}

+ +

type BooleanOrException = oneof {normalBooleanabruptException}

+ +

type DoubleOrException = oneof {normalDoubleabruptException}

+ +

type StringOrException = oneof {normalStringabruptException}

+ +

type ObjectOrException = oneof {normalObjectabruptException}

+ +

type ValueOrException = oneof {normalValueabruptException}

+ +

type ReferenceOrException = oneof {normalReferenceabruptException}

+ +

type ValueListOrException = oneof {normalValue[]; abruptException}

+ +

Helper Functions

+ +

Semantics

+ +

objectOrNullToValue(oObjectOrNull) : Value
+  = case o of
+        nullObjectOrNullnullValue;
+        objectObjectOrNull(objObject): objectValue obj
+        end

+ +

undefinedResult : ValueOrException = normal undefinedValue

+ +

nullResult : ValueOrException = normal nullValue

+ +

booleanResult(bBoolean) : ValueOrException = normal booleanValue b

+ +

doubleResult(dDouble) : ValueOrException = normal doubleValue d

+ +

integerResult(iInteger) : ValueOrException = doubleResult(rationalToDouble(i))

+ +

stringResult(sString) : ValueOrException = normal stringValue s

+ +

objectResult(oObject) : ValueOrException = normal objectValue o

+ +

Exceptions

+ +

Semantics

+ +

type Exception = oneof {exceptionValueerrorError}

+ +

type Error
+  = oneof {
+           coerceToPrimitiveError;
+           coerceToObjectError;
+           getValueError;
+           putValueError;
+           deleteError}

+ +

makeError(errError) : Exception = error err

+ +

Objects

+ +

Conversions

+ +

Semantics

+ +

referenceGetValue(rvReference) : ValueOrException
+  = case rv of
+        valueReference(vValue): normal v;
+        placeReference(rPlace): r.base.get(r.property);
+        virtualReferenceabruptValueOrException makeError(getValueError)
+        end

+ +

referencePutValue(rvReferencevValue) : VoidOrException
+  = case rv of
+        valueReferenceabruptVoidOrException makeError(putValueError);
+        placeReference(rPlace): r.base.put(r.propertyv);
+        virtualReference^
+        end

+ +

Coercions

+ +

Semantics

+ +

coerceToBoolean(vValue) : Boolean
+  = case v of
+        undefinedValuenullValuefalse;
+        booleanValue(bBoolean): b;
+        doubleValue(dDouble): not (doubleIsZero(dor doubleIsNan(d));
+        stringValue(sString): length(s) ≠ 0;
+        objectValuetrue
+        end

+ +

coerceBooleanToDouble(bBoolean) : Double
+  = if b
+     then 1.0
+     else 0.0

+ +

coerceToDouble(vValue) : DoubleOrException
+  = case v of
+        undefinedValuenormal NaN;
+        nullValuenormal 0.0;
+        booleanValue(bBoolean): normal coerceBooleanToDouble(b);
+        doubleValue(dDouble): normal d;
+        stringValue^;
+        objectValue^
+        end

+ +

coerceToUint32(vValue) : IntegerOrException
+  = letexc dDouble = coerceToDouble(v)
+     in normal doubleToUint32(d)

+ +

coerceToInt32(vValue) : IntegerOrException
+  = letexc dDouble = coerceToDouble(v)
+     in normal uint32ToInt32(doubleToUint32(d))

+ +

uint32ToInt32(uiInteger) : Integer
+  = if ui < 2147483648
+     then ui
+     else ui - 4294967296

+ +

coerceToString(vValue) : StringOrException
+  = case v of
+        undefinedValuenormal “undefined”;
+        nullValuenormal “null”;
+        booleanValue(bBoolean):
+              if b
+              then normal “true
+              else normal “false”;
+        doubleValue^;
+        stringValue(sString): normal s;
+        objectValue^
+        end

+ +

coerceToPrimitive(vValuehintDefaultValueHint) : ValueOrException
+  = case v of
+        undefinedValuenullValuebooleanValuedoubleValuestringValuenormal v;
+        objectValue(oObject):
+              letexc pvValue = o.defaultValue(hint)
+              in case pv of
+                     undefinedValuenullValuebooleanValuedoubleValuestringValue:
+                           normal pv;
+                     objectValueabruptValueOrException makeError(coerceToPrimitiveError)
+                     end
+        end

+ +

coerceToObject(vValue) : ObjectOrException
+  = case v of
+        undefinedValuenullValueabruptObjectOrException makeError(coerceToObjectError);
+        booleanValue^;
+        doubleValue^;
+        stringValue^;
+        objectValue(oObject): normal o
+        end

+ +

Environments

+ +

Semantics

+ +

type Env = tuple {thisObjectOrNull}

+ +

lookupIdentifier(eEnvidString) : ReferenceOrException = ^

+ +

Terminal Actions

+ +

Semantics

+ +

action EvalIdentifier[Identifier] : String

+ +

action EvalNumber[Number] : Double

+ +

action EvalString[String] : String

+ +

Primary Expressions

+ +

Syntax

+ +
+
PrimaryRvalue Þ
+
   this
+
|  null
+
|  true
+
|  false
+
|  Number
+
|  String
+
|  ( CommaExpressionnoLValue )
+
+
+
PrimaryLvalue Þ
+
   Identifier
+
|  ( Lvalue )
+
+

Semantics

+ +

action Eval[PrimaryRvalue] : Env ® ValueOrException

+ +

Eval[PrimaryRvalue Þ this](eEnv) = normal objectOrNullToValue(e.this)

+ +

Eval[PrimaryRvalue Þ null](eEnv) = nullResult

+ +

Eval[PrimaryRvalue Þ true](eEnv) = booleanResult(true)

+ +

Eval[PrimaryRvalue Þ false](eEnv) = booleanResult(false)

+ +

Eval[PrimaryRvalue Þ Number](eEnv) = doubleResult(EvalNumber[Number])

+ +

Eval[PrimaryRvalue Þ String](eEnv) = stringResult(EvalString[String])

+ +

Eval[PrimaryRvalue Þ ( CommaExpressionnoLValue )] = Eval[CommaExpressionnoLValue]

+ +

action Eval[PrimaryLvalue] : Env ® ReferenceOrException

+ +

Eval[PrimaryLvalue Þ Identifier](eEnv)
+  = lookupIdentifier(eEvalIdentifier[Identifier])

+ +

Eval[PrimaryLvalue Þ ( Lvalue )] = Eval[Lvalue]

+ +

Left-Side Expressions

+ +

Syntax

+ +
ExprKind Î {anyValuenoLValue}
+
MemberExprKind Î {callnoCall}
+
+
MemberLvaluenoCall Þ
+
   PrimaryLvalue
+
|  MemberExpressionnoCall,anyValue [ Expression ]
+
|  MemberExpressionnoCall,anyValue . Identifier
+
+
+
MemberLvaluecall Þ
+
   Lvalue Arguments
+
|  MemberExpressionnoCall,noLValue Arguments
+
|  MemberExpressioncall,anyValue [ Expression ]
+
|  MemberExpressioncall,anyValue . Identifier
+
+
+
MemberExpressionnoCall,noLValue Þ
+
   PrimaryRvalue
+
|  new MemberExpressionnoCall,anyValue Arguments
+
+
+
MemberExpressionnoCall,anyValue Þ
+
   PrimaryRvalue
+
|  MemberLvaluenoCall
+
|  new MemberExpressionnoCall,anyValue Arguments
+
+
+
MemberExpressioncall,anyValue Þ MemberLvaluecall
+
+
+
NewExpressionExprKind Þ
+
   MemberExpressionnoCall,ExprKind
+
|  new NewExpressionanyValue
+
+
+
Arguments Þ
+
   ( )
+
|  ( ArgumentList )
+
+
+
ArgumentList Þ
+
   AssignmentExpressionanyValue
+
|  ArgumentList , AssignmentExpressionanyValue
+
+
+
Lvalue Þ
+
   MemberLvaluecall
+
|  MemberLvaluenoCall
+
+

Semantics

+ +

action Eval[MemberLvalueMemberExprKind] : Env ® ReferenceOrException

+ +

Eval[MemberLvaluenoCall Þ PrimaryLvalue] = Eval[PrimaryLvalue]

+ +

Eval[MemberLvaluecall Þ Lvalue Arguments](eEnv)
+  = letexc functionReferenceReference = Eval[Lvalue](e)
+     in letexc functionValue = referenceGetValue(functionReference)
+     in letexc argumentsValue[] = Eval[Arguments](e)
+     in let thisObjectOrNull
+             = case functionReference of
+                   valueReferencevirtualReferencenullObjectOrNull;
+                   placeReference(pPlace): objectObjectOrNull p.base
+                   end
+     in callObject(functionthisarguments)

+ +

Eval[MemberLvaluecall Þ MemberExpressionnoCall,noLValue Arguments](eEnv)
+  = letexc functionValue = Eval[MemberExpressionnoCall,noLValue](e)
+     in letexc argumentsValue[] = Eval[Arguments](e)
+     in callObject(functionnullObjectOrNullarguments)

+ +

Eval[MemberLvalueMemberExprKind Þ MemberExpressionMemberExprKind,anyValue [ Expression ]]
+            (eEnv)
+  = letexc containerValue = Eval[MemberExpressionMemberExprKind,anyValue](e)
+     in letexc propertyValue = Eval[Expression](e)
+     in readProperty(containerproperty)

+ +

Eval[MemberLvalueMemberExprKind Þ MemberExpressionMemberExprKind,anyValue . Identifier]
+            (eEnv)
+  = letexc containerValue = Eval[MemberExpressionMemberExprKind,anyValue](e)
+     in readProperty(containerstringValue EvalIdentifier[Identifier])

+ +

action Eval[MemberExpressionMemberExprKind,ExprKind] : Env ® ValueOrException

+ +

Eval[MemberExpressionnoCall,ExprKind Þ PrimaryRvalue] = Eval[PrimaryRvalue]

+ +

Eval[MemberExpressionMemberExprKind,anyValue Þ MemberLvalueMemberExprKind](eEnv)
+  = letexc refReference = Eval[MemberLvalueMemberExprKind](e)
+     in referenceGetValue(ref)

+ +

Eval[MemberExpressionnoCall,ExprKind Þ new MemberExpressionnoCall,anyValue1 Arguments]
+            (eEnv)
+  = letexc constructorValue = Eval[MemberExpressionnoCall,anyValue1](e)
+     in letexc argumentsValue[] = Eval[Arguments](e)
+     in constructObject(constructorarguments)

+ +

action Eval[NewExpressionExprKind] : Env ® ValueOrException

+ +

Eval[NewExpressionExprKind Þ MemberExpressionnoCall,ExprKind]
+  = Eval[MemberExpressionnoCall,ExprKind]

+ +

Eval[NewExpressionExprKind Þ new NewExpressionanyValue1](eEnv)
+  = letexc constructorValue = Eval[NewExpressionanyValue1](e)
+     in constructObject(constructor[]Value)

+ +

action Eval[Arguments] : Env ® ValueListOrException

+ +

Eval[Arguments Þ ( )](eEnv) = normal []Value

+ +

Eval[Arguments Þ ( ArgumentList )] = Eval[ArgumentList]

+ +

action Eval[ArgumentList] : Env ® ValueListOrException

+ +

Eval[ArgumentList Þ AssignmentExpressionanyValue](eEnv)
+  = letexc argValue = Eval[AssignmentExpressionanyValue](e)
+     in normal [arg]

+ +

Eval[ArgumentList Þ ArgumentList1 , AssignmentExpressionanyValue](eEnv)
+  = letexc argsValue[] = Eval[ArgumentList1](e)
+     in letexc argValue = Eval[AssignmentExpressionanyValue](e)
+     in normal (args ¨ [arg])

+ +

action Eval[Lvalue] : Env ® ReferenceOrException

+ +

Eval[Lvalue Þ MemberLvaluecall] = Eval[MemberLvaluecall]

+ +

Eval[Lvalue Þ MemberLvaluenoCall] = Eval[MemberLvaluenoCall]

+ +

readProperty(containerValuepropertyValue) : ReferenceOrException
+  = letexc objObject = coerceToObject(container)
+     in letexc namePropName = coerceToString(property)
+     in normal placeReference áobjnameñPlace

+ +

callObject(functionValuethisObjectOrNullargumentsValue[]) : ReferenceOrException
+  = case function of
+        undefinedValuenullValuebooleanValuedoubleValuestringValue:
+              abruptReferenceOrException makeError(coerceToObjectError);
+        objectValue(oObject): o.call(thisarguments)
+        end

+ +

constructObject(constructorValueargumentsValue[]) : ValueOrException
+  = case constructor of
+        undefinedValuenullValuebooleanValuedoubleValuestringValue:
+              abruptValueOrException makeError(coerceToObjectError);
+        objectValue(oObject):
+              letexc resObject = o.construct(arguments)
+              in objectResult(res)
+        end

+ +

Postfix Expressions

+ +

Syntax

+ +
+
PostfixExpressionanyValue Þ
+
   NewExpressionanyValue
+
|  MemberExpressioncall,anyValue
+
|  Lvalue ++
+
|  Lvalue --
+
+
+
PostfixExpressionnoLValue Þ
+
   NewExpressionnoLValue
+
|  Lvalue ++
+
|  Lvalue --
+
+

Semantics

+ +

action Eval[PostfixExpressionExprKind] : Env ® ValueOrException

+ +

Eval[PostfixExpressionExprKind Þ NewExpressionExprKind] = Eval[NewExpressionExprKind]

+ +

Eval[PostfixExpressionanyValue Þ MemberExpressioncall,anyValue]
+  = Eval[MemberExpressioncall,anyValue]

+ +

Eval[PostfixExpressionExprKind Þ Lvalue ++](eEnv)
+  = letexc operandReferenceReference = Eval[Lvalue](e)
+     in letexc operandValueValue = referenceGetValue(operandReference)
+     in letexc operandDouble = coerceToDouble(operandValue)
+     in letexc uVoid
+                  = referencePutValue(operandReferencedoubleValue doubleAdd(operand, 1.0))
+     in doubleResult(operand)

+ +

Eval[PostfixExpressionExprKind Þ Lvalue --](eEnv)
+  = letexc operandReferenceReference = Eval[Lvalue](e)
+     in letexc operandValueValue = referenceGetValue(operandReference)
+     in letexc operandDouble = coerceToDouble(operandValue)
+     in letexc uVoid
+                  = referencePutValue(operandReferencedoubleValue doubleSubtract(operand, 1.0))
+     in doubleResult(operand)

+ +

Unary Operators

+ +

Syntax

+ +
+
UnaryExpressionExprKind Þ
+
   PostfixExpressionExprKind
+
|  delete Lvalue
+
|  void UnaryExpressionanyValue
+
|  typeof Lvalue
+
|  typeof UnaryExpressionnoLValue
+
|  ++ Lvalue
+
|  -- Lvalue
+
|  + UnaryExpressionanyValue
+
|  - UnaryExpressionanyValue
+
|  ~ UnaryExpressionanyValue
+
|  ! UnaryExpressionanyValue
+
+

Semantics

+ +

action Eval[UnaryExpressionExprKind] : Env ® ValueOrException

+ +

Eval[UnaryExpressionExprKind Þ PostfixExpressionExprKind]
+  = Eval[PostfixExpressionExprKind]

+ +

Eval[UnaryExpressionExprKind Þ delete Lvalue](eEnv)
+  = letexc rvReference = Eval[Lvalue](e)
+     in case rv of
+            valueReferenceabruptValueOrException makeError(deleteError);
+            placeReference(rPlace):
+                  letexc bBoolean = r.base.delete(r.property)
+                  in booleanResult(b);
+            virtualReferencebooleanResult(true)
+            end

+ +

Eval[UnaryExpressionExprKind Þ void UnaryExpressionanyValue1](eEnv)
+  = letexc operandValue = Eval[UnaryExpressionanyValue1](e)
+     in undefinedResult

+ +

Eval[UnaryExpressionExprKind Þ typeof Lvalue](eEnv)
+  = letexc rvReference = Eval[Lvalue](e)
+     in case rv of
+            valueReference(vValue): stringResult(valueTypeof(v));
+            placeReference(rPlace):
+                  letexc vValue = r.base.get(r.property)
+                  in stringResult(valueTypeof(v));
+            virtualReferencestringResult(“undefined”)
+            end

+ +

Eval[UnaryExpressionExprKind Þ typeof UnaryExpressionnoLValue1](eEnv)
+  = letexc vValue = Eval[UnaryExpressionnoLValue1](e)
+     in stringResult(valueTypeof(v))

+ +

Eval[UnaryExpressionExprKind Þ ++ Lvalue](eEnv)
+  = letexc operandReferenceReference = Eval[Lvalue](e)
+     in letexc operandValueValue = referenceGetValue(operandReference)
+     in letexc operandDouble = coerceToDouble(operandValue)
+     in let resDouble = doubleAdd(operand, 1.0)
+     in letexc uVoid = referencePutValue(operandReferencedoubleValue res)
+     in doubleResult(res)

+ +

Eval[UnaryExpressionExprKind Þ -- Lvalue](eEnv)
+  = letexc operandReferenceReference = Eval[Lvalue](e)
+     in letexc operandValueValue = referenceGetValue(operandReference)
+     in letexc operandDouble = coerceToDouble(operandValue)
+     in let resDouble = doubleSubtract(operand, 1.0)
+     in letexc uVoid = referencePutValue(operandReferencedoubleValue res)
+     in doubleResult(res)

+ +

Eval[UnaryExpressionExprKind Þ + UnaryExpressionanyValue1](eEnv)
+  = letexc operandValueValue = Eval[UnaryExpressionanyValue1](e)
+     in letexc operandDouble = coerceToDouble(operandValue)
+     in doubleResult(operand)

+ +

Eval[UnaryExpressionExprKind Þ - UnaryExpressionanyValue1](eEnv)
+  = letexc operandValueValue = Eval[UnaryExpressionanyValue1](e)
+     in letexc operandDouble = coerceToDouble(operandValue)
+     in doubleResult(doubleNegate(operand))

+ +

Eval[UnaryExpressionExprKind Þ ~ UnaryExpressionanyValue1](eEnv)
+  = letexc operandValueValue = Eval[UnaryExpressionanyValue1](e)
+     in letexc operandInteger = coerceToInt32(operandValue)
+     in integerResult(bitwiseXor(operand, -1))

+ +

Eval[UnaryExpressionExprKind Þ ! UnaryExpressionanyValue1](eEnv)
+  = letexc operandValueValue = Eval[UnaryExpressionanyValue1](e)
+     in booleanResult(not coerceToBoolean(operandValue))

+ +

valueTypeof(vValue) : String
+  = case v of
+        undefinedValue: “undefined”;
+        nullValue: “object”;
+        booleanValue: “boolean”;
+        doubleValue: “number”;
+        stringValue: “string”;
+        objectValue(oObject): o.typeofName
+        end

+ +

Multiplicative Operators

+ +

Syntax

+ +
+
MultiplicativeExpressionExprKind Þ
+
   UnaryExpressionExprKind
+
|  MultiplicativeExpressionanyValue * UnaryExpressionanyValue
+
|  MultiplicativeExpressionanyValue / UnaryExpressionanyValue
+
|  MultiplicativeExpressionanyValue % UnaryExpressionanyValue
+
+

Semantics

+ +

action Eval[MultiplicativeExpressionExprKind] : Env ® ValueOrException

+ +

Eval[MultiplicativeExpressionExprKind Þ UnaryExpressionExprKind]
+  = Eval[UnaryExpressionExprKind]

+ +

Eval[MultiplicativeExpressionExprKind Þ MultiplicativeExpressionanyValue1 * UnaryExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[MultiplicativeExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[UnaryExpressionanyValue](e)
+     in applyBinaryDoubleOperator(doubleMultiplyleftValuerightValue)

+ +

Eval[MultiplicativeExpressionExprKind Þ MultiplicativeExpressionanyValue1 / UnaryExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[MultiplicativeExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[UnaryExpressionanyValue](e)
+     in applyBinaryDoubleOperator(doubleDivideleftValuerightValue)

+ +

Eval[MultiplicativeExpressionExprKind Þ MultiplicativeExpressionanyValue1 % UnaryExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[MultiplicativeExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[UnaryExpressionanyValue](e)
+     in applyBinaryDoubleOperator(doubleRemainderleftValuerightValue)

+ +

applyBinaryDoubleOperator(operatorDouble × Double ® DoubleleftValueValuerightValueValue)
+  : ValueOrException
+  = letexc leftNumberDouble = coerceToDouble(leftValue)
+     in letexc rightNumberDouble = coerceToDouble(rightValue)
+     in doubleResult(operator(leftNumberrightNumber))

+ +

Additive Operators

+ +

Syntax

+ +
+
AdditiveExpressionExprKind Þ
+
   MultiplicativeExpressionExprKind
+
|  AdditiveExpressionanyValue + MultiplicativeExpressionanyValue
+
|  AdditiveExpressionanyValue - MultiplicativeExpressionanyValue
+
+

Semantics

+ +

action Eval[AdditiveExpressionExprKind] : Env ® ValueOrException

+ +

Eval[AdditiveExpressionExprKind Þ MultiplicativeExpressionExprKind]
+  = Eval[MultiplicativeExpressionExprKind]

+ +

Eval[AdditiveExpressionExprKind Þ AdditiveExpressionanyValue1 + MultiplicativeExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[AdditiveExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[MultiplicativeExpressionanyValue](e)
+     in letexc leftPrimitiveValue = coerceToPrimitive(leftValuenoHint)
+     in letexc rightPrimitiveValue = coerceToPrimitive(rightValuenoHint)
+     in if leftPrimitive is stringValue or rightPrimitive is stringValue
+         then letexc leftStringString = coerceToString(leftPrimitive)
+                in letexc rightStringString = coerceToString(rightPrimitive)
+                in stringResult(leftString ¨ rightString)
+         else applyBinaryDoubleOperator(doubleAddleftPrimitiverightPrimitive)

+ +

Eval[AdditiveExpressionExprKind Þ AdditiveExpressionanyValue1 - MultiplicativeExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[AdditiveExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[MultiplicativeExpressionanyValue](e)
+     in applyBinaryDoubleOperator(doubleSubtractleftValuerightValue)

+ +

Bitwise Shift Operators

+ +

Syntax

+ +
+
ShiftExpressionExprKind Þ
+
   AdditiveExpressionExprKind
+
|  ShiftExpressionanyValue << AdditiveExpressionanyValue
+
|  ShiftExpressionanyValue >> AdditiveExpressionanyValue
+
|  ShiftExpressionanyValue >>> AdditiveExpressionanyValue
+
+

Semantics

+ +

action Eval[ShiftExpressionExprKind] : Env ® ValueOrException

+ +

Eval[ShiftExpressionExprKind Þ AdditiveExpressionExprKind]
+  = Eval[AdditiveExpressionExprKind]

+ +

Eval[ShiftExpressionExprKind Þ ShiftExpressionanyValue1 << AdditiveExpressionanyValue]
+            (eEnv)
+  = letexc bitmapValueValue = Eval[ShiftExpressionanyValue1](e)
+     in letexc countValueValue = Eval[AdditiveExpressionanyValue](e)
+     in letexc bitmapInteger = coerceToUint32(bitmapValue)
+     in letexc countInteger = coerceToUint32(countValue)
+     in integerResult(
+             uint32ToInt32(bitwiseAnd(bitwiseShift(bitmapbitwiseAnd(count, 31)), 4294967295)))

+ +

Eval[ShiftExpressionExprKind Þ ShiftExpressionanyValue1 >> AdditiveExpressionanyValue]
+            (eEnv)
+  = letexc bitmapValueValue = Eval[ShiftExpressionanyValue1](e)
+     in letexc countValueValue = Eval[AdditiveExpressionanyValue](e)
+     in letexc bitmapInteger = coerceToInt32(bitmapValue)
+     in letexc countInteger = coerceToUint32(countValue)
+     in integerResult(bitwiseShift(bitmap, -bitwiseAnd(count, 31)))

+ +

Eval[ShiftExpressionExprKind Þ ShiftExpressionanyValue1 >>> AdditiveExpressionanyValue]
+            (eEnv)
+  = letexc bitmapValueValue = Eval[ShiftExpressionanyValue1](e)
+     in letexc countValueValue = Eval[AdditiveExpressionanyValue](e)
+     in letexc bitmapInteger = coerceToUint32(bitmapValue)
+     in letexc countInteger = coerceToUint32(countValue)
+     in integerResult(bitwiseShift(bitmap, -bitwiseAnd(count, 31)))

+ +

Relational Operators

+ +

Syntax

+ +
+
RelationalExpressionExprKind Þ
+
   ShiftExpressionExprKind
+
|  RelationalExpressionanyValue < ShiftExpressionanyValue
+
|  RelationalExpressionanyValue > ShiftExpressionanyValue
+
|  RelationalExpressionanyValue <= ShiftExpressionanyValue
+
|  RelationalExpressionanyValue >= ShiftExpressionanyValue
+
+

Semantics

+ +

action Eval[RelationalExpressionExprKind] : Env ® ValueOrException

+ +

Eval[RelationalExpressionExprKind Þ ShiftExpressionExprKind]
+  = Eval[ShiftExpressionExprKind]

+ +

Eval[RelationalExpressionExprKind Þ RelationalExpressionanyValue1 < ShiftExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[RelationalExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[ShiftExpressionanyValue](e)
+     in orderValues(leftValuerightValuetruefalse)

+ +

Eval[RelationalExpressionExprKind Þ RelationalExpressionanyValue1 > ShiftExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[RelationalExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[ShiftExpressionanyValue](e)
+     in orderValues(rightValueleftValuetruefalse)

+ +

Eval[RelationalExpressionExprKind Þ RelationalExpressionanyValue1 <= ShiftExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[RelationalExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[ShiftExpressionanyValue](e)
+     in orderValues(rightValueleftValuefalsetrue)

+ +

Eval[RelationalExpressionExprKind Þ RelationalExpressionanyValue1 >= ShiftExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[RelationalExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[ShiftExpressionanyValue](e)
+     in orderValues(leftValuerightValuefalsetrue)

+ +

orderValues(leftValueValuerightValueValuelessBooleangreaterOrEqualBoolean)
+  : ValueOrException
+  = letexc leftPrimitiveValue = coerceToPrimitive(leftValuenumberHint)
+     in letexc rightPrimitiveValue = coerceToPrimitive(rightValuenumberHint)
+     in if leftPrimitive is stringValue and rightPrimitive is stringValue
+         then booleanResult(
+                    compareStrings(
+                        leftPrimitive.stringValue,
+                        rightPrimitive.stringValue,
+                        less,
+                        greaterOrEqual,
+                        greaterOrEqual))
+         else letexc leftNumberDouble = coerceToDouble(leftPrimitive)
+               in letexc rightNumberDouble = coerceToDouble(rightPrimitive)
+               in booleanResult(
+                       doubleCompare(
+                           leftNumber,
+                           rightNumber,
+                           less,
+                           greaterOrEqual,
+                           greaterOrEqual,
+                           false))

+ +

compareStrings(leftStringrightStringlessBooleanequalBooleangreaterBoolean)
+  : Boolean
+  = if empty(leftand empty(right)
+     then equal
+     else if empty(left)
+     then less
+     else if empty(right)
+     then greater
+     else let leftCharCodeInteger = characterToCode(first(left));
+               rightCharCodeInteger = characterToCode(first(right))
+           in if leftCharCode < rightCharCode
+               then less
+               else if leftCharCode > rightCharCode
+               then greater
+               else compareStrings(rest(left), rest(right), lessequalgreater)

+ +

Equality Operators

+ +

Syntax

+ +
+
EqualityExpressionExprKind Þ
+
   RelationalExpressionExprKind
+
|  EqualityExpressionanyValue == RelationalExpressionanyValue
+
|  EqualityExpressionanyValue != RelationalExpressionanyValue
+
|  EqualityExpressionanyValue === RelationalExpressionanyValue
+
|  EqualityExpressionanyValue !== RelationalExpressionanyValue
+
+

Semantics

+ +

action Eval[EqualityExpressionExprKind] : Env ® ValueOrException

+ +

Eval[EqualityExpressionExprKind Þ RelationalExpressionExprKind]
+  = Eval[RelationalExpressionExprKind]

+ +

Eval[EqualityExpressionExprKind Þ EqualityExpressionanyValue1 == RelationalExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[EqualityExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[RelationalExpressionanyValue](e)
+     in letexc eqBoolean = compareValues(leftValuerightValue)
+     in booleanResult(eq)

+ +

Eval[EqualityExpressionExprKind Þ EqualityExpressionanyValue1 != RelationalExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[EqualityExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[RelationalExpressionanyValue](e)
+     in letexc eqBoolean = compareValues(leftValuerightValue)
+     in booleanResult(not eq)

+ +

Eval[EqualityExpressionExprKind Þ EqualityExpressionanyValue1 === RelationalExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[EqualityExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[RelationalExpressionanyValue](e)
+     in booleanResult(strictCompareValues(leftValuerightValue))

+ +

Eval[EqualityExpressionExprKind Þ EqualityExpressionanyValue1 !== RelationalExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[EqualityExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[RelationalExpressionanyValue](e)
+     in booleanResult(not strictCompareValues(leftValuerightValue))

+ +

compareValues(leftValueValuerightValueValue) : BooleanOrException
+  = case leftValue of
+        undefinedValuenullValue:
+              case rightValue of
+                 undefinedValuenullValuenormal true;
+                 booleanValuedoubleValuestringValueobjectValuenormal false
+                 end;
+        booleanValue(leftBoolBoolean):
+              case rightValue of
+                 undefinedValuenullValuenormal false;
+                 booleanValue(rightBoolBoolean): normal (not (leftBool xor rightBool));
+                 doubleValuestringValueobjectValue:
+                       compareDoubleToValue(coerceBooleanToDouble(leftBool), rightValue)
+                 end;
+        doubleValue(leftNumberDouble): compareDoubleToValue(leftNumberrightValue);
+        stringValue(leftStrString):
+              case rightValue of
+                 undefinedValuenullValuenormal false;
+                 booleanValue(rightBoolBoolean):
+                       letexc leftNumberDouble = coerceToDouble(leftValue)
+                       in normal doubleEqual(leftNumbercoerceBooleanToDouble(rightBool));
+                 doubleValue(rightNumberDouble):
+                       letexc leftNumberDouble = coerceToDouble(leftValue)
+                       in normal doubleEqual(leftNumberrightNumber);
+                 stringValue(rightStrString):
+                       normal compareStrings(leftStrrightStrfalsetruefalse);
+                 objectValue:
+                       letexc rightPrimitiveValue = coerceToPrimitive(rightValuenoHint)
+                       in compareValues(leftValuerightPrimitive)
+                 end;
+        objectValue(leftObjObject):
+              case rightValue of
+                 undefinedValuenullValuenormal false;
+                 booleanValue(rightBoolBoolean):
+                       letexc leftPrimitiveValue = coerceToPrimitive(leftValuenoHint)
+                       in compareValues(
+                               leftPrimitive,
+                               doubleValue coerceBooleanToDouble(rightBool));
+                 doubleValuestringValue:
+                       letexc leftPrimitiveValue = coerceToPrimitive(leftValuenoHint)
+                       in compareValues(leftPrimitiverightValue);
+                 objectValue(rightObjObject):
+                       normal (leftObj.properties º rightObj.properties)
+                 end
+        end

+ +

compareDoubleToValue(leftNumberDoublerightValueValue) : BooleanOrException
+  = case rightValue of
+        undefinedValuenullValuenormal false;
+        booleanValuedoubleValuestringValue:
+              letexc rightNumberDouble = coerceToDouble(rightValue)
+              in normal doubleEqual(leftNumberrightNumber);
+        objectValue:
+              letexc rightPrimitiveValue = coerceToPrimitive(rightValuenoHint)
+              in compareDoubleToValue(leftNumberrightPrimitive)
+        end

+ +

doubleEqual(xDoubleyDouble) : Boolean
+  = doubleCompare(xyfalsetruefalsefalse)

+ +

strictCompareValues(leftValueValuerightValueValue) : Boolean
+  = case leftValue of
+        undefinedValuerightValue is undefinedValue;
+        nullValuerightValue is nullValue;
+        booleanValue(leftBoolBoolean):
+              case rightValue of
+                 booleanValue(rightBoolBoolean): not (leftBool xor rightBool);
+                 undefinedValuenullValuedoubleValuestringValueobjectValuefalse
+                 end;
+        doubleValue(leftNumberDouble):
+              case rightValue of
+                 doubleValue(rightNumberDouble): doubleEqual(leftNumberrightNumber);
+                 undefinedValuenullValuebooleanValuestringValueobjectValuefalse
+                 end;
+        stringValue(leftStrString):
+              case rightValue of
+                 stringValue(rightStrString):
+                       compareStrings(leftStrrightStrfalsetruefalse);
+                 undefinedValuenullValuebooleanValuedoubleValueobjectValuefalse
+                 end;
+        objectValue(leftObjObject):
+              case rightValue of
+                 objectValue(rightObjObject): leftObj.properties º rightObj.properties;
+                 undefinedValuenullValuebooleanValuedoubleValuestringValuefalse
+                 end
+        end

+ +

Binary Bitwise Operators

+ +

Syntax

+ +
+
BitwiseAndExpressionExprKind Þ
+
   EqualityExpressionExprKind
+
|  BitwiseAndExpressionanyValue & EqualityExpressionanyValue
+
+
+
BitwiseXorExpressionExprKind Þ
+
   BitwiseAndExpressionExprKind
+
|  BitwiseXorExpressionanyValue ^ BitwiseAndExpressionanyValue
+
+
+
BitwiseOrExpressionExprKind Þ
+
   BitwiseXorExpressionExprKind
+
|  BitwiseOrExpressionanyValue | BitwiseXorExpressionanyValue
+
+

Semantics

+ +

action Eval[BitwiseAndExpressionExprKind] : Env ® ValueOrException

+ +

Eval[BitwiseAndExpressionExprKind Þ EqualityExpressionExprKind]
+  = Eval[EqualityExpressionExprKind]

+ +

Eval[BitwiseAndExpressionExprKind Þ BitwiseAndExpressionanyValue1 & EqualityExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[BitwiseAndExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[EqualityExpressionanyValue](e)
+     in applyBinaryBitwiseOperator(bitwiseAndleftValuerightValue)

+ +

action Eval[BitwiseXorExpressionExprKind] : Env ® ValueOrException

+ +

Eval[BitwiseXorExpressionExprKind Þ BitwiseAndExpressionExprKind]
+  = Eval[BitwiseAndExpressionExprKind]

+ +

Eval[BitwiseXorExpressionExprKind Þ BitwiseXorExpressionanyValue1 ^ BitwiseAndExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[BitwiseXorExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[BitwiseAndExpressionanyValue](e)
+     in applyBinaryBitwiseOperator(bitwiseXorleftValuerightValue)

+ +

action Eval[BitwiseOrExpressionExprKind] : Env ® ValueOrException

+ +

Eval[BitwiseOrExpressionExprKind Þ BitwiseXorExpressionExprKind]
+  = Eval[BitwiseXorExpressionExprKind]

+ +

Eval[BitwiseOrExpressionExprKind Þ BitwiseOrExpressionanyValue1 | BitwiseXorExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[BitwiseOrExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[BitwiseXorExpressionanyValue](e)
+     in applyBinaryBitwiseOperator(bitwiseOrleftValuerightValue)

+ +

applyBinaryBitwiseOperator(operatorInteger × Integer ® IntegerleftValueValuerightValueValue)
+  : ValueOrException
+  = letexc leftIntInteger = coerceToInt32(leftValue)
+     in letexc rightIntInteger = coerceToInt32(rightValue)
+     in integerResult(operator(leftIntrightInt))

+ +

Binary Logical Operators

+ +

Syntax

+ +
+
LogicalAndExpressionExprKind Þ
+
   BitwiseOrExpressionExprKind
+
|  LogicalAndExpressionanyValue && BitwiseOrExpressionanyValue
+
+
+
LogicalOrExpressionExprKind Þ
+
   LogicalAndExpressionExprKind
+
|  LogicalOrExpressionanyValue || LogicalAndExpressionanyValue
+
+

Semantics

+ +

action Eval[LogicalAndExpressionExprKind] : Env ® ValueOrException

+ +

Eval[LogicalAndExpressionExprKind Þ BitwiseOrExpressionExprKind]
+  = Eval[BitwiseOrExpressionExprKind]

+ +

Eval[LogicalAndExpressionExprKind Þ LogicalAndExpressionanyValue1 && BitwiseOrExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[LogicalAndExpressionanyValue1](e)
+     in if coerceToBoolean(leftValue)
+         then Eval[BitwiseOrExpressionanyValue](e)
+         else normal leftValue

+ +

action Eval[LogicalOrExpressionExprKind] : Env ® ValueOrException

+ +

Eval[LogicalOrExpressionExprKind Þ LogicalAndExpressionExprKind]
+  = Eval[LogicalAndExpressionExprKind]

+ +

Eval[LogicalOrExpressionExprKind Þ LogicalOrExpressionanyValue1 || LogicalAndExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[LogicalOrExpressionanyValue1](e)
+     in if coerceToBoolean(leftValue)
+         then normal leftValue
+         else Eval[LogicalAndExpressionanyValue](e)

+ +

Conditional Operator

+ +

Syntax

+ +
+
ConditionalExpressionExprKind Þ
+
   LogicalOrExpressionExprKind
+
|  LogicalOrExpressionanyValue ? AssignmentExpressionanyValue : AssignmentExpressionanyValue
+
+

Semantics

+ +

action Eval[ConditionalExpressionExprKind] : Env ® ValueOrException

+ +

Eval[ConditionalExpressionExprKind Þ LogicalOrExpressionExprKind]
+  = Eval[LogicalOrExpressionExprKind]

+ +

Eval[ConditionalExpressionExprKind Þ LogicalOrExpressionanyValue ? AssignmentExpressionanyValue1 : AssignmentExpressionanyValue2]
+            (eEnv)
+  = letexc conditionValue = Eval[LogicalOrExpressionanyValue](e)
+     in if coerceToBoolean(condition)
+         then Eval[AssignmentExpressionanyValue1](e)
+         else Eval[AssignmentExpressionanyValue2](e)

+ +

Assignment Operators

+ +

Syntax

+ +
+
AssignmentExpressionExprKind Þ
+
   ConditionalExpressionExprKind
+
|  Lvalue = AssignmentExpressionanyValue
+
+

Expressions

+ +

Syntax

+ +
+
CommaExpressionExprKind Þ AssignmentExpressionExprKind
+
+

Semantics

+ +

action Eval[AssignmentExpressionExprKind] : Env ® ValueOrException

+ +

Eval[AssignmentExpressionExprKind Þ ConditionalExpressionExprKind]
+  = Eval[ConditionalExpressionExprKind]

+ +

Eval[AssignmentExpressionExprKind Þ Lvalue = AssignmentExpressionanyValue1](eEnv)
+  = letexc leftReferenceReference = Eval[Lvalue](e)
+     in letexc rightValueValue = Eval[AssignmentExpressionanyValue1](e)
+     in letexc uVoid = referencePutValue(leftReferencerightValue)
+     in normal rightValue

+ +

action Eval[CommaExpressionExprKind] : Env ® ValueOrException

+ +

Eval[CommaExpressionExprKind Þ AssignmentExpressionExprKind]
+  = Eval[AssignmentExpressionExprKind]

+ +

Syntax

+ +
+
Expression Þ CommaExpressionanyValue
+
+

Semantics

+ +

action Eval[Expression] : Env ® ValueOrException

+ +

Eval[Expression Þ CommaExpressionanyValue] = Eval[CommaExpressionanyValue]

+ +

Programs

+ +

Syntax

+ +
+
Program Þ Expression End
+
+

Semantics

+ +

action Eval[Program] : ValueOrException

+ +

Eval[Program Þ Expression End] = Eval[Expression](ánullObjectOrNullñEnv)

+ + + diff --git a/mozilla/js/semantics/ECMA Grammar.lisp b/mozilla/js/semantics/ECMA Grammar.lisp new file mode 100644 index 00000000000..771d69be731 --- /dev/null +++ b/mozilla/js/semantics/ECMA Grammar.lisp @@ -0,0 +1,852 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; ECMAScript sample grammar portions +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + +(declaim (optimize (debug 3))) + +(progn + (defparameter *gw* + (generate-world + "G" + '((grammar code-grammar :lr-1 :program) + + (%section "Types") + + (deftype value (oneof undefined-value + null-value + (boolean-value boolean) + (double-value double) + (string-value string) + (object-value object))) + (deftype object-or-null (oneof null-object-or-null (object-object-or-null object))) + (deftype object (tuple (properties (address (vector property))) + (typeof-name string) + (prototype object-or-null) + (get (-> (prop-name) value-or-exception)) + (put (-> (prop-name value) void-or-exception)) + (delete (-> (prop-name) boolean-or-exception)) + (call (-> (object-or-null (vector value)) reference-or-exception)) + (construct (-> ((vector value)) object-or-exception)) + (default-value (-> (default-value-hint) value-or-exception)))) + (deftype default-value-hint (oneof no-hint number-hint string-hint)) + (deftype property (tuple (name string) (read-only boolean) (enumerable boolean) (permanent boolean) (value (address value)))) + + (deftype prop-name string) + (deftype place (tuple (base object) (property prop-name))) + (deftype reference (oneof (value-reference value) (place-reference place) (virtual-reference prop-name))) + + + (deftype integer-or-exception (oneof (normal integer) (abrupt exception))) + (deftype void-or-exception (oneof normal (abrupt exception))) + (deftype boolean-or-exception (oneof (normal boolean) (abrupt exception))) + (deftype double-or-exception (oneof (normal double) (abrupt exception))) + (deftype string-or-exception (oneof (normal string) (abrupt exception))) + (deftype object-or-exception (oneof (normal object) (abrupt exception))) + (deftype value-or-exception (oneof (normal value) (abrupt exception))) + (deftype reference-or-exception (oneof (normal reference) (abrupt exception))) + (deftype value-list-or-exception (oneof (normal (vector value)) (abrupt exception))) + + (%section "Helper Functions") + + (define (object-or-null-to-value (o object-or-null)) value + (case o + (null-object-or-null (oneof null-value)) + ((object-object-or-null obj object) (oneof object-value obj)))) + + (define undefined-result value-or-exception + (oneof normal (oneof undefined-value))) + (define null-result value-or-exception + (oneof normal (oneof null-value))) + (define (boolean-result (b boolean)) value-or-exception + (oneof normal (oneof boolean-value b))) + (define (double-result (d double)) value-or-exception + (oneof normal (oneof double-value d))) + (define (integer-result (i integer)) value-or-exception + (double-result (rational-to-double (integer-to-rational i)))) + (define (string-result (s string)) value-or-exception + (oneof normal (oneof string-value s))) + (define (object-result (o object)) value-or-exception + (oneof normal (oneof object-value o))) + + (%section "Exceptions") + + (deftype exception (oneof (exception value) (error error))) + (deftype error (oneof coerce-to-primitive-error + coerce-to-object-error + get-value-error + put-value-error + delete-error)) + + (define (make-error (err error)) exception + (oneof error err)) + + (%section "Objects") + + + (%section "Conversions") + + (define (reference-get-value (rv reference)) value-or-exception + (case rv + ((value-reference v value) (oneof normal v)) + ((place-reference r place) ((& get (& base r)) (& property r))) + (virtual-reference (typed-oneof value-or-exception abrupt (make-error (oneof get-value-error)))))) + + (define (reference-put-value (rv reference) (v value)) void-or-exception + (case rv + (value-reference (typed-oneof void-or-exception abrupt (make-error (oneof put-value-error)))) + ((place-reference r place) ((& put (& base r)) (& property r) v)) + (virtual-reference (bottom void-or-exception)))) + + (%section "Coercions") + + (define (coerce-to-boolean (v value)) boolean + (case v + (((undefined-value null-value)) false) + ((boolean-value b boolean) b) + ((double-value d double) (not (or (double-is-zero d) (double-is-nan d)))) + ((string-value s string) (!= (length s) 0)) + (object-value true))) + + (define (coerce-boolean-to-double (b boolean)) double + (if b 1.0 0.0)) + + (define (coerce-to-double (v value)) double-or-exception + (case v + (undefined-value (oneof normal nan)) + (null-value (oneof normal 0.0)) + ((boolean-value b boolean) (oneof normal (coerce-boolean-to-double b))) + ((double-value d double) (oneof normal d)) + (string-value (bottom double-or-exception)) + (object-value (bottom double-or-exception)))) + + (define (coerce-to-uint32 (v value)) integer-or-exception + (letexc (d double (coerce-to-double v)) + (oneof normal (double-to-uint32 d)))) + + (define (coerce-to-int32 (v value)) integer-or-exception + (letexc (d double (coerce-to-double v)) + (oneof normal (uint32-to-int32 (double-to-uint32 d))))) + + (define (uint32-to-int32 (ui integer)) integer + (if (< ui #x80000000) + ui + (- ui #x100000000))) + + (define (coerce-to-string (v value)) string-or-exception + (case v + (undefined-value (oneof normal "undefined")) + (null-value (oneof normal "null")) + ((boolean-value b boolean) (if b (oneof normal "true") (oneof normal "false"))) + (double-value (bottom string-or-exception)) + ((string-value s string) (oneof normal s)) + (object-value (bottom string-or-exception)))) + + (define (coerce-to-primitive (v value) (hint default-value-hint)) value-or-exception + (case v + (((undefined-value null-value boolean-value double-value string-value)) (oneof normal v)) + ((object-value o object) + (letexc (pv value ((& default-value o) hint)) + (case pv + (((undefined-value null-value boolean-value double-value string-value)) (oneof normal pv)) + (object-value (typed-oneof value-or-exception abrupt (make-error (oneof coerce-to-primitive-error))))))))) + + (define (coerce-to-object (v value)) object-or-exception + (case v + (((undefined-value null-value)) (typed-oneof object-or-exception abrupt (make-error (oneof coerce-to-object-error)))) + (boolean-value (bottom object-or-exception)) + (double-value (bottom object-or-exception)) + (string-value (bottom object-or-exception)) + ((object-value o object) (oneof normal o)))) + + (%section "Environments") + + (deftype env (tuple (this object-or-null))) + (define (lookup-identifier (e env :unused) (id string :unused)) reference-or-exception + (bottom reference-or-exception)) + + (%section "Terminal Actions") + + (declare-action eval-identifier $identifier string) + (declare-action eval-number $number double) + (declare-action eval-string $string string) + + (terminal-action eval-identifier $identifier cdr) + (terminal-action eval-number $number cdr) + (terminal-action eval-string $string cdr) + (%print-actions) + + (%section "Primary Expressions") + + (declare-action eval :primary-rvalue (-> (env) value-or-exception)) + (production :primary-rvalue (this) primary-rvalue-this + ((eval (e env)) + (oneof normal (object-or-null-to-value (& this e))))) + (production :primary-rvalue (null) primary-rvalue-null + ((eval (e env :unused)) + null-result)) + (production :primary-rvalue (true) primary-rvalue-true + ((eval (e env :unused)) + (boolean-result true))) + (production :primary-rvalue (false) primary-rvalue-false + ((eval (e env :unused)) + (boolean-result false))) + (production :primary-rvalue ($number) primary-rvalue-number + ((eval (e env :unused)) + (double-result (eval-number $number)))) + (production :primary-rvalue ($string) primary-rvalue-string + ((eval (e env :unused)) + (string-result (eval-string $string)))) + (production :primary-rvalue (\( (:comma-expression no-l-value) \)) primary-rvalue-parentheses + (eval (eval :comma-expression))) + + (declare-action eval :primary-lvalue (-> (env) reference-or-exception)) + (production :primary-lvalue ($identifier) primary-lvalue-identifier + ((eval (e env)) + (lookup-identifier e (eval-identifier $identifier)))) + (production :primary-lvalue (\( :lvalue \)) primary-lvalue-parentheses + (eval (eval :lvalue))) + (%print-actions) + + (%section "Left-Side Expressions") + + (grammar-argument :expr-kind any-value no-l-value) + (grammar-argument :member-expr-kind call no-call) + + (declare-action eval (:member-lvalue :member-expr-kind) (-> (env) reference-or-exception)) + (production (:member-lvalue no-call) (:primary-lvalue) member-lvalue-primary-lvalue + (eval (eval :primary-lvalue))) + (production (:member-lvalue call) (:lvalue :arguments) member-lvalue-call-member-lvalue + ((eval (e env)) + (letexc (function-reference reference ((eval :lvalue) e)) + (letexc (function value (reference-get-value function-reference)) + (letexc (arguments (vector value) ((eval :arguments) e)) + (let ((this object-or-null + (case function-reference + (((value-reference virtual-reference)) (oneof null-object-or-null)) + ((place-reference p place) (oneof object-object-or-null (& base p)))))) + (call-object function this arguments))))))) + (production (:member-lvalue call) ((:member-expression no-call no-l-value) :arguments) member-lvalue-call-member-expression-no-call + ((eval (e env)) + (letexc (function value ((eval :member-expression) e)) + (letexc (arguments (vector value) ((eval :arguments) e)) + (call-object function (oneof null-object-or-null) arguments))))) + (production (:member-lvalue :member-expr-kind) ((:member-expression :member-expr-kind any-value) \[ :expression \]) member-lvalue-array + ((eval (e env)) + (letexc (container value ((eval :member-expression) e)) + (letexc (property value ((eval :expression) e)) + (read-property container property))))) + (production (:member-lvalue :member-expr-kind) ((:member-expression :member-expr-kind any-value) \. $identifier) member-lvalue-property + ((eval (e env)) + (letexc (container value ((eval :member-expression) e)) + (read-property container (oneof string-value (eval-identifier $identifier)))))) + + (declare-action eval (:member-expression :member-expr-kind :expr-kind) (-> (env) value-or-exception)) + (%rule (:member-expression no-call no-l-value)) + (%rule (:member-expression no-call any-value)) + (%rule (:member-expression call any-value)) + (production (:member-expression no-call :expr-kind) (:primary-rvalue) member-expression-primary-rvalue + (eval (eval :primary-rvalue))) + (production (:member-expression :member-expr-kind any-value) ((:member-lvalue :member-expr-kind)) member-expression-member-lvalue + ((eval (e env)) + (letexc (ref reference ((eval :member-lvalue) e)) + (reference-get-value ref)))) + (production (:member-expression no-call :expr-kind) (new (:member-expression no-call any-value) :arguments) member-expression-new + ((eval (e env)) + (letexc (constructor value ((eval :member-expression) e)) + (letexc (arguments (vector value) ((eval :arguments) e)) + (construct-object constructor arguments))))) + + (declare-action eval (:new-expression :expr-kind) (-> (env) value-or-exception)) + (production (:new-expression :expr-kind) ((:member-expression no-call :expr-kind)) new-expression-member-expression + (eval (eval :member-expression))) + (production (:new-expression :expr-kind) (new (:new-expression any-value)) new-expression-new + ((eval (e env)) + (letexc (constructor value ((eval :new-expression) e)) + (construct-object constructor (vector-of value))))) + + (declare-action eval :arguments (-> (env) value-list-or-exception)) + (production :arguments (\( \)) arguments-empty + ((eval (e env :unused)) + (oneof normal (vector-of value)))) + (production :arguments (\( :argument-list \)) arguments-list + (eval (eval :argument-list))) + + (declare-action eval :argument-list (-> (env) value-list-or-exception)) + (production :argument-list ((:assignment-expression any-value)) argument-list-one + ((eval (e env)) + (letexc (arg value ((eval :assignment-expression) e)) + (oneof normal (vector arg))))) + (production :argument-list (:argument-list \, (:assignment-expression any-value)) argument-list-more + ((eval (e env)) + (letexc (args (vector value) ((eval :argument-list) e)) + (letexc (arg value ((eval :assignment-expression) e)) + (oneof normal (append args (vector arg))))))) + + (declare-action eval :lvalue (-> (env) reference-or-exception)) + (production :lvalue ((:member-lvalue call)) lvalue-member-lvalue-call + (eval (eval :member-lvalue))) + (production :lvalue ((:member-lvalue no-call)) lvalue-member-lvalue-no-call + (eval (eval :member-lvalue))) + (%print-actions) + + (define (read-property (container value) (property value)) reference-or-exception + (letexc (obj object (coerce-to-object container)) + (letexc (name prop-name (coerce-to-string property)) + (oneof normal (oneof place-reference (tuple place obj name)))))) + + (define (call-object (function value) (this object-or-null) (arguments (vector value))) reference-or-exception + (case function + (((undefined-value null-value boolean-value double-value string-value)) + (typed-oneof reference-or-exception abrupt (make-error (oneof coerce-to-object-error)))) + ((object-value o object) + ((& call o) this arguments)))) + + (define (construct-object (constructor value) (arguments (vector value))) value-or-exception + (case constructor + (((undefined-value null-value boolean-value double-value string-value)) + (typed-oneof value-or-exception abrupt (make-error (oneof coerce-to-object-error)))) + ((object-value o object) + (letexc (res object ((& construct o) arguments)) + (object-result res))))) + + (%section "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 + (eval (eval :new-expression))) + (production (:postfix-expression any-value) ((:member-expression call any-value)) postfix-expression-member-expression-call + (eval (eval :member-expression))) + (production (:postfix-expression :expr-kind) (:lvalue ++) postfix-expression-increment + ((eval (e env)) + (letexc (operand-reference reference ((eval :lvalue) e)) + (letexc (operand-value value (reference-get-value operand-reference)) + (letexc (operand double (coerce-to-double operand-value)) + (letexc (u void (reference-put-value operand-reference (oneof double-value (double-add operand 1.0))) + :unused) + (double-result operand))))))) + (production (:postfix-expression :expr-kind) (:lvalue --) postfix-expression-decrement + ((eval (e env)) + (letexc (operand-reference reference ((eval :lvalue) e)) + (letexc (operand-value value (reference-get-value operand-reference)) + (letexc (operand double (coerce-to-double operand-value)) + (letexc (u void (reference-put-value operand-reference (oneof double-value (double-subtract operand 1.0))) + :unused) + (double-result operand))))))) + (%print-actions) + + (%section "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 + (eval (eval :postfix-expression))) + (production (:unary-expression :expr-kind) (delete :lvalue) unary-expression-delete + ((eval (e env)) + (letexc (rv reference ((eval :lvalue) e)) + (case rv + (value-reference (typed-oneof value-or-exception abrupt (make-error (oneof delete-error)))) + ((place-reference r place) + (letexc (b boolean ((& delete (& base r)) (& property r))) + (boolean-result b))) + (virtual-reference (boolean-result true)))))) + (production (:unary-expression :expr-kind) (void (:unary-expression any-value)) unary-expression-void + ((eval (e env)) + (letexc (operand value ((eval :unary-expression) e) :unused) + undefined-result))) + (production (:unary-expression :expr-kind) (typeof :lvalue) unary-expression-typeof-lvalue + ((eval (e env)) + (letexc (rv reference ((eval :lvalue) e)) + (case rv + ((value-reference v value) (string-result (value-typeof v))) + ((place-reference r place) + (letexc (v value ((& get (& base r)) (& property r))) + (string-result (value-typeof v)))) + (virtual-reference (string-result "undefined")))))) + (production (:unary-expression :expr-kind) (typeof (:unary-expression no-l-value)) unary-expression-typeof-expression + ((eval (e env)) + (letexc (v value ((eval :unary-expression) e)) + (string-result (value-typeof v))))) + (production (:unary-expression :expr-kind) (++ :lvalue) unary-expression-increment + ((eval (e env)) + (letexc (operand-reference reference ((eval :lvalue) e)) + (letexc (operand-value value (reference-get-value operand-reference)) + (letexc (operand double (coerce-to-double operand-value)) + (let ((res double (double-add operand 1.0))) + (letexc (u void (reference-put-value operand-reference (oneof double-value res)) :unused) + (double-result res)))))))) + (production (:unary-expression :expr-kind) (-- :lvalue) unary-expression-decrement + ((eval (e env)) + (letexc (operand-reference reference ((eval :lvalue) e)) + (letexc (operand-value value (reference-get-value operand-reference)) + (letexc (operand double (coerce-to-double operand-value)) + (let ((res double (double-subtract operand 1.0))) + (letexc (u void (reference-put-value operand-reference (oneof double-value res)) :unused) + (double-result res)))))))) + (production (:unary-expression :expr-kind) (+ (:unary-expression any-value)) unary-expression-plus + ((eval (e env)) + (letexc (operand-value value ((eval :unary-expression) e)) + (letexc (operand double (coerce-to-double operand-value)) + (double-result operand))))) + (production (:unary-expression :expr-kind) (- (:unary-expression any-value)) unary-expression-minus + ((eval (e env)) + (letexc (operand-value value ((eval :unary-expression) e)) + (letexc (operand double (coerce-to-double operand-value)) + (double-result (double-negate operand)))))) + (production (:unary-expression :expr-kind) (~ (:unary-expression any-value)) unary-expression-bitwise-not + ((eval (e env)) + (letexc (operand-value value ((eval :unary-expression) e)) + (letexc (operand integer (coerce-to-int32 operand-value)) + (integer-result (bitwise-xor operand -1)))))) + (production (:unary-expression :expr-kind) (! (:unary-expression any-value)) unary-expression-logical-not + ((eval (e env)) + (letexc (operand-value value ((eval :unary-expression) e)) + (boolean-result (not (coerce-to-boolean operand-value)))))) + (%print-actions) + + (define (value-typeof (v value)) string + (case v + (undefined-value "undefined") + (null-value "object") + (boolean-value "boolean") + (double-value "number") + (string-value "string") + ((object-value o object) (& typeof-name o)))) + + (%section "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 + (eval (eval :unary-expression))) + (production (:multiplicative-expression :expr-kind) ((:multiplicative-expression any-value) * (:unary-expression any-value)) multiplicative-expression-multiply + ((eval (e env)) + (letexc (left-value value ((eval :multiplicative-expression) e)) + (letexc (right-value value ((eval :unary-expression) e)) + (apply-binary-double-operator double-multiply left-value right-value))))) + (production (:multiplicative-expression :expr-kind) ((:multiplicative-expression any-value) / (:unary-expression any-value)) multiplicative-expression-divide + ((eval (e env)) + (letexc (left-value value ((eval :multiplicative-expression) e)) + (letexc (right-value value ((eval :unary-expression) e)) + (apply-binary-double-operator double-divide left-value right-value))))) + (production (:multiplicative-expression :expr-kind) ((:multiplicative-expression any-value) % (:unary-expression any-value)) multiplicative-expression-remainder + ((eval (e env)) + (letexc (left-value value ((eval :multiplicative-expression) e)) + (letexc (right-value value ((eval :unary-expression) e)) + (apply-binary-double-operator double-remainder left-value right-value))))) + (%print-actions) + + (define (apply-binary-double-operator (operator (-> (double double) double)) (left-value value) (right-value value)) value-or-exception + (letexc (left-number double (coerce-to-double left-value)) + (letexc (right-number double (coerce-to-double right-value)) + (double-result (operator left-number right-number))))) + + (%section "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 + (eval (eval :multiplicative-expression))) + (production (:additive-expression :expr-kind) ((:additive-expression any-value) + (:multiplicative-expression any-value)) additive-expression-add + ((eval (e env)) + (letexc (left-value value ((eval :additive-expression) e)) + (letexc (right-value value ((eval :multiplicative-expression) e)) + (letexc (left-primitive value (coerce-to-primitive left-value (oneof no-hint))) + (letexc (right-primitive value (coerce-to-primitive right-value (oneof no-hint))) + (if (or (is string-value left-primitive) (is string-value right-primitive)) + (letexc (left-string string (coerce-to-string left-primitive)) + (letexc (right-string string (coerce-to-string right-primitive)) + (string-result (append left-string right-string)))) + (apply-binary-double-operator double-add left-primitive right-primitive)))))))) + (production (:additive-expression :expr-kind) ((:additive-expression any-value) - (:multiplicative-expression any-value)) additive-expression-subtract + ((eval (e env)) + (letexc (left-value value ((eval :additive-expression) e)) + (letexc (right-value value ((eval :multiplicative-expression) e)) + (apply-binary-double-operator double-subtract left-value right-value))))) + (%print-actions) + + (%section "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 + (eval (eval :additive-expression))) + (production (:shift-expression :expr-kind) ((:shift-expression any-value) << (:additive-expression any-value)) shift-expression-left + ((eval (e env)) + (letexc (bitmap-value value ((eval :shift-expression) e)) + (letexc (count-value value ((eval :additive-expression) e)) + (letexc (bitmap integer (coerce-to-uint32 bitmap-value)) + (letexc (count integer (coerce-to-uint32 count-value)) + (integer-result (uint32-to-int32 (bitwise-and (bitwise-shift bitmap (bitwise-and count #x1F)) + #xFFFFFFFF))))))))) + (production (:shift-expression :expr-kind) ((:shift-expression any-value) >> (:additive-expression any-value)) shift-expression-right-signed + ((eval (e env)) + (letexc (bitmap-value value ((eval :shift-expression) e)) + (letexc (count-value value ((eval :additive-expression) e)) + (letexc (bitmap integer (coerce-to-int32 bitmap-value)) + (letexc (count integer (coerce-to-uint32 count-value)) + (integer-result (bitwise-shift bitmap (neg (bitwise-and count #x1F)))))))))) + (production (:shift-expression :expr-kind) ((:shift-expression any-value) >>> (:additive-expression any-value)) shift-expression-right-unsigned + ((eval (e env)) + (letexc (bitmap-value value ((eval :shift-expression) e)) + (letexc (count-value value ((eval :additive-expression) e)) + (letexc (bitmap integer (coerce-to-uint32 bitmap-value)) + (letexc (count integer (coerce-to-uint32 count-value)) + (integer-result (bitwise-shift bitmap (neg (bitwise-and count #x1F)))))))))) + (%print-actions) + + (%section "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 + (eval (eval :shift-expression))) + (production (:relational-expression :expr-kind) ((:relational-expression any-value) < (:shift-expression any-value)) relational-expression-less + ((eval (e env)) + (letexc (left-value value ((eval :relational-expression) e)) + (letexc (right-value value ((eval :shift-expression) e)) + (order-values left-value right-value true false))))) + (production (:relational-expression :expr-kind) ((:relational-expression any-value) > (:shift-expression any-value)) relational-expression-greater + ((eval (e env)) + (letexc (left-value value ((eval :relational-expression) e)) + (letexc (right-value value ((eval :shift-expression) e)) + (order-values right-value left-value true false))))) + (production (:relational-expression :expr-kind) ((:relational-expression any-value) <= (:shift-expression any-value)) relational-expression-less-or-equal + ((eval (e env)) + (letexc (left-value value ((eval :relational-expression) e)) + (letexc (right-value value ((eval :shift-expression) e)) + (order-values right-value left-value false true))))) + (production (:relational-expression :expr-kind) ((:relational-expression any-value) >= (:shift-expression any-value)) relational-expression-greater-or-equal + ((eval (e env)) + (letexc (left-value value ((eval :relational-expression) e)) + (letexc (right-value value ((eval :shift-expression) e)) + (order-values left-value right-value false true))))) + (%print-actions) + + (define (order-values (left-value value) (right-value value) (less boolean) (greater-or-equal boolean)) value-or-exception + (letexc (left-primitive value (coerce-to-primitive left-value (oneof number-hint))) + (letexc (right-primitive value (coerce-to-primitive right-value (oneof number-hint))) + (if (and (is string-value left-primitive) (is string-value right-primitive)) + (boolean-result + (compare-strings (select string-value left-primitive) (select string-value right-primitive) less greater-or-equal greater-or-equal)) + (letexc (left-number double (coerce-to-double left-primitive)) + (letexc (right-number double (coerce-to-double right-primitive)) + (boolean-result (double-compare left-number right-number less greater-or-equal greater-or-equal false)))))))) + + (define (compare-strings (left string) (right string) (less boolean) (equal boolean) (greater boolean)) boolean + (if (and (empty left) (empty right)) + equal + (if (empty left) + less + (if (empty right) + greater + (let ((left-char-code integer (character-to-code (first left))) + (right-char-code integer (character-to-code (first right)))) + (if (< left-char-code right-char-code) + less + (if (> left-char-code right-char-code) + greater + (compare-strings (rest left) (rest right) less equal greater)))))))) + + (%section "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 + (eval (eval :relational-expression))) + (production (:equality-expression :expr-kind) ((:equality-expression any-value) == (:relational-expression any-value)) equality-expression-equal + ((eval (e env)) + (letexc (left-value value ((eval :equality-expression) e)) + (letexc (right-value value ((eval :relational-expression) e)) + (letexc (eq boolean (compare-values left-value right-value)) + (boolean-result eq)))))) + (production (:equality-expression :expr-kind) ((:equality-expression any-value) != (:relational-expression any-value)) equality-expression-not-equal + ((eval (e env)) + (letexc (left-value value ((eval :equality-expression) e)) + (letexc (right-value value ((eval :relational-expression) e)) + (letexc (eq boolean (compare-values left-value right-value)) + (boolean-result (not eq))))))) + (production (:equality-expression :expr-kind) ((:equality-expression any-value) === (:relational-expression any-value)) equality-expression-strict-equal + ((eval (e env)) + (letexc (left-value value ((eval :equality-expression) e)) + (letexc (right-value value ((eval :relational-expression) e)) + (boolean-result (strict-compare-values left-value right-value)))))) + (production (:equality-expression :expr-kind) ((:equality-expression any-value) !== (:relational-expression any-value)) equality-expression-strict-not-equal + ((eval (e env)) + (letexc (left-value value ((eval :equality-expression) e)) + (letexc (right-value value ((eval :relational-expression) e)) + (boolean-result (not (strict-compare-values left-value right-value))))))) + (%print-actions) + + (define (compare-values (left-value value) (right-value value)) boolean-or-exception + (case left-value + (((undefined-value null-value)) + (case right-value + (((undefined-value null-value)) (oneof normal true)) + (((boolean-value double-value string-value object-value)) (oneof normal false)))) + ((boolean-value left-bool boolean) + (case right-value + (((undefined-value null-value)) (oneof normal false)) + ((boolean-value right-bool boolean) (oneof normal (not (xor left-bool right-bool)))) + (((double-value string-value object-value)) + (compare-double-to-value (coerce-boolean-to-double left-bool) right-value)))) + ((double-value left-number double) + (compare-double-to-value left-number right-value)) + ((string-value left-str string) + (case right-value + (((undefined-value null-value)) (oneof normal false)) + ((boolean-value right-bool boolean) + (letexc (left-number double (coerce-to-double left-value)) + (oneof normal (double-equal left-number (coerce-boolean-to-double right-bool))))) + ((double-value right-number double) + (letexc (left-number double (coerce-to-double left-value)) + (oneof normal (double-equal left-number right-number)))) + ((string-value right-str string) + (oneof normal (compare-strings left-str right-str false true false))) + (object-value + (letexc (right-primitive value (coerce-to-primitive right-value (oneof no-hint))) + (compare-values left-value right-primitive))))) + ((object-value left-obj object) + (case right-value + (((undefined-value null-value)) (oneof normal false)) + ((boolean-value right-bool boolean) + (letexc (left-primitive value (coerce-to-primitive left-value (oneof no-hint))) + (compare-values left-primitive (oneof double-value (coerce-boolean-to-double right-bool))))) + (((double-value string-value)) + (letexc (left-primitive value (coerce-to-primitive left-value (oneof no-hint))) + (compare-values left-primitive right-value))) + ((object-value right-obj object) + (oneof normal (address-equal (& properties left-obj) (& properties right-obj)))))))) + + (define (compare-double-to-value (left-number double) (right-value value)) boolean-or-exception + (case right-value + (((undefined-value null-value)) (oneof normal false)) + (((boolean-value double-value string-value)) + (letexc (right-number double (coerce-to-double right-value)) + (oneof normal (double-equal left-number right-number)))) + (object-value + (letexc (right-primitive value (coerce-to-primitive right-value (oneof no-hint))) + (compare-double-to-value left-number right-primitive))))) + + (define (double-equal (x double) (y double)) boolean + (double-compare x y false true false false)) + + (define (strict-compare-values (left-value value) (right-value value)) boolean + (case left-value + (undefined-value + (is undefined-value right-value)) + (null-value + (is null-value right-value)) + ((boolean-value left-bool boolean) + (case right-value + ((boolean-value right-bool boolean) (not (xor left-bool right-bool))) + (((undefined-value null-value double-value string-value object-value)) false))) + ((double-value left-number double) + (case right-value + ((double-value right-number double) (double-equal left-number right-number)) + (((undefined-value null-value boolean-value string-value object-value)) false))) + ((string-value left-str string) + (case right-value + ((string-value right-str string) + (compare-strings left-str right-str false true false)) + (((undefined-value null-value boolean-value double-value object-value)) false))) + ((object-value left-obj object) + (case right-value + ((object-value right-obj object) + (address-equal (& properties left-obj) (& properties right-obj))) + (((undefined-value null-value boolean-value double-value string-value)) false))))) + + (%section "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 + (eval (eval :equality-expression))) + (production (:bitwise-and-expression :expr-kind) ((:bitwise-and-expression any-value) & (:equality-expression any-value)) bitwise-and-expression-and + ((eval (e env)) + (letexc (left-value value ((eval :bitwise-and-expression) e)) + (letexc (right-value value ((eval :equality-expression) e)) + (apply-binary-bitwise-operator bitwise-and left-value right-value))))) + + (declare-action eval (:bitwise-xor-expression :expr-kind) (-> (env) value-or-exception)) + (production (:bitwise-xor-expression :expr-kind) ((:bitwise-and-expression :expr-kind)) bitwise-xor-expression-bitwise-and + (eval (eval :bitwise-and-expression))) + (production (:bitwise-xor-expression :expr-kind) ((:bitwise-xor-expression any-value) ^ (:bitwise-and-expression any-value)) bitwise-xor-expression-xor + ((eval (e env)) + (letexc (left-value value ((eval :bitwise-xor-expression) e)) + (letexc (right-value value ((eval :bitwise-and-expression) e)) + (apply-binary-bitwise-operator bitwise-xor left-value right-value))))) + + (declare-action eval (:bitwise-or-expression :expr-kind) (-> (env) value-or-exception)) + (production (:bitwise-or-expression :expr-kind) ((:bitwise-xor-expression :expr-kind)) bitwise-or-expression-bitwise-xor + (eval (eval :bitwise-xor-expression))) + (production (:bitwise-or-expression :expr-kind) ((:bitwise-or-expression any-value) \| (:bitwise-xor-expression any-value)) bitwise-or-expression-or + ((eval (e env)) + (letexc (left-value value ((eval :bitwise-or-expression) e)) + (letexc (right-value value ((eval :bitwise-xor-expression) e)) + (apply-binary-bitwise-operator bitwise-or left-value right-value))))) + (%print-actions) + + (define (apply-binary-bitwise-operator (operator (-> (integer integer) integer)) (left-value value) (right-value value)) value-or-exception + (letexc (left-int integer (coerce-to-int32 left-value)) + (letexc (right-int integer (coerce-to-int32 right-value)) + (integer-result (operator left-int right-int))))) + + (%section "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 + (eval (eval :bitwise-or-expression))) + (production (:logical-and-expression :expr-kind) ((:logical-and-expression any-value) && (:bitwise-or-expression any-value)) logical-and-expression-and + ((eval (e env)) + (letexc (left-value value ((eval :logical-and-expression) e)) + (if (coerce-to-boolean left-value) + ((eval :bitwise-or-expression) e) + (oneof normal left-value))))) + + (declare-action eval (:logical-or-expression :expr-kind) (-> (env) value-or-exception)) + (production (:logical-or-expression :expr-kind) ((:logical-and-expression :expr-kind)) logical-or-expression-logical-and + (eval (eval :logical-and-expression))) + (production (:logical-or-expression :expr-kind) ((:logical-or-expression any-value) \|\| (:logical-and-expression any-value)) logical-or-expression-or + ((eval (e env)) + (letexc (left-value value ((eval :logical-or-expression) e)) + (if (coerce-to-boolean left-value) + (oneof normal left-value) + ((eval :logical-and-expression) e))))) + (%print-actions) + + (%section "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 + (eval (eval :logical-or-expression))) + (production (:conditional-expression :expr-kind) ((:logical-or-expression any-value) ? (:assignment-expression any-value) \: (:assignment-expression any-value)) conditional-expression-conditional + ((eval (e env)) + (letexc (condition value ((eval :logical-or-expression) e)) + (if (coerce-to-boolean condition) + ((eval :assignment-expression 1) e) + ((eval :assignment-expression 2) e))))) + (%print-actions) + + (%section "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 + (eval (eval :conditional-expression))) + (production (:assignment-expression :expr-kind) (:lvalue = (:assignment-expression any-value)) assignment-expression-assignment + ((eval (e env)) + (letexc (left-reference reference ((eval :lvalue) e)) + (letexc (right-value value ((eval :assignment-expression) e)) + (letexc (u void (reference-put-value left-reference right-value) :unused) + (oneof normal right-value)))))) + #| + (production (:assignment-expression :expr-kind) (:lvalue :compound-assignment (:assignment-expression any-value)) assignment-expression-compound-assignment + ((eval (e env)) + (letexc (left-reference reference ((eval :lvalue) e)) + (letexc (left-value value (reference-get-value left-reference)) + (letexc (right-value value ((eval :assignment-expression) e)) + (letexc (res-value ((compound-operator :compound-assignment) left-value right-value)) + (letexc (u void (reference-put-value left-reference res-value) :unused) + (oneof normal res-value)))))))) + + (declare-action compound-operator :compound-assignment (-> (value value) value-or-exception)) + (production :compound-assignment (*=) compound-assignment-multiply + (compound-operator (binary-double-compound-operator double-multiply))) + (production :compound-assignment (/=) compound-assignment-divide + (compound-operator (binary-double-compound-operator double-divide))) + (production :compound-assignment (%=) compound-assignment-remainder + (compound-operator (binary-double-compound-operator double-remainder))) + (production :compound-assignment (+=) compound-assignment-add + (compound-operator (binary-double-compound-operator double-remainder))) + (production :compound-assignment (-=) compound-assignment-subtract + (compound-operator (binary-double-compound-operator double-subtract))) + (%print-actions) + + (define (binary-double-compound-operator (operator (-> (double double) double))) (-> (value value) value-or-exception) + (lambda ((left-value value) (right-value value)) + (letexc (left-number double (coerce-to-double left-value)) + (letexc (right-number double (coerce-to-double right-value)) + (oneof normal (oneof double-value (operator left-number right-number))))))) + |# + (%section "Expressions") + + (declare-action eval (:comma-expression :expr-kind) (-> (env) value-or-exception)) + (production (:comma-expression :expr-kind) ((:assignment-expression :expr-kind)) comma-expression-assignment + (eval (eval :assignment-expression))) + (%print-actions) + + (declare-action eval :expression (-> (env) value-or-exception)) + (production :expression ((:comma-expression any-value)) expression-comma-expression + (eval (eval :comma-expression))) + (%print-actions) + + (%section "Programs") + + (declare-action eval :program value-or-exception) + (production :program (:expression $end) program + (eval ((eval :expression) (tuple env (oneof null-object-or-null))))) + ))) + + (defparameter *gg* (world-grammar *gw* 'code-grammar))) + + +(defun token-terminal (token) + (if (symbolp token) + token + (car token))) + +(defun ecma-parse-tokens (tokens &key trace) + (action-parse *gg* #'token-terminal tokens :trace trace)) + + +(defun ecma-parse (string &key trace) + (let ((tokens (tokenize string))) + (when trace + (format *trace-output* "~S~%" tokens)) + (action-parse *gg* #'token-terminal tokens :trace trace))) + + +; Same as ecma-parse except that also print the action results nicely. +(defun ecma-pparse (string &key (stream t) trace) + (multiple-value-bind (results types) (ecma-parse string :trace trace) + (print-values results types stream) + (terpri stream) + (values results types))) + + +#| +(depict-rtf-to-local-file + "ECMA Grammar.rtf" + #'(lambda (rtf-stream) + (depict-world-commands rtf-stream *gw*))) + +(depict-html-to-local-file + "ECMA Grammar.html" + #'(lambda (rtf-stream) + (depict-world-commands rtf-stream *gw*)) + "ECMA Grammar") + +(with-local-output (s "ECMA Grammar.txt") (print-grammar *gg* s)) + + +(ecma-pparse "('abc')") +(ecma-pparse "!~ 352") +(ecma-pparse "1e308%.125") +(ecma-pparse "-3>>>10-6") +(ecma-pparse "-3>>0") +(ecma-pparse "1+2*3|16") +(ecma-pparse "1==true") +(ecma-pparse "1=true") +(ecma-pparse "x=true") +(ecma-pparse "2*4+17+0x32") +(ecma-pparse "+'ab'+'de'") +|# diff --git a/mozilla/js/semantics/ECMA Grammar.rtf b/mozilla/js/semantics/ECMA Grammar.rtf new file mode 100644 index 00000000000..a72cfd4999b --- /dev/null +++ b/mozilla/js/semantics/ECMA Grammar.rtf @@ -0,0 +1,1860 @@ +{\rtf1\mac\ansicpg10000\uc1\deff0\deflang2057\deflangfe2057 +{\fonttbl{\f0\froman\fcharset256\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\f3\ftech\fcharset2\fprq2 Symbol;}{\f4\fnil\fcharset256\fprq2 Helvetica;} +{\f5\fmodern\fcharset256\fprq2 Courier New;}{\f6\fnil\fcharset256\fprq2 Palatino;} +{\f7\fscript\fcharset256\fprq2 Zapf Chancery;}{\f8\ftech\fcharset2\fprq2 Zapf Dingbats;}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; +\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0 +\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0 +\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;} +{\stylesheet{\widctlpar\fs20\lang2057\snext0 Normal;} +{\s1\qj\sa120\widctlpar\fs20\lang2057\sbasedon0\snext1 Body Text;} +{\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057\sbasedon3\snext1 heading 3;} +{\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057\sbasedon0\snext1 heading 4;} +{\s10\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext10 Grammar;} +{\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057\sbasedon0\snext12 Grammar Header;} +{\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext14 Grammar LHS;} +{\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar LHS Last;} +{\s14\fi-1260\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon10\snext14 Grammar +RHS;} +{\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon14\snext12 Grammar +RHS Last;} +{\s16\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar Argument;} +{\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext20 Semantics;} +{\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon20\snext21 Semantics Next;} +{\*\cs30\additive Default Paragraph Font;} +{\*\cs31\b\f5\cf2\lang1024\additive\sbasedon30 Character Literal;} +{\*\cs32\b0\f0\cf9\additive\sbasedon30 Character Literal Control;} +{\*\cs33\b\f6\cf10\lang1024\additive\sbasedon30 Terminal;} +{\*\cs34\b\f5\cf2\lang1024\additive\sbasedon33 Terminal Keyword;} +{\*\cs35\i\f6\cf13\lang1024\additive\sbasedon30 Nonterminal;} +{\*\cs36\i0\additive\sbasedon30 Nonterminal Attribute;} +{\*\cs37\additive\sbasedon30 Nonterminal Argument;} +{\*\cs40\b\f0\additive\sbasedon30 Semantic Keyword;} +{\*\cs41\f0\cf6\lang1024\additive\sbasedon30 Type Expression;} +{\*\cs42\scaps\f0\cf6\lang1024\additive\sbasedon41 Type Name;} +{\*\cs43\f4\cf6\lang1024\additive\sbasedon41 Field Name;} +{\*\cs44\i\f0\cf11\lang1024\additive\sbasedon30 Global Variable;} +{\*\cs45\i\f0\cf4\lang1024\additive\sbasedon30 Local Variable;} +{\*\cs46\f7\cf12\lang1024\additive\sbasedon30 Action Name;}} +\widowctrl\ftnbj\aenddoc\fet0\formshade\viewkind4\viewscale125\pgbrdrhead\pgbrdrfoot\sectd\pard +\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Types\par\pard\plain\s11\sb60 +\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 Value}\line = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{\line {\cs43\f4\cf6\lang1024 undefinedValue}; +\line {\cs43\f4\cf6\lang1024 nullValue};\line +{\cs43\f4\cf6\lang1024 booleanValue}: {\cs42\scaps\f0\cf6\lang1024 Boolean};\line +{\cs43\f4\cf6\lang1024 doubleValue}: {\cs42\scaps\f0\cf6\lang1024 Double};\line +{\cs43\f4\cf6\lang1024 stringValue}: {\cs42\scaps\f0\cf6\lang1024 String};\line +{\cs43\f4\cf6\lang1024 objectValue}: {\cs42\scaps\f0\cf6\lang1024 Object}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 ObjectOrNull} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 nullObjectOrNull}; +{\cs43\f4\cf6\lang1024 objectObjectOrNull}: {\cs42\scaps\f0\cf6\lang1024 Object}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 Object}\line = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 tuple} \{\line {\cs43\f4\cf6\lang1024 properties}: +{\cs42\scaps\f0\cf6\lang1024 Property}[] +{\field{\*\fldinst SYMBOL 173 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}};\line +{\cs43\f4\cf6\lang1024 typeofName}: {\cs42\scaps\f0\cf6\lang1024 String};\line +{\cs43\f4\cf6\lang1024 prototype}: {\cs42\scaps\f0\cf6\lang1024 ObjectOrNull};\line +{\cs43\f4\cf6\lang1024 get}: {\cs42\scaps\f0\cf6\lang1024 PropName} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 ValueOrException};\line {\cs43\f4\cf6\lang1024 put}: +{\cs42\scaps\f0\cf6\lang1024 PropName} +{\field{\*\fldinst SYMBOL 180 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 Value} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 VoidOrException};\line {\cs43\f4\cf6\lang1024 delete}: +{\cs42\scaps\f0\cf6\lang1024 PropName} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 BooleanOrException};\line {\cs43\f4\cf6\lang1024 call}: +{\cs42\scaps\f0\cf6\lang1024 ObjectOrNull} +{\field{\*\fldinst SYMBOL 180 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 Value}[] +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 ReferenceOrException};\line +{\cs43\f4\cf6\lang1024 construct}: {\cs42\scaps\f0\cf6\lang1024 Value}[] +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 ObjectOrException};\line +{\cs43\f4\cf6\lang1024 defaultValue}: {\cs42\scaps\f0\cf6\lang1024 DefaultValueHint} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 ValueOrException}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 DefaultValueHint} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 noHint}; +{\cs43\f4\cf6\lang1024 numberHint}; {\cs43\f4\cf6\lang1024 stringHint}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 Property}\line = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 tuple} \{\line {\cs43\f4\cf6\lang1024 name}: +{\cs42\scaps\f0\cf6\lang1024 String};\line {\cs43\f4\cf6\lang1024 readOnly}: +{\cs42\scaps\f0\cf6\lang1024 Boolean};\line {\cs43\f4\cf6\lang1024 enumerable}: +{\cs42\scaps\f0\cf6\lang1024 Boolean};\line {\cs43\f4\cf6\lang1024 permanent}: +{\cs42\scaps\f0\cf6\lang1024 Boolean};\line {\cs43\f4\cf6\lang1024 value}: +{\cs42\scaps\f0\cf6\lang1024 Value} +{\field{\*\fldinst SYMBOL 173 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 PropName} = {\cs42\scaps\f0\cf6\lang1024 String} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 Place} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 tuple} \{{\cs43\f4\cf6\lang1024 base}: +{\cs42\scaps\f0\cf6\lang1024 Object}; {\cs43\f4\cf6\lang1024 property}: +{\cs42\scaps\f0\cf6\lang1024 PropName}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 Reference}\line = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 valueReference}: +{\cs42\scaps\f0\cf6\lang1024 Value}; {\cs43\f4\cf6\lang1024 placeReference}: +{\cs42\scaps\f0\cf6\lang1024 Place}; {\cs43\f4\cf6\lang1024 virtualReference}: +{\cs42\scaps\f0\cf6\lang1024 PropName}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 IntegerOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 Integer}; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 VoidOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}; +{\cs43\f4\cf6\lang1024 abrupt}: {\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 BooleanOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 DoubleOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 Double}; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 StringOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 String}; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 ObjectOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 Object}; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 Value}; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 ReferenceOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 Reference}; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 ValueListOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 Value}[]; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Helper Functions\par +\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20 +\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs44\i\f0\cf11\lang1024 objectOrNullToValue}({\cs45\i\f0\cf4\lang1024 o}: +{\cs42\scaps\f0\cf6\lang1024 ObjectOrNull}) : {\cs42\scaps\f0\cf6\lang1024 Value}\line = +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 o} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 nullObjectOrNull}: {\cs43\f4\cf6\lang1024 nullValue};\line +{\cs43\f4\cf6\lang1024 objectObjectOrNull}({\cs45\i\f0\cf4\lang1024 obj}: +{\cs42\scaps\f0\cf6\lang1024 Object}): {\cs43\f4\cf6\lang1024 objectValue} +{\cs45\i\f0\cf4\lang1024 obj}\line {\cs40\b\f0 end}\par +{\cs44\i\f0\cf11\lang1024 undefinedResult} : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs43\f4\cf6\lang1024 normal} {\cs43\f4\cf6\lang1024 undefinedValue}\par +{\cs44\i\f0\cf11\lang1024 nullResult} : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs43\f4\cf6\lang1024 normal} {\cs43\f4\cf6\lang1024 nullValue}\par +{\cs44\i\f0\cf11\lang1024 booleanResult}({\cs45\i\f0\cf4\lang1024 b}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}) : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs43\f4\cf6\lang1024 normal} {\cs43\f4\cf6\lang1024 booleanValue} {\cs45\i\f0\cf4\lang1024 b}\par +{\cs44\i\f0\cf11\lang1024 doubleResult}({\cs45\i\f0\cf4\lang1024 d}: +{\cs42\scaps\f0\cf6\lang1024 Double}) : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs43\f4\cf6\lang1024 normal} {\cs43\f4\cf6\lang1024 doubleValue} {\cs45\i\f0\cf4\lang1024 d}\par +{\cs44\i\f0\cf11\lang1024 integerResult}({\cs45\i\f0\cf4\lang1024 i}: +{\cs42\scaps\f0\cf6\lang1024 Integer}) : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs44\i\f0\cf11\lang1024 doubleResult}({\cs44\i\f0\cf11\lang1024 rationalToDouble}( +{\cs45\i\f0\cf4\lang1024 i}))\par{\cs44\i\f0\cf11\lang1024 stringResult}({\cs45\i\f0\cf4\lang1024 s} +: {\cs42\scaps\f0\cf6\lang1024 String}) : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs43\f4\cf6\lang1024 normal} {\cs43\f4\cf6\lang1024 stringValue} {\cs45\i\f0\cf4\lang1024 s}\par +{\cs44\i\f0\cf11\lang1024 objectResult}({\cs45\i\f0\cf4\lang1024 o}: +{\cs42\scaps\f0\cf6\lang1024 Object}) : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs43\f4\cf6\lang1024 normal} {\cs43\f4\cf6\lang1024 objectValue} {\cs45\i\f0\cf4\lang1024 o}\par +\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Exceptions\par\pard\plain +\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60 +\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 type} +{\cs42\scaps\f0\cf6\lang1024 Exception} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 exception}: +{\cs42\scaps\f0\cf6\lang1024 Value}; {\cs43\f4\cf6\lang1024 error}: +{\cs42\scaps\f0\cf6\lang1024 Error}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 Error}\line = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{\line +{\cs43\f4\cf6\lang1024 coerceToPrimitiveError};\line +{\cs43\f4\cf6\lang1024 coerceToObjectError};\line {\cs43\f4\cf6\lang1024 getValueError}; +\line {\cs43\f4\cf6\lang1024 putValueError};\line +{\cs43\f4\cf6\lang1024 deleteError}\}} +\par{\cs44\i\f0\cf11\lang1024 makeError}({\cs45\i\f0\cf4\lang1024 err}: +{\cs42\scaps\f0\cf6\lang1024 Error}) : {\cs42\scaps\f0\cf6\lang1024 Exception} = +{\cs43\f4\cf6\lang1024 error} {\cs45\i\f0\cf4\lang1024 err}\par\pard\plain\s2\sa60\keep\keepn +\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Objects\par Conversions\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs44\i\f0\cf11\lang1024 referenceGetValue}( +{\cs45\i\f0\cf4\lang1024 rv}: {\cs42\scaps\f0\cf6\lang1024 Reference}) : +{\cs42\scaps\f0\cf6\lang1024 ValueOrException}\line = {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 rv} {\cs40\b\f0 of}\line {\cs43\f4\cf6\lang1024 valueReference}( +{\cs45\i\f0\cf4\lang1024 v}: {\cs42\scaps\f0\cf6\lang1024 Value}): {\cs43\f4\cf6\lang1024 normal} +{\cs45\i\f0\cf4\lang1024 v};\line {\cs43\f4\cf6\lang1024 placeReference}( +{\cs45\i\f0\cf4\lang1024 r}: {\cs42\scaps\f0\cf6\lang1024 Place}): {\cs45\i\f0\cf4\lang1024 r}. +{\cs43\f4\cf6\lang1024 base}.{\cs43\f4\cf6\lang1024 get}({\cs45\i\f0\cf4\lang1024 r}. +{\cs43\f4\cf6\lang1024 property});\line {\cs43\f4\cf6\lang1024 virtualReference}: +{\cs43\f4\cf6\lang1024 abrupt}{\sub\cs42\scaps\f0\cf6\lang1024 ValueOrException} +{\cs44\i\f0\cf11\lang1024 makeError}({\cs43\f4\cf6\lang1024 getValueError})\line +{\cs40\b\f0 end}\par{\cs44\i\f0\cf11\lang1024 referencePutValue}({\cs45\i\f0\cf4\lang1024 rv}: +{\cs42\scaps\f0\cf6\lang1024 Reference}, {\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 VoidOrException}\line = +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rv} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 valueReference}: {\cs43\f4\cf6\lang1024 abrupt} +{\sub\cs42\scaps\f0\cf6\lang1024 VoidOrException} {\cs44\i\f0\cf11\lang1024 makeError}( +{\cs43\f4\cf6\lang1024 putValueError});\line {\cs43\f4\cf6\lang1024 placeReference}( +{\cs45\i\f0\cf4\lang1024 r}: {\cs42\scaps\f0\cf6\lang1024 Place}): {\cs45\i\f0\cf4\lang1024 r}. +{\cs43\f4\cf6\lang1024 base}.{\cs43\f4\cf6\lang1024 put}({\cs45\i\f0\cf4\lang1024 r}. +{\cs43\f4\cf6\lang1024 property}, {\cs45\i\f0\cf4\lang1024 v});\line +{\cs43\f4\cf6\lang1024 virtualReference}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\line {\cs40\b\f0 end} +\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Coercions\par\pard +\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs44\i\f0\cf11\lang1024 coerceToBoolean}( +{\cs45\i\f0\cf4\lang1024 v}: {\cs42\scaps\f0\cf6\lang1024 Value}) : +{\cs42\scaps\f0\cf6\lang1024 Boolean}\line = {\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 v} +{\cs40\b\f0 of}\line {\cs43\f4\cf6\lang1024 undefinedValue}, +{\cs43\f4\cf6\lang1024 nullValue}: {\cs44\i\f0\cf11\lang1024 false};\line +{\cs43\f4\cf6\lang1024 booleanValue}({\cs45\i\f0\cf4\lang1024 b}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}): {\cs45\i\f0\cf4\lang1024 b};\line +{\cs43\f4\cf6\lang1024 doubleValue}({\cs45\i\f0\cf4\lang1024 d}: +{\cs42\scaps\f0\cf6\lang1024 Double}): {\cs40\b\f0 not} ({\cs44\i\f0\cf11\lang1024 doubleIsZero}( +{\cs45\i\f0\cf4\lang1024 d}) {\cs40\b\f0 or} {\cs44\i\f0\cf11\lang1024 doubleIsNan}( +{\cs45\i\f0\cf4\lang1024 d}));\line {\cs43\f4\cf6\lang1024 stringValue}( +{\cs45\i\f0\cf4\lang1024 s}: {\cs42\scaps\f0\cf6\lang1024 String}): +{\cs44\i\f0\cf11\lang1024 length}({\cs45\i\f0\cf4\lang1024 s}) \u8800\'AD 0;\line +{\cs43\f4\cf6\lang1024 objectValue}: {\cs44\i\f0\cf11\lang1024 true}\line {\cs40\b\f0 end} +\par{\cs44\i\f0\cf11\lang1024 coerceBooleanToDouble}({\cs45\i\f0\cf4\lang1024 b}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}) : {\cs42\scaps\f0\cf6\lang1024 Double}\line = +{\cs40\b\f0 if} {\cs45\i\f0\cf4\lang1024 b}\line {\cs40\b\f0 then} 1.0\line +{\cs40\b\f0 else} 0.0\par{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 DoubleOrException}\line = +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 v} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}: {\cs43\f4\cf6\lang1024 normal} NaN;\line +{\cs43\f4\cf6\lang1024 nullValue}: {\cs43\f4\cf6\lang1024 normal} 0.0;\line +{\cs43\f4\cf6\lang1024 booleanValue}({\cs45\i\f0\cf4\lang1024 b}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}): {\cs43\f4\cf6\lang1024 normal} +{\cs44\i\f0\cf11\lang1024 coerceBooleanToDouble}({\cs45\i\f0\cf4\lang1024 b});\line +{\cs43\f4\cf6\lang1024 doubleValue}({\cs45\i\f0\cf4\lang1024 d}: +{\cs42\scaps\f0\cf6\lang1024 Double}): {\cs43\f4\cf6\lang1024 normal} {\cs45\i\f0\cf4\lang1024 d}; +\line {\cs43\f4\cf6\lang1024 stringValue}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}};\line +{\cs43\f4\cf6\lang1024 objectValue}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\line {\cs40\b\f0 end} +\par{\cs44\i\f0\cf11\lang1024 coerceToUint32}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 IntegerOrException}\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 d}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 v})\line {\cs40\b\f0 in} +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 doubleToUint32}({\cs45\i\f0\cf4\lang1024 d} +)\par{\cs44\i\f0\cf11\lang1024 coerceToInt32}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 IntegerOrException}\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 d}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 v})\line {\cs40\b\f0 in} +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 uint32ToInt32}( +{\cs44\i\f0\cf11\lang1024 doubleToUint32}({\cs45\i\f0\cf4\lang1024 d}))\par +{\cs44\i\f0\cf11\lang1024 uint32ToInt32}({\cs45\i\f0\cf4\lang1024 ui}: +{\cs42\scaps\f0\cf6\lang1024 Integer}) : {\cs42\scaps\f0\cf6\lang1024 Integer}\line = +{\cs40\b\f0 if} {\cs45\i\f0\cf4\lang1024 ui} < 2147483648\line {\cs40\b\f0 then} +{\cs45\i\f0\cf4\lang1024 ui}\line {\cs40\b\f0 else} {\cs45\i\f0\cf4\lang1024 ui} \endash 42949 +67296\par{\cs44\i\f0\cf11\lang1024 coerceToString}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 StringOrException}\line = +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 v} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}: {\cs43\f4\cf6\lang1024 normal} \ldblquote +{\cs31\b\f5\cf2\lang1024 undefined}\rdblquote;\line {\cs43\f4\cf6\lang1024 nullValue}: +{\cs43\f4\cf6\lang1024 normal} \ldblquote{\cs31\b\f5\cf2\lang1024 null}\rdblquote;\line +{\cs43\f4\cf6\lang1024 booleanValue}({\cs45\i\f0\cf4\lang1024 b}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}):\line {\cs40\b\f0 if} +{\cs45\i\f0\cf4\lang1024 b}\line {\cs40\b\f0 then} {\cs43\f4\cf6\lang1024 normal} +\ldblquote{\cs31\b\f5\cf2\lang1024 true}\rdblquote\line {\cs40\b\f0 else} +{\cs43\f4\cf6\lang1024 normal} \ldblquote{\cs31\b\f5\cf2\lang1024 false}\rdblquote;\line +{\cs43\f4\cf6\lang1024 doubleValue}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}};\line +{\cs43\f4\cf6\lang1024 stringValue}({\cs45\i\f0\cf4\lang1024 s}: +{\cs42\scaps\f0\cf6\lang1024 String}): {\cs43\f4\cf6\lang1024 normal} {\cs45\i\f0\cf4\lang1024 s}; +\line {\cs43\f4\cf6\lang1024 objectValue}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\line {\cs40\b\f0 end} +\par{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}, {\cs45\i\f0\cf4\lang1024 hint}: +{\cs42\scaps\f0\cf6\lang1024 DefaultValueHint}) : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} +\line = {\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 v} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}: {\cs43\f4\cf6\lang1024 normal} {\cs45\i\f0\cf4\lang1024 v}; +\line {\cs43\f4\cf6\lang1024 objectValue}({\cs45\i\f0\cf4\lang1024 o}: +{\cs42\scaps\f0\cf6\lang1024 Object}):\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 pv}: {\cs42\scaps\f0\cf6\lang1024 Value} = {\cs45\i\f0\cf4\lang1024 o}. +{\cs43\f4\cf6\lang1024 defaultValue}({\cs45\i\f0\cf4\lang1024 hint})\line +{\cs40\b\f0 in} {\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 pv} {\cs40\b\f0 of}\line + {\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}:\line {\cs43\f4\cf6\lang1024 normal} +{\cs45\i\f0\cf4\lang1024 pv};\line {\cs43\f4\cf6\lang1024 objectValue}: +{\cs43\f4\cf6\lang1024 abrupt}{\sub\cs42\scaps\f0\cf6\lang1024 ValueOrException} +{\cs44\i\f0\cf11\lang1024 makeError}({\cs43\f4\cf6\lang1024 coerceToPrimitiveError})\line + {\cs40\b\f0 end}\line {\cs40\b\f0 end}\par +{\cs44\i\f0\cf11\lang1024 coerceToObject}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 ObjectOrException}\line = +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 v} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}: +{\cs43\f4\cf6\lang1024 abrupt}{\sub\cs42\scaps\f0\cf6\lang1024 ObjectOrException} +{\cs44\i\f0\cf11\lang1024 makeError}({\cs43\f4\cf6\lang1024 coerceToObjectError});\line +{\cs43\f4\cf6\lang1024 booleanValue}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}};\line +{\cs43\f4\cf6\lang1024 doubleValue}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}};\line +{\cs43\f4\cf6\lang1024 stringValue}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}};\line +{\cs43\f4\cf6\lang1024 objectValue}({\cs45\i\f0\cf4\lang1024 o}: +{\cs42\scaps\f0\cf6\lang1024 Object}): {\cs43\f4\cf6\lang1024 normal} {\cs45\i\f0\cf4\lang1024 o} +\line {\cs40\b\f0 end}\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24 +\lang2057 Environments\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Seman +tics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 type} +{\cs42\scaps\f0\cf6\lang1024 Env} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 tuple} \{{\cs43\f4\cf6\lang1024 this}: +{\cs42\scaps\f0\cf6\lang1024 ObjectOrNull}\}} +\par{\cs44\i\f0\cf11\lang1024 lookupIdentifier}({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env}, {\cs45\i\f0\cf4\lang1024 id}: +{\cs42\scaps\f0\cf6\lang1024 String}) : {\cs42\scaps\f0\cf6\lang1024 ReferenceOrException} = +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s2\sa60\keep +\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Terminal Actions\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 EvalIdentifier}[ +{\cs33\b\f6\cf10\lang1024 Identifier}] : {\cs42\scaps\f0\cf6\lang1024 String}\par{\cs40\b\f0 action} + {\cs46\f7\cf12\lang1024 EvalNumber}[{\cs33\b\f6\cf10\lang1024 Number}] : +{\cs42\scaps\f0\cf6\lang1024 Double}\par{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 EvalString}[ +{\cs33\b\f6\cf10\lang1024 String}] : {\cs42\scaps\f0\cf6\lang1024 String}\par\pard\plain\s2\sa60 +\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Primary Expressions\par\pard\plain\s11\sb60 +\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 this}\par| +\tab{\cs34\b\f5\cf2\lang1024 null}\par|\tab{\cs34\b\f5\cf2\lang1024 true}\par|\tab +{\cs34\b\f5\cf2\lang1024 false}\par|\tab{\cs33\b\f6\cf10\lang1024 Number}\par|\tab +{\cs33\b\f6\cf10\lang1024 String}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024(} +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 noLValue} {\cs34\b\f5\cf2\lang1024)}\par +\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PrimaryLvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024 Identifier} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Lvalue} {\cs34\b\f5\cf2\lang1024)}\par\pard +\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 this} +]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) = {\cs43\f4\cf6\lang1024 normal} +{\cs44\i\f0\cf11\lang1024 objectOrNullToValue}({\cs45\i\f0\cf4\lang1024 e}. +{\cs43\f4\cf6\lang1024 this})\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 null} +]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) = +{\cs44\i\f0\cf11\lang1024 nullResult}\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 true} +]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) = +{\cs44\i\f0\cf11\lang1024 booleanResult}({\cs44\i\f0\cf11\lang1024 true})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 false}]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) = +{\cs44\i\f0\cf11\lang1024 booleanResult}({\cs44\i\f0\cf11\lang1024 false})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024 Number}]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) = + {\cs44\i\f0\cf11\lang1024 doubleResult}({\cs46\f7\cf12\lang1024 EvalNumber}[ +{\cs33\b\f6\cf10\lang1024 Number}])\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024 String}]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) = + {\cs44\i\f0\cf11\lang1024 stringResult}({\cs46\f7\cf12\lang1024 EvalString}[ +{\cs33\b\f6\cf10\lang1024 String}])\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024(} +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 noLValue} {\cs34\b\f5\cf2\lang1024)}] = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 noLValue}]\par +\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 PrimaryLvalue}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Re +ferenceOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryLvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024 Identifier}]({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs44\i\f0\cf11\lang1024 lookupIdentifier}( +{\cs45\i\f0\cf4\lang1024 e}, {\cs46\f7\cf12\lang1024 EvalIdentifier}[ +{\cs33\b\f6\cf10\lang1024 Identifier}])\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryLvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024(} +{\cs35\i\f6\cf13\lang1024 Lvalue} {\cs34\b\f5\cf2\lang1024)}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Lvalue}]\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b +\fs24\lang2057 Left-Side Expressions\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20 +\lang2057 Syntax\par\pard\plain\s16\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 206 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \{ +{\cs35\i\f6\cf13\lang1024\cs36\i0 anyValue}, {\cs35\i\f6\cf13\lang1024\cs36\i0 noLValue}\}\par +{\cs35\i\f6\cf13\lang1024\cs37 MemberExprKind} +{\field{\*\fldinst SYMBOL 206 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \{ +{\cs35\i\f6\cf13\lang1024\cs36\i0 call}, {\cs35\i\f6\cf13\lang1024\cs36\i0 noCall}\}\par\pard\plain +\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 noCall} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 PrimaryLvalue}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024[} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024]}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024.} {\cs33\b\f6\cf10\lang1024 Identifier}\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 call} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 Lvalue} +{\cs35\i\f6\cf13\lang1024 Arguments}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 noLValue} +{\cs35\i\f6\cf13\lang1024 Arguments}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 call},\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024[} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024]}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 call},\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024.} {\cs33\b\f6\cf10\lang1024 Identifier}\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 noLValue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 new} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 anyValue} +{\cs35\i\f6\cf13\lang1024 Arguments}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 anyValue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 noCall}\par\pard\plain\s15\fi-1260\li1800\sa120 +\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 new} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 anyValue} +{\cs35\i\f6\cf13\lang1024 Arguments}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 call},\cs36\i0 anyValue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 call}\par\pard\plain\s12\fi-1440\li1800\sb120 +\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs37 ExprKind}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs34\b\f5\cf2\lang1024 new} {\cs35\i\f6\cf13\lang1024 NewExpression\super\cs36\i0 anyValue}\par +\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Arguments} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024(} +{\cs34\b\f5\cf2\lang1024)}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0 +\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 ArgumentList} +{\cs34\b\f5\cf2\lang1024)}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ArgumentList} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ArgumentList} {\cs34\b\f5\cf2\lang1024,} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Lvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 call}\par\pard\plain\s15\fi-1260\li1800\sa120 +\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 noCall}\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs37 MemberExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Re +ferenceOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 noCall} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 PrimaryLvalue}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryLvalue}]\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 call} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Lvalue} {\cs35\i\f6\cf13\lang1024 Arguments}]({\cs45\i\f0\cf4\lang1024 e}: + {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 functionReference}: {\cs42\scaps\f0\cf6\lang1024 Reference} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line + {\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 function}: +{\cs42\scaps\f0\cf6\lang1024 Value} = {\cs44\i\f0\cf11\lang1024 referenceGetValue}( +{\cs45\i\f0\cf4\lang1024 functionReference})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 arguments}: {\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Value}[]} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Arguments}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 in} {\cs40\b\f0 let} {\cs45\i\f0\cf4\lang1024 this}: +{\cs42\scaps\f0\cf6\lang1024 ObjectOrNull}\line = {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 functionReference} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 valueReference}, {\cs43\f4\cf6\lang1024 virtualReference}: +{\cs43\f4\cf6\lang1024 nullObjectOrNull};\line +{\cs43\f4\cf6\lang1024 placeReference}({\cs45\i\f0\cf4\lang1024 p}: +{\cs42\scaps\f0\cf6\lang1024 Place}): {\cs43\f4\cf6\lang1024 objectObjectOrNull} +{\cs45\i\f0\cf4\lang1024 p}.{\cs43\f4\cf6\lang1024 base}\line {\cs40\b\f0 end} +\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 callObject}({\cs45\i\f0\cf4\lang1024 function}, + {\cs45\i\f0\cf4\lang1024 this}, {\cs45\i\f0\cf4\lang1024 arguments})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 call} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 noLValue} +{\cs35\i\f6\cf13\lang1024 Arguments}]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env} +)\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 function}: +{\cs42\scaps\f0\cf6\lang1024 Value} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 noLValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 arguments}: {\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Value}[]} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Arguments}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 callObject}({\cs45\i\f0\cf4\lang1024 function}, + {\cs43\f4\cf6\lang1024 nullObjectOrNull}, {\cs45\i\f0\cf4\lang1024 arguments})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs37 MemberExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs37 MemberExprKind},\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024[} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024]}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 container}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs37 MemberExprKind},\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 property}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Expression}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 readProperty}( +{\cs45\i\f0\cf4\lang1024 container}, {\cs45\i\f0\cf4\lang1024 property})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs37 MemberExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs37 MemberExprKind},\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024.} {\cs33\b\f6\cf10\lang1024 Identifier}]\line ( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 container}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs37 MemberExprKind},\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 readProperty}( +{\cs45\i\f0\cf4\lang1024 container}, {\cs43\f4\cf6\lang1024 stringValue} +{\cs46\f7\cf12\lang1024 EvalIdentifier}[{\cs33\b\f6\cf10\lang1024 Identifier}])\par\pard\plain\s20 +\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs37 MemberExprKind},\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue}]\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs37 MemberExprKind},\cs36\i0 anyValue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs37 MemberExprKind}]({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 ref}: +{\cs42\scaps\f0\cf6\lang1024 Reference} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs37 MemberExprKind}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 referenceGetValue}( +{\cs45\i\f0\cf4\lang1024 ref})\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 new} +{\cs35\i\f6\cf13\lang1024 MemberExpression{\super{\cs36\i0 noCall},\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs35\i\f6\cf13\lang1024 Arguments}]\line ({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 constructor}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression{\super{\cs36\i0 noCall},\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 arguments}: {\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Value}[]} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Arguments}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 constructObject}( +{\cs45\i\f0\cf4\lang1024 constructor}, {\cs45\i\f0\cf4\lang1024 arguments})\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs37 ExprKind}]\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 new} +{\cs35\i\f6\cf13\lang1024 NewExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 constructor}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 NewExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 constructObject}( +{\cs45\i\f0\cf4\lang1024 constructor}, {\b[]}{\sub\cs42\scaps\f0\cf6\lang1024 Value})\par\pard\plain +\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Arguments}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueListOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Arguments} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024(} +{\cs34\b\f5\cf2\lang1024)}]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) = +{\cs43\f4\cf6\lang1024 normal} {\b[]}{\sub\cs42\scaps\f0\cf6\lang1024 Value}\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Arguments} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024(} +{\cs35\i\f6\cf13\lang1024 ArgumentList} {\cs34\b\f5\cf2\lang1024)}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ArgumentList}]\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ArgumentList}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueListOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ArgumentList} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue}]({\cs45\i\f0\cf4\lang1024 e}: + {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 arg}: +{\cs42\scaps\f0\cf6\lang1024 Value} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 in} {\cs43\f4\cf6\lang1024 normal} {\b[}{\cs45\i\f0\cf4\lang1024 arg}{\b]} +\par{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ArgumentList} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ArgumentList\b0\i0\sub 1} {\cs34\b\f5\cf2\lang1024,} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue}]({\cs45\i\f0\cf4\lang1024 e}: + {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 args}: +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Value}[]} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ArgumentList\b0\i0\sub 1}]({\cs45\i\f0\cf4\lang1024 e})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 arg}: +{\cs42\scaps\f0\cf6\lang1024 Value} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 in} {\cs43\f4\cf6\lang1024 normal} ({\cs45\i\f0\cf4\lang1024 args} +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs45\i\f0\cf4\lang1024 arg}{\b]})\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Lvalue}] : + +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Re +ferenceOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Lvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 call}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 call}]\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Lvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 noCall}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 noCall}]\par\pard\plain\s20\li180\sb60\sa60 +\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs44\i\f0\cf11\lang1024 readProperty}( +{\cs45\i\f0\cf4\lang1024 container}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 property}: {\cs42\scaps\f0\cf6\lang1024 Value}) : +{\cs42\scaps\f0\cf6\lang1024 ReferenceOrException}\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 obj}: {\cs42\scaps\f0\cf6\lang1024 Object} = +{\cs44\i\f0\cf11\lang1024 coerceToObject}({\cs45\i\f0\cf4\lang1024 container})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 name}: +{\cs42\scaps\f0\cf6\lang1024 PropName} = {\cs44\i\f0\cf11\lang1024 coerceToString}( +{\cs45\i\f0\cf4\lang1024 property})\line {\cs40\b\f0 in} {\cs43\f4\cf6\lang1024 normal} +{\cs43\f4\cf6\lang1024 placeReference} +{\b{\field{\*\fldinst SYMBOL 225 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +{\cs45\i\f0\cf4\lang1024 obj}, {\cs45\i\f0\cf4\lang1024 name} +{\b{\field{\*\fldinst SYMBOL 241 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +{\sub\cs42\scaps\f0\cf6\lang1024 Place}\par{\cs44\i\f0\cf11\lang1024 callObject}( +{\cs45\i\f0\cf4\lang1024 function}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 this}: {\cs42\scaps\f0\cf6\lang1024 ObjectOrNull}, +{\cs45\i\f0\cf4\lang1024 arguments}: {\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Value}[]}) : + {\cs42\scaps\f0\cf6\lang1024 ReferenceOrException}\line = {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 function} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}:\line {\cs43\f4\cf6\lang1024 abrupt} +{\sub\cs42\scaps\f0\cf6\lang1024 ReferenceOrException} {\cs44\i\f0\cf11\lang1024 makeError}( +{\cs43\f4\cf6\lang1024 coerceToObjectError});\line {\cs43\f4\cf6\lang1024 objectValue}( +{\cs45\i\f0\cf4\lang1024 o}: {\cs42\scaps\f0\cf6\lang1024 Object}): {\cs45\i\f0\cf4\lang1024 o}. +{\cs43\f4\cf6\lang1024 call}({\cs45\i\f0\cf4\lang1024 this}, {\cs45\i\f0\cf4\lang1024 arguments}) +\line {\cs40\b\f0 end}\par{\cs44\i\f0\cf11\lang1024 constructObject}( +{\cs45\i\f0\cf4\lang1024 constructor}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 arguments}: {\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Value}[]}) : + {\cs42\scaps\f0\cf6\lang1024 ValueOrException}\line = {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 constructor} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}:\line {\cs43\f4\cf6\lang1024 abrupt} +{\sub\cs42\scaps\f0\cf6\lang1024 ValueOrException} {\cs44\i\f0\cf11\lang1024 makeError}( +{\cs43\f4\cf6\lang1024 coerceToObjectError});\line {\cs43\f4\cf6\lang1024 objectValue}( +{\cs45\i\f0\cf4\lang1024 o}: {\cs42\scaps\f0\cf6\lang1024 Object}):\line +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 res}: {\cs42\scaps\f0\cf6\lang1024 Object} = +{\cs45\i\f0\cf4\lang1024 o}.{\cs43\f4\cf6\lang1024 construct}({\cs45\i\f0\cf4\lang1024 arguments}) +\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 objectResult}( +{\cs45\i\f0\cf4\lang1024 res})\line {\cs40\b\f0 end}\par\pard\plain\s2\sa60\keep\keepn +\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Postfix Expressions\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs36\i0 anyValue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs36\i0 anyValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 call},\cs36\i0 anyValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 Lvalue} {\cs34\b\f5\cf2\lang1024 ++}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 Lvalue} +{\cs34\b\f5\cf2\lang1024 --}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs36\i0 noLValue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs36\i0 noLValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 Lvalue} {\cs34\b\f5\cf2\lang1024 ++}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 Lvalue} +{\cs34\b\f5\cf2\lang1024 --}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20 +\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs37 ExprKind}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs37 ExprKind}]\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs36\i0 anyValue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 call},\cs36\i0 anyValue}]\line = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 call},\cs36\i0 anyValue}]\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Lvalue} {\cs34\b\f5\cf2\lang1024 ++}]({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operandReference}: {\cs42\scaps\f0\cf6\lang1024 Reference} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line + {\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operandValue}: +{\cs42\scaps\f0\cf6\lang1024 Value} = {\cs44\i\f0\cf11\lang1024 referenceGetValue}( +{\cs45\i\f0\cf4\lang1024 operandReference})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operand}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 operandValue})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 u}: {\cs42\scaps\f0\cf6\lang1024 Void} +\line = {\cs44\i\f0\cf11\lang1024 referencePutValue}( +{\cs45\i\f0\cf4\lang1024 operandReference}, {\cs43\f4\cf6\lang1024 doubleValue} +{\cs44\i\f0\cf11\lang1024 doubleAdd}({\cs45\i\f0\cf4\lang1024 operand}, 1.0))\line +{\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 doubleResult}({\cs45\i\f0\cf4\lang1024 operand})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Lvalue} {\cs34\b\f5\cf2\lang1024 --}]({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operandReference}: {\cs42\scaps\f0\cf6\lang1024 Reference} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line + {\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operandValue}: +{\cs42\scaps\f0\cf6\lang1024 Value} = {\cs44\i\f0\cf11\lang1024 referenceGetValue}( +{\cs45\i\f0\cf4\lang1024 operandReference})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operand}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 operandValue})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 u}: {\cs42\scaps\f0\cf6\lang1024 Void} +\line = {\cs44\i\f0\cf11\lang1024 referencePutValue}( +{\cs45\i\f0\cf4\lang1024 operandReference}, {\cs43\f4\cf6\lang1024 doubleValue} +{\cs44\i\f0\cf11\lang1024 doubleSubtract}({\cs45\i\f0\cf4\lang1024 operand}, 1.0))\line +{\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 doubleResult}({\cs45\i\f0\cf4\lang1024 operand})\par\pard +\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Unary Operators\par\pard\plain +\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs37 ExprKind}\par|\tab +{\cs34\b\f5\cf2\lang1024 delete} {\cs35\i\f6\cf13\lang1024 Lvalue}\par|\tab +{\cs34\b\f5\cf2\lang1024 void} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par +|\tab{\cs34\b\f5\cf2\lang1024 typeof} {\cs35\i\f6\cf13\lang1024 Lvalue}\par|\tab +{\cs34\b\f5\cf2\lang1024 typeof} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 noLValue} +\par|\tab{\cs34\b\f5\cf2\lang1024 ++} {\cs35\i\f6\cf13\lang1024 Lvalue}\par|\tab +{\cs34\b\f5\cf2\lang1024 --} {\cs35\i\f6\cf13\lang1024 Lvalue}\par|\tab{\cs34\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par|\tab +{\cs34\b\f5\cf2\lang1024 -} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par| +\tab{\cs34\b\f5\cf2\lang1024~} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par +\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs34\b\f5\cf2\lang1024!} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par +\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20 +\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs37 ExprKind}]\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 delete} {\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 rv}: +{\cs42\scaps\f0\cf6\lang1024 Reference} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rv} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 valueReference}: {\cs43\f4\cf6\lang1024 abrupt} +{\sub\cs42\scaps\f0\cf6\lang1024 ValueOrException} {\cs44\i\f0\cf11\lang1024 makeError}( +{\cs43\f4\cf6\lang1024 deleteError});\line {\cs43\f4\cf6\lang1024 placeReference}( +{\cs45\i\f0\cf4\lang1024 r}: {\cs42\scaps\f0\cf6\lang1024 Place}):\line +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 b}: {\cs42\scaps\f0\cf6\lang1024 Boolean} = +{\cs45\i\f0\cf4\lang1024 r}.{\cs43\f4\cf6\lang1024 base}.{\cs43\f4\cf6\lang1024 delete}( +{\cs45\i\f0\cf4\lang1024 r}.{\cs43\f4\cf6\lang1024 property})\line {\cs40\b\f0 in} + {\cs44\i\f0\cf11\lang1024 booleanResult}({\cs45\i\f0\cf4\lang1024 b});\line +{\cs43\f4\cf6\lang1024 virtualReference}: {\cs44\i\f0\cf11\lang1024 booleanResult}( +{\cs44\i\f0\cf11\lang1024 true})\line {\cs40\b\f0 end}\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 void} + {\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operand}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 undefinedResult} +\par{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 typeof} {\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 rv}: +{\cs42\scaps\f0\cf6\lang1024 Reference} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rv} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 valueReference}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}): {\cs44\i\f0\cf11\lang1024 stringResult}( +{\cs44\i\f0\cf11\lang1024 valueTypeof}({\cs45\i\f0\cf4\lang1024 v}));\line +{\cs43\f4\cf6\lang1024 placeReference}({\cs45\i\f0\cf4\lang1024 r}: +{\cs42\scaps\f0\cf6\lang1024 Place}):\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 v}: {\cs42\scaps\f0\cf6\lang1024 Value} = {\cs45\i\f0\cf4\lang1024 r}. +{\cs43\f4\cf6\lang1024 base}.{\cs43\f4\cf6\lang1024 get}({\cs45\i\f0\cf4\lang1024 r}. +{\cs43\f4\cf6\lang1024 property})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 stringResult}({\cs44\i\f0\cf11\lang1024 valueTypeof}( +{\cs45\i\f0\cf4\lang1024 v}));\line {\cs43\f4\cf6\lang1024 virtualReference}: +{\cs44\i\f0\cf11\lang1024 stringResult}(\ldblquote{\cs31\b\f5\cf2\lang1024 undefined}\rdblquote) +\line {\cs40\b\f0 end}\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 typeof} +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 noLValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 v}: {\cs42\scaps\f0\cf6\lang1024 Value} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 noLValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 stringResult}( +{\cs44\i\f0\cf11\lang1024 valueTypeof}({\cs45\i\f0\cf4\lang1024 v}))\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 ++} +{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) +\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operandReference}: +{\cs42\scaps\f0\cf6\lang1024 Reference} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operandValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 referenceGetValue}({\cs45\i\f0\cf4\lang1024 operandReference})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operand}: +{\cs42\scaps\f0\cf6\lang1024 Double} = {\cs44\i\f0\cf11\lang1024 coerceToDouble}( +{\cs45\i\f0\cf4\lang1024 operandValue})\line {\cs40\b\f0 in} {\cs40\b\f0 let} +{\cs45\i\f0\cf4\lang1024 res}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 doubleAdd}({\cs45\i\f0\cf4\lang1024 operand}, 1.0)\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 u}: {\cs42\scaps\f0\cf6\lang1024 Void} += {\cs44\i\f0\cf11\lang1024 referencePutValue}({\cs45\i\f0\cf4\lang1024 operandReference}, +{\cs43\f4\cf6\lang1024 doubleValue} {\cs45\i\f0\cf4\lang1024 res})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 doubleResult}({\cs45\i\f0\cf4\lang1024 res})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 --} +{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) +\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operandReference}: +{\cs42\scaps\f0\cf6\lang1024 Reference} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operandValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 referenceGetValue}({\cs45\i\f0\cf4\lang1024 operandReference})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operand}: +{\cs42\scaps\f0\cf6\lang1024 Double} = {\cs44\i\f0\cf11\lang1024 coerceToDouble}( +{\cs45\i\f0\cf4\lang1024 operandValue})\line {\cs40\b\f0 in} {\cs40\b\f0 let} +{\cs45\i\f0\cf4\lang1024 res}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 doubleSubtract}({\cs45\i\f0\cf4\lang1024 operand}, 1.0)\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 u}: {\cs42\scaps\f0\cf6\lang1024 Void} += {\cs44\i\f0\cf11\lang1024 referencePutValue}({\cs45\i\f0\cf4\lang1024 operandReference}, +{\cs43\f4\cf6\lang1024 doubleValue} {\cs45\i\f0\cf4\lang1024 res})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 doubleResult}({\cs45\i\f0\cf4\lang1024 res})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operandValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operand}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 operandValue})\line +{\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 doubleResult}({\cs45\i\f0\cf4\lang1024 operand})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 -} +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operandValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operand}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 operandValue})\line +{\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 doubleResult}({\cs44\i\f0\cf11\lang1024 doubleNegate}( +{\cs45\i\f0\cf4\lang1024 operand}))\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024~} +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operandValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operand}: {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 coerceToInt32}({\cs45\i\f0\cf4\lang1024 operandValue})\line +{\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 integerResult}({\cs44\i\f0\cf11\lang1024 bitwiseXor}( +{\cs45\i\f0\cf4\lang1024 operand}, -1))\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024!} +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operandValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 booleanResult}( +{\cs40\b\f0 not} {\cs44\i\f0\cf11\lang1024 coerceToBoolean}({\cs45\i\f0\cf4\lang1024 operandValue})) +\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs44\i\f0\cf11\lang1024 valueTypeof}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 String}\line = +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 v} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}: \ldblquote{\cs31\b\f5\cf2\lang1024 undefined}\rdblquote; +\line {\cs43\f4\cf6\lang1024 nullValue}: \ldblquote{\cs31\b\f5\cf2\lang1024 object} +\rdblquote;\line {\cs43\f4\cf6\lang1024 booleanValue}: \ldblquote +{\cs31\b\f5\cf2\lang1024 boolean}\rdblquote;\line {\cs43\f4\cf6\lang1024 doubleValue}: +\ldblquote{\cs31\b\f5\cf2\lang1024 number}\rdblquote;\line +{\cs43\f4\cf6\lang1024 stringValue}: \ldblquote{\cs31\b\f5\cf2\lang1024 string}\rdblquote;\line + {\cs43\f4\cf6\lang1024 objectValue}({\cs45\i\f0\cf4\lang1024 o}: +{\cs42\scaps\f0\cf6\lang1024 Object}): {\cs45\i\f0\cf4\lang1024 o}. +{\cs43\f4\cf6\lang1024 typeofName}\line {\cs40\b\f0 end}\par\pard\plain\s2\sa60\keep\keepn +\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Multiplicative Operators\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind}\par|\tab +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024*} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par| +\tab{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024/} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par +\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024%} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par +\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20 +\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind}]\par +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024*} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 applyBinaryDoubleOperator}({\cs44\i\f0\cf11\lang1024 doubleMultiply}, +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue})\par +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024/} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 applyBinaryDoubleOperator}({\cs44\i\f0\cf11\lang1024 doubleDivide}, +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue})\par +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024%} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 applyBinaryDoubleOperator}({\cs44\i\f0\cf11\lang1024 doubleRemainder}, +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue})\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs44\i\f0\cf11\lang1024 applyBinaryDoubleOperator}({\cs45\i\f0\cf4\lang1024 operator}: +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Double} +{\field{\*\fldinst SYMBOL 180 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 Double} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Do +uble} +, {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value})\line : +{\cs42\scaps\f0\cf6\lang1024 ValueOrException}\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftNumber}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 leftValue})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 rightNumber}: +{\cs42\scaps\f0\cf6\lang1024 Double} = {\cs44\i\f0\cf11\lang1024 coerceToDouble}( +{\cs45\i\f0\cf4\lang1024 rightValue})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 doubleResult}({\cs45\i\f0\cf4\lang1024 operator}( +{\cs45\i\f0\cf4\lang1024 leftNumber}, {\cs45\i\f0\cf4\lang1024 rightNumber}))\par\pard\plain\s2\sa60 +\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Additive Operators\par\pard\plain\s11\sb60 +\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind}\par|\tab +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024 -} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60 +\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind}]\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AdditiveExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue}]\line ( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AdditiveExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs43\f4\cf6\lang1024 noHint})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 rightValue}, +{\cs43\f4\cf6\lang1024 noHint})\line {\cs40\b\f0 in} {\cs40\b\f0 if} +{\cs45\i\f0\cf4\lang1024 leftPrimitive} {\cs40\b\f0 is} {\cs43\f4\cf6\lang1024 stringValue} +{\cs40\b\f0 or} {\cs45\i\f0\cf4\lang1024 rightPrimitive} {\cs40\b\f0 is} +{\cs43\f4\cf6\lang1024 stringValue}\line {\cs40\b\f0 then} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftString}: {\cs42\scaps\f0\cf6\lang1024 String} = +{\cs44\i\f0\cf11\lang1024 coerceToString}({\cs45\i\f0\cf4\lang1024 leftPrimitive})\line + {\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 rightString}: +{\cs42\scaps\f0\cf6\lang1024 String} = {\cs44\i\f0\cf11\lang1024 coerceToString}( +{\cs45\i\f0\cf4\lang1024 rightPrimitive})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 stringResult}({\cs45\i\f0\cf4\lang1024 leftString} +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} +{\cs45\i\f0\cf4\lang1024 rightString})\line {\cs40\b\f0 else} +{\cs44\i\f0\cf11\lang1024 applyBinaryDoubleOperator}({\cs44\i\f0\cf11\lang1024 doubleAdd}, +{\cs45\i\f0\cf4\lang1024 leftPrimitive}, {\cs45\i\f0\cf4\lang1024 rightPrimitive})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AdditiveExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024 -} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue}]\line ( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AdditiveExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 applyBinaryDoubleOperator}({\cs44\i\f0\cf11\lang1024 doubleSubtract}, +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue})\par\pard\plain\s2\sa60 +\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Bitwise Shift Operators\par\pard\plain\s11 +\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120 +\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind}\par|\tab +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024<<} +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024>>} +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024>>>} +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind}]\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ShiftExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024<<} {\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 bitmapValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ShiftExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 countValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 bitmap}: {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 coerceToUint32}({\cs45\i\f0\cf4\lang1024 bitmapValue})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 count}: +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 coerceToUint32}( +{\cs45\i\f0\cf4\lang1024 countValue})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 integerResult}(\line {\cs44\i\f0\cf11\lang1024 uint32ToInt32} +({\cs44\i\f0\cf11\lang1024 bitwiseAnd}({\cs44\i\f0\cf11\lang1024 bitwiseShift}( +{\cs45\i\f0\cf4\lang1024 bitmap}, {\cs44\i\f0\cf11\lang1024 bitwiseAnd}( +{\cs45\i\f0\cf4\lang1024 count}, 31)), 4294967295)))\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ShiftExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024>>} {\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 bitmapValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ShiftExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 countValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 bitmap}: {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 coerceToInt32}({\cs45\i\f0\cf4\lang1024 bitmapValue})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 count}: +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 coerceToUint32}( +{\cs45\i\f0\cf4\lang1024 countValue})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 integerResult}({\cs44\i\f0\cf11\lang1024 bitwiseShift}( +{\cs45\i\f0\cf4\lang1024 bitmap}, \endash{\cs44\i\f0\cf11\lang1024 bitwiseAnd}( +{\cs45\i\f0\cf4\lang1024 count}, 31)))\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ShiftExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024>>>} {\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 bitmapValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ShiftExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 countValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 bitmap}: {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 coerceToUint32}({\cs45\i\f0\cf4\lang1024 bitmapValue})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 count}: +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 coerceToUint32}( +{\cs45\i\f0\cf4\lang1024 countValue})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 integerResult}({\cs44\i\f0\cf11\lang1024 bitwiseShift}( +{\cs45\i\f0\cf4\lang1024 bitmap}, \endash{\cs44\i\f0\cf11\lang1024 bitwiseAnd}( +{\cs45\i\f0\cf4\lang1024 count}, 31)))\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3 +\b\fs24\lang2057 Relational Operators\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20 +\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024<} +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024>} +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024<=} +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024>=} +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind}]\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024<} {\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 orderValues}( +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue}, +{\cs44\i\f0\cf11\lang1024 true}, {\cs44\i\f0\cf11\lang1024 false})\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024>} {\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 orderValues}( +{\cs45\i\f0\cf4\lang1024 rightValue}, {\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs44\i\f0\cf11\lang1024 true}, {\cs44\i\f0\cf11\lang1024 false})\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024<=} {\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 orderValues}( +{\cs45\i\f0\cf4\lang1024 rightValue}, {\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs44\i\f0\cf11\lang1024 false}, {\cs44\i\f0\cf11\lang1024 true})\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024>=} {\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 orderValues}( +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue}, +{\cs44\i\f0\cf11\lang1024 false}, {\cs44\i\f0\cf11\lang1024 true})\par\pard\plain\s20\li180\sb60 +\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs44\i\f0\cf11\lang1024 orderValues}( +{\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 less}: {\cs42\scaps\f0\cf6\lang1024 Boolean}, +{\cs45\i\f0\cf4\lang1024 greaterOrEqual}: {\cs42\scaps\f0\cf6\lang1024 Boolean})\line : +{\cs42\scaps\f0\cf6\lang1024 ValueOrException}\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs43\f4\cf6\lang1024 numberHint})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 rightValue}, +{\cs43\f4\cf6\lang1024 numberHint})\line {\cs40\b\f0 in} {\cs40\b\f0 if} +{\cs45\i\f0\cf4\lang1024 leftPrimitive} {\cs40\b\f0 is} {\cs43\f4\cf6\lang1024 stringValue} +{\cs40\b\f0 and} {\cs45\i\f0\cf4\lang1024 rightPrimitive} {\cs40\b\f0 is} +{\cs43\f4\cf6\lang1024 stringValue}\line {\cs40\b\f0 then} +{\cs44\i\f0\cf11\lang1024 booleanResult}(\line +{\cs44\i\f0\cf11\lang1024 compareStrings}(\line +{\cs45\i\f0\cf4\lang1024 leftPrimitive}.{\cs43\f4\cf6\lang1024 stringValue},\line + {\cs45\i\f0\cf4\lang1024 rightPrimitive}.{\cs43\f4\cf6\lang1024 stringValue},\line + {\cs45\i\f0\cf4\lang1024 less},\line +{\cs45\i\f0\cf4\lang1024 greaterOrEqual},\line +{\cs45\i\f0\cf4\lang1024 greaterOrEqual}))\line {\cs40\b\f0 else} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftNumber}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 leftPrimitive})\line + {\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 rightNumber}: +{\cs42\scaps\f0\cf6\lang1024 Double} = {\cs44\i\f0\cf11\lang1024 coerceToDouble}( +{\cs45\i\f0\cf4\lang1024 rightPrimitive})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 booleanResult}(\line +{\cs44\i\f0\cf11\lang1024 doubleCompare}(\line +{\cs45\i\f0\cf4\lang1024 leftNumber},\line +{\cs45\i\f0\cf4\lang1024 rightNumber},\line +{\cs45\i\f0\cf4\lang1024 less},\line +{\cs45\i\f0\cf4\lang1024 greaterOrEqual},\line +{\cs45\i\f0\cf4\lang1024 greaterOrEqual},\line +{\cs44\i\f0\cf11\lang1024 false}))\par{\cs44\i\f0\cf11\lang1024 compareStrings}( +{\cs45\i\f0\cf4\lang1024 left}: {\cs42\scaps\f0\cf6\lang1024 String}, +{\cs45\i\f0\cf4\lang1024 right}: {\cs42\scaps\f0\cf6\lang1024 String}, +{\cs45\i\f0\cf4\lang1024 less}: {\cs42\scaps\f0\cf6\lang1024 Boolean}, +{\cs45\i\f0\cf4\lang1024 equal}: {\cs42\scaps\f0\cf6\lang1024 Boolean}, +{\cs45\i\f0\cf4\lang1024 greater}: {\cs42\scaps\f0\cf6\lang1024 Boolean})\line : +{\cs42\scaps\f0\cf6\lang1024 Boolean}\line = {\cs40\b\f0 if} {\cs44\i\f0\cf11\lang1024 empty}( +{\cs45\i\f0\cf4\lang1024 left}) {\cs40\b\f0 and} {\cs44\i\f0\cf11\lang1024 empty}( +{\cs45\i\f0\cf4\lang1024 right})\line {\cs40\b\f0 then} {\cs45\i\f0\cf4\lang1024 equal}\line + {\cs40\b\f0 else} {\cs40\b\f0 if} {\cs44\i\f0\cf11\lang1024 empty}({\cs45\i\f0\cf4\lang1024 left} +)\line {\cs40\b\f0 then} {\cs45\i\f0\cf4\lang1024 less}\line {\cs40\b\f0 else} +{\cs40\b\f0 if} {\cs44\i\f0\cf11\lang1024 empty}({\cs45\i\f0\cf4\lang1024 right})\line +{\cs40\b\f0 then} {\cs45\i\f0\cf4\lang1024 greater}\line {\cs40\b\f0 else} {\cs40\b\f0 let} +{\cs45\i\f0\cf4\lang1024 leftCharCode}: {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 characterToCode}({\cs44\i\f0\cf11\lang1024 first}( +{\cs45\i\f0\cf4\lang1024 left}));\line {\cs45\i\f0\cf4\lang1024 rightCharCode}: +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 characterToCode}( +{\cs44\i\f0\cf11\lang1024 first}({\cs45\i\f0\cf4\lang1024 right}))\line {\cs40\b\f0 in} +{\cs40\b\f0 if} {\cs45\i\f0\cf4\lang1024 leftCharCode} < {\cs45\i\f0\cf4\lang1024 rightCharCode} +\line {\cs40\b\f0 then} {\cs45\i\f0\cf4\lang1024 less}\line +{\cs40\b\f0 else} {\cs40\b\f0 if} {\cs45\i\f0\cf4\lang1024 leftCharCode} > +{\cs45\i\f0\cf4\lang1024 rightCharCode}\line {\cs40\b\f0 then} +{\cs45\i\f0\cf4\lang1024 greater}\line {\cs40\b\f0 else} +{\cs44\i\f0\cf11\lang1024 compareStrings}({\cs44\i\f0\cf11\lang1024 rest}( +{\cs45\i\f0\cf4\lang1024 left}), {\cs44\i\f0\cf11\lang1024 rest}({\cs45\i\f0\cf4\lang1024 right}), +{\cs45\i\f0\cf4\lang1024 less}, {\cs45\i\f0\cf4\lang1024 equal}, {\cs45\i\f0\cf4\lang1024 greater}) +\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Equality Operators +\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind}\par|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024==} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024!=} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024===} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024!==} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind}] +\par{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024==} {\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} +]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 eq}: {\cs42\scaps\f0\cf6\lang1024 Boolean} = +{\cs44\i\f0\cf11\lang1024 compareValues}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs45\i\f0\cf4\lang1024 rightValue})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 booleanResult}({\cs45\i\f0\cf4\lang1024 eq})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024!=} {\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} +]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 eq}: {\cs42\scaps\f0\cf6\lang1024 Boolean} = +{\cs44\i\f0\cf11\lang1024 compareValues}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs45\i\f0\cf4\lang1024 rightValue})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 booleanResult}({\cs40\b\f0 not} {\cs45\i\f0\cf4\lang1024 eq})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024===} {\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} +]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 booleanResult}( +{\cs44\i\f0\cf11\lang1024 strictCompareValues}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs45\i\f0\cf4\lang1024 rightValue}))\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024!==} {\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} +]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 booleanResult}( +{\cs40\b\f0 not} {\cs44\i\f0\cf11\lang1024 strictCompareValues}({\cs45\i\f0\cf4\lang1024 leftValue}, + {\cs45\i\f0\cf4\lang1024 rightValue}))\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs44\i\f0\cf11\lang1024 compareValues}({\cs45\i\f0\cf4\lang1024 leftValue}: +{\cs42\scaps\f0\cf6\lang1024 Value}, {\cs45\i\f0\cf4\lang1024 rightValue}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 BooleanOrException}\line = +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 leftValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}:\line +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}: +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 true};\line +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}, {\cs43\f4\cf6\lang1024 objectValue}: +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 false}\line +{\cs40\b\f0 end};\line {\cs43\f4\cf6\lang1024 booleanValue}( +{\cs45\i\f0\cf4\lang1024 leftBool}: {\cs42\scaps\f0\cf6\lang1024 Boolean}):\line +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}: +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 false};\line +{\cs43\f4\cf6\lang1024 booleanValue}({\cs45\i\f0\cf4\lang1024 rightBool}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}): {\cs43\f4\cf6\lang1024 normal} ({\cs40\b\f0 not} ( +{\cs45\i\f0\cf4\lang1024 leftBool} {\cs40\b\f0 xor} {\cs45\i\f0\cf4\lang1024 rightBool}));\line + {\cs43\f4\cf6\lang1024 doubleValue}, {\cs43\f4\cf6\lang1024 stringValue}, +{\cs43\f4\cf6\lang1024 objectValue}:\line +{\cs44\i\f0\cf11\lang1024 compareDoubleToValue}({\cs44\i\f0\cf11\lang1024 coerceBooleanToDouble}( +{\cs45\i\f0\cf4\lang1024 leftBool}), {\cs45\i\f0\cf4\lang1024 rightValue})\line +{\cs40\b\f0 end};\line {\cs43\f4\cf6\lang1024 doubleValue}( +{\cs45\i\f0\cf4\lang1024 leftNumber}: {\cs42\scaps\f0\cf6\lang1024 Double}): +{\cs44\i\f0\cf11\lang1024 compareDoubleToValue}({\cs45\i\f0\cf4\lang1024 leftNumber}, +{\cs45\i\f0\cf4\lang1024 rightValue});\line {\cs43\f4\cf6\lang1024 stringValue}( +{\cs45\i\f0\cf4\lang1024 leftStr}: {\cs42\scaps\f0\cf6\lang1024 String}):\line +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}: +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 false};\line +{\cs43\f4\cf6\lang1024 booleanValue}({\cs45\i\f0\cf4\lang1024 rightBool}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}):\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftNumber}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 leftValue})\line + {\cs40\b\f0 in} {\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 doubleEqual}( +{\cs45\i\f0\cf4\lang1024 leftNumber}, {\cs44\i\f0\cf11\lang1024 coerceBooleanToDouble}( +{\cs45\i\f0\cf4\lang1024 rightBool}));\line {\cs43\f4\cf6\lang1024 doubleValue}( +{\cs45\i\f0\cf4\lang1024 rightNumber}: {\cs42\scaps\f0\cf6\lang1024 Double}):\line + {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftNumber}: {\cs42\scaps\f0\cf6\lang1024 Double} + = {\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 leftValue})\line + {\cs40\b\f0 in} {\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 doubleEqual}( +{\cs45\i\f0\cf4\lang1024 leftNumber}, {\cs45\i\f0\cf4\lang1024 rightNumber});\line +{\cs43\f4\cf6\lang1024 stringValue}({\cs45\i\f0\cf4\lang1024 rightStr}: +{\cs42\scaps\f0\cf6\lang1024 String}):\line {\cs43\f4\cf6\lang1024 normal} +{\cs44\i\f0\cf11\lang1024 compareStrings}({\cs45\i\f0\cf4\lang1024 leftStr}, +{\cs45\i\f0\cf4\lang1024 rightStr}, {\cs44\i\f0\cf11\lang1024 false}, +{\cs44\i\f0\cf11\lang1024 true}, {\cs44\i\f0\cf11\lang1024 false});\line +{\cs43\f4\cf6\lang1024 objectValue}:\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 rightValue}, +{\cs43\f4\cf6\lang1024 noHint})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 compareValues}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs45\i\f0\cf4\lang1024 rightPrimitive})\line {\cs40\b\f0 end};\line +{\cs43\f4\cf6\lang1024 objectValue}({\cs45\i\f0\cf4\lang1024 leftObj}: +{\cs42\scaps\f0\cf6\lang1024 Object}):\line {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}: +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 false};\line +{\cs43\f4\cf6\lang1024 booleanValue}({\cs45\i\f0\cf4\lang1024 rightBool}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}):\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs43\f4\cf6\lang1024 noHint})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 compareValues}(\line +{\cs45\i\f0\cf4\lang1024 leftPrimitive},\line +{\cs43\f4\cf6\lang1024 doubleValue} {\cs44\i\f0\cf11\lang1024 coerceBooleanToDouble}( +{\cs45\i\f0\cf4\lang1024 rightBool}));\line {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}:\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs43\f4\cf6\lang1024 noHint})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 compareValues}({\cs45\i\f0\cf4\lang1024 leftPrimitive}, +{\cs45\i\f0\cf4\lang1024 rightValue});\line {\cs43\f4\cf6\lang1024 objectValue}( +{\cs45\i\f0\cf4\lang1024 rightObj}: {\cs42\scaps\f0\cf6\lang1024 Object}):\line + {\cs43\f4\cf6\lang1024 normal} ({\cs45\i\f0\cf4\lang1024 leftObj}. +{\cs43\f4\cf6\lang1024 properties} +{\field{\*\fldinst SYMBOL 186 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs45\i\f0\cf4\lang1024 rightObj}.{\cs43\f4\cf6\lang1024 properties})\line +{\cs40\b\f0 end}\line {\cs40\b\f0 end}\par{\cs44\i\f0\cf11\lang1024 compareDoubleToValue}( +{\cs45\i\f0\cf4\lang1024 leftNumber}: {\cs42\scaps\f0\cf6\lang1024 Double}, +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value}) : +{\cs42\scaps\f0\cf6\lang1024 BooleanOrException}\line = {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}: +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 false};\line +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}:\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightNumber}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 rightValue})\line +{\cs40\b\f0 in} {\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 doubleEqual}( +{\cs45\i\f0\cf4\lang1024 leftNumber}, {\cs45\i\f0\cf4\lang1024 rightNumber});\line +{\cs43\f4\cf6\lang1024 objectValue}:\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 rightValue}, +{\cs43\f4\cf6\lang1024 noHint})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 compareDoubleToValue}({\cs45\i\f0\cf4\lang1024 leftNumber}, +{\cs45\i\f0\cf4\lang1024 rightPrimitive})\line {\cs40\b\f0 end}\par +{\cs44\i\f0\cf11\lang1024 doubleEqual}({\cs45\i\f0\cf4\lang1024 x}: +{\cs42\scaps\f0\cf6\lang1024 Double}, {\cs45\i\f0\cf4\lang1024 y}: +{\cs42\scaps\f0\cf6\lang1024 Double}) : {\cs42\scaps\f0\cf6\lang1024 Boolean}\line = +{\cs44\i\f0\cf11\lang1024 doubleCompare}({\cs45\i\f0\cf4\lang1024 x}, {\cs45\i\f0\cf4\lang1024 y}, +{\cs44\i\f0\cf11\lang1024 false}, {\cs44\i\f0\cf11\lang1024 true}, {\cs44\i\f0\cf11\lang1024 false}, + {\cs44\i\f0\cf11\lang1024 false})\par{\cs44\i\f0\cf11\lang1024 strictCompareValues}( +{\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value}) : +{\cs42\scaps\f0\cf6\lang1024 Boolean}\line = {\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 leftValue} + {\cs40\b\f0 of}\line {\cs43\f4\cf6\lang1024 undefinedValue}: +{\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 is} {\cs43\f4\cf6\lang1024 undefinedValue};\line + {\cs43\f4\cf6\lang1024 nullValue}: {\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 is} +{\cs43\f4\cf6\lang1024 nullValue};\line {\cs43\f4\cf6\lang1024 booleanValue}( +{\cs45\i\f0\cf4\lang1024 leftBool}: {\cs42\scaps\f0\cf6\lang1024 Boolean}):\line +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 booleanValue}({\cs45\i\f0\cf4\lang1024 rightBool}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}): {\cs40\b\f0 not} ({\cs45\i\f0\cf4\lang1024 leftBool} +{\cs40\b\f0 xor} {\cs45\i\f0\cf4\lang1024 rightBool});\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 doubleValue}, {\cs43\f4\cf6\lang1024 stringValue}, +{\cs43\f4\cf6\lang1024 objectValue}: {\cs44\i\f0\cf11\lang1024 false}\line +{\cs40\b\f0 end};\line {\cs43\f4\cf6\lang1024 doubleValue}( +{\cs45\i\f0\cf4\lang1024 leftNumber}: {\cs42\scaps\f0\cf6\lang1024 Double}):\line +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 doubleValue}({\cs45\i\f0\cf4\lang1024 rightNumber}: +{\cs42\scaps\f0\cf6\lang1024 Double}): {\cs44\i\f0\cf11\lang1024 doubleEqual}( +{\cs45\i\f0\cf4\lang1024 leftNumber}, {\cs45\i\f0\cf4\lang1024 rightNumber});\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 stringValue}, +{\cs43\f4\cf6\lang1024 objectValue}: {\cs44\i\f0\cf11\lang1024 false}\line +{\cs40\b\f0 end};\line {\cs43\f4\cf6\lang1024 stringValue}({\cs45\i\f0\cf4\lang1024 leftStr} +: {\cs42\scaps\f0\cf6\lang1024 String}):\line {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 stringValue}({\cs45\i\f0\cf4\lang1024 rightStr}: +{\cs42\scaps\f0\cf6\lang1024 String}):\line +{\cs44\i\f0\cf11\lang1024 compareStrings}({\cs45\i\f0\cf4\lang1024 leftStr}, +{\cs45\i\f0\cf4\lang1024 rightStr}, {\cs44\i\f0\cf11\lang1024 false}, +{\cs44\i\f0\cf11\lang1024 true}, {\cs44\i\f0\cf11\lang1024 false});\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 objectValue}: {\cs44\i\f0\cf11\lang1024 false}\line +{\cs40\b\f0 end};\line {\cs43\f4\cf6\lang1024 objectValue}({\cs45\i\f0\cf4\lang1024 leftObj} +: {\cs42\scaps\f0\cf6\lang1024 Object}):\line {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 objectValue}({\cs45\i\f0\cf4\lang1024 rightObj}: +{\cs42\scaps\f0\cf6\lang1024 Object}): {\cs45\i\f0\cf4\lang1024 leftObj}. +{\cs43\f4\cf6\lang1024 properties} +{\field{\*\fldinst SYMBOL 186 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs45\i\f0\cf4\lang1024 rightObj}.{\cs43\f4\cf6\lang1024 properties};\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}: {\cs44\i\f0\cf11\lang1024 false}\line +{\cs40\b\f0 end}\line {\cs40\b\f0 end}\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar +\hyphpar0\level3\b\fs24\lang2057 Binary Bitwise Operators\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024&} +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs36\i0 anyValue}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 ExprKind}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024^} +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs36\i0 anyValue}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 ExprKind}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024|} +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind}]\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024&} {\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 applyBinaryBitwiseOperator}({\cs44\i\f0\cf11\lang1024 bitwiseAnd}, +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue})\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 ExprKind}] +\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024^} {\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs36\i0 anyValue} +]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 applyBinaryBitwiseOperator}({\cs44\i\f0\cf11\lang1024 bitwiseXor}, +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue})\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 ExprKind}] +\par{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 ExprKind} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024|} {\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs36\i0 anyValue} +]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 applyBinaryBitwiseOperator}({\cs44\i\f0\cf11\lang1024 bitwiseOr}, +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue})\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs44\i\f0\cf11\lang1024 applyBinaryBitwiseOperator}({\cs45\i\f0\cf4\lang1024 operator}: +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Integer} +{\field{\*\fldinst SYMBOL 180 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 Integer} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 In +teger} +, {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value})\line : +{\cs42\scaps\f0\cf6\lang1024 ValueOrException}\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftInt}: {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 coerceToInt32}({\cs45\i\f0\cf4\lang1024 leftValue})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 rightInt}: +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 coerceToInt32}( +{\cs45\i\f0\cf4\lang1024 rightValue})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 integerResult}({\cs45\i\f0\cf4\lang1024 operator}( +{\cs45\i\f0\cf4\lang1024 leftInt}, {\cs45\i\f0\cf4\lang1024 rightInt}))\par\pard\plain\s2\sa60\keep +\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Binary Logical Operators\par\pard\plain\s11\sb60 +\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 ExprKind}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024&&} +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs36\i0 anyValue}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 ExprKind}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024||} +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 ExprKind}] +\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024&&} {\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 if} +{\cs44\i\f0\cf11\lang1024 coerceToBoolean}({\cs45\i\f0\cf4\lang1024 leftValue})\line +{\cs40\b\f0 then} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs36\i0 anyValue}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 else} {\cs43\f4\cf6\lang1024 normal} {\cs45\i\f0\cf4\lang1024 leftValue} +\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 ExprKind}] +\par{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 ExprKind} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024||} {\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 if} +{\cs44\i\f0\cf11\lang1024 coerceToBoolean}({\cs45\i\f0\cf4\lang1024 leftValue})\line +{\cs40\b\f0 then} {\cs43\f4\cf6\lang1024 normal} {\cs45\i\f0\cf4\lang1024 leftValue}\line +{\cs40\b\f0 else} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs36\i0 anyValue}]({\cs45\i\f0\cf4\lang1024 e}) +\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Conditional Operator +\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 ExprKind}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024?} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024:} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 ExprKind}] +\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024?} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024:} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression{\super\cs36\i0 anyValue}\b0\i0\sub 2}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 condition}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs36\i0 anyValue}] +({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 if} +{\cs44\i\f0\cf11\lang1024 coerceToBoolean}({\cs45\i\f0\cf4\lang1024 condition})\line +{\cs40\b\f0 then} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 else} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression{\super\cs36\i0 anyValue}\b0\i0\sub 2}]( +{\cs45\i\f0\cf4\lang1024 e})\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24 +\lang2057 Assignment Operators\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20 +\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 ExprKind}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 Lvalue} +{\cs34\b\f5\cf2\lang1024=} {\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue} +\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Expressions\par\pard +\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s13\fi-1440 +\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 ExprKind}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 ExprKind}] +\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Lvalue} {\cs34\b\f5\cf2\lang1024=} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftReference}: {\cs42\scaps\f0\cf6\lang1024 Reference} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line + {\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 rightValue}: +{\cs42\scaps\f0\cf6\lang1024 Value} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 u}: {\cs42\scaps\f0\cf6\lang1024 Void} = +{\cs44\i\f0\cf11\lang1024 referencePutValue}({\cs45\i\f0\cf4\lang1024 leftReference}, +{\cs45\i\f0\cf4\lang1024 rightValue})\line {\cs40\b\f0 in} {\cs43\f4\cf6\lang1024 normal} +{\cs45\i\f0\cf4\lang1024 rightValue}\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 ExprKind}] +\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s13 +\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Expression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Expression}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Expression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 anyValue}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 anyValue}]\par\pard\plain\s2\sa60\keep\keepn +\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Programs\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar +\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 Program} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Expression} {\cs33\b\f6\cf10\lang1024 End}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Program}] : {\cs42\scaps\f0\cf6\lang1024 ValueOrException}\par\pard\plain +\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Program} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Expression} {\cs33\b\f6\cf10\lang1024 End}] = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Expression}]( +{\b{\field{\*\fldinst SYMBOL 225 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +{\cs43\f4\cf6\lang1024 nullObjectOrNull} +{\b{\field{\*\fldinst SYMBOL 241 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +{\sub\cs42\scaps\f0\cf6\lang1024 Env})\par} \ No newline at end of file diff --git a/mozilla/js/semantics/ECMA Grammar.txt b/mozilla/js/semantics/ECMA Grammar.txt new file mode 100644 index 00000000000..21de936022d --- /dev/null +++ b/mozilla/js/semantics/ECMA Grammar.txt @@ -0,0 +1,8976 @@ +Terminals: $$ ! != !== $END $IDENTIFIER $NUMBER $STRING % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? DELETE FALSE NEW NULL THIS + TRUE TYPEOF VOID [ ] ^ \| |\|\|| ~ +Nonterminals: :% :PROGRAM :EXPRESSION # # # + # # # # # # # # # # # # # # :PRIMARY-RVALUE # + # # # # # # # # # # # # # # :LVALUE # :PRIMARY-LVALUE + # # # # :ARGUMENTS :ARGUMENT-LIST +Rules: + :% -> :PROGRAM P0 [NIL] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + :PROGRAM -> :EXPRESSION $END P135 [PROGRAM] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + :EXPRESSION -> # P134 [EXPRESSION-COMMA-EXPRESSION] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P132 [COMMA-EXPRESSION-ASSIGNMENT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P128 [ASSIGNMENT-EXPRESSION-CONDITIONAL] + | :LVALUE = # P130 [ASSIGNMENT-EXPRESSION-ASSIGNMENT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P124 [CONDITIONAL-EXPRESSION-LOGICAL-OR] + | # ? # \: # + P126 [CONDITIONAL-EXPRESSION-CONDITIONAL] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P120 [LOGICAL-OR-EXPRESSION-LOGICAL-AND] + | # |\|\|| # + P122 [LOGICAL-OR-EXPRESSION-OR] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P116 [LOGICAL-AND-EXPRESSION-BITWISE-OR] + | # && # + P118 [LOGICAL-AND-EXPRESSION-AND] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P112 [BITWISE-OR-EXPRESSION-BITWISE-XOR] + | # \| # + P114 [BITWISE-OR-EXPRESSION-OR] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P108 [BITWISE-XOR-EXPRESSION-BITWISE-AND] + | # ^ # + P110 [BITWISE-XOR-EXPRESSION-XOR] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P104 [BITWISE-AND-EXPRESSION-EQUALITY] + | # & # + P106 [BITWISE-AND-EXPRESSION-AND] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P94 [EQUALITY-EXPRESSION-RELATIONAL] + | # == # + P96 [EQUALITY-EXPRESSION-EQUAL] + | # != # + P98 [EQUALITY-EXPRESSION-NOT-EQUAL] + | # === # + P100 [EQUALITY-EXPRESSION-STRICT-EQUAL] + | # !== # + P102 [EQUALITY-EXPRESSION-STRICT-NOT-EQUAL] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P84 [RELATIONAL-EXPRESSION-SHIFT] + | # < # + P86 [RELATIONAL-EXPRESSION-LESS] + | # > # + P88 [RELATIONAL-EXPRESSION-GREATER] + | # <= # + P90 [RELATIONAL-EXPRESSION-LESS-OR-EQUAL] + | # >= # + P92 [RELATIONAL-EXPRESSION-GREATER-OR-EQUAL] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P76 [SHIFT-EXPRESSION-ADDITIVE] + | # << # P78 [SHIFT-EXPRESSION-LEFT] + | # >> # P80 [SHIFT-EXPRESSION-RIGHT-SIGNED] + | # >>> # + P82 [SHIFT-EXPRESSION-RIGHT-UNSIGNED] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P70 [ADDITIVE-EXPRESSION-MULTIPLICATIVE] + | # + # + P72 [ADDITIVE-EXPRESSION-ADD] + | # - # + P74 [ADDITIVE-EXPRESSION-SUBTRACT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P62 [MULTIPLICATIVE-EXPRESSION-UNARY] + | # * # + P64 [MULTIPLICATIVE-EXPRESSION-MULTIPLY] + | # / # + P66 [MULTIPLICATIVE-EXPRESSION-DIVIDE] + | # % # + P68 [MULTIPLICATIVE-EXPRESSION-REMAINDER] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P40 [UNARY-EXPRESSION-POSTFIX] + | DELETE :LVALUE P42 [UNARY-EXPRESSION-DELETE] + | VOID # P44 [UNARY-EXPRESSION-VOID] + | TYPEOF :LVALUE P46 [UNARY-EXPRESSION-TYPEOF-LVALUE] + | TYPEOF # P48 [UNARY-EXPRESSION-TYPEOF-EXPRESSION] + | ++ :LVALUE P50 [UNARY-EXPRESSION-INCREMENT] + | -- :LVALUE P52 [UNARY-EXPRESSION-DECREMENT] + | + # P54 [UNARY-EXPRESSION-PLUS] + | - # P56 [UNARY-EXPRESSION-MINUS] + | ~ # P58 [UNARY-EXPRESSION-BITWISE-NOT] + | ! # P60 [UNARY-EXPRESSION-LOGICAL-NOT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P33 [POSTFIX-EXPRESSION-NEW] + | # P35 [POSTFIX-EXPRESSION-MEMBER-EXPRESSION-CALL] + | :LVALUE ++ P36 [POSTFIX-EXPRESSION-INCREMENT] + | :LVALUE -- P38 [POSTFIX-EXPRESSION-DECREMENT] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + # -> # P23 [NEW-EXPRESSION-MEMBER-EXPRESSION] + | NEW # P25 [NEW-EXPRESSION-NEW] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + # -> :PRIMARY-RVALUE P17 [MEMBER-EXPRESSION-PRIMARY-RVALUE] + | # P20 [MEMBER-EXPRESSION-MEMBER-LVALUE] + | NEW # :ARGUMENTS P21 [MEMBER-EXPRESSION-NEW] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + :PRIMARY-RVALUE -> THIS P1 [PRIMARY-RVALUE-THIS] + | NULL P2 [PRIMARY-RVALUE-NULL] + | TRUE P3 [PRIMARY-RVALUE-TRUE] + | FALSE P4 [PRIMARY-RVALUE-FALSE] + | $NUMBER P5 [PRIMARY-RVALUE-NUMBER] + | $STRING P6 [PRIMARY-RVALUE-STRING] + | \( # \) P7 [PRIMARY-RVALUE-PARENTHESES] + Initial terminals: $NUMBER $STRING \( FALSE NULL THIS TRUE + + # -> # P133 [COMMA-EXPRESSION-ASSIGNMENT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P129 [ASSIGNMENT-EXPRESSION-CONDITIONAL] + | :LVALUE = # P131 [ASSIGNMENT-EXPRESSION-ASSIGNMENT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P125 [CONDITIONAL-EXPRESSION-LOGICAL-OR] + | # ? # \: # + P127 [CONDITIONAL-EXPRESSION-CONDITIONAL] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P121 [LOGICAL-OR-EXPRESSION-LOGICAL-AND] + | # |\|\|| # + P123 [LOGICAL-OR-EXPRESSION-OR] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P117 [LOGICAL-AND-EXPRESSION-BITWISE-OR] + | # && # + P119 [LOGICAL-AND-EXPRESSION-AND] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P113 [BITWISE-OR-EXPRESSION-BITWISE-XOR] + | # \| # + P115 [BITWISE-OR-EXPRESSION-OR] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P109 [BITWISE-XOR-EXPRESSION-BITWISE-AND] + | # ^ # + P111 [BITWISE-XOR-EXPRESSION-XOR] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P105 [BITWISE-AND-EXPRESSION-EQUALITY] + | # & # + P107 [BITWISE-AND-EXPRESSION-AND] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P95 [EQUALITY-EXPRESSION-RELATIONAL] + | # == # + P97 [EQUALITY-EXPRESSION-EQUAL] + | # != # + P99 [EQUALITY-EXPRESSION-NOT-EQUAL] + | # === # + P101 [EQUALITY-EXPRESSION-STRICT-EQUAL] + | # !== # + P103 [EQUALITY-EXPRESSION-STRICT-NOT-EQUAL] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P85 [RELATIONAL-EXPRESSION-SHIFT] + | # < # + P87 [RELATIONAL-EXPRESSION-LESS] + | # > # + P89 [RELATIONAL-EXPRESSION-GREATER] + | # <= # + P91 [RELATIONAL-EXPRESSION-LESS-OR-EQUAL] + | # >= # + P93 [RELATIONAL-EXPRESSION-GREATER-OR-EQUAL] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P77 [SHIFT-EXPRESSION-ADDITIVE] + | # << # P79 [SHIFT-EXPRESSION-LEFT] + | # >> # P81 [SHIFT-EXPRESSION-RIGHT-SIGNED] + | # >>> # + P83 [SHIFT-EXPRESSION-RIGHT-UNSIGNED] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P71 [ADDITIVE-EXPRESSION-MULTIPLICATIVE] + | # + # + P73 [ADDITIVE-EXPRESSION-ADD] + | # - # + P75 [ADDITIVE-EXPRESSION-SUBTRACT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P63 [MULTIPLICATIVE-EXPRESSION-UNARY] + | # * # + P65 [MULTIPLICATIVE-EXPRESSION-MULTIPLY] + | # / # + P67 [MULTIPLICATIVE-EXPRESSION-DIVIDE] + | # % # + P69 [MULTIPLICATIVE-EXPRESSION-REMAINDER] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P41 [UNARY-EXPRESSION-POSTFIX] + | DELETE :LVALUE P43 [UNARY-EXPRESSION-DELETE] + | VOID # P45 [UNARY-EXPRESSION-VOID] + | TYPEOF :LVALUE P47 [UNARY-EXPRESSION-TYPEOF-LVALUE] + | TYPEOF # P49 [UNARY-EXPRESSION-TYPEOF-EXPRESSION] + | ++ :LVALUE P51 [UNARY-EXPRESSION-INCREMENT] + | -- :LVALUE P53 [UNARY-EXPRESSION-DECREMENT] + | + # P55 [UNARY-EXPRESSION-PLUS] + | - # P57 [UNARY-EXPRESSION-MINUS] + | ~ # P59 [UNARY-EXPRESSION-BITWISE-NOT] + | ! # P61 [UNARY-EXPRESSION-LOGICAL-NOT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P34 [POSTFIX-EXPRESSION-NEW] + | :LVALUE ++ P37 [POSTFIX-EXPRESSION-INCREMENT] + | :LVALUE -- P39 [POSTFIX-EXPRESSION-DECREMENT] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + :LVALUE -> # P31 [LVALUE-MEMBER-LVALUE-CALL] + | # P32 [LVALUE-MEMBER-LVALUE-NO-CALL] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + # -> :PRIMARY-LVALUE P10 [MEMBER-LVALUE-PRIMARY-LVALUE] + | # [ :EXPRESSION ] P14 [MEMBER-LVALUE-ARRAY] + | # \. $IDENTIFIER P16 [MEMBER-LVALUE-PROPERTY] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + :PRIMARY-LVALUE -> $IDENTIFIER P8 [PRIMARY-LVALUE-IDENTIFIER] + | \( :LVALUE \) P9 [PRIMARY-LVALUE-PARENTHESES] + Initial terminals: $IDENTIFIER \( + + # -> :LVALUE :ARGUMENTS P11 [MEMBER-LVALUE-CALL-MEMBER-LVALUE] + | # :ARGUMENTS P12 [MEMBER-LVALUE-CALL-MEMBER-EXPRESSION-NO-CALL] + | # [ :EXPRESSION ] P13 [MEMBER-LVALUE-ARRAY] + | # \. $IDENTIFIER P15 [MEMBER-LVALUE-PROPERTY] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + # -> # P19 [MEMBER-EXPRESSION-MEMBER-LVALUE] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + # -> # P24 [NEW-EXPRESSION-MEMBER-EXPRESSION] + | NEW # P26 [NEW-EXPRESSION-NEW] + Initial terminals: $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + # -> :PRIMARY-RVALUE P18 [MEMBER-EXPRESSION-PRIMARY-RVALUE] + | NEW # :ARGUMENTS P22 [MEMBER-EXPRESSION-NEW] + Initial terminals: $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + :ARGUMENTS -> \( \) P27 [ARGUMENTS-EMPTY] + | \( :ARGUMENT-LIST \) P28 [ARGUMENTS-LIST] + Initial terminals: \( + + :ARGUMENT-LIST -> # P29 [ARGUMENT-LIST-ONE] + | :ARGUMENT-LIST \, # P30 [ARGUMENT-LIST-MORE] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + +States: + S0: + :% -> . :PROGRAM {$$} + :PROGRAM -> . :EXPRESSION $END {$$} + :EXPRESSION -> . # {$END} + # -> . # {$END} + # -> . # {$END} + # -> . :LVALUE = # {$END} + # -> . # {$END} + # -> + . # ? # \: # + {$END} + # -> . # {$END ? |\|\||} + # -> . # |\|\|| # {$END ? |\|\||} + # -> . # {$END && ? |\|\||} + # -> . # && # {$END && ? |\|\||} + # -> . # {$END && ? \| |\|\||} + # -> . # \| # + {$END && ? \| |\|\||} + # -> . # {$END && ? ^ \| |\|\||} + # -> . # ^ # + {$END && ? ^ \| |\|\||} + # -> . # {$END & && ? ^ \| |\|\||} + # -> . # & # + {$END & && ? ^ \| |\|\||} + # -> . # {!= !== $END & && == === ? ^ \| |\|\||} + # -> . # == # + {!= !== $END & && == === ? ^ \| |\|\||} + # -> . # != # + {!= !== $END & && == === ? ^ \| |\|\||} + # -> . # === # + {!= !== $END & && == === ? ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && == === ? ^ \| |\|\||} + # -> . # {!= !== $END & && < <= == === > >= ? ^ \| |\|\||} + # -> . # < # + {!= !== $END & && < <= == === > >= ? ^ \| |\|\||} + # -> . # > # + {!= !== $END & && < <= == === > >= ? ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && < <= == === > >= ? ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && < <= == === > >= ? ^ \| |\|\||} + # -> . # {!= !== $END & && < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # << # + {!= !== $END & && < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END & && + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + # + {!= !== $END & && + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # - # + {!= !== $END & && + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== $END % & && * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== $END % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== $END % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== $END % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== $END % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== $END % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== $END % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== $END % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {!= !== $END % & && * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S3 # => S4 + # => S5 # => S6 # => S7 + # => S8 # => S9 # => S10 + # => S11 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :EXPRESSION => S32 :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :PROGRAM => S39 + + S1: + # -> ! . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S273 + + S2: + # -> # . {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce SHIFT-EXPRESSION-ADDITIVE + => shift S183 + - => shift S184 + + S3: + # -> # . {$END ]} + Transitions: $END ] => reduce COMMA-EXPRESSION-ASSIGNMENT + + S4: + # -> # . {$END && \) \, \: ? ] ^ \| |\|\||} + # -> # . & # + {$END & && \) \, \: ? ] ^ \| |\|\||} + Transitions: $END && \) \, \: ? ] ^ \| |\|\|| => reduce BITWISE-XOR-EXPRESSION-BITWISE-AND & => shift S224 + + S5: + # -> # . {$END && \) \, \: ? ] |\|\||} + # -> # . \| # + {$END && \) \, \: ? ] \| |\|\||} + Transitions: $END && \) \, \: ? ] |\|\|| => reduce LOGICAL-AND-EXPRESSION-BITWISE-OR \| => shift S220 + + S6: + # -> # . {$END && \) \, \: ? ] \| |\|\||} + # -> # . ^ # + {$END && \) \, \: ? ] ^ \| |\|\||} + Transitions: $END && \) \, \: ? ] \| |\|\|| => reduce BITWISE-OR-EXPRESSION-BITWISE-XOR ^ => shift S222 + + S7: + :EXPRESSION -> # . {$END ]} + Transitions: $END ] => reduce EXPRESSION-COMMA-EXPRESSION + + S8: + # -> # . {$END \) \, \: ]} + Transitions: $END \) \, \: ] => reduce ASSIGNMENT-EXPRESSION-CONDITIONAL + + S9: + # -> # . {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> # . !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + Transitions: != => shift S226 !== => shift S227 $END & && \) \, \: ? ] ^ \| |\|\|| => reduce BITWISE-AND-EXPRESSION-EQUALITY + == => shift S228 === => shift S229 + + S10: + # -> # . {$END \) \, \: ? ] |\|\||} + # -> # . && # + {$END && \) \, \: ? ] |\|\||} + Transitions: $END \) \, \: ? ] |\|\|| => reduce LOGICAL-OR-EXPRESSION-LOGICAL-AND && => shift S218 + + S11: + # -> + # . ? # \: # + {$END \) \, \: ]} + # -> # . {$END \) \, \: ]} + # -> # . |\|\|| # + {$END \) \, \: ? ] |\|\||} + Transitions: $END \) \, \: ] => reduce CONDITIONAL-EXPRESSION-LOGICAL-OR ? => shift S267 |\|\|| => shift S268 + + S12: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce POSTFIX-EXPRESSION-MEMBER-EXPRESSION-CALL + \. => shift S108 [ => shift S109 + + S13: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce NEW-EXPRESSION-MEMBER-EXPRESSION + \. => shift S91 [ => shift S93 + + S14: + # -> # . :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: \( => shift S47 + Gotos: :ARGUMENTS => S107 + + S15: + :LVALUE -> # . {\( ++ -- =} + # -> # . + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-EXPRESSION-MEMBER-LVALUE + \( ++ -- = => reduce LVALUE-MEMBER-LVALUE-CALL + + S16: + # -> # . + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> # . {\( ++ -- =} + Transitions: != !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-EXPRESSION-MEMBER-LVALUE + \( ++ -- = => reduce LVALUE-MEMBER-LVALUE-NO-CALL + + S17: + # -> # . + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce ADDITIVE-EXPRESSION-MULTIPLICATIVE + % => shift S186 * => shift S187 / => shift S188 + + S18: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce POSTFIX-EXPRESSION-NEW + + S19: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-POSTFIX + + S20: + # -> # . {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: == === ? ] ^ \| |\|\|| => reduce EQUALITY-EXPRESSION-RELATIONAL < => shift S231 <= => shift S232 + > => shift S233 >= => shift S234 + + S21: + # -> # . {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\|| => reduce RELATIONAL-EXPRESSION-SHIFT << => shift S200 + >> => shift S201 >>> => shift S202 + + S22: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce MULTIPLICATIVE-EXPRESSION-UNARY + + S23: + :PRIMARY-LVALUE -> $IDENTIFIER . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-LVALUE-IDENTIFIER + + S24: + :PRIMARY-RVALUE -> $NUMBER . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-RVALUE-NUMBER + + S25: + :PRIMARY-RVALUE -> $STRING . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-RVALUE-STRING + + S26: + :PRIMARY-RVALUE -> \( . # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {% \( \) * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( \) * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( \) * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( \) * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( \) * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( \) * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( \) * \. / [} + :PRIMARY-LVALUE -> \( . :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {\( \) ++ -- \. = [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {\( \) ++ -- \. = [} + # -> . # {? |\|\||} + # -> . # |\|\|| # {? |\|\||} + # -> . # {&& ? |\|\||} + # -> . # && # {&& ? |\|\||} + # -> . # {&& ? \| |\|\||} + # -> . # \| # {&& ? \| |\|\||} + # -> . # {&& ^ \|} + # -> . # ^ # {&& ^ \|} + # -> . # {& ^ \|} + # -> . # & # {& ^ \|} + # -> . # {!= !== & == === ^} + # -> . # == # {!= !== & == === ^} + # -> . # != # {!= !== & == === ^} + # -> . # === # {!= !== & == === ^} + # -> . # !== # {!= !== & == === ^} + # -> . # {!= !== & < <= == === > >=} + # -> . # < # {!= !== & < <= == === > >=} + # -> . # > # {!= !== & < <= == === > >=} + # -> . # <= # + {!= !== & < <= == === > >=} + # -> . # >= # + {!= !== & < <= == === > >=} + # -> . # {!= !== < << <= == === > >= >> >>>} + # -> . # << # + {!= !== < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== < << <= == === > >= >> >>>} + # -> . # {+ - < << <= > >= >> >>>} + # -> . # + # + {+ - < << <= > >= >> >>>} + # -> . # - # + {+ - < << <= > >= >> >>>} + # -> . # {% * + - / << >> >>>} + # -> . # * # + {% * + - / << >> >>>} + # -> . # / # + {% * + - / << >> >>>} + # -> . # % # + {% * + - / << >> >>>} + # -> . # {% * + - /} + # -> . DELETE :LVALUE {% * + - /} + # -> . VOID # {% * + - /} + # -> . TYPEOF :LVALUE {% * + - /} + # -> . TYPEOF # {% * + - /} + # -> . ++ :LVALUE {% * + - /} + # -> . -- :LVALUE {% * + - /} + # -> . + # {% * + - /} + # -> . - # {% * + - /} + # -> . ~ # {% * + - /} + # -> . ! # {% * + - /} + # -> . # {% * + - /} + # -> . # {% * + - /} + # -> . :LVALUE ++ {% * + - /} + # -> . :LVALUE -- {% * + - /} + # -> . # {% * + - /} + # -> . NEW # {% * + - /} + # -> . :PRIMARY-RVALUE {% * + - \. / [} + # -> . # {% * + - \. / [} + # -> . NEW # :ARGUMENTS {% * + - \. / [} + # -> . # {\)} + # -> . # {\)} + # -> . :LVALUE = # {\)} + # -> . # {\)} + # -> + . # ? # \: # + {\)} + # -> . # {\)} + # -> . # |\|\|| # {\)} + # -> . # {\)} + # -> . # && # {\)} + # -> . # {\)} + # -> . # \| # {\)} + # -> . # {\)} + # -> . # ^ # {\)} + # -> . # {\)} + # -> . # & # {\)} + # -> . # {\)} + # -> . # == # {\)} + # -> . # != # {\)} + # -> . # === # {\)} + # -> . # !== # {\)} + # -> . # {\)} + # -> . # < # {\)} + # -> . # > # {\)} + # -> . # <= # {\)} + # -> . # >= # {\)} + # -> . # {\)} + # -> . # << # {\)} + # -> . # >> # {\)} + # -> . # >>> # {\)} + # -> . # {\)} + # -> . # + # {\)} + # -> . # - # {\)} + # -> . # {\)} + # -> . # * # {\)} + # -> . # / # {\)} + # -> . # % # {\)} + # -> . # {\)} + # -> . DELETE :LVALUE {\)} + # -> . VOID # {\)} + # -> . TYPEOF :LVALUE {\)} + # -> . TYPEOF # {\)} + # -> . ++ :LVALUE {\)} + # -> . -- :LVALUE {\)} + # -> . + # {\)} + # -> . - # {\)} + # -> . ~ # {\)} + # -> . ! # {\)} + # -> . # {\)} + # -> . :LVALUE ++ {\)} + # -> . :LVALUE -- {\)} + :LVALUE -> . # {\( \) ++ -- =} + :LVALUE -> . # {\( \) ++ -- =} + # -> . :PRIMARY-LVALUE {% \( \) * ++ -- \. / = [} + # -> . # [ :EXPRESSION ] {% \( \) * ++ -- \. / = [} + # -> . # \. $IDENTIFIER {% \( \) * ++ -- \. / = [} + # -> . :LVALUE :ARGUMENTS {% \( \) * ++ -- \. / = [} + # -> . # :ARGUMENTS {% \( \) * ++ -- \. / = [} + # -> . # [ :EXPRESSION ] {% \( \) * ++ -- \. / = [} + # -> . # \. $IDENTIFIER {% \( \) * ++ -- \. / = [} + # -> . # {% * + - \. / [} + # -> . # {\)} + # -> . NEW # {\)} + # -> . :PRIMARY-RVALUE {\( \)} + # -> . NEW # :ARGUMENTS {\( \)} + Transitions: ! => shift S124 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S151 + ++ => shift S152 - => shift S153 -- => shift S154 DELETE => shift S155 FALSE => shift S33 NEW => shift S157 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S159 VOID => shift S160 ~ => shift S161 + Gotos: # => S12 # => S13 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 + # => S61 # => S64 # => S65 + # => S125 # => S126 # => S127 + # => S128 # => S129 + # => S130 # => S131 + # => S132 # => S133 + # => S134 # => S135 # => S136 + # => S137 # => S138 + # => S139 # => S140 + # => S141 # => S142 # => S143 + # => S144 # => S145 + # => S146 # => S147 # => S148 + # => S149 # => S150 :LVALUE => S156 :PRIMARY-RVALUE => S158 + + S27: + # -> + . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S123 + + S28: + # -> ++ . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + :LVALUE -> . # + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S74 :LVALUE => S122 + + S29: + # -> - . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S121 + + S30: + # -> -- . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + :LVALUE -> . # + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S74 :LVALUE => S120 + + S31: + # -> DELETE . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + :LVALUE -> . # + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S74 :LVALUE => S119 + + S32: + :PROGRAM -> :EXPRESSION . $END {$$} + Transitions: $END => shift S118 + + S33: + :PRIMARY-RVALUE -> FALSE . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-RVALUE-FALSE + + S34: + # -> :LVALUE . = # {$END \) \, \: ]} + # -> :LVALUE . -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: \( => shift S47 ++ => shift S48 -- => shift S49 = => shift S116 + Gotos: :ARGUMENTS => S50 + + S35: + # -> NEW . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> NEW . # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> NEW . # :ARGUMENTS {\(} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S87 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: :PRIMARY-LVALUE => S37 # => S85 :PRIMARY-RVALUE => S88 # => S90 + # => S114 + + S36: + :PRIMARY-RVALUE -> NULL . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-RVALUE-NULL + + S37: + # -> :PRIMARY-LVALUE . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| + => reduce MEMBER-LVALUE-PRIMARY-LVALUE + + + S38: + # -> :PRIMARY-RVALUE . + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> :PRIMARY-RVALUE . {\(} + Transitions: != !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-EXPRESSION-PRIMARY-RVALUE + \( => reduce MEMBER-EXPRESSION-PRIMARY-RVALUE + + S39: + :% -> :PROGRAM . {$$} + Transitions: $$ => accept + + S40: + :PRIMARY-RVALUE -> THIS . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-RVALUE-THIS + + S41: + :PRIMARY-RVALUE -> TRUE . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-RVALUE-TRUE + + S42: + # -> TYPEOF . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> TYPEOF . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + :LVALUE -> . # + {!= !== $END % & && \( \) * + ++ \, - -- / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + :LVALUE -> . # + {!= !== $END % & && \( \) * + ++ \, - -- / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {\. [} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: ! => shift S58 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S67 + ++ => shift S68 - => shift S69 -- => shift S70 DELETE => shift S71 FALSE => shift S33 NEW => shift S73 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S75 VOID => shift S76 ~ => shift S77 + Gotos: :PRIMARY-LVALUE => S37 # => S59 # => S60 + # => S61 # => S62 # => S63 + # => S64 # => S65 # => S66 + :LVALUE => S72 :PRIMARY-RVALUE => S74 + + S43: + # -> VOID . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S57 + + S44: + # -> ~ . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + # => S45 :LVALUE => S46 + + S45: + # -> ~ # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-BITWISE-NOT + + S46: + # -> :LVALUE . -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: \( => shift S47 ++ => shift S48 -- => shift S49 + Gotos: :ARGUMENTS => S50 + + S47: + :ARGUMENTS -> \( . :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> \( . \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # {\) \,} + # -> . :LVALUE = # {\) \,} + # -> . # {\) \,} + # -> + . # ? # \: # + {\) \,} + # -> . # {\) \, ? |\|\||} + # -> . # |\|\|| # {\) \, ? |\|\||} + # -> . # {&& \) \, ? |\|\||} + # -> . # && # {&& \) \, ? |\|\||} + # -> . # {&& \) \, ? \| |\|\||} + # -> . # \| # + {&& \) \, ? \| |\|\||} + # -> . # {&& \) \, ? ^ \| |\|\||} + # -> . # ^ # + {&& \) \, ? ^ \| |\|\||} + # -> . # {& && \) \, ? ^ \| |\|\||} + # -> . # & # + {& && \) \, ? ^ \| |\|\||} + # -> . # {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # == # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # != # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # === # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # !== # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # < # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # > # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # <= # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # >= # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # << # + {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >> # + {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >>> # + {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== & && \) + \, - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + # + {!= !== & && \) + \, - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # - # + {!= !== & && \) + \, - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # * # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # / # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # % # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + :ARGUMENT-LIST -> . # {\) \,} + :ARGUMENT-LIST -> . :ARGUMENT-LIST \, # {\) \,} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 \) => shift S52 + + => shift S27 ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 # => S51 :ARGUMENT-LIST => S53 + + S48: + # -> :LVALUE ++ . {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce POSTFIX-EXPRESSION-INCREMENT + + S49: + # -> :LVALUE -- . {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce POSTFIX-EXPRESSION-DECREMENT + + S50: + # -> :LVALUE :ARGUMENTS . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| + => reduce MEMBER-LVALUE-CALL-MEMBER-LVALUE + + + S51: + :ARGUMENT-LIST -> # . {\) \,} + Transitions: \) \, => reduce ARGUMENT-LIST-ONE + + S52: + :ARGUMENTS -> \( \) . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce ARGUMENTS-EMPTY + + S53: + :ARGUMENTS -> \( :ARGUMENT-LIST . \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENT-LIST -> :ARGUMENT-LIST . \, # {\) \,} + Transitions: \) => shift S54 \, => shift S55 + + S54: + :ARGUMENTS -> \( :ARGUMENT-LIST \) . + {!= !== $END % & && \( * + ++ - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \( * + ++ - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\|| => reduce ARGUMENTS-LIST + + S55: + :ARGUMENT-LIST -> :ARGUMENT-LIST \, . # {\) \,} + # -> . # {\) \,} + # -> . :LVALUE = # {\) \,} + # -> . # {\) \,} + # -> + . # ? # \: # + {\) \,} + # -> . # {\) \, ? |\|\||} + # -> . # |\|\|| # {\) \, ? |\|\||} + # -> . # {&& \) \, ? |\|\||} + # -> . # && # {&& \) \, ? |\|\||} + # -> . # {&& \) \, ? \| |\|\||} + # -> . # \| # + {&& \) \, ? \| |\|\||} + # -> . # {&& \) \, ? ^ \| |\|\||} + # -> . # ^ # + {&& \) \, ? ^ \| |\|\||} + # -> . # {& && \) \, ? ^ \| |\|\||} + # -> . # & # + {& && \) \, ? ^ \| |\|\||} + # -> . # {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # == # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # != # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # === # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # !== # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # < # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # > # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # <= # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # >= # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # << # + {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >> # + {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >>> # + {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== & && \) + \, - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + # + {!= !== & && \) + \, - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # - # + {!= !== & && \) + \, - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # * # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # / # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # % # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 # => S56 + + S56: + :ARGUMENT-LIST -> :ARGUMENT-LIST \, # . {\) \,} + Transitions: \) \, => reduce ARGUMENT-LIST-MORE + + S57: + # -> VOID # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-VOID + + S58: + # -> ! . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S113 + + S59: + # -> # . \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: \. => shift S108 [ => shift S109 + + S60: + # -> # . \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: \. => shift S91 [ => shift S93 + + S61: + # -> # . :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce NEW-EXPRESSION-MEMBER-EXPRESSION + \( => shift S47 + Gotos: :ARGUMENTS => S107 + + S62: + :LVALUE -> # . + {!= !== $END % & && \( \) * + ++ \, - -- / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . {\. [} + Transitions: != !== $END % & && \( \) * + ++ \, - -- / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce LVALUE-MEMBER-LVALUE-CALL + \. [ => reduce MEMBER-EXPRESSION-MEMBER-LVALUE + + S63: + # -> # . {\. [} + :LVALUE -> # . + {!= !== $END % & && \( \) * + ++ \, - -- / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce LVALUE-MEMBER-LVALUE-NO-CALL + \. [ => reduce MEMBER-EXPRESSION-MEMBER-LVALUE + + S64: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce POSTFIX-EXPRESSION-NEW + + S65: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-POSTFIX + + S66: + # -> TYPEOF # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-TYPEOF-EXPRESSION + + S67: + # -> + . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S106 + + S68: + # -> ++ . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :LVALUE -> . # {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S74 :LVALUE => S105 + + S69: + # -> - . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S104 + + S70: + # -> -- . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :LVALUE -> . # {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S74 :LVALUE => S103 + + S71: + # -> DELETE . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :LVALUE -> . # {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S74 :LVALUE => S98 + + S72: + # -> TYPEOF :LVALUE . {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( \) {\( ++ -- \. [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {\( ++ -- \. [} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-TYPEOF-LVALUE + \( => shift S47 ++ => shift S82 -- => shift S83 + Gotos: :ARGUMENTS => S50 + + S73: + # -> NEW . # :ARGUMENTS {\. [} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> NEW . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> NEW . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + # -> . :PRIMARY-LVALUE {\( \. [} + # -> . # [ :EXPRESSION ] {\( \. [} + # -> . # \. $IDENTIFIER {\( \. [} + :PRIMARY-LVALUE -> . $IDENTIFIER {\( \. [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {\( \. [} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S87 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: :PRIMARY-LVALUE => S37 # => S84 # => S85 + # => S86 :PRIMARY-RVALUE => S88 + + S74: + # -> :PRIMARY-RVALUE . {\. [} + # -> :PRIMARY-RVALUE . + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce MEMBER-EXPRESSION-PRIMARY-RVALUE + \. [ => reduce MEMBER-EXPRESSION-PRIMARY-RVALUE + + S75: + # -> TYPEOF . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> TYPEOF . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :LVALUE -> . # + {!= !== $END % & && \( \) * + ++ \, - -- / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :LVALUE -> . # + {!= !== $END % & && \( \) * + ++ \, - -- / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-LVALUE {\( ++ -- \. [} + # -> . # [ :EXPRESSION ] {\( ++ -- \. [} + # -> . # \. $IDENTIFIER {\( ++ -- \. [} + :PRIMARY-LVALUE -> . $IDENTIFIER {\( ++ --} + :PRIMARY-LVALUE -> . \( :LVALUE \) {\( ++ --} + # -> . :LVALUE :ARGUMENTS {\( ++ -- \. [} + # -> . # :ARGUMENTS {\( ++ -- \. [} + # -> . # [ :EXPRESSION ] {\( ++ -- \. [} + # -> . # \. $IDENTIFIER {\( ++ -- \. [} + # -> . # {\. [} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: ! => shift S58 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S67 + ++ => shift S68 - => shift S69 -- => shift S70 DELETE => shift S71 FALSE => shift S33 NEW => shift S73 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S75 VOID => shift S76 ~ => shift S77 + Gotos: :PRIMARY-LVALUE => S37 # => S59 # => S60 + # => S61 # => S62 # => S63 + # => S64 # => S65 :PRIMARY-RVALUE => S74 + # => S80 :LVALUE => S81 + + S76: + # -> VOID . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S79 + + S77: + # -> ~ . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S78 + + S78: + # -> ~ # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-BITWISE-NOT + + S79: + # -> VOID # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-VOID + + S80: + # -> TYPEOF # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-TYPEOF-EXPRESSION + + S81: + # -> TYPEOF :LVALUE . {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> :LVALUE . -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> :LVALUE . ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS {\( ++ -- \. [} + :ARGUMENTS -> . \( \) {\( ++ -- \. [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {\( ++ -- \. [} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-TYPEOF-LVALUE + \( => shift S47 ++ => shift S82 -- => shift S83 + Gotos: :ARGUMENTS => S50 + + S82: + # -> :LVALUE ++ . {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce POSTFIX-EXPRESSION-INCREMENT + + S83: + # -> :LVALUE -- . {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce POSTFIX-EXPRESSION-DECREMENT + + S84: + # -> # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> NEW # . :ARGUMENTS {\. [} + # -> # . \. $IDENTIFIER {\( \. [} + # -> # . [ :EXPRESSION ] {\( \. [} + # -> NEW # . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce NEW-EXPRESSION-MEMBER-EXPRESSION + \( => shift S47 \. => shift S91 [ => shift S93 + Gotos: :ARGUMENTS => S97 + + S85: + # -> # . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-EXPRESSION-MEMBER-LVALUE + + S86: + # -> NEW # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce NEW-EXPRESSION-NEW + + S87: + # -> NEW . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> NEW . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S87 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: :PRIMARY-LVALUE => S37 # => S85 :PRIMARY-RVALUE => S88 # => S89 + # => S90 + + S88: + # -> :PRIMARY-RVALUE . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-EXPRESSION-PRIMARY-RVALUE + + S89: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> NEW # . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce NEW-EXPRESSION-MEMBER-EXPRESSION + \( => shift S47 \. => shift S91 [ => shift S93 + Gotos: :ARGUMENTS => S92 + + S90: + # -> NEW # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce NEW-EXPRESSION-NEW + + S91: + # -> # \. . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: $IDENTIFIER => shift S96 + + S92: + # -> NEW # :ARGUMENTS . + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\|| => reduce MEMBER-EXPRESSION-NEW + + S93: + # -> # [ . :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :EXPRESSION -> . # {]} + # -> . # {]} + # -> . # {]} + # -> . :LVALUE = # {]} + # -> . # {]} + # -> + . # ? # \: # + {]} + # -> . # {? ] |\|\||} + # -> . # |\|\|| # {? ] |\|\||} + # -> . # {&& ? ] |\|\||} + # -> . # && # {&& ? ] |\|\||} + # -> . # {&& ? ] \| |\|\||} + # -> . # \| # {&& ? ] \| |\|\||} + # -> . # {&& ? ] ^ \| |\|\||} + # -> . # ^ # + {&& ? ] ^ \| |\|\||} + # -> . # {& && ? ] ^ \| |\|\||} + # -> . # & # {& && ? ] ^ \| |\|\||} + # -> . # {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # {!= !== & && + - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== & && + - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== & && + - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S3 # => S4 + # => S5 # => S6 # => S7 + # => S8 # => S9 # => S10 + # => S11 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :EXPRESSION => S94 + + S94: + # -> # [ :EXPRESSION . ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: ] => shift S95 + + S95: + # -> # [ :EXPRESSION ] . + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\|| => reduce MEMBER-LVALUE-ARRAY + + S96: + # -> # \. $IDENTIFIER . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-LVALUE-PROPERTY + + S97: + # -> NEW # :ARGUMENTS . {\. [} + # -> NEW # :ARGUMENTS . + {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce MEMBER-EXPRESSION-NEW + \. [ => reduce MEMBER-EXPRESSION-NEW + + S98: + # -> DELETE :LVALUE . {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-DELETE \( => shift S47 + Gotos: :ARGUMENTS => S50 + + S99: + # -> NEW . # :ARGUMENTS {\. [} + # -> . :PRIMARY-RVALUE {\( \. [} + # -> . # {\( \. [} + # -> . NEW # :ARGUMENTS {\( \. [} + # -> NEW . # :ARGUMENTS {\(} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + # -> . :PRIMARY-LVALUE {\( \. [} + # -> . # [ :EXPRESSION ] {\( \. [} + # -> . # \. $IDENTIFIER {\( \. [} + :PRIMARY-LVALUE -> . $IDENTIFIER {\( \. [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {\( \. [} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S101 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: :PRIMARY-LVALUE => S37 # => S85 :PRIMARY-RVALUE => S88 # => S100 + + S100: + # -> NEW # . :ARGUMENTS {\. [} + # -> # . \. $IDENTIFIER {\( \. [} + # -> # . [ :EXPRESSION ] {\( \. [} + # -> NEW # . :ARGUMENTS {\(} + :ARGUMENTS -> . \( \) {\( \. [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {\( \. [} + Transitions: \( => shift S47 \. => shift S91 [ => shift S93 + Gotos: :ARGUMENTS => S97 + + S101: + # -> NEW . # :ARGUMENTS {\( \. [} + # -> . :PRIMARY-RVALUE {\( \. [} + # -> . # {\( \. [} + # -> . NEW # :ARGUMENTS {\( \. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + # -> . :PRIMARY-LVALUE {\( \. [} + # -> . # [ :EXPRESSION ] {\( \. [} + # -> . # \. $IDENTIFIER {\( \. [} + :PRIMARY-LVALUE -> . $IDENTIFIER {\( \. [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {\( \. [} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S101 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: :PRIMARY-LVALUE => S37 # => S85 :PRIMARY-RVALUE => S88 # => S102 + + S102: + # -> NEW # . :ARGUMENTS {\( \. [} + # -> # . \. $IDENTIFIER {\( \. [} + # -> # . [ :EXPRESSION ] {\( \. [} + :ARGUMENTS -> . \( \) {\( \. [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {\( \. [} + Transitions: \( => shift S47 \. => shift S91 [ => shift S93 + Gotos: :ARGUMENTS => S92 + + S103: + # -> -- :LVALUE . {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-DECREMENT \( => shift S47 + Gotos: :ARGUMENTS => S50 + + S104: + # -> - # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-MINUS + + S105: + # -> ++ :LVALUE . {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-INCREMENT \( => shift S47 + Gotos: :ARGUMENTS => S50 + + S106: + # -> + # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-PLUS + + S107: + # -> # :ARGUMENTS . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| + => reduce MEMBER-LVALUE-CALL-MEMBER-EXPRESSION-NO-CALL + + + S108: + # -> # \. . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: $IDENTIFIER => shift S112 + + S109: + # -> # [ . :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :EXPRESSION -> . # {]} + # -> . # {]} + # -> . # {]} + # -> . :LVALUE = # {]} + # -> . # {]} + # -> + . # ? # \: # + {]} + # -> . # {? ] |\|\||} + # -> . # |\|\|| # {? ] |\|\||} + # -> . # {&& ? ] |\|\||} + # -> . # && # {&& ? ] |\|\||} + # -> . # {&& ? ] \| |\|\||} + # -> . # \| # {&& ? ] \| |\|\||} + # -> . # {&& ? ] ^ \| |\|\||} + # -> . # ^ # + {&& ? ] ^ \| |\|\||} + # -> . # {& && ? ] ^ \| |\|\||} + # -> . # & # {& && ? ] ^ \| |\|\||} + # -> . # {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # {!= !== & && + - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== & && + - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== & && + - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S3 # => S4 + # => S5 # => S6 # => S7 + # => S8 # => S9 # => S10 + # => S11 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :EXPRESSION => S110 + + S110: + # -> # [ :EXPRESSION . ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: ] => shift S111 + + S111: + # -> # [ :EXPRESSION ] . + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\|| => reduce MEMBER-LVALUE-ARRAY + + S112: + # -> # \. $IDENTIFIER . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-LVALUE-PROPERTY + + S113: + # -> ! # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-LOGICAL-NOT + + S114: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> NEW # . :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> NEW # . :ARGUMENTS {\(} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce NEW-EXPRESSION-MEMBER-EXPRESSION + \( => shift S47 \. => shift S91 [ => shift S93 + Gotos: :ARGUMENTS => S115 + + S115: + # -> NEW # :ARGUMENTS . + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> NEW # :ARGUMENTS . {\(} + Transitions: != !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-EXPRESSION-NEW + \( => reduce MEMBER-EXPRESSION-NEW + + S116: + # -> :LVALUE = . # {$END \) \, \: ]} + # -> . # {$END \) \, ]} + # -> . :LVALUE = # {$END \) \, ]} + # -> . # {$END \) \, ]} + # -> + . # ? # \: # + {$END \) \, ]} + # -> . # {$END \) \, ? ] |\|\||} + # -> . # |\|\|| # + {$END \) \, ? ] |\|\||} + # -> . # {$END && \) \, ? ] |\|\||} + # -> . # && # + {$END && \) \, ? ] |\|\||} + # -> . # {$END && \) \, ? ] \| |\|\||} + # -> . # \| # + {$END && \) \, ? ] \| |\|\||} + # -> . # {$END && \) \, ? ] ^ \| |\|\||} + # -> . # ^ # + {$END && \) \, ? ] ^ \| |\|\||} + # -> . # {$END & && \) \, ? ] ^ \| |\|\||} + # -> . # & # + {$END & && \) \, ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== $END & && \) \, == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== $END & && \) \, == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== $END & && \) \, == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && \) \, == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, < <= == === > >= ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 # => S117 + + S117: + # -> :LVALUE = # . {$END \) \, ]} + Transitions: $END \) \, ] => reduce ASSIGNMENT-EXPRESSION-ASSIGNMENT + + S118: + :PROGRAM -> :EXPRESSION $END . {$$} + Transitions: $$ => reduce PROGRAM + + S119: + # -> DELETE :LVALUE . {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-DELETE \( => shift S47 + Gotos: :ARGUMENTS => S50 + + S120: + # -> -- :LVALUE . {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-DECREMENT + \( => shift S47 + Gotos: :ARGUMENTS => S50 + + S121: + # -> - # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-MINUS + + S122: + # -> ++ :LVALUE . {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-INCREMENT + \( => shift S47 + Gotos: :ARGUMENTS => S50 + + S123: + # -> + # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-PLUS + + S124: + # -> ! . # {% * + - /} + # -> . # {% \) * /} + # -> . DELETE :LVALUE {% \) * /} + # -> . VOID # {% \) * /} + # -> . TYPEOF :LVALUE {% \) * /} + # -> . TYPEOF # {% \) * /} + # -> . ++ :LVALUE {% \) * /} + # -> . -- :LVALUE {% \) * /} + # -> . + # {% \) * /} + # -> . - # {% \) * /} + # -> . ~ # {% \) * /} + # -> . ! # {% \) * /} + # -> ! . # {\)} + # -> . # {% * /} + # -> . # {% * /} + # -> . :LVALUE ++ {% * /} + # -> . :LVALUE -- {% * /} + # -> . # {% * /} + # -> . NEW # {% * /} + # -> . :PRIMARY-RVALUE {% * \. / [} + # -> . # {% * \. / [} + # -> . NEW # :ARGUMENTS {% * \. / [} + :PRIMARY-RVALUE -> . THIS {% \( * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * \. / [} + # -> . :LVALUE :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + # -> . # {% * \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S18 # => S19 + :PRIMARY-LVALUE => S37 :LVALUE => S46 # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S266 + + S125: + # -> # . {!= !== < << <= == === > >= >> >>>} + # -> # . - # + {+ - < << <= > >= >> >>>} + # -> # . + # + {+ - < << <= > >= >> >>>} + # -> # . - # {\)} + # -> # . + # {\)} + Transitions: != !== < << <= == === > >= >> >>> => reduce SHIFT-EXPRESSION-ADDITIVE + => shift S262 - => shift S263 + + S126: + # -> # . {\)} + Transitions: \) => reduce SHIFT-EXPRESSION-ADDITIVE + + S127: + # -> # . {\)} + Transitions: \) => reduce COMMA-EXPRESSION-ASSIGNMENT + + S128: + # -> # . {&& ^ \|} + # -> # . & # {& ^ \|} + # -> # . & # {\)} + Transitions: & => shift S260 && ^ \| => reduce BITWISE-XOR-EXPRESSION-BITWISE-AND + + S129: + # -> # . {\)} + Transitions: \) => reduce BITWISE-XOR-EXPRESSION-BITWISE-AND + + S130: + # -> # . {&& ? |\|\||} + # -> # . \| # {&& ? \| |\|\||} + # -> # . \| # {\)} + Transitions: && ? |\|\|| => reduce LOGICAL-AND-EXPRESSION-BITWISE-OR \| => shift S258 + + S131: + # -> # . {\)} + Transitions: \) => reduce LOGICAL-AND-EXPRESSION-BITWISE-OR + + S132: + # -> # . {&& ? \| |\|\||} + # -> # . ^ # {&& ^ \|} + # -> # . ^ # {\)} + Transitions: && ? \| |\|\|| => reduce BITWISE-OR-EXPRESSION-BITWISE-XOR ^ => shift S256 + + S133: + # -> # . {\)} + Transitions: \) => reduce BITWISE-OR-EXPRESSION-BITWISE-XOR + + S134: + :PRIMARY-RVALUE -> \( # . \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: \) => shift S255 + + S135: + # -> # . {\)} + Transitions: \) => reduce ASSIGNMENT-EXPRESSION-CONDITIONAL + + S136: + # -> # . {& ^ \|} + # -> # . !== # {!= !== & == === ^} + # -> # . === # {!= !== & == === ^} + # -> # . != # {!= !== & == === ^} + # -> # . == # {!= !== & == === ^} + # -> # . !== # {\)} + # -> # . === # {\)} + # -> # . != # {\)} + # -> # . == # {\)} + Transitions: != => shift S247 !== => shift S248 & ^ \| => reduce BITWISE-AND-EXPRESSION-EQUALITY == => shift S249 === => shift S250 + + S137: + # -> # . {\)} + Transitions: \) => reduce BITWISE-AND-EXPRESSION-EQUALITY + + S138: + # -> # . {? |\|\||} + # -> # . && # {&& ? |\|\||} + # -> # . && # {\)} + Transitions: && => shift S245 ? |\|\|| => reduce LOGICAL-OR-EXPRESSION-LOGICAL-AND + + S139: + # -> # . {\)} + Transitions: \) => reduce LOGICAL-OR-EXPRESSION-LOGICAL-AND + + S140: + # -> # . |\|\|| # {? |\|\||} + # -> + # . ? # \: # + {\)} + # -> # . |\|\|| # {\)} + Transitions: ? => shift S215 |\|\|| => shift S216 + + S141: + # -> # . {\)} + Transitions: \) => reduce CONDITIONAL-EXPRESSION-LOGICAL-OR + + S142: + :LVALUE -> # . {\( \) ++ -- =} + # -> # . {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\|| => reduce MEMBER-EXPRESSION-MEMBER-LVALUE + \( \) ++ -- = => reduce LVALUE-MEMBER-LVALUE-CALL + + S143: + # -> # . + {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> # . {\( \) ++ -- =} + Transitions: != !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\|| => reduce MEMBER-EXPRESSION-MEMBER-LVALUE + \( \) ++ -- = => reduce LVALUE-MEMBER-LVALUE-NO-CALL + + S144: + # -> # . {+ - < << <= > >= >> >>>} + # -> # . % # {% * + - / << >> >>>} + # -> # . / # {% * + - / << >> >>>} + # -> # . * # {% * + - / << >> >>>} + # -> # . % # {\)} + # -> # . / # {\)} + # -> # . * # {\)} + Transitions: % => shift S209 * => shift S210 + - < << <= > >= >> >>> => reduce ADDITIVE-EXPRESSION-MULTIPLICATIVE / => shift S211 + + S145: + # -> # . {\)} + Transitions: \) => reduce ADDITIVE-EXPRESSION-MULTIPLICATIVE + + S146: + # -> # . {!= !== & == === ^} + # -> # . >= # {!= !== & < <= == === > >=} + # -> # . <= # {!= !== & < <= == === > >=} + # -> # . > # {!= !== & < <= == === > >=} + # -> # . < # {!= !== & < <= == === > >=} + # -> # . >= # {\)} + # -> # . <= # {\)} + # -> # . > # {\)} + # -> # . < # {\)} + Transitions: != !== & == === ^ => reduce EQUALITY-EXPRESSION-RELATIONAL < => shift S195 <= => shift S196 > => shift S197 + >= => shift S198 + + S147: + # -> # . {\)} + Transitions: \) => reduce EQUALITY-EXPRESSION-RELATIONAL + + S148: + # -> # . {!= !== & < <= == === > >=} + # -> # . >>> # + {!= !== < << <= == === > >= >> >>>} + # -> # . >> # {!= !== < << <= == === > >= >> >>>} + # -> # . << # {!= !== < << <= == === > >= >> >>>} + # -> # . >>> # {\)} + # -> # . >> # {\)} + # -> # . << # {\)} + Transitions: != !== & < <= == === > >= => reduce RELATIONAL-EXPRESSION-SHIFT << => shift S179 >> => shift S180 >>> => shift S181 + + S149: + # -> # . {\)} + Transitions: \) => reduce RELATIONAL-EXPRESSION-SHIFT + + S150: + # -> # . {\)} + Transitions: \) => reduce MULTIPLICATIVE-EXPRESSION-UNARY + + S151: + # -> + . # {% * + - /} + # -> . # {% \) * /} + # -> . DELETE :LVALUE {% \) * /} + # -> . VOID # {% \) * /} + # -> . TYPEOF :LVALUE {% \) * /} + # -> . TYPEOF # {% \) * /} + # -> . ++ :LVALUE {% \) * /} + # -> . -- :LVALUE {% \) * /} + # -> . + # {% \) * /} + # -> . - # {% \) * /} + # -> . ~ # {% \) * /} + # -> . ! # {% \) * /} + # -> + . # {\)} + # -> . # {% * /} + # -> . # {% * /} + # -> . :LVALUE ++ {% * /} + # -> . :LVALUE -- {% * /} + # -> . # {% * /} + # -> . NEW # {% * /} + # -> . :PRIMARY-RVALUE {% * \. / [} + # -> . # {% * \. / [} + # -> . NEW # :ARGUMENTS {% * \. / [} + :PRIMARY-RVALUE -> . THIS {% \( * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * \. / [} + # -> . :LVALUE :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + # -> . # {% * \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S18 # => S19 + :PRIMARY-LVALUE => S37 :LVALUE => S46 # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S178 + + S152: + # -> ++ . :LVALUE {% * + - /} + # -> ++ . :LVALUE {\)} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # {% \( \) * /} + :LVALUE -> . # {% \( \) * /} + # -> . :PRIMARY-LVALUE {% \( * \. / [} + # -> . # [ :EXPRESSION ] {% \( * \. / [} + # -> . # \. $IDENTIFIER {% \( * \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \( * /} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \( * /} + # -> . :LVALUE :ARGUMENTS {% \( * \. / [} + # -> . # :ARGUMENTS {% \( * \. / [} + # -> . # [ :EXPRESSION ] {% \( * \. / [} + # -> . # \. $IDENTIFIER {% \( * \. / [} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S158 :LVALUE => S177 + + S153: + # -> - . # {% * + - /} + # -> . # {% \) * /} + # -> . DELETE :LVALUE {% \) * /} + # -> . VOID # {% \) * /} + # -> . TYPEOF :LVALUE {% \) * /} + # -> . TYPEOF # {% \) * /} + # -> . ++ :LVALUE {% \) * /} + # -> . -- :LVALUE {% \) * /} + # -> . + # {% \) * /} + # -> . - # {% \) * /} + # -> . ~ # {% \) * /} + # -> . ! # {% \) * /} + # -> - . # {\)} + # -> . # {% * /} + # -> . # {% * /} + # -> . :LVALUE ++ {% * /} + # -> . :LVALUE -- {% * /} + # -> . # {% * /} + # -> . NEW # {% * /} + # -> . :PRIMARY-RVALUE {% * \. / [} + # -> . # {% * \. / [} + # -> . NEW # :ARGUMENTS {% * \. / [} + :PRIMARY-RVALUE -> . THIS {% \( * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * \. / [} + # -> . :LVALUE :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + # -> . # {% * \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S18 # => S19 + :PRIMARY-LVALUE => S37 :LVALUE => S46 # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S176 + + S154: + # -> -- . :LVALUE {% * + - /} + # -> -- . :LVALUE {\)} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # {% \( \) * /} + :LVALUE -> . # {% \( \) * /} + # -> . :PRIMARY-LVALUE {% \( * \. / [} + # -> . # [ :EXPRESSION ] {% \( * \. / [} + # -> . # \. $IDENTIFIER {% \( * \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \( * /} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \( * /} + # -> . :LVALUE :ARGUMENTS {% \( * \. / [} + # -> . # :ARGUMENTS {% \( * \. / [} + # -> . # [ :EXPRESSION ] {% \( * \. / [} + # -> . # \. $IDENTIFIER {% \( * \. / [} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S158 :LVALUE => S175 + + S155: + # -> DELETE . :LVALUE {% * + - /} + # -> DELETE . :LVALUE {\)} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # {% \( \) * /} + :LVALUE -> . # {% \( \) * /} + # -> . :PRIMARY-LVALUE {% \( * \. / [} + # -> . # [ :EXPRESSION ] {% \( * \. / [} + # -> . # \. $IDENTIFIER {% \( * \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \( * /} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \( * /} + # -> . :LVALUE :ARGUMENTS {% \( * \. / [} + # -> . # :ARGUMENTS {% \( * \. / [} + # -> . # [ :EXPRESSION ] {% \( * \. / [} + # -> . # \. $IDENTIFIER {% \( * \. / [} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S158 :LVALUE => S174 + + S156: + # -> :LVALUE . -- {% * + - /} + # -> :LVALUE . ++ {% * + - /} + # -> :LVALUE . = # {\)} + # -> :LVALUE . -- {\)} + # -> :LVALUE . ++ {\)} + :PRIMARY-LVALUE -> \( :LVALUE . \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS {% \( \) * ++ -- \. / = [} + :ARGUMENTS -> . \( \) {% \( \) * ++ -- \. / = [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {% \( \) * ++ -- \. / = [} + Transitions: \( => shift S47 \) => shift S169 ++ => shift S170 -- => shift S171 = => shift S172 + Gotos: :ARGUMENTS => S50 + + S157: + # -> NEW . # {% * + - /} + # -> . # {% \) * + - /} + # -> . NEW # {% \) * + - /} + # -> NEW . # :ARGUMENTS {% * + - \. / [} + # -> . :PRIMARY-RVALUE {% \( \) * + - \. / [} + # -> . # {% \( \) * + - \. / [} + # -> . NEW # :ARGUMENTS {% \( \) * + - \. / [} + # -> NEW . # {\)} + # -> NEW . # :ARGUMENTS {\( \)} + :PRIMARY-RVALUE -> . THIS {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . NULL {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( \) * + - \. / [} + # -> . :PRIMARY-LVALUE {% \( \) * + - \. / [} + # -> . # [ :EXPRESSION ] {% \( \) * + - \. / [} + # -> . # \. $IDENTIFIER {% \( \) * + - \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \( \) * + - \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \( \) * + - \. / [} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S87 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: :PRIMARY-LVALUE => S37 # => S85 :PRIMARY-RVALUE => S88 # => S166 + # => S167 + + S158: + # -> :PRIMARY-RVALUE . {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> :PRIMARY-RVALUE . {\( \)} + Transitions: != !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\|| => reduce MEMBER-EXPRESSION-PRIMARY-RVALUE + \( \) => reduce MEMBER-EXPRESSION-PRIMARY-RVALUE + + S159: + # -> TYPEOF . # {% * + - /} + # -> TYPEOF . :LVALUE {% * + - /} + # -> TYPEOF . # {\)} + # -> TYPEOF . :LVALUE {\)} + # -> . # {% \) * /} + # -> . DELETE :LVALUE {% \) * /} + # -> . VOID # {% \) * /} + # -> . TYPEOF :LVALUE {% \) * /} + # -> . TYPEOF # {% \) * /} + # -> . ++ :LVALUE {% \) * /} + # -> . -- :LVALUE {% \) * /} + # -> . + # {% \) * /} + # -> . - # {% \) * /} + # -> . ~ # {% \) * /} + # -> . ! # {% \) * /} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {% \( * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * \. / [} + # -> . # {% * /} + # -> . :LVALUE ++ {% * /} + # -> . :LVALUE -- {% * /} + :LVALUE -> . # {% \( \) * ++ -- /} + :LVALUE -> . # {% \( \) * ++ -- /} + # -> . :PRIMARY-LVALUE {\( ++ -- \. [} + # -> . # [ :EXPRESSION ] {\( ++ -- \. [} + # -> . # \. $IDENTIFIER {\( ++ -- \. [} + :PRIMARY-LVALUE -> . $IDENTIFIER {\( ++ --} + :PRIMARY-LVALUE -> . \( :LVALUE \) {\( ++ --} + # -> . :LVALUE :ARGUMENTS {\( ++ -- \. [} + # -> . # :ARGUMENTS {\( ++ -- \. [} + # -> . # [ :EXPRESSION ] {\( ++ -- \. [} + # -> . # \. $IDENTIFIER {\( ++ -- \. [} + # -> . # {\. [} + # -> . # {% * /} + # -> . NEW # {% * /} + # -> . :PRIMARY-RVALUE {% \( * /} + # -> . NEW # :ARGUMENTS {% \( * /} + Transitions: ! => shift S58 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S67 + ++ => shift S68 - => shift S69 -- => shift S70 DELETE => shift S71 FALSE => shift S33 NEW => shift S73 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S75 VOID => shift S76 ~ => shift S77 + Gotos: :PRIMARY-LVALUE => S37 # => S59 # => S60 + # => S61 # => S62 # => S63 + # => S64 # => S65 :PRIMARY-RVALUE => S74 + # => S164 :LVALUE => S165 + + S160: + # -> VOID . # {% * + - /} + # -> . # {% \) * /} + # -> . DELETE :LVALUE {% \) * /} + # -> . VOID # {% \) * /} + # -> . TYPEOF :LVALUE {% \) * /} + # -> . TYPEOF # {% \) * /} + # -> . ++ :LVALUE {% \) * /} + # -> . -- :LVALUE {% \) * /} + # -> . + # {% \) * /} + # -> . - # {% \) * /} + # -> . ~ # {% \) * /} + # -> . ! # {% \) * /} + # -> VOID . # {\)} + # -> . # {% * /} + # -> . # {% * /} + # -> . :LVALUE ++ {% * /} + # -> . :LVALUE -- {% * /} + # -> . # {% * /} + # -> . NEW # {% * /} + # -> . :PRIMARY-RVALUE {% * \. / [} + # -> . # {% * \. / [} + # -> . NEW # :ARGUMENTS {% * \. / [} + :PRIMARY-RVALUE -> . THIS {% \( * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * \. / [} + # -> . :LVALUE :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + # -> . # {% * \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S18 # => S19 + :PRIMARY-LVALUE => S37 :LVALUE => S46 # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S163 + + S161: + # -> ~ . # {% * + - /} + # -> . # {% \) * /} + # -> . DELETE :LVALUE {% \) * /} + # -> . VOID # {% \) * /} + # -> . TYPEOF :LVALUE {% \) * /} + # -> . TYPEOF # {% \) * /} + # -> . ++ :LVALUE {% \) * /} + # -> . -- :LVALUE {% \) * /} + # -> . + # {% \) * /} + # -> . - # {% \) * /} + # -> . ~ # {% \) * /} + # -> . ! # {% \) * /} + # -> ~ . # {\)} + # -> . # {% * /} + # -> . # {% * /} + # -> . :LVALUE ++ {% * /} + # -> . :LVALUE -- {% * /} + # -> . # {% * /} + # -> . NEW # {% * /} + # -> . :PRIMARY-RVALUE {% * \. / [} + # -> . # {% * \. / [} + # -> . NEW # :ARGUMENTS {% * \. / [} + :PRIMARY-RVALUE -> . THIS {% \( * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * \. / [} + # -> . :LVALUE :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + # -> . # {% * \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S18 # => S19 + :PRIMARY-LVALUE => S37 :LVALUE => S46 # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S162 + + S162: + # -> ~ # . {% * /} + # -> ~ # . {\)} + Transitions: % * / => reduce UNARY-EXPRESSION-BITWISE-NOT \) => reduce UNARY-EXPRESSION-BITWISE-NOT + + S163: + # -> VOID # . {% * /} + # -> VOID # . {\)} + Transitions: % * / => reduce UNARY-EXPRESSION-VOID \) => reduce UNARY-EXPRESSION-VOID + + S164: + # -> TYPEOF # . {% * /} + # -> TYPEOF # . {\)} + Transitions: % * / => reduce UNARY-EXPRESSION-TYPEOF-EXPRESSION \) => reduce UNARY-EXPRESSION-TYPEOF-EXPRESSION + + S165: + # -> TYPEOF :LVALUE . {% * /} + # -> TYPEOF :LVALUE . {\)} + # -> :LVALUE . -- {% * /} + # -> :LVALUE . ++ {% * /} + # -> :LVALUE . :ARGUMENTS {\( ++ -- \. [} + :ARGUMENTS -> . \( \) {\( ++ -- \. [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {\( ++ -- \. [} + Transitions: % * / => reduce UNARY-EXPRESSION-TYPEOF-LVALUE \( => shift S47 \) => reduce UNARY-EXPRESSION-TYPEOF-LVALUE ++ => shift S82 + -- => shift S83 + Gotos: :ARGUMENTS => S50 + + S166: + # -> # . {% \) * + - /} + # -> NEW # . :ARGUMENTS {% * + - \. / [} + # -> # . \. $IDENTIFIER {% \( \) * + - \. / [} + # -> # . [ :EXPRESSION ] {% \( \) * + - \. / [} + # -> NEW # . :ARGUMENTS {\( \)} + :ARGUMENTS -> . \( \) {% \( \) * \. / [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {% \( \) * \. / [} + Transitions: % \) * + - / => reduce NEW-EXPRESSION-MEMBER-EXPRESSION \( => shift S47 \. => shift S91 [ => shift S93 + Gotos: :ARGUMENTS => S168 + + S167: + # -> NEW # . {% * + - /} + # -> NEW # . {\)} + Transitions: % * + - / => reduce NEW-EXPRESSION-NEW \) => reduce NEW-EXPRESSION-NEW + + S168: + # -> NEW # :ARGUMENTS . {% * \. / [} + # -> NEW # :ARGUMENTS . {\( \)} + Transitions: % * \. / [ => reduce MEMBER-EXPRESSION-NEW \( \) => reduce MEMBER-EXPRESSION-NEW + + S169: + :PRIMARY-LVALUE -> \( :LVALUE \) . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| + => reduce PRIMARY-LVALUE-PARENTHESES + + + S170: + # -> :LVALUE ++ . {% * + - /} + # -> :LVALUE ++ . {\)} + Transitions: % * + - / => reduce POSTFIX-EXPRESSION-INCREMENT \) => reduce POSTFIX-EXPRESSION-INCREMENT + + S171: + # -> :LVALUE -- . {% * + - /} + # -> :LVALUE -- . {\)} + Transitions: % * + - / => reduce POSTFIX-EXPRESSION-DECREMENT \) => reduce POSTFIX-EXPRESSION-DECREMENT + + S172: + # -> :LVALUE = . # {\)} + # -> . # {\)} + # -> . :LVALUE = # {\)} + # -> . # {\)} + # -> + . # ? # \: # + {\)} + # -> . # {\) ? |\|\||} + # -> . # |\|\|| # {\) ? |\|\||} + # -> . # {&& \) ? |\|\||} + # -> . # && # {&& \) ? |\|\||} + # -> . # {&& \) ? \| |\|\||} + # -> . # \| # {&& \) ? \| |\|\||} + # -> . # {&& \) ? ^ \| |\|\||} + # -> . # ^ # + {&& \) ? ^ \| |\|\||} + # -> . # {& && \) ? ^ \| |\|\||} + # -> . # & # + {& && \) ? ^ \| |\|\||} + # -> . # {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # == # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # != # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # === # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # !== # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # < # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # > # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # <= # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # >= # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # << # + {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >> # + {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >>> # + {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== & && \) + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + # + {!= !== & && \) + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # - # + {!= !== & && \) + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # * # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # / # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # % # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 # => S173 + + S173: + # -> :LVALUE = # . {\)} + Transitions: \) => reduce ASSIGNMENT-EXPRESSION-ASSIGNMENT + + S174: + # -> DELETE :LVALUE . {% * /} + # -> DELETE :LVALUE . {\)} + # -> :LVALUE . :ARGUMENTS {% \( * \. / [} + :ARGUMENTS -> . \( \) {% \( * \. / [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {% \( * \. / [} + Transitions: % * / => reduce UNARY-EXPRESSION-DELETE \( => shift S47 \) => reduce UNARY-EXPRESSION-DELETE + Gotos: :ARGUMENTS => S50 + + S175: + # -> -- :LVALUE . {% * /} + # -> -- :LVALUE . {\)} + # -> :LVALUE . :ARGUMENTS {% \( * \. / [} + :ARGUMENTS -> . \( \) {% \( * \. / [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {% \( * \. / [} + Transitions: % * / => reduce UNARY-EXPRESSION-DECREMENT \( => shift S47 \) => reduce UNARY-EXPRESSION-DECREMENT + Gotos: :ARGUMENTS => S50 + + S176: + # -> - # . {% * /} + # -> - # . {\)} + Transitions: % * / => reduce UNARY-EXPRESSION-MINUS \) => reduce UNARY-EXPRESSION-MINUS + + S177: + # -> ++ :LVALUE . {% * /} + # -> ++ :LVALUE . {\)} + # -> :LVALUE . :ARGUMENTS {% \( * \. / [} + :ARGUMENTS -> . \( \) {% \( * \. / [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {% \( * \. / [} + Transitions: % * / => reduce UNARY-EXPRESSION-INCREMENT \( => shift S47 \) => reduce UNARY-EXPRESSION-INCREMENT + Gotos: :ARGUMENTS => S50 + + S178: + # -> + # . {% * /} + # -> + # . {\)} + Transitions: % * / => reduce UNARY-EXPRESSION-PLUS \) => reduce UNARY-EXPRESSION-PLUS + + S179: + # -> # << . # {!= !== < << <= == === > >= >> >>>} + # -> # << . # {\)} + # -> . # {\) + - < << <= > >= >> >>>} + # -> . # + # + {\) + - < << <= > >= >> >>>} + # -> . # - # + {\) + - < << <= > >= >> >>>} + # -> . # {% \) * + - /} + # -> . # * # {% \) * + - /} + # -> . # / # {% \) * + - /} + # -> . # % # {% \) * + - /} + # -> . # {% \) * + - /} + # -> . DELETE :LVALUE {% \) * + - /} + # -> . VOID # {% \) * + - /} + # -> . TYPEOF :LVALUE {% \) * + - /} + # -> . TYPEOF # {% \) * + - /} + # -> . ++ :LVALUE {% \) * + - /} + # -> . -- :LVALUE {% \) * + - /} + # -> . + # {% \) * + - /} + # -> . - # {% \) * + - /} + # -> . ~ # {% \) * + - /} + # -> . ! # {% \) * + - /} + # -> . # {% \) * + - /} + # -> . # {% \) * + - /} + # -> . :LVALUE ++ {% \) * + - /} + # -> . :LVALUE -- {% \) * + - /} + # -> . # {% \) * + - /} + # -> . NEW # {% \) * + - /} + # -> . :PRIMARY-RVALUE {% \) * + - \. / [} + # -> . # {% \) * + - \. / [} + # -> . NEW # :ARGUMENTS {% \) * + - \. / [} + :PRIMARY-RVALUE -> . THIS {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . NULL {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( \) * + - \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( \) * + ++ - -- \. / [} + # -> . # [ :EXPRESSION ] {% \( \) * + ++ - -- \. / [} + # -> . # \. $IDENTIFIER {% \( \) * + ++ - -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \) * + - \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \) * + - \. / [} + # -> . :LVALUE :ARGUMENTS {% \( \) * + ++ - -- \. / [} + # -> . # :ARGUMENTS {% \( \) * + ++ - -- \. / [} + # -> . # [ :EXPRESSION ] {% \( \) * + ++ - -- \. / [} + # -> . # \. $IDENTIFIER {% \( \) * + ++ - -- \. / [} + # -> . # {% \) * + - \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S194 + + S180: + # -> # >> . # {!= !== < << <= == === > >= >> >>>} + # -> # >> . # {\)} + # -> . # {\) + - < << <= > >= >> >>>} + # -> . # + # + {\) + - < << <= > >= >> >>>} + # -> . # - # + {\) + - < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . # * # + {% * + - / < << <= > >= >> >>>} + # -> . # / # + {% * + - / < << <= > >= >> >>>} + # -> . # % # + {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . DELETE :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . VOID # {% * + - / < << <= > >= >> >>>} + # -> . TYPEOF :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . TYPEOF # {% * + - / < << <= > >= >> >>>} + # -> . ++ :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . -- :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . + # {% * + - / < << <= > >= >> >>>} + # -> . - # {% * + - / < << <= > >= >> >>>} + # -> . ~ # {% * + - / < << <= > >= >> >>>} + # -> . ! # {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . :LVALUE ++ {% * + - / < << <= > >= >> >>>} + # -> . :LVALUE -- {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . NEW # {% * + - / < << <= > >= >> >>>} + # -> . :PRIMARY-RVALUE {% * + - \. / < << <= > >= >> >>> [} + # -> . # {% * + - \. / < << <= > >= >> >>> [} + # -> . NEW # :ARGUMENTS {% * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {% \( * + - \. / < << <= > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * + - \. / < << <= > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * + - \. / < << <= > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # :ARGUMENTS {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # {% * + - \. / < << <= > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S193 + + S181: + # -> # >>> . # + {!= !== < << <= == === > >= >> >>>} + # -> # >>> . # {\)} + # -> . # {\) + - < << <= > >= >> >>>} + # -> . # + # + {\) + - < << <= > >= >> >>>} + # -> . # - # + {\) + - < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . # * # + {% * + - / < << <= > >= >> >>>} + # -> . # / # + {% * + - / < << <= > >= >> >>>} + # -> . # % # + {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . DELETE :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . VOID # {% * + - / < << <= > >= >> >>>} + # -> . TYPEOF :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . TYPEOF # {% * + - / < << <= > >= >> >>>} + # -> . ++ :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . -- :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . + # {% * + - / < << <= > >= >> >>>} + # -> . - # {% * + - / < << <= > >= >> >>>} + # -> . ~ # {% * + - / < << <= > >= >> >>>} + # -> . ! # {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . :LVALUE ++ {% * + - / < << <= > >= >> >>>} + # -> . :LVALUE -- {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . NEW # {% * + - / < << <= > >= >> >>>} + # -> . :PRIMARY-RVALUE {% * + - \. / < << <= > >= >> >>> [} + # -> . # {% * + - \. / < << <= > >= >> >>> [} + # -> . NEW # :ARGUMENTS {% * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {% \( * + - \. / < << <= > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * + - \. / < << <= > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * + - \. / < << <= > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # :ARGUMENTS {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # {% * + - \. / < << <= > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S182 + + S182: + # -> # >>> # . {< << <= > >= >> >>>} + # -> # . - # + {\) + - < << <= > >= >> >>>} + # -> # . + # + {\) + - < << <= > >= >> >>>} + # -> # >>> # . {\)} + Transitions: \) => reduce SHIFT-EXPRESSION-RIGHT-UNSIGNED + => shift S183 - => shift S184 + < << <= > >= >> >>> => reduce SHIFT-EXPRESSION-RIGHT-UNSIGNED + + S183: + # -> # + . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S192 + + S184: + # -> # - . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S185 + + S185: + # -> # - # . + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce ADDITIVE-EXPRESSION-SUBTRACT % => shift S186 + * => shift S187 / => shift S188 + + S186: + # -> # % . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S191 + + S187: + # -> # * . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S190 + + S188: + # -> # / . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S189 + + S189: + # -> # / # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce MULTIPLICATIVE-EXPRESSION-DIVIDE + + S190: + # -> # * # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce MULTIPLICATIVE-EXPRESSION-MULTIPLY + + S191: + # -> # % # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce MULTIPLICATIVE-EXPRESSION-REMAINDER + + S192: + # -> # + # . + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce ADDITIVE-EXPRESSION-ADD % => shift S186 + * => shift S187 / => shift S188 + + S193: + # -> # >> # . {< << <= > >= >> >>>} + # -> # . - # + {\) + - < << <= > >= >> >>>} + # -> # . + # + {\) + - < << <= > >= >> >>>} + # -> # >> # . {\)} + Transitions: \) => reduce SHIFT-EXPRESSION-RIGHT-SIGNED + => shift S183 - => shift S184 + < << <= > >= >> >>> => reduce SHIFT-EXPRESSION-RIGHT-SIGNED + + S194: + # -> # << # . {< << <= > >= >> >>>} + # -> # . - # + {\) + - < << <= > >= >> >>>} + # -> # . + # + {\) + - < << <= > >= >> >>>} + # -> # << # . {\)} + Transitions: \) => reduce SHIFT-EXPRESSION-LEFT + => shift S183 - => shift S184 < << <= > >= >> >>> => reduce SHIFT-EXPRESSION-LEFT + + S195: + # -> # < . # {!= !== & < <= == === > >=} + # -> # < . # {\)} + # -> . # {!= !== \) < << <= == === > >= >> >>>} + # -> . # << # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # {\) + - << >> >>>} + # -> . # + # {\) + - << >> >>>} + # -> . # - # {\) + - << >> >>>} + # -> . # {% \) * + - / << >> >>>} + # -> . # * # + {% \) * + - / << >> >>>} + # -> . # / # + {% \) * + - / << >> >>>} + # -> . # % # + {% \) * + - / << >> >>>} + # -> . # {% \) * + - / << >> >>>} + # -> . DELETE :LVALUE {% \) * + - / << >> >>>} + # -> . VOID # {% \) * + - / << >> >>>} + # -> . TYPEOF :LVALUE {% \) * + - / << >> >>>} + # -> . TYPEOF # {% \) * + - / << >> >>>} + # -> . ++ :LVALUE {% \) * + - / << >> >>>} + # -> . -- :LVALUE {% \) * + - / << >> >>>} + # -> . + # {% \) * + - / << >> >>>} + # -> . - # {% \) * + - / << >> >>>} + # -> . ~ # {% \) * + - / << >> >>>} + # -> . ! # {% \) * + - / << >> >>>} + # -> . # {% \) * + - / << >> >>>} + # -> . # {% \) * + - / << >> >>>} + # -> . :LVALUE ++ {% \) * + - / << >> >>>} + # -> . :LVALUE -- {% \) * + - / << >> >>>} + # -> . # {% \) * + - / << >> >>>} + # -> . NEW # {% \) * + - / << >> >>>} + # -> . :PRIMARY-RVALUE {% \) * + - \. / << >> >>> [} + # -> . # {% \) * + - \. / << >> >>> [} + # -> . NEW # :ARGUMENTS {% \) * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . THIS {% \( \) * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . NULL {% \( \) * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . TRUE {% \( \) * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . FALSE {% \( \) * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {% \( \) * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . $STRING {% \( \) * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {% \( \) * + - \. / << >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( \) * + ++ - -- \. / << >> >>> [} + # -> . # [ :EXPRESSION ] {% \( \) * + ++ - -- \. / << >> >>> [} + # -> . # \. $IDENTIFIER {% \( \) * + ++ - -- \. / << >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \) * + - \. / << >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \) * + - \. / << >> >>> [} + # -> . :LVALUE :ARGUMENTS {% \( \) * + ++ - -- \. / << >> >>> [} + # -> . # :ARGUMENTS {% \( \) * + ++ - -- \. / << >> >>> [} + # -> . # [ :EXPRESSION ] {% \( \) * + ++ - -- \. / << >> >>> [} + # -> . # \. $IDENTIFIER {% \( \) * + ++ - -- \. / << >> >>> [} + # -> . # {% \) * + - \. / << >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S208 + + S196: + # -> # <= . # {!= !== & < <= == === > >=} + # -> # <= . # {\)} + # -> . # {!= !== \) < << <= == === > >= >> >>>} + # -> . # << # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # {!= !== + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== + - < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S207 + + S197: + # -> # > . # {!= !== & < <= == === > >=} + # -> # > . # {\)} + # -> . # {!= !== \) < << <= == === > >= >> >>>} + # -> . # << # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # {!= !== + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== + - < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S206 + + S198: + # -> # >= . # {!= !== & < <= == === > >=} + # -> # >= . # {\)} + # -> . # {!= !== \) < << <= == === > >= >> >>>} + # -> . # << # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # {!= !== + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== + - < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S199 + + S199: + # -> # >= # . {!= !== < <= == === > >=} + # -> # . >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . << # + {!= !== \) < << <= == === > >= >> >>>} + # -> # >= # . {\)} + Transitions: != !== < <= == === > >= => reduce RELATIONAL-EXPRESSION-GREATER-OR-EQUAL \) => reduce RELATIONAL-EXPRESSION-GREATER-OR-EQUAL + << => shift S200 >> => shift S201 >>> => shift S202 + + S200: + # -> # << . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S205 + + S201: + # -> # >> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S204 + + S202: + # -> # >>> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S203 + + S203: + # -> # >>> # . + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce SHIFT-EXPRESSION-RIGHT-UNSIGNED + => shift S183 + - => shift S184 + + S204: + # -> # >> # . + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce SHIFT-EXPRESSION-RIGHT-SIGNED + => shift S183 + - => shift S184 + + S205: + # -> # << # . + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce SHIFT-EXPRESSION-LEFT + => shift S183 + - => shift S184 + + S206: + # -> # > # . {!= !== < <= == === > >=} + # -> # . >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . << # + {!= !== \) < << <= == === > >= >> >>>} + # -> # > # . {\)} + Transitions: != !== < <= == === > >= => reduce RELATIONAL-EXPRESSION-GREATER \) => reduce RELATIONAL-EXPRESSION-GREATER << => shift S200 + >> => shift S201 >>> => shift S202 + + S207: + # -> # <= # . {!= !== < <= == === > >=} + # -> # . >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . << # + {!= !== \) < << <= == === > >= >> >>>} + # -> # <= # . {\)} + Transitions: != !== < <= == === > >= => reduce RELATIONAL-EXPRESSION-LESS-OR-EQUAL \) => reduce RELATIONAL-EXPRESSION-LESS-OR-EQUAL + << => shift S200 >> => shift S201 >>> => shift S202 + + S208: + # -> # < # . {!= !== < <= == === > >=} + # -> # . >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . << # + {!= !== \) < << <= == === > >= >> >>>} + # -> # < # . {\)} + Transitions: != !== < <= == === > >= => reduce RELATIONAL-EXPRESSION-LESS \) => reduce RELATIONAL-EXPRESSION-LESS << => shift S200 + >> => shift S201 >>> => shift S202 + + S209: + # -> # % . # {% * + - / << >> >>>} + # -> # % . # {\)} + # -> . # {% \) * + - /} + # -> . DELETE :LVALUE {% \) * + - /} + # -> . VOID # {% \) * + - /} + # -> . TYPEOF :LVALUE {% \) * + - /} + # -> . TYPEOF # {% \) * + - /} + # -> . ++ :LVALUE {% \) * + - /} + # -> . -- :LVALUE {% \) * + - /} + # -> . + # {% \) * + - /} + # -> . - # {% \) * + - /} + # -> . ~ # {% \) * + - /} + # -> . ! # {% \) * + - /} + # -> . # {% * + - /} + # -> . # {% * + - /} + # -> . :LVALUE ++ {% * + - /} + # -> . :LVALUE -- {% * + - /} + # -> . # {% * + - /} + # -> . NEW # {% * + - /} + # -> . :PRIMARY-RVALUE {% * + - \. / [} + # -> . # {% * + - \. / [} + # -> . NEW # :ARGUMENTS {% * + - \. / [} + :PRIMARY-RVALUE -> . THIS {% \( * + - \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * + - \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * + - \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * + - \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * + - \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * + - \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * + - \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * + ++ - -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * + - \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * + - \. / [} + # -> . :LVALUE :ARGUMENTS {% \( * + ++ - -- \. / [} + # -> . # :ARGUMENTS {% \( * + ++ - -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / [} + # -> . # {% * + - \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S214 + + S210: + # -> # * . # {% * + - / << >> >>>} + # -> # * . # {\)} + # -> . # {% \) * + - /} + # -> . DELETE :LVALUE {% \) * + - /} + # -> . VOID # {% \) * + - /} + # -> . TYPEOF :LVALUE {% \) * + - /} + # -> . TYPEOF # {% \) * + - /} + # -> . ++ :LVALUE {% \) * + - /} + # -> . -- :LVALUE {% \) * + - /} + # -> . + # {% \) * + - /} + # -> . - # {% \) * + - /} + # -> . ~ # {% \) * + - /} + # -> . ! # {% \) * + - /} + # -> . # {\)} + # -> . # {\)} + # -> . :LVALUE ++ {\)} + # -> . :LVALUE -- {\)} + # -> . # {\)} + # -> . NEW # {\)} + # -> . :PRIMARY-RVALUE {\) \. [} + # -> . # {\) \. [} + # -> . NEW # :ARGUMENTS {\) \. [} + :PRIMARY-RVALUE -> . THIS {\( \) \. [} + :PRIMARY-RVALUE -> . NULL {\( \) \. [} + :PRIMARY-RVALUE -> . TRUE {\( \) \. [} + :PRIMARY-RVALUE -> . FALSE {\( \) \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \) \. [} + :PRIMARY-RVALUE -> . $STRING {\( \) \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \) \. [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {\( \) ++ -- \. [} + # -> . # [ :EXPRESSION ] {\( \) ++ -- \. [} + # -> . # \. $IDENTIFIER {\( \) ++ -- \. [} + :PRIMARY-LVALUE -> . $IDENTIFIER {\) \. [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {\) \. [} + # -> . :LVALUE :ARGUMENTS {\( \) ++ -- \. [} + # -> . # :ARGUMENTS {\( \) ++ -- \. [} + # -> . # [ :EXPRESSION ] {\( \) ++ -- \. [} + # -> . # \. $IDENTIFIER {\( \) ++ -- \. [} + # -> . # {\) \. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S213 + + S211: + # -> # / . # {% * + - / << >> >>>} + # -> # / . # {\)} + # -> . # {% \) * + - /} + # -> . DELETE :LVALUE {% \) * + - /} + # -> . VOID # {% \) * + - /} + # -> . TYPEOF :LVALUE {% \) * + - /} + # -> . TYPEOF # {% \) * + - /} + # -> . ++ :LVALUE {% \) * + - /} + # -> . -- :LVALUE {% \) * + - /} + # -> . + # {% \) * + - /} + # -> . - # {% \) * + - /} + # -> . ~ # {% \) * + - /} + # -> . ! # {% \) * + - /} + # -> . # {% * + - /} + # -> . # {% * + - /} + # -> . :LVALUE ++ {% * + - /} + # -> . :LVALUE -- {% * + - /} + # -> . # {% * + - /} + # -> . NEW # {% * + - /} + # -> . :PRIMARY-RVALUE {% * + - \. / [} + # -> . # {% * + - \. / [} + # -> . NEW # :ARGUMENTS {% * + - \. / [} + :PRIMARY-RVALUE -> . THIS {% \( * + - \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * + - \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * + - \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * + - \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * + - \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * + - \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * + - \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * + ++ - -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * + - \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * + - \. / [} + # -> . :LVALUE :ARGUMENTS {% \( * + ++ - -- \. / [} + # -> . # :ARGUMENTS {% \( * + ++ - -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / [} + # -> . # {% * + - \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S212 + + S212: + # -> # / # . {% * + - /} + # -> # / # . {\)} + Transitions: % * + - / => reduce MULTIPLICATIVE-EXPRESSION-DIVIDE \) => reduce MULTIPLICATIVE-EXPRESSION-DIVIDE + + S213: + # -> # * # . {% * + - /} + # -> # * # . {\)} + Transitions: % * + - / => reduce MULTIPLICATIVE-EXPRESSION-MULTIPLY \) => reduce MULTIPLICATIVE-EXPRESSION-MULTIPLY + + S214: + # -> # % # . {% * + - /} + # -> # % # . {\)} + Transitions: % * + - / => reduce MULTIPLICATIVE-EXPRESSION-REMAINDER \) => reduce MULTIPLICATIVE-EXPRESSION-REMAINDER + + S215: + # -> + # ? . # \: # + {\)} + # -> . # {\:} + # -> . :LVALUE = # {\:} + # -> . # {\:} + # -> + . # ? # \: # + {\:} + # -> . # {\: ? |\|\||} + # -> . # |\|\|| # {\: ? |\|\||} + # -> . # {&& \: ? |\|\||} + # -> . # && # {&& \: ? |\|\||} + # -> . # {&& \: ? \| |\|\||} + # -> . # \| # {&& \: ? \| |\|\||} + # -> . # {&& \: ? ^ \| |\|\||} + # -> . # ^ # + {&& \: ? ^ \| |\|\||} + # -> . # {& && \: ? ^ \| |\|\||} + # -> . # & # + {& && \: ? ^ \| |\|\||} + # -> . # {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # == # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # != # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # === # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # !== # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # < # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # > # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # <= # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # >= # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # << # + {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >> # + {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >>> # + {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== & && + - \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + # + {!= !== & && + - \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # - # + {!= !== & && + - \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # * # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # / # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # % # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S17 + # => S18 # => S19 # => S20 + # => S21 # => S22 :LVALUE => S34 :PRIMARY-LVALUE => S37 + # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S242 + + S216: + # -> # |\|\|| . # {? |\|\||} + # -> # |\|\|| . # {\)} + # -> . # {&& \) ? |\|\||} + # -> . # && # {&& \) ? |\|\||} + # -> . # {&& \) \|} + # -> . # \| # {&& \) \|} + # -> . # {&& \) ^ \|} + # -> . # ^ # {&& \) ^ \|} + # -> . # {& && \) ^ \|} + # -> . # & # {& && \) ^ \|} + # -> . # {!= !== & && \) == === ^ \|} + # -> . # == # + {!= !== & && \) == === ^ \|} + # -> . # != # + {!= !== & && \) == === ^ \|} + # -> . # === # + {!= !== & && \) == === ^ \|} + # -> . # !== # + {!= !== & && \) == === ^ \|} + # -> . # {!= !== & && \) < <= == === > >= ^ \|} + # -> . # < # + {!= !== & && \) < <= == === > >= ^ \|} + # -> . # > # + {!= !== & && \) < <= == === > >= ^ \|} + # -> . # <= # + {!= !== & && \) < <= == === > >= ^ \|} + # -> . # >= # + {!= !== & && \) < <= == === > >= ^ \|} + # -> . # {!= !== & && \) < << <= == === > >= >> >>> ^ \|} + # -> . # << # + {!= !== & && \) < << <= == === > >= >> >>> ^ \|} + # -> . # >> # + {!= !== & && \) < << <= == === > >= >> >>> ^ \|} + # -> . # >>> # + {!= !== & && \) < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== & && \) + - < << <= == === > >= >> >>> ^ \|} + # -> . # + # + {!= !== & && \) + - < << <= == === > >= >> >>> ^ \|} + # -> . # - # + {!= !== & && \) + - < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # * # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # / # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # % # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . DELETE :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . VOID # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . TYPEOF :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . TYPEOF # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . ++ :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . -- :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . + # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . - # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . ~ # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . ! # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . :LVALUE ++ {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . :LVALUE -- {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . NEW # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . :PRIMARY-RVALUE {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . NEW # :ARGUMENTS + {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % & && \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . :LVALUE :ARGUMENTS {!= !== % & && \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # :ARGUMENTS + {!= !== % & && \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S9 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S217 + + S217: + # -> # |\|\|| # . {? |\|\||} + # -> # . && # {&& \) ? |\|\||} + # -> # |\|\|| # . {\)} + Transitions: && => shift S218 \) => reduce LOGICAL-OR-EXPRESSION-OR ? |\|\|| => reduce LOGICAL-OR-EXPRESSION-OR + + S218: + # -> # && . # + {$END && \) \, \: ? ] |\|\||} + # -> . # {$END && \) \, \: ? ] \| |\|\||} + # -> . # \| # + {$END && \) \, \: ? ] \| |\|\||} + # -> . # {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # ^ # + {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # & # + {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S6 + # => S9 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S219 + + S219: + # -> # && # . + {$END && \) \, \: ? ] |\|\||} + # -> # . \| # + {$END && \) \, \: ? ] \| |\|\||} + Transitions: $END && \) \, \: ? ] |\|\|| => reduce LOGICAL-AND-EXPRESSION-AND \| => shift S220 + + S220: + # -> # \| . # + {$END && \) \, \: ? ] \| |\|\||} + # -> . # {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # ^ # + {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # & # + {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S9 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S221 + + S221: + # -> # \| # . + {$END && \) \, \: ? ] \| |\|\||} + # -> # . ^ # + {$END && \) \, \: ? ] ^ \| |\|\||} + Transitions: $END && \) \, \: ? ] \| |\|\|| => reduce BITWISE-OR-EXPRESSION-OR ^ => shift S222 + + S222: + # -> # ^ . # + {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # & # + {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S9 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S223 + + S223: + # -> # ^ # . + {$END && \) \, \: ? ] ^ \| |\|\||} + # -> # . & # + {$END & && \) \, \: ? ] ^ \| |\|\||} + Transitions: $END && \) \, \: ? ] ^ \| |\|\|| => reduce BITWISE-XOR-EXPRESSION-XOR & => shift S224 + + S224: + # -> # & . # + {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S225 + + S225: + # -> # & # . + {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> # . !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + Transitions: != => shift S226 !== => shift S227 $END & && \) \, \: ? ] ^ \| |\|\|| => reduce BITWISE-AND-EXPRESSION-AND == => shift S228 + === => shift S229 + + S226: + # -> # != . # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S21 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S241 + + S227: + # -> # !== . # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S21 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S240 + + S228: + # -> # == . # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S21 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S239 + + S229: + # -> # === . # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S21 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S230 + + S230: + # -> # === # . + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: == === ? ] ^ \| |\|\|| => reduce EQUALITY-EXPRESSION-STRICT-EQUAL < => shift S231 <= => shift S232 + > => shift S233 >= => shift S234 + + S231: + # -> # < . # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S238 + + S232: + # -> # <= . # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S237 + + S233: + # -> # > . # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S236 + + S234: + # -> # >= . # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S235 + + S235: + # -> # >= # . + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\|| => reduce RELATIONAL-EXPRESSION-GREATER-OR-EQUAL << => shift S200 + >> => shift S201 >>> => shift S202 + + S236: + # -> # > # . + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\|| => reduce RELATIONAL-EXPRESSION-GREATER << => shift S200 + >> => shift S201 >>> => shift S202 + + S237: + # -> # <= # . + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\|| => reduce RELATIONAL-EXPRESSION-LESS-OR-EQUAL << => shift S200 + >> => shift S201 >>> => shift S202 + + S238: + # -> # < # . + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\|| => reduce RELATIONAL-EXPRESSION-LESS << => shift S200 + >> => shift S201 >>> => shift S202 + + S239: + # -> # == # . + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: == === ? ] ^ \| |\|\|| => reduce EQUALITY-EXPRESSION-EQUAL < => shift S231 <= => shift S232 + > => shift S233 >= => shift S234 + + S240: + # -> # !== # . + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: == === ? ] ^ \| |\|\|| => reduce EQUALITY-EXPRESSION-STRICT-NOT-EQUAL < => shift S231 + <= => shift S232 > => shift S233 >= => shift S234 + + S241: + # -> # != # . + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: == === ? ] ^ \| |\|\|| => reduce EQUALITY-EXPRESSION-NOT-EQUAL < => shift S231 <= => shift S232 + > => shift S233 >= => shift S234 + + S242: + # -> + # ? # . \: # + {\)} + Transitions: \: => shift S243 + + S243: + # -> + # ? # \: . # + {\)} + # -> . # {\)} + # -> . :LVALUE = # {\)} + # -> . # {\)} + # -> + . # ? # \: # + {\)} + # -> . # {\) ? |\|\||} + # -> . # |\|\|| # {\) ? |\|\||} + # -> . # {&& \) ? |\|\||} + # -> . # && # {&& \) ? |\|\||} + # -> . # {&& \) ? \| |\|\||} + # -> . # \| # {&& \) ? \| |\|\||} + # -> . # {&& \) ? ^ \| |\|\||} + # -> . # ^ # + {&& \) ? ^ \| |\|\||} + # -> . # {& && \) ? ^ \| |\|\||} + # -> . # & # + {& && \) ? ^ \| |\|\||} + # -> . # {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # == # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # != # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # === # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # !== # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # < # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # > # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # <= # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # >= # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # << # + {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >> # + {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >>> # + {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== & && \) + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + # + {!= !== & && \) + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # - # + {!= !== & && \) + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # * # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # / # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # % # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 # => S244 + + S244: + # -> + # ? # \: # . + {\)} + Transitions: \) => reduce CONDITIONAL-EXPRESSION-CONDITIONAL + + S245: + # -> # && . # {&& ? |\|\||} + # -> # && . # {\)} + # -> . # {&& \) ? \| |\|\||} + # -> . # \| # {&& \) ? \| |\|\||} + # -> . # {\) ^ \|} + # -> . # ^ # {\) ^ \|} + # -> . # {& \) ^ \|} + # -> . # & # {& \) ^ \|} + # -> . # {!= !== & \) == === ^ \|} + # -> . # == # {!= !== & \) == === ^ \|} + # -> . # != # {!= !== & \) == === ^ \|} + # -> . # === # + {!= !== & \) == === ^ \|} + # -> . # !== # + {!= !== & \) == === ^ \|} + # -> . # {!= !== & \) < <= == === > >= ^ \|} + # -> . # < # + {!= !== & \) < <= == === > >= ^ \|} + # -> . # > # + {!= !== & \) < <= == === > >= ^ \|} + # -> . # <= # + {!= !== & \) < <= == === > >= ^ \|} + # -> . # >= # + {!= !== & \) < <= == === > >= ^ \|} + # -> . # {!= !== & \) < << <= == === > >= >> >>> ^ \|} + # -> . # << # + {!= !== & \) < << <= == === > >= >> >>> ^ \|} + # -> . # >> # + {!= !== & \) < << <= == === > >= >> >>> ^ \|} + # -> . # >>> # + {!= !== & \) < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== & \) + - < << <= == === > >= >> >>> ^ \|} + # -> . # + # + {!= !== & \) + - < << <= == === > >= >> >>> ^ \|} + # -> . # - # + {!= !== & \) + - < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # * # + {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # / # + {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # % # + {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . DELETE :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . VOID # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . TYPEOF :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . TYPEOF # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . ++ :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . -- :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . + # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . - # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . ~ # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . ! # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . :LVALUE ++ {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . :LVALUE -- {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . NEW # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . :PRIMARY-RVALUE {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . NEW # :ARGUMENTS + {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . THIS {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . NULL {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . TRUE {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . FALSE {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . $STRING {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # [ :EXPRESSION ] + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # \. $IDENTIFIER + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . :LVALUE :ARGUMENTS {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # :ARGUMENTS + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # [ :EXPRESSION ] + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # \. $IDENTIFIER + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S6 + # => S9 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S246 + + S246: + # -> # && # . {&& ? |\|\||} + # -> # . \| # {&& \) ? \| |\|\||} + # -> # && # . {\)} + Transitions: && ? |\|\|| => reduce LOGICAL-AND-EXPRESSION-AND \) => reduce LOGICAL-AND-EXPRESSION-AND \| => shift S220 + + S247: + # -> # != . # {!= !== & == === ^} + # -> # != . # {\)} + # -> . # {!= !== & \) < <= == === > >=} + # -> . # < # + {!= !== & \) < <= == === > >=} + # -> . # > # + {!= !== & \) < <= == === > >=} + # -> . # <= # + {!= !== & \) < <= == === > >=} + # -> . # >= # + {!= !== & \) < <= == === > >=} + # -> . # {!= !== & < << <= == === > >= >> >>>} + # -> . # << # + {!= !== & < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== & < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== & < << <= == === > >= >> >>>} + # -> . # {!= !== & + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== & + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== & + - < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 + # => S17 # => S18 # => S19 + # => S21 # => S22 :PRIMARY-LVALUE => S37 :LVALUE => S46 + # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S254 + + S248: + # -> # !== . # {!= !== & == === ^} + # -> # !== . # {\)} + # -> . # {!= !== & \) < <= == === > >=} + # -> . # < # + {!= !== & \) < <= == === > >=} + # -> . # > # + {!= !== & \) < <= == === > >=} + # -> . # <= # + {!= !== & \) < <= == === > >=} + # -> . # >= # + {!= !== & \) < <= == === > >=} + # -> . # {!= !== & < << <= == === > >= >> >>>} + # -> . # << # + {!= !== & < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== & < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== & < << <= == === > >= >> >>>} + # -> . # {!= !== & + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== & + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== & + - < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 + # => S17 # => S18 # => S19 + # => S21 # => S22 :PRIMARY-LVALUE => S37 :LVALUE => S46 + # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S253 + + S249: + # -> # == . # {!= !== & == === ^} + # -> # == . # {\)} + # -> . # {!= !== & \) < <= == === > >=} + # -> . # < # + {!= !== & \) < <= == === > >=} + # -> . # > # + {!= !== & \) < <= == === > >=} + # -> . # <= # + {!= !== & \) < <= == === > >=} + # -> . # >= # + {!= !== & \) < <= == === > >=} + # -> . # {\) < << <= > >= >> >>>} + # -> . # << # {\) < << <= > >= >> >>>} + # -> . # >> # {\) < << <= > >= >> >>>} + # -> . # >>> # {\) < << <= > >= >> >>>} + # -> . # {\) + - < << <= > >= >> >>>} + # -> . # + # + {\) + - < << <= > >= >> >>>} + # -> . # - # + {\) + - < << <= > >= >> >>>} + # -> . # {% \) * + - / < << <= > >= >> >>>} + # -> . # * # + {% \) * + - / < << <= > >= >> >>>} + # -> . # / # + {% \) * + - / < << <= > >= >> >>>} + # -> . # % # + {% \) * + - / < << <= > >= >> >>>} + # -> . # {% \) * + - / < << <= > >= >> >>>} + # -> . DELETE :LVALUE {% \) * + - / < << <= > >= >> >>>} + # -> . VOID # {% \) * + - / < << <= > >= >> >>>} + # -> . TYPEOF :LVALUE {% \) * + - / < << <= > >= >> >>>} + # -> . TYPEOF # {% \) * + - / < << <= > >= >> >>>} + # -> . ++ :LVALUE {% \) * + - / < << <= > >= >> >>>} + # -> . -- :LVALUE {% \) * + - / < << <= > >= >> >>>} + # -> . + # {% \) * + - / < << <= > >= >> >>>} + # -> . - # {% \) * + - / < << <= > >= >> >>>} + # -> . ~ # {% \) * + - / < << <= > >= >> >>>} + # -> . ! # {% \) * + - / < << <= > >= >> >>>} + # -> . # {% \) * + - / < << <= > >= >> >>>} + # -> . # {% \) * + - / < << <= > >= >> >>>} + # -> . :LVALUE ++ {% \) * + - / < << <= > >= >> >>>} + # -> . :LVALUE -- {% \) * + - / < << <= > >= >> >>>} + # -> . # {% \) * + - / < << <= > >= >> >>>} + # -> . NEW # {% \) * + - / < << <= > >= >> >>>} + # -> . :PRIMARY-RVALUE {% \) * + - \. / < << <= > >= >> >>> [} + # -> . # {% \) * + - \. / < << <= > >= >> >>> [} + # -> . NEW # :ARGUMENTS {% \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {% \( \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {% \( \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {% \( \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {% \( \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {% \( \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {% \( \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {% \( \) * + - \. / < << <= > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( \) * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # [ :EXPRESSION ] {% \( \) * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # \. $IDENTIFIER {% \( \) * + ++ - -- \. / < << <= > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \) * + - \. / < << <= > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {% \( \) * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # :ARGUMENTS {% \( \) * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # [ :EXPRESSION ] {% \( \) * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # \. $IDENTIFIER {% \( \) * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # {% \) * + - \. / < << <= > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S21 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S252 + + S250: + # -> # === . # {!= !== & == === ^} + # -> # === . # {\)} + # -> . # {!= !== & \) < <= == === > >=} + # -> . # < # + {!= !== & \) < <= == === > >=} + # -> . # > # + {!= !== & \) < <= == === > >=} + # -> . # <= # + {!= !== & \) < <= == === > >=} + # -> . # >= # + {!= !== & \) < <= == === > >=} + # -> . # {!= !== & < << <= == === > >= >> >>>} + # -> . # << # + {!= !== & < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== & < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== & < << <= == === > >= >> >>>} + # -> . # {!= !== & + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== & + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== & + - < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 + # => S17 # => S18 # => S19 + # => S21 # => S22 :PRIMARY-LVALUE => S37 :LVALUE => S46 + # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S251 + + S251: + # -> # === # . {!= !== & == ===} + # -> # . >= # + {!= !== & \) < <= == === > >=} + # -> # . <= # + {!= !== & \) < <= == === > >=} + # -> # . > # + {!= !== & \) < <= == === > >=} + # -> # . < # + {!= !== & \) < <= == === > >=} + # -> # === # . {\)} + Transitions: != !== & == === => reduce EQUALITY-EXPRESSION-STRICT-EQUAL \) => reduce EQUALITY-EXPRESSION-STRICT-EQUAL < => shift S231 + <= => shift S232 > => shift S233 >= => shift S234 + + S252: + # -> # == # . {!= !== & == ===} + # -> # . >= # + {!= !== & \) < <= == === > >=} + # -> # . <= # + {!= !== & \) < <= == === > >=} + # -> # . > # + {!= !== & \) < <= == === > >=} + # -> # . < # + {!= !== & \) < <= == === > >=} + # -> # == # . {\)} + Transitions: != !== & == === => reduce EQUALITY-EXPRESSION-EQUAL \) => reduce EQUALITY-EXPRESSION-EQUAL < => shift S231 <= => shift S232 + > => shift S233 >= => shift S234 + + S253: + # -> # !== # . {!= !== & == ===} + # -> # . >= # + {!= !== & \) < <= == === > >=} + # -> # . <= # + {!= !== & \) < <= == === > >=} + # -> # . > # + {!= !== & \) < <= == === > >=} + # -> # . < # + {!= !== & \) < <= == === > >=} + # -> # !== # . {\)} + Transitions: != !== & == === => reduce EQUALITY-EXPRESSION-STRICT-NOT-EQUAL \) => reduce EQUALITY-EXPRESSION-STRICT-NOT-EQUAL + < => shift S231 <= => shift S232 > => shift S233 >= => shift S234 + + S254: + # -> # != # . {!= !== & == ===} + # -> # . >= # + {!= !== & \) < <= == === > >=} + # -> # . <= # + {!= !== & \) < <= == === > >=} + # -> # . > # + {!= !== & \) < <= == === > >=} + # -> # . < # + {!= !== & \) < <= == === > >=} + # -> # != # . {\)} + Transitions: != !== & == === => reduce EQUALITY-EXPRESSION-NOT-EQUAL \) => reduce EQUALITY-EXPRESSION-NOT-EQUAL < => shift S231 + <= => shift S232 > => shift S233 >= => shift S234 + + S255: + :PRIMARY-RVALUE -> \( # \) . + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-RVALUE-PARENTHESES + + S256: + # -> # ^ . # {&& ^ \|} + # -> # ^ . # {\)} + # -> . # {& \) ^ \|} + # -> . # & # {& \) ^ \|} + # -> . # {!= !== & \) == ===} + # -> . # == # {!= !== & \) == ===} + # -> . # != # {!= !== & \) == ===} + # -> . # === # {!= !== & \) == ===} + # -> . # !== # {!= !== & \) == ===} + # -> . # {!= !== & \) < <= == === > >=} + # -> . # < # + {!= !== & \) < <= == === > >=} + # -> . # > # + {!= !== & \) < <= == === > >=} + # -> . # <= # + {!= !== & \) < <= == === > >=} + # -> . # >= # + {!= !== & \) < <= == === > >=} + # -> . # {!= !== & \) < << <= == === > >= >> >>>} + # -> . # << # + {!= !== & \) < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== & \) < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== & \) < << <= == === > >= >> >>>} + # -> . # {!= !== & \) + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== & \) + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== & \) + - < << <= == === > >= >> >>>} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S9 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S257 + + S257: + # -> # ^ # . {^ \|} + # -> # . & # {& \) ^ \|} + # -> # ^ # . {\)} + Transitions: & => shift S224 \) => reduce BITWISE-XOR-EXPRESSION-XOR ^ \| => reduce BITWISE-XOR-EXPRESSION-XOR + + S258: + # -> # \| . # {&& ? \| |\|\||} + # -> # \| . # {\)} + # -> . # {&& \) ^ \|} + # -> . # ^ # {&& \) ^ \|} + # -> . # {& \) ^} + # -> . # & # {& \) ^} + # -> . # {!= !== & \) == === ^} + # -> . # == # {!= !== & \) == === ^} + # -> . # != # {!= !== & \) == === ^} + # -> . # === # {!= !== & \) == === ^} + # -> . # !== # {!= !== & \) == === ^} + # -> . # {!= !== & \) < <= == === > >= ^} + # -> . # < # + {!= !== & \) < <= == === > >= ^} + # -> . # > # + {!= !== & \) < <= == === > >= ^} + # -> . # <= # + {!= !== & \) < <= == === > >= ^} + # -> . # >= # + {!= !== & \) < <= == === > >= ^} + # -> . # {!= !== & \) < << <= == === > >= >> >>> ^} + # -> . # << # + {!= !== & \) < << <= == === > >= >> >>> ^} + # -> . # >> # + {!= !== & \) < << <= == === > >= >> >>> ^} + # -> . # >>> # + {!= !== & \) < << <= == === > >= >> >>> ^} + # -> . # {!= !== & \) + - < << <= == === > >= >> >>> ^} + # -> . # + # + {!= !== & \) + - < << <= == === > >= >> >>> ^} + # -> . # - # + {!= !== & \) + - < << <= == === > >= >> >>> ^} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . # * # + {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . # / # + {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . # % # + {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . DELETE :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . VOID # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . TYPEOF :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . TYPEOF # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . ++ :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . -- :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . + # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . - # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . ~ # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . ! # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . :LVALUE ++ {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . :LVALUE -- {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . NEW # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . :PRIMARY-RVALUE {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^} + # -> . # {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^} + # -> . NEW # :ARGUMENTS + {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-RVALUE -> . THIS {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-RVALUE -> . NULL {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-RVALUE -> . TRUE {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-RVALUE -> . FALSE {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-RVALUE -> . $STRING {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^} + # -> . # [ :EXPRESSION ] + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^} + # -> . # \. $IDENTIFIER + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^} + # -> . :LVALUE :ARGUMENTS {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^} + # -> . # :ARGUMENTS + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^} + # -> . # [ :EXPRESSION ] + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^} + # -> . # \. $IDENTIFIER + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^} + # -> . # {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S9 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S259 + + S259: + # -> # \| # . {&& \|} + # -> # . ^ # {&& \) ^ \|} + # -> # \| # . {\)} + Transitions: && \| => reduce BITWISE-OR-EXPRESSION-OR \) => reduce BITWISE-OR-EXPRESSION-OR ^ => shift S222 + + S260: + # -> # & . # {& ^ \|} + # -> # & . # {\)} + # -> . # {!= !== & \) == === ^} + # -> . # == # {!= !== & \) == === ^} + # -> . # != # {!= !== & \) == === ^} + # -> . # === # {!= !== & \) == === ^} + # -> . # !== # {!= !== & \) == === ^} + # -> . # {!= !== \) < <= == === > >=} + # -> . # < # + {!= !== \) < <= == === > >=} + # -> . # > # + {!= !== \) < <= == === > >=} + # -> . # <= # + {!= !== \) < <= == === > >=} + # -> . # >= # + {!= !== \) < <= == === > >=} + # -> . # {!= !== \) < << <= == === > >= >> >>>} + # -> . # << # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # {!= !== \) + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== \) + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== \) + - < << <= == === > >= >> >>>} + # -> . # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % \) * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % \) * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % \( \) * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % \) * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS + {!= !== % \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % \) * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S261 + + S261: + # -> # & # . {& ^} + # -> # . !== # {!= !== & \) == === ^} + # -> # . === # {!= !== & \) == === ^} + # -> # . != # {!= !== & \) == === ^} + # -> # . == # {!= !== & \) == === ^} + # -> # & # . {\)} + Transitions: != => shift S226 !== => shift S227 & ^ => reduce BITWISE-AND-EXPRESSION-AND \) => reduce BITWISE-AND-EXPRESSION-AND + == => shift S228 === => shift S229 + + S262: + # -> # + . # + {+ - < << <= > >= >> >>>} + # -> # + . # {\)} + # -> . # {% \) * + - / << >> >>>} + # -> . # * # + {% \) * + - / << >> >>>} + # -> . # / # + {% \) * + - / << >> >>>} + # -> . # % # + {% \) * + - / << >> >>>} + # -> . # {% \) * /} + # -> . DELETE :LVALUE {% \) * /} + # -> . VOID # {% \) * /} + # -> . TYPEOF :LVALUE {% \) * /} + # -> . TYPEOF # {% \) * /} + # -> . ++ :LVALUE {% \) * /} + # -> . -- :LVALUE {% \) * /} + # -> . + # {% \) * /} + # -> . - # {% \) * /} + # -> . ~ # {% \) * /} + # -> . ! # {% \) * /} + # -> . # {% \) * /} + # -> . # {% \) * /} + # -> . :LVALUE ++ {% \) * /} + # -> . :LVALUE -- {% \) * /} + # -> . # {% \) * /} + # -> . NEW # {% \) * /} + # -> . :PRIMARY-RVALUE {% \) * \. / [} + # -> . # {% \) * \. / [} + # -> . NEW # :ARGUMENTS {% \) * \. / [} + :PRIMARY-RVALUE -> . THIS {% \( \) * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( \) * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( \) * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( \) * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( \) * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( \) * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( \) * \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( \) * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( \) * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( \) * ++ -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \) * \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \) * \. / [} + # -> . :LVALUE :ARGUMENTS {% \( \) * ++ -- \. / [} + # -> . # :ARGUMENTS {% \( \) * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( \) * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( \) * ++ -- \. / [} + # -> . # {% \) * \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S265 + + S263: + # -> # - . # + {+ - < << <= > >= >> >>>} + # -> # - . # {\)} + # -> . # {% \) * + - / << >> >>>} + # -> . # * # + {% \) * + - / << >> >>>} + # -> . # / # + {% \) * + - / << >> >>>} + # -> . # % # + {% \) * + - / << >> >>>} + # -> . # {% * + - / << >> >>>} + # -> . DELETE :LVALUE {% * + - / << >> >>>} + # -> . VOID # {% * + - / << >> >>>} + # -> . TYPEOF :LVALUE {% * + - / << >> >>>} + # -> . TYPEOF # {% * + - / << >> >>>} + # -> . ++ :LVALUE {% * + - / << >> >>>} + # -> . -- :LVALUE {% * + - / << >> >>>} + # -> . + # {% * + - / << >> >>>} + # -> . - # {% * + - / << >> >>>} + # -> . ~ # {% * + - / << >> >>>} + # -> . ! # {% * + - / << >> >>>} + # -> . # {% * + - / << >> >>>} + # -> . # {% * + - / << >> >>>} + # -> . :LVALUE ++ {% * + - / << >> >>>} + # -> . :LVALUE -- {% * + - / << >> >>>} + # -> . # {% * + - / << >> >>>} + # -> . NEW # {% * + - / << >> >>>} + # -> . :PRIMARY-RVALUE {% * + - \. / << >> >>> [} + # -> . # {% * + - \. / << >> >>> [} + # -> . NEW # :ARGUMENTS {% * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . THIS {% \( * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . NULL {% \( * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . TRUE {% \( * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . FALSE {% \( * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . $STRING {% \( * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {% \( * + - \. / << >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * + ++ - -- \. / << >> >>> [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / << >> >>> [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / << >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * + - \. / << >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * + - \. / << >> >>> [} + # -> . :LVALUE :ARGUMENTS {% \( * + ++ - -- \. / << >> >>> [} + # -> . # :ARGUMENTS {% \( * + ++ - -- \. / << >> >>> [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / << >> >>> [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / << >> >>> [} + # -> . # {% * + - \. / << >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S18 # => S19 + # => S22 :PRIMARY-LVALUE => S37 :LVALUE => S46 # => S142 + # => S143 :PRIMARY-RVALUE => S158 # => S264 + + S264: + # -> # - # . {+ - << >> >>>} + # -> # . % # + {% \) * + - / << >> >>>} + # -> # . / # + {% \) * + - / << >> >>>} + # -> # . * # + {% \) * + - / << >> >>>} + # -> # - # . {\)} + Transitions: % => shift S186 \) => reduce ADDITIVE-EXPRESSION-SUBTRACT * => shift S187 + + - << >> >>> => reduce ADDITIVE-EXPRESSION-SUBTRACT / => shift S188 + + S265: + # -> # + # . {+ - << >> >>>} + # -> # . % # + {% \) * + - / << >> >>>} + # -> # . / # + {% \) * + - / << >> >>>} + # -> # . * # + {% \) * + - / << >> >>>} + # -> # + # . {\)} + Transitions: % => shift S186 \) => reduce ADDITIVE-EXPRESSION-ADD * => shift S187 + - << >> >>> => reduce ADDITIVE-EXPRESSION-ADD + / => shift S188 + + S266: + # -> ! # . {% * /} + # -> ! # . {\)} + Transitions: % * / => reduce UNARY-EXPRESSION-LOGICAL-NOT \) => reduce UNARY-EXPRESSION-LOGICAL-NOT + + S267: + # -> + # ? . # \: # + {$END \) \, \: ]} + # -> . # {\:} + # -> + . # ? # \: # + {\:} + # -> . # {\:} + # -> . :LVALUE = # {\:} + # -> . # {\: ? |\|\||} + # -> . # |\|\|| # {\: ? |\|\||} + # -> . # {&& \: ? |\|\||} + # -> . # && # {&& \: ? |\|\||} + # -> . # {&& \: ? \| |\|\||} + # -> . # \| # {&& \: ? \| |\|\||} + # -> . # {&& \: ? ^ \| |\|\||} + # -> . # ^ # + {&& \: ? ^ \| |\|\||} + # -> . # {& && \: ? ^ \| |\|\||} + # -> . # & # + {& && \: ? ^ \| |\|\||} + # -> . # {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # == # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # != # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # === # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # !== # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # < # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # > # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # <= # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # >= # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # << # + {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >> # + {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >>> # + {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== & && + - \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + # + {!= !== & && + - \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # - # + {!= !== & && + - \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # * # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # / # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # % # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S17 + # => S18 # => S19 # => S20 + # => S21 # => S22 :LVALUE => S34 :PRIMARY-LVALUE => S37 + # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S270 + + S268: + # -> # |\|\|| . # + {$END \) \, \: ? ] |\|\||} + # -> . # {$END && \) \, \: ? ] |\|\||} + # -> . # && # + {$END && \) \, \: ? ] |\|\||} + # -> . # {$END && \) \, \: ? ] \| |\|\||} + # -> . # \| # + {$END && \) \, \: ? ] \| |\|\||} + # -> . # {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # ^ # + {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # & # + {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S9 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S269 + + S269: + # -> # |\|\|| # . + {$END \) \, \: ? ] |\|\||} + # -> # . && # + {$END && \) \, \: ? ] |\|\||} + Transitions: $END \) \, \: ? ] |\|\|| => reduce LOGICAL-OR-EXPRESSION-OR && => shift S218 + + S270: + # -> + # ? # . \: # + {$END \) \, \: ]} + Transitions: \: => shift S271 + + S271: + # -> + # ? # \: . # + {$END \) \, \: ]} + # -> . # {$END \) \, \: ]} + # -> + . # ? # \: # + {$END \) \, \: ]} + # -> . # {$END \) \, \: ]} + # -> . :LVALUE = # {$END \) \, \: ]} + # -> . # {$END \) \, \: ? ] |\|\||} + # -> . # |\|\|| # + {$END \) \, \: ? ] |\|\||} + # -> . # {$END && \) \, \: ? ] |\|\||} + # -> . # && # + {$END && \) \, \: ? ] |\|\||} + # -> . # {$END && \) \, \: ? ] \| |\|\||} + # -> . # \| # + {$END && \) \, \: ? ] \| |\|\||} + # -> . # {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # ^ # + {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # & # + {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 # => S272 + + S272: + # -> + # ? # \: # . + {$END \) \, \: ]} + Transitions: $END \) \, \: ] => reduce CONDITIONAL-EXPRESSION-CONDITIONAL + + S273: + # -> ! # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-LOGICAL-NOT + diff --git a/mozilla/js/semantics/ECMA Lexer Charclasses.rtf b/mozilla/js/semantics/ECMA Lexer Charclasses.rtf new file mode 100644 index 00000000000..31365c6c27c --- /dev/null +++ b/mozilla/js/semantics/ECMA Lexer Charclasses.rtf @@ -0,0 +1,572 @@ +{\rtf1\mac\ansicpg10000\uc1\deff0\deflang2057\deflangfe2057 +{\fonttbl{\f0\froman\fcharset256\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\f3\ftech\fcharset2\fprq2 Symbol;}{\f4\fnil\fcharset256\fprq2 Helvetica;} +{\f5\fmodern\fcharset256\fprq2 Courier New;}{\f6\fnil\fcharset256\fprq2 Palatino;} +{\f7\fscript\fcharset256\fprq2 Zapf Chancery;}{\f8\ftech\fcharset2\fprq2 Zapf Dingbats;}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; +\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0 +\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0 +\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;} +{\stylesheet{\widctlpar\fs20\lang2057\snext0 Normal;} +{\s1\qj\sa120\widctlpar\fs20\lang2057\sbasedon0\snext1 Body Text;} +{\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057\sbasedon3\snext1 heading 3;} +{\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057\sbasedon0\snext1 heading 4;} +{\s10\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext10 Grammar;} +{\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057\sbasedon0\snext12 Grammar Header;} +{\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext14 Grammar LHS;} +{\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar LHS Last;} +{\s14\fi-1260\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon10\snext14 Grammar +RHS;} +{\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon14\snext12 Grammar +RHS Last;} +{\s16\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar Argument;} +{\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext20 Semantics;} +{\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon20\snext21 Semantics Next;} +{\*\cs30\additive Default Paragraph Font;} +{\*\cs31\b\f5\cf2\lang1024\additive\sbasedon30 Character Literal;} +{\*\cs32\b0\f0\cf9\additive\sbasedon30 Character Literal Control;} +{\*\cs33\b\f6\cf10\lang1024\additive\sbasedon30 Terminal;} +{\*\cs34\b\f5\cf2\lang1024\additive\sbasedon33 Terminal Keyword;} +{\*\cs35\i\f6\cf13\lang1024\additive\sbasedon30 Nonterminal;} +{\*\cs36\i0\additive\sbasedon30 Nonterminal Attribute;} +{\*\cs37\additive\sbasedon30 Nonterminal Argument;} +{\*\cs40\b\f0\additive\sbasedon30 Semantic Keyword;} +{\*\cs41\f0\cf6\lang1024\additive\sbasedon30 Type Expression;} +{\*\cs42\scaps\f0\cf6\lang1024\additive\sbasedon41 Type Name;} +{\*\cs43\f4\cf6\lang1024\additive\sbasedon41 Field Name;} +{\*\cs44\i\f0\cf11\lang1024\additive\sbasedon30 Global Variable;} +{\*\cs45\i\f0\cf4\lang1024\additive\sbasedon30 Local Variable;} +{\*\cs46\f7\cf12\lang1024\additive\sbasedon30 Action Name;}} +\widowctrl\ftnbj\aenddoc\fet0\formshade\viewkind4\viewscale125\pgbrdrhead\pgbrdrfoot\sectd\pard +\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Character Classes\par\pard\plain\s13 +\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 WhiteSpaceCharacter} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7TAB\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7VT\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7FF\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7SP\u187\'C8}\par +{\cs35\i\f6\cf13\lang1024 LineTerminator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7LF\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7CR\u187\'C8}\par +{\cs35\i\f6\cf13\lang1024 NonTerminator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AnyCharacter} {\b except} {\cs35\i\f6\cf13\lang1024 LineTerminator}\par +{\cs35\i\f6\cf13\lang1024 NonTerminatorOrSlash} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonTerminator} {\b except} {\cs31\b\f5\cf2\lang1024/}\par +{\cs35\i\f6\cf13\lang1024 NonTerminatorOrAsteriskOrSlash} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonTerminator} {\b except} {\cs31\b\f5\cf2\lang1024*} | +{\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 IdentifierLetter} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 A} | +{\cs31\b\f5\cf2\lang1024 B} | {\cs31\b\f5\cf2\lang1024 C} | {\cs31\b\f5\cf2\lang1024 D} | +{\cs31\b\f5\cf2\lang1024 E} | {\cs31\b\f5\cf2\lang1024 F} | {\cs31\b\f5\cf2\lang1024 G} | +{\cs31\b\f5\cf2\lang1024 H} | {\cs31\b\f5\cf2\lang1024 I} | {\cs31\b\f5\cf2\lang1024 J} | +{\cs31\b\f5\cf2\lang1024 K} | {\cs31\b\f5\cf2\lang1024 L} | {\cs31\b\f5\cf2\lang1024 M} | +{\cs31\b\f5\cf2\lang1024 N} | {\cs31\b\f5\cf2\lang1024 O} | {\cs31\b\f5\cf2\lang1024 P} | +{\cs31\b\f5\cf2\lang1024 Q} | {\cs31\b\f5\cf2\lang1024 R} | {\cs31\b\f5\cf2\lang1024 S} | +{\cs31\b\f5\cf2\lang1024 T} | {\cs31\b\f5\cf2\lang1024 U} | {\cs31\b\f5\cf2\lang1024 V} | +{\cs31\b\f5\cf2\lang1024 W} | {\cs31\b\f5\cf2\lang1024 X} | {\cs31\b\f5\cf2\lang1024 Y} | +{\cs31\b\f5\cf2\lang1024 Z}\par|\tab{\cs31\b\f5\cf2\lang1024 a} | {\cs31\b\f5\cf2\lang1024 b} | +{\cs31\b\f5\cf2\lang1024 c} | {\cs31\b\f5\cf2\lang1024 d} | {\cs31\b\f5\cf2\lang1024 e} | +{\cs31\b\f5\cf2\lang1024 f} | {\cs31\b\f5\cf2\lang1024 g} | {\cs31\b\f5\cf2\lang1024 h} | +{\cs31\b\f5\cf2\lang1024 i} | {\cs31\b\f5\cf2\lang1024 j} | {\cs31\b\f5\cf2\lang1024 k} | +{\cs31\b\f5\cf2\lang1024 l} | {\cs31\b\f5\cf2\lang1024 m} | {\cs31\b\f5\cf2\lang1024 n} | +{\cs31\b\f5\cf2\lang1024 o} | {\cs31\b\f5\cf2\lang1024 p} | {\cs31\b\f5\cf2\lang1024 q} | +{\cs31\b\f5\cf2\lang1024 r} | {\cs31\b\f5\cf2\lang1024 s} | {\cs31\b\f5\cf2\lang1024 t} | +{\cs31\b\f5\cf2\lang1024 u} | {\cs31\b\f5\cf2\lang1024 v} | {\cs31\b\f5\cf2\lang1024 w} | +{\cs31\b\f5\cf2\lang1024 x} | {\cs31\b\f5\cf2\lang1024 y} | {\cs31\b\f5\cf2\lang1024 z}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs31\b\f5\cf2\lang1024$} | {\cs31\b\f5\cf2\lang1024_}\par\pard\plain\s13\fi-1440\li1800\sb120 +\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 DecimalDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | +{\cs31\b\f5\cf2\lang1024 4} | {\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | +{\cs31\b\f5\cf2\lang1024 7} | {\cs31\b\f5\cf2\lang1024 8} | {\cs31\b\f5\cf2\lang1024 9}\par +{\cs35\i\f6\cf13\lang1024 NonZeroDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 1} | +{\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | {\cs31\b\f5\cf2\lang1024 4} | +{\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | {\cs31\b\f5\cf2\lang1024 7} | +{\cs31\b\f5\cf2\lang1024 8} | {\cs31\b\f5\cf2\lang1024 9}\par{\cs35\i\f6\cf13\lang1024 OctalDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | +{\cs31\b\f5\cf2\lang1024 4} | {\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | +{\cs31\b\f5\cf2\lang1024 7}\par{\cs35\i\f6\cf13\lang1024 ZeroToThree} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3}\par +{\cs35\i\f6\cf13\lang1024 FourToSeven} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 4} | +{\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | {\cs31\b\f5\cf2\lang1024 7}\par +{\cs35\i\f6\cf13\lang1024 HexDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | +{\cs31\b\f5\cf2\lang1024 4} | {\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | +{\cs31\b\f5\cf2\lang1024 7} | {\cs31\b\f5\cf2\lang1024 8} | {\cs31\b\f5\cf2\lang1024 9} | +{\cs31\b\f5\cf2\lang1024 A} | {\cs31\b\f5\cf2\lang1024 B} | {\cs31\b\f5\cf2\lang1024 C} | +{\cs31\b\f5\cf2\lang1024 D} | {\cs31\b\f5\cf2\lang1024 E} | {\cs31\b\f5\cf2\lang1024 F} | +{\cs31\b\f5\cf2\lang1024 a} | {\cs31\b\f5\cf2\lang1024 b} | {\cs31\b\f5\cf2\lang1024 c} | +{\cs31\b\f5\cf2\lang1024 d} | {\cs31\b\f5\cf2\lang1024 e} | {\cs31\b\f5\cf2\lang1024 f}\par +{\cs35\i\f6\cf13\lang1024 ExponentIndicator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 E} | +{\cs31\b\f5\cf2\lang1024 e}\par{\cs35\i\f6\cf13\lang1024 HexIndicator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 X} | +{\cs31\b\f5\cf2\lang1024 x}\par{\cs35\i\f6\cf13\lang1024 PlainStringChar} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AnyCharacter} {\b except} {\cs31\b\f5\cf2\lang1024'} | +{\cs31\b\f5\cf2\lang1024"} | {\cs31\b\f5\cf2\lang1024\\} | {\cs35\i\f6\cf13\lang1024 OctalDigit} | +{\cs35\i\f6\cf13\lang1024 LineTerminator}\par{\cs35\i\f6\cf13\lang1024 StringNonEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonTerminator} {\b except} {\cs35\i\f6\cf13\lang1024 OctalDigit} | +{\cs31\b\f5\cf2\lang1024 x} | {\cs31\b\f5\cf2\lang1024 u} | {\cs31\b\f5\cf2\lang1024'} | +{\cs31\b\f5\cf2\lang1024"} | {\cs31\b\f5\cf2\lang1024\\} | {\cs31\b\f5\cf2\lang1024 b} | +{\cs31\b\f5\cf2\lang1024 f} | {\cs31\b\f5\cf2\lang1024 n} | {\cs31\b\f5\cf2\lang1024 r} | +{\cs31\b\f5\cf2\lang1024 t} | {\cs31\b\f5\cf2\lang1024 v}\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Grammar\par\pard\plain\s1\qj\sa120\widctlpar\fs20\lang2057 Sta +rt nonterminal: {\cs35\i\f6\cf13\lang1024 NextToken}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120 +\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NextToken} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 WhiteSpace} {\cs35\i\f6\cf13\lang1024 Token}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 LineBreaks} +\par|\tab{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord}\par|\tab +{\cs35\i\f6\cf13\lang1024 Punctuator}\par|\tab{\cs35\i\f6\cf13\lang1024 NumericLiteral}\par|\tab +{\cs35\i\f6\cf13\lang1024 StringLiteral}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 EndOfInput}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 EndOfInput} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024 End}\par +\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LineComment} {\cs33\b\f6\cf10\lang1024 End}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 StringLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024'} +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} {\cs31\b\f5\cf2\lang1024'}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs31\b\f5\cf2\lang1024"} {\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} +{\cs31\b\f5\cf2\lang1024"}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs36\i0 double}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} {\cs31\b\f5\cf2\lang1024\\} +{\cs35\i\f6\cf13\lang1024 ShortOctalEscape}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs36\i0 double} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} +{\cs35\i\f6\cf13\lang1024 PlainStringChar}\par|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 double}\par|\tab +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs36\i0 double} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} +{\cs31\b\f5\cf2\lang1024\\} {\cs35\i\f6\cf13\lang1024 OrdinaryEscape}\par\pard\plain\s13\fi-1440 +\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 double} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024'}\par +\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs36\i0 single}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} {\cs31\b\f5\cf2\lang1024\\} +{\cs35\i\f6\cf13\lang1024 ShortOctalEscape}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ShortOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 OctalDigit} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ZeroToThree} {\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs36\i0 single} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} +{\cs35\i\f6\cf13\lang1024 PlainStringChar}\par|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 single}\par|\tab +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs36\i0 single} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} +{\cs31\b\f5\cf2\lang1024\\} {\cs35\i\f6\cf13\lang1024 OrdinaryEscape}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 StringCharEscape}\par|\tab{\cs35\i\f6\cf13\lang1024 FullOctalEscape}\par| +\tab{\cs35\i\f6\cf13\lang1024 HexEscape}\par|\tab{\cs35\i\f6\cf13\lang1024 UnicodeEscape}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 StringNonEscape}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 StringNonEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Other_}\par +|\tab{\cs31\b\f5\cf2\lang1024~}\par|\tab{\cs31\b\f5\cf2\lang1024\}}\par|\tab +{\cs31\b\f5\cf2\lang1024|}\par|\tab{\cs31\b\f5\cf2\lang1024\{}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars8_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars7_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars6_}\par|\tab{\cs31\b\f5\cf2\lang1024^}\par|\tab +{\cs31\b\f5\cf2\lang1024]}\par|\tab{\cs31\b\f5\cf2\lang1024[}\par|\tab{\cs31\b\f5\cf2\lang1024 X} +\par|\tab{\cs31\b\f5\cf2\lang1024?}\par|\tab{\cs31\b\f5\cf2\lang1024>}\par|\tab +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024<}\par|\tab{\cs31\b\f5\cf2\lang1024;}\par +|\tab{\cs31\b\f5\cf2\lang1024:}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars5_}\par|\tab +{\cs31\b\f5\cf2\lang1024/}\par|\tab{\cs31\b\f5\cf2\lang1024.}\par|\tab{\cs31\b\f5\cf2\lang1024 -} +\par|\tab{\cs31\b\f5\cf2\lang1024,}\par|\tab{\cs31\b\f5\cf2\lang1024 +}\par|\tab +{\cs31\b\f5\cf2\lang1024*}\par|\tab{\cs31\b\f5\cf2\lang1024)}\par|\tab{\cs31\b\f5\cf2\lang1024(}\par +|\tab{\cs31\b\f5\cf2\lang1024&}\par|\tab{\cs31\b\f5\cf2\lang1024%}\par|\tab +{\cs31\b\f5\cf2\lang1024!}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0 +\fs20\lang1024|\tab{\cs33\b\f6\cf10\lang1024_Chars2_}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120 +\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 UnicodeEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 u} +{\cs35\i\f6\cf13\lang1024 HexDigit} {\cs35\i\f6\cf13\lang1024 HexDigit} +{\cs35\i\f6\cf13\lang1024 HexDigit} {\cs35\i\f6\cf13\lang1024 HexDigit}\par +{\cs35\i\f6\cf13\lang1024 HexEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 x} +{\cs35\i\f6\cf13\lang1024 HexDigit} {\cs35\i\f6\cf13\lang1024 HexDigit}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 FullOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 FourToSeven} {\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ZeroToThree} {\cs35\i\f6\cf13\lang1024 OctalDigit} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ZeroToThree} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Chars3_} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs31\b\f5\cf2\lang1024 0}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 FourToSeven} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024_Chars4_}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024'}\par|\tab +{\cs31\b\f5\cf2\lang1024"}\par|\tab{\cs31\b\f5\cf2\lang1024\\}\par|\tab{\cs31\b\f5\cf2\lang1024 b} +\par|\tab{\cs31\b\f5\cf2\lang1024 f}\par|\tab{\cs31\b\f5\cf2\lang1024 n}\par|\tab +{\cs31\b\f5\cf2\lang1024 r}\par|\tab{\cs31\b\f5\cf2\lang1024 t}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024 v}\par\pard\plain +\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 single} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024"}\par +\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PlainStringChar} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Other_}\par +|\tab{\cs31\b\f5\cf2\lang1024~}\par|\tab{\cs31\b\f5\cf2\lang1024\}}\par|\tab +{\cs31\b\f5\cf2\lang1024|}\par|\tab{\cs31\b\f5\cf2\lang1024\{}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars8_}\par|\tab{\cs31\b\f5\cf2\lang1024 x}\par|\tab +{\cs31\b\f5\cf2\lang1024 v}\par|\tab{\cs31\b\f5\cf2\lang1024 u}\par|\tab{\cs31\b\f5\cf2\lang1024 t} +\par|\tab{\cs31\b\f5\cf2\lang1024 r}\par|\tab{\cs31\b\f5\cf2\lang1024 n}\par|\tab +{\cs31\b\f5\cf2\lang1024 f}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars7_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars6_}\par|\tab{\cs31\b\f5\cf2\lang1024 b}\par|\tab +{\cs31\b\f5\cf2\lang1024^}\par|\tab{\cs31\b\f5\cf2\lang1024]}\par|\tab{\cs31\b\f5\cf2\lang1024[}\par +|\tab{\cs31\b\f5\cf2\lang1024 X}\par|\tab{\cs31\b\f5\cf2\lang1024?}\par|\tab +{\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024<}\par +|\tab{\cs31\b\f5\cf2\lang1024;}\par|\tab{\cs31\b\f5\cf2\lang1024:}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars5_}\par|\tab{\cs31\b\f5\cf2\lang1024/}\par|\tab +{\cs31\b\f5\cf2\lang1024.}\par|\tab{\cs31\b\f5\cf2\lang1024 -}\par|\tab{\cs31\b\f5\cf2\lang1024,} +\par|\tab{\cs31\b\f5\cf2\lang1024 +}\par|\tab{\cs31\b\f5\cf2\lang1024*}\par|\tab +{\cs31\b\f5\cf2\lang1024)}\par|\tab{\cs31\b\f5\cf2\lang1024(}\par|\tab{\cs31\b\f5\cf2\lang1024&}\par +|\tab{\cs31\b\f5\cf2\lang1024%}\par|\tab{\cs31\b\f5\cf2\lang1024!}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs33\b\f6\cf10\lang1024_Chars2_}\par\pard +\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NumericLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalLiteral}\par|\tab{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral}\par +\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 0} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 OctalDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Chars4_} +\par|\tab{\cs33\b\f6\cf10\lang1024_Chars3_}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024 0}\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 0} +{\cs35\i\f6\cf13\lang1024 HexIndicator} {\cs35\i\f6\cf13\lang1024 HexDigit}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral} {\cs35\i\f6\cf13\lang1024 HexDigit}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 HexDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 f}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars7_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars6_}\par|\tab +{\cs31\b\f5\cf2\lang1024 b}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars5_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars4_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars3_}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024 0} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 HexIndicator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 x}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs31\b\f5\cf2\lang1024 X}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 DecimalLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Mantissa} {\cs35\i\f6\cf13\lang1024 Exponent}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Exponent} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ExponentIndicator} {\cs35\i\f6\cf13\lang1024 SignedInteger}\par\pard\plain +\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 SignedInteger} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par|\tab{\cs31\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024 -} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ExponentIndicator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024_Chars7_}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 Mantissa} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral}\par|\tab +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} {\cs31\b\f5\cf2\lang1024.}\par|\tab +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} {\cs31\b\f5\cf2\lang1024.} +{\cs35\i\f6\cf13\lang1024 Fraction}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024.} {\cs35\i\f6\cf13\lang1024 Fraction}\par\pard +\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Fraction} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 0}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 NonZeroDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NonZeroDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Chars5_} +\par|\tab{\cs33\b\f6\cf10\lang1024_Chars4_}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs33\b\f6\cf10\lang1024_Chars3_}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024<}\par|\tab{\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024=} {\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024!} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024!} {\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024,}\par|\tab{\cs31\b\f5\cf2\lang1024!}\par +|\tab{\cs31\b\f5\cf2\lang1024~}\par|\tab{\cs31\b\f5\cf2\lang1024?}\par|\tab +{\cs31\b\f5\cf2\lang1024:}\par|\tab{\cs31\b\f5\cf2\lang1024.}\par|\tab{\cs31\b\f5\cf2\lang1024&} +{\cs31\b\f5\cf2\lang1024&}\par|\tab{\cs31\b\f5\cf2\lang1024|} {\cs31\b\f5\cf2\lang1024|}\par|\tab +{\cs31\b\f5\cf2\lang1024 +} {\cs31\b\f5\cf2\lang1024 +}\par|\tab{\cs31\b\f5\cf2\lang1024 -} +{\cs31\b\f5\cf2\lang1024 -}\par|\tab{\cs31\b\f5\cf2\lang1024 +}\par|\tab{\cs31\b\f5\cf2\lang1024 -} +\par|\tab{\cs31\b\f5\cf2\lang1024*}\par|\tab{\cs31\b\f5\cf2\lang1024/}\par|\tab +{\cs31\b\f5\cf2\lang1024&}\par|\tab{\cs31\b\f5\cf2\lang1024|}\par|\tab{\cs31\b\f5\cf2\lang1024^}\par +|\tab{\cs31\b\f5\cf2\lang1024%}\par|\tab{\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024<}\par| +\tab{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024 +} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024 -} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024*} {\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024&} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024|} {\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024^} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024%} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024(}\par|\tab{\cs31\b\f5\cf2\lang1024)}\par +|\tab{\cs31\b\f5\cf2\lang1024\{}\par|\tab{\cs31\b\f5\cf2\lang1024\}}\par|\tab +{\cs31\b\f5\cf2\lang1024[}\par|\tab{\cs31\b\f5\cf2\lang1024]}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024;}\par\pard\plain +\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 IdentifierName}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 IdentifierLetter}\par|\tab{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\cs35\i\f6\cf13\lang1024 IdentifierLetter}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 DecimalDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Chars5_} +\par|\tab{\cs33\b\f6\cf10\lang1024_Chars4_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars3_}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs31\b\f5\cf2\lang1024 0}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 IdentifierLetter} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Chars8_} +\par|\tab{\cs31\b\f5\cf2\lang1024 x}\par|\tab{\cs31\b\f5\cf2\lang1024 v}\par|\tab +{\cs31\b\f5\cf2\lang1024 u}\par|\tab{\cs31\b\f5\cf2\lang1024 t}\par|\tab{\cs31\b\f5\cf2\lang1024 r} +\par|\tab{\cs31\b\f5\cf2\lang1024 n}\par|\tab{\cs31\b\f5\cf2\lang1024 f}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars7_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars6_}\par|\tab +{\cs31\b\f5\cf2\lang1024 b}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0 +\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024 X}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 LineBreaks} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 LineBreak} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LineBreaks} {\cs35\i\f6\cf13\lang1024 WhiteSpace} +{\cs35\i\f6\cf13\lang1024 LineBreak}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 LineBreak} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LineTerminator}\par|\tab{\cs35\i\f6\cf13\lang1024 LineComment} +{\cs35\i\f6\cf13\lang1024 LineTerminator}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 MultiLineBlockComment}\par\pard\plain +\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MultiLineBlockComment} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024*} {\cs35\i\f6\cf13\lang1024 MultiLineBlockCommentCharacters} +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs31\b\f5\cf2\lang1024*} +{\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 MultiLineBlockCommentCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs35\i\f6\cf13\lang1024 LineTerminator}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MultiLineBlockCommentCharacters} +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs35\i\f6\cf13\lang1024 LineTerminator}\par\pard +\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LineComment} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024/} {\cs35\i\f6\cf13\lang1024 LineCommentCharacters}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LineCommentCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LineCommentCharacters} {\cs35\i\f6\cf13\lang1024 NonTerminator}\par\pard +\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NonTerminator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Other_}\par +|\tab{\cs31\b\f5\cf2\lang1024~}\par|\tab{\cs31\b\f5\cf2\lang1024\}}\par|\tab +{\cs31\b\f5\cf2\lang1024|}\par|\tab{\cs31\b\f5\cf2\lang1024\{}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars8_}\par|\tab{\cs31\b\f5\cf2\lang1024 x}\par|\tab +{\cs31\b\f5\cf2\lang1024 v}\par|\tab{\cs31\b\f5\cf2\lang1024 u}\par|\tab{\cs31\b\f5\cf2\lang1024 t} +\par|\tab{\cs31\b\f5\cf2\lang1024 r}\par|\tab{\cs31\b\f5\cf2\lang1024 n}\par|\tab +{\cs31\b\f5\cf2\lang1024 f}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars7_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars6_}\par|\tab{\cs31\b\f5\cf2\lang1024 b}\par|\tab +{\cs31\b\f5\cf2\lang1024^}\par|\tab{\cs31\b\f5\cf2\lang1024]}\par|\tab{\cs31\b\f5\cf2\lang1024\\} +\par|\tab{\cs31\b\f5\cf2\lang1024[}\par|\tab{\cs31\b\f5\cf2\lang1024 X}\par|\tab +{\cs31\b\f5\cf2\lang1024?}\par|\tab{\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024=}\par +|\tab{\cs31\b\f5\cf2\lang1024<}\par|\tab{\cs31\b\f5\cf2\lang1024;}\par|\tab +{\cs31\b\f5\cf2\lang1024:}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars5_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars4_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars3_}\par|\tab +{\cs31\b\f5\cf2\lang1024 0}\par|\tab{\cs31\b\f5\cf2\lang1024/}\par|\tab{\cs31\b\f5\cf2\lang1024.} +\par|\tab{\cs31\b\f5\cf2\lang1024 -}\par|\tab{\cs31\b\f5\cf2\lang1024,}\par|\tab +{\cs31\b\f5\cf2\lang1024 +}\par|\tab{\cs31\b\f5\cf2\lang1024*}\par|\tab{\cs31\b\f5\cf2\lang1024)} +\par|\tab{\cs31\b\f5\cf2\lang1024(}\par|\tab{\cs31\b\f5\cf2\lang1024'}\par|\tab +{\cs31\b\f5\cf2\lang1024&}\par|\tab{\cs31\b\f5\cf2\lang1024%}\par|\tab{\cs31\b\f5\cf2\lang1024"}\par +|\tab{\cs31\b\f5\cf2\lang1024!}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs33\b\f6\cf10\lang1024_Chars2_}\par\pard\plain\s13\fi-1440\li1800 +\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LineTerminator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024_Chars1_}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 WhiteSpace} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 WhiteSpace} {\cs35\i\f6\cf13\lang1024 WhiteSpaceCharacter}\par\pard\plain +\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 WhiteSpace} {\cs35\i\f6\cf13\lang1024 SingleLineBlockComment}\par\pard +\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 SingleLineBlockComment} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024*} {\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} +{\cs31\b\f5\cf2\lang1024*} {\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs35\i\f6\cf13\lang1024 NonTerminatorOrSlash} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 PreSlashCharacters} {\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PreSlashCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} +{\cs35\i\f6\cf13\lang1024 NonTerminatorOrAsteriskOrSlash}\par\pard\plain\s15\fi-1260\li1800\sa120 +\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 PreSlashCharacters} +{\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NonTerminatorOrAsteriskOrSlash} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Other_}\par +|\tab{\cs31\b\f5\cf2\lang1024~}\par|\tab{\cs31\b\f5\cf2\lang1024\}}\par|\tab +{\cs31\b\f5\cf2\lang1024|}\par|\tab{\cs31\b\f5\cf2\lang1024\{}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars8_}\par|\tab{\cs31\b\f5\cf2\lang1024 x}\par|\tab +{\cs31\b\f5\cf2\lang1024 v}\par|\tab{\cs31\b\f5\cf2\lang1024 u}\par|\tab{\cs31\b\f5\cf2\lang1024 t} +\par|\tab{\cs31\b\f5\cf2\lang1024 r}\par|\tab{\cs31\b\f5\cf2\lang1024 n}\par|\tab +{\cs31\b\f5\cf2\lang1024 f}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars7_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars6_}\par|\tab{\cs31\b\f5\cf2\lang1024 b}\par|\tab +{\cs31\b\f5\cf2\lang1024^}\par|\tab{\cs31\b\f5\cf2\lang1024]}\par|\tab{\cs31\b\f5\cf2\lang1024\\} +\par|\tab{\cs31\b\f5\cf2\lang1024[}\par|\tab{\cs31\b\f5\cf2\lang1024 X}\par|\tab +{\cs31\b\f5\cf2\lang1024?}\par|\tab{\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024=}\par +|\tab{\cs31\b\f5\cf2\lang1024<}\par|\tab{\cs31\b\f5\cf2\lang1024;}\par|\tab +{\cs31\b\f5\cf2\lang1024:}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars5_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars4_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars3_}\par|\tab +{\cs31\b\f5\cf2\lang1024 0}\par|\tab{\cs31\b\f5\cf2\lang1024.}\par|\tab{\cs31\b\f5\cf2\lang1024 -} +\par|\tab{\cs31\b\f5\cf2\lang1024,}\par|\tab{\cs31\b\f5\cf2\lang1024 +}\par|\tab +{\cs31\b\f5\cf2\lang1024)}\par|\tab{\cs31\b\f5\cf2\lang1024(}\par|\tab{\cs31\b\f5\cf2\lang1024'}\par +|\tab{\cs31\b\f5\cf2\lang1024&}\par|\tab{\cs31\b\f5\cf2\lang1024%}\par|\tab +{\cs31\b\f5\cf2\lang1024"}\par|\tab{\cs31\b\f5\cf2\lang1024!}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs33\b\f6\cf10\lang1024_Chars2_}\par\pard +\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NonTerminatorOrSlash} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Other_}\par +|\tab{\cs31\b\f5\cf2\lang1024~}\par|\tab{\cs31\b\f5\cf2\lang1024\}}\par|\tab +{\cs31\b\f5\cf2\lang1024|}\par|\tab{\cs31\b\f5\cf2\lang1024\{}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars8_}\par|\tab{\cs31\b\f5\cf2\lang1024 x}\par|\tab +{\cs31\b\f5\cf2\lang1024 v}\par|\tab{\cs31\b\f5\cf2\lang1024 u}\par|\tab{\cs31\b\f5\cf2\lang1024 t} +\par|\tab{\cs31\b\f5\cf2\lang1024 r}\par|\tab{\cs31\b\f5\cf2\lang1024 n}\par|\tab +{\cs31\b\f5\cf2\lang1024 f}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars7_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars6_}\par|\tab{\cs31\b\f5\cf2\lang1024 b}\par|\tab +{\cs31\b\f5\cf2\lang1024^}\par|\tab{\cs31\b\f5\cf2\lang1024]}\par|\tab{\cs31\b\f5\cf2\lang1024\\} +\par|\tab{\cs31\b\f5\cf2\lang1024[}\par|\tab{\cs31\b\f5\cf2\lang1024 X}\par|\tab +{\cs31\b\f5\cf2\lang1024?}\par|\tab{\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024=}\par +|\tab{\cs31\b\f5\cf2\lang1024<}\par|\tab{\cs31\b\f5\cf2\lang1024;}\par|\tab +{\cs31\b\f5\cf2\lang1024:}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars5_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars4_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars3_}\par|\tab +{\cs31\b\f5\cf2\lang1024 0}\par|\tab{\cs31\b\f5\cf2\lang1024.}\par|\tab{\cs31\b\f5\cf2\lang1024 -} +\par|\tab{\cs31\b\f5\cf2\lang1024,}\par|\tab{\cs31\b\f5\cf2\lang1024 +}\par|\tab +{\cs31\b\f5\cf2\lang1024*}\par|\tab{\cs31\b\f5\cf2\lang1024)}\par|\tab{\cs31\b\f5\cf2\lang1024(}\par +|\tab{\cs31\b\f5\cf2\lang1024'}\par|\tab{\cs31\b\f5\cf2\lang1024&}\par|\tab +{\cs31\b\f5\cf2\lang1024%}\par|\tab{\cs31\b\f5\cf2\lang1024"}\par|\tab{\cs31\b\f5\cf2\lang1024!}\par +\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs33\b\f6\cf10\lang1024_Chars2_}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 WhiteSpaceCharacter} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024_Chars2_}\par} \ No newline at end of file diff --git a/mozilla/js/semantics/ECMA Lexer.html b/mozilla/js/semantics/ECMA Lexer.html new file mode 100644 index 00000000000..91462e045aa --- /dev/null +++ b/mozilla/js/semantics/ECMA Lexer.html @@ -0,0 +1,1413 @@ + + + +ECMA Lexer + + + + +

Comments

+ +

Syntax

+ +
+
LineComment Þ / / LineCommentCharacters
+
+
+
LineCommentCharacters Þ
+
   «empty»
+
|  LineCommentCharacters NonTerminator
+
+
NonTerminator Þ AnyCharacter except LineTerminator
+
+
SingleLineBlockComment Þ / * BlockCommentCharacters * /
+
+
+
BlockCommentCharacters Þ
+
   «empty»
+
|  BlockCommentCharacters NonTerminatorOrSlash
+
|  PreSlashCharacters /
+
+
+
PreSlashCharacters Þ
+
   «empty»
+
|  BlockCommentCharacters NonTerminatorOrAsteriskOrSlash
+
|  PreSlashCharacters /
+
+
NonTerminatorOrSlash Þ NonTerminator except /
+
NonTerminatorOrAsteriskOrSlash Þ NonTerminator except * | /
+
+
MultiLineBlockComment Þ / * MultiLineBlockCommentCharacters BlockCommentCharacters * /
+
+
+
MultiLineBlockCommentCharacters Þ
+
   BlockCommentCharacters LineTerminator
+
|  MultiLineBlockCommentCharacters BlockCommentCharacters LineTerminator
+
+

White space

+ +

Syntax

+ +
+
WhiteSpace Þ
+
   «empty»
+
|  WhiteSpace WhiteSpaceCharacter
+
|  WhiteSpace SingleLineBlockComment
+
+
WhiteSpaceCharacter Þ «TAB» | «VT» | «FF» | «SP»
+

Line breaks

+ +

Syntax

+ +
+
LineBreak Þ
+
   LineTerminator
+
|  LineComment LineTerminator
+
|  MultiLineBlockComment
+
+
LineTerminator Þ «LF» | «CR»
+
+
LineBreaks Þ
+
   LineBreak
+
|  LineBreaks WhiteSpace LineBreak
+
+

Tokens

+ +

Syntax

+ +
+
NextToken Þ WhiteSpace Token
+
+
+
Token Þ
+
   LineBreaks
+
|  IdentifierOrReservedWord
+
|  Punctuator
+
|  NumericLiteral
+
|  StringLiteral
+
|  EndOfInput
+
+
+
EndOfInput Þ
+
   End
+
|  LineComment End
+
+

Semantics

+ +

type Token
+  = oneof {
+           identifierString;
+           reservedWordString;
+           punctuatorString;
+           numberDouble;
+           stringString;
+           lineBreaks;
+           end}

+ +

action Token[NextToken] : Token

+ +

Token[NextToken Þ WhiteSpace Token] = Token[Token]

+ +

action Token[Token] : Token

+ +

Token[Token Þ LineBreaks] = lineBreaks

+ +

Token[Token Þ IdentifierOrReservedWord] = Token[IdentifierOrReservedWord]

+ +

Token[Token Þ Punctuator] = punctuator Punctuator[Punctuator]

+ +

Token[Token Þ NumericLiteral] = number DoubleValue[NumericLiteral]

+ +

Token[Token Þ StringLiteral] = string StringValue[StringLiteral]

+ +

Token[Token Þ EndOfInput] = end

+ +

Keywords

+ +

Syntax

+ +
+
IdentifierName Þ
+
   IdentifierLetter
+
|  IdentifierName IdentifierLetter
+
|  IdentifierName DecimalDigit
+
+
IdentifierLetter Þ
+
   A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
+
|  a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z
+
|  $ | _
+
DecimalDigit Þ 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
+

Semantics

+ +

action Name[IdentifierName] : String

+ +

Name[IdentifierName Þ IdentifierLetter] = [CharacterValue[IdentifierLetter]]

+ +

Name[IdentifierName Þ IdentifierName1 IdentifierLetter]
+  = Name[IdentifierName1¨ [CharacterValue[IdentifierLetter]]

+ +

Name[IdentifierName Þ IdentifierName1 DecimalDigit]
+  = Name[IdentifierName1¨ [CharacterValue[DecimalDigit]]

+ +

action CharacterValue[IdentifierLetter] : Character = IdentifierLetter

+ +

action CharacterValue[DecimalDigit] : Character = DecimalDigit

+ +

action DigitValue[DecimalDigit] : Integer = digitValue(DecimalDigit)

+ +

keywords : String[]
+  = [break”,
+      “case”,
+      “catch”,
+      “continue”,
+      “default”,
+      “delete”,
+      “do”,
+      “else”,
+      “finally”,
+      “for”,
+      “function”,
+      “if”,
+      “in”,
+      “new”,
+      “return”,
+      “switch”,
+      “this”,
+      “throw”,
+      “try”,
+      “typeof”,
+      “var”,
+      “void”,
+      “while”,
+      “with]

+ +

futureReservedWords : String[]
+  = [class”, “const”, “debugger”, “enum”, “export”, “extends”, “import”, “super]

+ +

literals : String[] = [null”, “true”, “false]

+ +

reservedWords : String[] = keywords ¨ futureReservedWords ¨ literals

+ +

member(idStringlistString[]) : Boolean
+  = if empty(list)
+     then false
+     else let sString = first(list)
+           in if stringEqual(ids)
+               then true
+               else member(idrest(list))

+ +

Syntax

+ +
+
IdentifierOrReservedWord Þ IdentifierName
+
+

Semantics

+ +

action Token[IdentifierOrReservedWord] : Token

+ +

Token[IdentifierOrReservedWord Þ IdentifierName]
+  = let idString = Name[IdentifierName]
+     in if member(idreservedWords)
+         then reservedWord id
+         else identifier id

+ +

Punctuators

+ +

Syntax

+ +
+
Punctuator Þ
+
   =
+
|  >
+
|  <
+
|  = =
+
|  = = =
+
|  < =
+
|  > =
+
|  ! =
+
|  ! = =
+
|  ,
+
|  !
+
|  ~
+
|  ?
+
|  :
+
|  .
+
|  & &
+
|  | |
+
|  + +
+
|  - -
+
|  +
+
|  -
+
|  *
+
|  /
+
|  &
+
|  |
+
|  ^
+
|  %
+
|  < <
+
|  > >
+
|  > > >
+
|  + =
+
|  - =
+
|  * =
+
|  / =
+
|  & =
+
|  | =
+
|  ^ =
+
|  % =
+
|  < < =
+
|  > > =
+
|  > > > =
+
|  (
+
|  )
+
|  {
+
|  }
+
|  [
+
|  ]
+
|  ;
+
+

Semantics

+ +

action Punctuator[Punctuator] : String

+ +

Punctuator[Punctuator Þ =] = “=

+ +

Punctuator[Punctuator Þ >] = “>

+ +

Punctuator[Punctuator Þ <] = “<

+ +

Punctuator[Punctuator Þ = =] = “==

+ +

Punctuator[Punctuator Þ = = =] = “===

+ +

Punctuator[Punctuator Þ < =] = “<=

+ +

Punctuator[Punctuator Þ > =] = “>=

+ +

Punctuator[Punctuator Þ ! =] = “!=

+ +

Punctuator[Punctuator Þ ! = =] = “!==

+ +

Punctuator[Punctuator Þ ,] = “,

+ +

Punctuator[Punctuator Þ !] = “!

+ +

Punctuator[Punctuator Þ ~] = “~

+ +

Punctuator[Punctuator Þ ?] = “?

+ +

Punctuator[Punctuator Þ :] = “:

+ +

Punctuator[Punctuator Þ .] = “.

+ +

Punctuator[Punctuator Þ & &] = “&&

+ +

Punctuator[Punctuator Þ | |] = “||

+ +

Punctuator[Punctuator Þ + +] = “++

+ +

Punctuator[Punctuator Þ - -] = “--

+ +

Punctuator[Punctuator Þ +] = “+

+ +

Punctuator[Punctuator Þ -] = “-

+ +

Punctuator[Punctuator Þ *] = “*

+ +

Punctuator[Punctuator Þ /] = “/

+ +

Punctuator[Punctuator Þ &] = “&

+ +

Punctuator[Punctuator Þ |] = “|

+ +

Punctuator[Punctuator Þ ^] = “^

+ +

Punctuator[Punctuator Þ %] = “%

+ +

Punctuator[Punctuator Þ < <] = “<<

+ +

Punctuator[Punctuator Þ > >] = “>>

+ +

Punctuator[Punctuator Þ > > >] = “>>>

+ +

Punctuator[Punctuator Þ + =] = “+=

+ +

Punctuator[Punctuator Þ - =] = “-=

+ +

Punctuator[Punctuator Þ * =] = “*=

+ +

Punctuator[Punctuator Þ / =] = “/=

+ +

Punctuator[Punctuator Þ & =] = “&=

+ +

Punctuator[Punctuator Þ | =] = “|=

+ +

Punctuator[Punctuator Þ ^ =] = “^=

+ +

Punctuator[Punctuator Þ % =] = “%=

+ +

Punctuator[Punctuator Þ < < =] = “<<=

+ +

Punctuator[Punctuator Þ > > =] = “>>=

+ +

Punctuator[Punctuator Þ > > > =] = “>>>=

+ +

Punctuator[Punctuator Þ (] = “(

+ +

Punctuator[Punctuator Þ )] = “)

+ +

Punctuator[Punctuator Þ {] = “{

+ +

Punctuator[Punctuator Þ }] = “}

+ +

Punctuator[Punctuator Þ [] = “[

+ +

Punctuator[Punctuator Þ ]] = “]

+ +

Punctuator[Punctuator Þ ;] = “;

+ +

Numeric literals

+ +

Syntax

+ +
+
NumericLiteral Þ
+
   DecimalLiteral
+
|  HexIntegerLiteral
+
|  OctalIntegerLiteral
+
+

Semantics

+ +

action DoubleValue[NumericLiteral] : Double

+ +

DoubleValue[NumericLiteral Þ DecimalLiteral]
+  = rationalToDouble(RationalValue[DecimalLiteral])

+ +

DoubleValue[NumericLiteral Þ HexIntegerLiteral]
+  = rationalToDouble(IntegerValue[HexIntegerLiteral])

+ +

DoubleValue[NumericLiteral Þ OctalIntegerLiteral]
+  = rationalToDouble(IntegerValue[OctalIntegerLiteral])

+ +

expt(baseRationalexponentInteger) : Rational
+  = if exponent = 0
+     then 1
+     else if exponent < 0
+     then 1/expt(base, -exponent)
+     else base*expt(baseexponent - 1)

+ +

Syntax

+ +
+
DecimalLiteral Þ Mantissa Exponent
+
+
+
Mantissa Þ
+
   DecimalIntegerLiteral
+
|  DecimalIntegerLiteral .
+
|  DecimalIntegerLiteral . Fraction
+
|  . Fraction
+
+
+
DecimalIntegerLiteral Þ
+
   0
+
|  NonZeroDecimalDigits
+
+
+
NonZeroDecimalDigits Þ
+
   NonZeroDigit
+
|  NonZeroDecimalDigits DecimalDigit
+
+
NonZeroDigit Þ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
+
+
Fraction Þ DecimalDigits
+
+

Semantics

+ +

action RationalValue[DecimalLiteral] : Rational

+ +

RationalValue[DecimalLiteral Þ Mantissa Exponent]
+  = RationalValue[Mantissa]*expt(10, IntegerValue[Exponent])

+ +

action RationalValue[Mantissa] : Rational

+ +

RationalValue[Mantissa Þ DecimalIntegerLiteral] = IntegerValue[DecimalIntegerLiteral]

+ +

RationalValue[Mantissa Þ DecimalIntegerLiteral .] = IntegerValue[DecimalIntegerLiteral]

+ +

RationalValue[Mantissa Þ DecimalIntegerLiteral . Fraction]
+  = IntegerValue[DecimalIntegerLiteral] + RationalValue[Fraction]

+ +

RationalValue[Mantissa Þ . Fraction] = RationalValue[Fraction]

+ +

action IntegerValue[DecimalIntegerLiteral] : Integer

+ +

IntegerValue[DecimalIntegerLiteral Þ 0] = 0

+ +

IntegerValue[DecimalIntegerLiteral Þ NonZeroDecimalDigits]
+  = IntegerValue[NonZeroDecimalDigits]

+ +

action IntegerValue[NonZeroDecimalDigits] : Integer

+ +

IntegerValue[NonZeroDecimalDigits Þ NonZeroDigit] = DecimalValue[NonZeroDigit]

+ +

IntegerValue[NonZeroDecimalDigits Þ NonZeroDecimalDigits1 DecimalDigit]
+  = 10*IntegerValue[NonZeroDecimalDigits1] + DecimalValue[DecimalDigit]

+ +

action DigitValue[NonZeroDigit] : Integer = digitValue(NonZeroDigit)

+ +

action RationalValue[Fraction] : Rational

+ +

RationalValue[Fraction Þ DecimalDigits]
+  = IntegerValue[DecimalDigits]/expt(10, NDigits[DecimalDigits])

+ +

Syntax

+ +
+
Exponent Þ
+
   «empty»
+
|  ExponentIndicator SignedInteger
+
+
ExponentIndicator Þ E | e
+
+
SignedInteger Þ
+
   DecimalDigits
+
|  + DecimalDigits
+
|  - DecimalDigits
+
+

Semantics

+ +

action IntegerValue[Exponent] : Integer

+ +

IntegerValue[Exponent Þ «empty»] = 0

+ +

IntegerValue[Exponent Þ ExponentIndicator SignedInteger] = IntegerValue[SignedInteger]

+ +

action IntegerValue[SignedInteger] : Integer

+ +

IntegerValue[SignedInteger Þ DecimalDigits] = IntegerValue[DecimalDigits]

+ +

IntegerValue[SignedInteger Þ + DecimalDigits] = IntegerValue[DecimalDigits]

+ +

IntegerValue[SignedInteger Þ - DecimalDigits] = -IntegerValue[DecimalDigits]

+ +

Syntax

+ +
+
DecimalDigits Þ
+
   DecimalDigit
+
|  DecimalDigits DecimalDigit
+
+

Semantics

+ +

action IntegerValue[DecimalDigits] : Integer

+ +

action NDigits[DecimalDigits] : Integer

+ +

IntegerValue[DecimalDigits Þ DecimalDigit] = DecimalValue[DecimalDigit]

+ +

NDigits[DecimalDigits Þ DecimalDigit] = 1

+ +

IntegerValue[DecimalDigits Þ DecimalDigits1 DecimalDigit]
+  = 10*IntegerValue[DecimalDigits1] + DecimalValue[DecimalDigit]

+ +

NDigits[DecimalDigits Þ DecimalDigits1 DecimalDigit] = NDigits[DecimalDigits1] + 1

+ +

Syntax

+ +
+
HexIntegerLiteral Þ
+
   0 HexIndicator HexDigit
+
|  HexIntegerLiteral HexDigit
+
+
HexIndicator Þ X | x
+
HexDigit Þ 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | a | b | c | d | e | f
+
+
OctalIntegerLiteral Þ
+
   0 OctalDigit
+
|  OctalIntegerLiteral OctalDigit
+
+
OctalDigit Þ 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7
+

Semantics

+ +

action IntegerValue[HexIntegerLiteral] : Integer

+ +

IntegerValue[HexIntegerLiteral Þ 0 HexIndicator HexDigit] = HexValue[HexDigit]

+ +

IntegerValue[HexIntegerLiteral Þ HexIntegerLiteral1 HexDigit]
+  = 16*IntegerValue[HexIntegerLiteral1] + HexValue[HexDigit]

+ +

action DigitValue[HexDigit] : Integer = digitValue(HexDigit)

+ +

action IntegerValue[OctalIntegerLiteral] : Integer

+ +

IntegerValue[OctalIntegerLiteral Þ 0 OctalDigit] = OctalValue[OctalDigit]

+ +

IntegerValue[OctalIntegerLiteral Þ OctalIntegerLiteral1 OctalDigit]
+  = 8*IntegerValue[OctalIntegerLiteral1] + OctalValue[OctalDigit]

+ +

action CharacterValue[OctalDigit] : Character = OctalDigit

+ +

action DigitValue[OctalDigit] : Integer = digitValue(OctalDigit)

+ +

String literals

+ +

Syntax

+ +
Quote Î {singledouble}
+
+
StringLiteral Þ
+
   ' StringCharssingle '
+
|  " StringCharsdouble "
+
+

Semantics

+ +

action StringValue[StringLiteral] : String

+ +

StringValue[StringLiteral Þ ' StringCharssingle '] = StringValue[StringCharssingle]

+ +

StringValue[StringLiteral Þ " StringCharsdouble "] = StringValue[StringCharsdouble]

+ +

Syntax

+ +
+
StringCharsQuote Þ
+
   OrdinaryStringCharsQuote
+
|  StringCharsQuote \ ShortOctalEscape
+
+
+
OrdinaryStringCharsQuote Þ
+
   «empty»
+
|  StringCharsQuote PlainStringChar
+
|  StringCharsQuote PlainStringQuoteQuote
+
|  OrdinaryStringCharsQuote OctalDigit
+
|  StringCharsQuote \ OrdinaryEscape
+
+
PlainStringChar Þ AnyCharacter except ' | " | \ | OctalDigit | LineTerminator
+
+
PlainStringQuotesingle Þ "
+
+
+
PlainStringQuotedouble Þ '
+
+

Semantics

+ +

action StringValue[StringCharsQuote] : String

+ +

StringValue[StringCharsQuote Þ OrdinaryStringCharsQuote]
+  = StringValue[OrdinaryStringCharsQuote]

+ +

StringValue[StringCharsQuote Þ StringCharsQuote1 \ ShortOctalEscape]
+  = StringValue[StringCharsQuote1¨ [CharacterValue[ShortOctalEscape]]

+ +

action StringValue[OrdinaryStringCharsQuote] : String

+ +

StringValue[OrdinaryStringCharsQuote Þ «empty»] = “”

+ +

StringValue[OrdinaryStringCharsQuote Þ StringCharsQuote PlainStringChar]
+  = StringValue[StringCharsQuote¨ [CharacterValue[PlainStringChar]]

+ +

StringValue[OrdinaryStringCharsQuote Þ StringCharsQuote PlainStringQuoteQuote]
+  = StringValue[StringCharsQuote¨ [CharacterValue[PlainStringQuoteQuote]]

+ +

StringValue[OrdinaryStringCharsQuote Þ OrdinaryStringCharsQuote1 OctalDigit]
+  = StringValue[OrdinaryStringCharsQuote1¨ [CharacterValue[OctalDigit]]

+ +

StringValue[OrdinaryStringCharsQuote Þ StringCharsQuote \ OrdinaryEscape]
+  = StringValue[StringCharsQuote¨ [CharacterValue[OrdinaryEscape]]

+ +

action CharacterValue[PlainStringChar] : Character = PlainStringChar

+ +

action CharacterValue[PlainStringQuoteQuote] : Character

+ +

CharacterValue[PlainStringQuotesingle Þ "] = ‘"

+ +

CharacterValue[PlainStringQuotedouble Þ '] = ‘'

+ +

Syntax

+ +
+
OrdinaryEscape Þ
+
   StringCharEscape
+
|  FullOctalEscape
+
|  HexEscape
+
|  UnicodeEscape
+
|  StringNonEscape
+
+
StringNonEscape Þ NonTerminator except OctalDigit | x | u | ' | " | \ | b | f | n | r | t | v
+

Semantics

+ +

action CharacterValue[OrdinaryEscape] : Character

+ +

CharacterValue[OrdinaryEscape Þ StringCharEscape] = CharacterValue[StringCharEscape]

+ +

CharacterValue[OrdinaryEscape Þ FullOctalEscape] = CharacterValue[FullOctalEscape]

+ +

CharacterValue[OrdinaryEscape Þ HexEscape] = CharacterValue[HexEscape]

+ +

CharacterValue[OrdinaryEscape Þ UnicodeEscape] = CharacterValue[UnicodeEscape]

+ +

CharacterValue[OrdinaryEscape Þ StringNonEscape] = CharacterValue[StringNonEscape]

+ +

action CharacterValue[StringNonEscape] : Character = StringNonEscape

+ +

Syntax

+ +
+
StringCharEscape Þ
+
   '
+
|  "
+
|  \
+
|  b
+
|  f
+
|  n
+
|  r
+
|  t
+
|  v
+
+

Semantics

+ +

action CharacterValue[StringCharEscape] : Character

+ +

CharacterValue[StringCharEscape Þ '] = ‘'

+ +

CharacterValue[StringCharEscape Þ "] = ‘"

+ +

CharacterValue[StringCharEscape Þ \] = ‘\

+ +

CharacterValue[StringCharEscape Þ b] = ‘«BS»

+ +

CharacterValue[StringCharEscape Þ f] = ‘«FF»

+ +

CharacterValue[StringCharEscape Þ n] = ‘«LF»

+ +

CharacterValue[StringCharEscape Þ r] = ‘«CR»

+ +

CharacterValue[StringCharEscape Þ t] = ‘«TAB»

+ +

CharacterValue[StringCharEscape Þ v] = ‘«VT»

+ +

Syntax

+ +
+
ShortOctalEscape Þ
+
   OctalDigit
+
|  ZeroToThree OctalDigit
+
+
+
FullOctalEscape Þ
+
   FourToSeven OctalDigit
+
|  ZeroToThree OctalDigit OctalDigit
+
+
ZeroToThree Þ 0 | 1 | 2 | 3
+
FourToSeven Þ 4 | 5 | 6 | 7
+
+
HexEscape Þ x HexDigit HexDigit
+
+
+
UnicodeEscape Þ u HexDigit HexDigit HexDigit HexDigit
+
+

Semantics

+ +

action CharacterValue[ShortOctalEscape] : Character

+ +

CharacterValue[ShortOctalEscape Þ OctalDigit] = codeToCharacter(OctalValue[OctalDigit])

+ +

CharacterValue[ShortOctalEscape Þ ZeroToThree OctalDigit]
+  = codeToCharacter(8*OctalValue[ZeroToThree] + OctalValue[OctalDigit])

+ +

action CharacterValue[FullOctalEscape] : Character

+ +

CharacterValue[FullOctalEscape Þ FourToSeven OctalDigit]
+  = codeToCharacter(8*OctalValue[FourToSeven] + OctalValue[OctalDigit])

+ +

CharacterValue[FullOctalEscape Þ ZeroToThree OctalDigit1 OctalDigit2]
+  = codeToCharacter(
+         64*OctalValue[ZeroToThree] + 8*OctalValue[OctalDigit1] + OctalValue[OctalDigit2])

+ +

action DigitValue[ZeroToThree] : Integer = digitValue(ZeroToThree)

+ +

action DigitValue[FourToSeven] : Integer = digitValue(FourToSeven)

+ +

action CharacterValue[HexEscape] : Character

+ +

CharacterValue[HexEscape Þ x HexDigit1 HexDigit2]
+  = codeToCharacter(16*HexValue[HexDigit1] + HexValue[HexDigit2])

+ +

action CharacterValue[UnicodeEscape] : Character

+ +

CharacterValue[UnicodeEscape Þ u HexDigit1 HexDigit2 HexDigit3 HexDigit4]
+  = codeToCharacter(
+         4096*HexValue[HexDigit1] + 256*HexValue[HexDigit2] + 16*HexValue[HexDigit3] +
+         HexValue[HexDigit4])

+ + + diff --git a/mozilla/js/semantics/ECMA Lexer.lisp b/mozilla/js/semantics/ECMA Lexer.lisp new file mode 100644 index 00000000000..43cf710516a --- /dev/null +++ b/mozilla/js/semantics/ECMA Lexer.lisp @@ -0,0 +1,487 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; ECMAScript sample lexer +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + +(defun digit-char-16 (char) + (assert-non-null (digit-char-p char 16))) + + +(progn + (defparameter *lw* + (generate-world + "L" + '((lexer code-lexer + :lalr-1 + :next-token + ((:white-space-character (#?0009 #?000B #?000C #\space) ()) + (:line-terminator (#?000A #?000D) ()) + (:non-terminator (- every :line-terminator) ()) + (:non-terminator-or-slash (- :non-terminator (#\/)) ()) + (:non-terminator-or-asterisk-or-slash (- :non-terminator (#\* #\/)) ()) + (:identifier-letter (++ (#\A #\B #\C #\D #\E #\F #\G #\H #\I #\J #\K #\L #\M #\N #\O #\P #\Q #\R #\S #\T #\U #\V #\W #\X #\Y #\Z) + (#\a #\b #\c #\d #\e #\f #\g #\h #\i #\j #\k #\l #\m #\n #\o #\p #\q #\r #\s #\t #\u #\v #\w #\x #\y #\z) + (#\$ #\_)) + ((character-value character-value))) + (:decimal-digit (#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9) + ((character-value character-value) + (decimal-value digit-value))) + (:non-zero-digit (#\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9) + ((decimal-value digit-value))) + (:octal-digit (#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7) + ((character-value character-value) + (octal-value digit-value))) + (:zero-to-three (#\0 #\1 #\2 #\3) + ((octal-value digit-value))) + (:four-to-seven (#\4 #\5 #\6 #\7) + ((octal-value digit-value))) + (:hex-digit (#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9 #\A #\B #\C #\D #\E #\F #\a #\b #\c #\d #\e #\f) + ((hex-value digit-value))) + (:exponent-indicator (#\E #\e) ()) + (:hex-indicator (#\X #\x) ()) + (:plain-string-char (- every (+ (#\' #\" #\\) :octal-digit :line-terminator)) + ((character-value character-value))) + (:string-non-escape (- :non-terminator (+ :octal-digit (#\x #\u #\' #\" #\\ #\b #\f #\n #\r #\t #\v))) + ((character-value character-value)))) + ((character-value character identity (*)) + (digit-value integer digit-char-16 ((:global-variable "digitValue") "(" * ")")))) + + (%section "Comments") + (production :line-comment (#\/ #\/ :line-comment-characters) line-comment) + + (production :line-comment-characters () line-comment-characters-empty) + (production :line-comment-characters (:line-comment-characters :non-terminator) line-comment-characters-chars) + (%charclass :non-terminator) + + (production :single-line-block-comment (#\/ #\* :block-comment-characters #\* #\/) single-line-block-comment) + + (production :block-comment-characters () block-comment-characters-empty) + (production :block-comment-characters (:block-comment-characters :non-terminator-or-slash) block-comment-characters-chars) + (production :block-comment-characters (:pre-slash-characters #\/) block-comment-characters-slash) + + (production :pre-slash-characters () pre-slash-characters-empty) + (production :pre-slash-characters (:block-comment-characters :non-terminator-or-asterisk-or-slash) pre-slash-characters-chars) + (production :pre-slash-characters (:pre-slash-characters #\/) pre-slash-characters-slash) + + (%charclass :non-terminator-or-slash) + (%charclass :non-terminator-or-asterisk-or-slash) + + (production :multi-line-block-comment (#\/ #\* :multi-line-block-comment-characters :block-comment-characters #\* #\/) multi-line-block-comment) + + (production :multi-line-block-comment-characters (:block-comment-characters :line-terminator) multi-line-block-comment-characters-first) + (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") + + (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") + + (production :line-break (:line-terminator) line-break-line-terminator) + (production :line-break (:line-comment :line-terminator) line-break-line-comment) + (production :line-break (:multi-line-block-comment) line-break-multi-line-block-comment) + (%charclass :line-terminator) + + (production :line-breaks (:line-break) line-breaks-first) + (production :line-breaks (:line-breaks :white-space :line-break) line-breaks-rest) + + (%section "Tokens") + + (declare-action token :next-token token) + (production :next-token (:white-space :token) next-token + (token (token :token))) + + (declare-action token :token token) + (production :token (:line-breaks) token-line-breaks + (token (oneof line-breaks))) + (production :token (:identifier-or-reserved-word) token-identifier-or-reserved-word + (token (token :identifier-or-reserved-word))) + (production :token (:punctuator) token-punctuator + (token (oneof punctuator (punctuator :punctuator)))) + (production :token (:numeric-literal) token-numeric-literal + (token (oneof number (double-value :numeric-literal)))) + (production :token (:string-literal) token-string-literal + (token (oneof string (string-value :string-literal)))) + (production :token (:end-of-input) token-end + (token (oneof end))) + + (production :end-of-input ($end) end-of-input-end) + (production :end-of-input (:line-comment $end) end-of-input-line-comment) + + (deftype token (oneof (identifier string) (reserved-word string) (punctuator string) (number double) (string string) line-breaks end)) + (%print-actions) + + (%section "Keywords") + + (declare-action name :identifier-name string) + (production :identifier-name (:identifier-letter) identifier-name-letter + (name (vector (character-value :identifier-letter)))) + (production :identifier-name (:identifier-name :identifier-letter) identifier-name-next-letter + (name (append (name :identifier-name) (vector (character-value :identifier-letter))))) + (production :identifier-name (:identifier-name :decimal-digit) identifier-name-next-digit + (name (append (name :identifier-name) (vector (character-value :decimal-digit))))) + (%charclass :identifier-letter) + (%charclass :decimal-digit) + (%print-actions) + + (define keywords (vector string) + (vector "break" "case" "catch" "continue" "default" "delete" "do" "else" "finally" "for" "function" "if" "in" + "new" "return" "switch" "this" "throw" "try" "typeof" "var" "void" "while" "with")) + (define future-reserved-words (vector string) + (vector "class" "const" "debugger" "enum" "export" "extends" "import" "super")) + (define literals (vector string) + (vector "null" "true" "false")) + (define reserved-words (vector string) + (append keywords (append future-reserved-words literals))) + + (define (member (id string) (list (vector string))) boolean + (if (empty list) + false + (let ((s string (first list))) + (if (string-equal id s) + true + (member id (rest list)))))) + + (declare-action token :identifier-or-reserved-word token) + (production :identifier-or-reserved-word (:identifier-name) identifier-or-reserved-word-identifier-name + (token (let ((id string (name :identifier-name))) + (if (member id reserved-words) + (oneof reserved-word id) + (oneof identifier id))))) + (%print-actions) + + (%section "Punctuators") + + (declare-action punctuator :punctuator string) + (production :punctuator (#\=) punctuator-assignment (punctuator "=")) + (production :punctuator (#\>) punctuator-greater-than (punctuator ">")) + (production :punctuator (#\<) punctuator-less-than (punctuator "<")) + (production :punctuator (#\= #\=) punctuator-equal (punctuator "==")) + (production :punctuator (#\= #\= #\=) punctuator-identical (punctuator "===")) + (production :punctuator (#\< #\=) punctuator-less-than-or-equal (punctuator "<=")) + (production :punctuator (#\> #\=) punctuator-greater-than-or-equal (punctuator ">=")) + (production :punctuator (#\! #\=) punctuator-not-equal (punctuator "!=")) + (production :punctuator (#\! #\= #\=) punctuator-not-identical (punctuator "!==")) + (production :punctuator (#\,) punctuator-comma (punctuator ",")) + (production :punctuator (#\!) punctuator-not (punctuator "!")) + (production :punctuator (#\~) punctuator-complement (punctuator "~")) + (production :punctuator (#\?) punctuator-question (punctuator "?")) + (production :punctuator (#\:) punctuator-colon (punctuator ":")) + (production :punctuator (#\.) punctuator-period (punctuator ".")) + (production :punctuator (#\& #\&) punctuator-logical-and (punctuator "&&")) + (production :punctuator (#\| #\|) punctuator-logical-or (punctuator "||")) + (production :punctuator (#\+ #\+) punctuator-increment (punctuator "++")) + (production :punctuator (#\- #\-) punctuator-decrement (punctuator "--")) + (production :punctuator (#\+) punctuator-plus (punctuator "+")) + (production :punctuator (#\-) punctuator-minus (punctuator "-")) + (production :punctuator (#\*) punctuator-times (punctuator "*")) + (production :punctuator (#\/) punctuator-divide (punctuator "/")) + (production :punctuator (#\&) punctuator-and (punctuator "&")) + (production :punctuator (#\|) punctuator-or (punctuator "|")) + (production :punctuator (#\^) punctuator-xor (punctuator "^")) + (production :punctuator (#\%) punctuator-modulo (punctuator "%")) + (production :punctuator (#\< #\<) punctuator-left-shift (punctuator "<<")) + (production :punctuator (#\> #\>) punctuator-right-shift (punctuator ">>")) + (production :punctuator (#\> #\> #\>) punctuator-logical-right-shift (punctuator ">>>")) + (production :punctuator (#\+ #\=) punctuator-plus-equals (punctuator "+=")) + (production :punctuator (#\- #\=) punctuator-minus-equals (punctuator "-=")) + (production :punctuator (#\* #\=) punctuator-times-equals (punctuator "*=")) + (production :punctuator (#\/ #\=) punctuator-divide-equals (punctuator "/=")) + (production :punctuator (#\& #\=) punctuator-and-equals (punctuator "&=")) + (production :punctuator (#\| #\=) punctuator-or-equals (punctuator "|=")) + (production :punctuator (#\^ #\=) punctuator-xor-equals (punctuator "^=")) + (production :punctuator (#\% #\=) punctuator-modulo-equals (punctuator "%=")) + (production :punctuator (#\< #\< #\=) punctuator-left-shift-equals (punctuator "<<=")) + (production :punctuator (#\> #\> #\=) punctuator-right-shift-equals (punctuator ">>=")) + (production :punctuator (#\> #\> #\> #\=) punctuator-logical-right-shift-equals (punctuator ">>>=")) + (production :punctuator (#\() punctuator-open-parenthesis (punctuator "(")) + (production :punctuator (#\)) punctuator-close-parenthesis (punctuator ")")) + (production :punctuator (#\{) punctuator-open-brace (punctuator "{")) + (production :punctuator (#\}) punctuator-close-brace (punctuator "}")) + (production :punctuator (#\[) punctuator-open-bracket (punctuator "[")) + (production :punctuator (#\]) punctuator-close-bracket (punctuator "]")) + (production :punctuator (#\;) punctuator-semicolon (punctuator ";")) + (%print-actions) + + (%section "Numeric literals") + + (declare-action double-value :numeric-literal double) + (production :numeric-literal (:decimal-literal) numeric-literal-decimal + (double-value (rational-to-double (rational-value :decimal-literal)))) + (production :numeric-literal (:hex-integer-literal) numeric-literal-hex + (double-value (rational-to-double (integer-to-rational (integer-value :hex-integer-literal))))) + (production :numeric-literal (:octal-integer-literal) numeric-literal-octal + (double-value (rational-to-double (integer-to-rational (integer-value :octal-integer-literal))))) + (%print-actions) + + (define (expt (base rational) (exponent integer)) rational + (if (= exponent 0) + (integer-to-rational 1) + (if (< exponent 0) + (rational/ (integer-to-rational 1) (expt base (neg exponent))) + (rational* base (expt base (- exponent 1)))))) + + (declare-action rational-value :decimal-literal rational) + (production :decimal-literal (:mantissa :exponent) decimal-literal + (rational-value (rational* (rational-value :mantissa) (expt (integer-to-rational 10) (integer-value :exponent))))) + + (declare-action rational-value :mantissa rational) + (production :mantissa (:decimal-integer-literal) mantissa-integer + (rational-value (integer-to-rational (integer-value :decimal-integer-literal)))) + (production :mantissa (:decimal-integer-literal #\.) mantissa-integer-dot + (rational-value (integer-to-rational (integer-value :decimal-integer-literal)))) + (production :mantissa (:decimal-integer-literal #\. :fraction) mantissa-integer-dot-fraction + (rational-value (rational+ (integer-to-rational (integer-value :decimal-integer-literal)) + (rational-value :fraction)))) + (production :mantissa (#\. :fraction) mantissa-dot-fraction + (rational-value (rational-value :fraction))) + + (declare-action integer-value :decimal-integer-literal integer) + (production :decimal-integer-literal (#\0) decimal-integer-literal-0 + (integer-value 0)) + (production :decimal-integer-literal (:non-zero-decimal-digits) decimal-integer-literal-nonzero + (integer-value (integer-value :non-zero-decimal-digits))) + + (declare-action integer-value :non-zero-decimal-digits integer) + (production :non-zero-decimal-digits (:non-zero-digit) non-zero-decimal-digits-first + (integer-value (decimal-value :non-zero-digit))) + (production :non-zero-decimal-digits (:non-zero-decimal-digits :decimal-digit) non-zero-decimal-digits-rest + (integer-value (+ (* 10 (integer-value :non-zero-decimal-digits)) (decimal-value :decimal-digit)))) + + (%charclass :non-zero-digit) + + (declare-action rational-value :fraction rational) + (production :fraction (:decimal-digits) fraction-decimal-digits + (rational-value (rational/ (integer-to-rational (integer-value :decimal-digits)) + (expt (integer-to-rational 10) (n-digits :decimal-digits))))) + (%print-actions) + + (declare-action integer-value :exponent integer) + (production :exponent () exponent-none + (integer-value 0)) + (production :exponent (:exponent-indicator :signed-integer) exponent-integer + (integer-value (integer-value :signed-integer))) + (%charclass :exponent-indicator) + + (declare-action integer-value :signed-integer integer) + (production :signed-integer (:decimal-digits) signed-integer-no-sign + (integer-value (integer-value :decimal-digits))) + (production :signed-integer (#\+ :decimal-digits) signed-integer-plus + (integer-value (integer-value :decimal-digits))) + (production :signed-integer (#\- :decimal-digits) signed-integer-minus + (integer-value (neg (integer-value :decimal-digits)))) + (%print-actions) + + (declare-action integer-value :decimal-digits integer) + (declare-action n-digits :decimal-digits integer) + (production :decimal-digits (:decimal-digit) decimal-digits-first + (integer-value (decimal-value :decimal-digit)) + (n-digits 1)) + (production :decimal-digits (:decimal-digits :decimal-digit) decimal-digits-rest + (integer-value (+ (* 10 (integer-value :decimal-digits)) (decimal-value :decimal-digit))) + (n-digits (+ (n-digits :decimal-digits) 1))) + (%print-actions) + + (declare-action integer-value :hex-integer-literal integer) + (production :hex-integer-literal (#\0 :hex-indicator :hex-digit) hex-integer-literal-first + (integer-value (hex-value :hex-digit))) + (production :hex-integer-literal (:hex-integer-literal :hex-digit) hex-integer-literal-rest + (integer-value (+ (* 16 (integer-value :hex-integer-literal)) (hex-value :hex-digit)))) + (%charclass :hex-indicator) + (%charclass :hex-digit) + + (declare-action integer-value :octal-integer-literal integer) + (production :octal-integer-literal (#\0 :octal-digit) octal-integer-literal-first + (integer-value (octal-value :octal-digit))) + (production :octal-integer-literal (:octal-integer-literal :octal-digit) octal-integer-literal-rest + (integer-value (+ (* 8 (integer-value :octal-integer-literal)) (octal-value :octal-digit)))) + (%charclass :octal-digit) + (%print-actions) + + (%section "String literals") + + (grammar-argument :quote single double) + (declare-action string-value :string-literal string) + (production :string-literal (#\' (:string-chars single) #\') string-literal-single + (string-value (string-value :string-chars))) + (production :string-literal (#\" (:string-chars double) #\") string-literal-double + (string-value (string-value :string-chars))) + (%print-actions) + + (declare-action string-value (:string-chars :quote) string) + (production (:string-chars :quote) ((:ordinary-string-chars :quote)) string-chars-ordinary + (string-value (string-value :ordinary-string-chars))) + (production (:string-chars :quote) ((:string-chars :quote) #\\ :short-octal-escape) string-chars-short-escape + (string-value (append (string-value :string-chars) + (vector (character-value :short-octal-escape))))) + + (declare-action string-value (:ordinary-string-chars :quote) string) + (production (:ordinary-string-chars :quote) () ordinary-string-chars-empty + (string-value "")) + (production (:ordinary-string-chars :quote) ((:string-chars :quote) :plain-string-char) ordinary-string-chars-char + (string-value (append (string-value :string-chars) + (vector (character-value :plain-string-char))))) + (production (:ordinary-string-chars :quote) ((:string-chars :quote) (:plain-string-quote :quote)) ordinary-string-chars-quote + (string-value (append (string-value :string-chars) + (vector (character-value :plain-string-quote))))) + (production (:ordinary-string-chars :quote) ((:ordinary-string-chars :quote) :octal-digit) ordinary-string-chars-octal + (string-value (append (string-value :ordinary-string-chars) + (vector (character-value :octal-digit))))) + (production (:ordinary-string-chars :quote) ((:string-chars :quote) #\\ :ordinary-escape) ordinary-string-chars-escape + (string-value (append (string-value :string-chars) + (vector (character-value :ordinary-escape))))) + + (%charclass :plain-string-char) + + (declare-action character-value (:plain-string-quote :quote) character) + (production (:plain-string-quote single) (#\") plain-string-quote-single + (character-value #\")) + (production (:plain-string-quote double) (#\') plain-string-quote-double + (character-value #\')) + (%print-actions) + + (declare-action character-value :ordinary-escape character) + (production :ordinary-escape (:string-char-escape) ordinary-escape-character + (character-value (character-value :string-char-escape))) + (production :ordinary-escape (:full-octal-escape) ordinary-escape-full-octal + (character-value (character-value :full-octal-escape))) + (production :ordinary-escape (:hex-escape) ordinary-escape-hex + (character-value (character-value :hex-escape))) + (production :ordinary-escape (:unicode-escape) ordinary-escape-unicode + (character-value (character-value :unicode-escape))) + (production :ordinary-escape (:string-non-escape) ordinary-escape-non-escape + (character-value (character-value :string-non-escape))) + (%charclass :string-non-escape) + (%print-actions) + + (declare-action character-value :string-char-escape character) + (production :string-char-escape (#\') string-char-escape-single-quote (character-value #\')) + (production :string-char-escape (#\") string-char-escape-double-quote (character-value #\")) + (production :string-char-escape (#\\) string-char-escape-backslash (character-value #\\)) + (production :string-char-escape (#\b) string-char-escape-backspace (character-value #?0008)) + (production :string-char-escape (#\f) string-char-escape-form-feed (character-value #?000C)) + (production :string-char-escape (#\n) string-char-escape-new-line (character-value #?000A)) + (production :string-char-escape (#\r) string-char-escape-return (character-value #?000D)) + (production :string-char-escape (#\t) string-char-escape-tab (character-value #?0009)) + (production :string-char-escape (#\v) string-char-escape-vertical-tab (character-value #?000B)) + (%print-actions) + + (declare-action character-value :short-octal-escape character) + (production :short-octal-escape (:octal-digit) short-octal-escape-1 + (character-value (code-to-character (octal-value :octal-digit)))) + (production :short-octal-escape (:zero-to-three :octal-digit) short-octal-escape-2 + (character-value (code-to-character (+ (* 8 (octal-value :zero-to-three)) + (octal-value :octal-digit))))) + + (declare-action character-value :full-octal-escape character) + (production :full-octal-escape (:four-to-seven :octal-digit) full-octal-escape-2 + (character-value (code-to-character (+ (* 8 (octal-value :four-to-seven)) + (octal-value :octal-digit))))) + (production :full-octal-escape (:zero-to-three :octal-digit :octal-digit) full-octal-escape-3 + (character-value (code-to-character (+ (+ (* 64 (octal-value :zero-to-three)) + (* 8 (octal-value :octal-digit 1))) + (octal-value :octal-digit 2))))) + (%charclass :zero-to-three) + (%charclass :four-to-seven) + + (declare-action character-value :hex-escape character) + (production :hex-escape (#\x :hex-digit :hex-digit) hex-escape-2 + (character-value (code-to-character (+ (* 16 (hex-value :hex-digit 1)) + (hex-value :hex-digit 2))))) + + (declare-action character-value :unicode-escape character) + (production :unicode-escape (#\u :hex-digit :hex-digit :hex-digit :hex-digit) unicode-escape-4 + (character-value (code-to-character (+ (+ (+ (* 4096 (hex-value :hex-digit 1)) + (* 256 (hex-value :hex-digit 2))) + (* 16 (hex-value :hex-digit 3))) + (hex-value :hex-digit 4))))) + (%print-actions) + + ))) + + (defparameter *ll* (world-lexer *lw* 'code-lexer)) + (defparameter *lg* (lexer-grammar *ll*)) + (set-up-lexer-metagrammar *ll*) + (defparameter *lm* (lexer-metagrammar *ll*))) + +#| +(depict-rtf-to-local-file + "ECMA Lexer Charclasses.rtf" + #'(lambda (rtf-stream) + (depict-paragraph (rtf-stream ':grammar-header) + (depict rtf-stream "Character Classes")) + (dolist (charclass (lexer-charclasses *ll*)) + (depict-charclass rtf-stream charclass)) + (depict-paragraph (rtf-stream ':grammar-header) + (depict rtf-stream "Grammar")) + (depict-grammar rtf-stream *lg*))) + +(depict-rtf-to-local-file + "ECMA Lexer.rtf" + #'(lambda (rtf-stream) + (depict-world-commands rtf-stream *lw*))) + +(depict-html-to-local-file + "ECMA Lexer.html" + #'(lambda (rtf-stream) + (depict-world-commands rtf-stream *lw*)) + "ECMA Lexer") + +(with-local-output (s "ECMA Lexer.txt") (print-lexer *ll* s) (print-grammar *lg* s)) + +(print-illegal-strings m) + +(lexer-pparse *ll* "0x20") +(lexer-pparse *ll* "2b") +(lexer-pparse *ll* " 3.75" :trace t) +(lexer-pparse *ll* "25" :trace :code) +(lexer-pmetaparse *ll* "32+abc//23e-a4*7e-2 3 id4 4ef;") +(lexer-pmetaparse *ll* "32+abc//23e-a4*7e-2 3 id4 4ef; +") +(lexer-pmetaparse *ll* "32+abc/ /23e-a4*7e-2 3 /*id4 4*-/ef; + +fjds*/y//z") +(lexer-pmetaparse *ll* "3a+in'a+b\\147\"de'\"'\"") +|# + + +; Return the ECMAScript input string as a list of tokens like: +; (($number . 3.0) + - ++ else ($string . "a+bgde") ($end)) +; Line breaks are removed. +(defun tokenize (string) + (delete + '($line-breaks) + (mapcar + #'(lambda (token-value) + (let ((token-value (car token-value))) + (ecase (car token-value) + (identifier (cons '$identifier (cdr token-value))) + ((reserved-word punctuator) (intern (string-upcase (cdr token-value)))) + (number (cons '$number (cdr token-value))) + (string (cons '$string (cdr token-value))) + (line-breaks '($line-breaks)) + (end '($end))))) + (lexer-metaparse *ll* string)) + :test #'equal)) + + diff --git a/mozilla/js/semantics/ECMA Lexer.rtf b/mozilla/js/semantics/ECMA Lexer.rtf new file mode 100644 index 00000000000..6591fac225a --- /dev/null +++ b/mozilla/js/semantics/ECMA Lexer.rtf @@ -0,0 +1,1042 @@ +{\rtf1\mac\ansicpg10000\uc1\deff0\deflang2057\deflangfe2057 +{\fonttbl{\f0\froman\fcharset256\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\f3\ftech\fcharset2\fprq2 Symbol;}{\f4\fnil\fcharset256\fprq2 Helvetica;} +{\f5\fmodern\fcharset256\fprq2 Courier New;}{\f6\fnil\fcharset256\fprq2 Palatino;} +{\f7\fscript\fcharset256\fprq2 Zapf Chancery;}{\f8\ftech\fcharset2\fprq2 Zapf Dingbats;}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; +\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0 +\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0 +\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;} +{\stylesheet{\widctlpar\fs20\lang2057\snext0 Normal;} +{\s1\qj\sa120\widctlpar\fs20\lang2057\sbasedon0\snext1 Body Text;} +{\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057\sbasedon3\snext1 heading 3;} +{\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057\sbasedon0\snext1 heading 4;} +{\s10\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext10 Grammar;} +{\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057\sbasedon0\snext12 Grammar Header;} +{\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext14 Grammar LHS;} +{\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar LHS Last;} +{\s14\fi-1260\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon10\snext14 Grammar +RHS;} +{\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon14\snext12 Grammar +RHS Last;} +{\s16\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar Argument;} +{\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext20 Semantics;} +{\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon20\snext21 Semantics Next;} +{\*\cs30\additive Default Paragraph Font;} +{\*\cs31\b\f5\cf2\lang1024\additive\sbasedon30 Character Literal;} +{\*\cs32\b0\f0\cf9\additive\sbasedon30 Character Literal Control;} +{\*\cs33\b\f6\cf10\lang1024\additive\sbasedon30 Terminal;} +{\*\cs34\b\f5\cf2\lang1024\additive\sbasedon33 Terminal Keyword;} +{\*\cs35\i\f6\cf13\lang1024\additive\sbasedon30 Nonterminal;} +{\*\cs36\i0\additive\sbasedon30 Nonterminal Attribute;} +{\*\cs37\additive\sbasedon30 Nonterminal Argument;} +{\*\cs40\b\f0\additive\sbasedon30 Semantic Keyword;} +{\*\cs41\f0\cf6\lang1024\additive\sbasedon30 Type Expression;} +{\*\cs42\scaps\f0\cf6\lang1024\additive\sbasedon41 Type Name;} +{\*\cs43\f4\cf6\lang1024\additive\sbasedon41 Field Name;} +{\*\cs44\i\f0\cf11\lang1024\additive\sbasedon30 Global Variable;} +{\*\cs45\i\f0\cf4\lang1024\additive\sbasedon30 Local Variable;} +{\*\cs46\f7\cf12\lang1024\additive\sbasedon30 Action Name;}} +\widowctrl\ftnbj\aenddoc\fet0\formshade\viewkind4\viewscale125\pgbrdrhead\pgbrdrfoot\sectd\pard +\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Comments\par\pard\plain\s11 +\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s13\fi-1440\li1800\sb120 +\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 LineComment} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024/} {\cs35\i\f6\cf13\lang1024 LineCommentCharacters}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LineCommentCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LineCommentCharacters} {\cs35\i\f6\cf13\lang1024 NonTerminator}\par\pard +\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NonTerminator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AnyCharacter} {\b except} {\cs35\i\f6\cf13\lang1024 LineTerminator}\par +{\cs35\i\f6\cf13\lang1024 SingleLineBlockComment} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024*} {\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} +{\cs31\b\f5\cf2\lang1024*} {\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs35\i\f6\cf13\lang1024 NonTerminatorOrSlash} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 PreSlashCharacters} {\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PreSlashCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} +{\cs35\i\f6\cf13\lang1024 NonTerminatorOrAsteriskOrSlash}\par\pard\plain\s15\fi-1260\li1800\sa120 +\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 PreSlashCharacters} +{\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NonTerminatorOrSlash} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonTerminator} {\b except} {\cs31\b\f5\cf2\lang1024/}\par +{\cs35\i\f6\cf13\lang1024 NonTerminatorOrAsteriskOrSlash} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonTerminator} {\b except} {\cs31\b\f5\cf2\lang1024*} | +{\cs31\b\f5\cf2\lang1024/}\par{\cs35\i\f6\cf13\lang1024 MultiLineBlockComment} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024*} {\cs35\i\f6\cf13\lang1024 MultiLineBlockCommentCharacters} +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs31\b\f5\cf2\lang1024*} +{\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 MultiLineBlockCommentCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs35\i\f6\cf13\lang1024 LineTerminator}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MultiLineBlockCommentCharacters} +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs35\i\f6\cf13\lang1024 LineTerminator}\par\pard +\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 White space\par\pard\plain\s11 +\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120 +\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 WhiteSpace} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 WhiteSpace} {\cs35\i\f6\cf13\lang1024 WhiteSpaceCharacter}\par\pard\plain +\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 WhiteSpace} {\cs35\i\f6\cf13\lang1024 SingleLineBlockComment}\par\pard +\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 WhiteSpaceCharacter} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7TAB\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7VT\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7FF\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7SP\u187\'C8}\par\pard\plain\s2\sa60\keep\keepn +\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Line breaks\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 LineBreak} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LineTerminator}\par|\tab{\cs35\i\f6\cf13\lang1024 LineComment} +{\cs35\i\f6\cf13\lang1024 LineTerminator}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 MultiLineBlockComment}\par\pard\plain +\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LineTerminator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7LF\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7CR\u187\'C8}\par\pard\plain\s12\fi-1440\li1800\sb120 +\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 LineBreaks} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 LineBreak} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LineBreaks} {\cs35\i\f6\cf13\lang1024 WhiteSpace} +{\cs35\i\f6\cf13\lang1024 LineBreak}\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b +\fs24\lang2057 Tokens\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax +\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NextToken} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 WhiteSpace} {\cs35\i\f6\cf13\lang1024 Token}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 LineBreaks} +\par|\tab{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord}\par|\tab +{\cs35\i\f6\cf13\lang1024 Punctuator}\par|\tab{\cs35\i\f6\cf13\lang1024 NumericLiteral}\par|\tab +{\cs35\i\f6\cf13\lang1024 StringLiteral}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 EndOfInput}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 EndOfInput} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024 End}\par +\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LineComment} {\cs33\b\f6\cf10\lang1024 End}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 Token}\line = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{\line {\cs43\f4\cf6\lang1024 identifier}: +{\cs42\scaps\f0\cf6\lang1024 String};\line {\cs43\f4\cf6\lang1024 reservedWord}: +{\cs42\scaps\f0\cf6\lang1024 String};\line {\cs43\f4\cf6\lang1024 punctuator}: +{\cs42\scaps\f0\cf6\lang1024 String};\line {\cs43\f4\cf6\lang1024 number}: +{\cs42\scaps\f0\cf6\lang1024 Double};\line {\cs43\f4\cf6\lang1024 string}: +{\cs42\scaps\f0\cf6\lang1024 String};\line {\cs43\f4\cf6\lang1024 lineBreaks};\line + {\cs43\f4\cf6\lang1024 end}\}} +\par{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Token}[{\cs35\i\f6\cf13\lang1024 NextToken}] : +{\cs42\scaps\f0\cf6\lang1024 Token}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 Token}[{\cs35\i\f6\cf13\lang1024 NextToken} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 WhiteSpace} {\cs35\i\f6\cf13\lang1024 Token}] = +{\cs46\f7\cf12\lang1024 Token}[{\cs35\i\f6\cf13\lang1024 Token}]\par\pard\plain\s20\li180\sb60\sa60 +\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Token}[ +{\cs35\i\f6\cf13\lang1024 Token}] : {\cs42\scaps\f0\cf6\lang1024 Token}\par\pard\plain\s21\li540 +\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Token}[ +{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 LineBreaks}] = {\cs43\f4\cf6\lang1024 lineBreaks}\par +{\cs46\f7\cf12\lang1024 Token}[{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord}] = {\cs46\f7\cf12\lang1024 Token}[ +{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord}]\par{\cs46\f7\cf12\lang1024 Token}[ +{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Punctuator}] = {\cs43\f4\cf6\lang1024 punctuator} +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator}]\par +{\cs46\f7\cf12\lang1024 Token}[{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NumericLiteral}] = {\cs43\f4\cf6\lang1024 number} +{\cs46\f7\cf12\lang1024 DoubleValue}[{\cs35\i\f6\cf13\lang1024 NumericLiteral}]\par +{\cs46\f7\cf12\lang1024 Token}[{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 StringLiteral}] = {\cs43\f4\cf6\lang1024 string} +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringLiteral}]\par +{\cs46\f7\cf12\lang1024 Token}[{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 EndOfInput}] = {\cs43\f4\cf6\lang1024 end}\par\pard\plain\s2\sa60\keep +\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Keywords\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 IdentifierLetter}\par|\tab{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\cs35\i\f6\cf13\lang1024 IdentifierLetter}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 IdentifierLetter} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 A} | +{\cs31\b\f5\cf2\lang1024 B} | {\cs31\b\f5\cf2\lang1024 C} | {\cs31\b\f5\cf2\lang1024 D} | +{\cs31\b\f5\cf2\lang1024 E} | {\cs31\b\f5\cf2\lang1024 F} | {\cs31\b\f5\cf2\lang1024 G} | +{\cs31\b\f5\cf2\lang1024 H} | {\cs31\b\f5\cf2\lang1024 I} | {\cs31\b\f5\cf2\lang1024 J} | +{\cs31\b\f5\cf2\lang1024 K} | {\cs31\b\f5\cf2\lang1024 L} | {\cs31\b\f5\cf2\lang1024 M} | +{\cs31\b\f5\cf2\lang1024 N} | {\cs31\b\f5\cf2\lang1024 O} | {\cs31\b\f5\cf2\lang1024 P} | +{\cs31\b\f5\cf2\lang1024 Q} | {\cs31\b\f5\cf2\lang1024 R} | {\cs31\b\f5\cf2\lang1024 S} | +{\cs31\b\f5\cf2\lang1024 T} | {\cs31\b\f5\cf2\lang1024 U} | {\cs31\b\f5\cf2\lang1024 V} | +{\cs31\b\f5\cf2\lang1024 W} | {\cs31\b\f5\cf2\lang1024 X} | {\cs31\b\f5\cf2\lang1024 Y} | +{\cs31\b\f5\cf2\lang1024 Z}\par|\tab{\cs31\b\f5\cf2\lang1024 a} | {\cs31\b\f5\cf2\lang1024 b} | +{\cs31\b\f5\cf2\lang1024 c} | {\cs31\b\f5\cf2\lang1024 d} | {\cs31\b\f5\cf2\lang1024 e} | +{\cs31\b\f5\cf2\lang1024 f} | {\cs31\b\f5\cf2\lang1024 g} | {\cs31\b\f5\cf2\lang1024 h} | +{\cs31\b\f5\cf2\lang1024 i} | {\cs31\b\f5\cf2\lang1024 j} | {\cs31\b\f5\cf2\lang1024 k} | +{\cs31\b\f5\cf2\lang1024 l} | {\cs31\b\f5\cf2\lang1024 m} | {\cs31\b\f5\cf2\lang1024 n} | +{\cs31\b\f5\cf2\lang1024 o} | {\cs31\b\f5\cf2\lang1024 p} | {\cs31\b\f5\cf2\lang1024 q} | +{\cs31\b\f5\cf2\lang1024 r} | {\cs31\b\f5\cf2\lang1024 s} | {\cs31\b\f5\cf2\lang1024 t} | +{\cs31\b\f5\cf2\lang1024 u} | {\cs31\b\f5\cf2\lang1024 v} | {\cs31\b\f5\cf2\lang1024 w} | +{\cs31\b\f5\cf2\lang1024 x} | {\cs31\b\f5\cf2\lang1024 y} | {\cs31\b\f5\cf2\lang1024 z}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs31\b\f5\cf2\lang1024$} | {\cs31\b\f5\cf2\lang1024_}\par\pard\plain\s13\fi-1440\li1800\sb120 +\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 DecimalDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | +{\cs31\b\f5\cf2\lang1024 4} | {\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | +{\cs31\b\f5\cf2\lang1024 7} | {\cs31\b\f5\cf2\lang1024 8} | {\cs31\b\f5\cf2\lang1024 9}\par\pard +\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Name}[ +{\cs35\i\f6\cf13\lang1024 IdentifierName}] : {\cs42\scaps\f0\cf6\lang1024 String}\par\pard\plain\s21 +\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Name}[ +{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 IdentifierLetter}] = {\b[}{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 IdentifierLetter}]{\b]}\par{\cs46\f7\cf12\lang1024 Name}[ +{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 IdentifierName\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 IdentifierLetter}] +\line = {\cs46\f7\cf12\lang1024 Name}[{\cs35\i\f6\cf13\lang1024 IdentifierName\b0\i0\sub 1}] +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 IdentifierLetter}]{\b]}\par +{\cs46\f7\cf12\lang1024 Name}[{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 IdentifierName\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 DecimalDigit}]\line + = {\cs46\f7\cf12\lang1024 Name}[{\cs35\i\f6\cf13\lang1024 IdentifierName\b0\i0\sub 1}] +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 DecimalDigit}]{\b]}\par\pard\plain +\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 IdentifierLetter}] : +{\cs42\scaps\f0\cf6\lang1024 Character} = {\cs35\i\f6\cf13\lang1024 IdentifierLetter}\par +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 DecimalDigit}] + : {\cs42\scaps\f0\cf6\lang1024 Character} = {\cs35\i\f6\cf13\lang1024 DecimalDigit}\par +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 DigitValue}[{\cs35\i\f6\cf13\lang1024 DecimalDigit}] : +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 digitValue}( +{\cs35\i\f6\cf13\lang1024 DecimalDigit})\par{\cs44\i\f0\cf11\lang1024 keywords} : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 String}[]}\line = {\b[}\ldblquote +{\cs31\b\f5\cf2\lang1024 break}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 case} +\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 catch}\rdblquote,\line \ldblquote +{\cs31\b\f5\cf2\lang1024 continue}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 default} +\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 delete}\rdblquote,\line \ldblquote +{\cs31\b\f5\cf2\lang1024 do}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 else} +\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 finally}\rdblquote,\line \ldblquote +{\cs31\b\f5\cf2\lang1024 for}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 function} +\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 if}\rdblquote,\line \ldblquote +{\cs31\b\f5\cf2\lang1024 in}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 new}\rdblquote +,\line \ldblquote{\cs31\b\f5\cf2\lang1024 return}\rdblquote,\line \ldblquote +{\cs31\b\f5\cf2\lang1024 switch}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 this} +\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 throw}\rdblquote,\line \ldblquote +{\cs31\b\f5\cf2\lang1024 try}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 typeof} +\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 var}\rdblquote,\line \ldblquote +{\cs31\b\f5\cf2\lang1024 void}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 while} +\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 with}\rdblquote{\b]}\par +{\cs44\i\f0\cf11\lang1024 futureReservedWords} : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 String}[]}\line = {\b[}\ldblquote +{\cs31\b\f5\cf2\lang1024 class}\rdblquote, \ldblquote{\cs31\b\f5\cf2\lang1024 const}\rdblquote, +\ldblquote{\cs31\b\f5\cf2\lang1024 debugger}\rdblquote, \ldblquote{\cs31\b\f5\cf2\lang1024 enum} +\rdblquote, \ldblquote{\cs31\b\f5\cf2\lang1024 export}\rdblquote, \ldblquote +{\cs31\b\f5\cf2\lang1024 extends}\rdblquote, \ldblquote{\cs31\b\f5\cf2\lang1024 import}\rdblquote, +\ldblquote{\cs31\b\f5\cf2\lang1024 super}\rdblquote{\b]}\par{\cs44\i\f0\cf11\lang1024 literals} : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 String}[]} = {\b[}\ldblquote +{\cs31\b\f5\cf2\lang1024 null}\rdblquote, \ldblquote{\cs31\b\f5\cf2\lang1024 true}\rdblquote, +\ldblquote{\cs31\b\f5\cf2\lang1024 false}\rdblquote{\b]}\par{\cs44\i\f0\cf11\lang1024 reservedWords} + : {\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 String}[]} = +{\cs44\i\f0\cf11\lang1024 keywords} +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} +{\cs44\i\f0\cf11\lang1024 futureReservedWords} +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} +{\cs44\i\f0\cf11\lang1024 literals}\par{\cs44\i\f0\cf11\lang1024 member}( +{\cs45\i\f0\cf4\lang1024 id}: {\cs42\scaps\f0\cf6\lang1024 String}, {\cs45\i\f0\cf4\lang1024 list}: +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 String}[]}) : +{\cs42\scaps\f0\cf6\lang1024 Boolean}\line = {\cs40\b\f0 if} {\cs44\i\f0\cf11\lang1024 empty}( +{\cs45\i\f0\cf4\lang1024 list})\line {\cs40\b\f0 then} {\cs44\i\f0\cf11\lang1024 false}\line + {\cs40\b\f0 else} {\cs40\b\f0 let} {\cs45\i\f0\cf4\lang1024 s}: +{\cs42\scaps\f0\cf6\lang1024 String} = {\cs44\i\f0\cf11\lang1024 first}( +{\cs45\i\f0\cf4\lang1024 list})\line {\cs40\b\f0 in} {\cs40\b\f0 if} +{\cs44\i\f0\cf11\lang1024 stringEqual}({\cs45\i\f0\cf4\lang1024 id}, {\cs45\i\f0\cf4\lang1024 s}) +\line {\cs40\b\f0 then} {\cs44\i\f0\cf11\lang1024 true}\line +{\cs40\b\f0 else} {\cs44\i\f0\cf11\lang1024 member}({\cs45\i\f0\cf4\lang1024 id}, +{\cs44\i\f0\cf11\lang1024 rest}({\cs45\i\f0\cf4\lang1024 list}))\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 IdentifierName}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b +\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Token}[ +{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord}] : {\cs42\scaps\f0\cf6\lang1024 Token}\par\pard +\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Token}[ +{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 IdentifierName}]\line = {\cs40\b\f0 let} {\cs45\i\f0\cf4\lang1024 id}: +{\cs42\scaps\f0\cf6\lang1024 String} = {\cs46\f7\cf12\lang1024 Name}[ +{\cs35\i\f6\cf13\lang1024 IdentifierName}]\line {\cs40\b\f0 in} {\cs40\b\f0 if} +{\cs44\i\f0\cf11\lang1024 member}({\cs45\i\f0\cf4\lang1024 id}, +{\cs44\i\f0\cf11\lang1024 reservedWords})\line {\cs40\b\f0 then} +{\cs43\f4\cf6\lang1024 reservedWord} {\cs45\i\f0\cf4\lang1024 id}\line {\cs40\b\f0 else} +{\cs43\f4\cf6\lang1024 identifier} {\cs45\i\f0\cf4\lang1024 id}\par\pard\plain\s2\sa60\keep\keepn +\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Punctuators\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024<}\par|\tab{\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024=} {\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024!} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024!} {\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024,}\par|\tab{\cs31\b\f5\cf2\lang1024!}\par +|\tab{\cs31\b\f5\cf2\lang1024~}\par|\tab{\cs31\b\f5\cf2\lang1024?}\par|\tab +{\cs31\b\f5\cf2\lang1024:}\par|\tab{\cs31\b\f5\cf2\lang1024.}\par|\tab{\cs31\b\f5\cf2\lang1024&} +{\cs31\b\f5\cf2\lang1024&}\par|\tab{\cs31\b\f5\cf2\lang1024|} {\cs31\b\f5\cf2\lang1024|}\par|\tab +{\cs31\b\f5\cf2\lang1024 +} {\cs31\b\f5\cf2\lang1024 +}\par|\tab{\cs31\b\f5\cf2\lang1024 -} +{\cs31\b\f5\cf2\lang1024 -}\par|\tab{\cs31\b\f5\cf2\lang1024 +}\par|\tab{\cs31\b\f5\cf2\lang1024 -} +\par|\tab{\cs31\b\f5\cf2\lang1024*}\par|\tab{\cs31\b\f5\cf2\lang1024/}\par|\tab +{\cs31\b\f5\cf2\lang1024&}\par|\tab{\cs31\b\f5\cf2\lang1024|}\par|\tab{\cs31\b\f5\cf2\lang1024^}\par +|\tab{\cs31\b\f5\cf2\lang1024%}\par|\tab{\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024<}\par| +\tab{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024 +} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024 -} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024*} {\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024&} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024|} {\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024^} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024%} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024(}\par|\tab{\cs31\b\f5\cf2\lang1024)}\par +|\tab{\cs31\b\f5\cf2\lang1024\{}\par|\tab{\cs31\b\f5\cf2\lang1024\}}\par|\tab +{\cs31\b\f5\cf2\lang1024[}\par|\tab{\cs31\b\f5\cf2\lang1024]}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024;}\par\pard\plain +\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60 +\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Punctuator} +[{\cs35\i\f6\cf13\lang1024 Punctuator}] : {\cs42\scaps\f0\cf6\lang1024 String}\par\pard\plain\s21 +\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024=}] = +\ldblquote{\cs31\b\f5\cf2\lang1024=}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024>}] = +\ldblquote{\cs31\b\f5\cf2\lang1024>}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024<}] = +\ldblquote{\cs31\b\f5\cf2\lang1024<}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024==}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=} {\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024===} +\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024<} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024<=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024>=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024!} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024!=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024!} +{\cs31\b\f5\cf2\lang1024=} {\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024!==} +\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024,}] = +\ldblquote{\cs31\b\f5\cf2\lang1024,}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024!}] = +\ldblquote{\cs31\b\f5\cf2\lang1024!}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024~}] = +\ldblquote{\cs31\b\f5\cf2\lang1024~}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024?}] = +\ldblquote{\cs31\b\f5\cf2\lang1024?}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024:}] = +\ldblquote{\cs31\b\f5\cf2\lang1024:}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024.}] = +\ldblquote{\cs31\b\f5\cf2\lang1024.}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024&} +{\cs31\b\f5\cf2\lang1024&}] = \ldblquote{\cs31\b\f5\cf2\lang1024&&}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024|} +{\cs31\b\f5\cf2\lang1024|}] = \ldblquote{\cs31\b\f5\cf2\lang1024||}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 +} +{\cs31\b\f5\cf2\lang1024 +}] = \ldblquote{\cs31\b\f5\cf2\lang1024 ++}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 -} +{\cs31\b\f5\cf2\lang1024 -}] = \ldblquote{\cs31\b\f5\cf2\lang1024 --}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 +}] = + \ldblquote{\cs31\b\f5\cf2\lang1024 +}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 -}] = + \ldblquote{\cs31\b\f5\cf2\lang1024 -}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024*}] = +\ldblquote{\cs31\b\f5\cf2\lang1024*}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/}] = +\ldblquote{\cs31\b\f5\cf2\lang1024/}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024&}] = +\ldblquote{\cs31\b\f5\cf2\lang1024&}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024|}] = +\ldblquote{\cs31\b\f5\cf2\lang1024|}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024^}] = +\ldblquote{\cs31\b\f5\cf2\lang1024^}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024%}] = +\ldblquote{\cs31\b\f5\cf2\lang1024%}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024<} +{\cs31\b\f5\cf2\lang1024<}] = \ldblquote{\cs31\b\f5\cf2\lang1024<<}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024>}] = \ldblquote{\cs31\b\f5\cf2\lang1024>>}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>}] = \ldblquote{\cs31\b\f5\cf2\lang1024>>>} +\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 +} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024 +=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 -} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024 -=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024*} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024*=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024/=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024&} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024&=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024|} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024|=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024^} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024^=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024%} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024%=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024<} +{\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024<<=} +\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024>>=} +\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024=}] = \ldblquote +{\cs31\b\f5\cf2\lang1024>>>=}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024(}] = +\ldblquote{\cs31\b\f5\cf2\lang1024(}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024)}] = +\ldblquote{\cs31\b\f5\cf2\lang1024)}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024\{}] = + \ldblquote{\cs31\b\f5\cf2\lang1024\{}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024\}}] = + \ldblquote{\cs31\b\f5\cf2\lang1024\}}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024[}] = +\ldblquote{\cs31\b\f5\cf2\lang1024[}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024]}] = +\ldblquote{\cs31\b\f5\cf2\lang1024]}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024;}] = +\ldblquote{\cs31\b\f5\cf2\lang1024;}\rdblquote\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar +\hyphpar0\level3\b\fs24\lang2057 Numeric literals\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar +\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NumericLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalLiteral}\par|\tab{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral}\par +\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar +\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 DoubleValue}[ +{\cs35\i\f6\cf13\lang1024 NumericLiteral}] : {\cs42\scaps\f0\cf6\lang1024 Double}\par\pard\plain\s21 +\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 DoubleValue}[ +{\cs35\i\f6\cf13\lang1024 NumericLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalLiteral}]\line = {\cs44\i\f0\cf11\lang1024 rationalToDouble}( +{\cs46\f7\cf12\lang1024 RationalValue}[{\cs35\i\f6\cf13\lang1024 DecimalLiteral}])\par +{\cs46\f7\cf12\lang1024 DoubleValue}[{\cs35\i\f6\cf13\lang1024 NumericLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral}]\line = {\cs44\i\f0\cf11\lang1024 rationalToDouble}( +{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral}])\par +{\cs46\f7\cf12\lang1024 DoubleValue}[{\cs35\i\f6\cf13\lang1024 NumericLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral}]\line = {\cs44\i\f0\cf11\lang1024 rationalToDouble} +({\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral}])\par\pard +\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs44\i\f0\cf11\lang1024 expt}( +{\cs45\i\f0\cf4\lang1024 base}: {\cs42\scaps\f0\cf6\lang1024 Rational}, +{\cs45\i\f0\cf4\lang1024 exponent}: {\cs42\scaps\f0\cf6\lang1024 Integer}) : +{\cs42\scaps\f0\cf6\lang1024 Rational}\line = {\cs40\b\f0 if} {\cs45\i\f0\cf4\lang1024 exponent} = + 0\line {\cs40\b\f0 then} 1\line {\cs40\b\f0 else} {\cs40\b\f0 if} +{\cs45\i\f0\cf4\lang1024 exponent} < 0\line {\cs40\b\f0 then} 1/{\cs44\i\f0\cf11\lang1024 expt} +({\cs45\i\f0\cf4\lang1024 base}, \endash{\cs45\i\f0\cf4\lang1024 exponent})\line +{\cs40\b\f0 else} {\cs45\i\f0\cf4\lang1024 base}*{\cs44\i\f0\cf11\lang1024 expt}( +{\cs45\i\f0\cf4\lang1024 base}, {\cs45\i\f0\cf4\lang1024 exponent} \endash 1)\par\pard\plain\s11 +\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s13\fi-1440\li1800\sb120 +\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 DecimalLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Mantissa} {\cs35\i\f6\cf13\lang1024 Exponent}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Mantissa} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral}\par|\tab +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} {\cs31\b\f5\cf2\lang1024.}\par|\tab +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} {\cs31\b\f5\cf2\lang1024.} +{\cs35\i\f6\cf13\lang1024 Fraction}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024.} {\cs35\i\f6\cf13\lang1024 Fraction}\par\pard +\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 0}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 NonZeroDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NonZeroDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 1} | +{\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | {\cs31\b\f5\cf2\lang1024 4} | +{\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | {\cs31\b\f5\cf2\lang1024 7} | +{\cs31\b\f5\cf2\lang1024 8} | {\cs31\b\f5\cf2\lang1024 9}\par{\cs35\i\f6\cf13\lang1024 Fraction} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b +\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 RationalValue}[{\cs35\i\f6\cf13\lang1024 DecimalLiteral} +] : {\cs42\scaps\f0\cf6\lang1024 Rational}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs46\f7\cf12\lang1024 RationalValue}[{\cs35\i\f6\cf13\lang1024 DecimalLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Mantissa} {\cs35\i\f6\cf13\lang1024 Exponent}]\line = +{\cs46\f7\cf12\lang1024 RationalValue}[{\cs35\i\f6\cf13\lang1024 Mantissa}]* +{\cs44\i\f0\cf11\lang1024 expt}(10, {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 Exponent}])\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 RationalValue}[ +{\cs35\i\f6\cf13\lang1024 Mantissa}] : {\cs42\scaps\f0\cf6\lang1024 Rational}\par\pard\plain\s21 +\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 RationalValue}[ +{\cs35\i\f6\cf13\lang1024 Mantissa} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral}] = {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral}]\par{\cs46\f7\cf12\lang1024 RationalValue}[ +{\cs35\i\f6\cf13\lang1024 Mantissa} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} {\cs31\b\f5\cf2\lang1024.}] = +{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral}]\par +{\cs46\f7\cf12\lang1024 RationalValue}[{\cs35\i\f6\cf13\lang1024 Mantissa} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} {\cs31\b\f5\cf2\lang1024.} +{\cs35\i\f6\cf13\lang1024 Fraction}]\line = {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral}] + {\cs46\f7\cf12\lang1024 RationalValue}[ +{\cs35\i\f6\cf13\lang1024 Fraction}]\par{\cs46\f7\cf12\lang1024 RationalValue}[ +{\cs35\i\f6\cf13\lang1024 Mantissa} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024.} +{\cs35\i\f6\cf13\lang1024 Fraction}] = {\cs46\f7\cf12\lang1024 RationalValue}[ +{\cs35\i\f6\cf13\lang1024 Fraction}]\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral}] : {\cs42\scaps\f0\cf6\lang1024 Integer}\par\pard +\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0}] = + 0\par{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits}]\line = {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits}]\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits}] : {\cs42\scaps\f0\cf6\lang1024 Integer}\par\pard +\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonZeroDigit}] = {\cs46\f7\cf12\lang1024 DecimalValue}[ +{\cs35\i\f6\cf13\lang1024 NonZeroDigit}]\par{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 DecimalDigit}] +\line = 10*{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits\b0\i0\sub 1}] + {\cs46\f7\cf12\lang1024 DecimalValue} +[{\cs35\i\f6\cf13\lang1024 DecimalDigit}]\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 DigitValue}[ +{\cs35\i\f6\cf13\lang1024 NonZeroDigit}] : {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 digitValue}({\cs35\i\f6\cf13\lang1024 NonZeroDigit})\par +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 RationalValue}[{\cs35\i\f6\cf13\lang1024 Fraction}] : +{\cs42\scaps\f0\cf6\lang1024 Rational}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 RationalValue}[{\cs35\i\f6\cf13\lang1024 Fraction} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}]\line = {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits}]/{\cs44\i\f0\cf11\lang1024 expt}(10, +{\cs46\f7\cf12\lang1024 NDigits}[{\cs35\i\f6\cf13\lang1024 DecimalDigits}])\par\pard\plain\s11\sb60 +\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 Exponent} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ExponentIndicator} {\cs35\i\f6\cf13\lang1024 SignedInteger}\par\pard\plain +\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ExponentIndicator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 E} | +{\cs31\b\f5\cf2\lang1024 e}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 SignedInteger} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par|\tab{\cs31\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024 -} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b +\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 Exponent}] : +{\cs42\scaps\f0\cf6\lang1024 Integer}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 Exponent} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \u171\'C7empty\u187\'C8] = 0 +\par{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 Exponent} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ExponentIndicator} {\cs35\i\f6\cf13\lang1024 SignedInteger}] = +{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 SignedInteger}]\par\pard\plain\s20 +\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 SignedInteger}] : +{\cs42\scaps\f0\cf6\lang1024 Integer}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 SignedInteger} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}] = {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits}]\par{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 SignedInteger} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}] = {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits}]\par{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 SignedInteger} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 -} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}] = \endash{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits}]\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b +\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b +\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 DecimalDigits}] +: {\cs42\scaps\f0\cf6\lang1024 Integer}\par{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 NDigits}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits}] : {\cs42\scaps\f0\cf6\lang1024 Integer}\par\pard\plain\s21 +\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}] = {\cs46\f7\cf12\lang1024 DecimalValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigit}]\par{\cs46\f7\cf12\lang1024 NDigits}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}] = 1\par{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigits\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 DecimalDigit}]\line + = 10*{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 DecimalDigits\b0\i0\sub 1}] + +{\cs46\f7\cf12\lang1024 DecimalValue}[{\cs35\i\f6\cf13\lang1024 DecimalDigit}]\par +{\cs46\f7\cf12\lang1024 NDigits}[{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigits\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 DecimalDigit}] = +{\cs46\f7\cf12\lang1024 NDigits}[{\cs35\i\f6\cf13\lang1024 DecimalDigits\b0\i0\sub 1}] + 1\par\pard +\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 0} +{\cs35\i\f6\cf13\lang1024 HexIndicator} {\cs35\i\f6\cf13\lang1024 HexDigit}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral} {\cs35\i\f6\cf13\lang1024 HexDigit}\par\pard\plain\s13 +\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 HexIndicator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 X} | +{\cs31\b\f5\cf2\lang1024 x}\par{\cs35\i\f6\cf13\lang1024 HexDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | +{\cs31\b\f5\cf2\lang1024 4} | {\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | +{\cs31\b\f5\cf2\lang1024 7} | {\cs31\b\f5\cf2\lang1024 8} | {\cs31\b\f5\cf2\lang1024 9} | +{\cs31\b\f5\cf2\lang1024 A} | {\cs31\b\f5\cf2\lang1024 B} | {\cs31\b\f5\cf2\lang1024 C} | +{\cs31\b\f5\cf2\lang1024 D} | {\cs31\b\f5\cf2\lang1024 E} | {\cs31\b\f5\cf2\lang1024 F} | +{\cs31\b\f5\cf2\lang1024 a} | {\cs31\b\f5\cf2\lang1024 b} | {\cs31\b\f5\cf2\lang1024 c} | +{\cs31\b\f5\cf2\lang1024 d} | {\cs31\b\f5\cf2\lang1024 e} | {\cs31\b\f5\cf2\lang1024 f}\par\pard +\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 0} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 OctalDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | +{\cs31\b\f5\cf2\lang1024 4} | {\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | +{\cs31\b\f5\cf2\lang1024 7}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 +Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral}] : {\cs42\scaps\f0\cf6\lang1024 Integer}\par\pard\plain +\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} +{\cs35\i\f6\cf13\lang1024 HexIndicator} {\cs35\i\f6\cf13\lang1024 HexDigit}] = +{\cs46\f7\cf12\lang1024 HexValue}[{\cs35\i\f6\cf13\lang1024 HexDigit}]\par +{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 HexDigit}]\line + = 16*{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral\b0\i0\sub 1} +] + {\cs46\f7\cf12\lang1024 HexValue}[{\cs35\i\f6\cf13\lang1024 HexDigit}]\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 DigitValue}[{\cs35\i\f6\cf13\lang1024 HexDigit}] : +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 digitValue}( +{\cs35\i\f6\cf13\lang1024 HexDigit})\par{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral}] : {\cs42\scaps\f0\cf6\lang1024 Integer}\par\pard +\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} +{\cs35\i\f6\cf13\lang1024 OctalDigit}] = {\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit}]\par{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 OctalDigit}] +\line = 8*{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral\b0\i0\sub 1}] + {\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit}]\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit}] : {\cs42\scaps\f0\cf6\lang1024 Character} = +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 DigitValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit}] : {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 digitValue}({\cs35\i\f6\cf13\lang1024 OctalDigit})\par\pard\plain\s2\sa60 +\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 String literals\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s16\fi-1440\li1800\sb120\sa120 +\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024\cs37 Quote} +{\field{\*\fldinst SYMBOL 206 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \{ +{\cs35\i\f6\cf13\lang1024\cs36\i0 single}, {\cs35\i\f6\cf13\lang1024\cs36\i0 double}\}\par\pard +\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 StringLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024'} +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} {\cs31\b\f5\cf2\lang1024'}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs31\b\f5\cf2\lang1024"} {\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} +{\cs31\b\f5\cf2\lang1024"}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 S +emantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringLiteral}] : + {\cs42\scaps\f0\cf6\lang1024 String}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024'} +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} {\cs31\b\f5\cf2\lang1024'}] = +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single}] +\par{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024"} +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} {\cs31\b\f5\cf2\lang1024"}] = +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double}] +\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} {\cs31\b\f5\cf2\lang1024\\} +{\cs35\i\f6\cf13\lang1024 ShortOctalEscape}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} {\cs35\i\f6\cf13\lang1024 PlainStringChar} +\par|\tab{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs37 Quote}\par|\tab +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} +{\cs31\b\f5\cf2\lang1024\\} {\cs35\i\f6\cf13\lang1024 OrdinaryEscape}\par\pard\plain\s13\fi-1440 +\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PlainStringChar} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AnyCharacter} {\b except} {\cs31\b\f5\cf2\lang1024'} | +{\cs31\b\f5\cf2\lang1024"} | {\cs31\b\f5\cf2\lang1024\\} | {\cs35\i\f6\cf13\lang1024 OctalDigit} | +{\cs35\i\f6\cf13\lang1024 LineTerminator}\par +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 single} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024"}\par +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 double} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024'}\par +\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20 +\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote}] : +{\cs42\scaps\f0\cf6\lang1024 String}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote}]\line = +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} +]\par{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 StringChars{\super\cs37 Quote}\b0\i0\sub 1} {\cs31\b\f5\cf2\lang1024\\} +{\cs35\i\f6\cf13\lang1024 ShortOctalEscape}]\line = {\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 StringChars{\super\cs37 Quote}\b0\i0\sub 1}] +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 ShortOctalEscape}]{\b]}\par\pard +\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} +] : {\cs42\scaps\f0\cf6\lang1024 String}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \u171\'C7empty\u187\'C8] = +\ldblquote\rdblquote\par{\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} {\cs35\i\f6\cf13\lang1024 PlainStringChar}] +\line = {\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote}] +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 PlainStringChar}]{\b]}\par +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs37 Quote}]\line = +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote}] +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs37 Quote} +]{\b]}\par{\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars{\super\cs37 Quote}\b0\i0\sub 1} +{\cs35\i\f6\cf13\lang1024 OctalDigit}]\line = {\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars{\super\cs37 Quote}\b0\i0\sub 1}] +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 OctalDigit}]{\b]}\par +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} {\cs31\b\f5\cf2\lang1024\\} +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape}]\line = {\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote}] +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 OrdinaryEscape}]{\b]}\par\pard +\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 PlainStringChar}] : +{\cs42\scaps\f0\cf6\lang1024 Character} = {\cs35\i\f6\cf13\lang1024 PlainStringChar}\par +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs37 Quote}] : +{\cs42\scaps\f0\cf6\lang1024 Character}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 single} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024"}] = +\lquote{\cs31\b\f5\cf2\lang1024"}\rquote\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 double} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024'}] = +\lquote{\cs31\b\f5\cf2\lang1024'}\rquote\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b +\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 OrdinaryEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 StringCharEscape}\par|\tab{\cs35\i\f6\cf13\lang1024 FullOctalEscape}\par| +\tab{\cs35\i\f6\cf13\lang1024 HexEscape}\par|\tab{\cs35\i\f6\cf13\lang1024 UnicodeEscape}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 StringNonEscape}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 StringNonEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonTerminator} {\b except} {\cs35\i\f6\cf13\lang1024 OctalDigit} | +{\cs31\b\f5\cf2\lang1024 x} | {\cs31\b\f5\cf2\lang1024 u} | {\cs31\b\f5\cf2\lang1024'} | +{\cs31\b\f5\cf2\lang1024"} | {\cs31\b\f5\cf2\lang1024\\} | {\cs31\b\f5\cf2\lang1024 b} | +{\cs31\b\f5\cf2\lang1024 f} | {\cs31\b\f5\cf2\lang1024 n} | {\cs31\b\f5\cf2\lang1024 r} | +{\cs31\b\f5\cf2\lang1024 t} | {\cs31\b\f5\cf2\lang1024 v}\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape}] : {\cs42\scaps\f0\cf6\lang1024 Character}\par\pard\plain +\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 StringCharEscape}] = {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 StringCharEscape}]\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 FullOctalEscape}] = {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 FullOctalEscape}]\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 HexEscape}] = {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 HexEscape}]\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 UnicodeEscape}] = {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 UnicodeEscape}]\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 StringNonEscape}] = {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 StringNonEscape}]\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 StringNonEscape}] : {\cs42\scaps\f0\cf6\lang1024 Character} = +{\cs35\i\f6\cf13\lang1024 StringNonEscape}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b +\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024'}\par|\tab +{\cs31\b\f5\cf2\lang1024"}\par|\tab{\cs31\b\f5\cf2\lang1024\\}\par|\tab{\cs31\b\f5\cf2\lang1024 b} +\par|\tab{\cs31\b\f5\cf2\lang1024 f}\par|\tab{\cs31\b\f5\cf2\lang1024 n}\par|\tab +{\cs31\b\f5\cf2\lang1024 r}\par|\tab{\cs31\b\f5\cf2\lang1024 t}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024 v}\par\pard\plain +\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60 +\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 StringCharEscape}] : +{\cs42\scaps\f0\cf6\lang1024 Character}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024'}] = +\lquote{\cs31\b\f5\cf2\lang1024'}\rquote\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024"}] = +\lquote{\cs31\b\f5\cf2\lang1024"}\rquote\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024\\}] = + \lquote{\cs31\b\f5\cf2\lang1024\\}\rquote\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 b}] = + \lquote{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7BS\u187\'C8}\rquote\par +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 f}] = + \lquote{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7FF\u187\'C8}\rquote\par +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 n}] = + \lquote{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7LF\u187\'C8}\rquote\par +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 r}] = + \lquote{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7CR\u187\'C8}\rquote\par +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 t}] = + \lquote{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7TAB\u187\'C8}\rquote\par +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 v}] = + \lquote{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7VT\u187\'C8}\rquote\par\pard\plain\s11\sb60 +\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ShortOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 OctalDigit} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ZeroToThree} {\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 FullOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 FourToSeven} {\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ZeroToThree} {\cs35\i\f6\cf13\lang1024 OctalDigit} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ZeroToThree} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3}\par +{\cs35\i\f6\cf13\lang1024 FourToSeven} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 4} | +{\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | {\cs31\b\f5\cf2\lang1024 7}\par +{\cs35\i\f6\cf13\lang1024 HexEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 x} +{\cs35\i\f6\cf13\lang1024 HexDigit} {\cs35\i\f6\cf13\lang1024 HexDigit}\par +{\cs35\i\f6\cf13\lang1024 UnicodeEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 u} +{\cs35\i\f6\cf13\lang1024 HexDigit} {\cs35\i\f6\cf13\lang1024 HexDigit} +{\cs35\i\f6\cf13\lang1024 HexDigit} {\cs35\i\f6\cf13\lang1024 HexDigit}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 ShortOctalEscape}] : {\cs42\scaps\f0\cf6\lang1024 Character}\par\pard +\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 CharacterValue} +[{\cs35\i\f6\cf13\lang1024 ShortOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 OctalDigit}] = {\cs44\i\f0\cf11\lang1024 codeToCharacter}( +{\cs46\f7\cf12\lang1024 OctalValue}[{\cs35\i\f6\cf13\lang1024 OctalDigit}])\par +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 ShortOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ZeroToThree} {\cs35\i\f6\cf13\lang1024 OctalDigit}]\line = +{\cs44\i\f0\cf11\lang1024 codeToCharacter}(8*{\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 ZeroToThree}] + {\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit}])\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 FullOctalEscape}] : {\cs42\scaps\f0\cf6\lang1024 Character}\par\pard\plain +\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 FullOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 FourToSeven} {\cs35\i\f6\cf13\lang1024 OctalDigit}]\line = +{\cs44\i\f0\cf11\lang1024 codeToCharacter}(8*{\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 FourToSeven}] + {\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit}])\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 FullOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ZeroToThree} {\cs35\i\f6\cf13\lang1024 OctalDigit\b0\i0\sub 1} +{\cs35\i\f6\cf13\lang1024 OctalDigit\b0\i0\sub 2}]\line = +{\cs44\i\f0\cf11\lang1024 codeToCharacter}(\line 64*{\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 ZeroToThree}] + 8*{\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit\b0\i0\sub 1}] + {\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit\b0\i0\sub 2}])\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 DigitValue}[ +{\cs35\i\f6\cf13\lang1024 ZeroToThree}] : {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 digitValue}({\cs35\i\f6\cf13\lang1024 ZeroToThree})\par{\cs40\b\f0 action} + {\cs46\f7\cf12\lang1024 DigitValue}[{\cs35\i\f6\cf13\lang1024 FourToSeven}] : +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 digitValue}( +{\cs35\i\f6\cf13\lang1024 FourToSeven})\par{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 HexEscape}] : +{\cs42\scaps\f0\cf6\lang1024 Character}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 HexEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 x} +{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 2}] +\line = {\cs44\i\f0\cf11\lang1024 codeToCharacter}(16*{\cs46\f7\cf12\lang1024 HexValue}[ +{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 1}] + {\cs46\f7\cf12\lang1024 HexValue}[ +{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 2}])\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 UnicodeEscape}] : {\cs42\scaps\f0\cf6\lang1024 Character}\par\pard\plain +\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 UnicodeEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 u} +{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 2} +{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 3} {\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 4}] +\line = {\cs44\i\f0\cf11\lang1024 codeToCharacter}(\line 4096* +{\cs46\f7\cf12\lang1024 HexValue}[{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 1}] + 256* +{\cs46\f7\cf12\lang1024 HexValue}[{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 2}] + 16* +{\cs46\f7\cf12\lang1024 HexValue}[{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 3}] +\line +{\cs46\f7\cf12\lang1024 HexValue}[{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 4}])\par} \ No newline at end of file diff --git a/mozilla/js/semantics/Grammar.lisp b/mozilla/js/semantics/Grammar.lisp new file mode 100644 index 00000000000..c5d1cc23566 --- /dev/null +++ b/mozilla/js/semantics/Grammar.lisp @@ -0,0 +1,1183 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; LALR(1) and LR(1) grammar generator +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; ------------------------------------------------------------------------------------------------------ +;;; TERMINALSETS + +;;; A set of terminals is a bitset represented by an integer, indexed by terminal numbers. + +(deftype terminalset () 'integer) + +(defconstant *empty-terminalset* 0) + +; Return true if terminalset is empty. +(declaim (inline terminalset-empty?)) +(defun terminalset-empty? (terminalset) + (zerop terminalset)) + + +; Return true if the two terminalsets are equal. +(declaim (inline terminalset-=)) +(defun terminalset-= (terminalset1 terminalset2) + (= terminalset1 terminalset2)) + + +; Return true if the terminalset1 is a subset of (or equal to) terminalset2. +(declaim (inline terminalset-<=)) +(defun terminalset-<= (terminalset1 terminalset2) + (zerop (logandc2 terminalset1 terminalset2))) + + +; Return true if the two terminalsets are disjoint. +(declaim (inline terminalsets-disjoint)) +(defun terminalsets-disjoint (terminalset1 terminalset2) + (zerop (logand terminalset1 terminalset2))) + + +; Merge two sets of lookaheads sorted by increasing terminal numbers, eliminating +; duplicates. Return the combined set. +(declaim (inline terminalset-union)) +(defun terminalset-union (terminalset1 terminalset2) + (logior terminalset1 terminalset2)) + + +; Return a unique serial number for the given terminal. +(declaim (inline terminal-number)) +(defun terminal-number (grammar terminal) + (assert-non-null (gethash terminal (grammar-terminal-numbers grammar)) + "Can't find terminal ~S" terminal)) + + +; Return true if the terminal is present in the terminalset. +(defun terminal-in-terminalset (grammar terminal terminalset) + (logbitp (terminal-number grammar terminal) terminalset)) + + +; Return a one-element terminalset containing the given terminal. +(declaim (inline make-terminalset)) +(defun make-terminalset (grammar terminal) + (ash 1 (terminal-number grammar terminal))) + + +; Call f on every terminal in the terminalset in reverse order. +(defun map-terminalset-reverse (f grammar terminalset) + (do () + ((zerop terminalset)) + (let ((last (1- (integer-length terminalset)))) + (funcall f (svref (grammar-terminals grammar) last)) + (setq terminalset (- terminalset (ash 1 last)))))) + + +; Return a list containing the terminals in the terminalset. +(defun terminalset-list (grammar terminalset) + (let ((terminals nil)) + (map-terminalset-reverse #'(lambda (terminal) (push terminal terminals)) + grammar terminalset) + terminals)) + + +(defun print-terminalset (grammar terminalset &optional (stream t)) + (pprint-fill stream (terminalset-list grammar terminalset) nil)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; ACTIONS + +;;; An action describes one semantic function associated with a production. +;;; The action code is a lisp form that evaluates to a function f that takes +;;; the following arguments: +;;; the values returned by the rhs's first grammar symbol's actions, in order of the +;;; actions of that grammar symbol; +;;; the values returned by the rhs's second grammar symbol's actions, in order of the +;;; actions of that grammar symbol; +;;; ... +;;; the values returned by the rhs's last grammar symbol's actions, in order of the +;;; actions of that grammar symbol. +;;; Function f returns one value, which is the result of this action. +(defstruct (action (:constructor make-action (expr)) + (:predicate action?)) + (expr nil :read-only t) ;The unparsed source expression that defines the action + (code nil)) ;The generated lisp source code that performs the action + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GENERALIZED PRODUCTIONS + +;;; A general-production is a common base class for the production and generic-production classes. +(defstruct (general-production (:constructor nil) (:copier nil) (:predicate general-production?)) + (lhs nil :type general-nonterminal :read-only t) ;The general-nonterminal on the left-hand side of this general-production + (rhs nil :type list :read-only t) ;List of general grammar symbols to which that general-nonterminal expands + (name nil :read-only t)) ;This general-production's name that will be used to name the parse tree node + + +; If general-production is a generic-production, return its list of productions; +; if general-production is a production, return it in a one-element list. +(defun general-production-productions (general-production) + (if (production? general-production) + (list general-production) + (generic-production-productions general-production))) + + +; Emit a markup paragraph for the left-hand-side of a general production. +(defun depict-general-production-lhs (markup-stream lhs-general-nonterminal) + (depict-paragraph (markup-stream ':grammar-lhs) + (depict-general-nonterminal markup-stream lhs-general-nonterminal) + (depict markup-stream " " ':derives-10))) + + +; Emit a markup paragraph for the right-hand-side of a general production. +; first is true if this is the first production in a rule. +; last is true if this is the last production in a rule. +(defun depict-general-production-rhs (markup-stream general-production first last) + (depict-paragraph (markup-stream (if last ':grammar-rhs-last ':grammar-rhs)) + (if first + (depict markup-stream ':tab3) + (depict markup-stream "|" ':tab2)) + (let ((rhs (general-production-rhs general-production))) + (depict-list markup-stream #'depict-general-grammar-symbol rhs + :separator " " + :empty '(:left-angle-quote "empty" :right-angle-quote))))) + + +; Emit the general production, including both its left and right-hand sides. +; Include serial number subscripts on all rhs grammar symbols that both +; appear more than once in the rhs or appear in the lhs; and +; have symbols that are present in the symbols-with-subscripts list. +(defun depict-general-production (markup-stream general-production &optional symbols-with-subscripts) + (let ((lhs (general-production-lhs general-production)) + (rhs (general-production-rhs general-production))) + (depict-general-nonterminal markup-stream lhs) + (depict markup-stream " " ':derives-10) + (if rhs + (let ((counts-hash (make-hash-table :test *grammar-symbol-=*))) + (when symbols-with-subscripts + (dolist (symbol symbols-with-subscripts) + (setf (gethash symbol counts-hash) 0)) + (dolist (general-grammar-symbol (cons lhs rhs)) + (let ((symbol (general-grammar-symbol-symbol general-grammar-symbol))) + (when (gethash symbol counts-hash) + (incf (gethash symbol counts-hash))))) + (maphash #'(lambda (symbol count) + (assert-true (> count 0)) + (if (> count 1) + (setf (gethash symbol counts-hash) 0) + (remhash symbol counts-hash))) + counts-hash)) + (dolist (general-grammar-symbol rhs) + (let* ((symbol (general-grammar-symbol-symbol general-grammar-symbol)) + (subscript (and (gethash symbol counts-hash) (incf (gethash symbol counts-hash))))) + (depict-space markup-stream) + (depict-general-grammar-symbol markup-stream general-grammar-symbol subscript)))) + (depict markup-stream " " ':left-angle-quote "empty" :right-angle-quote)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; PRODUCTIONS + +;;; A production describes the expansion of a nonterminal (the lhs) into +;;; a string of zero or more grammar symbols (the rhs). +;;; Each production has a unique number. Earlier productions have smaller numbers. +;;; There is exactly one production structure for a given production, so eq can be +;;; used to test for production equality. +;;; +;;; The evaluator is a lisp form that evaluates to a function f that takes one argument -- +;;; the old state of the parser's value stack -- and returns the new state of that stack. +(defstruct (production (:include general-production (lhs nil :type nonterminal :read-only t)) + (:constructor make-production (lhs rhs name rhs-length number)) + (:copier nil) (:predicate production?)) + (rhs-length nil :type integer :read-only t) ;Number of grammar symbols in the rhs + (number nil :type integer :read-only t) ;This production's serial number + ;The following fields are used for the action generator. + (actions nil :type list) ;List of (action-symbol . action-or-nil) in the same order as the action-symbols + ; ; are listed in the grammar's action-signatures hash table for this lhs + (n-action-args nil :type (or null integer)) ;Total size of the action-signatures of all grammar symbols in the rhs + (evaluator-code nil) ;The lisp evaluator's source code + (evaluator nil :type (or null function))) ;The lisp evaluator of the action + + +; Return a list of terminals in this production's rhs. +; The list may contain duplicates. +(declaim (inline production-terminals)) +(defun production-terminals (production) + (remove-if (complement #'terminal?) (production-rhs production))) + + +; Return a list of nonterminals in this production's rhs. +; The list may contain duplicates. +(declaim (inline production-nonterminals)) +(defun production-nonterminals (production) + (remove-if (complement #'nonterminal?) (production-rhs production))) + + +(defun print-production (production &optional (stream t)) + (format stream "~<~W -> ~:I~_~:[ ~;~:*~{~W ~:_~}~]~:> ~:_[~W]" + (list (production-lhs production) (production-rhs production)) + (production-name production))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GENERIC PRODUCTIONS + +;;; A generic production describes a set of productions generated by instantiating a +;;; production with a generic nonterminal on the lhs. All productions in this set are +;;; generated by replacing the arguments in the lhs nonterminal with attributes and making +;;; corresponding replacements on the production's rhs. All productions in this set share +;;; the same name. Note that this set might not cover all productions with the same +;;; nonterminal symbol on the lhs because some parameters of the lhs nonterminal might be +;;; originally listed as attributes and not arguments. +;;; A generic production is not a production and does not have a number or actions. + +(defstruct (generic-production (:include general-production (lhs nil :type generic-nonterminal :read-only t)) + (:constructor make-generic-production (lhs rhs name productions)) + (:copier nil) + (:predicate generic-production?)) + (productions nil :type list :read-only t)) ;List of instantiations of this generic production + + +; Return a new generic-production or production with the given nonterminal argument replaced by the given attribute. +; If the resulting production isn't generic, an existing attributed production is returned. +(defun generic-production-substitute (grammar-parametrization attribute argument generic-production) + (let ((new-lhs (general-grammar-symbol-substitute attribute argument (generic-production-lhs generic-production))) + (productions (generic-production-productions generic-production))) + (if (generic-nonterminal? new-lhs) + (make-generic-production + new-lhs + (mapcar #'(lambda (rhs-general-grammar-symbol) + (general-grammar-symbol-substitute attribute argument rhs-general-grammar-symbol)) + (generic-production-rhs generic-production)) + (generic-production-name generic-production) + (remove-if #'(lambda (production) + (not (general-nonterminal-is-instance? grammar-parametrization new-lhs (production-lhs production)))) + productions)) + + (assert-non-null (find new-lhs productions :key #'production-lhs :test #'eq))))) + + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GENERALIZED RULES + +;;; A general-rule is a common base class for the rule and generic-rule classes. +(defstruct (general-rule (:constructor nil) (:copier nil) (:predicate general-rule?)) + (productions nil :type list)) ;The list of all general productions for this rule's general nonterminal lhs + + +; Return this rule's lhs (which is the same for all productions). +(declaim (inline general-rule-lhs)) +(defun general-rule-lhs (general-rule) + (general-production-lhs (first (general-rule-productions general-rule)))) + + +; Emit markup paragraphs for the grammar general rule. +; If the rule is short enough (only one production), emit the rule on one line. +(defun depict-general-rule (markup-stream general-rule) + (depict-block-style (markup-stream ':grammar-rule) + (let ((general-productions (general-rule-productions general-rule))) + (assert-true general-productions) + (if (cdr general-productions) + (labels + ((emit-general-productions (general-productions first) + (let ((general-production (first general-productions)) + (rest (rest general-productions))) + (depict-general-production-rhs markup-stream general-production first (endp rest)) + (when rest + (emit-general-productions rest nil))))) + (depict-general-production-lhs markup-stream (general-rule-lhs general-rule)) + (emit-general-productions general-productions t)) + (depict-paragraph (markup-stream ':grammar-lhs-last) + (depict-general-production markup-stream (first general-productions))))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; RULES + +;;; A rule is the set of all productions with the same lhs nonterminal. +;;; There is exactly one rule structure for a given nonterminal lhs, so eq can be +;;; used to test for rule equality. +(defstruct (rule (:include general-rule (productions nil :type list :read-only t)) + (:constructor make-rule (productions)) + (:copier nil) + (:predicate rule?)) + ;productions ;The list of all productions for this rule's nonterminal lhs + (number nil :type (or null integer)) ;This nonterminal's serial number + (derives-epsilon nil :type bool) ;True if some direct or indirect expansion of this nonterminal can return epsilon + (initial-terminals *empty-terminalset* :type terminalset)) ;Set of all terminals that can begin some expansion of this nonterminal + + +; Return a list of nonterminals in this rule's rhs. +; The list may contain duplicates. +(defun rule-nonterminals (rule) + (mapcan #'(lambda (production) (copy-list (production-nonterminals production))) + (rule-productions rule))) + + +; Return a unique serial number for the given nonterminal. +(defun nonterminal-number (grammar nonterminal) + (rule-number (assert-non-null (gethash nonterminal (grammar-rules grammar)) + "Can't find nonterminal ~S" nonterminal))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GENERIC RULES + +;;; A generic rule is the set of all generic productions with the same lhs generic nonterminal. +(defstruct (generic-rule (:include general-rule) + (:constructor make-generic-rule (productions)) + (:copier nil) + (:predicate generic-rule?))) +; productions ;The list of all generic-productions for this rule's generic nonterminal lhs + + +; Return a new generic-rule with the given nonterminal argument replaced by the given attribute. +; The resulting rule must still be generic -- it is an error to call this so that it would result +; in a rule with a plain or attributed lhs nonterminal. +(defun generic-rule-substitute (grammar-parametrization attribute argument generic-rule) + (make-generic-rule + (mapcar #'(lambda (generic-production) + (assert-type (generic-production-substitute grammar-parametrization attribute argument generic-production) + generic-production)) + (generic-rule-productions generic-rule)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR ITEMS + +;;; An item is a tuple , where prod is a production and +;;; position is an integer between 0 and length(rhs(production)), inclusive. +;;; The first position elements of production's rhs are called "seen" +;;; and the rest are called "unseen". +;;; There is exactly one item structure for a given combination, +;;; so eq can be used to test for item equality. +(defstruct (item (:constructor allocate-item (production dot unseen number next)) + (:copier nil) + (:predicate item?)) + (production nil :type production :read-only t) ;The production to which this item corresponds + (dot nil :type integer :read-only t) ;List of grammar symbols to which that nonterminal expands + (unseen nil :type list :read-only t) ;Portion of production's rhs to the right of the dot + (number nil :type integer :read-only t) ;Unique number (i.e. different from any other item's number) + (next nil :type item :read-only t)) ;The item with the same production but dot shifted one to the right; nil if unseen is nil + + +; Return the first grammar symbol to the right of the item's dot or nil if +; the dot is already at the rightmost position. +(declaim (inline item-next-symbol)) +(defun item-next-symbol (item) + (first (item-unseen item))) + + +; Return the lhs of the item's production. +(declaim (inline item-lhs)) +(defun item-lhs (item) + (production-lhs (item-production item))) + + +; Make an item with the given production and dot location (which must be an integer +; between 0 and length(rhs(production)), inclusive. Reuse an existing item in the +; grammar if possible. +(defun make-item (grammar production dot) + (let* ((items-hash (grammar-items-hash grammar)) + (key (cons production dot)) + (existing-item (gethash key items-hash))) + (or + existing-item + (progn + (assert-true (<= dot (length (production-rhs production)))) + (let* ((unseen (nthcdr dot (production-rhs production))) + (next (and unseen (make-item grammar production (1+ dot)))) + (number (+ (* (production-number production) (1+ (grammar-max-production-length grammar))) dot))) + (setf (gethash key items-hash) + (allocate-item production dot unseen number next))))))) + + +(defun print-item (item &optional (stream t)) + (let ((production (item-production item))) + (format stream "~W -> ~:_" (production-lhs production)) + (pprint-logical-block (stream (production-rhs production)) + (do ((n (item-dot item) (1- n)) + (first t)) + () + (when (zerop n) + (if first + (setq first nil) + (format stream " ~:_")) + (write-char #\. stream)) + (pprint-exit-if-list-exhausted) + (if first + (setq first nil) + (format stream " ~:_")) + (write (pprint-pop) :stream stream))))) + +(defmethod print-object ((item item) stream) + (print-unreadable-object (item stream) + (format stream "item ~@_") + (print-item item stream))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR LAITEMS + +;;; A laitem is an item with associated lookahead information. +;;; Unlike items, laitem structures are not shared among the states. +(defstruct (laitem (:constructor allocate-laitem (grammar item lookaheads)) + (:copier nil) + (:predicate laitem?)) + (grammar nil :type grammar :read-only t) ;The grammar to which this laitem belongs + (item nil :type item :read-only t) ;The item to which this laitem corresponds + (lookaheads nil :type terminalset) ;Set of lookahead terminals + (propagates nil :type list)) ;List of laitems to which lookaheads propagate from this laitem (see note below) +;When parsing a LALR(1) grammar, propagates is the list of all laitems (in this and other states) +;to which lookaheads propagate from this laitem. +;When parsing a LR(1) grammar, propagates is the list of all laitems to which lookaheads propagate from this laitem +;without following a shift transition. Such laitems must necessarily be in the same state. In the LR(1) case each +;laitem listed in the propagates list must come after this laitem in this state's laitems list. + + +(defvar *lookahead-print-column* 70) + +(defun print-laitem (laitem &optional (stream t)) + (print-item (laitem-item laitem) stream) + (format stream " ~vT~_" *lookahead-print-column*) + (pprint-logical-block (stream nil :prefix "{" :suffix "}") + (print-terminalset (laitem-grammar laitem) (laitem-lookaheads laitem) stream))) + +(defmethod print-object ((laitem laitem) stream) + (print-unreadable-object (laitem stream) + (format stream "laitem ~@_") + (print-laitem laitem stream))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR TRANSITIONS + +;;; A grammar transition is one of the following: +;;; (:shift state) ;Shift and go to the given state +;;; (:reduce production) ;Reduce by the given production +;;; (:accept) ;Accept the input + +(declaim (inline make-shift-transition)) +(defun make-shift-transition (state) + (assert-type state state) + (list :shift state)) + +(declaim (inline make-reduce-transition)) +(defun make-reduce-transition (production) + (assert-type production production) + (list :reduce production)) + +(declaim (inline make-accept-transition)) +(defun make-accept-transition () + (list :accept)) + + +(declaim (inline transition-kind)) +(defun transition-kind (transition) + (first transition)) + +(declaim (inline transition-state)) +(defun transition-state (transition) + (assert-true (eq (first transition) :shift)) + (second transition)) + +(defun (setf transition-state) (state transition) + (assert-true (eq (first transition) :shift)) + (setf (second transition) state)) + +(declaim (inline transition-production)) +(defun transition-production (transition) + (assert-true (eq (first transition) :reduce)) + (second transition)) + + +(defun print-transition (transition stream) + (case (transition-kind transition) + (:shift (format stream "shift S~D" (state-number (transition-state transition)))) + (:reduce (format stream "reduce ~W" (production-name (transition-production transition)))) + (:accept (format stream "accept")) + (t (error "Bad transition: ~S" transition)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR STATES + +(defstruct (state (:constructor allocate-state (number kernel laitems)) + (:copier nil) + (:predicate state?)) + (number nil :type integer :read-only t) ;Serial number of the state + (kernel nil :type list :read-only t) ;List of kernel items in order of increasing item-number values + (laitems nil :type list :read-only t) ;List of laitems (topologically sorted by the propagates relation when parsing LR(1)) + (transitions nil :type list) ;List of (terminal . transition) + (gotos nil :type list)) ;List of (nonterminal . state) + + +; If all outgoing transitions from the state are the same reduction, return that +; reduction's production; otherwise return nil. +(defun forwarding-state-production (state) + (let ((transitions (state-transitions state))) + (and transitions + (let ((transition (cdar transitions))) + (and (eq (transition-kind transition) :reduce) + (null (rassoc transition (cdr transitions) :test (complement #'equal))) + (transition-production transition)))))) + + +; Return the laitem corresponding to the given item in the given state. +(declaim (inline state-laitem)) +(defun state-laitem (state item) + (assert-non-null (find item (state-laitems state) :key #'laitem-item) + "State ~S doesn't have item ~S" state item)) + + +; Return true if this laitem is in the state's kernel either because the dot +; is not at the leftmost position or because the lhs is the start nonterminal. +(defun laitem-in-kernel? (laitem) + (let ((item (laitem-item laitem))) + (or (not (zerop (item-dot item))) + (grammar-symbol-= (item-lhs item) *start-nonterminal*)))) + + +; Return the state's list of laitems sorted by the criteria below. +; Criterion 1 is the major sorting order, criterion 2 decides the sorting order of items +; equal by criterion 1, etc. +; 1. laitems whose lhs matches the lhs of any kernel item in this state come before +; laitems whose lhs does not match the lhs of any kernel item in this state. +; 2. laitems are sorted by the number of their lhs nonterminal. +; 3. laitems in this state's kernel come before laitems not in the kernel. +; 4. laitems earlier in (state-laitems state) come before laitems later in (state-laitems state). +(defun laitems-sorted-nicely (state) + (let ((laitems (copy-list (state-laitems state)))) + (when laitems + (let ((grammar (laitem-grammar (first laitems)))) + (labels + ((lhs-matches-some-kernel-item (lhs-nonterminal) + (member lhs-nonterminal (state-kernel state) :test *grammar-symbol-=* :key #'item-lhs)) + (laitem-< (laitem1 laitem2) + (let* ((item1 (laitem-item laitem1)) + (item2 (laitem-item laitem2)) + (lhs1 (item-lhs item1)) + (lhs2 (item-lhs item2)) + (lhs-number-1 (nonterminal-number grammar lhs1)) + (lhs-number-2 (nonterminal-number grammar lhs2)) + (item1-lhs-matches-some-kernel-item (lhs-matches-some-kernel-item lhs1)) + (item2-lhs-matches-some-kernel-item (lhs-matches-some-kernel-item lhs2))) + (cond + ((and item1-lhs-matches-some-kernel-item (not item2-lhs-matches-some-kernel-item)) t) + ((and (not item1-lhs-matches-some-kernel-item) item2-lhs-matches-some-kernel-item) nil) + ((< lhs-number-1 lhs-number-2) t) + ((> lhs-number-1 lhs-number-2) nil) + (t (let ((item1-in-kernel (laitem-in-kernel? laitem1)) + (item2-in-kernel (laitem-in-kernel? laitem2))) + (cond + ((and item1-in-kernel (not item2-in-kernel)) t) + ((and (not item1-in-kernel) item2-in-kernel) nil) + (t (dolist (state-laitem (state-laitems state) nil) + (cond + ((eq state-laitem laitem2) (return nil)) + ((eq state-laitem laitem1) (return t)))))))))))) + (stable-sort laitems #'laitem-<)))))) + + +(defun print-state (state &optional (stream t)) + (pprint-logical-block (stream nil) + (format stream "S~D:" (state-number state)) + (pprint-indent :block 2 stream) + (pprint-newline :mandatory stream) + (pprint-logical-block (stream (laitems-sorted-nicely state)) + (do ((first t nil)) + () + (pprint-exit-if-list-exhausted) + (unless first + (pprint-newline :mandatory stream)) + (let ((laitem (pprint-pop))) + (pprint-logical-block (stream nil) + (unless (laitem-in-kernel? laitem) + (write-string " " stream)) + (pprint-indent :block 4 stream) + (print-laitem laitem stream))))) + (when (state-transitions state) + (pprint-newline :mandatory stream) + (pprint-logical-block (stream (collect-equivalences (state-transitions state) :test #'equal) :prefix "Transitions: ") + (loop + (pprint-exit-if-list-exhausted) + (let ((transition-cons (pprint-pop))) + (pprint-logical-block (stream nil) + (pprint-fill stream (car transition-cons) nil) + (format stream " ~2I~_=> " (car transition-cons)) + (print-transition (cdr transition-cons) stream)) + (format stream " ~:_"))))) + (when (state-gotos state) + (pprint-newline :mandatory stream) + (pprint-logical-block (stream (state-gotos state) :prefix "Gotos: ") + (loop + (pprint-exit-if-list-exhausted) + (let ((goto-cons (pprint-pop))) + (format stream "~@<~W ~:_=> ~:_S~D~:> ~:_" (car goto-cons) (state-number (cdr goto-cons))))))))) + + +(defmethod print-object ((state state) stream) + (print-unreadable-object (state stream) + (format stream "state S~D" (state-number state)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; PARAMETER TREES + +;;; A parameter tree describes which nonterminal parameters are generic and which are specific in all +;;; productions derived from the same nonterminal symbol. The tree has as many levels as there are +;;; parameters for that nonterminal symbol. A level is generic if it is generic in all applicable +;;; productions; otherwise it is specific. +;;; +;;; The parameter tree (and each of its subtrees) can have one of three forms: +;;; (:rule ) +;;; if the generic nonterminal has no remaining parameters; +;;; (:argument ) +;;; if the first remaining nonterminal parameter is an argument in all productions seen so far; +;;; (:attributes ( . ) ( . ) ...) +;;; if the first remaining nonterminal parameter can be one of several attributes in productions seen so far; +;;; if argument-or-nil is not nil, it is an argument that includes all of the provided attributes. +;;; +;;; The parameter tree (and each of its subtrees) is mutable and updated in place. +;;; + + +; Create and return an initial parameter tree for the given remaining parameters +; of the general-production. +(defun make-parameter-subtree (grammar parameters general-production) + (cond + (parameters + (let ((parameter (first parameters)) + (subtree (make-parameter-subtree grammar (rest parameters) general-production))) + (if (nonterminal-argument? parameter) + (list ':argument parameter subtree) + (list ':attributes nil (cons parameter subtree))))) + ((production? general-production) + (list ':rule (grammar-rule grammar (production-lhs general-production)))) + (t + (assert-true (generic-production? general-production)) + (list ':rule (make-generic-rule (list general-production)))))) + + +; Create and return an initial parameter tree for the general-production. +(defun make-parameter-tree (grammar general-production) + (make-parameter-subtree grammar + (general-nonterminal-parameters (general-production-lhs general-production)) + general-production)) + + +; The parameter subtree has kind :argument at its top level. Convert it in place +; into kind :attributes. +(defun parameter-subtree-divide-argument (grammar parameter-subtree) + (let ((argument (second parameter-subtree)) + (argument-subtree (third parameter-subtree))) + (labels + ((substitute-argument-with (attribute subtree) + (ecase (first subtree) + (:rule + (let* ((general-rule (second subtree)) + (lhs (general-rule-lhs general-rule)) + (new-lhs (general-grammar-symbol-substitute attribute argument lhs))) + (assert-true (generic-rule? general-rule)) + (list ':rule + (if (generic-nonterminal? new-lhs) + (generic-rule-substitute grammar attribute argument general-rule) + (grammar-rule grammar new-lhs))))) + (:argument + (list ':argument + (second subtree) + (substitute-argument-with attribute (third subtree)))) + (:attributes + (list ':attributes + (second subtree) + (mapcar #'(lambda (argument-subtree-binding) + (cons (car argument-subtree-binding) + (substitute-argument-with attribute (cdr argument-subtree-binding)))) + (cddr subtree)))))) + + (create-attribute-subtree-binding (attribute) + (cons attribute (substitute-argument-with attribute argument-subtree)))) + + (setf (first parameter-subtree) ':attributes) + (setf (cddr parameter-subtree) + (mapcar #'create-attribute-subtree-binding + (grammar-parametrization-lookup-argument grammar argument)))))) + + +; Mutate the parameter subtree to add the general-production to its rules. +; parameters are the nonterminal parameters for the remaining subtree levels. +(defun parameter-subtree-add-production (grammar parameter-subtree parameters general-production) + (let ((lhs (general-production-lhs general-production)) + (kind (first parameter-subtree))) + (cond + ((eq kind :rule) + (let ((general-rule (second parameter-subtree))) + (cond + (parameters + (error "Extra nonterminal parameters ~S for ~S" parameters lhs)) + ((production? general-production) + (assert-true (member general-production (rule-productions general-rule) :test #'eq))) + (t + (assert-true (generic-production? general-production)) + (assert-true (not (member general-production (generic-rule-productions general-rule) :test #'eq))) + (setf (generic-rule-productions general-rule) + (nconc (generic-rule-productions general-rule) (list general-production))))))) + ((null parameters) + (error "Missing nonterminal parameters in ~S" lhs)) + (t + (let ((parameter (first parameters)) + (parameters-rest (rest parameters))) + (ecase kind + (:argument + (let ((argument (second parameter-subtree)) + (argument-subtree (third parameter-subtree))) + (if (nonterminal-argument? parameter) + (if (eq parameter argument) + (parameter-subtree-add-production grammar argument-subtree parameters-rest general-production) + (error "Nonterminal argument conflict: ~S vs. ~S" parameter argument)) + (progn + (parameter-subtree-divide-argument grammar parameter-subtree) + (parameter-subtree-add-production grammar parameter-subtree parameters general-production))))) + (:attributes + (let ((argument (second parameter-subtree)) + (attribute-subtree-bindings (cddr parameter-subtree))) + (if (nonterminal-argument? parameter) + (let ((argument-attributes (grammar-parametrization-lookup-argument grammar parameter))) + (labels + ((add-attribute-production (attribute-subtree-binding) + (let ((attribute (car attribute-subtree-binding))) + (unless (member attribute argument-attributes :test #'eq) + (error "Attribute ~S is not a member of argument ~S" attribute parameter)) + (parameter-subtree-add-production + grammar + (cdr attribute-subtree-binding) + parameters-rest + (generic-production-substitute grammar attribute parameter general-production))))) + (cond + ((null argument) + (mapc #'add-attribute-production attribute-subtree-bindings) + (setf (cddr parameter-subtree) + (nconc attribute-subtree-bindings + (mapcan #'(lambda (attribute) + (unless (assoc attribute attribute-subtree-bindings :test #'eq) + (list + (cons attribute + (make-parameter-subtree + grammar + parameters-rest + (generic-production-substitute grammar attribute parameter general-production)))))) + argument-attributes))) + (setf (second parameter-subtree) parameter)) + ((eq parameter argument) + (assert-true (= (length attribute-subtree-bindings) (length argument-attributes))) + (mapc #'add-attribute-production attribute-subtree-bindings)) + (t (error "Nonterminal argument conflict: ~S vs. ~S" parameter argument))))) + + (let ((attribute-subtree-binding (assoc parameter attribute-subtree-bindings :test #'eq))) + (cond + (attribute-subtree-binding + (parameter-subtree-add-production grammar (cdr attribute-subtree-binding) parameters-rest general-production)) + (argument + (error "Attribute ~S is not a member of argument ~S" parameter argument)) + (t + (setf (cddr parameter-subtree) + (nconc attribute-subtree-bindings + (list (cons parameter + (make-parameter-subtree grammar parameters-rest general-production))))))))))))))))) + + +; Mutate the parameter tree to add the general-production to its rules. +(defun parameter-tree-add-production (grammar parameter-tree general-production) + (parameter-subtree-add-production grammar + parameter-tree + (general-nonterminal-parameters (general-production-lhs general-production)) + general-production) + parameter-tree) + + +; Return a freshly consed list of all rules and generic-rules in the parameter tree. +(defun parameter-tree-general-rules (parameter-tree) + (ecase (first parameter-tree) + (:rule (list (second parameter-tree))) + (:argument (parameter-tree-general-rules (third parameter-tree))) + (:attributes + (mapcan + #'(lambda (argument-subtree-binding) + (parameter-tree-general-rules (cdr argument-subtree-binding))) + (cddr parameter-tree))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR + +(defstruct (grammar (:include grammar-parametrization) + (:constructor allocate-grammar) + (:copier nil) + (:predicate grammar?)) + (terminals nil :type simple-vector :read-only t) ;Vector of all terminals (in order of terminal numbers) + (nonterminals nil :type simple-vector :read-only t) ;Vector of all nonterminals (in a depth-first order) + (nonterminals-list nil :type list :read-only t) ;List version of the nonterminals vector + (terminal-numbers nil :type hash-table :read-only t) ;Hash table of terminal -> terminal number + (terminal-actions nil :type hash-table :read-only t) ;Hash table of terminal -> list of (action-symbol . action-function-or-nil) + (rules nil :type hash-table :read-only t) ;Hash table of nonterminal -> rule + (parameter-trees nil :type hash-table :read-only t) ;Hash table of nonterminal-symbol -> parameter-tree + (max-production-length nil :type integer :read-only t) ;Maximum number of grammar symbols on the rhs of a production + (general-productions nil :type hash-table :read-only t);Hash table of production-name -> general-production + (n-productions nil :type integer :read-only t) ;Number of productions in the grammar + ;The following fields are used for the parser. + (items-hash nil :type hash-table :read-only t) ;Hash table of (production . dot) -> item + (states nil :type list) ;List of LR(0) states (in order of state numbers) + ;The following fields are used for the action generator. + (action-signatures nil :type (or null hash-table))) ;Hash table of grammar-symbol -> list of (action-symbol . type-or-type-expr) + + +; Return a rule for the given nonterminal lhs. +(defun grammar-rule (grammar lhs) + (or (gethash lhs (grammar-rules grammar)) + (error "Can't find rule for ~S" lhs))) + + +; Return a list of general-rules that together form a partition of all productions whose lhs's +; are instances of the given lhs-general-nonterminal. +; The given lhs-general-nonterminal must have been given as the lhs for at least one general production +; source when constructing this grammar. +(defun grammar-general-rules (grammar lhs-general-nonterminal) + (if (generic-nonterminal? lhs-general-nonterminal) + (parameter-tree-general-rules (gethash (generic-nonterminal-symbol lhs-general-nonterminal) (grammar-parameter-trees grammar))) + (list (grammar-rule grammar lhs-general-nonterminal)))) + + +; Return the start production for the grammar. +(defun grammar-start-production (grammar) + (assert-non-null (first (rule-productions (grammar-rule grammar *start-nonterminal*))))) + + +; Return the user (not internal) start-symbol of the grammar. +(defun gramar-user-start-symbol (grammar) + (assert-non-null (first (production-rhs (grammar-start-production grammar))))) + + +; Return the production with the given name in the grammar. +; The returned production may be a production or a generic-production. +; Signal an error if there is no such production. +(defun grammar-general-production (grammar production-name) + (or (gethash production-name (grammar-general-productions grammar)) + (error "Production ~S not found" production-name))) + + +; Call f on each production in the grammar in an unspecified order. +(defun each-grammar-production (grammar f) + (maphash + #'(lambda (lhs rule) + (declare (ignore lhs)) + (mapc f (rule-productions rule))) + (grammar-rules grammar))) + + +; Return the starting state for the grammar. +(defun grammar-start-state (grammar) + (assert-non-null (first (grammar-states grammar)))) + + +; Return the state numbered n in the grammar. +(defun grammar-state (grammar n) + (assert-non-null (nth n (grammar-states grammar)))) + + +; Return true if symbol ==>* epsilon. +(defun symbol-derives-epsilon (grammar symbol) + (assert-type symbol grammar-symbol) + (and (nonterminal? symbol) + (rule-derives-epsilon (grammar-rule grammar symbol)))) + + +; Return the terminalset of all terminals a that satisfy +; symbol ==>* a rest, +; where rest is an arbitrary string of grammar symbols. +(defun symbol-initial-terminals (grammar symbol) + (assert-type symbol grammar-symbol) + (if (nonterminal? symbol) + (rule-initial-terminals (grammar-rule grammar symbol)) + (make-terminalset grammar symbol))) + + +; Given symbol-string, an arbitrary string of grammar symbols, +; return two values: a terminalset S and a boolean B. +; S is the terminalset of all terminals a that satisfy +; symbol-string ==>* a rest, +; where rest is an arbitrary string of grammar symbols. +; B is true if symbol-string ==>* epsilon. +(defun string-initial-terminals (grammar symbol-string) + (let ((initial-terminals *empty-terminalset*) + (derives-epsilon nil)) + (dolist (element symbol-string (setq derives-epsilon t)) + (setq initial-terminals (terminalset-union initial-terminals (symbol-initial-terminals grammar element))) + (unless (symbol-derives-epsilon grammar element) + (return))) + (values initial-terminals derives-epsilon))) + + +; Intern attributed or generic nonterminals in the production's lhs and rhs. Return the +; resulting production source. +(defun intern-production-source (grammar-parametrization production-source) + (assert-type production-source (tuple (or user-nonterminal cons) (list (or user-grammar-symbol cons)) identifier)) + (let ((production-lhs-source (first production-source)) + (production-rhs-source (second production-source)) + (production-name (third production-source))) + (if (or (consp production-lhs-source) (some #'consp production-rhs-source)) + (multiple-value-bind (lhs-nonterminal lhs-arguments) (grammar-parametrization-intern grammar-parametrization production-lhs-source) + (list lhs-nonterminal + (mapcar #'(lambda (grammar-symbol-source) + (if (consp grammar-symbol-source) + (grammar-parametrization-intern grammar-parametrization grammar-symbol-source lhs-arguments) + grammar-symbol-source)) + production-rhs-source) + production-name)) + production-source))) + + +; Make a grammar structure out of a grammar in source form. +; A grammar-source is a list of productions; each production is a list of: +; a nonterminal A (the lhs); +; a list of grammar symbols forming A's expansion (the rhs); +; a production name. +; Nonterminals in the lhs and rhs can be parametrized; in this case such a nonterminal +; is represented by a list whose first element is the name and the remaining elements are +; the arguments or attributes. Any nonterminal argument in the rhs must also be an argument +; of the lhs nonterminal. The lhs nonterminal must not have duplicate arguments. The lhs +; nonterminal can have attributes, thereby designating a specialization instead of a fully +; generic production. +(defun make-grammar (grammar-parametrization start-symbol grammar-source) + (let ((interned-grammar-source + (mapcar #'(lambda (production-source) + (intern-production-source grammar-parametrization production-source)) + grammar-source)) + (rules (make-hash-table :test #'eq)) + (terminals-hash (make-hash-table :test *grammar-symbol-=*)) + (general-productions (make-hash-table :test #'equal)) + (production-number 0) + (max-production-length 1)) + + ;Create the starting production: *start-nonterminal* ==> start-symbol + (setf (gethash *start-nonterminal* rules) + (list (make-production *start-nonterminal* (list start-symbol) nil 1 0))) + + ;Create the rest of the productions. + (flet + ((create-production (lhs rhs name) + (let ((production (make-production lhs rhs name (length rhs) (incf production-number)))) + (push production (gethash lhs rules)) + (dolist (rhs-terminal (production-terminals production)) + (setf (gethash rhs-terminal terminals-hash) t)) + production))) + + (dolist (production-source interned-grammar-source) + (let* ((production-lhs (first production-source)) + (production-rhs (second production-source)) + (production-name (third production-source)) + (lhs-arguments (general-grammar-symbol-arguments production-lhs))) + (setq max-production-length (max max-production-length (length production-rhs))) + (when (gethash production-name general-productions) + (error "Duplicate production name ~S" production-name)) + (setf (gethash production-name general-productions) + (if lhs-arguments + (let ((productions nil)) + (grammar-parametrization-each-permutation + grammar-parametrization + #'(lambda (bound-argument-alist) + (push (create-production + (instantiate-general-grammar-symbol bound-argument-alist production-lhs) + (mapcar #'(lambda (general-grammar-symbol) + (instantiate-general-grammar-symbol bound-argument-alist general-grammar-symbol)) + production-rhs) + production-name) + productions)) + lhs-arguments) + (make-generic-production production-lhs production-rhs production-name (nreverse productions))) + (create-production production-lhs production-rhs production-name)))))) + + + ;Change all values of the rules hash table to contain rule structures + ;instead of mere lists of rules. Also check that all referenced nonterminals + ;have been defined. + (maphash + #'(lambda (rule-lhs rule-productions) + (dolist (rule-production rule-productions) + (dolist (rhs-nonterminal (production-nonterminals rule-production)) + (unless (gethash rhs-nonterminal rules) + (error "Nonterminal ~S used but not defined" rhs-nonterminal)))) + (setf (gethash rule-lhs rules) + (make-rule (nreverse rule-productions)))) + rules) + + (let ((nonterminals-list (depth-first-search + *grammar-symbol-=* + #'(lambda (nonterminal) (rule-nonterminals (gethash nonterminal rules))) + *start-nonterminal*))) + (when (/= (length nonterminals-list) (hash-table-count rules)) + (let ((dead-nonterminals (set-difference (hash-table-keys rules) nonterminals-list :test *grammar-symbol-=*))) + (warn "The following nonterminals are not reachable from start: ~S" dead-nonterminals) + (setq nonterminals-list (nconc nonterminals-list dead-nonterminals)))) + + (let ((terminals (coerce (cons *end-marker* (sorted-hash-table-keys terminals-hash)) + 'simple-vector)) + (nonterminals (coerce nonterminals-list 'simple-vector))) + (dotimes (n (length terminals)) + (setf (gethash (svref terminals n) terminals-hash) n)) + (dotimes (n (length nonterminals)) + (setf (rule-number (gethash (svref nonterminals n) rules)) n)) + (let ((grammar (allocate-grammar + :argument-attributes (grammar-parametrization-argument-attributes grammar-parametrization) + :terminals terminals + :nonterminals-list nonterminals-list + :nonterminals nonterminals + :terminal-numbers terminals-hash + :terminal-actions (make-hash-table :test *grammar-symbol-=*) + :rules rules + :parameter-trees (make-hash-table :test *grammar-symbol-=*) + :max-production-length max-production-length + :general-productions general-productions + :n-productions production-number + :items-hash (make-hash-table :test #'equal)))) + + ;Compute the values of derives-epsilon and initial-terminals in each rule. + (do ((changed t)) + ((not changed)) + (setq changed nil) + (dolist (nonterminal (grammar-nonterminals-list grammar)) + (let ((rule (grammar-rule grammar nonterminal)) + (new-initial-terminals *empty-terminalset*) + (new-derives-epsilon nil)) + (dolist (production (rule-productions rule)) + (multiple-value-bind (production-initial-terminals production-derives-epsilon) + (string-initial-terminals grammar (production-rhs production)) + (setq new-initial-terminals (terminalset-union new-initial-terminals production-initial-terminals)) + (when production-derives-epsilon + (setq new-derives-epsilon t)))) + (assert-true (or new-derives-epsilon (not (rule-derives-epsilon rule)))) + (assert-true (terminalset-<= (rule-initial-terminals rule) new-initial-terminals)) + (unless (terminalset-= new-initial-terminals (rule-initial-terminals rule)) + (setf (rule-initial-terminals rule) new-initial-terminals) + (setq changed t)) + (unless (eq new-derives-epsilon (rule-derives-epsilon rule)) + (setf (rule-derives-epsilon rule) t) + (setq changed t))))) + + ;Compute the parameter-trees entries. + (let ((parameter-trees (grammar-parameter-trees grammar))) + (dolist (production-source interned-grammar-source) + (let ((general-production (gethash (third production-source) general-productions))) + (let ((lhs-general-nonterminal (general-production-lhs general-production))) + (when (or (generic-nonterminal? lhs-general-nonterminal) + (attributed-nonterminal? lhs-general-nonterminal)) + (let* ((lhs-symbol (general-grammar-symbol-symbol lhs-general-nonterminal)) + (parameter-tree (gethash lhs-symbol parameter-trees))) + (if parameter-tree + (parameter-tree-add-production grammar parameter-tree general-production) + (setf (gethash lhs-symbol parameter-trees) + (make-parameter-tree grammar general-production))))))))) + grammar))))) + + +(defvar *name-print-column* 70) + +; Print the grammar nicely. +(defun print-grammar (grammar &optional (stream t) &key (details t)) + (labels + ((print-production-number (n) + (format nil "P~D" n))) + (let ((production-number-width (length (print-production-number (grammar-n-productions grammar))))) + (pprint-logical-block (stream nil) + (format stream "Terminals: ~@_~<~@{~W ~:_~}~:>~:@_" (coerce (grammar-terminals grammar) 'list)) + (when details + (format stream "Nonterminals: ~@_~<~@{~W ~:_~}~:>~:@_" (grammar-nonterminals-list grammar))) + + ;Print the rules. + (pprint-logical-block (stream (grammar-nonterminals-list grammar)) + (pprint-exit-if-list-exhausted) + (format stream "Rules:") + (pprint-indent :block 2 stream) + (pprint-newline :mandatory stream) + (loop + (let* ((rule-lhs (pprint-pop)) + (rule (grammar-rule grammar rule-lhs))) + (pprint-logical-block (stream nil) + (pprint-logical-block (stream (rule-productions rule) :prefix (format nil "~W " rule-lhs)) + (pprint-exit-if-list-exhausted) + (format stream "-> ") + (loop + (let ((production (pprint-pop))) + (format stream "~@<~:[ ~;~:*~{~W ~:_~}~] ~_~vT~vA [~W]~:>" + (production-rhs production) *name-print-column* + production-number-width (print-production-number (production-number production)) + (production-name production))) + (pprint-exit-if-list-exhausted) + (format stream "~:@_ | "))) + (pprint-indent :block 2 stream) + (when details + (format stream "~:@_Initial terminals: ~@_~@<~:[~; ~:_~]~{~W ~:_~}~:>" + (rule-derives-epsilon rule) + (terminalset-list grammar (rule-initial-terminals rule))))) + (pprint-newline :mandatory stream)) + (pprint-exit-if-list-exhausted) + (pprint-newline :mandatory stream))) + + ;Print the states. + (pprint-newline :mandatory stream) + (pprint-logical-block (stream (grammar-states grammar)) + (pprint-exit-if-list-exhausted) + (format stream "States:") + (pprint-indent :block 2 stream) + (pprint-newline :mandatory stream) + (loop + (print-state (pprint-pop) stream) + (pprint-newline :mandatory stream) + (pprint-exit-if-list-exhausted) + (pprint-newline :mandatory stream)))) + (pprint-newline :mandatory stream)))) + + +(defmethod print-object ((grammar grammar) stream) + (print-unreadable-object (grammar stream :identity t) + (write-string "grammar" stream))) + + +; Emit markup paragraphs for the grammar. +(defun depict-grammar (markup-stream grammar) + (depict-paragraph (markup-stream ':body-text) + (depict markup-stream "Start nonterminal: ") + (depict-general-nonterminal markup-stream (gramar-user-start-symbol grammar))) + (dolist (nonterminal (grammar-nonterminals-list grammar)) + (unless (grammar-symbol-= nonterminal *start-nonterminal*) + (depict-general-rule markup-stream (grammar-rule grammar nonterminal))))) + + +; Return a list of nontrivial sets of states with the same kernels. +(defun grammar-kernel-sets (grammar) + (let ((states-hash (make-hash-table :test #'equal)) + (equivalences nil)) + (dolist (state (grammar-states grammar)) + (push state (gethash (state-kernel state) states-hash))) + (maphash #'(lambda (kernel states) + (declare (ignore kernel)) + (unless (= (length states) 1) + (push (nreverse states) equivalences))) + states-hash) + (sort equivalences #'< :key #'(lambda (equivalence) + (state-number (first equivalence)))))) \ No newline at end of file diff --git a/mozilla/js/semantics/GrammarSymbol.lisp b/mozilla/js/semantics/GrammarSymbol.lisp new file mode 100644 index 00000000000..6f0c4b7edaf --- /dev/null +++ b/mozilla/js/semantics/GrammarSymbol.lisp @@ -0,0 +1,483 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; LALR(1) and LR(1) parametrized grammar utilities +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; ------------------------------------------------------------------------------------------------------ +;;; UTILITIES + +(declaim (inline identifier?)) +(defun identifier? (form) + (and form (symbolp form) (not (keywordp form)))) + +(deftype identifier () '(satisfies identifier?)) + + +; Make sure that form is one of the following: +; A symbol +; An integer +; A float +; A character +; A string +; A list of zero or more forms that also satisfy ensure-proper-form; +; the list cannot be dotted. +; Return the form. +(defun ensure-proper-form (form) + (labels + ((ensure-list-form (form) + (or (null form) + (and (consp form) + (progn + (ensure-proper-form (car form)) + (ensure-list-form (cdr form))))))) + (unless + (or (symbolp form) + (integerp form) + (floatp form) + (characterp form) + (stringp form) + (ensure-list-form form)) + (error "Bad form: ~S" form)) + form)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; TERMINALS + +; A terminal is any of the following: +; A symbol that is neither nil nor a keyword +; A string; +; A character; +; An integer. +(defun terminal? (x) + (and x + (or (and (symbolp x) (not (keywordp x))) + (stringp x) + (characterp x) + (integerp x)))) + +; The following terminals are reserved and may not be used in user input: +; $$ Marker for end of token stream +(defconstant *end-marker* '$$) +(defconstant *end-marker-terminal-number* 0) + +(deftype terminal () '(satisfies terminal?)) +(deftype user-terminal () `(and terminal (not (eql ,*end-marker*)))) + + +; Emit markup for a terminal. subscript is an optional integer. +(defun depict-terminal (markup-stream terminal &optional subscript) + (cond + ((characterp terminal) + (depict-char-style (markup-stream ':character-literal) + (depict-character markup-stream terminal) + (when subscript + (depict-char-style (markup-stream ':plain-subscript) + (depict-integer markup-stream subscript))))) + ((and terminal (symbolp terminal)) + (let ((name (symbol-name terminal))) + (if (and (> (length name) 0) (char= (char name 0) #\$)) + (depict-char-style (markup-stream ':terminal) + (depict markup-stream (subseq (symbol-upper-mixed-case-name terminal) 1)) + (when subscript + (depict-char-style (markup-stream ':plain-subscript) + (depict-integer markup-stream subscript)))) + (progn + (depict-char-style (markup-stream ':terminal-keyword) + (depict markup-stream (string-downcase name))) + (when subscript + (depict-char-style (markup-stream ':terminal) + (depict-char-style (markup-stream ':plain-subscript) + (depict-integer markup-stream subscript)))))))) + (t (error "Don't know how to emit markup for terminal ~S" terminal)))) + + + +;;; ------------------------------------------------------------------------------------------------------ +;;; NONTERMINAL PARAMETERS + +(declaim (inline nonterminal-parameter?)) +(defun nonterminal-parameter? (x) + (symbolp x)) +(deftype nonterminal-parameter () 'symbol) + + +; Return true if this nonterminal parameter is a constant. +(declaim (inline nonterminal-attribute?)) +(defun nonterminal-attribute? (parameter) + (and (symbolp parameter) (not (keywordp parameter)))) +(deftype nonterminal-attribute () '(and symbol (not keyword))) + + +(defun depict-nonterminal-attribute (markup-stream attribute) + (depict-char-style (markup-stream ':nonterminal) + (depict-char-style (markup-stream ':nonterminal-attribute) + (depict markup-stream (symbol-lower-mixed-case-name attribute))))) + + +; Return true if this nonterminal parameter is a variable. +(declaim (inline nonterminal-argument?)) +(defun nonterminal-argument? (parameter) + (keywordp parameter)) +(deftype nonterminal-argument () 'keyword) + + +(defparameter *special-nonterminal-arguments* + '(:alpha :beta :gamma :delta :epsilon :zeta :eta :theta :iota :kappa :lambda :mu :nu + :xi :omicron :pi :rho :sigma :tau :upsilon :phi :chi :psi :omega)) + +(defun depict-nonterminal-argument-symbol (markup-stream argument) + (depict-char-style (markup-stream ':nonterminal-argument) + (depict markup-stream + (if (member argument *special-nonterminal-arguments*) + argument + (symbol-upper-mixed-case-name argument))))) + +(defun depict-nonterminal-argument (markup-stream argument) + (depict-char-style (markup-stream ':nonterminal) + (depict-nonterminal-argument-symbol markup-stream argument))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; ATTRIBUTED NONTERMINALS + +; An attributed-nonterminal is a specific instantiation of a generic-nonterminal. +(defstruct (attributed-nonterminal (:constructor allocate-attributed-nonterminal (symbol attributes)) + (:copier nil) + (:predicate attributed-nonterminal?)) + (symbol nil :type keyword :read-only t) ;The name of the attributed nonterminal + (attributes nil :type list :read-only t)) ;Ordered list of nonterminal attributes + + +; Make an attributed nonterminal with the given symbol and attributes. If there +; are no attributes, return the symbol as a plain nonterminal. +; Nonterminals are eq whenever they have identical symbols and attribute lists. +(defun make-attributed-nonterminal (symbol attributes) + (assert-type symbol keyword) + (assert-type attributes (list nonterminal-attribute)) + (if attributes + (let ((generic-nonterminals (get symbol 'generic-nonterminals))) + (or (cdr (assoc attributes generic-nonterminals :test #'equal)) + (let ((attributed-nonterminal (allocate-attributed-nonterminal symbol attributes))) + (setf (get symbol 'generic-nonterminals) + (acons attributes attributed-nonterminal generic-nonterminals)) + attributed-nonterminal))) + symbol)) + + +(defmethod print-object ((attributed-nonterminal attributed-nonterminal) stream) + (print-unreadable-object (attributed-nonterminal stream) + (format stream "a ~@_~W~{ ~:_~W~}" + (attributed-nonterminal-symbol attributed-nonterminal) + (attributed-nonterminal-attributes attributed-nonterminal)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GENERIC NONTERMINALS + +; A generic-nonterminal is a parametrized nonterminal that can expand into two or more +; attributed-nonterminals. +(defstruct (generic-nonterminal (:constructor allocate-generic-nonterminal (symbol parameters)) + (:copier nil) + (:predicate generic-nonterminal?)) + (symbol nil :type keyword :read-only t) ;The name of the generic nonterminal + (parameters nil :type list :read-only t)) ;Ordered list of nonterminal attributes or arguments + + +; Make a generic nonterminal with the given symbol and parameters. If none of +; the parameters is an argument, make an attributed nonterminal instead. If there +; are no parameters, return the symbol as a plain nonterminal. +; Nonterminals are eq whenever they have identical symbols and parameter lists. +(defun make-generic-nonterminal (symbol parameters) + (assert-type symbol keyword) + (if parameters + (let ((generic-nonterminals (get symbol 'generic-nonterminals))) + (or (cdr (assoc parameters generic-nonterminals :test #'equal)) + (progn + (assert-type parameters (list nonterminal-parameter)) + (let ((generic-nonterminal (if (every #'nonterminal-attribute? parameters) + (allocate-attributed-nonterminal symbol parameters) + (allocate-generic-nonterminal symbol parameters)))) + (setf (get symbol 'generic-nonterminals) + (acons parameters generic-nonterminal generic-nonterminals)) + generic-nonterminal)))) + symbol)) + + +(defmethod print-object ((generic-nonterminal generic-nonterminal) stream) + (print-unreadable-object (generic-nonterminal stream) + (format stream "g ~@_~W~{ ~:_~W~}" + (generic-nonterminal-symbol generic-nonterminal) + (generic-nonterminal-parameters generic-nonterminal)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; NONTERMINALS + +;;; A nonterminal is a keyword or an attributed-nonterminal. +(declaim (inline nonterminal?)) +(defun nonterminal? (x) + (or (keywordp x) (attributed-nonterminal? x))) + +; The following nonterminals are reserved and may not be used in user input: +; :% Nonterminal that expands to the start nonterminal + +(defconstant *start-nonterminal* :%) + +(deftype nonterminal () '(or keyword attributed-nonterminal)) +(deftype user-nonterminal () `(and nonterminal (not (eql ,*start-nonterminal*)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GENERAL NONTERMINALS + +;;; A general-nonterminal is a nonterminal or a generic-nonterminal. +(declaim (inline general-nonterminal?)) +(defun general-nonterminal? (x) + (or (nonterminal? x) (generic-nonterminal? x))) + +(deftype general-nonterminal () '(or nonterminal generic-nonterminal)) + + +; Return the list of parameters in the general-nonterminal. The list is empty if the +; general-nonterminal is a plain nonterminal. +(defun general-nonterminal-parameters (general-nonterminal) + (cond + ((attributed-nonterminal? general-nonterminal) (attributed-nonterminal-attributes general-nonterminal)) + ((generic-nonterminal? general-nonterminal) (generic-nonterminal-parameters general-nonterminal)) + (t (progn + (assert-true (keywordp general-nonterminal)) + nil)))) + + +; Emit markup for a general-nonterminal. subscript is an optional integer. +(defun depict-general-nonterminal (markup-stream general-nonterminal &optional subscript) + (depict-char-style (markup-stream ':nonterminal) + (labels + ((depict-nonterminal-parameter (markup-stream parameter) + (if (nonterminal-attribute? parameter) + (depict-char-style (markup-stream ':nonterminal-attribute) + (depict markup-stream (symbol-lower-mixed-case-name parameter))) + (depict-nonterminal-argument-symbol markup-stream parameter))) + + (depict-parametrized-nonterminal (symbol parameters) + (depict markup-stream (symbol-upper-mixed-case-name symbol)) + (depict-char-style (markup-stream ':superscript) + (depict-list markup-stream #'depict-nonterminal-parameter parameters + :separator ",")))) + + (cond + ((keywordp general-nonterminal) + (depict markup-stream (symbol-upper-mixed-case-name general-nonterminal))) + ((attributed-nonterminal? general-nonterminal) + (depict-parametrized-nonterminal (attributed-nonterminal-symbol general-nonterminal) + (attributed-nonterminal-attributes general-nonterminal))) + ((generic-nonterminal? general-nonterminal) + (depict-parametrized-nonterminal (generic-nonterminal-symbol general-nonterminal) + (generic-nonterminal-parameters general-nonterminal))) + (t (error "Bad nonterminal ~S" general-nonterminal))) + (when subscript + (depict-char-style (markup-stream ':plain-subscript) + (depict-integer markup-stream subscript)))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR SYMBOLS + +;;; A grammar-symbol is either a terminal or a nonterminal. +(deftype grammar-symbol () '(or terminal nonterminal)) +(deftype user-grammar-symbol () '(or user-terminal user-nonterminal)) + +;;; A general-grammar-symbol is either a terminal or a general-nonterminal. +(deftype general-grammar-symbol () '(or terminal general-nonterminal)) + + +; Return true if the two grammar symbols are the same symbol. +(declaim (inline grammar-symbol-=)) +(defun grammar-symbol-= (grammar-symbol1 grammar-symbol2) + (eql grammar-symbol1 grammar-symbol2)) +; A version of grammar-symbol-= suitable for being the test function for hash tables. +(defconstant *grammar-symbol-=* #'eql) + + +; Return the general-grammar-symbol's symbol. Return it unchanged if it is not +; an attributed or generic nonterminal. +(defun general-grammar-symbol-symbol (general-grammar-symbol) + (cond + ((attributed-nonterminal? general-grammar-symbol) (attributed-nonterminal-symbol general-grammar-symbol)) + ((generic-nonterminal? general-grammar-symbol) (generic-nonterminal-symbol general-grammar-symbol)) + (t (assert-type general-grammar-symbol (or keyword terminal))))) + + +; Return the list of arguments in the general-grammar-symbol. The list is empty if the +; general-grammar-symbol is not a generic nonterminal. +(defun general-grammar-symbol-arguments (general-grammar-symbol) + (and (generic-nonterminal? general-grammar-symbol) + (remove-if (complement #'nonterminal-argument?) (generic-nonterminal-parameters general-grammar-symbol)))) + + +; Emit markup for a general-grammar-symbol. subscript is an optional integer. +(defun depict-general-grammar-symbol (markup-stream general-grammar-symbol &optional subscript) + (if (general-nonterminal? general-grammar-symbol) + (depict-general-nonterminal markup-stream general-grammar-symbol subscript) + (depict-terminal markup-stream general-grammar-symbol subscript))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR PARAMETRIZATIONS + +; A grammar parametrization holds the rules for converting nonterminal arguments into nonterminal attributes. +(defstruct (grammar-parametrization (:constructor allocate-grammar-parametrization (argument-attributes)) + (:predicate grammar-parametrization?)) + (argument-attributes nil :type hash-table :read-only t)) ;Hash table of nonterminal-argument -> list of nonterminal-attributes + + +(defun make-grammar-parametrization () + (allocate-grammar-parametrization (make-hash-table :test #'eq))) + + +; Declare that nonterminal arguments with the given name can hold any of the +; given nonterminal attributes given. At least one attribute must be provided. +(defun grammar-parametrization-declare-argument (grammar-parametrization argument attributes) + (assert-type argument nonterminal-argument) + (assert-type attributes (list nonterminal-attribute)) + (assert-true attributes) + (when (gethash argument (grammar-parametrization-argument-attributes grammar-parametrization)) + (error "Duplicate parametrized grammar argument ~S" argument)) + (setf (gethash argument (grammar-parametrization-argument-attributes grammar-parametrization)) attributes)) + + +; Return the attributes to which the given argument may expand. +(defun grammar-parametrization-lookup-argument (grammar-parametrization argument) + (assert-non-null (gethash argument (grammar-parametrization-argument-attributes grammar-parametrization)))) + + +; Create a plain, attributed, or generic grammar symbol from the specification in grammar-symbol-source. +; If grammar-symbol-source is not a cons, it is a plain grammar symbol. If it is a list, its first element +; must be a keyword that is a nonterminal's symbol and the other elements must be nonterminal +; parameters. +; Return two values: +; the grammar symbol +; a list of arguments used in the grammar symbol. +; If allowed-arguments is given, check that each argument is in the allowed-arguments list; +; if not, allow any arguments declared in grammar-parametrization but do not allow duplicates. +(defun grammar-parametrization-intern (grammar-parametrization grammar-symbol-source &optional (allowed-arguments nil allow-duplicates)) + (if (consp grammar-symbol-source) + (progn + (assert-type grammar-symbol-source (cons keyword (list nonterminal-parameter))) + (let* ((symbol (car grammar-symbol-source)) + (parameters (cdr grammar-symbol-source)) + (arguments (remove-if (complement #'nonterminal-argument?) parameters))) + (mapl #'(lambda (arguments) + (let ((argument (car arguments))) + (if allow-duplicates + (unless (member argument allowed-arguments :test #'eq) + (error "Undefined nonterminal argument ~S" argument)) + (progn + (unless (gethash argument (grammar-parametrization-argument-attributes grammar-parametrization)) + (error "Undeclared nonterminal argument ~S" argument)) + (when (member argument (cdr arguments) :test #'eq) + (error "Duplicate nonterminal argument ~S" argument)))))) + arguments) + (values (make-generic-nonterminal symbol parameters) arguments))) + (values grammar-symbol-source nil))) + + +; Call f on each possible binding permutation of the given arguments concatenated with the bindings in +; bound-argument-alist. f takes one argument, an association list that maps arguments to attributes. +(defun grammar-parametrization-each-permutation (grammar-parametrization f arguments &optional bound-argument-alist) + (if arguments + (let ((argument (car arguments)) + (rest-arguments (cdr arguments))) + (dolist (attribute (grammar-parametrization-lookup-argument grammar-parametrization argument)) + (grammar-parametrization-each-permutation grammar-parametrization f rest-arguments (acons argument attribute bound-argument-alist)))) + (funcall f bound-argument-alist))) + + +; If general-grammar-symbol is a generic-nonterminal, return one possible binding permutation of its arguments; +; otherwise return nil. +(defun nonterminal-sample-bound-argument-alist (grammar-parametrization general-grammar-symbol) + (when (generic-nonterminal? general-grammar-symbol) + (grammar-parametrization-each-permutation + grammar-parametrization + #'(lambda (bound-argument-alist) (return-from nonterminal-sample-bound-argument-alist bound-argument-alist)) + (general-grammar-symbol-arguments general-grammar-symbol)))) + + +; If the grammar symbol is a generic nonterminal, convert it into an attributed nonterminal +; by instantiating its arguments with the corresponding attributes from the bound-argument-alist. +; If the grammar symbol is already an attributed or plain nonterminal, return it unchanged. +(defun instantiate-general-grammar-symbol (bound-argument-alist general-grammar-symbol) + (if (generic-nonterminal? general-grammar-symbol) + (make-attributed-nonterminal + (generic-nonterminal-symbol general-grammar-symbol) + (mapcar #'(lambda (parameter) + (if (nonterminal-argument? parameter) + (let ((binding (assoc parameter bound-argument-alist :test #'eq))) + (if binding + (cdr binding) + (error "Unbound nonterminal argument ~S" parameter))) + parameter)) + (generic-nonterminal-parameters general-grammar-symbol))) + (assert-type general-grammar-symbol grammar-symbol))) + + +; If the grammar symbol is a generic nonterminal parametrized on argument, substitute +; attribute for argument in it and return the modified grammar symbol. Otherwise, return it unchanged. +(defun general-grammar-symbol-substitute (attribute argument general-grammar-symbol) + (assert-type attribute nonterminal-attribute) + (assert-type argument nonterminal-argument) + (if (and (generic-nonterminal? general-grammar-symbol) + (member argument (generic-nonterminal-parameters general-grammar-symbol) :test #'eq)) + (make-generic-nonterminal + (generic-nonterminal-symbol general-grammar-symbol) + (substitute attribute argument (generic-nonterminal-parameters general-grammar-symbol) :test #'eq)) + (assert-type general-grammar-symbol general-grammar-symbol))) + + +; If the general grammar symbol is a generic nonterminal, return a list of all possible attributed nonterminals +; that can be instantiated from it; otherwise, return a one-element list containing the given general grammar symbol. +(defun general-grammar-symbol-instances (grammar-parametrization general-grammar-symbol) + (if (generic-nonterminal? general-grammar-symbol) + (let ((instances nil)) + (grammar-parametrization-each-permutation + grammar-parametrization + #'(lambda (bound-argument-alist) + (push (instantiate-general-grammar-symbol bound-argument-alist general-grammar-symbol) instances)) + (general-grammar-symbol-arguments general-grammar-symbol)) + (nreverse instances)) + (list (assert-type general-grammar-symbol grammar-symbol)))) + + +; Return true if grammar-symbol can be obtained by calling instantiate-general-grammar-symbol on +; general-grammar-symbol. +(defun general-nonterminal-is-instance? (grammar-parametrization general-grammar-symbol grammar-symbol) + (or (grammar-symbol-= general-grammar-symbol grammar-symbol) + (and (generic-nonterminal? general-grammar-symbol) + (attributed-nonterminal? grammar-symbol) + (let ((parameters (generic-nonterminal-parameters general-grammar-symbol)) + (attributes (attributed-nonterminal-attributes grammar-symbol))) + (and (= (length parameters) (length attributes)) + (every #'(lambda (parameter attribute) + (or (eq parameter attribute) + (and (nonterminal-argument? parameter) + (member attribute (grammar-parametrization-lookup-argument grammar-parametrization parameter) :test #'eq)))) + parameters + attributes)))))) diff --git a/mozilla/js/semantics/HTML.lisp b/mozilla/js/semantics/HTML.lisp new file mode 100644 index 00000000000..a854f816e5f --- /dev/null +++ b/mozilla/js/semantics/HTML.lisp @@ -0,0 +1,531 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1999 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; HTML output generator +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; ------------------------------------------------------------------------------------------------------ +;;; ELEMENTS + +(defstruct (html-element (:constructor make-html-element (name self-closing indent + newlines-before newlines-begin newlines-end newlines-after)) + (:predicate html-element?)) + (name nil :type symbol :read-only t) ;Name of the tag + (self-closing nil :type bool :read-only t) ;True if the closing tag should be omitted + (indent nil :type integer :read-only t) ;Number of spaces by which to indent this tag's contents in HTML source + (newlines-before nil :type integer :read-only t) ;Number of HTML source newlines preceding the opening tag + (newlines-begin nil :type integer :read-only t) ;Number of HTML source newlines immediately following the opening tag + (newlines-end nil :type integer :read-only t) ;Number of HTML source newlines immediately preceding the closing tag + (newlines-after nil :type integer :read-only t)) ;Number of HTML source newlines following the closing tag + + +; Define symbol to refer to the given html-element. +(defun define-html (symbol newlines-before newlines-begin newlines-end newlines-after &key self-closing (indent 0)) + (setf (get symbol 'html-element) (make-html-element symbol self-closing indent + newlines-before newlines-begin newlines-end newlines-after))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; ELEMENT DEFINITIONS + +(define-html 'a 0 0 0 0) +(define-html 'b 0 0 0 0) +(define-html 'blockquote 1 0 0 1 :indent 2) +(define-html 'body 1 1 1 1) +(define-html 'br 0 0 0 1 :self-closing t) +(define-html 'code 0 0 0 0) +(define-html 'dd 1 0 0 1 :indent 2) +(define-html 'del 0 0 0 0) +(define-html 'div 1 0 0 1 :indent 2) +(define-html 'dl 1 0 0 2 :indent 2) +(define-html 'dt 1 0 0 1 :indent 2) +(define-html 'em 0 0 0 0) +(define-html 'h1 1 0 0 2 :indent 2) +(define-html 'h2 1 0 0 2 :indent 2) +(define-html 'h3 1 0 0 2 :indent 2) +(define-html 'h4 1 0 0 2 :indent 2) +(define-html 'h5 1 0 0 2 :indent 2) +(define-html 'h6 1 0 0 2 :indent 2) +(define-html 'head 1 1 1 2) +(define-html 'hr 1 0 0 1 :self-closing t) +(define-html 'html 0 1 1 1) +(define-html 'i 0 0 0 0) +(define-html 'li 1 0 0 1 :indent 2) +(define-html 'link 1 0 0 1 :self-closing t) +(define-html 'ol 1 1 1 2 :indent 2) +(define-html 'p 1 0 0 2) +(define-html 'span 0 0 0 0) +(define-html 'strong 0 0 0 0) +(define-html 'sub 0 0 0 0) +(define-html 'sup 0 0 0 0) +(define-html 'table 1 1 1 2) +(define-html 'td 1 0 0 1 :indent 2) +(define-html 'th 1 0 0 1 :indent 2) +(define-html 'title 1 0 0 1) +(define-html 'tr 1 0 0 1 :indent 2) +(define-html 'u 0 0 0 0) +(define-html 'ul 1 1 1 2 :indent 2) +(define-html 'var 0 0 0 0) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; ENTITIES + +(defvar *html-entities-list* + '((#\& . "amp") + (#\" . "quot") + (#\< . "lt") + (#\> . "gt") + (nbsp . "nbsp"))) + +(defvar *html-entities-hash* (make-hash-table)) + +(dolist (entity-binding *html-entities-list*) + (setf (gethash (first entity-binding) *html-entities-hash*) (rest entity-binding))) + + +; Return a freshly consed list of that represent the characters in the string except that +; '&', '<', and '>' are replaced by their entities and spaces are replaced by the entity +; given by the space parameter (which should be either 'space or 'nbsp). +(defun escape-html-characters (string space) + (let ((html-sources nil)) + (labels + ((escape-remainder (start) + (let ((i (position-if #'(lambda (char) (member char '(#\& #\< #\> #\space))) string :start start))) + (if i + (let ((char (char string i))) + (unless (= i start) + (push (subseq string start i) html-sources)) + (push (if (eql char #\space) space char) html-sources) + (escape-remainder (1+ i))) + (push (if (zerop start) string (subseq string start)) html-sources))))) + (unless (zerop (length string)) + (escape-remainder 0)) + (nreverse html-sources)))) + + +; Escape all content strings in the html-source, while interpreting :nowrap pseudo-tags. +; Return a freshly consed list of html-sources. +(defun escape-html-source (html-source space) + (cond + ((stringp html-source) + (escape-html-characters html-source space)) + ((or (characterp html-source) (symbolp html-source) (integerp html-source)) + (list html-source)) + ((consp html-source) + (let ((tag (first html-source)) + (contents (rest html-source))) + (if (eq tag ':nowrap) + (mapcan #'(lambda (html-source) (escape-html-source html-source 'nbsp)) contents) + (list (cons tag + (mapcan #'(lambda (html-source) (escape-html-source html-source space)) contents)))))) + (t (error "Bad html-source: ~S" html-source)))) + + +; Escape all content strings in the html-source, while interpreting :nowrap pseudo-tags. +(defun escape-html (html-source) + (let ((results (escape-html-source html-source 'space))) + (assert-true (= (length results) 1)) + (first results))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; HTML WRITER + +;; has one of the following formats: +;; ;String to be printed literally +;; ;Named entity +;; ;Numbered entity +;; space ;Space or newline +;; ( ... ) ;Tag and its contents +;; ((:nest ... ) ... ) ;Equivalent to ( (... ( ... ))) +;; +;; has one of the following formats: +;; ;Tag with no attributes +;; ( ... ) ;Tag with attributes +;; :nowrap ;Pseudo-tag indicating that spaces in contents should be non-breaking +;; +;; has one of the following formats: +;; ( ) ;Attribute name and value +;; () ;Attribute name with omitted value + + +(defparameter *html-right-margin* 100) + +(defvar *current-html-pos*) ;Number of characters written to the current line of the stream; nil if *current-html-newlines* is nonzero +(defvar *current-html-pending*) ;String following a space or newline pending to be printed on the current line or nil if none +(defvar *current-html-indent*) ;Indent to use for emit-html-newlines-and-indent calls +(defvar *current-html-newlines*) ;Number of consecutive newlines just written to the stream; zero if last character wasn't a newline + + +; Flush *current-html-pending* onto the stream. +(defun flush-current-html-pending (stream) + (when *current-html-pending* + (unless (zerop (length *current-html-pending*)) + (write-char #\space stream) + (write-string *current-html-pending* stream) + (incf *current-html-pos* (1+ (length *current-html-pending*)))) + (setq *current-html-pending* nil))) + + +; Emit n-newlines onto the stream and indent the next line by *current-html-indent* spaces. +(defun emit-html-newlines-and-indent (stream n-newlines) + (decf n-newlines *current-html-newlines*) + (when (plusp n-newlines) + (flush-current-html-pending stream) + (dotimes (i n-newlines) + (write-char #\newline stream)) + (incf *current-html-newlines* n-newlines) + (setq *current-html-pos* nil))) + + +; Write the string to the stream, observing *current-html-pending* and *current-html-pos*. +(defun write-html-string (stream html-string) + (unless (zerop (length html-string)) + (unless *current-html-pos* + (setq *current-html-newlines* 0) + (write-string (make-string *current-html-indent* :initial-element #\space) stream) + (setq *current-html-pos* *current-html-indent*)) + (if *current-html-pending* + (progn + (setq *current-html-pending* (if (zerop (length *current-html-pending*)) + html-string + (concatenate 'string *current-html-pending* html-string))) + (when (>= (+ *current-html-pos* (length *current-html-pending*)) *html-right-margin*) + (write-char #\newline stream) + (write-string *current-html-pending* stream) + (setq *current-html-pos* (length *current-html-pending*)) + (setq *current-html-pending* nil))) + (progn + (write-string html-string stream) + (incf *current-html-pos* (length html-string)))))) + + +; Emit the html tag with the given tag-symbol (name), attributes, and contents. +(defun write-html-tag (stream tag-symbol attributes contents) + (let ((element (assert-non-null (get tag-symbol 'html-element)))) + (emit-html-newlines-and-indent stream (html-element-newlines-before element)) + (write-html-string stream (format nil "<~A" (html-element-name element))) + (let ((*current-html-indent* (+ *current-html-indent* (html-element-indent element)))) + (dolist (attribute attributes) + (let ((name (first attribute)) + (value (second attribute))) + (write-html-source stream 'space) + (write-html-string stream (string-downcase (symbol-name name))) + (when value + (write-html-string stream (format nil "=\"~A\"" value))))) + (write-html-string stream ">") + (emit-html-newlines-and-indent stream (html-element-newlines-begin element)) + (dolist (html-source contents) + (write-html-source stream html-source))) + (unless (html-element-self-closing element) + (emit-html-newlines-and-indent stream (html-element-newlines-end element)) + (write-html-string stream (format nil "" (html-element-name element)))) + (emit-html-newlines-and-indent stream (html-element-newlines-after element)))) + + +; Write html-source to the character stream. +(defun write-html-source (stream html-source) + (cond + ((stringp html-source) + (write-html-string stream html-source)) + ((eq html-source 'space) + (when (zerop *current-html-newlines*) + (flush-current-html-pending stream) + (setq *current-html-pending* ""))) + ((or (characterp html-source) (symbolp html-source)) + (let ((entity-name (gethash html-source *html-entities-hash*))) + (cond + (entity-name + (write-html-string stream (format nil "&~A;" entity-name))) + ((characterp html-source) + (write-html-string stream (string html-source))) + (t (error "Bad html-source ~S" html-source))))) + ((integerp html-source) + (assert-true (and (>= html-source 0) (< html-source 65536))) + (write-html-string stream (format nil "&#~D;" html-source))) + ((consp html-source) + (let ((tag (first html-source)) + (contents (rest html-source))) + (if (consp tag) + (write-html-tag stream (first tag) (rest tag) contents) + (write-html-tag stream tag nil contents)))) + (t (error "Bad html-source: ~S" html-source)))) + + +; Write the top-level html-source to the character stream. +(defun write-html (html-source &optional (stream t)) + (with-standard-io-syntax + (let ((*print-readably* nil) + (*print-escape* nil) + (*print-case* :upcase) + (*current-html-pos* nil) + (*current-html-pending* nil) + (*current-html-indent* 0) + (*current-html-newlines* 9999)) + (write-string "" stream) + (write-char #\newline stream) + (write-html-source stream (escape-html html-source))))) + + +; Write html to the text file with the given name (relative to the +; local directory). +(defun write-html-to-local-file (filename html) + (with-open-file (stream (merge-pathnames filename *semantic-engine-directory*) + :direction :output + :if-exists :supersede + #+mcl :mac-file-creator #+mcl "MOSS") + (write-html html stream))) + + +; Expand the :nest constructs inside html-source. +(defun unnest-html-source (html-source) + (labels + ((unnest-tags (tags contents) + (assert-true tags) + (cons (first tags) + (if (endp (rest tags)) + contents + (list (unnest-tags (rest tags) contents)))))) + (if (consp html-source) + (let ((tag (first html-source)) + (contents (rest html-source))) + (if (and (consp tag) (eq (first tag) ':nest)) + (unnest-html-source (unnest-tags (rest tag) contents)) + (cons tag (mapcar #'unnest-html-source contents)))) + html-source))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; HTML MAPPINGS + +(defparameter *html-definitions* + '(((:new-line t) (br)) + + ;Misc. + (:tab2 nbsp nbsp) + (:tab3 nbsp nbsp nbsp) + + ;Symbols (-10 suffix means 10-point, etc.) + ((:bullet 1) #x2022) + ((:minus 1) "-") + ((:not-equal 1) #x2260) + ((:less-or-equal 1) #x2264) + ((:greater-or-equal 1) #x2265) + ((:infinity 1) #x221E) + ((:left-single-quote 1) #x2018) + ((:right-single-quote 1) #x2019) + ((:left-double-quote 1) #x201C) + ((:right-double-quote 1) #x201D) + ((:left-angle-quote 1) #x00AB) + ((:right-angle-quote 1) #x00BB) + ((:bottom-10 1) (:symbol #\x5E)) ;#x22A5 + ((:up-arrow-10 1) (:symbol #\xAD)) ;#x2191 + ((:function-arrow-10 2) (:symbol #\xAE)) ;#x2192 + ((:cartesian-product-10 2) #x00D7) + ((:identical-10 2) (:symbol #\xBA)) ;#x2261 + ((:member-10 2) (:symbol #\xCE)) ;#x2208 + ((:derives-10 2) (:symbol #\xDE)) ;#x21D2 + ((:left-triangle-bracket-10 1) (:symbol #\xE1)) ;#x2329 + ((:right-triangle-bracket-10 1) (:symbol #\xF1)) ;#x232A + ((:big-plus-10 2) (:symbol #\xA8)) ;#x271A + + ((:alpha 1) (:symbol "a")) + ((:beta 1) (:symbol "b")) + ((:chi 1) (:symbol "c")) + ((:delta 1) (:symbol "d")) + ((:epsilon 1) (:symbol "e")) + ((:phi 1) (:symbol "f")) + ((:gamma 1) (:symbol "g")) + ((:eta 1) (:symbol "h")) + ((:iota 1) (:symbol "i")) + ((:kappa 1) (:symbol "k")) + ((:lambda 1) (:symbol "l")) + ((:mu 1) (:symbol "m")) + ((:nu 1) (:symbol "n")) + ((:omicron 1) (:symbol "o")) + ((:pi 1) (:symbol "p")) + ((:theta 1) (:symbol "q")) + ((:rho 1) (:symbol "r")) + ((:sigma 1) (:symbol "s")) + ((:tau 1) (:symbol "t")) + ((:upsilon 1) (:symbol "u")) + ((:omega 1) (:symbol "w")) + ((:xi 1) (:symbol "x")) + ((:psi 1) (:symbol "y")) + ((:zeta 1) (:symbol "z")) + + ;Block Styles + (:body-text p) + (:section-heading h2) + (:subsection-heading h3) + (:grammar-header h4) + (:grammar-rule (:nest :nowrap (div (class "grammar-rule")))) + (:grammar-lhs (:nest :nowrap (div (class "grammar-lhs")))) + (:grammar-lhs-last :grammar-lhs) + (:grammar-rhs (:nest :nowrap (div (class "grammar-rhs")))) + (:grammar-rhs-last :grammar-rhs) + (:grammar-argument (:nest :nowrap (div (class "grammar-argument")))) + (:semantics (:nest :nowrap (p (class "semantics")))) + (:semantics-next (:nest :nowrap (p (class "semantics-next")))) + + ;Inline Styles + (:symbol (span (class "symbol"))) + (:character-literal code) + (:character-literal-control (span (class "control"))) + (:terminal (span (class "terminal"))) + (:terminal-keyword (code (class "terminal-keyword"))) + (:nonterminal (var (class "nonterminal"))) + (:nonterminal-attribute (span (class "nonterminal-attribute"))) + (:nonterminal-argument (span (class "nonterminal-argument"))) + (:semantic-keyword (span (class "semantic-keyword"))) + (:type-expression (span (class "type-expression"))) + (:type-name (span (class "type-name"))) + (:field-name (span (class "field-name"))) + (:global-variable (span (class "global-variable"))) + (:local-variable (span (class "local-variable"))) + (:action-name (span (class "action-name"))) + + ;Specials + (:invisible del) + ((:but-not 6) (b "except")) + (:subscript sub) + (:superscript sup) + (:plain-subscript :subscript) + ((:action-begin 1) "[") + ((:action-end 1) "]") + ((:vector-begin 1) (b "[")) + ((:vector-end 1) (b "]")) + ((:empty-vector 2) (b "[]")) + ((:vector-append 2) :big-plus-10) + ((:tuple-begin 1) (b :left-triangle-bracket-10)) + ((:tuple-end 1) (b :right-triangle-bracket-10)) + ((:unit 4) (:global-variable "unit")) + ((:true 4) (:global-variable "true")) + ((:false 5) (:global-variable "false")) + )) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; HTML STREAMS + +(defstruct (html-stream (:include markup-stream) + (:constructor allocate-html-stream (env head tail level logical-position)) + (:copier nil) + (:predicate html-stream?))) + + +(defmethod print-object ((html-stream html-stream) stream) + (print-unreadable-object (html-stream stream :identity t) + (write-string "html-stream" stream))) + + +; Make a new, empty, open html-stream with the given definitions for its markup-env. +(defun make-html-stream (markup-env level &optional logical-position) + (let ((head (list nil))) + (allocate-html-stream markup-env head head level logical-position))) + + +; Make a new, empty, open, top-level html-stream with the given definitions +; for its markup-env. +(defun make-top-level-html-stream (html-definitions) + (let ((head (list nil)) + (markup-env (make-markup-env))) + (markup-env-define-alist markup-env html-definitions) + (allocate-html-stream markup-env head head *markup-stream-top-level* nil))) + + +; Return the approximate width of the html item; return t if it is a line break. +; Also allow html tags as long as they do not contain line breaks. +(defmethod markup-group-width ((html-stream html-stream) item) + (if (consp item) + (reduce #'+ (rest item) :key #'(lambda (subitem) (markup-group-width html-stream subitem))) + (markup-width html-stream item))) + + +; Create a top-level html-stream and call emitter to emit its contents. +; emitter takes one argument -- an html-stream to which it should emit paragraphs. +; Return the top-level html-stream. +(defun depict-html-top-level (emitter title) + (let ((html-stream (make-top-level-html-stream *html-definitions*))) + (markup-stream-append1 html-stream 'html) + (depict-block-style (html-stream 'head) + (depict-block-style (html-stream 'title) + (markup-stream-append1 html-stream title)) + (markup-stream-append1 html-stream '((link (rel "stylesheet") (href "styles.css"))))) + (depict-block-style (html-stream 'body) + (funcall emitter html-stream)) + html-stream)) + + +; Create a top-level html-stream and call emitter to emit its contents. +; emitter takes one argument -- an html-stream to which it should emit paragraphs. +; Write the resulting html to the text file with the given name (relative to the +; local directory). +(defun depict-html-to-local-file (filename emitter title) + (let ((top-html-stream (depict-html-top-level emitter title))) + (write-html-to-local-file filename (markup-stream-output top-html-stream)))) + + +; Return the markup accumulated in the markup-stream after expanding all of its macros. +; The markup-stream is closed after this function is called. +(defmethod markup-stream-output ((html-stream html-stream)) + (unnest-html-source + (markup-env-expand (markup-stream-env html-stream) (markup-stream-unexpanded-output html-stream) '(:nowrap :nest)))) + + + +(defmethod depict-block-style-f ((html-stream html-stream) block-style emitter) + (assert-true (<= (markup-stream-level html-stream) *markup-stream-paragraph-level*)) + (assert-true (and block-style (symbolp block-style))) + (let ((inner-html-stream (make-html-stream (markup-stream-env html-stream) *markup-stream-paragraph-level* nil))) + (markup-stream-append1 inner-html-stream block-style) + (prog1 + (funcall emitter inner-html-stream) + (markup-stream-append1 html-stream (markup-stream-unexpanded-output inner-html-stream))))) + + +(defmethod depict-paragraph-f ((html-stream html-stream) paragraph-style emitter) + (assert-true (= (markup-stream-level html-stream) *markup-stream-paragraph-level*)) + (assert-true (and paragraph-style (symbolp paragraph-style))) + (let ((inner-html-stream (make-html-stream (markup-stream-env html-stream) *markup-stream-content-level* (make-logical-position)))) + (markup-stream-append1 inner-html-stream paragraph-style) + (prog1 + (funcall emitter inner-html-stream) + (markup-stream-append1 html-stream (markup-stream-unexpanded-output inner-html-stream))))) + + +(defmethod depict-char-style-f ((html-stream html-stream) char-style emitter) + (assert-true (>= (markup-stream-level html-stream) *markup-stream-content-level*)) + (assert-true (and char-style (symbolp char-style))) + (let ((inner-html-stream (make-html-stream (markup-stream-env html-stream) *markup-stream-content-level* (markup-stream-logical-position html-stream)))) + (markup-stream-append1 inner-html-stream char-style) + (prog1 + (funcall emitter inner-html-stream) + (markup-stream-append1 html-stream (markup-stream-unexpanded-output inner-html-stream))))) + + +#| +(write-html + '(html + (head + (:nowrap (title "This is my title!<>"))) + ((body (atr1 "abc") (beta) (qq)) + "My page this is " (br) (p)))) +|# diff --git a/mozilla/js/semantics/JS14.html b/mozilla/js/semantics/JS14.html new file mode 100644 index 00000000000..a28114fc04c --- /dev/null +++ b/mozilla/js/semantics/JS14.html @@ -0,0 +1,800 @@ + + + +JavaScript 2.0 Grammar + + + + +

Expressions

+ +

Primary Expressions

+ +
+
PrimaryExpression Þ
+
   this
+
|  null
+
|  true
+
|  false
+
|  Number
+
|  String
+
|  Identifier
+
|  RegularExpression
+
|  ( Expression )
+
+

Left-Side Expressions

+ +
c Î {allowCallsnoCalls}
+
a Î {allowInnoIn}
+
+
MemberExpressionnoCalls Þ
+
   PrimaryExpression
+
|  MemberExpressionnoCalls [ Expression ]
+
|  MemberExpressionnoCalls . Identifier
+
|  new MemberExpressionnoCalls Arguments
+
+
+
MemberExpressionallowCalls Þ
+
   MemberExpressionnoCalls Arguments
+
|  MemberExpressionallowCalls Arguments
+
|  MemberExpressionallowCalls [ Expression ]
+
|  MemberExpressionallowCalls . Identifier
+
+
+
NewExpression Þ
+
   MemberExpressionnoCalls
+
|  new NewExpression
+
+
+
Arguments Þ
+
   ( )
+
|  ( ArgumentList )
+
+
+
ArgumentList Þ
+
   AssignmentExpressionallowIn
+
|  ArgumentList , AssignmentExpressionallowIn
+
+
+
LeftSideExpression Þ
+
   NewExpression
+
|  MemberExpressionallowCalls
+
+

Postfix Expressions

+ +
+
PostfixExpression Þ
+
   LeftSideExpression
+
|  LeftSideExpression ++
+
|  LeftSideExpression --
+
+

Unary Operators

+ +
+
UnaryExpression Þ
+
   PostfixExpression
+
|  delete LeftSideExpression
+
|  void UnaryExpression
+
|  typeof UnaryExpression
+
|  ++ LeftSideExpression
+
|  -- LeftSideExpression
+
|  + UnaryExpression
+
|  - UnaryExpression
+
|  ~ UnaryExpression
+
|  ! UnaryExpression
+
+

Multiplicative Operators

+ +
+
MultiplicativeExpression Þ
+
   UnaryExpression
+
|  MultiplicativeExpression * UnaryExpression
+
|  MultiplicativeExpression / UnaryExpression
+
|  MultiplicativeExpression % UnaryExpression
+
+

Additive Operators

+ +
+
AdditiveExpression Þ
+
   MultiplicativeExpression
+
|  AdditiveExpression + MultiplicativeExpression
+
|  AdditiveExpression - MultiplicativeExpression
+
+

Bitwise Shift Operators

+ +
+
ShiftExpression Þ
+
   AdditiveExpression
+
|  ShiftExpression << AdditiveExpression
+
|  ShiftExpression >> AdditiveExpression
+
|  ShiftExpression >>> AdditiveExpression
+
+

Relational Operators

+ +
+
RelationalExpressionallowIn Þ
+
   ShiftExpression
+
|  RelationalExpressionallowIn < ShiftExpression
+
|  RelationalExpressionallowIn > ShiftExpression
+
|  RelationalExpressionallowIn <= ShiftExpression
+
|  RelationalExpressionallowIn >= ShiftExpression
+
|  RelationalExpressionallowIn instanceof ShiftExpression
+
|  RelationalExpressionallowIn in ShiftExpression
+
+
+
RelationalExpressionnoIn Þ
+
   ShiftExpression
+
|  RelationalExpressionnoIn < ShiftExpression
+
|  RelationalExpressionnoIn > ShiftExpression
+
|  RelationalExpressionnoIn <= ShiftExpression
+
|  RelationalExpressionnoIn >= ShiftExpression
+
|  RelationalExpressionnoIn instanceof ShiftExpression
+
+

Equality Operators

+ +
+
EqualityExpressiona Þ
+
   RelationalExpressiona
+
|  EqualityExpressiona == RelationalExpressiona
+
|  EqualityExpressiona != RelationalExpressiona
+
|  EqualityExpressiona === RelationalExpressiona
+
|  EqualityExpressiona !== RelationalExpressiona
+
+

Binary Bitwise Operators

+ +
+
BitwiseAndExpressiona Þ
+
   EqualityExpressiona
+
|  BitwiseAndExpressiona & EqualityExpressiona
+
+
+
BitwiseXorExpressiona Þ
+
   BitwiseAndExpressiona
+
|  BitwiseXorExpressiona ^ BitwiseAndExpressiona
+
+
+
BitwiseOrExpressiona Þ
+
   BitwiseXorExpressiona
+
|  BitwiseOrExpressiona | BitwiseXorExpressiona
+
+

Binary Logical Operators

+ +
+
LogicalAndExpressiona Þ
+
   BitwiseOrExpressiona
+
|  LogicalAndExpressiona && BitwiseOrExpressiona
+
+
+
LogicalOrExpressiona Þ
+
   LogicalAndExpressiona
+
|  LogicalOrExpressiona || LogicalAndExpressiona
+
+

Conditional Operator

+ +
+
ConditionalExpressiona Þ
+
   LogicalOrExpressiona
+
|  LogicalOrExpressiona ? AssignmentExpressiona : AssignmentExpressiona
+
+

Assignment Operators

+ +
+
AssignmentExpressiona Þ
+
   ConditionalExpressiona
+
|  LeftSideExpression = AssignmentExpressiona
+
|  LeftSideExpression CompoundAssignment AssignmentExpressiona
+
+
+
CompoundAssignment Þ
+
   *=
+
|  /=
+
|  %=
+
|  +=
+
|  -=
+
+

Expressions

+ +
+
CommaExpressiona Þ AssignmentExpressiona
+
+
+
Expression Þ CommaExpressionallowIn
+
+
+
OptionalExpression Þ
+
   Expression
+
|  «empty»
+
+

Statements

+ +
w Î {abbrevabbrevNonEmptyabbrevNoShortIffull}
+
+
Statementw Þ
+
   BlocklikeStatement
+
|  UnterminatedStatement ;
+
|  NonuniformStatementw
+
|  IfStatementw
+
|  WhileStatementw
+
|  ForStatementw
+
|  LabeledStatementw
+
+
+
NonuniformStatementabbrev Þ
+
   EmptyStatement ;
+
|  EmptyStatement
+
|  UnterminatedStatement
+
+
+
NonuniformStatementabbrevNonEmpty Þ
+
   EmptyStatement ;
+
|  UnterminatedStatement
+
+
+
NonuniformStatementabbrevNoShortIf Þ
+
   EmptyStatement ;
+
|  UnterminatedStatement
+
|  EmptyStatement
+
+
+
NonuniformStatementfull Þ EmptyStatement ;
+
+
+
BlocklikeStatement Þ
+
   Block
+
|  SwitchStatement
+
|  TryStatement
+
+
+
UnterminatedStatement Þ
+
   VariableStatement
+
|  ExpressionStatement
+
|  DoStatement
+
|  ContinueStatement
+
|  BreakStatement
+
|  ReturnStatement
+
|  ThrowStatement
+
+

Block

+ +
+
Block Þ { BlockStatements }
+
+
+
BlockStatements Þ
+
   Statementabbrev
+
|  BlockStatementsPrefix StatementabbrevNonEmpty
+
+
+
BlockStatementsPrefix Þ
+
   Statementfull
+
|  BlockStatementsPrefix Statementfull
+
+

Variable Statement

+ +
+
VariableStatement Þ var VariableDeclarationListallowIn
+
+
+
VariableDeclarationLista Þ
+
   VariableDeclarationa
+
|  VariableDeclarationLista , VariableDeclarationa
+
+
+
VariableDeclarationa Þ
+
   Identifier
+
|  Identifier = AssignmentExpressiona
+
+

Empty Statement

+ +
+
EmptyStatement Þ «empty»
+
+

Expression Statement

+ +
+
ExpressionStatement Þ Expression
+
+

If Statement

+ +
+
IfStatementabbrev Þ
+
   if ( Expression ) Statementabbrev
+
|  if ( Expression ) StatementabbrevNoShortIf else Statementabbrev
+
+
+
IfStatementabbrevNonEmpty Þ
+
   if ( Expression ) StatementabbrevNonEmpty
+
|  if ( Expression ) StatementabbrevNoShortIf else StatementabbrevNonEmpty
+
+
+
IfStatementfull Þ
+
   if ( Expression ) Statementfull
+
|  if ( Expression ) StatementabbrevNoShortIf else Statementfull
+
+
+
IfStatementabbrevNoShortIf Þ if ( Expression ) StatementabbrevNoShortIf else StatementabbrevNoShortIf
+
+

Do-While Statement

+ +
+
DoStatement Þ do StatementabbrevNonEmpty while ( Expression )
+
+

While Statement

+ +
+
WhileStatementw Þ while ( Expression ) Statementw
+
+

For Statements

+ +
+
ForStatementw Þ
+
   for ( ForInitializer ; OptionalExpression ; OptionalExpression ) Statementw
+
|  for ( ForInBinding in Expression ) Statementw
+
+
+
ForInitializer Þ
+
   «empty»
+
|  CommaExpressionnoIn
+
|  var VariableDeclarationListnoIn
+
+
+
ForInBinding Þ
+
   LeftSideExpression
+
|  var VariableDeclarationnoIn
+
+

Continue and Break Statements

+ +
+
ContinueStatement Þ continue OptionalLabel
+
+
+
BreakStatement Þ break OptionalLabel
+
+
+
OptionalLabel Þ
+
   «empty»
+
|  Identifier
+
+

Labeled Statements

+ +
+
LabeledStatementw Þ Identifier : Statementw
+
+

Return Statement

+ +
+
ReturnStatement Þ return OptionalExpression
+
+

Switch Statement

+ +
+
SwitchStatement Þ
+
   switch ( Expression ) { }
+
|  switch ( Expression ) { CaseGroups LastCaseGroup }
+
+
+
CaseGroups Þ
+
   «empty»
+
|  CaseGroups CaseGroup
+
+
+
CaseGroup Þ CaseGuards BlockStatementsPrefix
+
+
+
LastCaseGroup Þ CaseGuards BlockStatements
+
+
+
CaseGuards Þ
+
   CaseGuard
+
|  CaseGuards CaseGuard
+
+
+
CaseGuard Þ
+
   case Expression :
+
|  default :
+
+

Throw Statement

+ +
+
ThrowStatement Þ throw Expression
+
+

Try Statement

+ +
+
TryStatement Þ
+
   try Block CatchClauses
+
|  try Block FinallyClause
+
|  try Block CatchClauses FinallyClause
+
+
+
CatchClauses Þ
+
   CatchClause
+
|  CatchClauses CatchClause
+
+
+
CatchClause Þ catch ( Identifier ) Block
+
+
+
FinallyClause Þ finally Block
+
+

Functions

+ +
+
FunctionDeclaration Þ function Identifier ( FormalParameters ) { FunctionStatements }
+
+
+
FormalParameters Þ
+
   «empty»
+
|  FormalParametersPrefix
+
+
+
FormalParametersPrefix Þ
+
   Identifier
+
|  FormalParametersPrefix , Identifier
+
+
+
FunctionStatements Þ
+
   FunctionStatementabbrev
+
|  FunctionStatementsPrefix FunctionStatementabbrevNonEmpty
+
+
+
FunctionStatementsPrefix Þ
+
   FunctionStatementfull
+
|  FunctionStatementsPrefix FunctionStatementfull
+
+
+
FunctionStatementw Þ
+
   Statementw
+
|  FunctionDeclaration
+
+

Programs

+ +
+
Program Þ FunctionStatements
+
+ + diff --git a/mozilla/js/semantics/JS14.lisp b/mozilla/js/semantics/JS14.lisp new file mode 100644 index 00000000000..82faa35511a --- /dev/null +++ b/mozilla/js/semantics/JS14.lisp @@ -0,0 +1,361 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1999 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; Sample JavaScript 1.x grammar +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + +(declaim (optimize (debug 3))) + +(progn + (defparameter *jw* + (generate-world + "J" + '((grammar code-grammar :lr-1 :program) + + (%section "Expressions") + + (%subsection "Primary Expressions") + (production :primary-expression (this) primary-expression-this) + (production :primary-expression (null) primary-expression-null) + (production :primary-expression (true) primary-expression-true) + (production :primary-expression (false) primary-expression-false) + (production :primary-expression ($number) primary-expression-number) + (production :primary-expression ($string) primary-expression-string) + (production :primary-expression ($identifier) primary-expression-identifier) + (production :primary-expression ($regular-expression) primary-expression-regular-expression) + (production :primary-expression (\( :expression \)) primary-expression-parentheses) + + + (%subsection "Left-Side Expressions") + (grammar-argument :chi allow-calls no-calls) + (grammar-argument :alpha allow-in no-in) + + (production (:member-expression no-calls) (:primary-expression) member-expression-primary-expression) + (production (:member-expression allow-calls) ((:member-expression no-calls) :arguments) call-expression-call-member-expression) + (production (:member-expression allow-calls) ((:member-expression allow-calls) :arguments) call-expression-call-call-expression) + (production (:member-expression :chi) ((:member-expression :chi) \[ :expression \]) member-expression-array) + (production (:member-expression :chi) ((:member-expression :chi) \. $identifier) member-expression-property) + (production (:member-expression no-calls) (new (:member-expression no-calls) :arguments) member-expression-new) + + (production :new-expression ((:member-expression no-calls)) new-expression-member-expression) + (production :new-expression (new :new-expression) new-expression-new) + + (production :arguments (\( \)) arguments-empty) + (production :arguments (\( :argument-list \)) arguments-list) + + (production :argument-list ((:assignment-expression allow-in)) argument-list-one) + (production :argument-list (:argument-list \, (:assignment-expression allow-in)) argument-list-more) + + (production :left-side-expression (:new-expression) left-side-expression-new-expression) + (production :left-side-expression ((:member-expression allow-calls)) left-side-expression-call-expression) + + + (%subsection "Postfix Expressions") + (production :postfix-expression (:left-side-expression) postfix-expression-left-side-expression) + (production :postfix-expression (:left-side-expression ++) postfix-expression-increment) + (production :postfix-expression (:left-side-expression --) postfix-expression-decrement) + + + (%subsection "Unary Operators") + (production :unary-expression (:postfix-expression) unary-expression-postfix) + (production :unary-expression (delete :left-side-expression) unary-expression-delete) + (production :unary-expression (void :unary-expression) unary-expression-void) + (production :unary-expression (typeof :unary-expression) unary-expression-typeof) + (production :unary-expression (++ :left-side-expression) unary-expression-increment) + (production :unary-expression (-- :left-side-expression) unary-expression-decrement) + (production :unary-expression (+ :unary-expression) unary-expression-plus) + (production :unary-expression (- :unary-expression) unary-expression-minus) + (production :unary-expression (~ :unary-expression) unary-expression-bitwise-not) + (production :unary-expression (! :unary-expression) unary-expression-logical-not) + + + (%subsection "Multiplicative Operators") + (production :multiplicative-expression (:unary-expression) multiplicative-expression-unary) + (production :multiplicative-expression (:multiplicative-expression * :unary-expression) multiplicative-expression-multiply) + (production :multiplicative-expression (:multiplicative-expression / :unary-expression) multiplicative-expression-divide) + (production :multiplicative-expression (:multiplicative-expression % :unary-expression) multiplicative-expression-remainder) + + + (%subsection "Additive Operators") + (production :additive-expression (:multiplicative-expression) additive-expression-multiplicative) + (production :additive-expression (:additive-expression + :multiplicative-expression) additive-expression-add) + (production :additive-expression (:additive-expression - :multiplicative-expression) additive-expression-subtract) + + + (%subsection "Bitwise Shift Operators") + (production :shift-expression (:additive-expression) shift-expression-additive) + (production :shift-expression (:shift-expression << :additive-expression) shift-expression-left) + (production :shift-expression (:shift-expression >> :additive-expression) shift-expression-right-signed) + (production :shift-expression (:shift-expression >>> :additive-expression) shift-expression-right-unsigned) + + + (%subsection "Relational Operators") + (production (:relational-expression :alpha) (:shift-expression) relational-expression-shift) + (production (:relational-expression :alpha) ((:relational-expression :alpha) < :shift-expression) relational-expression-less) + (production (:relational-expression :alpha) ((:relational-expression :alpha) > :shift-expression) relational-expression-greater) + (production (:relational-expression :alpha) ((:relational-expression :alpha) <= :shift-expression) relational-expression-less-or-equal) + (production (:relational-expression :alpha) ((:relational-expression :alpha) >= :shift-expression) relational-expression-greater-or-equal) + (production (:relational-expression :alpha) ((:relational-expression :alpha) instanceof :shift-expression) relational-expression-instanceof) + (production (:relational-expression allow-in) ((:relational-expression allow-in) in :shift-expression) relational-expression-in) + + + (%subsection "Equality Operators") + (production (:equality-expression :alpha) ((:relational-expression :alpha)) equality-expression-relational) + (production (:equality-expression :alpha) ((:equality-expression :alpha) == (:relational-expression :alpha)) equality-expression-equal) + (production (:equality-expression :alpha) ((:equality-expression :alpha) != (:relational-expression :alpha)) equality-expression-not-equal) + (production (:equality-expression :alpha) ((:equality-expression :alpha) === (:relational-expression :alpha)) equality-expression-strict-equal) + (production (:equality-expression :alpha) ((:equality-expression :alpha) !== (:relational-expression :alpha)) equality-expression-strict-not-equal) + + + (%subsection "Binary Bitwise Operators") + (production (:bitwise-and-expression :alpha) ((:equality-expression :alpha)) bitwise-and-expression-equality) + (production (:bitwise-and-expression :alpha) ((:bitwise-and-expression :alpha) & (:equality-expression :alpha)) bitwise-and-expression-and) + + (production (:bitwise-xor-expression :alpha) ((:bitwise-and-expression :alpha)) bitwise-xor-expression-bitwise-and) + (production (:bitwise-xor-expression :alpha) ((:bitwise-xor-expression :alpha) ^ (:bitwise-and-expression :alpha)) bitwise-xor-expression-xor) + + (production (:bitwise-or-expression :alpha) ((:bitwise-xor-expression :alpha)) bitwise-or-expression-bitwise-xor) + (production (:bitwise-or-expression :alpha) ((:bitwise-or-expression :alpha) \| (:bitwise-xor-expression :alpha)) bitwise-or-expression-or) + + + (%subsection "Binary Logical Operators") + (production (:logical-and-expression :alpha) ((:bitwise-or-expression :alpha)) logical-and-expression-bitwise-or) + (production (:logical-and-expression :alpha) ((:logical-and-expression :alpha) && (:bitwise-or-expression :alpha)) logical-and-expression-and) + + (production (:logical-or-expression :alpha) ((:logical-and-expression :alpha)) logical-or-expression-logical-and) + (production (:logical-or-expression :alpha) ((:logical-or-expression :alpha) \|\| (:logical-and-expression :alpha)) logical-or-expression-or) + + + (%subsection "Conditional Operator") + (production (:conditional-expression :alpha) ((:logical-or-expression :alpha)) conditional-expression-logical-or) + (production (:conditional-expression :alpha) ((:logical-or-expression :alpha) ? (:assignment-expression :alpha) \: (:assignment-expression :alpha)) conditional-expression-conditional) + + + (%subsection "Assignment Operators") + (production (:assignment-expression :alpha) ((:conditional-expression :alpha)) assignment-expression-conditional) + (production (:assignment-expression :alpha) (:left-side-expression = (:assignment-expression :alpha)) assignment-expression-assignment) + (production (:assignment-expression :alpha) (:left-side-expression :compound-assignment (:assignment-expression :alpha)) assignment-expression-compound) + + (production :compound-assignment (*=) compound-assignment-multiply) + (production :compound-assignment (/=) compound-assignment-divide) + (production :compound-assignment (%=) compound-assignment-remainder) + (production :compound-assignment (+=) compound-assignment-add) + (production :compound-assignment (-=) compound-assignment-subtract) + + + (%subsection "Expressions") + (production (:comma-expression :alpha) ((:assignment-expression :alpha)) comma-expression-assignment) + + (production :expression ((:comma-expression allow-in)) expression-comma-expression) + + (production :optional-expression (:expression) optional-expression-expression) + (production :optional-expression () optional-expression-empty) + + + (%section "Statements") + + (grammar-argument :omega + abbrev ;optional semicolon + abbrev-non-empty ;optional semicolon as long as statement isn't empty + abbrev-no-short-if ;optional semicolon, but statement must not end with an if without an else + full) ;semicolon required at the end + + (production (:statement :omega) (:blocklike-statement) statement-blocklike-statement) + (production (:statement :omega) (:unterminated-statement \;) statement-unterminated-statement) + (production (:statement :omega) ((:nonuniform-statement :omega)) statement-nonuniform-statement) + (production (:statement :omega) ((:if-statement :omega)) statement-if-statement) + (production (:statement :omega) ((:while-statement :omega)) statement-while-statement) + (production (:statement :omega) ((:for-statement :omega)) statement-for-statement) + (production (:statement :omega) ((:labeled-statement :omega)) statement-labeled-statement) + + ;Statements that differ depending on omega + (production (:nonuniform-statement :omega) (:empty-statement \;) nonuniform-statement-empty-statement) + (production (:nonuniform-statement abbrev) (:empty-statement) nonuniform-statement-empty-statement-abbrev) + (production (:nonuniform-statement abbrev) (:unterminated-statement) nonuniform-statement-unterminated-statement-abbrev) + (production (:nonuniform-statement abbrev-non-empty) (:unterminated-statement) nonuniform-statement-unterminated-statement-abbrev-non-empty) + (production (:nonuniform-statement abbrev-no-short-if) (:unterminated-statement) nonuniform-statement-unterminated-statement-abbrev-no-short-if) + (production (:nonuniform-statement abbrev-no-short-if) (:empty-statement) nonuniform-statement-empty-statement-abbrev-no-short-if) + + ;Statements that always end with a '}' + (production :blocklike-statement (:block) blocklike-statement-block) + (production :blocklike-statement (:switch-statement) blocklike-statement-switch-statement) + (production :blocklike-statement (:try-statement) blocklike-statement-try-statement) + + ;Statements that must be followed by a semicolon unless followed by a '}', 'else', or 'while' in a do-while + (production :unterminated-statement (:variable-statement) unterminated-statement-variable-statement) + (production :unterminated-statement (:expression-statement) unterminated-statement-expression-statement) + (production :unterminated-statement (:do-statement) unterminated-statement-do-statement) + (production :unterminated-statement (:continue-statement) unterminated-statement-continue-statement) + (production :unterminated-statement (:break-statement) unterminated-statement-break-statement) + (production :unterminated-statement (:return-statement) unterminated-statement-return-statement) + (production :unterminated-statement (:throw-statement) unterminated-statement-throw-statement) + + + (%subsection "Block") + (production :block ({ :block-statements }) block-block-statements) + + (production :block-statements ((:statement abbrev)) block-statements-one) + (production :block-statements (:block-statements-prefix (:statement abbrev-non-empty)) block-statements-more) + + (production :block-statements-prefix ((:statement full)) block-statements-prefix-one) + (production :block-statements-prefix (:block-statements-prefix (:statement full)) block-statements-prefix-more) + + + (%subsection "Variable Statement") + (production :variable-statement (var (:variable-declaration-list allow-in)) variable-statement-declaration) + + (production (:variable-declaration-list :alpha) ((:variable-declaration :alpha)) variable-declaration-list-one) + (production (:variable-declaration-list :alpha) ((:variable-declaration-list :alpha) \, (:variable-declaration :alpha)) variable-declaration-list-more) + + (production (:variable-declaration :alpha) ($identifier) variable-declaration-identifier) + (production (:variable-declaration :alpha) ($identifier = (:assignment-expression :alpha)) variable-declaration-initializer) + + + (%subsection "Empty Statement") + (production :empty-statement () empty-statement-empty) + + + (%subsection "Expression Statement") + (production :expression-statement (:expression) expression-statement-expression) + + + (%subsection "If Statement") + (production (:if-statement abbrev) (if \( :expression \) (:statement abbrev)) if-statement-if-then-abbrev) + (production (:if-statement abbrev-non-empty) (if \( :expression \) (:statement abbrev-non-empty)) if-statement-if-then-abbrev-non-empty) + (production (:if-statement full) (if \( :expression \) (:statement full)) if-statement-if-then-full) + (production (:if-statement :omega) (if \( :expression \) (:statement abbrev-no-short-if) + else (:statement :omega)) if-statement-if-then-else) + + + (%subsection "Do-While Statement") + (production :do-statement (do (:statement abbrev-non-empty) while \( :expression \)) do-statement-do-while) + + + (%subsection "While Statement") + (production (:while-statement :omega) (while \( :expression \) (:statement :omega)) while-statement-while) + + + (%subsection "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 \) (:statement :omega)) for-statement-in) + + (production :for-initializer () for-initializer-empty) + (production :for-initializer ((:comma-expression no-in)) for-initializer-expression) + (production :for-initializer (var (:variable-declaration-list no-in)) for-initializer-variable-declaration) + + (production :for-in-binding (:left-side-expression) for-in-binding-expression) + (production :for-in-binding (var (:variable-declaration no-in)) for-in-binding-variable-declaration) + + + (%subsection "Continue and Break Statements") + (production :continue-statement (continue :optional-label) continue-statement-optional-label) + + (production :break-statement (break :optional-label) break-statement-optional-label) + + (production :optional-label () optional-label-default) + (production :optional-label ($identifier) optional-label-identifier) + + + (%subsection "Labeled Statements") + (production (:labeled-statement :omega) ($identifier \: (:statement :omega)) labeled-statement-label) + + + (%subsection "Return Statement") + (production :return-statement (return :optional-expression) return-statement-optional-expression) + + + (%subsection "Switch Statement") + (production :switch-statement (switch \( :expression \) { }) switch-statement-empty) + (production :switch-statement (switch \( :expression \) { :case-groups :last-case-group }) switch-statement-cases) + + (production :case-groups () case-groups-empty) + (production :case-groups (:case-groups :case-group) case-groups-more) + + (production :case-group (:case-guards :block-statements-prefix) case-group-block-statements-prefix) + + (production :last-case-group (:case-guards :block-statements) last-case-group-block-statements) + + (production :case-guards (:case-guard) case-guards-one) + (production :case-guards (:case-guards :case-guard) case-guards-more) + + (production :case-guard (case :expression \:) case-guard-case) + (production :case-guard (default \:) case-guard-default) + + + (%subsection "Throw Statement") + (production :throw-statement (throw :expression) throw-statement-throw) + + + (%subsection "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) + + (production :catch-clauses (:catch-clause) catch-clauses-one) + (production :catch-clauses (:catch-clauses :catch-clause) catch-clauses-more) + + (production :catch-clause (catch \( $identifier \) :block) catch-clause-block) + + (production :finally-clause (finally :block) finally-clause-block) + + + (%section "Functions") + + (production :function-declaration (function $identifier \( :formal-parameters \) { :function-statements }) function-declaration-statements) + + (production :formal-parameters () formal-parameters-none) + (production :formal-parameters (:formal-parameters-prefix) formal-parameters-some) + + (production :formal-parameters-prefix ($identifier) formal-parameters-prefix-one) + (production :formal-parameters-prefix (:formal-parameters-prefix \, $identifier) formal-parameters-prefix-more) + + (production :function-statements ((:function-statement abbrev)) function-statements-one) + (production :function-statements (:function-statements-prefix (:function-statement abbrev-non-empty)) function-statements-more) + + (production :function-statements-prefix ((:function-statement full)) function-statements-prefix-one) + (production :function-statements-prefix (:function-statements-prefix (:function-statement full)) function-statements-prefix-more) + + (production (:function-statement :omega) ((:statement :omega)) function-statement-statement) + (production (:function-statement :omega) (:function-declaration) function-statement-function-declaration) + + + (%section "Programs") + + (production :program (:function-statements) program) + ))) + + (defparameter *jg* (world-grammar *jw* 'code-grammar))) + + +#| +(let ((*visible-modes* nil)) + (depict-rtf-to-local-file + "JS14.rtf" + #'(lambda (rtf-stream) + (depict-world-commands rtf-stream *jw*)))) + +(let ((*visible-modes* nil)) + (depict-html-to-local-file + "JS14.html" + #'(lambda (rtf-stream) + (depict-world-commands rtf-stream *jw*)) + "JavaScript 2.0 Grammar")) + +(with-local-output (s "JS14.txt") (print-grammar *jg* s)) +|# diff --git a/mozilla/js/semantics/JS14.rtf b/mozilla/js/semantics/JS14.rtf new file mode 100644 index 00000000000..26b3de9aa8b --- /dev/null +++ b/mozilla/js/semantics/JS14.rtf @@ -0,0 +1,700 @@ +{\rtf1\mac\ansicpg10000\uc1\deff0\deflang2057\deflangfe2057 +{\fonttbl{\f0\froman\fcharset256\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\f3\ftech\fcharset2\fprq2 Symbol;}{\f4\fnil\fcharset256\fprq2 Helvetica;} +{\f5\fmodern\fcharset256\fprq2 Courier New;}{\f6\fnil\fcharset256\fprq2 Palatino;} +{\f7\fscript\fcharset256\fprq2 Zapf Chancery;}{\f8\ftech\fcharset2\fprq2 Zapf Dingbats;}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; +\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0 +\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0 +\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;} +{\stylesheet{\widctlpar\fs20\lang2057\snext0 Normal;} +{\s1\qj\sa120\widctlpar\fs20\lang2057\sbasedon0\snext1 Body Text;} +{\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057\sbasedon3\snext1 heading 3;} +{\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057\sbasedon0\snext1 heading 4;} +{\s10\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext10 Grammar;} +{\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057\sbasedon0\snext12 Grammar Header;} +{\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext14 Grammar LHS;} +{\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar LHS Last;} +{\s14\fi-1260\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon10\snext14 Grammar +RHS;} +{\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon14\snext12 Grammar +RHS Last;} +{\s16\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar Argument;} +{\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext20 Semantics;} +{\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon20\snext21 Semantics Next;} +{\*\cs30\additive Default Paragraph Font;} +{\*\cs31\b\f5\cf2\lang1024\additive\sbasedon30 Character Literal;} +{\*\cs32\b0\f0\cf9\additive\sbasedon30 Character Literal Control;} +{\*\cs33\b\f6\cf10\lang1024\additive\sbasedon30 Terminal;} +{\*\cs34\b\f5\cf2\lang1024\additive\sbasedon33 Terminal Keyword;} +{\*\cs35\i\f6\cf13\lang1024\additive\sbasedon30 Nonterminal;} +{\*\cs36\i0\additive\sbasedon30 Nonterminal Attribute;} +{\*\cs37\additive\sbasedon30 Nonterminal Argument;} +{\*\cs40\b\f0\additive\sbasedon30 Semantic Keyword;} +{\*\cs41\f0\cf6\lang1024\additive\sbasedon30 Type Expression;} +{\*\cs42\scaps\f0\cf6\lang1024\additive\sbasedon41 Type Name;} +{\*\cs43\f4\cf6\lang1024\additive\sbasedon41 Field Name;} +{\*\cs44\i\f0\cf11\lang1024\additive\sbasedon30 Global Variable;} +{\*\cs45\i\f0\cf4\lang1024\additive\sbasedon30 Local Variable;} +{\*\cs46\f7\cf12\lang1024\additive\sbasedon30 Action Name;}} +\widowctrl\ftnbj\aenddoc\fet0\formshade\viewkind4\viewscale125\pgbrdrhead\pgbrdrfoot\sectd\pard +\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Expressions\par\pard\plain\s3 +\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Primary Expressions\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PrimaryExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 this}\par| +\tab{\cs34\b\f5\cf2\lang1024 null}\par|\tab{\cs34\b\f5\cf2\lang1024 true}\par|\tab +{\cs34\b\f5\cf2\lang1024 false}\par|\tab{\cs33\b\f6\cf10\lang1024 Number}\par|\tab +{\cs33\b\f6\cf10\lang1024 String}\par|\tab{\cs33\b\f6\cf10\lang1024 Identifier}\par|\tab +{\cs33\b\f6\cf10\lang1024 RegularExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024(} +{\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)}\par\pard\plain\s3\sa30\keep\keepn +\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Left-Side Expressions\par\pard\plain\s16\fi-1440\li1800 +\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024\cs37{\field{\*\fldinst SYMBOL 99 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +{\field{\*\fldinst SYMBOL 206 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \{ +{\cs35\i\f6\cf13\lang1024\cs36\i0 allowCalls}, {\cs35\i\f6\cf13\lang1024\cs36\i0 noCalls}\}\par +{\cs35\i\f6\cf13\lang1024\cs37{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +{\field{\*\fldinst SYMBOL 206 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \{ +{\cs35\i\f6\cf13\lang1024\cs36\i0 allowIn}, {\cs35\i\f6\cf13\lang1024\cs36\i0 noIn}\}\par\pard\plain +\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 noCalls} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 PrimaryExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 noCalls} {\cs34\b\f5\cf2\lang1024[} +{\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024]}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 noCalls} {\cs34\b\f5\cf2\lang1024.} +{\cs33\b\f6\cf10\lang1024 Identifier}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 new} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 noCalls} +{\cs35\i\f6\cf13\lang1024 Arguments}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 allowCalls} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 noCalls} +{\cs35\i\f6\cf13\lang1024 Arguments}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 allowCalls} +{\cs35\i\f6\cf13\lang1024 Arguments}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 allowCalls} {\cs34\b\f5\cf2\lang1024[} +{\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024]}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 allowCalls} {\cs34\b\f5\cf2\lang1024.} +{\cs33\b\f6\cf10\lang1024 Identifier}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NewExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 noCalls}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 new} +{\cs35\i\f6\cf13\lang1024 NewExpression}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 Arguments} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024(} +{\cs34\b\f5\cf2\lang1024)}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0 +\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 ArgumentList} +{\cs34\b\f5\cf2\lang1024)}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ArgumentList} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 allowIn}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ArgumentList} {\cs34\b\f5\cf2\lang1024,} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 allowIn}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LeftSideExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 NewExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 allowCalls}\par\pard\plain\s3\sa30\keep +\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Postfix Expressions\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PostfixExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LeftSideExpression}\par|\tab{\cs35\i\f6\cf13\lang1024 LeftSideExpression} +{\cs34\b\f5\cf2\lang1024 ++}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0 +\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 LeftSideExpression} {\cs34\b\f5\cf2\lang1024 --}\par +\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Unary Operators\par\pard +\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 UnaryExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 PostfixExpression}\par|\tab{\cs34\b\f5\cf2\lang1024 delete} +{\cs35\i\f6\cf13\lang1024 LeftSideExpression}\par|\tab{\cs34\b\f5\cf2\lang1024 void} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par|\tab{\cs34\b\f5\cf2\lang1024 typeof} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par|\tab{\cs34\b\f5\cf2\lang1024 ++} +{\cs35\i\f6\cf13\lang1024 LeftSideExpression}\par|\tab{\cs34\b\f5\cf2\lang1024 --} +{\cs35\i\f6\cf13\lang1024 LeftSideExpression}\par|\tab{\cs34\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par|\tab{\cs34\b\f5\cf2\lang1024 -} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par|\tab{\cs34\b\f5\cf2\lang1024~} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024!} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0 +\level4\b\fs20\lang2057 Multiplicative Operators\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression} {\cs34\b\f5\cf2\lang1024*} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression} {\cs34\b\f5\cf2\lang1024/} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression} +{\cs34\b\f5\cf2\lang1024%} {\cs35\i\f6\cf13\lang1024 UnaryExpression}\par\pard\plain\s3\sa30\keep +\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Additive Operators\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 AdditiveExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 AdditiveExpression} {\cs34\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 AdditiveExpression} +{\cs34\b\f5\cf2\lang1024 -} {\cs35\i\f6\cf13\lang1024 MultiplicativeExpression}\par\pard\plain\s3 +\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Bitwise Shift Operators\par\pard\plain +\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ShiftExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 AdditiveExpression}\par|\tab{\cs35\i\f6\cf13\lang1024 ShiftExpression} +{\cs34\b\f5\cf2\lang1024<<} {\cs35\i\f6\cf13\lang1024 AdditiveExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 ShiftExpression} {\cs34\b\f5\cf2\lang1024>>} +{\cs35\i\f6\cf13\lang1024 AdditiveExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 ShiftExpression} +{\cs34\b\f5\cf2\lang1024>>>} {\cs35\i\f6\cf13\lang1024 AdditiveExpression}\par\pard\plain\s3\sa30 +\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Relational Operators\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 allowIn} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 allowIn} {\cs34\b\f5\cf2\lang1024<} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 allowIn} {\cs34\b\f5\cf2\lang1024>} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 allowIn} {\cs34\b\f5\cf2\lang1024<=} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 allowIn} {\cs34\b\f5\cf2\lang1024>=} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 allowIn} +{\cs34\b\f5\cf2\lang1024 instanceof} {\cs35\i\f6\cf13\lang1024 ShiftExpression}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 allowIn} {\cs34\b\f5\cf2\lang1024 in} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 noIn} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 noIn} {\cs34\b\f5\cf2\lang1024<} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 noIn} {\cs34\b\f5\cf2\lang1024>} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 noIn} {\cs34\b\f5\cf2\lang1024<=} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 noIn} {\cs34\b\f5\cf2\lang1024>=} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 noIn} + {\cs34\b\f5\cf2\lang1024 instanceof} {\cs35\i\f6\cf13\lang1024 ShiftExpression}\par\pard\plain\s3 +\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Equality Operators\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024==} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024!=} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024===} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024!==} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Binary Bitwise Operat +ors\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20 +\lang1024 +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024&} +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024^} +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024|} +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Binary Logical Operat +ors\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20 +\lang1024 +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024&&} +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024||} +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Conditional Operator +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024?} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024:} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Assignment Operators +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par|\tab{\cs35\i\f6\cf13\lang1024 LeftSideExpression} {\cs34\b\f5\cf2\lang1024=} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LeftSideExpression} {\cs35\i\f6\cf13\lang1024 CompoundAssignment} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CompoundAssignment} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024*=}\par|\tab +{\cs34\b\f5\cf2\lang1024/=}\par|\tab{\cs34\b\f5\cf2\lang1024%=}\par|\tab{\cs34\b\f5\cf2\lang1024 +=} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs34\b\f5\cf2\lang1024 -=}\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20 +\lang2057 Expressions\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par{\cs35\i\f6\cf13\lang1024 Expression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 allowIn}\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 OptionalExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 Expression} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab\u171\'C7 +empty\u187\'C8\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Stateme +nts\par\pard\plain\s16\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20 +\lang1024 +{\cs35\i\f6\cf13\lang1024\cs37{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 206 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \{ +{\cs35\i\f6\cf13\lang1024\cs36\i0 abbrev}, {\cs35\i\f6\cf13\lang1024\cs36\i0 abbrevNonEmpty}, +{\cs35\i\f6\cf13\lang1024\cs36\i0 abbrevNoShortIf}, {\cs35\i\f6\cf13\lang1024\cs36\i0 full}\}\par +\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Statement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BlocklikeStatement}\par|\tab +{\cs35\i\f6\cf13\lang1024 UnterminatedStatement} {\cs34\b\f5\cf2\lang1024;}\par|\tab +{\cs35\i\f6\cf13\lang1024 NonuniformStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par|\tab +{\cs35\i\f6\cf13\lang1024 IfStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par|\tab +{\cs35\i\f6\cf13\lang1024 WhileStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par|\tab +{\cs35\i\f6\cf13\lang1024 ForStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LabeledStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NonuniformStatement\super\cs36\i0 abbrev} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 EmptyStatement} {\cs34\b\f5\cf2\lang1024;}\par|\tab +{\cs35\i\f6\cf13\lang1024 EmptyStatement}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 UnterminatedStatement}\par\pard\plain +\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NonuniformStatement\super\cs36\i0 abbrevNonEmpty} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 EmptyStatement} {\cs34\b\f5\cf2\lang1024;}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 UnterminatedStatement}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NonuniformStatement\super\cs36\i0 abbrevNoShortIf} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 EmptyStatement} {\cs34\b\f5\cf2\lang1024;}\par|\tab +{\cs35\i\f6\cf13\lang1024 UnterminatedStatement}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 EmptyStatement}\par\pard +\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NonuniformStatement\super\cs36\i0 full} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 EmptyStatement} {\cs34\b\f5\cf2\lang1024;}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BlocklikeStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 Block}\par| +\tab{\cs35\i\f6\cf13\lang1024 SwitchStatement}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 TryStatement}\par\pard\plain +\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 UnterminatedStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 VariableStatement}\par|\tab{\cs35\i\f6\cf13\lang1024 ExpressionStatement} +\par|\tab{\cs35\i\f6\cf13\lang1024 DoStatement}\par|\tab{\cs35\i\f6\cf13\lang1024 ContinueStatement} +\par|\tab{\cs35\i\f6\cf13\lang1024 BreakStatement}\par|\tab +{\cs35\i\f6\cf13\lang1024 ReturnStatement}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 ThrowStatement}\par\pard\plain\s3\sa30 +\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Block\par\pard\plain\s13\fi-1440\li1800 +\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 Block} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024\{} +{\cs35\i\f6\cf13\lang1024 BlockStatements} {\cs34\b\f5\cf2\lang1024\}}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BlockStatements} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrev}\par\pard\plain\s15\fi-1260\li1800\sa120 +\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 BlockStatementsPrefix} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNonEmpty}\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BlockStatementsPrefix} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 full}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 BlockStatementsPrefix} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 full}\par\pard\plain\s3\sa30\keep\keepn +\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Variable Statement\par\pard\plain\s13\fi-1440\li1800 +\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 VariableStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 var} +{\cs35\i\f6\cf13\lang1024 VariableDeclarationList\super\cs36\i0 allowIn}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 VariableDeclarationList\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 VariableDeclaration\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 VariableDeclarationList\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024,} +{\cs35\i\f6\cf13\lang1024 VariableDeclaration\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 VariableDeclaration\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024 Identifier} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs33\b\f6\cf10\lang1024 Identifier} {\cs34\b\f5\cf2\lang1024=} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Empty Statement\par +\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 EmptyStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \u171\'C7empty\u187\'C8\par +\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Expression Statement\par +\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ExpressionStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Expression}\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4 +\b\fs20\lang2057 If Statement\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 IfStatement\super\cs36\i0 abbrev} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 if} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrev}\par\pard\plain\s15\fi-1260\li1800\sa120 +\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 if} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNoShortIf} {\cs34\b\f5\cf2\lang1024 else} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrev}\par\pard\plain\s12\fi-1440\li1800\sb120 +\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 IfStatement\super\cs36\i0 abbrevNonEmpty} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 if} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNonEmpty}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 if} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNoShortIf} {\cs34\b\f5\cf2\lang1024 else} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNonEmpty}\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 IfStatement\super\cs36\i0 full} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 if} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 full}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 if} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNoShortIf} {\cs34\b\f5\cf2\lang1024 else} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 full}\par\pard\plain\s13\fi-1440\li1800\sb120 +\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 IfStatement\super\cs36\i0 abbrevNoShortIf} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 if} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNoShortIf} {\cs34\b\f5\cf2\lang1024 else} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNoShortIf}\par\pard\plain\s3\sa30\keep\keepn +\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Do-While Statement\par\pard\plain\s13\fi-1440\li1800 +\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 DoStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 do} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNonEmpty} {\cs34\b\f5\cf2\lang1024 while} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)}\par\pard +\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 While Statement\par\pard\plain +\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 WhileStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 while} {\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} +{\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 For Statements\par +\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ForStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 for} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 ForInitializer} {\cs34\b\f5\cf2\lang1024;} +{\cs35\i\f6\cf13\lang1024 OptionalExpression} {\cs34\b\f5\cf2\lang1024;} +{\cs35\i\f6\cf13\lang1024 OptionalExpression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs34\b\f5\cf2\lang1024 for} {\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 ForInBinding} +{\cs34\b\f5\cf2\lang1024 in} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ForInitializer} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 noIn}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 var} +{\cs35\i\f6\cf13\lang1024 VariableDeclarationList\super\cs36\i0 noIn}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ForInBinding} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LeftSideExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 var} +{\cs35\i\f6\cf13\lang1024 VariableDeclaration\super\cs36\i0 noIn}\par\pard\plain\s3\sa30\keep\keepn +\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Continue and Break Statements\par\pard\plain\s13 +\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ContinueStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 continue} {\cs35\i\f6\cf13\lang1024 OptionalLabel}\par +{\cs35\i\f6\cf13\lang1024 BreakStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 break} {\cs35\i\f6\cf13\lang1024 OptionalLabel}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 OptionalLabel} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs33\b\f6\cf10\lang1024 Identifier}\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4 +\b\fs20\lang2057 Labeled Statements\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LabeledStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024 Identifier} {\cs34\b\f5\cf2\lang1024:} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Return Statement\par +\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ReturnStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 return} {\cs35\i\f6\cf13\lang1024 OptionalExpression}\par\pard\plain\s3 +\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Switch Statement\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 SwitchStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 switch} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs34\b\f5\cf2\lang1024\{} {\cs34\b\f5\cf2\lang1024\}}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 switch} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs34\b\f5\cf2\lang1024\{} {\cs35\i\f6\cf13\lang1024 CaseGroups} +{\cs35\i\f6\cf13\lang1024 LastCaseGroup} {\cs34\b\f5\cf2\lang1024\}}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CaseGroups} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 CaseGroups} {\cs35\i\f6\cf13\lang1024 CaseGroup}\par\pard\plain\s13 +\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CaseGroup} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 CaseGuards} {\cs35\i\f6\cf13\lang1024 BlockStatementsPrefix}\par +{\cs35\i\f6\cf13\lang1024 LastCaseGroup} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 CaseGuards} {\cs35\i\f6\cf13\lang1024 BlockStatements}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CaseGuards} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 CaseGuard} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 CaseGuards} {\cs35\i\f6\cf13\lang1024 CaseGuard}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CaseGuard} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 case} +{\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024:}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 default} +{\cs34\b\f5\cf2\lang1024:}\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20 +\lang2057 Throw Statement\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ThrowStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 throw} {\cs35\i\f6\cf13\lang1024 Expression}\par\pard\plain\s3\sa30\keep +\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Try Statement\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 TryStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 try} +{\cs35\i\f6\cf13\lang1024 Block} {\cs35\i\f6\cf13\lang1024 CatchClauses}\par|\tab +{\cs34\b\f5\cf2\lang1024 try} {\cs35\i\f6\cf13\lang1024 Block} +{\cs35\i\f6\cf13\lang1024 FinallyClause}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 try} {\cs35\i\f6\cf13\lang1024 Block} +{\cs35\i\f6\cf13\lang1024 CatchClauses} {\cs35\i\f6\cf13\lang1024 FinallyClause}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CatchClauses} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 CatchClause}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 CatchClauses} +{\cs35\i\f6\cf13\lang1024 CatchClause}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 CatchClause} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 catch} {\cs34\b\f5\cf2\lang1024(} {\cs33\b\f6\cf10\lang1024 Identifier} +{\cs34\b\f5\cf2\lang1024)} {\cs35\i\f6\cf13\lang1024 Block}\par +{\cs35\i\f6\cf13\lang1024 FinallyClause} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 finally} {\cs35\i\f6\cf13\lang1024 Block}\par\pard\plain\s2\sa60\keep\keepn +\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Functions\par\pard\plain\s13\fi-1440\li1800\sb120\sa120 +\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 FunctionDeclaration} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 function} {\cs33\b\f6\cf10\lang1024 Identifier} {\cs34\b\f5\cf2\lang1024(} +{\cs35\i\f6\cf13\lang1024 FormalParameters} {\cs34\b\f5\cf2\lang1024)} {\cs34\b\f5\cf2\lang1024\{} +{\cs35\i\f6\cf13\lang1024 FunctionStatements} {\cs34\b\f5\cf2\lang1024\}}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 FormalParameters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 FormalParametersPrefix}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 FormalParametersPrefix} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024 Identifier} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 FormalParametersPrefix} {\cs34\b\f5\cf2\lang1024,} +{\cs33\b\f6\cf10\lang1024 Identifier}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 FunctionStatements} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 FunctionStatement\super\cs36\i0 abbrev}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 FunctionStatementsPrefix} +{\cs35\i\f6\cf13\lang1024 FunctionStatement\super\cs36\i0 abbrevNonEmpty}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 FunctionStatementsPrefix} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 FunctionStatement\super\cs36\i0 full}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 FunctionStatementsPrefix} +{\cs35\i\f6\cf13\lang1024 FunctionStatement\super\cs36\i0 full}\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 FunctionStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 Statement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 FunctionDeclaration}\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar +\hyphpar0\level3\b\fs24\lang2057 Programs\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 Program} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 FunctionStatements}\par} \ No newline at end of file diff --git a/mozilla/js/semantics/Lexer.lisp b/mozilla/js/semantics/Lexer.lisp new file mode 100644 index 00000000000..27287b618cc --- /dev/null +++ b/mozilla/js/semantics/Lexer.lisp @@ -0,0 +1,624 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; Lexer grammar generator +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; A lexer grammar is an extension of a standard grammar that combines both parsing and combining +;;; characters into character classes. +;;; +;;; A lexer grammar is comprised of the following: +;;; a start nonterminal; +;;; a list of grammar productions, in which each terminal must be a character; +;;; a list of character classes, where each class is a list of: +;;; a nonterminal C; +;;; an expression that denotes the set of characters in character class C; +;;; a list of bindings, each containing: +;;; an action name; +;;; a lexer-action name; +;;; a list of lexer-action bindings, each containing: +;;; a lexer-action name; +;;; the type of this lexer-action's value; +;;; the name of a lisp function (char -> value) that performs the lexer-action on a character. +;;; +;;; Grammar productions may refer to character classes C as nonterminals. +;;; +;;; An expression can be any of the following: +;;; C The name of a previously defined character class. +;;; every The set of all characters +;;; (char1 char2 ... charn) The set of characters {char1, char2, ..., charn} +;;; (+ ... ) The set union of , ..., , +;;; which should be disjoint. +;;; (++ ... ) Same as +, but printed on separate lines. +;;; (- ) The set of characters in but not ; +;;; should be a subset of . + + +;;; ------------------------------------------------------------------------------------------------------ +;;; SETS OF CHARACTERS + +;;; A character set is represented by an integer. +;;; The set may be infinite as long as its complement is finite. +;;; Bit n is set if the character with code n is a member of the set. +;;; The integer is negative if the set is infinite. + + +; Print the charset +(defun print-charset (charset &optional (stream t)) + (pprint-logical-block (stream (bitmap-to-ranges charset) :prefix "{" :suffix "}") + (pprint-exit-if-list-exhausted) + (loop + (flet + ((int-to-char (i) + (if (or (eq i :infinity) (= i char-code-limit)) + :infinity + (code-char i)))) + (let* ((range (pprint-pop)) + (lo (int-to-char (car range))) + (hi (int-to-char (cdr range)))) + (write (if (eql lo hi) lo (list lo hi)) :stream stream :pretty t) + (pprint-exit-if-list-exhausted) + (format stream " ~:_")))))) + + +; Return the character set consisting of the single character char. +(declaim (inline char-charset)) +(defun char-charset (char) + (ash 1 (char-code char))) + + +; Return the character set consisting of adding char to the given charset. +(defun charset-add-char (charset char) + (let ((i (char-code char))) + (if (logbitp i charset) + charset + (logior charset (ash 1 i))))) + + +; Return the union of the two character sets, which should be disjoint. +(defun charset-union (charset1 charset2) + (unless (zerop (logand charset1 charset2)) + (error "Union of overlapping character sets")) + (logior charset1 charset2)) + + +; Return the difference of the two character sets, the second of which should be +; a subset of the first. +(defun charset-difference (charset1 charset2) + (unless (zerop (logandc1 charset1 charset2)) + (error "Difference of non-subset character sets")) + (logandc2 charset1 charset2)) + + +; Return true if the character set is empty. +(declaim (inline charset-empty?)) +(defun charset-empty? (charset) + (zerop charset)) + + +; Return true if the character set is infinite. +(declaim (inline charset-infinite?)) +(defun charset-infinite? (charset) + (minusp charset)) + + +; If the character set contains exactly one character, return that character; +; otherwise, return nil. +(defun charset-char (charset) + (let ((hi (1- (integer-length charset)))) + (and (plusp charset) (= charset (ash 1 hi)) (code-char hi)))) + + +; Return the highest character in the character set, which must be finite and nonempty. +(declaim (inline charset-highest-char)) +(defun charset-highest-char (charset) + (assert-true (plusp charset)) + (code-char (1- (integer-length charset)))) + + +; Given a list of charsets, return a list of the largest possible +; charsets (called partitions) such that: +; for any input charset C and partition P, either P is entirely contained in C or it is disjoint from C; +; all partitions are mutually disjoint; +; the union of all partitions is the infinite set of all characters. +(defun compute-partitions (charsets) + (labels + ((split-partitions (partitions charset) + (mapcan #'(lambda (partition) + (remove-if #'zerop (list (logand partition charset) (logandc2 partition charset)))) + partitions)) + (partition< (partition1 partition2) + (cond + ((minusp partition1) nil) + ((minusp partition2) t) + (t (< partition1 partition2))))) + (sort (reduce #'split-partitions charsets :initial-value '(-1)) + #'partition<))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; LEXER-ACTIONS + +(defstruct (lexer-action (:constructor make-lexer-action (name number type-expr function-name markup)) + (:copier nil) + (:predicate lexer-action?)) + (name nil :type identifier :read-only t) ;The action name to use for this lexer-action + (number nil :type integer :read-only t) ;Serial number of this lexer-action + (type-expr nil :read-only t) ;A type expression that specifies the result type of list function function-name + (function-name nil :type identifier :read-only t) ;A lisp function (char -> value) that performs the lexer-action on a character + (markup nil :type list :read-only t)) ;Markup template describing this lexer-action; replace '* with the nonterminal + + +(defun print-lexer-action (lexer-action &optional (stream t)) + (format stream "~@<~A ~@_~:I: ~<<<~;~W~;>>~:> ~_= ~<<~;#'~W~;>~:>~:>" + (lexer-action-name lexer-action) + (list (lexer-action-type-expr lexer-action)) + (list (lexer-action-function-name lexer-action)))) + + +(defun depict-lexer-action (markup-stream lexer-action nonterminal) + (dolist (markup-item (lexer-action-markup lexer-action)) + (if (eq markup-item '*) + (depict-general-nonterminal markup-stream nonterminal) + (depict-group markup-stream markup-item)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; CHARCLASSES + +(defstruct (charclass (:constructor make-charclass (nonterminal charset-source charset actions)) + (:predicate charclass?)) + (nonterminal nil :type nonterminal :read-only t) ;The nonterminal on the left-hand side of this production + (charset-source nil :read-only t) ;The source expression for the charset + (charset nil :type integer :read-only t) ;The set of characters in this class + (actions nil :type list :read-only t)) ;List of (action-name . lexer-action) + + +; Evaluate a whose syntax is given at the top of this file. +; Return the charset. +; charclasses-hash is a hash table of nonterminal -> charclass. +(defun eval-charset-expr (charclasses-hash expr) + (cond + ((null expr) 0) + ((eq expr 'every) -1) + ((symbolp expr) + (charclass-charset + (or (gethash expr charclasses-hash) + (error "Character class ~S not defined" expr)))) + ((consp expr) + (labels + ((recursive-eval (expr) + (eval-charset-expr charclasses-hash expr))) + (case (car expr) + ((+ ++) (reduce #'charset-union (cdr expr) :initial-value 0 :key #'recursive-eval)) + (- (unless (cdr expr) + (error "Bad character set expression ~S" expr)) + (reduce #'charset-difference (cdr expr) :key #'recursive-eval)) + (t (reduce #'charset-union expr :key #'char-charset))))) + (t (error "Bad character set expression ~S" expr)))) + + +(defun print-charclass (charclass &optional (stream t)) + (pprint-logical-block (stream nil) + (format stream "~W -> ~@_~:I" (charclass-nonterminal charclass)) + (print-charset (charclass-charset charclass) stream) + (format stream " ~_") + (pprint-fill stream (mapcar #'car (charclass-actions charclass))))) + + +; Emit markup for the lexer charset expression. +(defun depict-charset-source (markup-stream expr) + (cond + ((null expr) (error "Can't emit null charset expression")) + ((eq expr 'every) (depict-general-nonterminal markup-stream ':any-character)) + ((symbolp expr) (depict-general-nonterminal markup-stream expr)) + ((consp expr) + (case (car expr) + ((+ ++) (depict-list markup-stream #'depict-charset-source (cdr expr) :separator " | ")) + (- (depict-charset-source markup-stream (second expr)) + (depict markup-stream " " :but-not " ") + (depict-list markup-stream #'depict-charset-source (cddr expr) :separator " | ")) + (t (depict-list markup-stream #'depict-terminal expr :separator " | ")))) + (t (error "Bad character set expression ~S" expr)))) + + +; Emit markup paragraphs for the lexer charclass. +(defun depict-charclass (markup-stream charclass) + (let ((nonterminal (charclass-nonterminal charclass)) + (expr (charclass-charset-source charclass))) + (if (and (consp expr) (eq (car expr) '++)) + (let* ((subexprs (cdr expr)) + (length (length subexprs))) + (depict-paragraph (markup-stream ':grammar-lhs) + (depict-general-nonterminal markup-stream nonterminal) + (depict markup-stream " " ':derives-10)) + (dotimes (i length) + (depict-paragraph (markup-stream (if (= i (1- length)) ':grammar-rhs-last ':grammar-rhs)) + (if (zerop i) + (depict markup-stream ':tab3) + (depict markup-stream "|" ':tab2)) + (depict-charset-source markup-stream (nth i subexprs))))) + (depict-paragraph (markup-stream ':grammar-lhs-last) + (depict-general-nonterminal markup-stream (charclass-nonterminal charclass)) + (depict markup-stream " " ':derives-10 " ") + (depict-charset-source markup-stream expr))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; PARTITIONS + +(defstruct (partition (:constructor make-partition (charset lexer-actions)) + (:predicate partition?)) + (charset nil :type integer :read-only t) ;The set of characters in this partition + (lexer-actions nil :type list :read-only t)) ;List of lexer-actions needed on characters in this partition + +(defconstant *default-partition-name* '$_other_) ;partition-name to use for characters not found in lexer-char-tokens + + +(defun print-partition (partition-name partition &optional (stream t)) + (pprint-logical-block (stream nil) + (format stream "~W -> ~@_~:I" partition-name) + (print-charset (partition-charset partition) stream) + (format stream " ~_") + (pprint-fill stream (mapcar #'lexer-action-name (partition-lexer-actions partition))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; LEXER + + +(defstruct (lexer (:constructor allocate-lexer) + (:copier nil) + (:predicate lexer?)) + (lexer-actions nil :type hash-table :read-only t) ;Hash table of lexer-action-name -> lexer-action + (charclasses nil :type list :read-only t) ;List of charclasses in the order in which they were given + (charclasses-hash nil :type hash-table :read-only t) ;Hash table of nonterminal -> charclass + (char-tokens nil :type hash-table :read-only t) ;Hash table of character -> (character or partition-name) + (partition-names nil :type list :read-only t) ;List of partition names in the order in which they were created + (partitions nil :type hash-table :read-only t) ;Hash table of partition-name -> partition + (grammar nil :type (or null grammar)) ;Grammar that accepts exactly one lexer token + (metagrammar nil :type (or null metagrammar))) ;Grammar that accepts the longest input sequence that forms a token + + +; Return a function (character -> terminal) that classifies an input character +; as either itself or a partition-name. +; If the returned function is called on a non-character, it returns its input unchanged. +(defun lexer-classifier (lexer) + (let ((char-tokens (lexer-char-tokens lexer))) + #'(lambda (char) + (if (characterp char) + (gethash char char-tokens *default-partition-name*) + char)))) + + +; Return the charclass that defines the given lexer nonterminal or nil if none. +(defun lexer-charclass (lexer nonterminal) + (gethash nonterminal (lexer-charclasses-hash lexer))) + + +; Return the charset of all characters that appear as terminals in grammar-source. +(defun grammar-singletons (grammar-source) + (assert-type grammar-source (list (tuple t (list t) identifier))) + (let ((singletons 0)) + (dolist (production-source grammar-source) + (dolist (grammar-symbol (second production-source)) + (when (characterp grammar-symbol) + (setq singletons (charset-add-char singletons grammar-symbol))))) + singletons)) + + +; Return the list of all lexer-action-names that appear in at least one charclass of which this +; partition is a subset. +(defun collect-lexer-action-names (charclasses partition) + (let ((lexer-action-names nil)) + (dolist (charclass charclasses) + (unless (zerop (logand (charclass-charset charclass) partition)) + (dolist (action (charclass-actions charclass)) + (pushnew (cdr action) lexer-action-names)))) + (sort lexer-action-names #'< :key #'lexer-action-number))) + + +; Make a lexer structure corresponding to a grammar with the given source. +; charclasses-source is a list of character classes, where each class is a list of: +; a nonterminal C; +; an expression that denotes the set of characters in character class C; +; a list of bindings, each containing: +; an action name; +; a lexer-action name. +; lexer-actions-source is a list of lexer-action bindings, each containing: +; a lexer-action name; +; the type of this lexer-action's value; +; the name of a lisp function (char -> value) that performs the lexer-action on a character. +; This does not make the lexer's grammar; use make-lexer-and-grammar for that. +(defun make-lexer (charclasses-source lexer-actions-source grammar-source) + (assert-type charclasses-source (list (tuple nonterminal t (list (tuple identifier identifier))))) + (assert-type lexer-actions-source (list (tuple identifier t identifier list))) + (let ((lexer-actions (make-hash-table :test #'eq)) + (charclasses nil) + (charclasses-hash (make-hash-table :test *grammar-symbol-=*)) + (charsets nil) + (singletons (grammar-singletons grammar-source))) + (let ((lexer-action-number 0)) + (dolist (lexer-action-source lexer-actions-source) + (let ((name (first lexer-action-source)) + (type-expr (second lexer-action-source)) + (function (third lexer-action-source)) + (markup (fourth lexer-action-source))) + (when (gethash name lexer-actions) + (error "Attempt to redefine lexer action ~S" name)) + (setf (gethash name lexer-actions) + (make-lexer-action name (incf lexer-action-number) type-expr function markup))))) + + (dolist (charclass-source charclasses-source) + (let ((nonterminal (first charclass-source)) + (charset (eval-charset-expr charclasses-hash (ensure-proper-form (second charclass-source)))) + (actions + (mapcar #'(lambda (action-source) + (let* ((lexer-action-name (second action-source)) + (lexer-action (gethash lexer-action-name lexer-actions))) + (unless lexer-action + (error "Unknown lexer-action ~S" lexer-action-name)) + (cons (first action-source) lexer-action))) + (third charclass-source)))) + (when (gethash nonterminal charclasses-hash) + (error "Attempt to redefine character class ~S" nonterminal)) + (when (charset-empty? charset) + (error "Empty character class ~S" nonterminal)) + (let ((charclass (make-charclass nonterminal (second charclass-source) charset actions))) + (push charclass charclasses) + (setf (gethash nonterminal charclasses-hash) charclass) + (push charset charsets)))) + (setq charclasses (nreverse charclasses)) + (bitmap-each-bit #'(lambda (i) (push (ash 1 i) charsets)) + singletons) + (let ((char-tokens (make-hash-table :test #'eql)) + (partition-names nil) + (partitions (make-hash-table :test #'eq)) + (current-partition-number 0)) + (dolist (partition (compute-partitions charsets)) + (let ((singleton (charset-char partition))) + (cond + (singleton (setf (gethash singleton char-tokens) singleton)) + ((charset-infinite? partition) + (push *default-partition-name* partition-names) + (setf (gethash *default-partition-name* partitions) + (make-partition partition (collect-lexer-action-names charclasses partition)))) + (t (let ((token (intern (format nil "$_CHARS~D_" (incf current-partition-number))))) + (bitmap-each-bit #'(lambda (i) + (setf (gethash (code-char i) char-tokens) token)) + partition) + (push token partition-names) + (setf (gethash token partitions) + (make-partition partition (collect-lexer-action-names charclasses partition)))))))) + (allocate-lexer + :lexer-actions lexer-actions + :charclasses charclasses + :charclasses-hash charclasses-hash + :char-tokens char-tokens + :partition-names (nreverse partition-names) + :partitions partitions)))) + + +(defun print-lexer (lexer &optional (stream t)) + (let* ((lexer-actions (lexer-lexer-actions lexer)) + (lexer-action-names (sort (hash-table-keys lexer-actions) #'< + :key #'(lambda (lexer-action-name) + (lexer-action-number (gethash lexer-action-name lexer-actions))))) + (charclasses (lexer-charclasses lexer)) + (partition-names (lexer-partition-names lexer)) + (partitions (lexer-partitions lexer)) + (singletons nil)) + + (when lexer-action-names + (pprint-logical-block (stream lexer-action-names) + (format stream "Lexer Actions:~2I") + (loop + (pprint-newline :mandatory stream) + (let ((lexer-action (gethash (pprint-pop) lexer-actions))) + (print-lexer-action lexer-action stream)) + (pprint-exit-if-list-exhausted))) + (pprint-newline :mandatory stream) + (pprint-newline :mandatory stream)) + + (when charclasses + (pprint-logical-block (stream charclasses) + (format stream "Charclasses:~2I") + (loop + (pprint-newline :mandatory stream) + (let ((charclass (pprint-pop))) + (print-charclass charclass stream)) + (pprint-exit-if-list-exhausted))) + (pprint-newline :mandatory stream) + (pprint-newline :mandatory stream)) + + (when partition-names + (pprint-logical-block (stream partition-names) + (format stream "Partitions:~2I") + (loop + (pprint-newline :mandatory stream) + (let ((partition-name (pprint-pop))) + (print-partition partition-name (gethash partition-name partitions) stream)) + (pprint-exit-if-list-exhausted))) + (pprint-newline :mandatory stream) + (pprint-newline :mandatory stream)) + + (maphash + #'(lambda (char char-or-partition) + (if (eql char char-or-partition) + (push char singletons) + (assert-type char-or-partition identifier))) + (lexer-char-tokens lexer)) + (setq singletons (sort singletons #'char<)) + (when singletons + (format stream "Singletons: ~@_~<~@{~W ~:_~}~:>~:@_~:@_" singletons)))) + + +(defmethod print-object ((lexer lexer) stream) + (print-unreadable-object (lexer stream :identity t) + (write-string "lexer" stream))) + + +;;; ------------------------------------------------------------------------------------------------------ + + +; Return two values: +; extra grammar productions that define the character class nonterminals out of characters and tokens; +; extra commands that: +; define the partitions used in this lexer; +; define the actions of these productions. +(defun lexer-grammar-and-commands (lexer) + (labels + ((component-partitions (charset partitions) + (if (charset-empty? charset) + partitions + (let* ((partition-name (if (charset-infinite? charset) + *default-partition-name* + (gethash (charset-highest-char charset) (lexer-char-tokens lexer)))) + (partition (gethash partition-name (lexer-partitions lexer)))) + (component-partitions (charset-difference charset (partition-charset partition)) + (cons partition partitions)))))) + (let ((productions nil) + (commands nil)) + (dolist (charclass (lexer-charclasses lexer)) + (let ((nonterminal (charclass-nonterminal charclass)) + (production-number 0)) + (dolist (action (charclass-actions charclass)) + (let ((lexer-action (cdr action))) + (push (list 'declare-action (car action) nonterminal (lexer-action-type-expr lexer-action)) commands))) + (do ((charset (charclass-charset charclass))) + ((charset-empty? charset)) + (let* ((partition-name (if (charset-infinite? charset) + *default-partition-name* + (gethash (charset-highest-char charset) (lexer-char-tokens lexer)))) + (partition-charset (if (characterp partition-name) + (char-charset partition-name) + (partition-charset (gethash partition-name (lexer-partitions lexer))))) + (production-name (intern (format nil "~A-~D" nonterminal (incf production-number))))) + (push (list nonterminal (list partition-name) production-name) productions) + (dolist (action (charclass-actions charclass)) + (let* ((lexer-action (cdr action)) + (body (if (characterp partition-name) + (let* ((lexer-action-function (lexer-action-function-name lexer-action)) + (result (funcall lexer-action-function partition-name))) + (typecase result + (integer result) + (character result) + ((eql nil) 'false) + ((eql t) 'true) + (t (error "Cannot infer the type of ~S's result ~S" lexer-action-function result)))) + (list (lexer-action-name lexer-action) partition-name)))) + (push (list 'action (car action) production-name body nil) commands))) + (setq charset (charset-difference charset partition-charset)))))) + + (let ((partition-commands + (mapcan + #'(lambda (partition-name) + (mapcan #'(lambda (lexer-action) + (let ((lexer-action-name (lexer-action-name lexer-action))) + (list + (list 'declare-action lexer-action-name partition-name (lexer-action-type-expr lexer-action)) + (list 'terminal-action lexer-action-name partition-name (lexer-action-function-name lexer-action))))) + (partition-lexer-actions (gethash partition-name (lexer-partitions lexer))))) + (lexer-partition-names lexer)))) + (values + (nreverse productions) + (nconc partition-commands (nreverse commands))))))) + + +; Make a lexer and grammar from the given source. +; kind should be either :lalr-1 or :lr-1. +; charclasses-source is a list of character classes, and +; lexer-actions-source is a list of lexer-action bindings; see make-lexer. +; start-symbol is the grammar's start symbol, and grammar-source is its source. +; Return two values: +; the lexer (including the grammar in its grammar field); +; list of extra commands that: +; define the partitions used in this lexer; +; define the actions of these productions. +(defun make-lexer-and-grammar (kind charclasses-source lexer-actions-source parametrization start-symbol grammar-source) + (let ((lexer (make-lexer charclasses-source lexer-actions-source grammar-source))) + (multiple-value-bind (extra-grammar-source extra-commands) (lexer-grammar-and-commands lexer) + (let ((grammar (make-and-compile-grammar kind parametrization start-symbol (append extra-grammar-source grammar-source)))) + (setf (lexer-grammar lexer) grammar) + (values lexer extra-commands))))) + + +; Parse the input string to produce a list of action results. +; If trace is: +; nil, don't print trace information +; :code, print trace information, including action code +; other print trace information +; Return two values: +; the list of action results; +; the list of action results' types. +(defun lexer-parse (lexer string &key trace) + (let ((in (coerce string 'list))) + (action-parse (lexer-grammar lexer) (lexer-classifier lexer) in :trace trace))) + + +; Same as lexer-parse except that also print the action results nicely. +(defun lexer-pparse (lexer string &key (stream t) trace) + (multiple-value-bind (results types) (lexer-parse lexer string :trace trace) + (print-values results types stream) + (terpri stream) + (values results types))) + + +; Compute the lexer grammar's metagrammar. +(defun set-up-lexer-metagrammar (lexer) + (setf (lexer-metagrammar lexer) (make-metagrammar (lexer-grammar lexer)))) + + + +; Parse the input string into elements, where each element is the longest +; possible string of input characters that is accepted by the grammar. +; The grammar's terminals are all characters that may appear in the input +; string plus the symbol $END which is inserted after the last character of +; the string. +; Return the list of lists of action results of the elements. +; If trace is: +; nil, don't print trace information +; :code, print trace information, including action code +; other print trace information +; Return two values: +; the list of lists of action results; +; the list of action results' types. Each of the lists of action results has +; this type signature. +(defun lexer-metaparse (lexer string &key trace) + (let ((metagrammar (lexer-metagrammar lexer))) + (do ((in (append (coerce string 'list) '($end))) + (results-lists nil)) + ((endp in) (values (nreverse results-lists) (grammar-user-start-action-types (metagrammar-grammar metagrammar)))) + (multiple-value-bind (results in-rest) (action-metaparse metagrammar (lexer-classifier lexer) in :trace trace) + (setq in in-rest) + (push results results-lists))))) + + +; Same as lexer-metaparse except that also print the action results nicely. +(defun lexer-pmetaparse (lexer string &key (stream t) trace) + (multiple-value-bind (results-lists types) (lexer-metaparse lexer string :trace trace) + (pprint-logical-block (stream results-lists) + (pprint-exit-if-list-exhausted) + (loop + (print-values (pprint-pop) types stream :prefix "(" :suffix ")") + (pprint-exit-if-list-exhausted) + (format stream " ~_"))) + (terpri stream) + (values results-lists types))) + diff --git a/mozilla/js/semantics/Main.lisp b/mozilla/js/semantics/Main.lisp new file mode 100644 index 00000000000..84805f36259 --- /dev/null +++ b/mozilla/js/semantics/Main.lisp @@ -0,0 +1,42 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; ECMAScript semantic loader +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +(defparameter *semantic-engine-filenames* + '("Utilities" "Markup" "RTF" "HTML" "GrammarSymbol" "Grammar" "Parser" "Metaparser" "Lexer" "Calculus" "CalculusMarkup" "JS14" "ECMA Lexer" "ECMA Grammar")) + +(defparameter *semantic-engine-directory* + (make-pathname + :directory (pathname-directory (truename *loading-file-source-file*)))) + +(defun load-semantic-engine () + (dolist (filename *semantic-engine-filenames*) + (let ((pathname (merge-pathnames filename *semantic-engine-directory*))) + (load pathname :verbose t)))) + +(defmacro with-local-output ((stream filename) &body body) + `(with-open-file (,stream (merge-pathnames ,filename *semantic-engine-directory*) + :direction :output + :if-exists :supersede) + ,@body)) + + +(load-semantic-engine) diff --git a/mozilla/js/semantics/Markup.lisp b/mozilla/js/semantics/Markup.lisp new file mode 100644 index 00000000000..236a69688dc --- /dev/null +++ b/mozilla/js/semantics/Markup.lisp @@ -0,0 +1,508 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1999 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; Common RTF and HTML writing utilities +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +(defvar *trace-logical-blocks* nil) ;Emit logical blocks to *trace-output* while processing +(defvar *show-logical-blocks* nil) ;Emit logical block boundaries as hidden rtf text + +(defvar *markup-logical-line-width* 90) ;Approximate maximum number of characters to display on a single logical line +(defvar *average-space-width* 2/3) ;Width of a space as a percentage of average character width when calculating logical line widths + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MARKUP ENVIRONMENTS + + +(defstruct (markup-env (:constructor allocate-markup-env (macros widths))) + (macros nil :type hash-table :read-only t) ;Hash table of keyword -> expansion list + (widths nil :type hash-table :read-only t)) ;Hash table of keyword -> estimated width of macro expansion; +; ; zero-width entries can be omitted; multiline entries have t for a width. + + +(defun make-markup-env () + (allocate-markup-env (make-hash-table :test #'eq) (make-hash-table :test #'eq))) + + +; Recursively expand all keywords in markup-tree, producing a freshly consed expansion tree. +; Allow keywords in the permitted-keywords list to be present in the output without generating an error. +(defun markup-env-expand (markup-env markup-tree permitted-keywords) + (mapcan + #'(lambda (markup-element) + (cond + ((keywordp markup-element) + (let ((expansion (gethash markup-element (markup-env-macros markup-env) *get2-nonce*))) + (if (eq expansion *get2-nonce*) + (if (member markup-element permitted-keywords :test #'eq) + (list markup-element) + (error "Unknown markup macro ~S" markup-element)) + (markup-env-expand markup-env expansion permitted-keywords)))) + ((listp markup-element) + (list (markup-env-expand markup-env markup-element permitted-keywords))) + (t (list markup-element)))) + markup-tree)) + + +(defun markup-env-define (markup-env keyword expansion &optional width) + (assert-type keyword keyword) + (assert-type expansion (list t)) + (assert-type width (or null integer (eql t))) + (when (gethash keyword (markup-env-macros markup-env)) + (warn "Redefining markup macro ~S" keyword)) + (setf (gethash keyword (markup-env-macros markup-env)) expansion) + (if width + (setf (gethash keyword (markup-env-widths markup-env)) width) + (remhash keyword (markup-env-widths markup-env)))) + + +(defun markup-env-append (markup-env keyword expansion) + (assert-type keyword keyword) + (assert-type expansion (list t)) + (setf (gethash keyword (markup-env-macros markup-env)) + (append (gethash keyword (markup-env-macros markup-env)) expansion))) + + +(defun markup-env-define-alist (markup-env keywords-and-expansions) + (dolist (keyword-and-expansion keywords-and-expansions) + (let ((keyword (car keyword-and-expansion)) + (expansion (cdr keyword-and-expansion))) + (cond + ((not (consp keyword)) + (markup-env-define markup-env keyword expansion)) + ((eq (first keyword) '+) + (markup-env-append markup-env (second keyword) expansion)) + (t (markup-env-define markup-env (first keyword) expansion (second keyword))))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; LOGICAL POSITIONS + +(defstruct logical-position + (n-hard-breaks 0 :type integer) ;Number of :new-line's in the current paragraph or logical block + (position 0 :type integer) ;Current character position. If n-hard-breaks is zero, only includes characters written into this logical block + ; ; plus the minimal position from the enclosing block. If n-hard-breaks is nonzero, includes indent and characters + ; ; written since the last hard break. + (surplus 0 :type integer) ;Value to subtract from position if soft breaks were hard breaks in this logical block + (n-soft-breaks nil :type (or null integer)) ;Number of soft-breaks in the current paragraph or nil if not inside a depict-logical-block + (indent 0 :type (or null integer))) ;Indent for next line + + +; Return the value the position would have if soft breaks became hard breaks in this logical block. +(declaim (inline logical-position-minimal-position)) +(defun logical-position-minimal-position (logical-position) + (- (logical-position-position logical-position) (logical-position-surplus logical-position))) + + +; Advance the logical position by width characters. If width is t, +; advance to the next line. +(defun logical-position-advance (logical-position width) + (if (eq width t) + (progn + (incf (logical-position-n-hard-breaks logical-position)) + (setf (logical-position-position logical-position) 0) + (setf (logical-position-surplus logical-position) 0)) + (incf (logical-position-position logical-position) width))) + + +(defstruct (soft-break (:constructor make-soft-break (width))) + (width 0 :type integer)) ;Number of spaces by which to replace this soft break if it doesn't turn into a hard break; t if unconditional + + +; Destructively replace any soft-break that appears in a car position in the tree with +; the spliced result of calling f on that soft-break. f should return a non-null list that can +; be nconc'd. +(defun substitute-soft-breaks (tree f) + (do ((subtree tree next-subtree) + (next-subtree (cdr tree) (cdr next-subtree))) + ((endp subtree)) + (let ((item (car subtree))) + (cond + ((soft-break-p item) + (let* ((splice (assert-non-null (funcall f item))) + (splice-rest (cdr splice))) + (setf (car subtree) (car splice)) + (setf (cdr subtree) (nconc splice-rest next-subtree)))) + ((consp item) (substitute-soft-breaks item f))))) + tree) + + +; Destructively replace any soft-break that appears in a car position in the tree +; with width spaces, where width is the soft-break's width. +(defun remove-soft-breaks (tree) + (substitute-soft-breaks + tree + #'(lambda (soft-break) + (list (make-string (soft-break-width soft-break) :initial-element #\space :element-type 'base-character))))) + + +; Return a freshly consed markup list for a hard line break followed by indent spaces. +(defun hard-break-markup (indent) + (if (zerop indent) + (list ':new-line) + (list ':new-line (make-string indent :initial-element #\space :element-type 'base-character)))) + + +; Destructively replace any soft-break that appears in a car position in the tree +; with a line break followed by indent spaces. +(defun expand-soft-breaks (tree indent) + (substitute-soft-breaks + tree + #'(lambda (soft-break) + (declare (ignore soft-break)) + (hard-break-markup indent)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MARKUP STREAMS + +(defstruct (markup-stream (:copier nil) (:predicate markup-stream?)) + (env nil :type markup-env :read-only t) + (level nil :type integer) ;0 for emitting top-level group; 1 for emitting sections; 2 for emitting paragraphs; 3 for emitting paragraph contents + (head nil :type list) ;Pointer to a dummy cons-cell whose cdr is the output markup list. + ; ; A markup-stream may destructively modify any sublists of head that contain a soft-break. + (tail nil :type list) ;Last cons cell of the output list; new cells are added in place to this cell's cdr; nil after markup-stream is closed. + (pretail nil :type list) ;Tail's predecessor if tail's car is a block that can be inlined at the end of the output list; nil otherwise. + (logical-position nil :type logical-position)) ;Information about the current logical lines or nil if not emitting paragraph contents + +; ;RTF ;HTML +(defconstant *markup-stream-top-level* 0) ;Top-level group ;Top level +(defconstant *markup-stream-section-level* 1) ;Sections ;(not used) +(defconstant *markup-stream-paragraph-level* 2) ;Paragraphs ;Block tags +(defconstant *markup-stream-content-level* 3) ;Paragraph contents ;Inline tags + + +; Return the markup accumulated in the markup-stream. +; The markup-stream is closed after this function is called. +(defun markup-stream-unexpanded-output (markup-stream) + (when (markup-stream-pretail markup-stream) + ;Inline the last block at the end of the markup-stream. + (setf (cdr (markup-stream-pretail markup-stream)) (car (markup-stream-tail markup-stream))) + (setf (markup-stream-pretail markup-stream) nil)) + (setf (markup-stream-tail markup-stream) nil) ;Close the stream. + (cdr (assert-non-null (markup-stream-head markup-stream)))) + + +; Return the markup accumulated in the markup-stream after expanding all of its macros. +; The markup-stream is closed after this function is called. +(defgeneric markup-stream-output (markup-stream)) + + +; Append one item to the end of the markup-stream. +(defun markup-stream-append1 (markup-stream item) + (setf (markup-stream-pretail markup-stream) nil) + (let ((item-cons (list item))) + (setf (cdr (markup-stream-tail markup-stream)) item-cons) + (setf (markup-stream-tail markup-stream) item-cons))) + + +; Return the approximate width of the markup item; return t if it is a line break. +(defun markup-width (markup-stream item) + (cond + ((stringp item) (round (- (length item) (* (count #\space item) (- 1 *average-space-width*))))) + ((keywordp item) (gethash item (markup-env-widths (markup-stream-env markup-stream)) 0)) + ((and item (symbolp item)) 0) + (t (error "Bad item in markup-width" item)))) + + +; Return the approximate width of the markup item; return t if it is a line break. +; Also allow markup groups as long as they do not contain line breaks. +(defgeneric markup-group-width (markup-stream item)) + + +; Append zero or more markup items to the end of the markup-stream. +; The items must be either keywords, symbols, or strings. +(defun depict (markup-stream &rest markup-list) + (assert-true (>= (markup-stream-level markup-stream) *markup-stream-content-level*)) + (dolist (markup markup-list) + (markup-stream-append1 markup-stream markup) + (logical-position-advance (markup-stream-logical-position markup-stream) (markup-width markup-stream markup)))) + + +; Same as depict except that the items may be groups as well. +(defun depict-group (markup-stream &rest markup-list) + (assert-true (>= (markup-stream-level markup-stream) *markup-stream-content-level*)) + (dolist (markup markup-list) + (markup-stream-append1 markup-stream markup) + (logical-position-advance (markup-stream-logical-position markup-stream) (markup-group-width markup-stream markup)))) + + +; If markup-item-or-list is a list, emit its contents via depict. +; If markup-item-or-list is not a list, emit it via depict. +(defun depict-item-or-list (markup-stream markup-item-or-list) + (if (listp markup-item-or-list) + (apply #'depict markup-stream markup-item-or-list) + (depict markup-stream markup-item-or-list))) + + +; If markup-item-or-list is a list, emit its contents via depict-group. +; If markup-item-or-list is not a list, emit it via depict. +(defun depict-item-or-group-list (markup-stream markup-item-or-list) + (if (listp markup-item-or-list) + (apply #'depict-group markup-stream markup-item-or-list) + (depict markup-stream markup-item-or-list))) + + +; markup-stream must be a variable that names a markup-stream that is currently +; accepting paragraphs. Execute body with markup-stream bound to a markup-stream +; to which the body can emit contents. The given block-style is applied to all +; paragraphs emitted by body (in the HTML emitter only; RTF has no block styles). +; Return the result value of body. +(defmacro depict-block-style ((markup-stream block-style) &body body) + `(depict-block-style-f ,markup-stream ,block-style + #'(lambda (,markup-stream) ,@body))) + +(defgeneric depict-block-style-f (markup-stream block-style emitter)) + + +; markup-stream must be a variable that names a markup-stream that is currently +; accepting paragraphs. Emit a paragraph with the given paragraph-style (which +; must be a symbol) whose contents are emitted by body. When executing body, +; markup-stream is bound to a markup-stream to which body should emit the paragraph's contents. +; Return the result value of body. +(defmacro depict-paragraph ((markup-stream paragraph-style) &body body) + `(depict-paragraph-f ,markup-stream ,paragraph-style + #'(lambda (,markup-stream) ,@body))) + +(defgeneric depict-paragraph-f (markup-stream paragraph-style emitter)) + + +; markup-stream must be a variable that names a markup-stream that is currently +; accepting paragraph contents. Execute body with markup-stream bound to a markup-stream +; to which the body can emit contents. The given char-style is applied to all such +; contents emitted by body. +; Return the result value of body. +(defmacro depict-char-style ((markup-stream char-style) &body body) + `(depict-char-style-f ,markup-stream ,char-style + #'(lambda (,markup-stream) ,@body))) + +(defgeneric depict-char-style-f (markup-stream char-style emitter)) + + +(defun depict-logical-block-f (markup-stream indent emitter) + (assert-true (>= (markup-stream-level markup-stream) *markup-stream-content-level*)) + (if indent + (let* ((logical-position (markup-stream-logical-position markup-stream)) + (cumulative-indent (+ (logical-position-indent logical-position) indent)) + (minimal-position (logical-position-minimal-position logical-position)) + (inner-logical-position (make-logical-position :position minimal-position + :n-soft-breaks 0 + :indent cumulative-indent)) + (old-tail (markup-stream-tail markup-stream))) + (setf (markup-stream-logical-position markup-stream) inner-logical-position) + (when *show-logical-blocks* + (markup-stream-append1 markup-stream (list ':invisible (format nil "<~D" indent)))) + (prog1 + (funcall emitter markup-stream) + (when *show-logical-blocks* + (markup-stream-append1 markup-stream '(:invisible ">"))) + (assert-true (eq (markup-stream-logical-position markup-stream) inner-logical-position)) + (let* ((tree (cdr old-tail)) + (inner-position (logical-position-position inner-logical-position)) + (inner-count (- inner-position minimal-position)) + (inner-n-hard-breaks (logical-position-n-hard-breaks inner-logical-position)) + (inner-n-soft-breaks (logical-position-n-soft-breaks inner-logical-position))) + (when *trace-logical-blocks* + (format *trace-output* "Block ~:W:~%position ~D, count ~D, n-hard-breaks ~D, n-soft-breaks ~D~%~%" + tree inner-position inner-count inner-n-hard-breaks inner-n-soft-breaks)) + (cond + ((zerop inner-n-soft-breaks) + (assert-true (zerop (logical-position-surplus inner-logical-position))) + (if (zerop inner-n-hard-breaks) + (incf (logical-position-position logical-position) inner-count) + (progn + (incf (logical-position-n-hard-breaks logical-position) inner-n-hard-breaks) + (setf (logical-position-position logical-position) inner-position) + (setf (logical-position-surplus logical-position) 0)))) + ((and (zerop inner-n-hard-breaks) (<= inner-position *markup-logical-line-width*)) + (assert-true tree) + (remove-soft-breaks tree) + (incf (logical-position-position logical-position) inner-count)) + (t + (assert-true tree) + (expand-soft-breaks tree cumulative-indent) + (incf (logical-position-n-hard-breaks logical-position) (+ inner-n-hard-breaks inner-n-soft-breaks)) + (setf (logical-position-position logical-position) (logical-position-minimal-position inner-logical-position)) + (setf (logical-position-surplus logical-position) 0)))) + (setf (markup-stream-logical-position markup-stream) logical-position))) + (funcall emitter markup-stream))) + + +; markup-stream must be a variable that names a markup-stream that is currently +; accepting paragraph contents. Execute body with markup-stream bound to a markup-stream +; to which the body can emit contents. body can call depict-break, which will either +; all expand to the widths given to the depict-break calls or all expand to line breaks +; followed by indents to the current indent level plus the given indent. +; If indent is nil, don't create the logical block and just evaluate body. +; Return the result value of body. +(defmacro depict-logical-block ((markup-stream indent) &body body) + `(depict-logical-block-f ,markup-stream ,indent + #'(lambda (,markup-stream) ,@body))) + + +; Emit a conditional line break. If the line break is not needed, emit width spaces instead. +; If width is t or omitted, the line break is unconditional. +; If width is nil, do nothing. +; If the line break is needed, the new line is indented to the current indent level. +; Must be called from the dynamic scope of a depict-logical-block. +(defun depict-break (markup-stream &optional (width t)) + (assert-true (>= (markup-stream-level markup-stream) *markup-stream-content-level*)) + (when width + (let* ((logical-position (markup-stream-logical-position markup-stream)) + (indent (logical-position-indent logical-position))) + (if (eq width t) + (depict-item-or-list markup-stream (hard-break-markup indent)) + (progn + (incf (logical-position-n-soft-breaks logical-position)) + (incf (logical-position-position logical-position) width) + (let ((surplus (- (logical-position-position logical-position) (round (* indent *average-space-width*))))) + (when (< surplus 0) + (setq surplus 0)) + (setf (logical-position-surplus logical-position) surplus)) + (when *show-logical-blocks* + (markup-stream-append1 markup-stream '(:invisible :bullet))) + (markup-stream-append1 markup-stream (make-soft-break width))))))) + + +; Call emitter to emit each element of the given list onto the markup-stream. +; emitter takes two arguments -- the markup-stream and the element of list to be emitted. +; Emit prefix before the list and suffix after the list. If prefix-break is supplied, call +; depict-break with it as the argument after the prefix. +; If indent is non-nil, enclose the list elements in a logical block with the given indent. +; Emit separator between any two emitted elements. If break is supplied, call +; depict-break with it as the argument after each separator. +; If the list is empty, emit empty unless it is :error, in which case signal an error. +; +; prefix, suffix, separator, and empty should be lists of markup elements appropriate for depict. +; If any of these lists has only one element that is not itself a list, then that list can be +; abbreviated to just that element (as in depict-item-or-list). +; +(defun depict-list (markup-stream emitter list &key indent prefix prefix-break suffix separator break (empty :error)) + (assert-true (or indent (not (or prefix-break break)))) + (labels + ((emit-element (markup-stream list) + (funcall emitter markup-stream (first list)) + (let ((rest (rest list))) + (when rest + (depict-item-or-list markup-stream separator) + (depict-break markup-stream break) + (emit-element markup-stream rest))))) + + (depict-item-or-list markup-stream prefix) + (cond + (list + (depict-logical-block (markup-stream indent) + (depict-break markup-stream prefix-break) + (emit-element markup-stream list))) + ((eq empty ':error) (error "Non-empty list required")) + (t (depict-item-or-list markup-stream empty))) + (depict-item-or-list markup-stream suffix))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MARKUP FOR CHARACTERS AND STRINGS + +(defparameter *character-names* + '((#x00 . "NUL") + (#x08 . "BS") + (#x09 . "TAB") + (#x0A . "LF") + (#x0B . "VT") + (#x0C . "FF") + (#x0D . "CR") + (#x20 . "SP"))) + +; Emit markup for the given character. The character is emitted without any formatting if it is a +; printable character and not a member of the escape-list list of characters. Otherwise the +; character is emitted with :character-literal-control formatting. +; The markup-stream should already be set to :character-literal formatting. +(defun depict-character (markup-stream char &optional (escape-list '(#\space))) + (let ((code (char-code char))) + (if (and (>= code 32) (< code 127) (not (member char escape-list))) + (depict markup-stream (string char)) + (depict-char-style (markup-stream ':character-literal-control) + (let ((name (or (cdr (assoc code *character-names*)) + (format nil "u~4,'0X" code)))) + (depict markup-stream ':left-angle-quote name ':right-angle-quote)))))) + + +; Emit markup for the given string, enclosing it in curly double quotes. +; The markup-stream should be set to normal formatting. +(defun depict-string (markup-stream string) + (depict markup-stream ':left-double-quote) + (unless (equal string "") + (depict-char-style (markup-stream ':character-literal) + (dotimes (i (length string)) + (depict-character markup-stream (char string i) nil)))) + (depict markup-stream ':right-double-quote)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MARKUP FOR IDENTIFIERS + +; Return string converted from dash-separated-uppercase-words to mixed case, +; with the first character capitalized if capitalize is true. +; The string should contain only letters, dashes, and numbers. +(defun string-to-mixed-case (string &optional capitalize) + (let* ((length (length string)) + (dst-string (make-array length :element-type 'base-character :fill-pointer 0))) + (dotimes (i length) + (let ((char (char string i))) + (if (eql char #\-) + (if capitalize + (error "Double capitalize") + (setq capitalize t)) + (progn + (cond + ((upper-case-p char) + (if capitalize + (setq capitalize nil) + (setq char (char-downcase char)))) + ((digit-char-p char)) + ((member char '(#\$ #\_))) + (t (error "Bad string-to-mixed-case character ~A" char))) + (vector-push char dst-string))))) + dst-string)) + + +; Return a string containing the symbol's name in mixed case with the first letter capitalized. +(defun symbol-upper-mixed-case-name (symbol) + (or (get symbol :upper-mixed-case-name) + (setf (get symbol :upper-mixed-case-name) (string-to-mixed-case (symbol-name symbol) t)))) + + +; Return a string containing the symbol's name in mixed case with the first letter in lower case. +(defun symbol-lower-mixed-case-name (symbol) + (or (get symbol :lower-mixed-case-name) + (setf (get symbol :lower-mixed-case-name) (string-to-mixed-case (symbol-name symbol))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MISCELLANEOUS MARKUP + + +; Append a space to the end of the markup-stream. +(defun depict-space (markup-stream) + (depict markup-stream " ")) + + +; Emit markup for the given integer, displaying it in decimal. +(defun depict-integer (markup-stream i) + (depict markup-stream (format nil "~D" i))) + diff --git a/mozilla/js/semantics/Metaparser.lisp b/mozilla/js/semantics/Metaparser.lisp new file mode 100644 index 00000000000..87b6d51b3cf --- /dev/null +++ b/mozilla/js/semantics/Metaparser.lisp @@ -0,0 +1,356 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; Finite-state machine generator +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; ------------------------------------------------------------------------------------------------------ +;;; METATRANSITION + +(defstruct (metatransition (:constructor make-metatransition (next-metastate pre-productions post-productions))) + (next-metastate nil :read-only t) ;Next metastate to enter or nil if this is an accept transition + (pre-productions nil :read-only t) ;List of productions reduced by this transition (in order from first to last) before the shift + (post-productions nil :read-only t)) ;List of productions reduced by this transition (in order from first to last) after the shift + + +;;; ------------------------------------------------------------------------------------------------------ +;;; METASTATE + +;;; A metastate is a list of states that represents a possible stack that the +;;; LALR(1) parser may encounter. +(defstruct (metastate (:constructor make-metastate (stack number transitions))) + (stack nil :type list :read-only t) ;List of states that comprises a possible stack + (number nil :type integer :read-only t) ;Serial number of this metastate + (transitions nil :type simple-vector :read-only t)) ;Array, indexed by terminal numbers, of either nil or metatransition structures + +(declaim (inline metastate-transition)) +(defun metastate-transition (metastate terminal-number) + (svref (metastate-transitions metastate) terminal-number)) + + +(defun print-metastate (metastate metagrammar &optional (stream t)) + (let ((grammar (metagrammar-grammar metagrammar))) + (pprint-logical-block (stream nil) + (format stream "M~D:~2I ~@_~<~@{S~D ~:_~}~:>~:@_" + (metastate-number metastate) + (nreverse (mapcar #'state-number (metastate-stack metastate)))) + (let ((transitions (metastate-transitions metastate))) + (dotimes (terminal-number (length transitions)) + (let ((transition (svref transitions terminal-number)) + (terminal (svref (grammar-terminals grammar) terminal-number))) + (when transition + (let ((next-metastate (metatransition-next-metastate transition))) + (pprint-logical-block (stream nil) + (format stream "~W ==> ~@_~:I~:[accept~;M~:*~D~] ~_" + terminal + (and next-metastate (metastate-number next-metastate))) + (pprint-fill stream (mapcar #'production-name (metatransition-pre-productions transition))) + (format stream " ~@_") + (pprint-fill stream (mapcar #'production-name (metatransition-post-productions transition)))) + (pprint-newline :mandatory stream))))))))) + + +(defmethod print-object ((metastate metastate) stream) + (print-unreadable-object (metastate stream) + (format stream "metastate S~D" (metastate-number metastate)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; METAGRAMMAR + +(defstruct (metagrammar (:constructor allocate-metagrammar)) + (grammar nil :type grammar :read-only t) ;The grammar to which this metagrammar corresponds + (metastates nil :type list :read-only t) ;List of metastates ordered by metastate numbers + (start nil :type metastate :read-only t)) ;The start metastate + + +(defun make-metagrammar (grammar) + (let* ((terminals (grammar-terminals grammar)) + (n-terminals (length terminals)) + (metastates-hash (make-hash-table :test #'equal)) ;Hash table of (list of state) -> metastate + (metastates nil) + (metastate-number -1)) + (labels + (;Return the stack after applying the given reduction production. + (apply-reduction-production (stack production) + (let* ((stack (nthcdr (production-rhs-length production) stack)) + (state (first stack)) + (dst-state (assert-non-null + (cdr (assoc (production-lhs production) (state-gotos state) :test *grammar-symbol-=*)))) + (dst-stack (cons dst-state stack))) + (if (member dst-state stack :test #'eq) + (error "This grammar cannot be represented by a FSM. Stack: ~S" dst-stack) + dst-stack))) + + (get-metatransition (stack terminal productions) + (let* ((state (first stack)) + (transition (cdr (assoc terminal (state-transitions state) :test *grammar-symbol-=*)))) + (when transition + (case (transition-kind transition) + (:shift + (multiple-value-bind (metastate forwarding-productions) (get-metastate (transition-state transition) stack t) + (make-metatransition metastate (nreverse productions) forwarding-productions))) + (:reduce + (let ((production (transition-production transition))) + (get-metatransition (apply-reduction-production stack production) terminal (cons production productions)))) + (:accept (make-metatransition nil (nreverse productions) nil)) + (t (error "Bad transition: ~S" transition)))))) + + ;Return the metastate corresponding to the state stack (stack-top . stack-rest). Construct a new + ;metastate if necessary. + ;If simplify is true and stack-top is a state for which every outgoing transition is the same + ;reduction, return two values: + ; the metastate reached by following that reduction (doing it recursively if needed) + ; a list of reduction productions followed this way. + (get-metastate (stack-top stack-rest simplify) + (let* ((stack (cons stack-top stack-rest)) + (existing-metastate (gethash stack metastates-hash))) + (cond + (existing-metastate (values existing-metastate nil)) + ((member stack-top stack-rest :test #'eq) + (error "This grammar cannot be represented by a FSM. Stack: ~S" stack)) + (t (let ((forwarding-production (and simplify (forwarding-state-production stack-top)))) + (if forwarding-production + (let ((stack (apply-reduction-production stack forwarding-production))) + (multiple-value-bind (metastate forwarding-productions) (get-metastate (car stack) (cdr stack) simplify) + (values metastate (cons forwarding-production forwarding-productions)))) + (let* ((transitions (make-array n-terminals :initial-element nil)) + (metastate (make-metastate stack (incf metastate-number) transitions))) + (setf (gethash stack metastates-hash) metastate) + (push metastate metastates) + (dotimes (n n-terminals) + (setf (svref transitions n) + (get-metatransition stack (svref terminals n) nil))) + (values metastate nil))))))))) + + (let ((start-metastate (get-metastate (grammar-start-state grammar) nil nil))) + (allocate-metagrammar :grammar grammar + :metastates (nreverse metastates) + :start start-metastate))))) + + +; Print the metagrammar nicely. +(defun print-metagrammar (metagrammar &optional (stream t) &key (grammar t) (details t)) + (pprint-logical-block (stream nil) + (when grammar + (print-grammar (metagrammar-grammar metagrammar) stream :details details)) + + ;Print the metastates. + (format stream "Start metastate: ~@_M~D~:@_~:@_" (metastate-number (metagrammar-start metagrammar))) + (pprint-logical-block (stream (metagrammar-metastates metagrammar)) + (pprint-exit-if-list-exhausted) + (format stream "Metastates:~2I~:@_") + (loop + (print-metastate (pprint-pop) metagrammar stream) + (pprint-exit-if-list-exhausted) + (pprint-newline :mandatory stream)))) + (pprint-newline :mandatory stream)) + + +(defmethod print-object ((metagrammar metagrammar) stream) + (print-unreadable-object (metagrammar stream :identity t) + (write-string "metagrammar" stream))) + + +; Find the longest possible prefix of the input list of tokens that is accepted by the +; grammar. Parse that prefix and return two values: +; the list of action results; +; the tail of the input list of tokens remaining to be parsed. +; Signal an error if no prefix of the input list is accepted by the grammar. +; +; token-terminal is a function that returns a terminal symbol when given an input token. +; If trace is: +; nil, don't print trace information +; :code, print trace information, including action code +; other print trace information +(defun action-metaparse (metagrammar token-terminal input &key trace) + (if trace + (trace-action-metaparse metagrammar token-terminal input trace) + (let ((grammar (metagrammar-grammar metagrammar))) + (labels + ((transition-value-stack (value-stack productions) + (dolist (production productions) + (setq value-stack (funcall (production-evaluator production) value-stack))) + value-stack) + + (cut (input good-metastate good-input good-value-stack) + (unless good-metastate + (error "Parse error on ~S ..." (ldiff input (nthcdr 10 input)))) + (let ((last-metatransition (metastate-transition good-metastate *end-marker-terminal-number*))) + (assert-true (null (metatransition-next-metastate last-metatransition))) + (assert-true (null (metatransition-post-productions last-metatransition))) + (values + (reverse (transition-value-stack good-value-stack (metatransition-pre-productions last-metatransition))) + good-input)))) + + (do ((metastate (metagrammar-start metagrammar)) + (input input (cdr input)) + (value-stack nil) + (last-good-metastate nil) + last-good-input + last-good-value-stack) + (nil) + (when (metastate-transition metastate *end-marker-terminal-number*) + (setq last-good-metastate metastate) + (setq last-good-input input) + (setq last-good-value-stack value-stack)) + (when (endp input) + (return (cut input last-good-metastate last-good-input last-good-value-stack))) + (let* ((token (first input)) + (terminal (funcall token-terminal token)) + (terminal-number (terminal-number grammar terminal)) + (metatransition (metastate-transition metastate terminal-number))) + (unless metatransition + (return (cut input last-good-metastate last-good-input last-good-value-stack))) + (setq value-stack (transition-value-stack value-stack (metatransition-pre-productions metatransition))) + (dolist (action-function-binding (gethash terminal (grammar-terminal-actions grammar))) + (push (funcall (cdr action-function-binding) token) value-stack)) + (setq value-stack (transition-value-stack value-stack (metatransition-post-productions metatransition))) + (setq metastate (metatransition-next-metastate metatransition)))))))) + + +; Same as action-parse, but with tracing information +; If trace is: +; :code, print trace information, including action code +; other print trace information +(defun trace-action-metaparse (metagrammar token-terminal input trace) + (let + ((grammar (metagrammar-grammar metagrammar))) + (labels + ((print-stacks (value-stack type-stack) + (write-string " " *trace-output*) + (if value-stack + (print-values (reverse value-stack) (reverse type-stack) *trace-output*) + (write-string "empty" *trace-output*)) + (pprint-newline :mandatory *trace-output*)) + + (transition-value-stack (value-stack type-stack productions) + (dolist (production productions) + (write-string " reduce " *trace-output*) + (if (eq trace :code) + (write production :stream *trace-output* :pretty t) + (print-production production *trace-output*)) + (pprint-newline :mandatory *trace-output*) + (setq value-stack (funcall (production-evaluator production) value-stack)) + (setq type-stack (nthcdr (production-n-action-args production) type-stack)) + (dolist (action-signature (grammar-symbol-signature grammar (production-lhs production))) + (push (cdr action-signature) type-stack)) + (print-stacks value-stack type-stack)) + (values value-stack type-stack)) + + (cut (input good-metastate good-input good-value-stack good-type-stack) + (unless good-metastate + (error "Parse error on ~S ..." (ldiff input (nthcdr 10 input)))) + (let ((last-metatransition (metastate-transition good-metastate *end-marker-terminal-number*))) + (assert-true (null (metatransition-next-metastate last-metatransition))) + (assert-true (null (metatransition-post-productions last-metatransition))) + (format *trace-output* "cut to M~D~:@_" (metastate-number good-metastate)) + (print-stacks good-value-stack good-type-stack) + (pprint-newline :mandatory *trace-output*) + (values + (reverse (transition-value-stack good-value-stack good-type-stack (metatransition-pre-productions last-metatransition))) + good-input)))) + + (do ((metastate (metagrammar-start metagrammar)) + (input input (cdr input)) + (value-stack nil) + (type-stack nil) + (last-good-metastate nil) + last-good-input + last-good-value-stack + last-good-type-stack) + (nil) + (format *trace-output* "M~D" (metastate-number metastate)) + (when (metastate-transition metastate *end-marker-terminal-number*) + (write-string " (good)" *trace-output*) + (setq last-good-metastate metastate) + (setq last-good-input input) + (setq last-good-value-stack value-stack) + (setq last-good-type-stack type-stack)) + (write-string ": " *trace-output*) + (when (endp input) + (return (cut input last-good-metastate last-good-input last-good-value-stack last-good-type-stack))) + (let* ((token (first input)) + (terminal (funcall token-terminal token)) + (terminal-number (terminal-number grammar terminal)) + (metatransition (metastate-transition metastate terminal-number))) + (unless metatransition + (format *trace-output* "shift ~W: " terminal) + (return (cut input last-good-metastate last-good-input last-good-value-stack last-good-type-stack))) + (format *trace-output* "transition to M~D~:@_" (metastate-number (metatransition-next-metastate metatransition))) + (multiple-value-setq (value-stack type-stack) + (transition-value-stack value-stack type-stack (metatransition-pre-productions metatransition))) + (dolist (action-function-binding (gethash terminal (grammar-terminal-actions grammar))) + (push (funcall (cdr action-function-binding) token) value-stack)) + (dolist (action-signature (grammar-symbol-signature grammar terminal)) + (push (cdr action-signature) type-stack)) + (format *trace-output* "shift ~W~:@_" terminal) + (print-stacks value-stack type-stack) + (multiple-value-setq (value-stack type-stack) + (transition-value-stack value-stack type-stack (metatransition-post-productions metatransition))) + (setq metastate (metatransition-next-metastate metatransition))))))) + + +; Compute all representative strings of terminals such that, for each such string S: +; S is rejected by the grammar's language; +; all prefixes of S are also rejected by the grammar's language; +; for any S and all strings of terminals T, the concatenated string ST is also +; rejected by the grammar's language; +; no string S1 is a prefix of (or equal to) another string S2. +; Often there are infinitely many such strings S, so only output one for each illegal +; metaparser transition. +; Return a list of S's, where each S is itself a list of terminals. +(defun compute-illegal-strings (metagrammar) + (let* ((grammar (metagrammar-grammar metagrammar)) + (terminals (grammar-terminals grammar)) + (n-terminals (length terminals)) + (metastates (metagrammar-metastates metagrammar)) + (n-metastates (length metastates)) + (visited-metastates (make-array n-metastates :element-type 'bit :initial-element 0)) + (illegal-strings nil)) + (labels + ((visit (metastate reversed-string) + (let ((metastate-number (metastate-number metastate))) + (when (= (sbit visited-metastates metastate-number) 0) + (setf (sbit visited-metastates metastate-number) 1) + (let ((metatransitions (metastate-transitions metastate))) + ;If there is a transition for the end marker from this state, then string + ;is accepted by the language, so cut off the search. + (unless (svref metatransitions *end-marker-terminal-number*) + (dotimes (terminal-number n-terminals) + (unless (= terminal-number *end-marker-terminal-number*) + (let ((metatransition (svref metatransitions terminal-number)) + (reversed-string (cons (svref terminals terminal-number) reversed-string))) + (if metatransition + (visit (metatransition-next-metastate metatransition) reversed-string) + (push (reverse reversed-string) illegal-strings))))))))))) + + (visit (metagrammar-start metagrammar) nil) + (nreverse illegal-strings)))) + + +; Compute and print illegal strings of terminals. See compute-illegal-strings. +(defun print-illegal-strings (metagrammar &optional (stream t)) + (pprint-logical-block (stream (compute-illegal-strings metagrammar)) + (format stream "Illegal strings:~2I") + (loop + (pprint-exit-if-list-exhausted) + (pprint-newline :mandatory stream) + (pprint-fill stream (pprint-pop)))) + (pprint-newline :mandatory stream)) diff --git a/mozilla/js/semantics/Parser.lisp b/mozilla/js/semantics/Parser.lisp new file mode 100644 index 00000000000..f82cbeff6f1 --- /dev/null +++ b/mozilla/js/semantics/Parser.lisp @@ -0,0 +1,675 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; LALR(1) and LR(1) grammar generator +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; ------------------------------------------------------------------------------------------------------ + +; kernel-item-alist is a list of pairs (item . prev), where item is a kernel item +; and prev is either nil or a laitem. kernel is a list of the kernel items in a canonical order. +; Return a new state with the given list of kernel items and state number. +; For each non-null prev in kernel-item-alist, update (laitem-propagates prev) to include the +; corresponding laitem in the new state. +(defun make-state (grammar kernel kernel-item-alist number initial-lookaheads) + (let ((laitems nil) + (laitems-hash (make-hash-table :test #'eq))) + (labels + ;Create a laitem for this item and add the association item->laitem to the laitems-hash + ;hash table if it's not there already. Regardless of whether a new laitem was created, + ;update the laitem's lookaheads to also include the given lookaheads. + ;If prev is non-null, update (laitem-propagates prev) to include the laitem if it's not + ;already included there. + ;If a new laitem was created and its first symbol after the dot exists and is a + ;nonterminal A, recursively close items A->.rhs corresponding to all rhs's in the + ;grammar's rule for A. + ((close-item (item lookaheads prev) + (let ((laitem (gethash item laitems-hash))) + (if laitem + (setf (laitem-lookaheads laitem) + (terminalset-union (laitem-lookaheads laitem) lookaheads)) + (let ((item-next-symbol (item-next-symbol item))) + (setq laitem (allocate-laitem grammar item lookaheads)) + (push laitem laitems) + (setf (gethash item laitems-hash) laitem) + (when (nonterminal? item-next-symbol) + (multiple-value-bind (next-lookaheads epsilon-lookahead) + (string-initial-terminals grammar (rest (item-unseen item))) + (let ((next-prev (and epsilon-lookahead laitem))) + (dolist (production (rule-productions (grammar-rule grammar item-next-symbol))) + (close-item (make-item grammar production 0) next-lookaheads next-prev))))))) + (when prev + (pushnew laitem (laitem-propagates prev)))))) + + (dolist (acons kernel-item-alist nil) + (let ((item (car acons)) + (prev (cdr acons))) + (close-item item initial-lookaheads prev))) + (allocate-state number kernel (nreverse laitems))))) + + +; f is a function that takes two arguments: +; a grammar symbol, and +; a list of kernel items in order of increasing item number. +; a list of pairs (item . prev), where item is a kernel item and prev is a laitem; +; For each possible symbol X that can be shifted while in the given state S, call +; f giving it S and the list of items that constitute the kernel of that shift's destination +; state. The prev's are the sources of the corresponding shifted items. +(defun state-each-shift-item-alist (f state) + (let ((shift-symbols-hash (make-hash-table :test *grammar-symbol-=*))) + (dolist (source-laitem (state-laitems state)) + (let* ((source-item (laitem-item source-laitem)) + (shift-symbol (item-next-symbol source-item))) + (when shift-symbol + (push (cons (item-next source-item) source-laitem) + (gethash shift-symbol shift-symbols-hash))))) + ;Use dolist/gethash instead of maphash to make state assignments deterministic. + (dolist (shift-symbol (sorted-hash-table-keys shift-symbols-hash)) + (let ((kernel-item-alist (gethash shift-symbol shift-symbols-hash))) + (funcall f shift-symbol (sort (mapcar #'car kernel-item-alist) #'< :key #'item-number) kernel-item-alist))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; LR(1) + + +; kernel-item-alist should have the same kernel items as state. +; Return true if the prev lookaheads in kernel-item-alist are the same as or subsets of +; the corresponding lookaheads in the state's kernel laitems. +(defun state-subsumes-lookaheads (state kernel-item-alist) + (every + #'(lambda (acons) + (terminalset-<= (laitem-lookaheads (cdr acons)) + (laitem-lookaheads (state-laitem state (car acons))))) + kernel-item-alist)) + + +; kernel-item-alist should have the same kernel items as state. +; Return true if the prev lookaheads in kernel-item-alist are weakly compatible +; with the lookaheads in the state's kernel laitems. +(defun state-weakly-compatible (state kernel-item-alist) + (labels + ((lookahead-weakly-compatible (lookahead1a lookahead1b lookahead2a lookahead2b) + (or (and (terminalsets-disjoint lookahead1a lookahead2b) + (terminalsets-disjoint lookahead1b lookahead2a)) + (not (terminalsets-disjoint lookahead1a lookahead1b)) + (not (terminalsets-disjoint lookahead2a lookahead2b)))) + + (lookahead-list-weakly-compatible (lookahead1a lookaheads1 lookahead2a lookaheads2) + (or (endp lookaheads1) + (and (lookahead-weakly-compatible lookahead1a (first lookaheads1) lookahead2a (first lookaheads2)) + (lookahead-list-weakly-compatible lookahead1a (rest lookaheads1) lookahead2a (rest lookaheads2))))) + + (lookahead-lists-weakly-compatible (lookaheads1 lookaheads2) + (or (endp lookaheads1) + (and (lookahead-list-weakly-compatible (first lookaheads1) (rest lookaheads1) (first lookaheads2) (rest lookaheads2)) + (lookahead-lists-weakly-compatible (rest lookaheads1) (rest lookaheads2)))))) + + (or (= (length kernel-item-alist) 1) + (lookahead-lists-weakly-compatible + (mapcar #'(lambda (acons) (laitem-lookaheads (state-laitem state (car acons)))) kernel-item-alist) + (mapcar #'(lambda (acons) (laitem-lookaheads (cdr acons))) kernel-item-alist))))) + + +; Propagate all lookaheads in the state. +(defun propagate-internal-lookaheads (state) + (dolist (src-laitem (state-laitems state)) + (let ((src-lookaheads (laitem-lookaheads src-laitem))) + (dolist (dst-laitem (laitem-propagates src-laitem)) + (setf (laitem-lookaheads dst-laitem) + (terminalset-union (laitem-lookaheads dst-laitem) src-lookaheads)))))) + + +; Propagate all lookaheads in kernel-item-alist, which must target destination-state. +; Mark destination-state as dirty in the dirty-states hash table. +(defun propagate-external-lookaheads (kernel-item-alist destination-state dirty-states) + (dolist (acons kernel-item-alist) + (let ((dest-laitem (state-laitem destination-state (car acons))) + (src-laitem (cdr acons))) + (setf (laitem-lookaheads dest-laitem) + (terminalset-union (laitem-lookaheads dest-laitem) (laitem-lookaheads src-laitem))))) + (setf (gethash destination-state dirty-states) t)) + + +; Make all states in the grammar and return the initial state. +; Initialize the grammar's list of states. +; Set up the laitems' propagate lists but do not propagate lookaheads yet. +; Initialize the states' gotos lists. +; Initialize the states' shift (but not reduce or accept) transitions in the transitions lists. +(defun add-all-lr-states (grammar) + (let* ((initial-item (make-item grammar (grammar-start-production grammar) 0)) + (lr-states-hash (make-hash-table :test #'equal)) ;kernel -> list of states with that kernel + (initial-kernel (list initial-item)) + (initial-state (make-state grammar initial-kernel (list (cons initial-item nil)) 0 (make-terminalset grammar *end-marker*))) + (states (list initial-state)) + (next-state-number 1)) + (setf (gethash initial-kernel lr-states-hash) (list initial-state)) + (do ((source-states (list initial-state)) + (dirty-states (make-hash-table :test #'eq))) ;Set of states whose kernel lookaheads changed and haven't been propagated yet + ((and (endp source-states) (zerop (hash-table-count dirty-states)))) + (labels + ((make-destination-state (kernel kernel-item-alist) + (let* ((possible-destination-states (gethash kernel lr-states-hash)) + (destination-state (find-if #'(lambda (possible-destination-state) + (state-subsumes-lookaheads possible-destination-state kernel-item-alist)) + possible-destination-states))) + (cond + (destination-state) + ((setq destination-state (find-if #'(lambda (possible-destination-state) + (state-weakly-compatible possible-destination-state kernel-item-alist)) + possible-destination-states)) + (propagate-external-lookaheads kernel-item-alist destination-state dirty-states)) + (t + (setq destination-state (make-state grammar kernel kernel-item-alist next-state-number *empty-terminalset*)) + (propagate-external-lookaheads kernel-item-alist destination-state dirty-states) + (push destination-state (gethash kernel lr-states-hash)) + (incf next-state-number) + (push destination-state states) + (push destination-state source-states))) + destination-state)) + + (update-destination-state (destination-state kernel-item-alist) + (cond + ((state-subsumes-lookaheads destination-state kernel-item-alist) + destination-state) + ((state-weakly-compatible destination-state kernel-item-alist) + (propagate-external-lookaheads kernel-item-alist destination-state dirty-states) + destination-state) + (t (make-destination-state (state-kernel destination-state) kernel-item-alist))))) + + (if source-states + (let ((source-state (pop source-states))) + (remhash source-state dirty-states) + (propagate-internal-lookaheads source-state) + (state-each-shift-item-alist + #'(lambda (shift-symbol kernel kernel-item-alist) + (let ((destination-state (make-destination-state kernel kernel-item-alist))) + (if (nonterminal? shift-symbol) + (push (cons shift-symbol destination-state) + (state-gotos source-state)) + (push (cons shift-symbol (make-shift-transition destination-state)) + (state-transitions source-state))))) + source-state)) + (dolist (dirty-state (sort (hash-table-keys dirty-states) #'< :key #'state-number)) + (when (remhash dirty-state dirty-states) + (propagate-internal-lookaheads dirty-state) + (state-each-shift-item-alist + #'(lambda (shift-symbol kernel kernel-item-alist) + (declare (ignore kernel)) + (if (nonterminal? shift-symbol) + (let* ((destination-binding (assoc shift-symbol (state-gotos dirty-state) :test *grammar-symbol-=*)) + (destination-state (assert-non-null (cdr destination-binding)))) + (setf (cdr destination-binding) (update-destination-state destination-state kernel-item-alist))) + (let* ((destination-transition (cdr (assoc shift-symbol (state-transitions dirty-state) :test *grammar-symbol-=*))) + (destination-state (assert-non-null (transition-state destination-transition)))) + (setf (transition-state destination-transition) + (update-destination-state destination-state kernel-item-alist))))) + dirty-state)))))) + (setf (grammar-states grammar) (nreverse states)) + initial-state)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; LALR(1) + + +; Make all states in the grammar and return the initial state. +; Initialize the grammar's list of states. +; Set up the laitems' propagate lists but do not propagate lookaheads yet. +; Initialize the states' gotos lists. +; Initialize the states' shift (but not reduce or accept) transitions in the transitions lists. +(defun add-all-lalr-states (grammar) + (let* ((initial-item (make-item grammar (grammar-start-production grammar) 0)) + (lalr-states-hash (make-hash-table :test #'equal)) ;kernel -> state + (initial-kernel (list initial-item)) + (initial-state (make-state grammar initial-kernel (list (cons initial-item nil)) 0 (make-terminalset grammar *end-marker*))) + (states (list initial-state)) + (next-state-number 1)) + (setf (gethash initial-kernel lalr-states-hash) initial-state) + (do ((source-states (list initial-state))) + ((endp source-states)) + (let ((source-state (pop source-states))) + (state-each-shift-item-alist + #'(lambda (shift-symbol kernel kernel-item-alist) + (let ((destination-state (gethash kernel lalr-states-hash))) + (if destination-state + (dolist (acons kernel-item-alist) + (pushnew (state-laitem destination-state (car acons)) (laitem-propagates (cdr acons)))) + (progn + (setq destination-state (make-state grammar kernel kernel-item-alist next-state-number *empty-terminalset*)) + (setf (gethash kernel lalr-states-hash) destination-state) + (incf next-state-number) + (push destination-state states) + (push destination-state source-states))) + (if (nonterminal? shift-symbol) + (push (cons shift-symbol destination-state) + (state-gotos source-state)) + (push (cons shift-symbol (make-shift-transition destination-state)) + (state-transitions source-state))))) + source-state))) + (setf (grammar-states grammar) (nreverse states)) + initial-state)) + + +; Propagate the lookaheads in the LALR(1) grammar. +(defun propagate-lalr-lookaheads (grammar) + (let ((dirty-laitems (make-hash-table :test #'eq))) + (dolist (state (grammar-states grammar)) + (dolist (laitem (state-laitems state)) + (when (and (laitem-propagates laitem) (not (terminalset-empty? (laitem-lookaheads laitem)))) + (setf (gethash laitem dirty-laitems) t)))) + (do () + ((zerop (hash-table-count dirty-laitems))) + (dolist (dirty-laitem (hash-table-keys dirty-laitems)) + (remhash dirty-laitem dirty-laitems) + (let ((src-lookaheads (laitem-lookaheads dirty-laitem))) + (dolist (dst-laitem (laitem-propagates dirty-laitem)) + (let* ((old-dst-lookaheads (laitem-lookaheads dst-laitem)) + (new-dst-lookaheads (terminalset-union old-dst-lookaheads src-lookaheads))) + (unless (terminalset-= old-dst-lookaheads new-dst-lookaheads) + (setf (laitem-lookaheads dst-laitem) new-dst-lookaheads) + (setf (gethash dst-laitem dirty-laitems) t))))))) + + ;Erase the propagates chains in all laitems. + (dolist (state (grammar-states grammar)) + (dolist (laitem (state-laitems state)) + (setf (laitem-propagates laitem) nil))))) + + +;;; ------------------------------------------------------------------------------------------------------ + + +; Calculate the reduce and accept transitions in the grammar. +; Also sort all transitions by their terminal numbers and gotos by their nonterminal numbers. +; Conflicting transitions are sorted as follows: +; shifts come before reduces and accepts +; accepts come before reduces +; reduces with lower production numbers come before reduces with higher production numbers +; Disambiguation will choose the first member of a sorted list of conflicting transitions. +(defun finish-transitions (grammar) + (dolist (state (grammar-states grammar)) + (dolist (laitem (state-laitems state)) + (let ((item (laitem-item laitem))) + (unless (item-next-symbol item) + (if (grammar-symbol-= (item-lhs item) *start-nonterminal*) + (when (terminal-in-terminalset grammar *end-marker* (laitem-lookaheads laitem)) + (push (cons *end-marker* (make-accept-transition)) + (state-transitions state))) + (map-terminalset-reverse + #'(lambda (lookahead) + (push (cons lookahead (make-reduce-transition (item-production item))) + (state-transitions state))) + grammar + (laitem-lookaheads laitem)))))) + (setf (state-gotos state) + (sort (state-gotos state) #'< :key #'(lambda (goto-cons) (state-number (cdr goto-cons))))) + (setf (state-transitions state) + (sort (state-transitions state) + #'(lambda (transition-cons-1 transition-cons-2) + (let ((terminal-number-1 (terminal-number grammar (car transition-cons-1))) + (terminal-number-2 (terminal-number grammar (car transition-cons-2)))) + (cond + ((< terminal-number-1 terminal-number-2) t) + ((> terminal-number-1 terminal-number-2) nil) + (t (let* ((transition1 (cdr transition-cons-1)) + (transition2 (cdr transition-cons-2)) + (transition-kind-1 (transition-kind transition1)) + (transition-kind-2 (transition-kind transition2))) + (cond + ((eq transition-kind-2 :shift) nil) + ((eq transition-kind-1 :shift) t) + ((eq transition-kind-2 :accept) nil) + ((eq transition-kind-1 :accept) t) + (t (let ((production-number-1 (production-number (transition-production transition1))) + (production-number-2 (production-number (transition-production transition2)))) + (< production-number-1 production-number-2))))))))))))) + + +; Find ambiguities, if any, in the grammar. Report them on the given stream. +; Fix all ambiguities in favor of the first transition listed +; (the transitions were ordered by finish-transitions). +(defun report-and-fix-ambiguities (grammar stream) + (let ((found-ambiguities nil)) + (pprint-logical-block (stream nil) + (dolist (state (grammar-states grammar)) + (labels + + ((report-ambiguity (transition-cons other-transition-conses) + (unless found-ambiguities + (setq found-ambiguities t) + (format stream "~&Ambiguities:") + (pprint-indent :block 2 stream)) + (pprint-newline :mandatory stream) + (pprint-logical-block (stream nil) + (format stream "S~D: ~W ~:_=> ~:_" (state-number state) (car transition-cons)) + (pprint-logical-block (stream nil) + (dolist (a (cons transition-cons other-transition-conses)) + (print-transition (cdr a) stream) + (format stream " ~:_"))))) + + ; Check the list of transition-conses and report ambiguities. + ; start is the start of a possibly larger list of transition-conses whose tail + ; is the given list. If ambiguities exist, return a copy of start up to the + ; position of list in it followed by list with ambiguities removed. If not, + ; return start unchanged. + (check (transition-conses start) + (if transition-conses + (let* ((transition-cons (first transition-conses)) + (transition-terminal (car transition-cons)) + (transition-conses-rest (rest transition-conses))) + (if transition-conses-rest + (if (grammar-symbol-= transition-terminal (car (first transition-conses-rest))) + (let ((unrelated-transitions + (member-if #'(lambda (a) (not (grammar-symbol-= transition-terminal (car a)))) + transition-conses-rest))) + (report-ambiguity transition-cons (ldiff transition-conses-rest unrelated-transitions)) + (check unrelated-transitions (append (ldiff start transition-conses-rest) unrelated-transitions))) + (check transition-conses-rest start)) + start)) + start))) + + (let ((transition-conses (state-transitions state))) + (setf (state-transitions state) (check transition-conses transition-conses)))))) + (when found-ambiguities + (pprint-newline :mandatory stream)))) + + +; Erase the existing parser, if any, for the given grammar. +(defun clear-parser (grammar) + (clrhash (grammar-items-hash grammar)) + (setf (grammar-states grammar) nil)) + + +; Construct a LR or LALR parser in the given grammar. kind should be either :lalr-1 or :lr-1. +; Return the grammar. +(defun compile-parser (grammar kind) + (clear-parser grammar) + (ecase kind + (:lalr-1 + (add-all-lalr-states grammar) + (propagate-lalr-lookaheads grammar)) + (:lr-1 + (add-all-lr-states grammar))) + (finish-transitions grammar) + (report-and-fix-ambiguities grammar *error-output*) + grammar) + + +; Make the grammar and compile its parser. kind should be either :lalr-1 or :lr-1. +(defun make-and-compile-grammar (kind parametrization start-symbol grammar-source) + (compile-parser (make-grammar parametrization start-symbol grammar-source) + kind)) + + +;;; ------------------------------------------------------------------------------------------------------ + +; Parse the input list of tokens to produce a parse tree. +; token-terminal is a function that returns a terminal symbol when given an input token. +(defun parse (grammar token-terminal input) + (labels + (;Continue the parse with the given parser stack and remainder of input. + (parse-step (stack input) + (if (endp input) + (parse-step-1 stack *end-marker* nil nil) + (let ((token (first input))) + (parse-step-1 stack (funcall token-terminal token) token (rest input))))) + + ;Same as parse-step except that the next input terminal has been determined already. + ;input-rest contains the input tokens after the next token. + (parse-step-1 (stack terminal token input-rest) + (let* ((state (caar stack)) + (transition (cdr (assoc terminal (state-transitions state) :test *grammar-symbol-=*)))) + (if transition + (case (transition-kind transition) + (:shift (parse-step (acons (transition-state transition) token stack) input-rest)) + (:reduce (let ((production (transition-production transition)) + (expansion nil)) + (dotimes (i (production-rhs-length production)) + (push (cdr (pop stack)) expansion)) + (let* ((state (caar stack)) + (dst-state (assert-non-null + (cdr (assoc (production-lhs production) (state-gotos state) :test *grammar-symbol-=*)))) + (named-expansion (cons (production-name production) expansion))) + (parse-step-1 (acons dst-state named-expansion stack) terminal token input-rest)))) + (:accept (cdar stack)) + (t (error "Bad transition: ~S" transition))) + (error "Parse error on ~S followed by ~S ..." token (ldiff input-rest (nthcdr 10 input-rest))))))) + + (parse-step (list (cons (grammar-start-state grammar) nil)) input))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; ACTIONS + +; Initialize the action-signatures hash table, setting each grammar symbol's signature +; to null for now. Also clear all production actions in the grammar. +(defun clear-actions (grammar) + (let ((action-signatures (make-hash-table :test *grammar-symbol-=*)) + (terminals (grammar-terminals grammar)) + (nonterminals (grammar-nonterminals grammar))) + (dotimes (i (length terminals)) + (setf (gethash (svref terminals i) action-signatures) nil)) + (dotimes (i (length nonterminals)) + (setf (gethash (svref nonterminals i) action-signatures) nil)) + (setf (grammar-action-signatures grammar) action-signatures) + (each-grammar-production + grammar + #'(lambda (production) + (setf (production-actions production) nil) + (setf (production-n-action-args production) nil) + (setf (production-evaluator-code production) nil) + (setf (production-evaluator production) nil))) + (clrhash (grammar-terminal-actions grammar)))) + + +; Declare the type of action action-symbol, when called on general-grammar-symbol, to be type-expr. +; Signal an error on duplicate actions. +; It's OK if some of the symbol instances don't exist, as long as at least one does. +(defun declare-action (grammar general-grammar-symbol action-symbol type-expr) + (unless (and action-symbol (symbolp action-symbol)) + (error "Bad action name ~S" action-symbol)) + (let ((action-signatures (grammar-action-signatures grammar)) + (grammar-symbols (general-grammar-symbol-instances grammar general-grammar-symbol)) + (symbol-exists nil)) + (dolist (grammar-symbol grammar-symbols) + (let ((signature (gethash grammar-symbol action-signatures :undefined))) + (unless (eq signature :undefined) + (setq symbol-exists t) + (when (assoc action-symbol signature :test #'eq) + (error "Attempt to redefine the type of action ~S on ~S" action-symbol grammar-symbol)) + (setf (gethash grammar-symbol action-signatures) + (nconc signature (list (cons action-symbol type-expr)))) + (if (nonterminal? grammar-symbol) + (dolist (production (rule-productions (grammar-rule grammar grammar-symbol))) + (setf (production-actions production) + (nconc (production-actions production) (list (cons action-symbol nil))))) + (let ((terminal-actions (grammar-terminal-actions grammar))) + (assert-type grammar-symbol terminal) + (setf (gethash grammar-symbol terminal-actions) + (nconc (gethash grammar-symbol terminal-actions) (list (cons action-symbol nil))))))))) + (unless symbol-exists + (error "Bad action grammar symbol ~S" grammar-symbols)))) + + +; Return the list of pairs (action-symbol . type-or-type-expr) for this grammar-symbol. +; The pairs are in order from oldest to newest action-symbols added to this grammar-symbol. +(declaim (inline grammar-symbol-signature)) +(defun grammar-symbol-signature (grammar grammar-symbol) + (gethash grammar-symbol (grammar-action-signatures grammar))) + + +; Return the list of action types of the grammar's user start-symbol. +(defun grammar-user-start-action-types (grammar) + (mapcar #'cdr (grammar-symbol-signature grammar (gramar-user-start-symbol grammar)))) + + +; If action action-symbol is declared on grammar-symbol, return two values: +; t, and +; the action's type-expr; +; If not, return nil. +(defun action-declaration (grammar grammar-symbol action-symbol) + (let ((declaration (assoc action-symbol (grammar-symbol-signature grammar grammar-symbol) :test #'eq))) + (and declaration + (values t (cdr declaration))))) + + +; Call f on every action declaration, passing it two arguments: +; the grammar-symbol; +; a pair (action-symbol . type-expr). +; f may modify the action's type-expr. +(defun each-action-declaration (grammar f) + (maphash #'(lambda (grammar-symbol signature) + (dolist (action-declaration signature) + (funcall f grammar-symbol action-declaration))) + (grammar-action-signatures grammar))) + + +; Define action action-symbol, when called on the production with the given name, +; to be action-expr. The action should have been declared already. +(defun define-action (grammar production-name action-symbol action-expr) + (dolist (production (general-production-productions (grammar-general-production grammar production-name))) + (let ((definition (assoc action-symbol (production-actions production) :test #'eq))) + (cond + ((null definition) + (error "Attempt to define action ~S on ~S, which hasn't been declared yet" action-symbol production-name)) + ((cdr definition) + (error "Duplicate definition of action ~S on ~S" action-symbol production-name)) + (t (setf (cdr definition) (make-action action-expr))))))) + + +; Define action action-symbol, when called on the given terminal, +; to execute the given function, which should take a token as an input and +; produce a value of the proper type as output. +; The action should have been declared already. +(defun define-terminal-action (grammar terminal action-symbol action-function) + (assert-type action-function function) + (let ((definition (assoc action-symbol (gethash terminal (grammar-terminal-actions grammar)) :test #'eq))) + (cond + ((null definition) + (error "Attempt to define action ~S on ~S, which hasn't been declared yet" action-symbol terminal)) + ((cdr definition) + (error "Duplicate definition of action ~S on ~S" action-symbol terminal)) + (t (setf (cdr definition) action-function))))) + + + +; Parse the input list of tokens to produce a list of action results. +; token-terminal is a function that returns a terminal symbol when given an input token. +; If trace is: +; nil, don't print trace information +; :code, print trace information, including action code +; other print trace information +; Return two values: +; the list of action results; +; the list of action results' types. +(defun action-parse (grammar token-terminal input &key trace) + (labels + (;Continue the parse with the given stacks and remainder of input. + (parse-step (state-stack value-stack input) + (if (endp input) + (parse-step-1 state-stack value-stack *end-marker* nil nil) + (let ((token (first input))) + (parse-step-1 state-stack value-stack (funcall token-terminal token) token (rest input))))) + + ;Same as parse-step except that the next input terminal has been determined already. + ;input-rest contains the input tokens after the next token. + (parse-step-1 (state-stack value-stack terminal token input-rest) + (let* ((state (car state-stack)) + (transition (cdr (assoc terminal (state-transitions state) :test *grammar-symbol-=*)))) + (if transition + (case (transition-kind transition) + (:shift + (dolist (action-function-binding (gethash terminal (grammar-terminal-actions grammar))) + (push (funcall (cdr action-function-binding) token) value-stack)) + (parse-step (cons (transition-state transition) state-stack) value-stack input-rest)) + (:reduce + (let* ((production (transition-production transition)) + (state-stack (nthcdr (production-rhs-length production) state-stack)) + (state (car state-stack)) + (dst-state (assert-non-null + (cdr (assoc (production-lhs production) (state-gotos state) :test *grammar-symbol-=*)))) + (value-stack (funcall (production-evaluator production) value-stack))) + (parse-step-1 (cons dst-state state-stack) value-stack terminal token input-rest))) + (:accept (values (nreverse value-stack) (grammar-user-start-action-types grammar))) + (t (error "Bad transition: ~S" transition))) + (error "Parse error on ~S followed by ~S ..." token (ldiff input-rest (nthcdr 10 input-rest))))))) + + (if trace + (trace-action-parse grammar token-terminal input trace) + (parse-step (list (grammar-start-state grammar)) nil input)))) + + +; Same as action-parse, but with tracing information +; If trace is: +; :code, print trace information, including action code +; other print trace information +; Return two values: +; the list of action results; +; the list of action results' types. +(defun trace-action-parse (grammar token-terminal input trace) + (labels + (;Continue the parse with the given stacks and remainder of input. + ;type-stack contains the types of corresponding value-stack entries. + (parse-step (state-stack value-stack type-stack input) + (if (endp input) + (parse-step-1 state-stack value-stack type-stack *end-marker* nil nil) + (let ((token (first input))) + (parse-step-1 state-stack value-stack type-stack (funcall token-terminal token) token (rest input))))) + + ;Same as parse-step except that the next input terminal has been determined already. + ;input-rest contains the input tokens after the next token. + (parse-step-1 (state-stack value-stack type-stack terminal token input-rest) + (let* ((state (car state-stack)) + (transition (cdr (assoc terminal (state-transitions state) :test *grammar-symbol-=*)))) + (format *trace-output* "S~D: ~@_" (state-number state)) + (print-values (reverse value-stack) (reverse type-stack) *trace-output*) + (pprint-newline :mandatory *trace-output*) + (if transition + (case (transition-kind transition) + (:shift + (format *trace-output* " shift ~W~:@_" terminal) + (dolist (action-function-binding (gethash terminal (grammar-terminal-actions grammar))) + (push (funcall (cdr action-function-binding) token) value-stack)) + (dolist (action-signature (grammar-symbol-signature grammar terminal)) + (push (cdr action-signature) type-stack)) + (parse-step (cons (transition-state transition) state-stack) value-stack type-stack input-rest)) + (:reduce + (let ((production (transition-production transition))) + (write-string " reduce " *trace-output*) + (if (eq trace :code) + (write production :stream *trace-output* :pretty t) + (print-production production *trace-output*)) + (pprint-newline :mandatory *trace-output*) + (let* ((state-stack (nthcdr (production-rhs-length production) state-stack)) + (state (car state-stack)) + (dst-state (assert-non-null + (cdr (assoc (production-lhs production) (state-gotos state) :test *grammar-symbol-=*)))) + (value-stack (funcall (production-evaluator production) value-stack)) + (type-stack (nthcdr (production-n-action-args production) type-stack))) + (dolist (action-signature (grammar-symbol-signature grammar (production-lhs production))) + (push (cdr action-signature) type-stack)) + (parse-step-1 (cons dst-state state-stack) value-stack type-stack terminal token input-rest)))) + (:accept + (format *trace-output* " accept~:@_") + (values (nreverse value-stack) (nreverse type-stack))) + (t (error "Bad transition: ~S" transition))) + (error "Parse error on ~S followed by ~S ..." token (ldiff input-rest (nthcdr 10 input-rest))))))) + + (parse-step (list (grammar-start-state grammar)) nil nil input))) + diff --git a/mozilla/js/semantics/README b/mozilla/js/semantics/README new file mode 100644 index 00000000000..c71123a432b --- /dev/null +++ b/mozilla/js/semantics/README @@ -0,0 +1,10 @@ +js/semantics contains experimental code used to generate LR(1) and LALR(1) +grammars for JavaScript as well as compile and check formal semantics for +JavaScript. The semantics can be executed directly or printed into either +HTML or Microsoft Word RTF formats. + +This code is written in standard Common Lisp. It's been used under Macintosh +Common Lisp 4.0, but should also work under other Common Lisp implementations. + +Contact Waldemar Horwat (waldemar@netscape.com or waldemar@acm.org) for +more information. diff --git a/mozilla/js/semantics/RTF.lisp b/mozilla/js/semantics/RTF.lisp new file mode 100644 index 00000000000..a638325a6ba --- /dev/null +++ b/mozilla/js/semantics/RTF.lisp @@ -0,0 +1,699 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; RTF reader and writer +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; 1440 twips/inch +;;; 20 twips/pt + +(defparameter *rtf-definitions* + '((:rtf-intro rtf 1 mac ansicpg 10000 uc 1 deff 0 deflang 2057 deflangfe 2057) + + ;Fonts + ((+ :rtf-intro) :fonttbl) + (:fonttbl (fonttbl :fonts)) + + (:times f 0) + ((+ :fonts) (:times froman fcharset 256 fprq 2 (* panose "02020603050405020304") "Times New Roman;")) + (:symbol f 3) + ((+ :fonts) (:symbol ftech fcharset 2 fprq 2 "Symbol;")) + (:helvetica f 4) + ((+ :fonts) (:helvetica fnil fcharset 256 fprq 2 "Helvetica;")) + (:courier f 5) + ((+ :fonts) (:courier fmodern fcharset 256 fprq 2 "Courier New;")) + (:palatino f 6) + ((+ :fonts) (:palatino fnil fcharset 256 fprq 2 "Palatino;")) + (:zapf-chancery f 7) + ((+ :fonts) (:zapf-chancery fscript fcharset 256 fprq 2 "Zapf Chancery;")) + (:zapf-dingbats f 8) + ((+ :fonts) (:zapf-dingbats ftech fcharset 2 fprq 2 "Zapf Dingbats;")) + + + ;Color table + ((+ :rtf-intro) :colortbl) + (:colortbl (colortbl ";" ;0 + red 0 green 0 blue 0 ";" ;1 + red 0 green 0 blue 255 ";" ;2 + red 0 green 255 blue 255 ";" ;3 + red 0 green 255 blue 0 ";" ;4 + red 255 green 0 blue 255 ";" ;5 + red 255 green 0 blue 0 ";" ;6 + red 255 green 255 blue 0 ";" ;7 + red 255 green 255 blue 255 ";" ;8 + red 0 green 0 blue 128 ";" ;9 + red 0 green 128 blue 128 ";" ;10 + red 0 green 128 blue 0 ";" ;11 + red 128 green 0 blue 128 ";" ;12 + red 128 green 0 blue 0 ";" ;13 + red 128 green 128 blue 0 ";" ;14 + red 128 green 128 blue 128 ";" ;15 + red 192 green 192 blue 192 ";")) ;16 + (:black cf 1) + (:blue cf 2) + (:turquoise cf 3) + (:bright-green cf 4) + (:pink cf 5) + (:red cf 6) + (:yellow cf 7) + (:white cf 8) + (:dark-blue cf 9) + (:teal cf 10) + (:green cf 11) + (:violet cf 12) + (:dark-red cf 13) + (:dark-yellow cf 14) + (:gray-50 cf 15) + (:gray-25 cf 16) + + + ;Misc. + (:tab2 tab) + (:tab3 tab) + (:8-pt fs 16) + (:9-pt fs 18) + (:10-pt fs 20) + (:12-pt fs 24) + (:no-language lang 1024) + (:english lang 1033) + (:english-uk lang 2057) + + (:reset-section sectd) + (:new-section sect) + (:reset-paragraph pard plain) + ((:new-paragraph t) par) + ((:new-line t) line) + + ;Symbols (-10 suffix means 10-point, etc.) + ((:bullet 1) bullet) + ((:minus 1) endash) + ((:not-equal 1) u 8800 \' 173) + ((:less-or-equal 1) u 8804 \' 178) + ((:greater-or-equal 1) u 8805 \' 179) + ((:infinity 1) u 8734 \' 176) + ((:left-single-quote 1) lquote) + ((:right-single-quote 1) rquote) + ((:left-double-quote 1) ldblquote) + ((:right-double-quote 1) rdblquote) + ((:left-angle-quote 1) u 171 \' 199) + ((:right-angle-quote 1) u 187 \' 200) + ((:bottom-10 1) (field (* fldinst "SYMBOL 94 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:up-arrow-10 1) (field (* fldinst "SYMBOL 173 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:function-arrow-10 2) (field (* fldinst "SYMBOL 174 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:cartesian-product-10 2) (field (* fldinst "SYMBOL 180 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:identical-10 2) (field (* fldinst "SYMBOL 186 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:member-10 2) (field (* fldinst "SYMBOL 206 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:derives-10 2) (field (* fldinst "SYMBOL 222 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:left-triangle-bracket-10 1) (field (* fldinst "SYMBOL 225 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:right-triangle-bracket-10 1) (field (* fldinst "SYMBOL 241 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:big-plus-10 2) (field (* fldinst "SYMBOL 58 \\f \"Zapf Dingbats\" \\s 10") (fldrslt :zapf-dingbats :10-pt))) + + ((:alpha 1) (field (* fldinst "SYMBOL 97 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:beta 1) (field (* fldinst "SYMBOL 98 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:chi 1) (field (* fldinst "SYMBOL 99 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:delta 1) (field (* fldinst "SYMBOL 100 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:epsilon 1) (field (* fldinst "SYMBOL 101 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:phi 1) (field (* fldinst "SYMBOL 102 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:gamma 1) (field (* fldinst "SYMBOL 103 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:eta 1) (field (* fldinst "SYMBOL 104 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:iota 1) (field (* fldinst "SYMBOL 105 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:kappa 1) (field (* fldinst "SYMBOL 107 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:lambda 1) (field (* fldinst "SYMBOL 108 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:mu 1) (field (* fldinst "SYMBOL 109 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:nu 1) (field (* fldinst "SYMBOL 110 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:omicron 1) (field (* fldinst "SYMBOL 111 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:pi 1) (field (* fldinst "SYMBOL 112 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:theta 1) (field (* fldinst "SYMBOL 113 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:rho 1) (field (* fldinst "SYMBOL 114 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:sigma 1) (field (* fldinst "SYMBOL 115 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:tau 1) (field (* fldinst "SYMBOL 116 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:upsilon 1) (field (* fldinst "SYMBOL 117 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:omega 1) (field (* fldinst "SYMBOL 119 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:xi 1) (field (* fldinst "SYMBOL 120 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:psi 1) (field (* fldinst "SYMBOL 121 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:zeta 1) (field (* fldinst "SYMBOL 122 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + + + ;Styles + ((+ :rtf-intro) :stylesheet) + (:stylesheet (stylesheet :styles)) + + (:normal-num 0) + (:normal s :normal-num) + ((+ :styles) (widctlpar :10-pt :english-uk snext :normal-num "Normal;")) + + (:body-text-num 1) + (:body-text s :body-text-num qj sa 120 widctlpar :10-pt :english-uk) + ((+ :styles) (:body-text sbasedon :normal-num snext :body-text-num "Body Text;")) + + (:section-heading-num 2) + (:section-heading s :section-heading-num sa 60 keep keepn nowidctlpar hyphpar 0 level 3 b :12-pt :english-uk) + ((+ :styles) (:section-heading sbasedon :subsection-heading-num snext :body-text-num "heading 3;")) + + (:subsection-heading-num 3) + (:subsection-heading s :subsection-heading-num sa 30 keep keepn nowidctlpar hyphpar 0 level 4 b :10-pt :english-uk) + ((+ :styles) (:subsection-heading sbasedon :normal-num snext :body-text-num "heading 4;")) + + (:grammar-num 10) + (:grammar s :grammar-num nowidctlpar hyphpar 0 :10-pt :no-language) + ((+ :styles) (:grammar sbasedon :normal-num snext :grammar-num "Grammar;")) + + (:grammar-header-num 11) + (:grammar-header s :grammar-header-num sb 60 keep keepn nowidctlpar hyphpar 0 b :10-pt :english-uk) + ((+ :styles) (:grammar-header sbasedon :normal-num snext :grammar-lhs-num "Grammar Header;")) + + (:grammar-lhs-num 12) + (:grammar-lhs s :grammar-lhs-num fi -1440 li 1800 sb 120 keep keepn nowidctlpar hyphpar 0 outlinelevel 4 :10-pt :no-language) + ((+ :styles) (:grammar-lhs sbasedon :grammar-num snext :grammar-rhs-num "Grammar LHS;")) + + (:grammar-lhs-last-num 13) + (:grammar-lhs-last s :grammar-lhs-last-num fi -1440 li 1800 sb 120 sa 120 keep nowidctlpar hyphpar 0 outlinelevel 4 :10-pt :no-language) + ((+ :styles) (:grammar-lhs-last sbasedon :grammar-num snext :grammar-lhs-num "Grammar LHS Last;")) + + (:grammar-rhs-num 14) + (:grammar-rhs s :grammar-rhs-num fi -1260 li 1800 keep keepn nowidctlpar tx 720 hyphpar 0 :10-pt :no-language) + ((+ :styles) (:grammar-rhs sbasedon :grammar-num snext :grammar-rhs-num "Grammar RHS;")) + + (:grammar-rhs-last-num 15) + (:grammar-rhs-last s :grammar-rhs-last-num fi -1260 li 1800 sa 120 keep nowidctlpar tx 720 hyphpar 0 :10-pt :no-language) + ((+ :styles) (:grammar-rhs-last sbasedon :grammar-rhs-num snext :grammar-lhs-num "Grammar RHS Last;")) + + (:grammar-argument-num 16) + (:grammar-argument s :grammar-argument-num fi -1440 li 1800 sb 120 sa 120 keep nowidctlpar hyphpar 0 outlinelevel 4 :10-pt :no-language) + ((+ :styles) (:grammar-argument sbasedon :grammar-num snext :grammar-lhs-num "Grammar Argument;")) + + (:semantics-num 20) + (:semantics s :semantics-num li 180 sb 60 sa 60 keep nowidctlpar hyphpar 0 :10-pt :no-language) + ((+ :styles) (:semantics sbasedon :normal-num snext :semantics-num "Semantics;")) + + (:semantics-next-num 21) + (:semantics-next s :semantics-next-num li 540 sa 60 keep nowidctlpar hyphpar 0 :10-pt :no-language) + ((+ :styles) (:semantics-next sbasedon :semantics-num snext :semantics-next-num "Semantics Next;")) + + (:default-paragraph-font-num 30) + (:default-paragraph-font cs :default-paragraph-font-num) + ((+ :styles) (* :default-paragraph-font additive "Default Paragraph Font;")) + + (:character-literal-num 31) + (:character-literal cs :character-literal-num b :courier :blue :no-language) + ((+ :styles) (* :character-literal additive sbasedon :default-paragraph-font-num "Character Literal;")) + + (:character-literal-control-num 32) + (:character-literal-control cs :character-literal-control-num b 0 :times :dark-blue) + ((+ :styles) (* :character-literal-control additive sbasedon :default-paragraph-font-num "Character Literal Control;")) + + (:terminal-num 33) + (:terminal cs :terminal-num b :palatino :teal :no-language) + ((+ :styles) (* :terminal additive sbasedon :default-paragraph-font-num "Terminal;")) + + (:terminal-keyword-num 34) + (:terminal-keyword cs :terminal-keyword-num b :courier :blue :no-language) + ((+ :styles) (* :terminal-keyword additive sbasedon :terminal-num "Terminal Keyword;")) + + (:nonterminal-num 35) + (:nonterminal cs :nonterminal-num i :palatino :dark-red :no-language) + ((+ :styles) (* :nonterminal additive sbasedon :default-paragraph-font-num "Nonterminal;")) + + (:nonterminal-attribute-num 36) + (:nonterminal-attribute cs :nonterminal-attribute-num i 0) + ((+ :styles) (* :nonterminal-attribute additive sbasedon :default-paragraph-font-num "Nonterminal Attribute;")) + + (:nonterminal-argument-num 37) + (:nonterminal-argument cs :nonterminal-argument-num) + ((+ :styles) (* :nonterminal-argument additive sbasedon :default-paragraph-font-num "Nonterminal Argument;")) + + (:semantic-keyword-num 40) + (:semantic-keyword cs :semantic-keyword-num b :times) + ((+ :styles) (* :semantic-keyword additive sbasedon :default-paragraph-font-num "Semantic Keyword;")) + + (:type-expression-num 41) + (:type-expression cs :type-expression-num :times :red :no-language) + ((+ :styles) (* :type-expression additive sbasedon :default-paragraph-font-num "Type Expression;")) + + (:type-name-num 42) + (:type-name cs :type-name-num scaps :times :red :no-language) + ((+ :styles) (* :type-name additive sbasedon :type-expression-num "Type Name;")) + + (:field-name-num 43) + (:field-name cs :field-name-num :helvetica :red :no-language) + ((+ :styles) (* :field-name additive sbasedon :type-expression-num "Field Name;")) + + (:global-variable-num 44) + (:global-variable cs :global-variable-num i :times :green :no-language) + ((+ :styles) (* :global-variable additive sbasedon :default-paragraph-font-num "Global Variable;")) + + (:local-variable-num 45) + (:local-variable cs :local-variable-num i :times :bright-green :no-language) + ((+ :styles) (* :local-variable additive sbasedon :default-paragraph-font-num "Local Variable;")) + + (:action-name-num 46) + (:action-name cs :action-name-num :zapf-chancery :violet :no-language) + ((+ :styles) (* :action-name additive sbasedon :default-paragraph-font-num "Action Name;")) + + + ;Document Formatting + ((+ :rtf-intro) :docfmt) + (:docfmt widowctrl + ftnbj ;footnotes at bottom of page + aenddoc ;endnotes at end of document + fet 0 ;footnotes only -- no endnotes + formshade ;shade form fields + viewkind 4 ;normal view mode + viewscale 125 ;125% view + pgbrdrhead ;page border surrounds header + pgbrdrfoot) ;page border surrounds footer + + + ;Section Formatting + + + ;Specials + (:invisible v) + ((:but-not 6) (b "except")) + (:subscript sub) + (:superscript super) + (:plain-subscript b 0 i 0 :subscript) + ((:action-begin 1) "[") + ((:action-end 1) "]") + ((:vector-begin 1) (b "[")) + ((:vector-end 1) (b "]")) + ((:empty-vector 2) (b "[]")) + ((:vector-append 2) :big-plus-10) + ((:tuple-begin 1) (b :left-triangle-bracket-10)) + ((:tuple-end 1) (b :right-triangle-bracket-10)) + ((:unit 4) (:global-variable "unit")) + ((:true 4) (:global-variable "true")) + ((:false 5) (:global-variable "false")) + )) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; SIMPLE LINE BREAKER + +(defparameter *limited-line-right-margin* 100) + +; Housekeeping dynamic variables +(defvar *current-limited-lines*) ;Items written so far via break-line to the innermost write-limited-lines +(defvar *current-limited-lines-non-empty*) ;True if something was written to *current-limited-lines* +(defvar *current-limited-position*) ;Number of characters written since the last newline to *current-limited-lines* + + +; Capture the text written by the emitter function to its single parameter +; (an output stream), dividing the text as specified by dynamically scoped calls +; to break-line. Return the text as a base-string. +(defun write-limited-lines (emitter) + (let ((limited-stream (make-string-output-stream :element-type 'base-character)) + (*current-limited-lines* (make-string-output-stream :element-type 'base-character)) + (*current-limited-lines-non-empty* nil) + (*current-limited-position* 0)) + (funcall emitter limited-stream) + (break-line limited-stream) + (get-output-stream-string *current-limited-lines*))) + + +; Capture the text written by the emitter body to stream-var, +; dividing the text as specified by dynamically scoped calls +; to break-line. Write the result to the stream-var stream. +(defmacro write-limited-block (stream-var &body emitter) + `(progn + (write-string + (write-limited-lines #'(lambda (,stream-var) ,@emitter)) + ,stream-var) + nil)) + + +; Indicate that this is a potential place for a line break in the stream provided +; by write-limited-lines. If subdivide is true, also indicate that line breaks can +; be inserted anywhere between this point and the last such point indicated by break-line +; (or the beginning of write-limited-lines, whichever came last). +(defun break-line (limited-stream &optional subdivide) + (let* ((new-chars (get-output-stream-string limited-stream)) + (length (length new-chars))) + (unless (zerop length) + (labels + ((subdivide-new-chars (start) + (let ((length-remaining (- length start)) + (room-on-line (- *limited-line-right-margin* *current-limited-position*))) + (if (>= room-on-line length-remaining) + (progn + (write-string new-chars *current-limited-lines* :start start) + (incf *current-limited-position* length-remaining)) + (let ((end (+ start room-on-line))) + (write-string new-chars *current-limited-lines* :start start :end end) + (write-char #\newline *current-limited-lines*) + (setq *current-limited-position* 0) + (subdivide-new-chars end)))))) + + (let ((position (+ *current-limited-position* length)) + (has-newlines (find #\newline new-chars))) + (cond + ((or has-newlines + (and (> position *limited-line-right-margin*) (not subdivide))) + (when *current-limited-lines-non-empty* + (write-char #\newline *current-limited-lines*)) + (write-string new-chars *current-limited-lines*) + ;Force a line break if break-line is called again and the current + ;new-chars contained a line break. + (setq *current-limited-position* + (if has-newlines + (1+ *limited-line-right-margin*) + length))) + ((<= position *limited-line-right-margin*) + (write-string new-chars *current-limited-lines*) + (setq *current-limited-position* position)) + ((>= *current-limited-position* *limited-line-right-margin*) + (write-char #\newline *current-limited-lines*) + (setq *current-limited-position* 0) + (subdivide-new-chars 0)) + (t (subdivide-new-chars 0))) + (setq *current-limited-lines-non-empty* t)))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; RTF READER + + +; Return true if char can be a part of an RTF control word. +(defun rtf-control-word-char? (char) + (and (char>= char #\a) (char<= char #\z))) + + +; Read RTF from the character stream and return it in list form. +; Each { ... } group is a sublist. +; Each RTF control symbol or word is represented by a lisp symbol. +; If an RTF control has a numeric argument, then its lisp symbol is followed +; by an integer equal to the argument's value. +; Newlines not escaped by backslashes are ignored. +(defun read-rtf (stream) + (labels + ((read (&optional (eof-error-p t)) + (read-char stream eof-error-p nil)) + + (read-group (nested) + (let ((char (read nested))) + (case char + ((nil) nil) + (#\} (if nested + nil + (error "Mismatched }"))) + (#\{ (cons + (read-group t) + (read-group nested))) + (#\\ (append + (read-control) + (read-group nested))) + (#\newline (read-group nested)) + (t (read-text nested (list char)))))) + + (read-text (nested chars) + (let ((char (read nested))) + (case char + ((nil) + (list (coerce (nreverse chars) 'string))) + ((#\{ #\} #\\) + (cons (coerce (nreverse chars) 'string) + (progn + (unread-char char stream) + (read-group nested)))) + (#\newline (read-text nested chars)) + (t (read-text nested (cons char chars)))))) + + (read-integer (value need-digit) + (let* ((char (read)) + (digit (digit-char-p char))) + (cond + (digit (read-integer (+ (* value 10) digit) nil)) + (need-digit (error "Empty number")) + ((eql char #\space) value) + (t (unread-char char stream) + value)))) + + (read-hex (n-digits) + (let ((value 0)) + (dotimes (n n-digits) + (let ((digit (digit-char-p (read) 16))) + (unless digit + (error "Bad hex digit")) + (setq value (+ (* value 16) digit)))) + value)) + + (read-control () + (let ((char (read))) + (if (rtf-control-word-char? char) + (let* ((control-string (read-control-word (list char))) + (control-symbol (intern (string-upcase control-string))) + (char (read))) + (case char + (#\space (list control-symbol)) + (#\- (list control-symbol (- (read-integer 0 t)))) + ((#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9) + (unread-char char stream) + (list control-symbol (read-integer 0 t))) + (t (unread-char char stream) + (list control-symbol)))) + (let* ((control-string (string char)) + (control-symbol (intern (string-upcase control-string)))) + (if (eq control-symbol '\') + (list control-symbol (read-hex 2)) + (list control-symbol)))))) + + (read-control-word (chars) + (let ((char (read))) + (if (rtf-control-word-char? char) + (read-control-word (cons char chars)) + (progn + (unread-char char stream) + (coerce (nreverse chars) 'string)))))) + + (read-group nil))) + + +; Read RTF from the text file with the given name (relative to the +; local directory) and return it in list form. +(defun read-rtf-from-local-file (filename) + (with-open-file (stream (merge-pathnames filename *semantic-engine-directory*) + :direction :input) + (read-rtf stream))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; RTF WRITER + + +(defconstant *rtf-special* '(#\\ #\{ #\})) + + +; Return the string with characters in *rtf-special* preceded by backslashes. +; If there are no such characters, the returned string may be eq to the input string. +(defun escape-rtf (string) + (let ((i (position-if #'(lambda (char) (member char *rtf-special*)) string))) + (if i + (let* ((string-length (length string)) + (result-string (make-array string-length :element-type 'base-character :adjustable t :fill-pointer i))) + (replace result-string string) + (do ((i i (1+ i))) + ((= i string-length)) + (let ((char (char string i))) + (when (member char *rtf-special*) + (vector-push-extend #\\ result-string)) + (vector-push-extend char result-string))) + result-string) + string))) + + +; Write RTF to the character stream. See read-rtf for a description +; of the layout of the rtf list. +(defun write-rtf (rtf &optional (stream t)) + (labels + ((write-group-contents (rtf stream) + (let ((first-rtf (first rtf)) + (rest-rtf (rest rtf))) + (cond + ((listp first-rtf) + (write-group first-rtf stream t)) + ((stringp first-rtf) + (write-string (escape-rtf first-rtf) stream) + (break-line stream t)) + ((symbolp first-rtf) + (write-char #\\ stream) + (write first-rtf :stream stream) + (cond + ((alpha-char-p (char (symbol-name first-rtf) 0)) + (when (integerp (first rest-rtf)) + (write (first rest-rtf) :stream stream) + (setq rest-rtf (rest rest-rtf))) + (let ((first-rest (first rest-rtf))) + (when (and (stringp first-rest) + (or (zerop (length first-rest)) + (let ((ch (char first-rest 0))) + (or (alphanumericp ch) + (eql ch #\space) + (eql ch #\-) + (eql ch #\+))))) + (write-char #\space stream)))) + ((eq first-rtf '\') + (unless (integerp (first rest-rtf)) + (error "Bad rtf: ~S" rtf)) + (format stream "~2,'0x" (first rest-rtf)) + (setq rest-rtf (rest rest-rtf))))) + (t (error "Bad rtf: ~S" rtf))) + (when rest-rtf + (break-line stream) + (write-group-contents rest-rtf stream)))) + + (write-group (rtf stream nested) + (write-limited-block stream + (when nested + (write-char #\{ stream)) + (when rtf + (write-group-contents rtf stream)) + (when nested + (write-char #\} stream))))) + + (with-standard-io-syntax + (let ((*print-readably* nil) + (*print-escape* nil) + (*print-case* :downcase)) + (write-group rtf stream nil))))) + + +; Write RTF to the text file with the given name (relative to the +; local directory). +(defun write-rtf-to-local-file (filename rtf) + (with-open-file (stream (merge-pathnames filename *semantic-engine-directory*) + :direction :output + :if-exists :supersede + #+mcl :external-format #+mcl "RTF " + #+mcl :mac-file-creator #+mcl "MSWD") + (write-rtf rtf stream))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; RTF STREAMS + +(defstruct (rtf-stream (:include markup-stream) + (:constructor allocate-rtf-stream (env head tail level logical-position)) + (:copier nil) + (:predicate rtf-stream?)) + (style nil :type symbol)) ;Current section or paragraph style or nil if none or emitting paragraph contents + + +(defmethod print-object ((rtf-stream rtf-stream) stream) + (print-unreadable-object (rtf-stream stream :identity t) + (write-string "rtf-stream" stream))) + + +; Make a new, empty, open rtf-stream with the given definitions for its markup-env. +(defun make-rtf-stream (markup-env level &optional logical-position) + (let ((head (list nil))) + (allocate-rtf-stream markup-env head head level logical-position))) + + +; Make a new, empty, open, top-level rtf-stream with the given definitions +; for its markup-env. +(defun make-top-level-rtf-stream (rtf-definitions) + (let ((head (list nil)) + (markup-env (make-markup-env))) + (markup-env-define-alist markup-env rtf-definitions) + (allocate-rtf-stream markup-env head head *markup-stream-top-level* nil))) + + +; Append a block to the end of the rtf-stream. The block may be inlined +; if nothing else follows it in the rtf-stream. +(defun rtf-stream-append-or-inline-block (rtf-stream block) + (assert-type block list) + (when block + (let ((pretail (markup-stream-tail rtf-stream))) + (markup-stream-append1 rtf-stream block) + (setf (markup-stream-pretail rtf-stream) pretail)))) + + +; Return the approximate width of the rtf item; return t if it is a line break. +; Also allow rtf groups as long as they do not contain line breaks. +(defmethod markup-group-width ((rtf-stream rtf-stream) item) + (if (consp item) + (reduce #'+ item :key #'(lambda (subitem) (markup-group-width rtf-stream subitem))) + (markup-width rtf-stream item))) + + +; Create a top-level rtf-stream and call emitter to emit its contents. +; emitter takes one argument -- an rtf-stream to which it should emit paragraphs. +; Return the top-level rtf-stream. +(defun depict-rtf-top-level (emitter) + (let* ((top-rtf-stream (make-top-level-rtf-stream *rtf-definitions*)) + (rtf-stream (make-rtf-stream (markup-stream-env top-rtf-stream) *markup-stream-paragraph-level*))) + (markup-stream-append1 rtf-stream ':rtf-intro) + (markup-stream-append1 rtf-stream ':reset-section) + (funcall emitter rtf-stream) + (markup-stream-append1 top-rtf-stream (markup-stream-unexpanded-output rtf-stream)) + top-rtf-stream)) + + +; Create a top-level rtf-stream and call emitter to emit its contents. +; emitter takes one argument -- an rtf-stream to which it should emit paragraphs. +; Write the resulting RTF to the text file with the given name (relative to the +; local directory). +(defun depict-rtf-to-local-file (filename emitter) + (let ((top-rtf-stream (depict-rtf-top-level emitter))) + (write-rtf-to-local-file filename (markup-stream-output top-rtf-stream)))) + + +; Return the markup accumulated in the markup-stream after expanding all of its macros. +; The markup-stream is closed after this function is called. +(defmethod markup-stream-output ((rtf-stream rtf-stream)) + (markup-env-expand (markup-stream-env rtf-stream) (markup-stream-unexpanded-output rtf-stream) nil)) + + +(defmethod depict-block-style-f ((rtf-stream rtf-stream) block-style emitter) + (declare (ignore block-style)) + (assert-true (= (markup-stream-level rtf-stream) *markup-stream-paragraph-level*)) + (funcall emitter rtf-stream)) + + +(defmethod depict-paragraph-f ((rtf-stream rtf-stream) paragraph-style emitter) + (assert-true (= (markup-stream-level rtf-stream) *markup-stream-paragraph-level*)) + (assert-true (and paragraph-style (symbolp paragraph-style))) + (unless (eq paragraph-style (rtf-stream-style rtf-stream)) + (markup-stream-append1 rtf-stream ':reset-paragraph) + (markup-stream-append1 rtf-stream paragraph-style)) + (setf (rtf-stream-style rtf-stream) nil) + (setf (markup-stream-level rtf-stream) *markup-stream-content-level*) + (setf (markup-stream-logical-position rtf-stream) (make-logical-position)) + (prog1 + (funcall emitter rtf-stream) + (setf (markup-stream-level rtf-stream) *markup-stream-paragraph-level*) + (setf (rtf-stream-style rtf-stream) paragraph-style) + (setf (markup-stream-logical-position rtf-stream) nil) + (markup-stream-append1 rtf-stream ':new-paragraph))) + + +(defmethod depict-char-style-f ((rtf-stream rtf-stream) char-style emitter) + (assert-true (>= (markup-stream-level rtf-stream) *markup-stream-content-level*)) + (assert-true (and char-style (symbolp char-style))) + (let ((inner-rtf-stream (make-rtf-stream (markup-stream-env rtf-stream) *markup-stream-content-level* (markup-stream-logical-position rtf-stream)))) + (markup-stream-append1 inner-rtf-stream char-style) + (prog1 + (funcall emitter inner-rtf-stream) + (rtf-stream-append-or-inline-block rtf-stream (markup-stream-unexpanded-output inner-rtf-stream))))) + + +#| +(setq r (read-rtf-from-local-file "SampleStyles.rtf")) +(write-rtf-to-local-file "Y.rtf" r) +|# diff --git a/mozilla/js/semantics/Utilities.lisp b/mozilla/js/semantics/Utilities.lisp new file mode 100644 index 00000000000..200a4f9c9a4 --- /dev/null +++ b/mozilla/js/semantics/Utilities.lisp @@ -0,0 +1,507 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; Handy lisp utilities +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MCL FIXES + + +(setq *print-right-margin* 150) + +;;; Fix name-char and char-name. +#+mcl +(locally + (declare (optimize (speed 3) (safety 0) (debug 1))) + (eval-when (:compile-toplevel :load-toplevel :execute) + (setq *warn-if-redefine* nil) + (setq *warn-if-redefine-kernel* nil)) + + (defun char-name (c) + (dolist (e ccl::*name-char-alist*) + (declare (list e)) + (when (eq c (cdr e)) + (return-from char-name (car e)))) + (let ((code (char-code c))) + (declare (fixnum code)) + (cond ((< code #x100) + (unless (and (>= code 32) (<= code 216) (/= code 127)) + (format nil "x~2,'0X" code))) + (t (format nil "u~4,'0X" code))))) + + (defun name-char (name) + (if (characterp name) + name + (let* ((name (string name)) + (namelen (length name))) + (declare (fixnum namelen)) + (or (cdr (assoc name ccl::*name-char-alist* :test #'string-equal)) + (if (= namelen 1) + (char name 0) + (when (>= namelen 2) + (flet + ((number-char (name base lg-base) + (let ((n 0)) + (dotimes (i (length name) (code-char n)) + (let ((code (digit-char-p (char name i) base))) + (if code + (setq n (logior code (ash n lg-base))) + (return))))))) + (case (char name 0) + (#\^ + (when (= namelen 2) + (code-char (the fixnum (logxor (the fixnum (char-code (char-upcase (char name 1)))) #x40))))) + ((#\x #\X #\u #\U) + (number-char (subseq name 1) 16 4)) + ((#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7) + (number-char name 8 3)))))))))) + + (eval-when (:compile-toplevel :load-toplevel :execute) + (setq *warn-if-redefine* t) + (setq *warn-if-redefine-kernel* t))) + + + +;;; ------------------------------------------------------------------------------------------------------ +;;; READER SYNTAX + +; Define #?num to produce a character with code given by the hexadecimal number num. +; (This is a portable extension; the #\u syntax installed above does the same thing +; but is not portable.) +(set-dispatch-macro-character + #\# #\? + #'(lambda (stream subchar arg) + (declare (ignore subchar arg)) + (let ((*read-base* 16)) + (code-char (read stream t nil t))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MACROS + +; (list*-bind (var1 var2 ... varn) expr body): +; evaluates expr to obtain a value v; +; binds var1, var2, ..., varn such that (list* var1 var2 ... varn) is equal to v; +; evaluates body with these bindings; +; returns the result values from the body. +(defmacro list*-bind ((var1 &rest vars) expr &body body) + (labels + ((gen-let*-bindings (var1 vars expr) + (if vars + (let ((expr-var (gensym "REST"))) + (list* + (list expr-var expr) + (list var1 (list 'car expr-var)) + (gen-let*-bindings (car vars) (cdr vars) (list 'cdr expr-var)))) + (list + (list var1 expr))))) + (list* 'let* (gen-let*-bindings var1 vars expr) body))) + +(set-pprint-dispatch '(cons (member list*-bind)) + (pprint-dispatch '(multiple-value-bind () ()))) + + +; (multiple-value-map-bind (var1 var2 ... varn) f (src1 src2 ... srcm) body) +; evaluates src1, src2, ..., srcm to obtain lists l1, l2, ..., lm; +; calls f on corresponding elements of lists l1, ..., lm; each such call should return n values v1 v2 ... vn; +; binds var1, var2, ..., varn such var1 is the list of all v1's, var2 is the list of all v2's, etc.; +; evaluates body with these bindings; +; returns the result values from the body. +(defmacro multiple-value-map-bind ((&rest vars) f (&rest srcs) &body body) + (let ((n (length vars)) + (m (length srcs)) + (fun (gensym "F")) + (ss nil) + (vs nil) + (accumulators nil)) + (dotimes (i n) + (push (gensym "V") vs) + (push (gensym "ACC") accumulators)) + (dotimes (i m) + (push (gensym "S") ss)) + `(let ((,fun ,f) + ,@(mapcar #'(lambda (acc) (list acc nil)) accumulators)) + (mapc #'(lambda ,ss + (multiple-value-bind ,vs (funcall ,fun ,@ss) + ,@(mapcar #'(lambda (accumulator v) (list 'push v accumulator)) + accumulators vs))) + ,@srcs) + (let ,(mapcar #'(lambda (var accumulator) (list var (list 'nreverse accumulator))) + vars accumulators) + ,@body)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; VALUE ASSERTS + +(defconstant *value-asserts* t) + +; Assert that (test value) returns non-nil. Return value. +(defmacro assert-value (value test &rest format-and-parameters) + (if *value-asserts* + (let ((v (gensym "VALUE"))) + `(let ((,v ,value)) + (unless (,test ,v) + ,(if format-and-parameters + `(error ,@format-and-parameters) + `(error "~S doesn't satisfy ~S" ',value ',test))) + ,v)) + value)) + + +; Assert that value is non-nil. Return value. +(defmacro assert-non-null (value &rest format-and-parameters) + `(assert-value ,value identity . + ,(or format-and-parameters + `("~S is null" ',value)))) + + +; Assert that value is non-nil. Return nil. +; Do not evaluate value in nondebug versions. +(defmacro assert-true (value &rest format-and-parameters) + (if *value-asserts* + `(unless ,value + ,(if format-and-parameters + `(error ,@format-and-parameters) + `(error "~S is false" ',value))) + nil)) + + +; Assert that expr returns n values. Return those values. +(defmacro assert-n-values (n expr) + (if *value-asserts* + (let ((v (gensym "VALUES"))) + `(let ((,v (multiple-value-list ,expr))) + (unless (= (length ,v) ,n) + (error "~S returns ~D values instead of ~D" ',expr (length ,v) ',n)) + (values-list ,v))) + expr)) + +; Assert that expr returns one value. Return that value. +(defmacro assert-one-value (expr) + `(assert-n-values 1 ,expr)) + +; Assert that expr returns two values. Return those values. +(defmacro assert-two-values (expr) + `(assert-n-values 2 ,expr)) + +; Assert that expr returns three values. Return those values. +(defmacro assert-three-values (expr) + `(assert-n-values 3 ,expr)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; STRUCTURED TYPES + +(defconstant *type-asserts* t) + +(defun tuple? (value structured-types) + (if (endp structured-types) + (null value) + (and (consp value) + (structured-type? (car value) (first structured-types)) + (tuple? (cdr value) (rest structured-types))))) + +(defun list-of? (value structured-type) + (or + (null value) + (and (consp value) + (structured-type? (car value) structured-type) + (list-of? (cdr value) structured-type)))) + + +; Return true if value has the given structured-type. +; A structured-type can be a Common Lisp type or one of the forms below: +; +; (cons t1 t2) is the type of pairs whose car has structured-type t1 and +; cdr has structured-type t2. +; +; (tuple t1 t2 ... tn) is the type of n-element lists whose first element +; has structured-type t1, second element has structured-type t2, ..., +; and last element has structured-type tn. +; +; (list t) is the type of lists all of whose elements have structured-type t. +; +(defun structured-type? (value structured-type) + (cond + ((consp structured-type) + (case (first structured-type) + (cons (and (consp value) + (structured-type? (car value) (second structured-type)) + (structured-type? (cdr value) (third structured-type)))) + (tuple (tuple? value (rest structured-type))) + (list (list-of? value (second structured-type))) + (t (typep value structured-type)))) + ((null structured-type) nil) + (t (typep value structured-type)))) + + +; Ensure that value has type given by typespec +; (which should not be quoted). Return the value. +(defmacro assert-type (value structured-type) + (if *type-asserts* + (let ((v (gensym "VALUE"))) + `(let ((,v ,value)) + (unless (structured-type? ,v ',structured-type) + (error "~S should have type ~S" ,v ',structured-type)) + ,v)) + value)) + +(deftype bool () '(member nil t)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GENERAL UTILITIES + + +; f must be either a function, a symbol, or a list of the form (setf ). +; If f is a function or has a function binding, return that function; otherwise return nil. +(defun callable (f) + (cond + ((functionp f) f) + ((fboundp f) (fdefinition f)) + (t nil))) + + +; Return the first character of symbol's name or nil if s's name has zero length. +(defun first-symbol-char (symbol) + (let ((name (symbol-name symbol))) + (when (> (length name) 0) + (char name 0)))) + + +(defconstant *get2-nonce* (if (boundp '*get2-nonce*) (symbol-value '*get2-nonce*) (gensym))) + +; Perform a get except that return two values: +; The value returned from the get or nil if the property is not present +; t if the property is present or nil if not. +(defun get2 (symbol property) + (let ((value (get symbol property *get2-nonce*))) + (if (eq value *get2-nonce*) + (values nil nil) + (values value t)))) + + +; Return a list of all the keys in the hash table. +(defun hash-table-keys (hash-table) + (let ((keys nil)) + (maphash #'(lambda (key value) + (declare (ignore value)) + (push key keys)) + hash-table) + keys)) + + +; Return a list of all the keys in the hash table sorted by their string representations. +(defun sorted-hash-table-keys (hash-table) + (with-standard-io-syntax + (let ((*print-readably* nil) + (*print-escape* nil)) + (sort (hash-table-keys hash-table) #'string< :key #'write-to-string)))) + + +; Given an association list ((key1 . data1) (key2 . data2) ... (keyn datan)), +; produce another association list whose keys are sets of the keys of the original list, +; where the data elements of each such set are equal according to the given test function. +; The keys within each set are listed in the same order as in the original list. +; Set X comes before set Y if X contains a key earlier in the original list than any +; key in Y. +(defun collect-equivalences (alist &key (test #'eql)) + (if (endp alist) + nil + (let* ((element (car alist)) + (key (car element)) + (data (cdr element)) + (rest (cdr alist))) + (if (rassoc data rest :test test) + (let ((filtered-rest nil) + (additional-keys nil)) + (dolist (elt rest) + (if (funcall test data (cdr elt)) + (push (car elt) additional-keys) + (push elt filtered-rest))) + (acons (cons key (nreverse additional-keys)) data + (collect-equivalences (nreverse filtered-rest) :test test))) + (acons (list key) data (collect-equivalences rest :test test)))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; BITMAPS + +; Treating integer m as a bitmap, call f on the number of each bit set in m. +(defun bitmap-each-bit (f m) + (assert-true (>= m 0)) + (dotimes (i (integer-length m)) + (when (logbitp i m) + (funcall f i)))) + + +; Treating integer m as a bitmap, return a sorted list of disjoint, nonadjacent ranges +; of bits set in m. Each range is a pair (x . y) and indicates that bits numbered x through +; y, inclusive, are set in m. If m is negative, the last range will be a pair (x . :infinity). +(defun bitmap-to-ranges (m) + (labels + ((bitmap-to-ranges-sub (m ranges) + (if (zerop m) + ranges + (let* ((hi (integer-length m)) + (m (- m (ash 1 hi))) + (lo (integer-length m)) + (m (+ m (ash 1 lo)))) + (bitmap-to-ranges-sub m (acons lo (1- hi) ranges)))))) + (if (minusp m) + (let* ((lo (integer-length m)) + (m (+ m (ash 1 lo)))) + (bitmap-to-ranges-sub m (list (cons lo :infinity)))) + (bitmap-to-ranges-sub m nil)))) + + +; Same as bitmap-to-ranges but abbreviate pairs (x . x) by x. +(defun bitmap-to-abbreviated-ranges (m) + (mapcar #'(lambda (range) + (if (eql (car range) (cdr range)) + (car range) + range)) + (bitmap-to-ranges m))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; PACKAGES + +; Call f on each external symbol defined in the package. +(defun each-package-external-symbol (package f) + (with-package-iterator (iter package :external) + (loop + (multiple-value-bind (present symbol) (iter) + (unless present + (return)) + (funcall f symbol))))) + + +; Return a list of all external symbols defined in the package. +(defun package-external-symbols (package) + (with-package-iterator (iter package :external) + (let ((list nil)) + (loop + (multiple-value-bind (present symbol) (iter) + (unless present + (return)) + (push symbol list))) + list))) + + +; Return a sorted list of all external symbols defined in the package. +(defun sorted-package-external-symbols (package) + (sort (package-external-symbols package) #'string<)) + + +; Call f on each internal symbol defined in the package. +(defun each-package-internal-symbol (package f) + (with-package-iterator (iter package :internal) + (loop + (multiple-value-bind (present symbol) (iter) + (unless present + (return)) + (funcall f symbol))))) + + +; Return a list of all internal symbols defined in the package. +(defun package-internal-symbols (package) + (with-package-iterator (iter package :internal) + (let ((list nil)) + (loop + (multiple-value-bind (present symbol) (iter) + (unless present + (return)) + (push symbol list))) + list))) + + +; Return a sorted list of all internal symbols defined in the package. +(defun sorted-package-internal-symbols (package) + (sort (package-internal-symbols package) #'string<)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; SETS + +(defstruct (set (:constructor allocate-set (elts-hash))) + (elts-hash nil :type hash-table :read-only t)) + + +; Make and return a new set. +(defun make-set (&optional (test #'eql)) + (allocate-set (make-hash-table :test test))) + + +; Add values to the set, modifying the set in place. +; Return the set. +(defun set-add (set &rest values) + (let ((elements (set-elts-hash set))) + (dolist (value values) + (setf (gethash value elements) t))) + set) + + +; Return true if element is a member of the set. +(defun set-member (set element) + (gethash element (set-elts-hash set))) + + +; Return the set as a list. +(defun set-elements (set) + (let ((elements nil)) + (maphash #'(lambda (key value) + (declare (ignore value)) + (push key elements)) + (set-elts-hash set)) + elements)) + + +; Print the set +(defmethod print-object ((set set) stream) + (if *print-readably* + (call-next-method) + (format stream "~<{~;~@{~W ~:_~}~;}~:>" (set-elements set)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; DEPTH-FIRST SEARCH + +; Return a depth-first-ordered list of the nodes in a directed graph. +; The graph may contain cycles, so a general depth-first search is used. +; start is the start node. +; successors is a function that takes a node and returns a list of that +; node's successors. +; test is a function that takes two nodes and returns true if they are +; the same node. test should be either #'eq, #'eql, or #'equal +; because it is used as a test function in a hash table. +(defun depth-first-search (test successors start) + (let ((visited-nodes (make-set test)) + (dfs-list nil)) + (labels + ((visit (node) + (set-add visited-nodes node) + (dolist (successor (funcall successors node)) + (unless (set-member visited-nodes successor) + (visit successor))) + (push node dfs-list))) + (visit start) + dfs-list))) diff --git a/mozilla/js/semantics/styles.css b/mozilla/js/semantics/styles.css new file mode 100644 index 00000000000..c5623e92436 --- /dev/null +++ b/mozilla/js/semantics/styles.css @@ -0,0 +1,64 @@ +.title1 {font-family: "Times New Roman", Times, serif; font-size: 36pt; font-weight: bold; color: #000000; white-space: nowrap} + +.title2 {font-family: "Times New Roman", Times, serif; font-size: 18pt; font-weight: bold; color: #000000; white-space: nowrap} + +.top-title {color: #009900} + +.sub {font-size: 50%} + +.sub-num {font-size: smaller; font-style: normal} + +.syntax {margin-left: 0.5in} + +.issue {color: #FF0000} + + + +.grammar-rule {margin-left: 18pt; margin-top: 6pt; margin-bottom: 6pt} + +.grammar-lhs {} + +.grammar-rhs {margin-left: 9pt;} + +.grammar-argument {margin-left: 18pt; margin-top: 6pt; margin-bottom: 6pt} + +.semantics {margin-left: 9pt; margin-top: 3pt; margin-bottom: 3pt} + +.semantics-next {margin-left: 27pt; margin-bottom: 3pt} + + + +.symbol {font-family: "Symbol"} + +VAR {font-family: Georgia, Palatino, "Times New Roman", Times, serif; font-weight: normal; font-style: italic} + +CODE {font-family: "Courier New", Courier, mono; color: #0000FF} + +PRE {font-family: "Courier New", Courier, mono; color: #0000FF; margin-left: 0.5in} + +.control {font-family: "Times New Roman", Times, serif; font-weight: normal; color: #000099} + +.terminal {font-family: Georgia, Palatino, "Times New Roman", Times, serif; font-weight: bold; color: #009999} + +.terminal-keyword {font-weight: bold} + +.nonterminal {color: #009900} + +.nonterminal-attribute {font-style: normal} + +.nonterminal-argument {font-style: normal} + +.semantic-keyword {font-family: "Times New Roman", Times, serif; font-weight: bold} + +.type-expression {font-family: "Times New Roman", Times, serif; color: #CC0000} + +.type-name {font-family: "Times New Roman", Times, serif; font-variant: small-caps; color: #CC0000} + +.field-name {font-family: Arial, Helvetica, sans-serif; color: #FF0000} + +.global-variable {font-family: "Times New Roman", Times, serif; color: #006600} + +.local-variable {font-family: "Times New Roman", Times, serif; color: #009900} + +.action-name {font-family: "Zapf Chancery", "Comic Sans MS", Script, serif; color: #660066} + diff --git a/mozilla/js2/semantics/Calculus.lisp b/mozilla/js2/semantics/Calculus.lisp new file mode 100644 index 00000000000..12a912d7399 --- /dev/null +++ b/mozilla/js2/semantics/Calculus.lisp @@ -0,0 +1,2747 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; ECMAScript semantic calculus +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + +(defvar *trace-variables* nil) + + +#+mcl (dolist (indent-spec '((production . 3) (letexc . 1) (deftype . 1))) + (pushnew indent-spec ccl:*fred-special-indent-alist* :test #'equal)) + + +; A strict version of and. +(defun and2 (a b) + (and a b)) + +; A strict version of or. +(defun or2 (a b) + (or a b)) + +; A strict version of xor. +(defun xor2 (a b) + (or (and a (not b)) (and (not a) b))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; DOUBLE-PRECISION FLOATING-POINT NUMBERS + +(deftype double () + '(or float (member :+inf :-inf :nan))) + +(defun double? (n) + (or (floatp n) + (member n '(:+inf :-inf :nan)))) + +; Evaluate expr. If it evaluates successfully, return its values. +; If not, evaluate sign; if it returns a positive value, return :+inf; +; otherwise return :-inf. sign should not return zero. +(defmacro handle-overflow (expr &body sign) + `(handler-case ,expr + (floating-point-overflow () (if (minusp (progn ,@sign)) :-inf :+inf)))) + + +(defun rational-to-double (r) + (handle-overflow (coerce r 'double-float) r)) + + +; Return true if n is +0 or -0 and false otherwise. +(declaim (inline double-is-zero)) +(defun double-is-zero (n) + (and (floatp n) (zerop n))) + + +; Return true if n is NaN and false otherwise. +(declaim (inline double-is-nan)) +(defun double-is-nan (n) + (eq n :nan)) + + +; Return true if n is :+inf or :-inf and false otherwise. +(declaim (inline double-is-infinite)) +(defun double-is-infinite (n) + (or (eq n :+inf) (eq n :-inf))) + + +; Return: +; less if nm; +; unordered if either n or m is :nan. +(defun double-compare (n m less equal greater unordered) + (cond + ((or (double-is-nan n) (double-is-nan m)) unordered) + ((eql n m) equal) + ((or (eq n :+inf) (eq m :-inf)) greater) + ((or (eq m :+inf) (eq n :-inf)) less) + ((< n m) less) + ((> n m) greater) + (t equal))) + + +; Return +; 1 if n is +0.0, :+inf, or any positive floating-point number; +; -1 if n is -0.0, :-inf, or any positive floating-point number; +; 0 if n is :nan. +(defun double-sign (n) + (case n + (:+inf 1) + (:-inf -1) + (:nan 0) + (t (round (float-sign n))))) + + +; Return +; 0 if either n or m is :nan; +; 1 if n and m have the same double-sign; +; -1 if n and m have different double-signs. +(defun double-sign-xor (n m) + (* (double-sign n) (double-sign m))) + + +; Return the absolute value of n. +(defun double-abs (n) + (case n + ((:+inf :-inf) :+inf) + (:nan :nan) + (t (abs n)))) + + +; Return -n. +(defun double-neg (n) + (case n + (:+inf :-inf) + (:-inf :+inf) + (:nan :nan) + (t (- n)))) + + +; Return n+m. +(defun double-add (n m) + (case n + (:+inf (case m + (:-inf :nan) + (:nan :nan) + (t :+inf))) + (:-inf (case m + (:+inf :nan) + (:nan :nan) + (t :-inf))) + (:nan :nan) + (t (case m + (:+inf :+inf) + (:-inf :-inf) + (:nan :nan) + (t (handle-overflow (+ n m) + (let ((n-sign (float-sign n)) + (m-sign (float-sign m))) + (assert-true (= n-sign m-sign)) ;If the signs are opposite, we can't overflow. + n-sign))))))) + + +; Return n-m. +(defun double-subtract (n m) + (double-add n (double-neg m))) + + +; Return n*m. +(defun double-multiply (n m) + (let ((sign (double-sign-xor n m)) + (n (double-abs n)) + (m (double-abs m))) + (let ((result (cond + ((zerop sign) :nan) + ((eq n :+inf) (if (double-is-zero m) :nan :+inf)) + ((eq m :+inf) (if (double-is-zero n) :nan :+inf)) + (t (handle-overflow (* n m) 1))))) + (if (minusp sign) + (double-neg result) + result)))) + + +; Return n/m. +(defun double-divide (n m) + (let ((sign (double-sign-xor n m)) + (n (double-abs n)) + (m (double-abs m))) + (let ((result (cond + ((zerop sign) :nan) + ((eq n :+inf) (if (eq m :+inf) :nan :+inf)) + ((eq m :+inf) 0d0) + ((zerop m) (if (zerop n) :nan :+inf)) + (t (handle-overflow (/ n m) 1))))) + (if (minusp sign) + (double-neg result) + result)))) + + +; Return n%m, using the ECMAScript definition of %. +(defun double-remainder (n m) + (cond + ((or (double-is-nan n) (double-is-nan m) (double-is-infinite n) (double-is-zero m)) :nan) + ((or (double-is-infinite m) (double-is-zero n)) n) + (t (float (rem (rational n) (rational m)))))) + + +; Return d truncated towards zero into a 32-bit integer. Overflows wrap around. +(defun double-to-uint32 (d) + (case d + ((:+inf :-inf :nan) 0) + (t (mod (truncate d) #x100000000)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; CODE GENERATION + +; Return `(progn ,@statements), optimizing where possible. +(defun gen-progn (&rest statements) + (if (and (= (length statements) 1) + (let ((first-statement (first statements))) + (not (and (consp first-statement) + (eq (first first-statement) 'declare))))) + (first statements) + (cons 'progn statements))) + + +; Return `(funcall ,function-value ,@arg-values), optimizing where possible. +(defun gen-apply (function-value &rest arg-values) + (if (and (consp function-value) + (eq (first function-value) 'function) + (consp (rest function-value)) + (second function-value) + (null (cddr function-value))) + (let ((stripped-function-value (second function-value))) + (if (and (consp stripped-function-value) + (eq (first stripped-function-value) 'lambda) + (listp (second stripped-function-value)) + (cddr stripped-function-value) + (every #'(lambda (arg) + (and (identifier? arg) + (not (eql (first-symbol-char arg) #\&)))) + (second stripped-function-value))) + (let ((lambda-args (second stripped-function-value)) + (lambda-body (cddr stripped-function-value))) + (assert-true (= (length lambda-args) (length arg-values))) + (if lambda-args + (list* 'let + (mapcar #'list lambda-args arg-values) + lambda-body) + (apply #'gen-progn lambda-body))) + (cons stripped-function-value arg-values))) + (list* 'funcall function-value arg-values))) + + +; Return `#'(lambda ,args (declare (ignore-if-unused ,@args)) ,body-code), optimizing +; where possible. +(defun gen-lambda (args body-code) + (if args + `#'(lambda ,args (declare (ignore-if-unused . ,args)) ,body-code) + `#'(lambda () ,body-code))) + + +; If expr is a lambda-expression, return an equivalent expression that has +; the given name (which may be a symbol or a string; if it's a string, it is interned +; in the given package). Otherwise, return expr unchanged. +; Attaching a name to lambda-expressions helps in debugging code by identifying +; functions in debugger backtraces. +(defun name-lambda (expr name &optional package) + (if (and (consp expr) + (eq (first expr) 'function) + (consp (rest expr)) + (consp (second expr)) + (eq (first (second expr)) 'lambda) + (null (cddr expr))) + (let ((name (if (symbolp name) + name + (intern name package)))) + ;Avoid trouble when name is a lisp special form like if or lambda. + (when (special-form-p name) + (setq name (gensym name))) + `(flet ((,name ,@(rest (second expr)))) + #',name)) + expr)) + + +; Intern n symbols in the current package with names 0, 1, ..., +; n-1, where is the value of the prefix string. +; Return a list of these n symbols concatenated to the front of rest. +(defun intern-n-vars-with-prefix (prefix n rest) + (if (zerop n) + rest + (intern-n-vars-with-prefix prefix (1- n) (cons (intern (format nil "~A~D" prefix n)) rest)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR-INFO + +(defstruct (grammar-info (:constructor make-grammar-info (name grammar &optional lexer)) + (:copier nil) + (:predicate grammar-info?)) + (name nil :type symbol :read-only t) ;The name of this grammar + (grammar nil :type grammar :read-only t) ;This grammar + (lexer nil :type (or null lexer) :read-only t)) ;This grammar's lexer if this is a lexer grammar; nil if not + + +; Return the charclass that defines the given lexer nonterminal or nil if none. +(defun grammar-info-charclass (grammar-info nonterminal) + (let ((lexer (grammar-info-lexer grammar-info))) + (and lexer (lexer-charclass lexer nonterminal)))) + + +; Return the charclass or partition that defines the given lexer nonterminal or nil if none. +(defun grammar-info-charclass-or-partition (grammar-info nonterminal) + (let ((lexer (grammar-info-lexer grammar-info))) + (and lexer (or (lexer-charclass lexer nonterminal) + (gethash nonterminal (lexer-partitions lexer)))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; WORLDS + +(defstruct (world (:constructor allocate-world) + (:copier nil) + (:predicate world?)) + (package nil :type package) ;The package in which this world's identifiers are interned + (n-type-names 0 :type integer) ;Number of type names defined so far + (types-reverse nil :type (or null hash-table)) ;Hash table of (kind tags parameters) -> type; nil if invalid + (oneof-tags nil :type (or null hash-table)) ;Hash table of (oneof-tag . field-type) -> (must-be-unique oneof-type ... oneof-type); nil if invalid + (void-type nil :type (or null type)) ;Type used for placeholders + (boolean-type nil :type (or null type)) ;Type used for booleans + (integer-type nil :type (or null type)) ;Type used for integers + (rational-type nil :type (or null type)) ;Type used for rational numbers + (double-type nil :type (or null type)) ;Type used for double-precision floating-point numbers + (character-type nil :type (or null type)) ;Type used for characters + (string-type nil :type (or null type)) ;Type used for strings (vectors of characters) + (grammar-infos nil :type list) ;List of grammar-info + (commands-source nil :type list)) ;List of source code of all commands applied to this world + + +; Return the name of the world. +(defun world-name (world) + (package-name (world-package world))) + + +; Return a symbol in the given package whose value is that package's world structure. +(defun world-access-symbol (package) + (find-symbol "*WORLD*" package)) + + +; Return the world that created the given package. +(declaim (inline package-world)) +(defun package-world (package) + (symbol-value (world-access-symbol package))) + + +; Return the world that contains the given symbol. +(defun symbol-world (symbol) + (package-world (symbol-package symbol))) + + +; Delete the world and its package. +(defun delete-world (world) + (let ((package (world-package world))) + (when package + (delete-package package))) + (setf (world-package world) nil)) + + +; Create a world using a package with the given name. +; If the package is already used for another world, its contents +; are erased and the other world deleted. +(defun make-world (name) + (assert-type name string) + (let ((p (find-package name))) + (when p + (let* ((access-symbol (world-access-symbol p)) + (p-world (and (boundp access-symbol) (symbol-value access-symbol)))) + (unless p-world + (error "Package ~A already in use" name)) + (assert-true (eq (world-package p-world) p)) + (delete-world p-world)))) + (let* ((p (make-package name :use nil)) + (world (allocate-world + :package p + :types-reverse (make-hash-table :test #'equal) + :oneof-tags (make-hash-table :test #'equal))) + (access-symbol (intern "*WORLD*" p))) + (set access-symbol world) + (export access-symbol p) + world)) + + +; Intern s (which should be a symbol or a string) in this world's +; package and return the resulting symbol. +(defun world-intern (world s) + (intern (string s) (world-package world))) + + +; Export symbol in its package, which must belong to some world. +(defun export-symbol (symbol) + (assert-true (symbol-in-any-world symbol)) + (export symbol (symbol-package symbol))) + + +; Call f on each external symbol defined in the world's package. +(declaim (inline each-world-external-symbol)) +(defun each-world-external-symbol (world f) + (each-package-external-symbol (world-package world) f)) + + +; Call f on each external symbol defined in the world's package that has +; a property with the given name. +; f takes two arguments: +; the symbol +; the value of the property +(defun each-world-external-symbol-with-property (world property f) + (each-world-external-symbol + world + #'(lambda (symbol) + (let ((value (get symbol property *get2-nonce*))) + (unless (eq value *get2-nonce*) + (funcall f symbol value)))))) + + +; Return a list of all external symbols defined in the world's package that have +; a property with the given name. +; The list is sorted by symbol names. +(defun all-world-external-symbols-with-property (world property) + (let ((list nil)) + (each-world-external-symbol + world + #'(lambda (symbol) + (let ((value (get symbol property *get2-nonce*))) + (unless (eq value *get2-nonce*) + (push symbol list))))) + (sort list #'string<))) + + +; Return true if s is a symbol that is defined in this world's package. +(declaim (inline symbol-in-world)) +(defun symbol-in-world (world s) + (and (symbolp s) (eq (symbol-package s) (world-package world)))) + + +; Return true if s is a symbol that is defined in any world's package. +(defun symbol-in-any-world (s) + (and (symbolp s) + (let* ((package (symbol-package s)) + (access-symbol (world-access-symbol package))) + (and (boundp access-symbol) (typep (symbol-value access-symbol) 'world))))) + + +; Return a list of grammars in the world +(defun world-grammars (world) + (mapcar #'grammar-info-grammar (world-grammar-infos world))) + + +; Return the grammar-info with the given name in the world +(defun world-grammar-info (world name) + (find name (world-grammar-infos world) :key #'grammar-info-name)) + + +; Return the grammar with the given name in the world +(defun world-grammar (world name) + (let ((grammar-info (world-grammar-info world name))) + (and grammar-info (grammar-info-grammar grammar-info)))) + + +; Return the lexer with the given name in the world +(defun world-lexer (world name) + (let ((grammar-info (world-grammar-info world name))) + (and grammar-info (grammar-info-lexer grammar-info)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; SYMBOLS + +;;; The following properties are attached to exported symbols in the world: +;;; +;;; :preprocess preprocessor function ((preprocessor-state id . form-arg-list) -> form-list re-preprocess) if this identifier +;;; is a preprocessor command like 'grammar, 'lexer, or 'production +;;; +;;; :command expression code generation function ((world grammar-info-var . form-arg-list) -> void) if this identifier +;;; is a command like 'deftype or 'define +;;; :special-form expression code generation function ((world type-env id . form-arg-list) -> code, type, annotated-expr) +;;; if this identifier is a special form like 'if or 'lambda +;;; +;;; :primitive primitive structure if this identifier is a primitive +;;; +;;; :macro lisp expansion function ((world type-env . form-arg-list) -> expansion) if this identifier is a macro +;;; +;;; :type-constructor expression code generation function ((world allow-forward-references . form-arg-list) -> type) if this +;;; identifier is a type constructor like '->, 'vector, 'tuple, 'oneof, or 'address +;;; :deftype type if this identifier is a type; nil if this identifier is a forward-referenced type +;;; +;;; value of this identifier if it is a variable +;;; :value-code lisp code that was evaluated to produce +;;; :value-expr unparsed expression defining the value of this identifier if it is a variable +;;; :type type of this identifier if it is a variable +;;; :type-expr unparsed expression defining the type of this identifier if it is a variable +;;; +;;; :action list of (grammar-info . grammar-symbol) that declare this action if this identifier is an action name +;;; +;;; :depict-command depictor function ((markup-stream world depict-env . form-arg-list) -> void) +;;; :depict-type-constructor depictor function ((markup-stream world level . form-arg-list) -> void) +;;; :depict-special-form depictor function ((markup-stream world level . form-annotated-arg-list) -> void) +;;; :depict-macro depictor function ((markup-stream world level . form-annotated-arg-list) -> void) +;;; + + +; Return the code of the value associated with the given symbol or default if none. +; This macro is appropriate for use with setf. +(defmacro symbol-code (symbol &optional default) + `(get ,symbol :code ,@(and default (list default)))) + + +; Return the preprocessor action associated with the given symbol or nil if none. +; This macro is appropriate for use with setf. +(defmacro symbol-preprocessor-function (symbol) + `(get ,symbol :preprocess)) + + +; Return the macro definition associated with the given symbol or nil if none. +; This macro is appropriate for use with setf. +(defmacro symbol-macro (symbol) + `(get ,symbol :macro)) + + +; Return the primitive definition associated with the given symbol or nil if none. +; This macro is appropriate for use with setf. +(defmacro symbol-primitive (symbol) + `(get ,symbol :primitive)) + + +; Return the type definition associated with the given symbol. +; Return nil if the symbol is a forward-referenced type. +; If the symbol has no type definition at all, return default +; (or nil if not specified). +; This macro is appropriate for use with setf. +(defmacro symbol-type-definition (symbol &optional default) + `(get ,symbol :deftype ,@(and default (list default)))) + + +; Call f on each type definition, including forward-referenced types, in the world. +; f takes two arguments: +; the symbol +; the type (nil if forward-referenced) +(defun each-type-definition (world f) + (each-world-external-symbol-with-property world :deftype f)) + + +; Return a sorted list of the names of all type definitions, including +; forward-referenced types, in the world. +(defun world-type-definitions (world) + (all-world-external-symbols-with-property world :deftype)) + + +; Return the type of the variable associated with the given symbol or nil if none. +; This macro is appropriate for use with setf. +(defmacro symbol-type (symbol) + `(get ,symbol :type)) + + +; Return true if there is a variable associated with the given symbol. +(declaim (inline symbol-has-variable)) +(defun symbol-has-variable (symbol) + (not (eq (get symbol *get2-nonce*) *get2-nonce*))) + + +; Return a list of (grammar-info . grammar-symbol) pairs that each indicate +; a grammar and a grammar-symbol in that grammar that has an action named by the given symbol. +; This macro is appropriate for use with setf. +(defmacro symbol-action (symbol) + `(get ,symbol :action)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; TYPES + +(deftype typekind () + '(member ;tags ;parameters + :void ;nil ;nil + :boolean ;nil ;nil + :integer ;nil ;nil + :rational ;nil ;nil + :double ;nil ;nil + :character ;nil ;nil + :-> ;nil ;(result-type arg1-type arg2-type ... argn-type) + :vector ;nil ;(element-type) + :tuple ;(tag1 ... tagn) ;(element1-type ... elementn-type) + :oneof ;(tag1 ... tagn) ;(element1-type ... elementn-type) + :address)) ;nil ;(element-type) + + +(defstruct (type (:constructor allocate-type (kind tags parameters)) + (:predicate type?)) + (name nil :type symbol) ;This type's name; nil if this type is anonymous + (name-serial-number nil :type (or null integer)) ;This type's name's serial number; nil if this type is anonymous + (kind nil :type typekind :read-only t) ;This type's kind + (tags nil :type list :read-only t) ;List of tuple or oneof tags + (parameters nil :type list :read-only t)) ;List of parameter types (either types or symbols if forward-referenced) describing a compound type + + +(declaim (inline make-->-type)) +(defun make-->-type (world argument-types result-type) + (make-type world :-> nil (cons result-type argument-types))) + +(declaim (inline ->-argument-types)) +(defun ->-argument-types (type) + (assert-true (eq (type-kind type) :->)) + (cdr (type-parameters type))) + +(declaim (inline ->-result-type)) +(defun ->-result-type (type) + (assert-true (eq (type-kind type) :->)) + (car (type-parameters type))) + + +(declaim (inline make-vector-type)) +(defun make-vector-type (world element-type) + (make-type world :vector nil (list element-type))) + +(declaim (inline vector-element-type)) +(defun vector-element-type (type) + (assert-true (eq (type-kind type) :vector)) + (car (type-parameters type))) + + +; Return the type of the oneof's or tuple's field corresponding to the given tag +; or nil if the tag is not present in the oneof's or tuple's tags. +(defun field-type (type tag) + (assert-true (member (type-kind type) '(:oneof :tuple))) + (let ((pos (position tag (type-tags type)))) + (and pos (nth pos (type-parameters type))))) + + +(declaim (inline make-address-type)) +(defun make-address-type (world element-type) + (make-type world :address nil (list element-type))) + +(declaim (inline address-element-type)) +(defun address-element-type (type) + (assert-true (eq (type-kind type) :address)) + (car (type-parameters type))) + + +; Return true if serial-number-1 is less than serial-number-2. +; Each serial-number is either an integer or nil, which is considered to +; be positive infinity. +(defun serial-number-< (serial-number-1 serial-number-2) + (and serial-number-1 + (or (null serial-number-2) + (< serial-number-1 serial-number-2)))) + + +; Print the type nicely on the given stream. If expand1 is true then print +; the type's top level even if it has a name. In all other cases expand +; anonymous types but abbreviate named types by their names. +(defun print-type (type &optional (stream t) expand1) + (if (and (type-name type) (not expand1)) + (write-string (symbol-name (type-name type)) stream) + (labels + ((print-tuple-or-oneof (kind-string) + (pprint-logical-block (stream (mapcar #'cons (type-tags type) (type-parameters type)) + :prefix "(" :suffix ")") + (write-string kind-string stream) + (pprint-exit-if-list-exhausted) + (format stream " ~@_") + (pprint-indent :current 0 stream) + (loop + (let ((tag-and-type (pprint-pop))) + (pprint-logical-block (stream nil :prefix "(" :suffix ")") + (write (car tag-and-type) :stream stream) + (format stream " ~@_") + (print-type (cdr tag-and-type) stream)) + (pprint-exit-if-list-exhausted) + (format stream " ~:_"))) + (format stream " ~_") + (print-type (->-result-type type) stream)))) + + (case (type-kind type) + (:void (write-string "void" stream)) + (:boolean (write-string "boolean" stream)) + (:integer (write-string "integer" stream)) + (:rational (write-string "rational" stream)) + (:double (write-string "double" stream)) + (:character (write-string "character" stream)) + (:-> (pprint-logical-block (stream nil :prefix "(" :suffix ")") + (format stream "-> ~@_") + (pprint-indent :current 0 stream) + (pprint-logical-block (stream (->-argument-types type) :prefix "(" :suffix ")") + (pprint-exit-if-list-exhausted) + (loop + (print-type (pprint-pop) stream) + (pprint-exit-if-list-exhausted) + (format stream " ~:_"))) + (format stream " ~_") + (print-type (->-result-type type) stream))) + (:vector (pprint-logical-block (stream nil :prefix "(" :suffix ")") + (format stream "vector ~@_") + (print-type (vector-element-type type) stream))) + (:tuple (print-tuple-or-oneof "tuple")) + (:oneof (print-tuple-or-oneof "oneof")) + (:address (pprint-logical-block (stream nil :prefix "(" :suffix ")") + (format stream "address ~@_") + (print-type (address-element-type type) stream))) + (t (error "Bad typekind ~S" (type-kind type))))))) + + +; Same as print-type except that accumulates the output in a string +; and returns that string. +(defun print-type-to-string (type &optional expand1) + (with-output-to-string (stream) + (print-type type stream expand1))) + + +(defmethod print-object ((type type) stream) + (print-unreadable-object (type stream) + (format stream "type ~@_") + (let ((name (type-name type))) + (when name + (format stream "~A = ~@_" name))) + (print-type type stream t))) + + +; Register all of the oneof type's tags in the world's oneof-tags hash table. +; The hash table is indexed by pairs (tag . field-type) and is used to look up a +; oneof type given just a tag and its field's type. The data in the hash table +; consists of lists (flag oneof-type ... oneof-type). The flag is true if such a +; lookup has been performed (in which case the data must contain exactly one oneof-type +; and it is an error to add another one). +(defun register-oneof-tags (world oneof-type) + (let ((oneof-tags-hash (world-oneof-tags world))) + (mapc #'(lambda (tag field-type) + (let* ((key (cons tag field-type)) + (data (gethash key oneof-tags-hash))) + (cond + ((null data) + (setf (gethash key oneof-tags-hash) (list nil oneof-type))) + ((not (car data)) + (push oneof-type (cdr data))) + (t (error "Ambiguous oneof lookup of tag ~A: ~A. Possibilities are ~A or ~A" + tag + (print-type-to-string field-type) + (print-type-to-string (second data)) + (print-type-to-string oneof-type)))))) + (type-tags oneof-type) + (type-parameters oneof-type)))) + + +; Look up a oneof type given one of its tag and the corresponding field type. +; Signal an error if there is no such type or there is more than one matching type. +(defun lookup-oneof-tag (world tag field-type) + (let ((data (gethash (cons tag field-type) (world-oneof-tags world)))) + (cond + ((null data) + (error "No known oneof type with tag ~A: ~A" tag (print-type-to-string field-type))) + ((cddr data) + (error "Ambiguous oneof lookup of tag ~A: ~A. Possibilities are ~S" tag (print-type-to-string field-type) (cdr data))) + (t + (setf (first data) t) + (second data))))) + + +; Create or reuse a type with the given kind, tags, and parameters. +; A type is reused if one already exists with equal kind, tags, and parameters. +; Return the type. +(defun make-type (world kind tags parameters) + (let ((reverse-key (list kind tags parameters))) + (or (gethash reverse-key (world-types-reverse world)) + (let ((type (allocate-type kind tags parameters))) + (when (eq kind :oneof) + (register-oneof-tags world type)) + (setf (gethash reverse-key (world-types-reverse world)) type))))) + + +; Provide a new symbol for the type. A type can have zero or more names. +; Signal an error if the name is already used. +(defun add-type-name (world type symbol) + (assert-true (symbol-in-world world symbol)) + (when (symbol-type-definition symbol) + (error "Attempt to redefine type ~A" symbol)) + ;If the old type was anonymous, give it this name. + (unless (type-name type) + (setf (type-name type) symbol) + (setf (type-name-serial-number type) (world-n-type-names world))) + (incf (world-n-type-names world)) + (setf (symbol-type-definition symbol) type) + (export-symbol symbol)) + + +; Return an existing type with the given symbol, which must be interned in a world's package. +; Signal an error if there isn't an existing type. If allow-forward-references is true and +; symbol is an undefined type identifier, allow it, create a forward-referenced type, and return symbol. +(defun get-type (symbol &optional allow-forward-references) + (or (symbol-type-definition symbol) + (if allow-forward-references + (progn + (setf (symbol-type-definition symbol) nil) + symbol) + (error "Undefined type ~A" symbol)))) + + +; Scan a type-expr to produce a type. Return that type. +; If allow-forward-references is true and type-expr is an undefined type identifier, +; allow it, create a forward-referenced type in the world, and return type-expr unchanged. +; If allow-forward-references is true, also allow undefined type +; identifiers deeper within type-expr (anywhere except at its top level). +; If type-expr is already a type, return it unchanged. +(defun scan-type (world type-expr &optional allow-forward-references) + (cond + ((identifier? type-expr) + (get-type (world-intern world type-expr) allow-forward-references)) + ((type? type-expr) + type-expr) + (t (let ((type-constructor (and (consp type-expr) + (symbolp (first type-expr)) + (get (world-intern world (first type-expr)) :type-constructor)))) + (if type-constructor + (apply type-constructor world allow-forward-references (rest type-expr)) + (error "Bad type ~S" type-expr)))))) + + +; Same as scan-type except that ensure that the type has the expected kind. +; Return the type. +(defun scan-kinded-type (world type-expr expected-type-kind) + (let ((type (scan-type world type-expr))) + (unless (eq (type-kind type) expected-type-kind) + (error "Expected ~(~A~) but got ~A" expected-type-kind (print-type-to-string type))) + type)) + + +; (-> ( ... ) ) +(defun scan--> (world allow-forward-references arg-type-exprs result-type-expr) + (unless (listp arg-type-exprs) + (error "Bad -> argument type list ~S" arg-type-exprs)) + (make-->-type world + (mapcar #'(lambda (te) (scan-type world te allow-forward-references)) arg-type-exprs) + (scan-type world result-type-expr allow-forward-references))) + + +; (vector ) +(defun scan-vector (world allow-forward-references element-type) + (make-vector-type world (scan-type world element-type allow-forward-references))) + + +; (address ) +(defun scan-address (world allow-forward-references element-type) + (make-address-type world (scan-type world element-type allow-forward-references))) + + +(defun scan-tuple-or-oneof (world allow-forward-references kind tag-pairs tags-so-far types-so-far) + (if tag-pairs + (let ((tag-pair (car tag-pairs))) + (when (and (identifier? tag-pair) (eq kind :oneof)) + (setq tag-pair (list tag-pair 'void))) + (unless (and (consp tag-pair) (identifier? (first tag-pair)) + (second tag-pair) (null (cddr tag-pair))) + (error "Bad oneof or tuple pair ~S" tag-pair)) + (let ((tag (first tag-pair))) + (when (member tag tags-so-far) + (error "Duplicate oneof or tuple tag ~S" tag)) + (scan-tuple-or-oneof + world + allow-forward-references + kind + (cdr tag-pairs) + (cons tag tags-so-far) + (cons (scan-type world (second tag-pair) allow-forward-references) types-so-far)))) + (make-type world kind (nreverse tags-so-far) (nreverse types-so-far)))) + +; (oneof ( ) ... ( )) +(defun scan-oneof (world allow-forward-references &rest tags-and-types) + (scan-tuple-or-oneof world allow-forward-references :oneof tags-and-types nil nil)) + +; (tuple ( ) ... ( )) +(defun scan-tuple (world allow-forward-references &rest tags-and-types) + (scan-tuple-or-oneof world allow-forward-references :tuple tags-and-types nil nil)) + + +; Scan tag to produce a tag that is present in the given tuple or oneof type. +; Return the tag and its field type. +(defun scan-tag (type tag) + (let ((field-type (field-type type tag))) + (unless field-type + (error "Tag ~S not present in ~A" tag (print-type-to-string type))) + (values tag field-type))) + + +; Resolve all forward type references to refer to their target types. +; Signal an error if any unresolved type references remain. +; Only types reachable from some type name are affected. It is the caller's +; responsibility to make sure that these are the only types that exist. +; Return a list of all type structures encountered. +(defun resolve-forward-types (world) + (setf (world-types-reverse world) nil) + (setf (world-oneof-tags world) nil) + (let ((visited-types (make-hash-table :test #'eq))) + (labels + ((resolve-in-type (type) + (unless (gethash type visited-types) + (setf (gethash type visited-types) t) + (do ((parameter-types (type-parameters type) (cdr parameter-types))) + ((endp parameter-types)) + (let ((parameter-type (car parameter-types))) + (unless (typep parameter-type 'type) + (setq parameter-type (get-type parameter-type)) + (setf (car parameter-types) parameter-type)) + (resolve-in-type parameter-type)))))) + (each-type-definition + world + #'(lambda (symbol type) + (unless type + (error "Undefined type ~A" symbol)) + (resolve-in-type type)))) + (hash-table-keys visited-types))) + + +; Recompute the types-reverse and oneof-tags hash tables from the types in the types +; hash table and their constituents. +(defun recompute-type-caches (world) + (let ((types-reverse (make-hash-table :test #'equal))) + (setf (world-oneof-tags world) (make-hash-table :test #'equal)) + (labels + ((visit-type (type) + (let ((reverse-key (list (type-kind type) (type-tags type) (type-parameters type)))) + (assert-true (eq (gethash reverse-key types-reverse type) type)) + (unless (gethash reverse-key types-reverse) + (setf (gethash reverse-key types-reverse) type) + (when (eq (type-kind type) :oneof) + (register-oneof-tags world type)) + (mapc #'visit-type (type-parameters type)))))) + (each-type-definition + world + #'(lambda (symbol type) + (declare (ignore symbol)) + (visit-type type)))) + (setf (world-types-reverse world) types-reverse))) + + + +; Make all equivalent types be eq. Only types reachable from some type name +; are affected, and names may be redirected to different type structures than +; the ones to which they currently point. It is the caller's responsibility +; to make sure that there are no current outstanding references to types other +; than via type names. +; +; This function calls resolve-forward-types before making equivalent types be eq +; and recompute-type-caches just before returning. +; +; This function works by initially assuming that all types with the same kind +; and tags are the same type and then iterately determining which ones must be +; different because they contain different parameter types. +(defun unite-types (world) + (let* ((types (resolve-forward-types world)) + (n-types (length types))) + (labels + ((gen-cliques-1 (get-key) + (let ((types-to-cliques (make-hash-table :test #'eq :size n-types)) + (keys-to-cliques (make-hash-table :test #'equal)) + (n-cliques 0)) + (dolist (type types) + (let* ((key (funcall get-key type)) + (clique (gethash key keys-to-cliques))) + (unless clique + (setq clique n-cliques) + (incf n-cliques) + (setf (gethash key keys-to-cliques) clique)) + (setf (gethash type types-to-cliques) clique))) + (values n-cliques types-to-cliques))) + + (gen-cliques (n-old-cliques types-to-old-cliques) + (labels + ((get-old-clique (type) + (assert-non-null (gethash type types-to-old-cliques))) + (get-type-key (type) + (cons (get-old-clique type) + (mapcar #'get-old-clique (type-parameters type))))) + (multiple-value-bind (n-new-cliques types-to-new-cliques) (gen-cliques-1 #'get-type-key) + (assert-true (>= n-new-cliques n-old-cliques)) + (if (/= n-new-cliques n-old-cliques) + (gen-cliques n-new-cliques types-to-new-cliques) + (translate-types n-new-cliques types-to-new-cliques))))) + + (translate-types (n-cliques types-to-cliques) + (let ((clique-representatives (make-array n-cliques :initial-element nil))) + (maphash #'(lambda (type clique) + (let ((representative (svref clique-representatives clique))) + (when (or (null representative) + (serial-number-< (type-name-serial-number type) (type-name-serial-number representative))) + (setf (svref clique-representatives clique) type)))) + types-to-cliques) + (assert-true (every #'identity clique-representatives)) + (labels + ((map-type (type) + (svref clique-representatives (gethash type types-to-cliques)))) + (dolist (type types) + (do ((parameter-types (type-parameters type) (cdr parameter-types))) + ((endp parameter-types)) + (setf (car parameter-types) (map-type (car parameter-types))))) + (each-type-definition + world + #'(lambda (symbol type) + (setf (symbol-type-definition symbol) (map-type type)))))))) + + (multiple-value-call + #'gen-cliques + (gen-cliques-1 #'(lambda (type) (cons (type-kind type) (type-tags type))))) + (recompute-type-caches world)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; SPECIALS + + +(defun checked-callable (f) + (let ((fun (callable f))) + (unless fun + (warn "Undefined function ~S" f)) + fun)) + + +; Add a macro, command, or special form definition. symbol is a symbol that names the +; preprocessor directive, macro, command, or special form. When a semantic form +; (id arg1 arg2 ... argn) +; is encountered and id is a symbol with the same name as symbol, the form is +; replaced by the result of calling one of: +; (expander preprocessor-state id arg1 arg2 ... argn) if property is :preprocess +; (expander world type-env arg1 arg2 ... argn) if property is :macro +; (expander world grammar-info-var arg1 arg2 ... argn) if property is :command +; (expander world type-env id arg1 arg2 ... argn) if property is :special-form +; (expander world allow-forward-references arg1 arg2 ... argn) if property is :type-constructor +; expander must be a function or a function symbol. +; +; depictor is used instead of expander when emitting markup for the macro, command, or special form. +; depictor is called via: +; (depictor markup-stream world level arg1 arg2 ... argn) if property is :macro +; (depictor markup-stream world depict-env arg1 arg2 ... argn) if property is :command +; (depictor markup-stream world level arg1 arg2 ... argn) if property is :special-form +; (depictor markup-stream world level arg1 arg2 ... argn) if property is :type-constructor +; +(defun add-special (property symbol expander &optional depictor) + (let ((emit-property (cdr (assoc property '((:macro . :depict-macro) + (:command . :depict-command) + (:special-form . :depict-special-form) + (:type-constructor . :depict-type-constructor)))))) + (assert-true (or emit-property (not depictor))) + (assert-type symbol identifier) + (when *value-asserts* + (checked-callable expander) + (when depictor (checked-callable depictor))) + (when (or (get symbol property) (and emit-property (get symbol emit-property))) + (error "Attempt to redefine ~A ~A" property symbol)) + (setf (get symbol property) expander) + (when emit-property + (if depictor + (setf (get symbol emit-property) depictor) + (remprop symbol emit-property))) + (export-symbol symbol))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; PRIMITIVES + +(defstruct (primitive (:constructor make-primitive (type-expr value-code appearance &key markup1 markup2 level level1 level2)) + (:predicate primitive?)) + (type nil :type (or null type)) ;Type of this primitive; nil if not computed yet + (type-expr nil :read-only t) ;Source type expression that designates the type of this primitive + (value-code nil :read-only t) ;Lisp expression that computes the value of this primitive + (appearance nil :read-only t) ;One of the possible primitive appearances (see below) + (markup1 nil :read-only t) ;Markup (item or list) for this primitive + (markup2 nil :read-only t) ;:unary primitives: markup (item or list) for this primitive's closer + ; ;:infix primitives: true if spaces should be put around primitive + (level nil :read-only t) ;Precedence level of markup for this primitive + (level1 nil :read-only t) ;Precedence level required for first argument of this primitive + (level2 nil :read-only t)) ;Precedence level required for second argument of this primitive + +;appearance is one of the following: +; :global The primitive appears as a regular, global function or constant; its markup is in markup1 +; :infix The primitive is an infix binary primitive; its markup is in markup1; if markup2 is true, put spaces around markup1 +; :unary The primitive is a prefix and/or suffix unary primitive; the prefix is in markup1 and suffix in markup2 +; :phantom The primitive disappears when emitting markup for it + + +; Call this to declare all primitives when initially constructing a world, +; before types have been constructed. +(defun declare-primitive (symbol type-expr value-code appearance &rest key-args) + (when (symbol-primitive symbol) + (error "Attempt to redefine primitive ~A" symbol)) + (setf (symbol-primitive symbol) (apply #'make-primitive type-expr value-code appearance key-args)) + (export-symbol symbol)) + + +; Call this to compute the primitive's type from its type-expr. +(defun define-primitive (world primitive) + (setf (primitive-type primitive) (scan-type world (primitive-type-expr primitive)))) + + +; If name is an identifier not already used by a special form, command, primitive, or macro, +; return it interened into the world's package. If not, generate an error. +(defun scan-name (world name) + (unless (identifier? name) + (error "~S should be an identifier" name)) + (let ((symbol (world-intern world name))) + (when (get-properties (symbol-plist symbol) '(:command :special-form :primitive :macro :type-constructor)) + (error "~A is reserved" symbol)) + symbol)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; TYPE ENVIRONMENTS + +;;; A type environment is an alist that associates bound variables with their types. +;;; A variable may be bound multiple times; the first binding in the environment list +;;; shadows ones further in the list. +;;; The following kinds of bindings are allowed in a type environment: +;;; +;;; (symbol . type) +;;; Normal local variable, where: +;;; symbol is a world-interned name of the local variable; +;;; type is that variable's type. +;;; +;;; (:lhs-symbol . symbol) +;;; The lhs nonterminal's symbol if this is a type environment for an action function. +;;; +;;; ((action symbol . index) local-symbol type general-grammar-symbol) +;;; Action variable, where: +;;; action is a world-interned symbol denoting the action function being called +;;; symbol is a terminal or nonterminal's symbol on which the action is called +;;; index is the one-based index used to distinguish among identical +;;; symbols in the rhs of a production. The first occurrence of this +;;; symbol has index 1, the second has index 2, and so on. +;;; local-symbol is a unique local variable name used to represent the action +;;; function's value in the generated lisp code +;;; type is the type of the action function's value +;;; general-grammar-symbol is the general-grammar-symbol corresponding to the index-th +;;; instance of symbol in the production's rhs +;;; +;;; (:no-code-gen) +;;; If present, this indicates that the code returned from this scan-value or related call +;;; will be discarded; only the type is important. This flag is used as an optimization. + +(defconstant *null-type-env* nil) + + +; If symbol is a local variable, return two values: +; the name to use to refer to it from the generated lisp code; +; the variable's type. +; Otherwise, return nil. +; symbol must already be world-interned. +(declaim (inline type-env-local)) +(defun type-env-local (type-env symbol) + (let ((binding (assoc symbol type-env :test #'eq))) + (when binding + (values (car binding) (cdr binding))))) + + +; If the currently generated function is an action, return that action production's +; lhs nonterminal's symbol; otherwise return nil. +(defun type-env-lhs-symbol (type-env) + (cdr (assoc ':lhs-symbol type-env :test #'eq))) + + +; If the currently generated function is an action for a rule with at least index +; instances of the given grammar-symbol's symbol on the right-hand side, and if action is +; a legal action for that symbol, return three values: +; the name to use from the generated lisp code to refer to the result of calling +; the action on the index-th instance of this symbol; +; the action result's type; +; the general-grammar-symbol corresponding to the index-th instance of this symbol in the rhs. +; Otherwise, return nil. +; action must already be world-interned. +(defun type-env-action (type-env action symbol index) + (let ((binding (assoc (list* action symbol index) type-env :test #'equal))) + (when binding + (values (second binding) (third binding) (fourth binding))))) + + +; Append bindings to the front of the type-env. The bindings list is destroyed. +(declaim (inline type-env-add-bindings)) +(defun type-env-add-bindings (type-env bindings) + (nconc bindings type-env)) + + +; Return an environment obtained from the type-env by adding a :no-code-gen binding. +(defun inhibit-code-gen (type-env) + (cons (list ':no-code-gen) type-env)) + + +; Return true if the type-env indicates that its code will be discarded. +(defun code-gen-inhibited (type-env) + (assoc ':no-code-gen type-env)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; VALUES + +;;; A value is one of the following: +;;; A void value (represented by nil) +;;; A boolean (nil for false; non-nil for true) +;;; An integer +;;; A rational number +;;; A double-precision floating-point number (or :+inf, :-inf, or :nan) +;;; A character +;;; A function (represented by a lisp function) +;;; A vector (represented by a list) +;;; A tuple (represented by a list of elements' values) +;;; A oneof (represented by a pair: tag . value) +;;; An address (represented by a cons cell whose cdr contains the value and car contains a serial number) + + +(defvar *address-counter*) ;Last used address serial number + + +; Return true if the value appears to have the given type. This function +; may return false positives (return true when the value doesn't actually +; have the given type) but never false negatives. +; If shallow is true, only test at the top level. +(defun value-has-type (value type &optional shallow) + (case (type-kind type) + (:void (null value)) + (:boolean t) + (:integer (integerp value)) + (:rational (rationalp value)) + (:double (double? value)) + (:character (characterp value)) + (:-> (functionp value)) + (:vector (let ((element-type (vector-element-type type))) + (if (eq (type-kind element-type) :character) + (stringp value) + (labels + ((test (value) + (or (null value) + (and (consp value) + (or shallow (value-has-type (car value) element-type)) + (test (cdr value)))))) + (test value))))) + (:tuple (labels + ((test (value types) + (or (and (null value) (null types)) + (and (consp value) + (consp types) + (or shallow (value-has-type (car value) (car types))) + (test (cdr value) (cdr types)))))) + (test value (type-parameters type)))) + (:oneof (and (consp value) + (let ((field-type (field-type type (car value)))) + (and field-type + (or shallow (value-has-type (cdr value) field-type)))))) + (:address (and (consp value) + (integerp (car value)) + (or shallow (value-has-type (cdr value) (address-element-type type))))) + (t (error "Bad typekind ~S" (type-kind type))))) + + +; Print the value nicely on the given stream. type is the value's type. +(defun print-value (value type &optional (stream t)) + (assert-true (value-has-type value type t)) + (case (type-kind type) + (:void (assert-true (null value)) + (write-string "unit" stream)) + (:boolean (write-string (if value "true" "false") stream)) + ((:integer :rational :character :->) (write value :stream stream)) + (:double (case value + (:+inf (write-string "+infinity" stream)) + (:-inf (write-string "-infinity" stream)) + (:nan (write-string "NaN" stream)) + (t (write value :stream stream)))) + (:vector (let ((element-type (vector-element-type type))) + (if (eq (type-kind element-type) :character) + (prin1 value stream) + (pprint-logical-block (stream value :prefix "(" :suffix ")") + (pprint-exit-if-list-exhausted) + (loop + (print-value (pprint-pop) element-type stream) + (pprint-exit-if-list-exhausted) + (format stream " ~:_")))))) + (:tuple (print-values value (type-parameters type) stream :prefix "[" :suffix "]")) + (:oneof (pprint-logical-block (stream nil :prefix "{" :suffix "}") + (let* ((tag (car value)) + (field-type (field-type type tag))) + (format stream "~A" tag) + (unless (eq (type-kind field-type) :void) + (format stream " ~:_") + (print-value (cdr value) field-type stream))))) + (:address (pprint-logical-block (stream nil :prefix "{" :suffix "}") + (format stream "~D ~:_" (car value)) + (print-value (cdr value) (address-element-type type) stream))) + (t (error "Bad typekind ~S" (type-kind type))))) + + +; Print a list of values nicely on the given stream. types is the list of the +; values' types (and should have the same length as the list of values). +; If prefix and/or suffix are non-null, use them as beginning and ending +; delimiters of the printed list. +(defun print-values (values types &optional (stream t) &key prefix suffix) + (assert-true (= (length values) (length types))) + (pprint-logical-block (stream values :prefix prefix :suffix suffix) + (pprint-exit-if-list-exhausted) + (dolist (type types) + (print-value (pprint-pop) type stream) + (pprint-exit-if-list-exhausted) + (format stream " ~:_")))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; VALUE EXPRESSIONS + +;;; Expressions are annotated to avoid having to duplicate the expression scanning logic when +;;; emitting markup for expressions. Expression forms are prefixed with an expr-annotation symbol +;;; to indicate their kinds. These symbols are in their own package to avoid potential confusion +;;; with keywords, variable names, terminals, etc. +(eval-when (:compile-toplevel :load-toplevel :execute) + (defpackage "EXPR-ANNOTATION" + (:use) + (:export "CONSTANT" ;(expr-annotation:constant ) + "PRIMITIVE" ;(expr-annotation:primitive ) + "LOCAL" ;(expr-annotation:local ) ;Local or lexically scoped variable + "GLOBAL" ;(expr-annotation:global ) ;Global variable + "CALL" ;(expr-annotation:call ... ) + "ACTION" ;(expr-annotation:action ) + "SPECIAL-FORM" ;(expr-annotation:special-form ...) + "MACRO"))) ;(expr-annotation:macro ) + + +; Return true if the annotated-expr is a special form annotated expression with +; the given special-form. special-form must be a symbol but does not have to be interned +; in the world's package. +(defun special-form-annotated-expr? (special-form annotated-expr) + (and (eq (first annotated-expr) 'expr-annotation:special-form) + (string= (symbol-name (second annotated-expr)) (symbol-name special-form)))) + + +; Return true if the annotated-expr is a macro annotated expression with the given macro. +; macro must be a symbol but does not have to be interned in the world's package. +(defun macro-annotated-expr? (macro annotated-expr) + (and (eq (first annotated-expr) 'expr-annotation:macro) + (string= (symbol-name (second annotated-expr)) (symbol-name macro)))) + + +; Return the value of the variable with the given symbol. +; Compute the value if the variable was unbound. +; Use the *busy-variables* list to prevent infinite recursion while computing variable values. +(defmacro fetch-value (symbol) + `(if (boundp ',symbol) + (symbol-value ',symbol) + (compute-variable-value ',symbol))) + + +; Generate a lisp expression that will compute the value of value-expr. +; type-env is the type environment. The expression may refer to free variables +; present in the type-env. +; Return three values: +; The expression's value (a lisp expression) +; The expression's type +; The annotated value-expr +(defun scan-value (world type-env value-expr) + (labels + ((syntax-error () + (error "Syntax error: ~S" value-expr)) + + ;Scan a function call. The function has already been scanned into its value and type, + ;but the arguments are still unprocessed. + (scan-call (function-value function-type function-annotated-expr arg-exprs) + (let ((arg-values nil) + (arg-types nil) + (arg-annotated-exprs nil)) + (dolist (arg-expr arg-exprs) + (multiple-value-bind (arg-value arg-type arg-annotated-expr) (scan-value world type-env arg-expr) + (push arg-value arg-values) + (push arg-type arg-types) + (push arg-annotated-expr arg-annotated-exprs))) + (let ((arg-values (nreverse arg-values)) + (arg-types (nreverse arg-types)) + (arg-annotated-exprs (nreverse arg-annotated-exprs))) + (unless (and (eq (type-kind function-type) :->) + (equal (->-argument-types function-type) arg-types)) + (error "~@" + value-expr + (print-type-to-string function-type) + (mapcar #'print-type-to-string arg-types))) + (values (apply #'gen-apply function-value arg-values) + (->-result-type function-type) + (list* 'expr-annotation:call function-annotated-expr arg-annotated-exprs))))) + + ;Scan an action call + (scan-action-call (action symbol &optional (index 1 index-supplied)) + (unless (integerp index) + (error "Production rhs grammar symbol index ~S must be an integer" index)) + (multiple-value-bind (symbol-code symbol-type general-grammar-symbol) (type-env-action type-env action symbol index) + (unless symbol-code + (error "Action ~S not found" (list action symbol index))) + (let ((multiple-symbols (type-env-action type-env action symbol 2))) + (when (and (not index-supplied) multiple-symbols) + (error "Ambiguous index in action ~S" (list action symbol))) + (values symbol-code + symbol-type + (list* 'expr-annotation:action action general-grammar-symbol + (and (or multiple-symbols + (grammar-symbol-= symbol (assert-non-null (type-env-lhs-symbol type-env)))) + (list index))))))) + + ;Scan an interned identifier + (scan-identifier (symbol) + (multiple-value-bind (symbol-code symbol-type) (type-env-local type-env symbol) + (if symbol-code + (values symbol-code symbol-type (list 'expr-annotation:local symbol)) + (let ((primitive (symbol-primitive symbol))) + (if primitive + (values (primitive-value-code primitive) (primitive-type primitive) (list 'expr-annotation:primitive symbol)) + (let ((type (symbol-type symbol))) + (if type + (values (list 'fetch-value symbol) type (list 'expr-annotation:global symbol)) + (syntax-error)))))))) + + ;Scan a call or macro expansion + (scan-cons (first rest) + (if (identifier? first) + (let* ((symbol (world-intern world first)) + (expander (symbol-macro symbol))) + (if expander + (multiple-value-bind (expansion-code expansion-type expansion-annotated-expr) + (scan-value world type-env (apply expander world type-env rest)) + (values + expansion-code + expansion-type + (list 'expr-annotation:macro symbol expansion-annotated-expr))) + (let ((handler (get symbol :special-form))) + (if handler + (apply handler world type-env symbol rest) + (if (and (symbol-action symbol) (not (type-env-local type-env symbol))) + (apply #'scan-action-call symbol rest) + (multiple-value-call #'scan-call (scan-identifier symbol) rest)))))) + (multiple-value-call #'scan-call (scan-value world type-env first) rest))) + + (scan-constant (value-expr type) + (values value-expr type (list 'expr-annotation:constant value-expr)))) + + (assert-three-values + (cond + ((consp value-expr) (scan-cons (first value-expr) (rest value-expr))) + ((identifier? value-expr) (scan-identifier (world-intern world value-expr))) + ((integerp value-expr) (scan-constant value-expr (world-integer-type world))) + ((floatp value-expr) (scan-constant value-expr (world-double-type world))) + ((characterp value-expr) (scan-constant value-expr (world-character-type world))) + ((stringp value-expr) (scan-constant value-expr (world-string-type world))) + (t (syntax-error)))))) + + +; Same as scan-value except that return only the expression's type. +(defun scan-value-type (world type-env value-expr) + (nth-value 1 (scan-value world (inhibit-code-gen type-env) value-expr))) + + +; Same as scan-value except that ensure that the value has the expected type. +; Return two values: +; The expression's value (a lisp expression) +; The annotated value-expr +(defun scan-typed-value (world type-env value-expr expected-type) + (multiple-value-bind (value type annotated-expr) (scan-value world type-env value-expr) + (unless (eq type expected-type) + (error "Expected type ~A for ~:W but got type ~A" + (print-type-to-string expected-type) + value-expr + (print-type-to-string type))) + (values value annotated-expr))) + + +; Same as scan-value except that ensure that the value has the expected type kind. +; Return three values: +; The expression's value (a lisp expression) +; The expression's type +; The annotated value-expr +(defun scan-kinded-value (world type-env value-expr expected-type-kind) + (multiple-value-bind (value type annotated-expr) (scan-value world type-env value-expr) + (unless (eq (type-kind type) expected-type-kind) + (error "Expected ~(~A~) for ~:W but got type ~A" + expected-type-kind + value-expr + (print-type-to-string type))) + (values value type annotated-expr))) + + +(defvar *busy-variables* nil) + +; Compute the value of a world's variable named by symbol. Return two values: +; The variable's value +; The variable's type +; If the variable already has a computed value, return it unchanged. +; If computing the value requires the values of other variables, compute them as well. +; Use the *busy-variables* list to prevent infinite recursion while computing variable values. +(defun compute-variable-value (symbol) + (cond + ((member symbol *busy-variables*) (error "Definition of ~A refers to itself" symbol)) + ((boundp symbol) (values (symbol-value symbol) (symbol-type symbol))) + (t (let* ((*busy-variables* (cons symbol *busy-variables*)) + (value-expr (get symbol :value-expr))) + (handler-bind (((or error warning) + #'(lambda (condition) + (declare (ignore condition)) + (format *error-output* "~&~@<~2IWhile computing ~A: ~_~:W~:>~%" + symbol value-expr)))) + (multiple-value-bind (value-code type) (scan-value (symbol-world symbol) *null-type-env* value-expr) + (unless (eq type (symbol-type symbol)) + (error "~A evaluates to type ~A, but is defined with type ~A" + symbol + (print-type-to-string type) + (print-type-to-string (symbol-type symbol)))) + (let ((named-value-code (name-lambda value-code symbol))) + (setf (symbol-code symbol) named-value-code) + (when *trace-variables* + (format *trace-output* "~&~S := ~:W~%" symbol named-value-code)) + (values (set symbol (eval named-value-code)) type)))))))) + + +; Compute the initial type-env to use for the given general-production's action code. +; The first cell of the type-env gives the production's lhs nonterminal's symbol; +; the remaining cells give the action arguments in order. +(defun general-production-action-env (grammar general-production) + (let* ((current-indices nil) + (lhs-general-nonterminal (general-production-lhs general-production)) + (bound-arguments-alist (nonterminal-sample-bound-argument-alist grammar lhs-general-nonterminal))) + (acons ':lhs-symbol (general-grammar-symbol-symbol lhs-general-nonterminal) + (mapcan + #'(lambda (general-grammar-symbol) + (let* ((symbol (general-grammar-symbol-symbol general-grammar-symbol)) + (index (incf (getf current-indices symbol 0))) + (grammar-symbol (instantiate-general-grammar-symbol bound-arguments-alist general-grammar-symbol))) + (mapcar + #'(lambda (declaration) + (let* ((action-symbol (car declaration)) + (action-type (cdr declaration)) + (local-symbol (gensym (symbol-name action-symbol)))) + (list + (list* action-symbol symbol index) + local-symbol + action-type + general-grammar-symbol))) + (grammar-symbol-signature grammar grammar-symbol)))) + (general-production-rhs general-production))))) + + +; Return the number of arguments that a function returned by compute-action-code +; would expect. +(defun n-action-args (grammar production) + (let ((n-args 0)) + (dolist (grammar-symbol (production-rhs production)) + (incf n-args (length (grammar-symbol-signature grammar grammar-symbol)))) + n-args)) + + +; Compute the code for evaluating body-expr to obtain the value of one of the +; production's actions. Verify that the result has the given type. +; The code is a lambda-expression that takes as arguments the results of all +; defined actions on the production's rhs. The arguments are listed in the +; same order as the grammar symbols in the rhs. If a grammar symbol in the rhs +; has more than one associated action, arguments are used corresponding to all +; of the actions in the same order as they were declared. If a grammar symbol +; in the rhs has no associated actions, no argument is used for it. +(defun compute-action-code (world grammar production action-symbol body-expr type) + (handler-bind ((error #'(lambda (condition) + (declare (ignore condition)) + (format *error-output* "~&~@<~2IWhile processing action ~A on ~S: ~_~:W~:>~%" + action-symbol (production-name production) body-expr)))) + (let* ((initial-env (general-production-action-env grammar production)) + (args (mapcar #'cadr (cdr initial-env))) + (body-code (scan-typed-value world initial-env body-expr type)) + (named-body-code (name-lambda body-code + (concatenate 'string (symbol-name (production-name production)) + "~" (symbol-name action-symbol)) + (world-package world)))) + (gen-lambda args named-body-code)))) + + +; Return a list of all grammar symbols's symbols that are present in at least one expr-annotation:action +; in the annotated expression. The symbols are returned in no particular order. +(defun annotated-expr-grammar-symbols (annotated-expr) + (let ((symbols nil)) + (labels + ((scan (annotated-expr) + (when (consp annotated-expr) + (if (eq (first annotated-expr) 'expr-annotation:action) + (pushnew (general-grammar-symbol-symbol (third annotated-expr)) symbols :test *grammar-symbol-=*) + (mapc #'scan annotated-expr))))) + (scan annotated-expr) + symbols))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; SPECIAL FORMS + +;;; Control structures + +(defun eval-bottom () + (error "Reached a BOTTOM statement")) + +; (bottom ) +; Raises an error. type is its phantom result type to satisfy type-checking +; even though bottom never returns. +(defun scan-bottom (world type-env special-form type-expr) + (declare (ignore type-env)) + (let ((type (scan-type world type-expr))) + (values + '(eval-bottom) + type + (list 'expr-annotation:special-form special-form type-expr)))) + + +; (lambda (( [:unused]) ... ( [:unused])) ) +(defun scan-lambda (world type-env special-form arg-binding-exprs body-expr) + (flet + ((scan-arg-binding (arg-binding-expr) + (unless (and (consp arg-binding-expr) + (consp (cdr arg-binding-expr)) + (member (cddr arg-binding-expr) '(nil (:unused)) :test #'equal)) + (error "Bad lambda binding ~S" arg-binding-expr)) + (let ((arg-symbol (scan-name world (first arg-binding-expr))) + (arg-type (scan-type world (second arg-binding-expr)))) + (cons arg-symbol arg-type)))) + + (unless (listp arg-binding-exprs) + (error "Bad lambda bindings ~S" arg-binding-exprs)) + (let* ((arg-bindings (mapcar #'scan-arg-binding arg-binding-exprs)) + (args (mapcar #'car arg-bindings)) + (arg-types (mapcar #'cdr arg-bindings)) + (unused-args (mapcan #'(lambda (arg arg-binding-expr) + (when (eq (third arg-binding-expr) ':unused) + (list arg))) + args arg-binding-exprs)) + (type-env (type-env-add-bindings type-env arg-bindings))) + (multiple-value-bind (body-code body-type body-annotated-expr) (scan-value world type-env body-expr) + (values (if unused-args + `#'(lambda ,args (declare (ignore . ,unused-args)) ,body-code) + `#'(lambda ,args ,body-code)) + (make-->-type world arg-types body-type) + (list 'expr-annotation:special-form special-form arg-binding-exprs body-annotated-expr)))))) + + +; (if ) +(defun scan-if (world type-env special-form condition-expr true-expr false-expr) + (multiple-value-bind (condition-code condition-annotated-expr) + (scan-typed-value world type-env condition-expr (world-boolean-type world)) + (multiple-value-bind (true-code true-type true-annotated-expr) (scan-value world type-env true-expr) + (multiple-value-bind (false-code false-type false-annotated-expr) (scan-value world type-env false-expr) + (unless (eq true-type false-type) + (error "~S: ~A and ~S: ~A used as alternatives in an if" + true-expr (print-type-to-string true-type) + false-expr (print-type-to-string false-type))) + (values + (list 'if condition-code true-code false-code) + true-type + (list 'expr-annotation:special-form special-form condition-annotated-expr true-annotated-expr false-annotated-expr)))))) + + +;;; Vectors + +(defmacro non-empty-vector (v operation-name) + `(or ,v (error ,(concatenate 'string operation-name " called on empty vector")))) + +; (vector ... ) +; Makes a vector of one or more elements. +(defun scan-vector-form (world type-env special-form element-expr &rest element-exprs) + (multiple-value-bind (element-code element-type element-annotated-expr) (scan-value world type-env element-expr) + (multiple-value-map-bind (rest-codes rest-annotated-exprs) + #'(lambda (element-expr) + (scan-typed-value world type-env element-expr element-type)) + (element-exprs) + (let ((elements-code (list* 'list element-code rest-codes))) + (values + (if (eq element-type (world-character-type world)) + (if element-exprs + (list 'coerce elements-code ''string) + (list 'string element-code)) + elements-code) + (make-vector-type world element-type) + (list* 'expr-annotation:special-form special-form element-annotated-expr rest-annotated-exprs)))))) + + +; (vector-of ) +; Makes a zero-element vector of elements of the given type. +(defun scan-vector-of (world type-env special-form element-type-expr) + (declare (ignore type-env)) + (let ((element-type (scan-type world element-type-expr))) + (values + (if (eq element-type (world-character-type world)) + "" + nil) + (make-vector-type world element-type) + (list 'expr-annotation:special-form special-form element-type-expr)))) + + +; (empty ) +; Returns true if the vector has zero elements. +(defun scan-empty (world type-env special-form vector-expr) + (multiple-value-bind (vector-code vector-type vector-annotated-expr) (scan-kinded-value world type-env vector-expr :vector) + (values + (if (eq vector-type (world-string-type world)) + `(= (length ,vector-code) 0) + (list 'endp vector-code)) + (world-boolean-type world) + (list 'expr-annotation:special-form special-form vector-annotated-expr)))) + + +; (length ) +; Returns the number of elements in the vector. +(defun scan-length (world type-env special-form vector-expr) + (multiple-value-bind (vector-code vector-type vector-annotated-expr) (scan-kinded-value world type-env vector-expr :vector) + (declare (ignore vector-type)) + (values + (list 'length vector-code) + (world-integer-type world) + (list 'expr-annotation:special-form special-form vector-annotated-expr)))) + + +; (first ) +; Returns the first element of the vector. Throws an error if the vector is empty. +(defun scan-first (world type-env special-form vector-expr) + (multiple-value-bind (vector-code vector-type vector-annotated-expr) (scan-kinded-value world type-env vector-expr :vector) + (values + (if (eq vector-type (world-string-type world)) + `(char ,vector-code 0) + `(car (non-empty-vector ,vector-code "first"))) + (vector-element-type vector-type) + (list 'expr-annotation:special-form special-form vector-annotated-expr)))) + + +; (last ) +; Returns the last element of the vector. Throws an error if the vector is empty. +(defun scan-last (world type-env special-form vector-expr) + (multiple-value-bind (vector-code vector-type vector-annotated-expr) (scan-kinded-value world type-env vector-expr :vector) + (values + (if (eq vector-type (world-string-type world)) + (let ((var (gensym "STR"))) + `(let ((,var ,vector-code)) + (char ,var (1- (length ,var))))) + `(car (last (non-empty-vector ,vector-code "last")))) + (vector-element-type vector-type) + (list 'expr-annotation:special-form special-form vector-annotated-expr)))) + + +; (nth ) +; Returns the nth element of the vector. Throws an error if the vector's length is less than n. +(defun scan-nth (world type-env special-form vector-expr n-expr) + (multiple-value-bind (vector-code vector-type vector-annotated-expr) (scan-kinded-value world type-env vector-expr :vector) + (multiple-value-bind (n-code n-annotated-expr) (scan-typed-value world type-env n-expr (world-integer-type world)) + (values + (if (eq vector-type (world-string-type world)) + `(char ,vector-code ,n-code) + (let ((n (gensym "N"))) + `(let ((,n ,n-code)) + (car (non-empty-vector (nthcdr ,n ,vector-code) "nth"))))) + (vector-element-type vector-type) + (list 'expr-annotation:special-form special-form vector-annotated-expr n-annotated-expr))))) + + +; (rest ) +; Returns all but the first elements of the vector. Throws an error if the vector is empty. +(defun scan-rest (world type-env special-form vector-expr) + (multiple-value-bind (vector-code vector-type vector-annotated-expr) (scan-kinded-value world type-env vector-expr :vector) + (values + (if (eq vector-type (world-string-type world)) + `(subseq ,vector-code 1) + `(cdr (non-empty-vector ,vector-code "rest"))) + vector-type + (list 'expr-annotation:special-form special-form vector-annotated-expr)))) + + +; (butlast ) +; Returns all but the last elements of the vector. Throws an error if the vector is empty. +(defun scan-butlast (world type-env special-form vector-expr) + (multiple-value-bind (vector-code vector-type vector-annotated-expr) (scan-kinded-value world type-env vector-expr :vector) + (values + (if (eq vector-type (world-string-type world)) + (let ((var (gensym "STR"))) + `(let ((,var ,vector-code)) + (subseq ,var 0 (1- (length ,var))))) + `(butlast (non-empty-vector ,vector-code "butlast"))) + vector-type + (list 'expr-annotation:special-form special-form vector-annotated-expr)))) + + +; (append ) +; Returns a vector contatenating the two given vectors, which must have the same element type. +(defun scan-append (world type-env special-form vector1-expr vector2-expr) + (multiple-value-bind (vector1-code vector-type vector1-annotated-expr) (scan-kinded-value world type-env vector1-expr :vector) + (multiple-value-bind (vector2-code vector2-annotated-expr) (scan-typed-value world type-env vector2-expr vector-type) + (values + (if (eq vector-type (world-string-type world)) + `(concatenate 'string ,vector1-code ,vector2-code) + (list 'append vector1-code vector2-code)) + vector-type + (list 'expr-annotation:special-form special-form vector1-annotated-expr vector2-annotated-expr))))) + + +;;; Oneofs + +; (oneof ) +; oneof-type is inferred from the tag. +(defun scan-oneof-form (world type-env special-form tag &optional (value-expr nil has-value-expr)) + (multiple-value-bind (value-code value-type value-annotated-expr) + (if has-value-expr + (scan-value world type-env value-expr) + (values nil (world-void-type world) nil)) + (values + `(cons ',tag ,value-code) + (lookup-oneof-tag world tag value-type) + (list 'expr-annotation:special-form special-form tag value-annotated-expr)))) + + +; (typed-oneof ) +(defun scan-typed-oneof (world type-env special-form type-expr tag &optional (value-expr nil has-value-expr)) + (let ((type (scan-kinded-type world type-expr :oneof))) + (multiple-value-bind (tag field-type) (scan-tag type tag) + (multiple-value-bind (value-code value-annotated-expr) + (cond + (has-value-expr (scan-typed-value world type-env value-expr field-type)) + ((eq (type-kind field-type) :void) (values nil nil)) + (t (error "Missing oneof value expression"))) + (values + `(cons ',tag ,value-code) + type + (list 'expr-annotation:special-form special-form type-expr tag value-annotated-expr)))))) + + +; (case ( ) ( ) ... ( )) +; where each is either or ( [:unused]) or (( ... )) +(defun scan-case (world type-env special-form oneof-expr &rest cases) + (multiple-value-bind (oneof-code oneof-type oneof-annotated-expr) (scan-kinded-value world type-env oneof-expr :oneof) + (let ((unseen-tags (copy-list (type-tags oneof-type))) + (case-codes nil) + (case-annotated-exprs nil) + (body-type nil) + (oneof-var (gensym "ONEOF"))) + (unless cases + (error "Empty case statement")) + (dolist (case cases) + (unless (and (consp case) (= (length case) 2)) + (error "Bad case ~S" case)) + (let ((tag-spec (first case)) + (tags nil) + (var nil) + (var-type-expr nil) + (local-type-env type-env)) + (cond + ((atom tag-spec) + (setq tags (list tag-spec))) + ((atom (first tag-spec)) + (unless (and (consp (cdr tag-spec)) + (consp (cddr tag-spec)) + (member (cdddr tag-spec) '(nil (:unused)) :test #'equal)) + (error "Bad case tag ~S" tag-spec)) + (setq tags (list (first tag-spec))) + (when (second tag-spec) + (setq var (scan-name world (second tag-spec))) + (setq var-type-expr (third tag-spec)))) + (t (when (rest tag-spec) + (error "Bad case tag ~S" tag-spec)) + (setq tags (first tag-spec)))) + (dolist (tag tags) + (multiple-value-bind (tag field-type) (scan-tag oneof-type tag) + (if (member tag unseen-tags) + (setq unseen-tags (delete tag unseen-tags)) + (error "Duplicate case tag ~A" tag)) + (when var + (unless (eq field-type (scan-type world var-type-expr)) + (error "Case tag ~A type mismatch: ~A and ~S" tag + (print-type-to-string field-type) var-type-expr)) + (setq local-type-env (type-env-add-bindings local-type-env (list (cons var field-type))))))) + (multiple-value-bind (value-code value-type value-annotated-expr) (scan-value world local-type-env (second case)) + (cond + ((null body-type) (setq body-type value-type)) + ((not (eq body-type value-type)) + (error "Case result type mismatch: ~A and ~A" (print-type-to-string body-type) (print-type-to-string value-type)))) + (push (list tags + (if var + `(let ((,var (cdr ,oneof-var))) + ,@(when (eq (fourth tag-spec) ':unused) + `((declare (ignore ,var)))) + ,value-code) + value-code)) + case-codes) + (push (list (list tags var var-type-expr) value-annotated-expr) case-annotated-exprs)))) + (when unseen-tags + (error "Missing case tags ~S" unseen-tags)) + (values + `(let ((,oneof-var ,oneof-code)) + (ecase (car ,oneof-var) ,@(nreverse case-codes))) + body-type + (list* 'expr-annotation:special-form special-form oneof-annotated-expr (nreverse case-annotated-exprs)))))) + + +; (select ) +; Returns the tag's value or bottom if has a different tag. +(defun scan-select (world type-env special-form tag oneof-expr) + (multiple-value-bind (oneof-code oneof-type oneof-annotated-expr) (scan-kinded-value world type-env oneof-expr :oneof) + (multiple-value-bind (tag field-type) (scan-tag oneof-type tag) + (values + `(select-field ',tag ,oneof-code) + field-type + (list 'expr-annotation:special-form special-form tag oneof-annotated-expr))))) + +(defun select-field (tag value) + (if (eq (car value) tag) + (cdr value) + (error "Select ~S got tag ~S" tag (car value)))) + + +; (is ) +(defun scan-is (world type-env special-form tag oneof-expr) + (multiple-value-bind (oneof-code oneof-type oneof-annotated-expr) (scan-kinded-value world type-env oneof-expr :oneof) + (let ((tag (scan-tag oneof-type tag))) + (values + `(eq ',tag (car ,oneof-code)) + (world-boolean-type world) + (list 'expr-annotation:special-form special-form tag oneof-annotated-expr))))) + + +;;; Tuples + +; (tuple ... ) +(defun scan-tuple-form (world type-env special-form type-expr &rest value-exprs) + (let* ((type (scan-kinded-type world type-expr :tuple)) + (field-types (type-parameters type))) + (unless (= (length value-exprs) (length field-types)) + (error "Wrong number of tuple fields given in ~A constructor: ~S" (print-type-to-string type) value-exprs)) + (multiple-value-map-bind (value-codes value-annotated-exprs) + #'(lambda (field-type value-expr) + (scan-typed-value world type-env value-expr field-type)) + (field-types value-exprs) + (values + (cons 'list value-codes) + type + (list* 'expr-annotation:special-form special-form type-expr value-annotated-exprs))))) + + +; (& ) +; Return the tuple field's value. +(defun scan-& (world type-env special-form tag tuple-expr) + (multiple-value-bind (tuple-code tuple-type tuple-annotated-expr) (scan-kinded-value world type-env tuple-expr :tuple) + (multiple-value-bind (tag field-type) (scan-tag tuple-type tag) + (values + (list 'nth (position tag (type-tags tuple-type)) tuple-code) + field-type + (list 'expr-annotation:special-form special-form tag tuple-annotated-expr))))) + + +;;; Addresses + +; (new ) +; Makes a mutable cell with the given initial value. +(defun scan-new (world type-env special-form value-expr) + (multiple-value-bind (value-code value-type value-annotated-expr) (scan-value world type-env value-expr) + (values + (let ((var (gensym "VAL"))) + `(let ((,var ,value-code)) + (cons (incf *address-counter*) ,var))) + (make-address-type world value-type) + (list 'expr-annotation:special-form special-form value-annotated-expr)))) + + +; (@ ) +; Reads the value of the mutable cell. +(defun scan-@ (world type-env special-form address-expr) + (multiple-value-bind (address-code address-type address-annotated-expr) (scan-kinded-value world type-env address-expr :address) + (values + `(cdr ,address-code) + (address-element-type address-type) + (list 'expr-annotation:special-form special-form address-annotated-expr)))) + + +; (@= ) +; Writes the value of the mutable cell. Returns void. +(defun scan-@= (world type-env special-form address-expr value-expr) + (multiple-value-bind (address-code address-type address-annotated-expr) (scan-kinded-value world type-env address-expr :address) + (multiple-value-bind (value-code value-annotated-expr) (scan-typed-value world type-env value-expr (address-element-type address-type)) + (values + `(progn + (rplacd ,address-code ,value-code) + nil) + (world-void-type world) + (list 'expr-annotation:special-form special-form address-annotated-expr value-annotated-expr))))) + + +; (address-equal ) +; Returns true if the two addresses are the same. +(defun scan-address-equal (world type-env special-form address1-expr address2-expr) + (multiple-value-bind (address1-code address1-type address1-annotated-expr) (scan-kinded-value world type-env address1-expr :address) + (multiple-value-bind (address2-code address2-annotated-expr) (scan-typed-value world type-env address2-expr address1-type) + (values + `(eq ,address1-code ,address2-code) + (world-boolean-type world) + (list 'expr-annotation:special-form special-form address1-annotated-expr address2-annotated-expr))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MACROS + + +(defun let-binding? (form) + (and (consp form) + (consp (cdr form)) + (consp (cddr form)) + (member (cdddr form) '(nil (:unused)) :test #'equal) + (identifier? (first form)))) + + +; (let (( [:unused]) ... ( [:unused])) ) ==> +; ((lambda (( [:unused]) ... ( [:unused])) ) ... ) +(defun expand-let (world type-env bindings &rest body) + (declare (ignore type-env)) + (declare (ignore world)) + (unless (and (listp bindings) + (every #'let-binding? bindings)) + (error "Bad let bindings ~S" bindings)) + (cons (list* 'lambda (mapcar #'(lambda (binding) + (list* (first binding) (second binding) (cdddr binding))) + bindings) body) + (mapcar #'third bindings))) + + +; (letexc ( [:unused]) ) ==> +; (case +; ((abrupt x exception) (typed-oneof abrupt x)) +; ((normal [:unused]) ))) +; where is the type of . +(defun expand-letexc (world type-env binding &rest body) + (unless (let-binding? binding) + (error "Bad letexc binding ~S" binding)) + (let* ((var (first binding)) + (type (second binding)) + (expr (third binding)) + (body-type (->-result-type (scan-value-type world type-env `(lambda ((,var ,type)) ,@body))))) + `(case ,expr + ((abrupt x exception) (typed-oneof ,body-type abrupt x)) + ((normal ,var ,type ,@(cdddr binding)) ,@body)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; COMMANDS + +; (%... ...) +; Ignore any command that starts with a %. These commands are hints for printing. +(defun scan-% (world grammar-info-var &rest rest) + (declare (ignore world grammar-info-var rest))) + + +; (deftype ) +; Create the type in the world and set its contents. +(defun scan-deftype (world grammar-info-var name type-expr) + (declare (ignore grammar-info-var)) + (let* ((symbol (scan-name world name)) + (type (scan-type world type-expr t))) + (unless (typep type 'type) + (error "~:W undefined in type definition of ~A" type-expr symbol)) + (add-type-name world type symbol))) + + +; (define ) +; Create the variable in the world but do not evaluate its type or value yet. +; is a flag that is true if this define was originally in the form: +; (define ( ( ) ... ( )) ) +(defun scan-define (world grammar-info-var name type-expr value-expr destructured) + (declare (ignore grammar-info-var destructured)) + (let ((symbol (scan-name world name))) + (unless (eq (get symbol :value-expr *get2-nonce*) *get2-nonce*) + (error "Attempt to redefine variable ~A" symbol)) + (setf (get symbol :value-expr) value-expr) + (setf (get symbol :type-expr) type-expr) + (export-symbol symbol))) + + +; (set-grammar ) +; Set the current grammar to the grammar or lexer with the given name. +(defun scan-set-grammar (world grammar-info-var name) + (let ((grammar-info (world-grammar-info world name))) + (unless grammar-info + (error "Unknown grammar ~A" name)) + (setf (car grammar-info-var) grammar-info))) + + +; (clear-grammar) +; Clear the current grammar. +(defun scan-clear-grammar (world grammar-info-var) + (declare (ignore world)) + (setf (car grammar-info-var) nil)) + + +; Get the grammar-info-var's grammar. Signal an error if there isn't one. +(defun checked-grammar (grammar-info-var) + (let ((grammar-info (car grammar-info-var))) + (if grammar-info + (grammar-info-grammar grammar-info) + (error "Grammar needed")))) + + +; (declare-action ) +(defun scan-declare-action (world grammar-info-var action-name general-grammar-symbol-source type-expr) + (let* ((grammar (checked-grammar grammar-info-var)) + (action-symbol (scan-name world action-name)) + (general-grammar-symbol (grammar-parametrization-intern grammar general-grammar-symbol-source))) + (declare-action grammar general-grammar-symbol action-symbol type-expr) + (dolist (grammar-symbol (general-grammar-symbol-instances grammar general-grammar-symbol)) + (push (cons (car grammar-info-var) grammar-symbol) (symbol-action action-symbol))) + (export-symbol action-symbol))) + + +; (action ) +; is a flag that is true if this define was originally in the form: +; (action ( ( ) ... ( )) ) +(defun scan-action (world grammar-info-var action-name production-name body destructured) + (declare (ignore destructured)) + (let ((grammar (checked-grammar grammar-info-var)) + (action-symbol (world-intern world action-name))) + (define-action grammar production-name action-symbol body))) + + +; (terminal-action ) +(defun scan-terminal-action (world grammar-info-var action-name terminal function-name) + (let ((grammar (checked-grammar grammar-info-var)) + (action-symbol (world-intern world action-name))) + (define-terminal-action grammar terminal action-symbol (symbol-function function-name)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; INITIALIZATION + +(defparameter *default-specials* + '((:preprocess + (define preprocess-define) + (action preprocess-action) + (grammar preprocess-grammar) + (lexer preprocess-lexer) + (grammar-argument preprocess-grammar-argument) + (production preprocess-production)) + + (:macro + (let expand-let depict-let) + (letexc expand-letexc depict-letexc)) + + (:command + (%section scan-% depict-%section) + (%subsection scan-% depict-%subsection) + (grammar-argument scan-% depict-grammar-argument) + (%rule scan-% depict-%rule) + (%charclass scan-% depict-%charclass) + (%print-actions scan-% depict-%print-actions) + (deftype scan-deftype depict-deftype) + (define scan-define depict-define) + (set-grammar scan-set-grammar depict-set-grammar) + (clear-grammar scan-clear-grammar depict-clear-grammar) + (declare-action scan-declare-action depict-declare-action) + (action scan-action depict-action) + (terminal-action scan-terminal-action depict-terminal-action)) + + (:special-form + ;;Control structures + (bottom scan-bottom depict-bottom) + (lambda scan-lambda depict-lambda) + (if scan-if depict-if) + + ;;Vectors + (vector scan-vector-form depict-vector-form) + (vector-of scan-vector-of depict-vector-of) + (empty scan-empty depict-empty) + (length scan-length depict-length) + (first scan-first depict-first) + (last scan-last depict-last) + (nth scan-nth depict-nth) + (rest scan-rest depict-rest) + (butlast scan-butlast depict-butlast) + (append scan-append depict-append) + + ;;Oneofs + (oneof scan-oneof-form depict-oneof-form) + (typed-oneof scan-typed-oneof depict-typed-oneof) + (case scan-case depict-case) + (select scan-select depict-select-or-&) + (is scan-is depict-is) + + ;;Tuples + (tuple scan-tuple-form depict-tuple-form) + (& scan-& depict-select-or-&) + + ;;Addresses + (new scan-new depict-new) + (@ scan-@ depict-@) + (@= scan-@= depict-@=) + (address-equal scan-address-equal depict-address-equal)) + + (:type-constructor + (-> scan--> depict-->) + (vector scan-vector depict-vector) + (oneof scan-oneof depict-oneof) + (tuple scan-tuple depict-tuple) + (address scan-address depict-address)))) + + +(defparameter *default-types* + '((void . :void) + (boolean . :boolean) + (integer . :integer) + (rational . :rational) + (double . :double) + (character . :character))) + + +(defparameter *default-primitives* + '((unit void nil :global :unit) + (true boolean t :global :true) + (false boolean nil :global :false) + (+infinity double :+inf :global ("+" :infinity)) + (-infinity double :-inf :global (:minus :infinity)) + (nan double :nan :global "NaN") + + (neg (-> (integer) integer) #'- :unary :minus nil 2 2) + (+ (-> (integer integer) integer) #'+ :infix "+" t 5 5 5) + (- (-> (integer integer) integer) #'- :infix :minus t 5 5 4) + (* (-> (integer integer) integer) #'* :infix "*" nil 4 4 4) + (= (-> (integer integer) boolean) #'= :infix "=" t 6 5 5) + (!= (-> (integer integer) boolean) #'/= :infix :not-equal t 6 5 5) + (< (-> (integer integer) boolean) #'< :infix "<" t 6 5 5) + (> (-> (integer integer) boolean) #'> :infix ">" t 6 5 5) + (<= (-> (integer integer) boolean) #'<= :infix :less-or-equal t 6 5 5) + (>= (-> (integer integer) boolean) #'>= :infix :greater-or-equal t 6 5 5) + + (rational-neg (-> (rational) rational) #'- :unary "-" nil 2 2) + (rational+ (-> (rational rational) rational) #'+ :infix "+" t 5 5 5) + (rational- (-> (rational rational) rational) #'- :infix :minus t 5 5 4) + (rational* (-> (rational rational) rational) #'* :infix "*" nil 4 4 4) + (rational/ (-> (rational rational) rational) #'/ :infix "/" nil 4 4 3) + + (not (-> (boolean) boolean) #'not :unary ((:semantic-keyword "not") " ") nil 7 6) + (and (-> (boolean boolean) boolean) #'and2 :infix ((:semantic-keyword "and")) t 7 6 6) + (or (-> (boolean boolean) boolean) #'or2 :infix ((:semantic-keyword "or")) t 7 6 6) + (xor (-> (boolean boolean) boolean) #'xor2 :infix ((:semantic-keyword "xor")) t 7 6 6) + + (bitwise-and (-> (integer integer) integer) #'logand) + (bitwise-or (-> (integer integer) integer) #'logior) + (bitwise-xor (-> (integer integer) integer) #'logxor) + (bitwise-shift (-> (integer integer) integer) #'ash) + + (integer-to-rational (-> (integer) rational) #'identity :phantom) + (rational-to-double (-> (rational) double) #'rational-to-double) + + (double-is-zero (-> (double) boolean) #'double-is-zero) + (double-is-nan (-> (double) boolean) #'double-is-nan) + (double-compare (-> (double double boolean boolean boolean boolean) boolean) #'double-compare) + (double-to-uint32 (-> (double) integer) #'double-to-uint32) + (double-abs (-> (double double) double) #'double-abs) + (double-negate (-> (double) double) #'double-neg) + (double-add (-> (double double) double) #'double-add) + (double-subtract (-> (double double) double) #'double-subtract) + (double-multiply (-> (double double) double) #'double-multiply) + (double-divide (-> (double double) double) #'double-divide) + (double-remainder (-> (double double) double) #'double-remainder) + + (code-to-character (-> (integer) character) #'code-char) + (character-to-code (-> (character) integer) #'char-code) + + (string-equal (-> (string string) boolean) #'string=))) + + +; Return the tail end of the lambda list for make-primitive. The returned list always starts with +; an appearance constant and is followed by additional keywords as appropriate for that appearance. +(defun process-primitive-spec-appearance (name primitive-spec-appearance) + (if primitive-spec-appearance + (let ((appearance (first primitive-spec-appearance)) + (args (rest primitive-spec-appearance))) + (cons + appearance + (ecase appearance + (:global + (assert-type args (tuple t)) + (list ':markup1 (first args) ':level 1)) + (:infix + (assert-type args (tuple t bool integer integer integer)) + (list ':markup1 (first args) ':markup2 (second args) ':level (third args) ':level1 (fourth args) ':level2 (fifth args))) + (:unary + (assert-type args (tuple t t integer integer)) + (list ':markup1 (first args) ':markup2 (second args) ':level (third args) ':level1 (fourth args))) + (:phantom + (assert-true (null args)) + (list ':level 0))))) + `(:global :markup1 ((:global-variable ,(symbol-lower-mixed-case-name name))) :level 0))) + + +; Create a world with the given name and set up the built-in properties of its symbols. +(defun init-world (name) + (let ((world (make-world name))) + (dolist (specials-list *default-specials*) + (let ((property (car specials-list))) + (dolist (special-spec (cdr specials-list)) + (apply #'add-special + property + (world-intern world (first special-spec)) + (rest special-spec))))) + (dolist (primitive-spec *default-primitives*) + (let ((name (world-intern world (first primitive-spec)))) + (apply #'declare-primitive + name + (second primitive-spec) + (third primitive-spec) + (process-primitive-spec-appearance name (cdddr primitive-spec))))) + (dolist (type-spec *default-types*) + (add-type-name world (make-type world (cdr type-spec) nil nil) (world-intern world (car type-spec)))) + (add-type-name world (make-vector-type world (make-type world :character nil nil)) (world-intern world 'string)) + world)) + + +(defun print-world (world &optional (stream t) (all t)) + (pprint-logical-block (stream nil) + (labels + ((default-print-contents (symbol value stream) + (declare (ignore symbol)) + (write value :stream stream)) + + (print-symbols-and-contents (property title separator print-contents) + (let ((symbols (all-world-external-symbols-with-property world property))) + (when symbols + (pprint-logical-block (stream symbols) + (write-string title stream) + (pprint-indent :block 2 stream) + (pprint-newline :mandatory stream) + (loop + (let ((symbol (pprint-pop))) + (pprint-logical-block (stream nil) + (if separator + (format stream "~A ~@_~:I~A " symbol separator) + (format stream "~A " symbol)) + (funcall print-contents symbol (get symbol property) stream))) + (pprint-exit-if-list-exhausted) + (pprint-newline :mandatory stream))) + (pprint-newline :mandatory stream) + (pprint-newline :mandatory stream))))) + + (when all + (print-symbols-and-contents + :preprocess "Preprocessor actions:" "::" #'default-print-contents) + (print-symbols-and-contents + :command "Commands:" "::" #'default-print-contents) + (print-symbols-and-contents + :special-form "Special Forms:" "::" #'default-print-contents) + (print-symbols-and-contents + :primitive "Primitives:" ":" + #'(lambda (symbol primitive stream) + (declare (ignore symbol)) + (let ((type (primitive-type primitive))) + (if type + (print-type type stream) + (format stream "~@<<<~;~W~;>>~:>" (primitive-type-expr primitive)))) + (format stream " ~_= ~@<<~;~W~;>~:>" (primitive-value-code primitive)))) + (print-symbols-and-contents + :macro "Macros:" "::" #'default-print-contents) + (print-symbols-and-contents + :type-constructor "Type Constructors:" "::" #'default-print-contents)) + + (print-symbols-and-contents + :deftype "Types:" "==" + #'(lambda (symbol type stream) + (if type + (print-type type stream (eq symbol (type-name type))) + (format stream "")))) + (print-symbols-and-contents + :value-expr "Values:" ":" + #'(lambda (symbol value-expr stream) + (let ((type (symbol-type symbol))) + (if type + (print-type type stream) + (format stream "~@<<<~;~W~;>>~:>" (get symbol :type-expr))) + (format stream " ~_= ") + (if (boundp symbol) + (print-value (symbol-value symbol) type stream) + (format stream "~@<<<~;~W~;>>~:>" value-expr))))) + (print-symbols-and-contents + :action "Actions:" nil + #'(lambda (action-symbol grammar-info-and-symbols stream) + (pprint-newline :miser stream) + (pprint-logical-block (stream (reverse grammar-info-and-symbols)) + (pprint-exit-if-list-exhausted) + (loop + (let* ((grammar-info-and-symbol (pprint-pop)) + (grammar-info (car grammar-info-and-symbol)) + (grammar (grammar-info-grammar grammar-info)) + (grammar-symbol (cdr grammar-info-and-symbol))) + (write-string ": " stream) + (multiple-value-bind (has-type type) (action-declaration grammar grammar-symbol action-symbol) + (declare (ignore has-type)) + (pprint-logical-block (stream nil) + (print-type type stream) + (format stream " ~_{~S ~S}" (grammar-info-name grammar-info) grammar-symbol)))) + (pprint-exit-if-list-exhausted) + (pprint-newline :mandatory stream)))))))) + + +(defmethod print-object ((world world) stream) + (print-unreadable-object (world stream) + (format stream "world ~A" (world-name world)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; EVALUATION + +; Scan a command. Create types and variables in the world +; but do not evaluate variables' types or values yet. +; grammar-info-var is a cons cell whose car is either nil +; or a grammar-info for the grammar currently being defined. +(defun scan-command (world grammar-info-var command) + (handler-bind ((error #'(lambda (condition) + (declare (ignore condition)) + (format *error-output* "~&~@<~2IWhile processing: ~_~:W~:>~%" command)))) + (let ((handler (and (consp command) + (identifier? (first command)) + (get (world-intern world (first command)) :command)))) + (if handler + (apply handler world grammar-info-var (rest command)) + (error "Bad command"))))) + + +; Compute the primitives' types from their type-exprs. +(defun define-primitives (world) + (each-world-external-symbol-with-property + world + :primitive + #'(lambda (symbol primitive) + (declare (ignore symbol)) + (define-primitive world primitive)))) + + +; Compute the types and values of all variables accumulated by scan-command. +(defun eval-variables (world) + ;Compute the variables' types first. + (each-world-external-symbol-with-property + world + :type-expr + #'(lambda (symbol type-expr) + (setf (get symbol :type) (scan-type world type-expr)))) + + ;Then compute the variables' values. + (each-world-external-symbol-with-property + world + :value-expr + #'(lambda (symbol value-expr) + (declare (ignore value-expr)) + (compute-variable-value symbol)))) + + +; Compute the types of all grammar declarations accumulated by scan-declare-action. +(defun eval-action-declarations (world) + (dolist (grammar (world-grammars world)) + (each-action-declaration + grammar + #'(lambda (grammar-symbol action-declaration) + (declare (ignore grammar-symbol)) + (setf (cdr action-declaration) (scan-type world (cdr action-declaration))))))) + + +; Compute the bodies of all grammar actions accumulated by scan-action. +(defun eval-action-definitions (world) + (dolist (grammar (world-grammars world)) + (maphash + #'(lambda (terminal action-bindings) + (dolist (action-binding action-bindings) + (unless (cdr action-binding) + (error "Missing action ~S for terminal ~S" (car action-binding) terminal)))) + (grammar-terminal-actions grammar)) + (each-grammar-production + grammar + #'(lambda (production) + (let* ((n-action-args (n-action-args grammar production)) + (codes + (mapcar + #'(lambda (action-binding) + (let ((action-symbol (car action-binding)) + (action (cdr action-binding))) + (unless action + (error "Missing action ~S for production ~S" (car action-binding) (production-name production))) + (multiple-value-bind (has-type type) (action-declaration grammar (production-lhs production) action-symbol) + (declare (ignore has-type)) + (let ((code (compute-action-code world grammar production action-symbol (action-expr action) type))) + (setf (action-code action) code) + (when *trace-variables* + (format *trace-output* "~&~@<~S[~S] := ~2I~_~:W~:>~%" action-symbol (production-name production) code)) + code)))) + (production-actions production))) + (production-code + (if codes + (let* ((vars-and-rest (intern-n-vars-with-prefix "ARG" n-action-args '(stack-rest))) + (vars (nreverse (butlast vars-and-rest))) + (applied-codes (mapcar #'(lambda (code) (apply #'gen-apply code vars)) + (nreverse codes)))) + `#'(lambda (stack) + (list*-bind ,vars-and-rest stack + (list* ,@applied-codes stack-rest)))) + `#'(lambda (stack) + (nthcdr ,n-action-args stack)))) + (named-production-code (name-lambda production-code (production-name production)))) + (setf (production-n-action-args production) n-action-args) + (setf (production-evaluator-code production) named-production-code) + (when *trace-variables* + (format *trace-output* "~&~@~%" (production-name production) named-production-code)) + (handler-bind ((warning #'(lambda (condition) + (declare (ignore condition)) + (format *error-output* "~&While computing production ~S:~%" (production-name production))))) + (setf (production-evaluator production) (eval named-production-code)))))))) + + +; Evaluate the given commands in the world. +; This method can only be called once. +(defun eval-commands (world commands) + (ensure-proper-form commands) + (assert-true (null (world-commands-source world))) + (setf (world-commands-source world) commands) + (let ((grammar-info-var (list nil))) + (dolist (command commands) + (scan-command world grammar-info-var command))) + (unite-types world) + (setf (world-void-type world) (make-type world :void nil nil)) + (setf (world-boolean-type world) (make-type world :boolean nil nil)) + (setf (world-integer-type world) (make-type world :integer nil nil)) + (setf (world-rational-type world) (make-type world :rational nil nil)) + (setf (world-double-type world) (make-type world :double nil nil)) + (setf (world-character-type world) (make-type world :character nil nil)) + (setf (world-string-type world) (make-vector-type world (world-character-type world))) + (define-primitives world) + (eval-action-declarations world) + (eval-variables world) + (eval-action-definitions world)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; PREPROCESSING + +(defstruct preprocessor-state + (kind nil :type (member nil :grammar :lexer)) ;The kind of grammar being accumulated or nil if none + (kind2 nil :type (member nil :lalr-1 :lr-1)) ;The kind of parser + (name nil :type symbol) ;Name of the grammar being accumulated or nil if none + (parametrization nil :type (or null grammar-parametrization)) ;Parametrization of the grammar being accumulated or nil if none + (start-symbol nil :type symbol) ;Start symbol of the grammar being accumulated or nil if none + (grammar-source-reverse nil :type list) ;List of productions in the grammar being accumulated (in reverse order) + (charclasses-source nil) ;List of charclasses in the lexical grammar being accumulated + (lexer-actions-source nil) ;List of lexer actions in the lexical grammar being accumulated + (grammar-infos-reverse nil :type list)) ;List of grammar-infos already completed (in reverse order) + + +; Ensure that the preprocessor-state is accumulating a grammar or a lexer. +(defun preprocess-ensure-grammar (preprocessor-state) + (unless (preprocessor-state-kind preprocessor-state) + (error "No active grammar at this point"))) + + +; Finish generating the current grammar-info if one is in progress. +; Return any extra commands needed for this grammar-info. +; The result list can be mutated using nconc. +(defun preprocessor-state-finish-grammar (preprocessor-state) + (let ((kind (preprocessor-state-kind preprocessor-state))) + (and kind + (let ((parametrization (preprocessor-state-parametrization preprocessor-state)) + (start-symbol (preprocessor-state-start-symbol preprocessor-state)) + (grammar-source (nreverse (preprocessor-state-grammar-source-reverse preprocessor-state)))) + (multiple-value-bind (grammar lexer extra-commands) + (ecase kind + (:grammar + (values (make-and-compile-grammar (preprocessor-state-kind2 preprocessor-state) + parametrization start-symbol grammar-source) + nil + nil)) + (:lexer + (multiple-value-bind (lexer extra-commands) + (make-lexer-and-grammar + (preprocessor-state-kind2 preprocessor-state) + (preprocessor-state-charclasses-source preprocessor-state) + (preprocessor-state-lexer-actions-source preprocessor-state) + parametrization start-symbol grammar-source) + (values (lexer-grammar lexer) lexer extra-commands)))) + (let ((grammar-info (make-grammar-info (preprocessor-state-name preprocessor-state) grammar lexer))) + (setf (preprocessor-state-kind preprocessor-state) nil) + (setf (preprocessor-state-kind2 preprocessor-state) nil) + (setf (preprocessor-state-name preprocessor-state) nil) + (setf (preprocessor-state-parametrization preprocessor-state) nil) + (setf (preprocessor-state-start-symbol preprocessor-state) nil) + (setf (preprocessor-state-grammar-source-reverse preprocessor-state) nil) + (setf (preprocessor-state-charclasses-source preprocessor-state) nil) + (setf (preprocessor-state-lexer-actions-source preprocessor-state) nil) + (push grammar-info (preprocessor-state-grammar-infos-reverse preprocessor-state)) + (append extra-commands (list '(clear-grammar))))))))) + + +; source is a list of preprocessor directives and commands. Preprocess these commands +; and return the following results: +; a list of preprocessed commands; +; a list of grammar-infos extracted from preprocessor directives. +(defun preprocess-source (world source) + (let ((preprocessor-state (make-preprocessor-state))) + (labels + ((preprocess-one (form) + (when (consp form) + (let ((first (car form))) + (when (identifier? first) + (let* ((symbol (world-intern world first)) + (action (symbol-preprocessor-function symbol))) + (when action + (handler-bind ((error #'(lambda (condition) + (declare (ignore condition)) + (format *error-output* "~&~@<~2IWhile preprocessing: ~_~:W~:>~%" form)))) + (multiple-value-bind (preprocessed-form re-preprocess) (apply action preprocessor-state form) + (return-from preprocess-one + (if re-preprocess + (mapcan #'preprocess-one preprocessed-form) + preprocessed-form))))))))) + (list form))) + + (let* ((commands (mapcan #'preprocess-one source)) + (commands (nconc commands (preprocessor-state-finish-grammar preprocessor-state)))) + (values commands (nreverse (preprocessor-state-grammar-infos-reverse preprocessor-state))))))) + + +; Create a new world with the given name and preprocess and evaluate the given +; source commands in it. +(defun generate-world (name source) + (let ((world (init-world name))) + (multiple-value-bind (commands grammar-infos) (preprocess-source world source) + (dolist (grammar-info grammar-infos) + (clear-actions (grammar-info-grammar grammar-info))) + (setf (world-grammar-infos world) grammar-infos) + (eval-commands world commands) + world))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; PREPROCESSOR ACTIONS + + +; (define ) +; ==> +; (define nil) +; +; (define ( ( ) ... ( )) ) +; ==> +; (define (-> ( ... ) ) +; (lambda (( ) ... ( )) ) +; t) +(defun preprocess-define (preprocessor-state command name type value) + (declare (ignore preprocessor-state)) + (values (list + (if (consp name) + (let ((name (first name)) + (bindings (rest name))) + (list command + name + (list '-> (mapcar #'second bindings) type) + (list 'lambda bindings value) + t)) + (list command name type value nil))) + nil)) + + +; (action ) +; ==> +; (action nil) +; +; (action ( ( ) ... ( )) ) +; ==> +; (action (lambda (( ) ... ( )) ) t) +(defun preprocess-action (preprocessor-state command action-name production-name body) + (declare (ignore preprocessor-state)) + (values (list + (if (consp action-name) + (let ((action-name (first action-name)) + (bindings (rest action-name))) + (list command + action-name + production-name + (list 'lambda bindings body) + t)) + (list command action-name production-name body nil))) + nil)) + + +(defun preprocess-grammar-or-lexer (preprocessor-state kind kind2 name start-symbol) + (assert-type name identifier) + (let ((commands (preprocessor-state-finish-grammar preprocessor-state))) + (when (find name (preprocessor-state-grammar-infos-reverse preprocessor-state) :key #'grammar-info-name) + (error "Duplicate grammar ~S" name)) + (setf (preprocessor-state-kind preprocessor-state) kind) + (setf (preprocessor-state-kind2 preprocessor-state) kind2) + (setf (preprocessor-state-name preprocessor-state) name) + (setf (preprocessor-state-parametrization preprocessor-state) (make-grammar-parametrization)) + (setf (preprocessor-state-start-symbol preprocessor-state) start-symbol) + (values + (nconc commands (list (list 'set-grammar name))) + nil))) + + +; (grammar ) +; ==> +; grammar: +; Begin accumulating a grammar with the given name and start symbol; +; commands: +; (set-grammar ) +(defun preprocess-grammar (preprocessor-state command name kind2 start-symbol) + (declare (ignore command)) + (preprocess-grammar-or-lexer preprocessor-state :grammar kind2 name start-symbol)) + + +; (lexer ) +; ==> +; grammar: +; Begin accumulating a lexer with the given name, start symbol, charclasses, and lexer actions; +; commands: +; (set-grammar ) +(defun preprocess-lexer (preprocessor-state command name kind2 start-symbol charclasses-source lexer-actions-source) + (declare (ignore command)) + (multiple-value-prog1 + (preprocess-grammar-or-lexer preprocessor-state :lexer kind2 name start-symbol) + (setf (preprocessor-state-charclasses-source preprocessor-state) charclasses-source) + (setf (preprocessor-state-lexer-actions-source preprocessor-state) lexer-actions-source))) + + +; (grammar-argument ... ) +; ==> +; grammar parametrization: +; ( ... ) +; commands: +; (grammar-argument ... ) +(defun preprocess-grammar-argument (preprocessor-state command argument &rest attributes) + (preprocess-ensure-grammar preprocessor-state) + (grammar-parametrization-declare-argument (preprocessor-state-parametrization preprocessor-state) argument attributes) + (values (list (list* command argument attributes)) + nil)) + + +; (production ( ) ... ( )) +; ==> +; grammar: +; ( ); +; commands: +; (%rule ) +; (action ) +; ... +; (action ) +(defun preprocess-production (preprocessor-state command lhs rhs name &rest actions) + (declare (ignore command)) + (assert-type actions (list (tuple t t))) + (preprocess-ensure-grammar preprocessor-state) + (push (list lhs rhs name) (preprocessor-state-grammar-source-reverse preprocessor-state)) + (values + (cons (list '%rule lhs) + (mapcar #'(lambda (action) + (list 'action (first action) name (second action))) + actions)) + t)) + diff --git a/mozilla/js2/semantics/CalculusMarkup.lisp b/mozilla/js2/semantics/CalculusMarkup.lisp new file mode 100644 index 00000000000..9c64f292ac3 --- /dev/null +++ b/mozilla/js2/semantics/CalculusMarkup.lisp @@ -0,0 +1,998 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; ECMAScript semantic calculus markup emitters +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; ------------------------------------------------------------------------------------------------------ +;;; SEMANTIC DEPICTION UTILITIES + +(defparameter *semantic-keywords* + '(not and or is type oneof tuple action lambda if then else in new case of end let letexc)) + +; Emit markup for one of the semantic keywords, as specified by keyword-symbol. +(defun depict-semantic-keyword (markup-stream keyword-symbol) + (assert-true (find keyword-symbol *semantic-keywords* :test #'eq)) + (depict-char-style (markup-stream :semantic-keyword) + (depict markup-stream (string-downcase (symbol-name keyword-symbol))))) + + +; If test is true, depict an opening parenthesis, evaluate body, and depict a closing +; parentheses. Otherwise, just evaluate body. +; Return the result value of body. +(defmacro depict-optional-parentheses ((markup-stream test) &body body) + (let ((temp (gensym "PAREN"))) + `(let ((,temp ,test)) + (when ,temp + (depict ,markup-stream "(")) + (prog1 + (progn ,@body) + (when ,temp + (depict ,markup-stream ")")))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; DEPICT-ENV + +; A depict-env holds state that helps in depicting a grammar or lexer. +(defstruct depict-env + (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 + (mode nil :type (member nil :syntax :semantics)) ;Current heading (:syntax or :semantics) or nil if none + (pending-actions-reverse nil :type list)) ;Reverse-order list of closures of actions pending for a %print-actions + + +(defun checked-depict-env-grammar-info (depict-env) + (or (depict-env-grammar-info depict-env) + (error "Grammar needed"))) + + +(defvar *visible-modes* t) + +; Set the mode to the given mode, emitting a heading if necessary. +(defun depict-mode (markup-stream depict-env mode) + (unless (eq mode (depict-env-mode depict-env)) + (when *visible-modes* + (ecase mode + (:syntax (depict-paragraph (markup-stream ':grammar-header) + (depict markup-stream "Syntax"))) + (:semantics (depict-paragraph (markup-stream ':grammar-header) + (depict markup-stream "Semantics"))) + ((nil)))) + (setf (depict-env-mode depict-env) mode))) + + +; Emit markup paragraphs for a command. +(defun depict-command (markup-stream world depict-env command) + (handler-bind ((error #'(lambda (condition) + (declare (ignore condition)) + (format *error-output* "~&While depicting: ~:W~%" command)))) + (let ((depictor (and (consp command) + (identifier? (first command)) + (get (world-intern world (first command)) :depict-command)))) + (if depictor + (apply depictor markup-stream world depict-env (rest command)) + (error "Bad command: ~S" command))))) + + +; Emit markup paragraphs for the world's commands. +(defun depict-world-commands (markup-stream world) + (let ((depict-env (make-depict-env))) + (dolist (command (world-commands-source world)) + (depict-command markup-stream world depict-env command)) + (depict-clear-grammar markup-stream world depict-env))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; DEPICTING TYPES + +(defconstant *type-level-min* 0) +(defconstant *type-level-suffix* 1) +(defconstant *type-level-function* 2) +(defconstant *type-level-max* 2) +;;; +;;; The level argument indicates what kinds of component types may be represented without being placed +;;; in parentheses. +;;; level kinds +;;; 0 id, oneof, tuple, (type) +;;; 1 id, oneof, tuple, (type), type[], type^ +;;; 2 id, oneof, tuple, (type), type[], type^, type x type -> type + + +; Emit markup for the name of a type, which must be a symbol. +(defun depict-type-name (markup-stream type-name) + (depict-char-style (markup-stream :type-name) + (depict markup-stream (symbol-upper-mixed-case-name type-name)))) + + +; Emit markup for the name of a tuple or oneof field, which must be a symbol. +(defun depict-field-name (markup-stream field-name) + (depict-char-style (markup-stream :field-name) + (depict markup-stream (symbol-lower-mixed-case-name field-name)))) + + +; If level < threshold, depict an opening parenthesis, evaluate body, and depict a closing +; parentheses. Otherwise, just evaluate body. +; Return the result value of body. +(defmacro depict-type-parentheses ((markup-stream level threshold) &body body) + `(depict-optional-parentheses (,markup-stream (< ,level ,threshold)) + ,@body)) + + +; Emit markup for the given type expression. level is non-nil if this is a recursive +; call to depict-type-expr for which the markup-stream's style is :type-expression. +; In this case level indicates the binding level imposed by the enclosing type expression. +(defun depict-type-expr (markup-stream world type-expr &optional level) + (cond + ((identifier? type-expr) + (depict-type-name markup-stream type-expr)) + ((type? type-expr) + (let ((type-str (print-type-to-string type-expr))) + (warn "Depicting raw type ~A" type-str) + (depict markup-stream "<<<" type-str ">>>"))) + (t (let ((depictor (get (world-intern world (first type-expr)) :depict-type-constructor))) + (if level + (apply depictor markup-stream world level (rest type-expr)) + (depict-char-style (markup-stream :type-expression) + (apply depictor markup-stream world *type-level-max* (rest type-expr)))))))) + + +; (-> ( ... ) ) +; Level 2 +; "@1 x ... x @1 -> @1" +(defun depict--> (markup-stream world level arg-type-exprs result-type-expr) + (depict-type-parentheses (markup-stream level *type-level-function*) + (depict-list markup-stream + #'(lambda (markup-stream arg-type-expr) + (depict-type-expr markup-stream world arg-type-expr *type-level-suffix*)) + arg-type-exprs + :separator '(" " :cartesian-product-10 " ") + :empty "()") + (depict markup-stream " " :function-arrow-10 " ") + (depict-type-expr markup-stream world result-type-expr *type-level-suffix*))) + + +; (vector ) +; Level 1 +; "@1[]" +(defun depict-vector (markup-stream world level element-type-expr) + (depict-type-parentheses (markup-stream level *type-level-suffix*) + (depict-type-expr markup-stream world element-type-expr *type-level-suffix*) + (depict markup-stream "[]"))) + + +; (address ) +; Level 1 +; "@1^" +(defun depict-address (markup-stream world level element-type-expr) + (depict-type-parentheses (markup-stream level *type-level-suffix*) + (depict-type-expr markup-stream world element-type-expr *type-level-suffix*) + (depict markup-stream :up-arrow-10))) + + +(defun depict-tuple-or-oneof (markup-stream world keyword-symbol tag-pairs) + (depict-semantic-keyword markup-stream keyword-symbol) + (depict-list + markup-stream + #'(lambda (markup-stream tag-pair) + (if (identifier? tag-pair) + (depict-field-name markup-stream tag-pair) + (progn + (depict-field-name markup-stream (first tag-pair)) + (depict markup-stream ": ") + (depict-type-expr markup-stream world (second tag-pair) *type-level-function*)))) + tag-pairs + :indent 6 + :prefix " {" + :prefix-break 0 + :suffix "}" + :separator ";" + :break 1 + :empty nil)) + +; (oneof ( ) ... ( )) +; Level 0 +; "ONEOF{: @0; ...; :@0}" +(defun depict-oneof (markup-stream world level &rest tags-and-types) + (declare (ignore level)) + (depict-tuple-or-oneof markup-stream world 'oneof tags-and-types)) + +; (tuple ( ) ... ( )) +; Level 0 +; "TUPLE{: @0; ...; :@0}" +(defun depict-tuple (markup-stream world level &rest tags-and-types) + (declare (ignore level)) + (depict-tuple-or-oneof markup-stream world 'tuple tags-and-types)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; DEPICTING EXPRESSIONS + + +(defconstant *primitive-level-min* 0) +(defconstant *primitive-level-unary-suffix* 1) +(defconstant *primitive-level-unary-prefix* 2) +(defconstant *primitive-level-unary* 3) +(defconstant *primitive-level-multiplicative* 4) +(defconstant *primitive-level-additive* 5) +(defconstant *primitive-level-relational* 6) +(defconstant *primitive-level-logical* 7) +(defconstant *primitive-level-unparenthesized-new* 8) +(defconstant *primitive-level-expr* 9) +(defconstant *primitive-level-stmt* 10) +(defconstant *primitive-level-max* 10) +;;; +;;; The level argument indicates what kinds of subexpressions may be represented without being placed +;;; in parentheses (or on a separate line for the case of lambda and if/then/else). +;;; level kinds +;;; 0 id, constant, (e) +;;; 1 id, constant, (e), f(...), new(v), a[i] +;;; 2 id, constant, (e), -e, @ +;;; 3 id, constant, (e), f(...), new(v), a[i], -e, @ +;;; 4 id, constant, (e), f(...), new(v), a[i], -e, @, /, * +;;; 5 id, constant, (e), f(...), new(v), a[i], -e, @, /, *, +, - +;;; 6 id, constant, (e), f(...), new(v), a[i], -e, @, /, *, +, -, relationals +;;; 7 id, constant, (e), f(...), new(v), a[i], -e, @, /, *, +, -, relationals, logicals +;;; 8 id, constant, (e), f(...), new(v), a[i], -e, @, /, *, +, -, relationals, logicals, new v +;;; 9 id, constant, (e), f(...), new(v), a[i], -e, @, /, *, +, -, relationals, logicals, new v +;;; 10 id, constant, (e), f(...), new(v), a[i], -e, @, /, *, +, -, relationals, logicals, new v, :=, lambda, if/then/else + +; Return true if primitive-level1 is a superset of primitive-level2 +; in the partial order of primitive levels. +(defun primitive-level->= (primitive-level1 primitive-level2) + (and (>= primitive-level1 primitive-level2) + (or (/= primitive-level1 *primitive-level-unary-prefix*) + (/= primitive-level2 *primitive-level-unary-suffix*)))) + + +; If primitive-level is not a superset of threshold, depict an opening parenthesis, +; evaluate body, and depict a closing parentheses. Otherwise, just evaluate body. +; Return the result value of body. +(defmacro depict-expr-parentheses ((markup-stream primitive-level threshold) &body body) + `(depict-optional-parentheses (,markup-stream (not (primitive-level->= ,primitive-level ,threshold))) + ,@body)) + + +; Emit markup for the name of a global variable, which must be a symbol. +(defun depict-global-variable (markup-stream name) + (depict-char-style (markup-stream :global-variable) + (depict markup-stream (symbol-lower-mixed-case-name name)))) + + +; Emit markup for the name of a local variable, which must be a symbol. +(defun depict-local-variable (markup-stream name) + (depict-char-style (markup-stream :local-variable) + (depict markup-stream (symbol-lower-mixed-case-name name)))) + + +; Emit markup for the name of an action, which must be a symbol. +(defun depict-action-name (markup-stream action-name) + (depict-char-style (markup-stream :action-name) + (depict markup-stream (symbol-upper-mixed-case-name action-name)))) + + +; Emit markup for the value constant. +(defun depict-constant (markup-stream constant) + (cond + ((integerp constant) + (depict-integer markup-stream constant)) + ((floatp constant) + (depict markup-stream (format nil (if (= constant (floor constant 1)) "~,1F" "~F") constant))) + ((characterp constant) + (depict markup-stream ':left-single-quote) + (depict-char-style (markup-stream ':character-literal) + (depict-character markup-stream constant nil)) + (depict markup-stream ':right-single-quote)) + ((stringp constant) + (depict-string markup-stream constant)) + (t (error "Bad constant ~S" constant)))) + + +; Emit markup for the primitive when it is not called in a function call. +(defun depict-primitive (markup-stream primitive) + (unless (eq (primitive-appearance primitive) ':global) + (error "Can't depict primitive ~S outside a call" primitive)) + (depict-item-or-group-list markup-stream (primitive-markup1 primitive))) + + +; Emit markup for the parameters to a function call. +(defun depict-call-parameters (markup-stream world annotated-parameters) + (depict-list markup-stream + #'(lambda (markup-stream parameter) + (depict-annotated-value-expr markup-stream world parameter)) + annotated-parameters + :indent 4 + :prefix "(" + :prefix-break 0 + :suffix ")" + :separator "," + :break 1 + :empty nil)) + + +; Emit markup for the function or primitive call. level indicates the binding level imposed +; by the enclosing expression. +(defun depict-call (markup-stream world level annotated-function-expr &rest annotated-arg-exprs) + (if (eq (first annotated-function-expr) 'expr-annotation:primitive) + (let ((primitive (symbol-primitive (second annotated-function-expr)))) + (depict-expr-parentheses (markup-stream level (primitive-level primitive)) + (ecase (primitive-appearance primitive) + (:global + (depict-primitive markup-stream primitive) + (depict-call-parameters markup-stream world annotated-arg-exprs)) + (:infix + (assert-true (= (length annotated-arg-exprs) 2)) + (depict-logical-block (markup-stream 0) + (depict-annotated-value-expr markup-stream world (first annotated-arg-exprs) (primitive-level1 primitive)) + (let ((spaces (primitive-markup2 primitive))) + (when spaces + (depict-space markup-stream)) + (depict-item-or-group-list markup-stream (primitive-markup1 primitive)) + (depict-break markup-stream (if spaces 1 0))) + (depict-annotated-value-expr markup-stream world (second annotated-arg-exprs) (primitive-level2 primitive)))) + (:unary + (assert-true (= (length annotated-arg-exprs) 1)) + (depict-item-or-group-list markup-stream (primitive-markup1 primitive)) + (depict-annotated-value-expr markup-stream world (first annotated-arg-exprs) (primitive-level1 primitive)) + (depict-item-or-group-list markup-stream (primitive-markup2 primitive))) + (:phantom + (assert-true (= (length annotated-arg-exprs) 1)) + (depict-annotated-value-expr markup-stream world (first annotated-arg-exprs) level))))) + (depict-expr-parentheses (markup-stream level *primitive-level-unary-suffix*) + (depict-annotated-value-expr markup-stream world annotated-function-expr *primitive-level-unary-suffix*) + (depict-call-parameters markup-stream world annotated-arg-exprs)))) + + +; Emit markup for the reference to the action on the given general grammar symbol. +(defun depict-action-reference (markup-stream action-name general-grammar-symbol &optional index) + (depict-action-name markup-stream action-name) + (depict markup-stream :action-begin) + (depict-general-grammar-symbol markup-stream general-grammar-symbol index) + (depict markup-stream :action-end)) + + +; Emit markup for the given annotated value expression. level indicates the binding level imposed +; by the enclosing expression. +(defun depict-annotated-value-expr (markup-stream world annotated-expr &optional (level *primitive-level-expr*)) + (let ((annotation (first annotated-expr)) + (args (rest annotated-expr))) + (ecase annotation + (expr-annotation:constant (depict-constant markup-stream (first args))) + (expr-annotation:primitive (depict-primitive markup-stream (symbol-primitive (first args)))) + (expr-annotation:local (depict-local-variable markup-stream (first args))) + (expr-annotation:global (depict-global-variable markup-stream (first args))) + (expr-annotation:call (apply #'depict-call markup-stream world level args)) + (expr-annotation:action (apply #'depict-action-reference markup-stream args)) + (expr-annotation:special-form + (apply (get (first args) :depict-special-form) markup-stream world level (rest args))) + (expr-annotation:macro + (let ((depictor (get (first args) :depict-macro))) + (if depictor + (apply depictor markup-stream world level (rest args)) + (depict-annotated-value-expr markup-stream world (second args) level))))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; DEPICTING SPECIAL FORMS + +(defmacro depict-statement ((markup-stream keyword &optional (space t)) &body body) + `(depict-logical-block (,markup-stream 0) + (when (< level *primitive-level-stmt*) + (depict-break ,markup-stream)) + (depict-expr-parentheses (,markup-stream level *primitive-level-stmt*) + (depict-semantic-keyword ,markup-stream ,keyword) + ,@(and space `((depict-space ,markup-stream))) + ,@body))) + + +; (bottom ) +(defun depict-bottom (markup-stream world level type-expr) + (declare (ignore world level type-expr)) + (depict markup-stream ':bottom-10)) + + +(defun depict-lambda-bindings (markup-stream world arg-binding-exprs) + (depict-list markup-stream + #'(lambda (markup-stream arg-binding) + (depict-local-variable markup-stream (first arg-binding)) + (depict markup-stream ": ") + (depict-type-expr markup-stream world (second arg-binding))) + arg-binding-exprs + :prefix "(" + :suffix ")" + :separator ", " + :empty nil)) + +; (lambda (( [:unused]) ... ( [:unused])) ) +(defun depict-lambda (markup-stream world level arg-binding-exprs body-annotated-expr) + (depict-statement (markup-stream 'lambda nil) + (depict-lambda-bindings markup-stream world arg-binding-exprs) + (depict-logical-block (markup-stream 4) + (depict-break markup-stream) + (depict-annotated-value-expr markup-stream world body-annotated-expr *primitive-level-stmt*)))) + + +; (if ) +(defun depict-if (markup-stream world level condition-annotated-expr true-annotated-expr false-annotated-expr) + (depict-statement (markup-stream 'if) + (depict-logical-block (markup-stream 4) + (depict-annotated-value-expr markup-stream world condition-annotated-expr)) + (depict-break markup-stream) + (depict-semantic-keyword markup-stream 'then) + (depict-space markup-stream) + (depict-logical-block (markup-stream 7) + (depict-annotated-value-expr markup-stream world true-annotated-expr *primitive-level-stmt*)) + (depict-break markup-stream) + (depict-semantic-keyword markup-stream 'else) + (depict-space markup-stream) + (depict-logical-block (markup-stream (if (special-form-annotated-expr? 'if false-annotated-expr) nil 6)) + (depict-annotated-value-expr markup-stream world false-annotated-expr *primitive-level-stmt*)))) + + +;;; Vectors + +; (vector ... ) +(defun depict-vector-form (markup-stream world level &rest element-annotated-exprs) + (declare (ignore level)) + (depict-list markup-stream + #'(lambda (markup-stream element-annotated-expr) + (depict-annotated-value-expr markup-stream world element-annotated-expr)) + element-annotated-exprs + :indent 1 + :prefix ':vector-begin + :suffix ':vector-end + :separator "," + :break 1)) + + +(defun depict-subscript-type-expr (markup-stream world type-expr) + (depict-char-style (markup-stream 'sub) + (depict-type-expr markup-stream world type-expr))) + + +; (vector-of ) +(defun depict-vector-of (markup-stream world level element-type-expr) + (declare (ignore level)) + (depict markup-stream ':empty-vector) + (depict-subscript-type-expr markup-stream world element-type-expr)) + + +(defun depict-special-function (markup-stream world name-str &rest arg-annotated-exprs) + (depict-char-style (markup-stream :global-variable) + (depict markup-stream name-str)) + (depict-call-parameters markup-stream world arg-annotated-exprs)) + + +; (empty ) +(defun depict-empty (markup-stream world level vector-annotated-expr) + (declare (ignore level)) + (depict-special-function markup-stream world "empty" vector-annotated-expr)) + + +; (length ) +(defun depict-length (markup-stream world level vector-annotated-expr) + (declare (ignore level)) + (depict-special-function markup-stream world "length" vector-annotated-expr)) + + +; (first ) +(defun depict-first (markup-stream world level vector-annotated-expr) + (declare (ignore level)) + (depict-special-function markup-stream world "first" vector-annotated-expr)) + + +; (last ) +(defun depict-last (markup-stream world level vector-annotated-expr) + (declare (ignore level)) + (depict-special-function markup-stream world "last" vector-annotated-expr)) + + +; (rest ) +(defun depict-rest (markup-stream world level vector-annotated-expr) + (declare (ignore level)) + (depict-special-function markup-stream world "rest" vector-annotated-expr)) + + +; (butlast ) +(defun depict-butlast (markup-stream world level vector-annotated-expr) + (declare (ignore level)) + (depict-special-function markup-stream world "butLast" vector-annotated-expr)) + + +; (nth ) +(defun depict-nth (markup-stream world level vector-annotated-expr n-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-unary-suffix*) + (depict-annotated-value-expr markup-stream world vector-annotated-expr *primitive-level-unary-suffix*) + (depict markup-stream "[") + (depict-annotated-value-expr markup-stream world n-annotated-expr) + (depict markup-stream "]"))) + + +; (append ) +(defun depict-append (markup-stream world level vector1-annotated-expr vector2-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-additive*) + (depict-logical-block (markup-stream 0) + (depict-annotated-value-expr markup-stream world vector1-annotated-expr *primitive-level-additive*) + (depict markup-stream " " :vector-append) + (depict-break markup-stream 1) + (depict-annotated-value-expr markup-stream world vector2-annotated-expr *primitive-level-additive*)))) + + +;;; Oneofs + +; (oneof ) +(defun depict-oneof-form (markup-stream world level tag &optional value-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-unary-prefix*) + (depict-field-name markup-stream tag) + (when value-annotated-expr + (depict-logical-block (markup-stream 4) + (depict-break markup-stream 1) + (depict-annotated-value-expr markup-stream world value-annotated-expr *primitive-level-unary*))))) + + +; (typed-oneof ) +(defun depict-typed-oneof (markup-stream world level type-expr tag &optional value-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-unary-prefix*) + (depict-field-name markup-stream tag) + (depict-subscript-type-expr markup-stream world type-expr) + (when value-annotated-expr + (depict-logical-block (markup-stream 4) + (depict-break markup-stream 1) + (depict-annotated-value-expr markup-stream world value-annotated-expr *primitive-level-unary*))))) + + +; (case ( ) ( ) ... ( )) +; where each is either (( ... ) nil nil) or (() ) +(defun depict-case (markup-stream world level oneof-annotated-expr &rest annotated-cases) + (depict-statement (markup-stream 'case) + (depict-logical-block (markup-stream 6) + (depict-annotated-value-expr markup-stream world oneof-annotated-expr)) + (depict-space markup-stream) + (depict-semantic-keyword markup-stream 'of) + (depict-logical-block (markup-stream 3) + (mapl #'(lambda (annotated-cases) + (let* ((annotated-case (first annotated-cases)) + (tag-spec (first annotated-case)) + (tags (first tag-spec)) + (var (second tag-spec)) + (value-annotated-expr (second annotated-case))) + (depict-break markup-stream) + (depict-logical-block (markup-stream 6) + (depict-list markup-stream + #'depict-field-name + tags + :indent 0 + :separator "," + :break 1) + (when var + (depict markup-stream "(") + (depict-local-variable markup-stream var) + (depict markup-stream ": ") + (depict-type-expr markup-stream world (third tag-spec)) + (depict markup-stream ")")) + (depict markup-stream ":") + (depict-break markup-stream 1) + (depict-annotated-value-expr markup-stream world value-annotated-expr *primitive-level-stmt*) + (when (cdr annotated-cases) + (depict markup-stream ";"))))) + annotated-cases) + (depict-break markup-stream) + (depict-semantic-keyword markup-stream 'end)))) + + +; (select ) +; (& ) +(defun depict-select-or-& (markup-stream world level tag annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-unary-suffix*) + (depict-annotated-value-expr markup-stream world annotated-expr *primitive-level-unary-suffix*) + (depict markup-stream ".") + (depict-field-name markup-stream tag))) + + +; (is ) +(defun depict-is (markup-stream world level tag oneof-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-relational*) + (depict-annotated-value-expr markup-stream world oneof-annotated-expr *primitive-level-unary-suffix*) + (depict-space markup-stream) + (depict-semantic-keyword markup-stream 'is) + (depict-space markup-stream) + (depict-field-name markup-stream tag))) + + +;;; Tuples + +; (tuple ... ) +(defun depict-tuple-form (markup-stream world level type-expr &rest annotated-exprs) + (declare (ignore level)) + (depict-list markup-stream + #'(lambda (markup-stream parameter) + (depict-annotated-value-expr markup-stream world parameter)) + annotated-exprs + :indent 4 + :prefix ':tuple-begin + :prefix-break 0 + :suffix ':tuple-end + :separator "," + :break 1 + :empty nil) + (depict-subscript-type-expr markup-stream world type-expr)) + + +;;; Addresses + +; (new ) +(defun depict-new (markup-stream world level value-annotated-expr) + (depict-logical-block (markup-stream 5) + (depict-semantic-keyword markup-stream 'new) + (depict-space markup-stream) + (depict-expr-parentheses (markup-stream level *primitive-level-unparenthesized-new*) + (depict-annotated-value-expr markup-stream world value-annotated-expr + (if (< level *primitive-level-unparenthesized-new*) + *primitive-level-expr* + *primitive-level-unary-prefix*))))) + + +; (@ ) +(defun depict-@ (markup-stream world level address-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-unary-prefix*) + (depict-logical-block (markup-stream 2) + (depict markup-stream "@") + (depict-annotated-value-expr markup-stream world address-annotated-expr *primitive-level-unary-prefix*)))) + + +; (@= ) +(defun depict-@= (markup-stream world level address-annotated-expr value-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-stmt*) + (depict-logical-block (markup-stream 0) + (depict markup-stream "@") + (depict-annotated-value-expr markup-stream world address-annotated-expr *primitive-level-unary-prefix*) + (depict markup-stream " :=") + (depict-logical-block (markup-stream 6) + (depict-break markup-stream 1) + (depict-annotated-value-expr markup-stream world value-annotated-expr *primitive-level-stmt*))))) + + +; (address-equal ) +(defun depict-address-equal (markup-stream world level address1-annotated-expr address2-annotated-expr) + (depict-expr-parentheses (markup-stream level *primitive-level-relational*) + (depict-logical-block (markup-stream 0) + (depict-annotated-value-expr markup-stream world address1-annotated-expr *primitive-level-additive*) + (depict markup-stream " " :identical-10) + (depict-break markup-stream 1) + (depict-annotated-value-expr markup-stream world address2-annotated-expr *primitive-level-additive*)))) + + +;;; Macros + +(defun depict-let-binding (markup-stream world var type-expr value-annotated-expr) + (depict-logical-block (markup-stream 4) + (depict-local-variable markup-stream var) + (depict markup-stream ": ") + (depict-type-expr markup-stream world type-expr) + (depict-break markup-stream 1) + (depict-logical-block (markup-stream 3) + (depict markup-stream "= ") + (depict-annotated-value-expr markup-stream world value-annotated-expr *primitive-level-stmt*)))) + + +(defun depict-let-body (markup-stream world body-annotated-expr) + (depict-break markup-stream) + (depict-semantic-keyword markup-stream 'in) + (depict-space markup-stream) + (depict-logical-block (markup-stream (if (or (macro-annotated-expr? 'let body-annotated-expr) + (macro-annotated-expr? 'letexc body-annotated-expr)) + nil + 4)) + (depict-annotated-value-expr markup-stream world body-annotated-expr *primitive-level-stmt*))) + + +; (let (( [:unused]) ... ( [:unused])) ) ==> +; ((lambda (( [:unused]) ... ( [:unused])) ) ... ) +(defun depict-let (markup-stream world level annotated-expansion) + (assert-true (eq (first annotated-expansion) 'expr-annotation:call)) + (let ((lambda-annotated-expr (second annotated-expansion)) + (arg-annotated-exprs (cddr annotated-expansion))) + (assert-true (special-form-annotated-expr? 'lambda lambda-annotated-expr)) + (let ((arg-binding-exprs (third lambda-annotated-expr)) + (body-annotated-expr (fourth lambda-annotated-expr))) + (depict-statement (markup-stream 'let) + (depict-list markup-stream + #'(lambda (markup-stream arg-binding) + (depict-let-binding markup-stream world (first arg-binding) (second arg-binding) (pop arg-annotated-exprs))) + arg-binding-exprs + :indent 4 + :separator ";" + :break t + :empty nil) + (depict-let-body markup-stream world body-annotated-expr))))) + + +; (letexc ( [:unused]) ) ==> +; (case +; ((abrupt x exception) (typed-oneof abrupt x)) +; ((normal [:unused]) ))) +(defun depict-letexc (markup-stream world level annotated-expansion) + (assert-true (special-form-annotated-expr? 'case annotated-expansion)) + (let* ((expr-annotated-expr (third annotated-expansion)) + (abrupt-binding (fourth annotated-expansion)) + (abrupt-tag-spec (first abrupt-binding)) + (normal-binding (fifth annotated-expansion)) + (normal-tag-spec (first normal-binding))) + (assert-true (equal (first abrupt-tag-spec) '(abrupt))) + (assert-true (equal (first normal-tag-spec) '(normal))) + (let* ((var (second normal-tag-spec)) + (type-expr (third normal-tag-spec)) + (body-annotated-expr (second normal-binding))) + (depict-statement (markup-stream 'letexc) + (depict-logical-block (markup-stream 9) + (depict-let-binding markup-stream world var type-expr expr-annotated-expr)) + (depict-let-body markup-stream world body-annotated-expr))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; DEPICTING COMMANDS + + +(defmacro depict-semantics ((markup-stream depict-env &optional (paragraph-style ':semantics)) &body body) + `(progn + (depict-mode ,markup-stream ,depict-env :semantics) + (depict-paragraph (,markup-stream ,paragraph-style) + ,@body))) + + +; (%section "section-name") +(defun depict-%section (markup-stream world depict-env section-name) + (declare (ignore world)) + (assert-type section-name string) + (depict-mode markup-stream depict-env nil) + (depict-paragraph (markup-stream :section-heading) + (depict markup-stream section-name))) + + +; (%subsection "subsection-name") +(defun depict-%subsection (markup-stream world depict-env section-name) + (declare (ignore world)) + (assert-type section-name string) + (depict-mode markup-stream depict-env nil) + (depict-paragraph (markup-stream :subsection-heading) + (depict markup-stream section-name))) + + +; (grammar-argument ... ) +(defun depict-grammar-argument (markup-stream world depict-env argument &rest attributes) + (declare (ignore world)) + (depict-mode markup-stream depict-env :syntax) + (depict-paragraph (markup-stream :grammar-argument) + (depict-nonterminal-argument markup-stream argument) + (depict markup-stream " " :member-10 " ") + (depict-list markup-stream + #'(lambda (markup-stream attribute) + (depict-nonterminal-attribute markup-stream attribute)) + attributes + :prefix "{" + :suffix "}" + :separator ", "))) + + +; (%rule ) +(defun depict-%rule (markup-stream world depict-env general-nonterminal-source) + (declare (ignore world)) + (let* ((grammar-info (checked-depict-env-grammar-info depict-env)) + (grammar (grammar-info-grammar grammar-info)) + (general-nonterminal (grammar-parametrization-intern grammar general-nonterminal-source)) + (seen-nonterminals (depict-env-seen-nonterminals depict-env))) + (when (grammar-info-charclass grammar-info general-nonterminal) + (error "Shouldn't use %rule on a lexer charclass nonterminal ~S" general-nonterminal)) + (labels + ((seen-nonterminal? (nonterminal) + (gethash nonterminal seen-nonterminals))) + (unless (every #'seen-nonterminal? (general-grammar-symbol-instances grammar general-nonterminal)) + (depict-mode markup-stream depict-env :syntax) + (dolist (general-rule (grammar-general-rules grammar general-nonterminal)) + (let ((rule-lhs-nonterminals (general-grammar-symbol-instances grammar (general-rule-lhs general-rule)))) + (unless (every #'seen-nonterminal? rule-lhs-nonterminals) + (when (some #'seen-nonterminal? rule-lhs-nonterminals) + (warn "General rule for ~S listed before specific ones; use %rule to disambiguate" general-nonterminal)) + (depict-general-rule markup-stream general-rule) + (dolist (nonterminal rule-lhs-nonterminals) + (setf (gethash nonterminal seen-nonterminals) t))))))))) +;******** May still have a problem when a specific rule precedes a general one. + + +; (%charclass ) +(defun depict-%charclass (markup-stream world depict-env nonterminal) + (let* ((grammar-info (checked-depict-env-grammar-info depict-env)) + (charclass (grammar-info-charclass grammar-info nonterminal))) + (unless charclass + (error "%charclass with a non-charclass ~S" nonterminal)) + (if (gethash nonterminal (depict-env-seen-nonterminals depict-env)) + (warn "Duplicate charclass ~S" nonterminal) + (progn + (depict-mode markup-stream depict-env :syntax) + (depict-charclass markup-stream charclass) + (dolist (action-cons (charclass-actions charclass)) + (depict-charclass-action world depict-env (cdr action-cons) nonterminal)) + (setf (gethash nonterminal (depict-env-seen-nonterminals depict-env)) t))))) + + +; (%print-actions) +(defun depict-%print-actions (markup-stream world depict-env) + (declare (ignore world)) + (dolist (pending-action (nreverse (depict-env-pending-actions-reverse depict-env))) + (funcall pending-action markup-stream depict-env)) + (setf (depict-env-pending-actions-reverse depict-env) nil)) + + +; (deftype ) +(defun depict-deftype (markup-stream world depict-env name type-expr) + (depict-semantics (markup-stream depict-env) + (depict-logical-block (markup-stream 2) + (depict-semantic-keyword markup-stream 'type) + (depict-space markup-stream) + (depict-type-name markup-stream name) + (depict-break markup-stream 1) + (depict-logical-block (markup-stream 3) + (depict markup-stream "= ") + (depict-type-expr markup-stream world type-expr))))) + + +; (define ) +; is a flag that is true if this define was originally in the form +; (define ( ( ) ... ( )) ) +; and converted into +; (define (-> ( ... ) ) +; (lambda (( ) ... ( )) ) +; t) +(defun depict-define (markup-stream world depict-env name type-expr value-expr destructured) + (depict-semantics (markup-stream depict-env) + (depict-logical-block (markup-stream 2) + (depict-global-variable markup-stream name) + (flet + ((depict-type-and-value (markup-stream type-expr annotated-value-expr) + (depict-logical-block (markup-stream 0) + (depict-break markup-stream 1) + (depict markup-stream ": ") + (depict-type-expr markup-stream world type-expr)) + (depict-break markup-stream 1) + (depict-logical-block (markup-stream 3) + (depict markup-stream "= ") + (depict-annotated-value-expr markup-stream world annotated-value-expr *primitive-level-max*)))) + + (let ((annotated-value-expr (nth-value 2 (scan-value world *null-type-env* value-expr)))) + (if destructured + (progn + (assert-true (eq (first type-expr) '->)) + (assert-true (special-form-annotated-expr? 'lambda annotated-value-expr)) + (depict-lambda-bindings markup-stream world (third annotated-value-expr)) + (depict-type-and-value markup-stream (third type-expr) (fourth annotated-value-expr))) + (depict-type-and-value markup-stream type-expr annotated-value-expr))))))) + + +; (set-grammar ) +(defun depict-set-grammar (markup-stream world depict-env name) + (depict-clear-grammar markup-stream world depict-env) + (let ((grammar-info (world-grammar-info world name))) + (unless grammar-info + (error "Unknown grammar ~A" name)) + (setf (depict-env-grammar-info depict-env) grammar-info) + (setf (depict-env-seen-nonterminals depict-env) (make-hash-table :test #'eq)))) + + +; (clear-grammar) +(defun depict-clear-grammar (markup-stream world depict-env) + (depict-%print-actions markup-stream world depict-env) + (depict-mode markup-stream depict-env nil) + (let ((grammar-info (depict-env-grammar-info depict-env))) + (when grammar-info + (let ((seen-nonterminals (depict-env-seen-nonterminals depict-env)) + (missed-nonterminals nil)) + (dolist (nonterminal (grammar-nonterminals-list (grammar-info-grammar grammar-info))) + (unless (or (gethash nonterminal seen-nonterminals) + (eq nonterminal *start-nonterminal*)) + (push nonterminal missed-nonterminals))) + (when missed-nonterminals + (warn "Nonterminals not printed: ~S" missed-nonterminals))) + (setf (depict-env-grammar-info depict-env) nil) + (setf (depict-env-seen-nonterminals depict-env) nil)))) + + +(defmacro depict-delayed-action ((markup-stream depict-env) &body depictor) + `(push #'(lambda (,markup-stream ,depict-env) ,@depictor) + (depict-env-pending-actions-reverse ,depict-env))) + + +(defun depict-declare-action-contents (markup-stream world action-name general-grammar-symbol type-expr) + (depict-semantic-keyword markup-stream 'action) + (depict-space markup-stream) + (depict-action-name markup-stream action-name) + (depict markup-stream :action-begin) + (depict-general-grammar-symbol markup-stream general-grammar-symbol) + (depict markup-stream :action-end) + (depict-break markup-stream 1) + (depict-logical-block (markup-stream 2) + (depict markup-stream ": ") + (depict-type-expr markup-stream world type-expr))) + + +; (declare-action ) +(defun depict-declare-action (markup-stream world depict-env action-name general-grammar-symbol-source type-expr) + (declare (ignore markup-stream)) + (let* ((grammar-info (checked-depict-env-grammar-info depict-env)) + (general-grammar-symbol (grammar-parametrization-intern (grammar-info-grammar grammar-info) general-grammar-symbol-source))) + (unless (grammar-info-charclass-or-partition grammar-info general-grammar-symbol) + (depict-delayed-action (markup-stream depict-env) + (depict-semantics (markup-stream depict-env) + (depict-logical-block (markup-stream 4) + (depict-declare-action-contents markup-stream world action-name general-grammar-symbol type-expr))))))) + + +; Declare and define the lexer-action on the charclass given by nonterminal. +(defun depict-charclass-action (world depict-env lexer-action nonterminal) + (depict-delayed-action (markup-stream depict-env) + (depict-semantics (markup-stream depict-env) + (depict-logical-block (markup-stream 4) + (depict-declare-action-contents markup-stream world (lexer-action-name lexer-action) + nonterminal (lexer-action-type-expr lexer-action)) + (depict-break markup-stream 1) + (depict-logical-block (markup-stream 3) + (depict markup-stream "= ") + (depict-lexer-action markup-stream lexer-action nonterminal)))))) + + +; (action ) +; is a flag that is true if this define was originally in the form +; (action ( ( ) ... ( )) ) +; and converted into +; (action (lambda (( ) ... ( )) ) t) +(defun depict-action (markup-stream world depict-env action-name production-name body-expr destructured) + (declare (ignore markup-stream)) + (let* ((grammar-info (checked-depict-env-grammar-info depict-env)) + (grammar (grammar-info-grammar grammar-info)) + (general-production (grammar-general-production grammar production-name))) + (unless (grammar-info-charclass grammar-info (general-production-lhs general-production)) + (depict-delayed-action (markup-stream depict-env) + (depict-semantics (markup-stream depict-env :semantics-next) + (depict-logical-block (markup-stream 2) + (let* ((initial-env (general-production-action-env grammar general-production)) + (body-annotated-expr (nth-value 2 (scan-value world initial-env body-expr))) + (action-grammar-symbols (annotated-expr-grammar-symbols body-annotated-expr))) + (depict-action-name markup-stream action-name) + (depict markup-stream :action-begin) + (depict-general-production markup-stream general-production action-grammar-symbols) + (depict markup-stream :action-end) + (flet + ((depict-body (markup-stream body-annotated-expr) + (depict-break markup-stream 1) + (depict-logical-block (markup-stream 3) + (depict markup-stream "= ") + (depict-annotated-value-expr markup-stream world body-annotated-expr *primitive-level-stmt*)))) + + (if destructured + (progn + (assert-true (special-form-annotated-expr? 'lambda body-annotated-expr)) + (depict-logical-block (markup-stream 10) + (depict-break markup-stream 0) + (depict-lambda-bindings markup-stream world (third body-annotated-expr))) + (depict-body markup-stream (fourth body-annotated-expr))) + (depict-body markup-stream body-annotated-expr)))))))))) + + +; (terminal-action ) +(defun depict-terminal-action (markup-stream world depict-env action-name terminal function-name) + (declare (ignore markup-stream world depict-env action-name terminal function-name))) diff --git a/mozilla/js2/semantics/ECMA Grammar.html b/mozilla/js2/semantics/ECMA Grammar.html new file mode 100644 index 00000000000..4ea97edbcd3 --- /dev/null +++ b/mozilla/js2/semantics/ECMA Grammar.html @@ -0,0 +1,3059 @@ + + + +ECMA Grammar + + + + +

Types

+ +

Semantics

+ +

type Value
+  = oneof {
+           undefinedValue;
+           nullValue;
+           booleanValueBoolean;
+           doubleValueDouble;
+           stringValueString;
+           objectValueObject}

+ +

type ObjectOrNull = oneof {nullObjectOrNullobjectObjectOrNullObject}

+ +

type Object
+  = tuple {
+           propertiesProperty[]­;
+           typeofNameString;
+           prototypeObjectOrNull;
+           getPropName ® ValueOrException;
+           putPropName × Value ® VoidOrException;
+           deletePropName ® BooleanOrException;
+           callObjectOrNull × Value[] ® ReferenceOrException;
+           constructValue[] ® ObjectOrException;
+           defaultValueDefaultValueHint ® ValueOrException}

+ +

type DefaultValueHint = oneof {noHintnumberHintstringHint}

+ +

type Property
+  = tuple {
+           nameString;
+           readOnlyBoolean;
+           enumerableBoolean;
+           permanentBoolean;
+           valueValue­}

+ +

type PropName = String

+ +

type Place = tuple {baseObjectpropertyPropName}

+ +

type Reference
+  = oneof {valueReferenceValueplaceReferencePlacevirtualReferencePropName}

+ +

type IntegerOrException = oneof {normalIntegerabruptException}

+ +

type VoidOrException = oneof {normalabruptException}

+ +

type BooleanOrException = oneof {normalBooleanabruptException}

+ +

type DoubleOrException = oneof {normalDoubleabruptException}

+ +

type StringOrException = oneof {normalStringabruptException}

+ +

type ObjectOrException = oneof {normalObjectabruptException}

+ +

type ValueOrException = oneof {normalValueabruptException}

+ +

type ReferenceOrException = oneof {normalReferenceabruptException}

+ +

type ValueListOrException = oneof {normalValue[]; abruptException}

+ +

Helper Functions

+ +

Semantics

+ +

objectOrNullToValue(oObjectOrNull) : Value
+  = case o of
+        nullObjectOrNullnullValue;
+        objectObjectOrNull(objObject): objectValue obj
+        end

+ +

undefinedResult : ValueOrException = normal undefinedValue

+ +

nullResult : ValueOrException = normal nullValue

+ +

booleanResult(bBoolean) : ValueOrException = normal booleanValue b

+ +

doubleResult(dDouble) : ValueOrException = normal doubleValue d

+ +

integerResult(iInteger) : ValueOrException = doubleResult(rationalToDouble(i))

+ +

stringResult(sString) : ValueOrException = normal stringValue s

+ +

objectResult(oObject) : ValueOrException = normal objectValue o

+ +

Exceptions

+ +

Semantics

+ +

type Exception = oneof {exceptionValueerrorError}

+ +

type Error
+  = oneof {
+           coerceToPrimitiveError;
+           coerceToObjectError;
+           getValueError;
+           putValueError;
+           deleteError}

+ +

makeError(errError) : Exception = error err

+ +

Objects

+ +

Conversions

+ +

Semantics

+ +

referenceGetValue(rvReference) : ValueOrException
+  = case rv of
+        valueReference(vValue): normal v;
+        placeReference(rPlace): r.base.get(r.property);
+        virtualReferenceabruptValueOrException makeError(getValueError)
+        end

+ +

referencePutValue(rvReferencevValue) : VoidOrException
+  = case rv of
+        valueReferenceabruptVoidOrException makeError(putValueError);
+        placeReference(rPlace): r.base.put(r.propertyv);
+        virtualReference^
+        end

+ +

Coercions

+ +

Semantics

+ +

coerceToBoolean(vValue) : Boolean
+  = case v of
+        undefinedValuenullValuefalse;
+        booleanValue(bBoolean): b;
+        doubleValue(dDouble): not (doubleIsZero(dor doubleIsNan(d));
+        stringValue(sString): length(s) ≠ 0;
+        objectValuetrue
+        end

+ +

coerceBooleanToDouble(bBoolean) : Double
+  = if b
+     then 1.0
+     else 0.0

+ +

coerceToDouble(vValue) : DoubleOrException
+  = case v of
+        undefinedValuenormal NaN;
+        nullValuenormal 0.0;
+        booleanValue(bBoolean): normal coerceBooleanToDouble(b);
+        doubleValue(dDouble): normal d;
+        stringValue^;
+        objectValue^
+        end

+ +

coerceToUint32(vValue) : IntegerOrException
+  = letexc dDouble = coerceToDouble(v)
+     in normal doubleToUint32(d)

+ +

coerceToInt32(vValue) : IntegerOrException
+  = letexc dDouble = coerceToDouble(v)
+     in normal uint32ToInt32(doubleToUint32(d))

+ +

uint32ToInt32(uiInteger) : Integer
+  = if ui < 2147483648
+     then ui
+     else ui - 4294967296

+ +

coerceToString(vValue) : StringOrException
+  = case v of
+        undefinedValuenormal “undefined”;
+        nullValuenormal “null”;
+        booleanValue(bBoolean):
+              if b
+              then normal “true
+              else normal “false”;
+        doubleValue^;
+        stringValue(sString): normal s;
+        objectValue^
+        end

+ +

coerceToPrimitive(vValuehintDefaultValueHint) : ValueOrException
+  = case v of
+        undefinedValuenullValuebooleanValuedoubleValuestringValuenormal v;
+        objectValue(oObject):
+              letexc pvValue = o.defaultValue(hint)
+              in case pv of
+                     undefinedValuenullValuebooleanValuedoubleValuestringValue:
+                           normal pv;
+                     objectValueabruptValueOrException makeError(coerceToPrimitiveError)
+                     end
+        end

+ +

coerceToObject(vValue) : ObjectOrException
+  = case v of
+        undefinedValuenullValueabruptObjectOrException makeError(coerceToObjectError);
+        booleanValue^;
+        doubleValue^;
+        stringValue^;
+        objectValue(oObject): normal o
+        end

+ +

Environments

+ +

Semantics

+ +

type Env = tuple {thisObjectOrNull}

+ +

lookupIdentifier(eEnvidString) : ReferenceOrException = ^

+ +

Terminal Actions

+ +

Semantics

+ +

action EvalIdentifier[Identifier] : String

+ +

action EvalNumber[Number] : Double

+ +

action EvalString[String] : String

+ +

Primary Expressions

+ +

Syntax

+ +
+
PrimaryRvalue Þ
+
   this
+
|  null
+
|  true
+
|  false
+
|  Number
+
|  String
+
|  ( CommaExpressionnoLValue )
+
+
+
PrimaryLvalue Þ
+
   Identifier
+
|  ( Lvalue )
+
+

Semantics

+ +

action Eval[PrimaryRvalue] : Env ® ValueOrException

+ +

Eval[PrimaryRvalue Þ this](eEnv) = normal objectOrNullToValue(e.this)

+ +

Eval[PrimaryRvalue Þ null](eEnv) = nullResult

+ +

Eval[PrimaryRvalue Þ true](eEnv) = booleanResult(true)

+ +

Eval[PrimaryRvalue Þ false](eEnv) = booleanResult(false)

+ +

Eval[PrimaryRvalue Þ Number](eEnv) = doubleResult(EvalNumber[Number])

+ +

Eval[PrimaryRvalue Þ String](eEnv) = stringResult(EvalString[String])

+ +

Eval[PrimaryRvalue Þ ( CommaExpressionnoLValue )] = Eval[CommaExpressionnoLValue]

+ +

action Eval[PrimaryLvalue] : Env ® ReferenceOrException

+ +

Eval[PrimaryLvalue Þ Identifier](eEnv)
+  = lookupIdentifier(eEvalIdentifier[Identifier])

+ +

Eval[PrimaryLvalue Þ ( Lvalue )] = Eval[Lvalue]

+ +

Left-Side Expressions

+ +

Syntax

+ +
ExprKind Î {anyValuenoLValue}
+
MemberExprKind Î {callnoCall}
+
+
MemberLvaluenoCall Þ
+
   PrimaryLvalue
+
|  MemberExpressionnoCall,anyValue [ Expression ]
+
|  MemberExpressionnoCall,anyValue . Identifier
+
+
+
MemberLvaluecall Þ
+
   Lvalue Arguments
+
|  MemberExpressionnoCall,noLValue Arguments
+
|  MemberExpressioncall,anyValue [ Expression ]
+
|  MemberExpressioncall,anyValue . Identifier
+
+
+
MemberExpressionnoCall,noLValue Þ
+
   PrimaryRvalue
+
|  new MemberExpressionnoCall,anyValue Arguments
+
+
+
MemberExpressionnoCall,anyValue Þ
+
   PrimaryRvalue
+
|  MemberLvaluenoCall
+
|  new MemberExpressionnoCall,anyValue Arguments
+
+
+
MemberExpressioncall,anyValue Þ MemberLvaluecall
+
+
+
NewExpressionExprKind Þ
+
   MemberExpressionnoCall,ExprKind
+
|  new NewExpressionanyValue
+
+
+
Arguments Þ
+
   ( )
+
|  ( ArgumentList )
+
+
+
ArgumentList Þ
+
   AssignmentExpressionanyValue
+
|  ArgumentList , AssignmentExpressionanyValue
+
+
+
Lvalue Þ
+
   MemberLvaluecall
+
|  MemberLvaluenoCall
+
+

Semantics

+ +

action Eval[MemberLvalueMemberExprKind] : Env ® ReferenceOrException

+ +

Eval[MemberLvaluenoCall Þ PrimaryLvalue] = Eval[PrimaryLvalue]

+ +

Eval[MemberLvaluecall Þ Lvalue Arguments](eEnv)
+  = letexc functionReferenceReference = Eval[Lvalue](e)
+     in letexc functionValue = referenceGetValue(functionReference)
+     in letexc argumentsValue[] = Eval[Arguments](e)
+     in let thisObjectOrNull
+             = case functionReference of
+                   valueReferencevirtualReferencenullObjectOrNull;
+                   placeReference(pPlace): objectObjectOrNull p.base
+                   end
+     in callObject(functionthisarguments)

+ +

Eval[MemberLvaluecall Þ MemberExpressionnoCall,noLValue Arguments](eEnv)
+  = letexc functionValue = Eval[MemberExpressionnoCall,noLValue](e)
+     in letexc argumentsValue[] = Eval[Arguments](e)
+     in callObject(functionnullObjectOrNullarguments)

+ +

Eval[MemberLvalueMemberExprKind Þ MemberExpressionMemberExprKind,anyValue [ Expression ]]
+            (eEnv)
+  = letexc containerValue = Eval[MemberExpressionMemberExprKind,anyValue](e)
+     in letexc propertyValue = Eval[Expression](e)
+     in readProperty(containerproperty)

+ +

Eval[MemberLvalueMemberExprKind Þ MemberExpressionMemberExprKind,anyValue . Identifier]
+            (eEnv)
+  = letexc containerValue = Eval[MemberExpressionMemberExprKind,anyValue](e)
+     in readProperty(containerstringValue EvalIdentifier[Identifier])

+ +

action Eval[MemberExpressionMemberExprKind,ExprKind] : Env ® ValueOrException

+ +

Eval[MemberExpressionnoCall,ExprKind Þ PrimaryRvalue] = Eval[PrimaryRvalue]

+ +

Eval[MemberExpressionMemberExprKind,anyValue Þ MemberLvalueMemberExprKind](eEnv)
+  = letexc refReference = Eval[MemberLvalueMemberExprKind](e)
+     in referenceGetValue(ref)

+ +

Eval[MemberExpressionnoCall,ExprKind Þ new MemberExpressionnoCall,anyValue1 Arguments]
+            (eEnv)
+  = letexc constructorValue = Eval[MemberExpressionnoCall,anyValue1](e)
+     in letexc argumentsValue[] = Eval[Arguments](e)
+     in constructObject(constructorarguments)

+ +

action Eval[NewExpressionExprKind] : Env ® ValueOrException

+ +

Eval[NewExpressionExprKind Þ MemberExpressionnoCall,ExprKind]
+  = Eval[MemberExpressionnoCall,ExprKind]

+ +

Eval[NewExpressionExprKind Þ new NewExpressionanyValue1](eEnv)
+  = letexc constructorValue = Eval[NewExpressionanyValue1](e)
+     in constructObject(constructor[]Value)

+ +

action Eval[Arguments] : Env ® ValueListOrException

+ +

Eval[Arguments Þ ( )](eEnv) = normal []Value

+ +

Eval[Arguments Þ ( ArgumentList )] = Eval[ArgumentList]

+ +

action Eval[ArgumentList] : Env ® ValueListOrException

+ +

Eval[ArgumentList Þ AssignmentExpressionanyValue](eEnv)
+  = letexc argValue = Eval[AssignmentExpressionanyValue](e)
+     in normal [arg]

+ +

Eval[ArgumentList Þ ArgumentList1 , AssignmentExpressionanyValue](eEnv)
+  = letexc argsValue[] = Eval[ArgumentList1](e)
+     in letexc argValue = Eval[AssignmentExpressionanyValue](e)
+     in normal (args ¨ [arg])

+ +

action Eval[Lvalue] : Env ® ReferenceOrException

+ +

Eval[Lvalue Þ MemberLvaluecall] = Eval[MemberLvaluecall]

+ +

Eval[Lvalue Þ MemberLvaluenoCall] = Eval[MemberLvaluenoCall]

+ +

readProperty(containerValuepropertyValue) : ReferenceOrException
+  = letexc objObject = coerceToObject(container)
+     in letexc namePropName = coerceToString(property)
+     in normal placeReference áobjnameñPlace

+ +

callObject(functionValuethisObjectOrNullargumentsValue[]) : ReferenceOrException
+  = case function of
+        undefinedValuenullValuebooleanValuedoubleValuestringValue:
+              abruptReferenceOrException makeError(coerceToObjectError);
+        objectValue(oObject): o.call(thisarguments)
+        end

+ +

constructObject(constructorValueargumentsValue[]) : ValueOrException
+  = case constructor of
+        undefinedValuenullValuebooleanValuedoubleValuestringValue:
+              abruptValueOrException makeError(coerceToObjectError);
+        objectValue(oObject):
+              letexc resObject = o.construct(arguments)
+              in objectResult(res)
+        end

+ +

Postfix Expressions

+ +

Syntax

+ +
+
PostfixExpressionanyValue Þ
+
   NewExpressionanyValue
+
|  MemberExpressioncall,anyValue
+
|  Lvalue ++
+
|  Lvalue --
+
+
+
PostfixExpressionnoLValue Þ
+
   NewExpressionnoLValue
+
|  Lvalue ++
+
|  Lvalue --
+
+

Semantics

+ +

action Eval[PostfixExpressionExprKind] : Env ® ValueOrException

+ +

Eval[PostfixExpressionExprKind Þ NewExpressionExprKind] = Eval[NewExpressionExprKind]

+ +

Eval[PostfixExpressionanyValue Þ MemberExpressioncall,anyValue]
+  = Eval[MemberExpressioncall,anyValue]

+ +

Eval[PostfixExpressionExprKind Þ Lvalue ++](eEnv)
+  = letexc operandReferenceReference = Eval[Lvalue](e)
+     in letexc operandValueValue = referenceGetValue(operandReference)
+     in letexc operandDouble = coerceToDouble(operandValue)
+     in letexc uVoid
+                  = referencePutValue(operandReferencedoubleValue doubleAdd(operand, 1.0))
+     in doubleResult(operand)

+ +

Eval[PostfixExpressionExprKind Þ Lvalue --](eEnv)
+  = letexc operandReferenceReference = Eval[Lvalue](e)
+     in letexc operandValueValue = referenceGetValue(operandReference)
+     in letexc operandDouble = coerceToDouble(operandValue)
+     in letexc uVoid
+                  = referencePutValue(operandReferencedoubleValue doubleSubtract(operand, 1.0))
+     in doubleResult(operand)

+ +

Unary Operators

+ +

Syntax

+ +
+
UnaryExpressionExprKind Þ
+
   PostfixExpressionExprKind
+
|  delete Lvalue
+
|  void UnaryExpressionanyValue
+
|  typeof Lvalue
+
|  typeof UnaryExpressionnoLValue
+
|  ++ Lvalue
+
|  -- Lvalue
+
|  + UnaryExpressionanyValue
+
|  - UnaryExpressionanyValue
+
|  ~ UnaryExpressionanyValue
+
|  ! UnaryExpressionanyValue
+
+

Semantics

+ +

action Eval[UnaryExpressionExprKind] : Env ® ValueOrException

+ +

Eval[UnaryExpressionExprKind Þ PostfixExpressionExprKind]
+  = Eval[PostfixExpressionExprKind]

+ +

Eval[UnaryExpressionExprKind Þ delete Lvalue](eEnv)
+  = letexc rvReference = Eval[Lvalue](e)
+     in case rv of
+            valueReferenceabruptValueOrException makeError(deleteError);
+            placeReference(rPlace):
+                  letexc bBoolean = r.base.delete(r.property)
+                  in booleanResult(b);
+            virtualReferencebooleanResult(true)
+            end

+ +

Eval[UnaryExpressionExprKind Þ void UnaryExpressionanyValue1](eEnv)
+  = letexc operandValue = Eval[UnaryExpressionanyValue1](e)
+     in undefinedResult

+ +

Eval[UnaryExpressionExprKind Þ typeof Lvalue](eEnv)
+  = letexc rvReference = Eval[Lvalue](e)
+     in case rv of
+            valueReference(vValue): stringResult(valueTypeof(v));
+            placeReference(rPlace):
+                  letexc vValue = r.base.get(r.property)
+                  in stringResult(valueTypeof(v));
+            virtualReferencestringResult(“undefined”)
+            end

+ +

Eval[UnaryExpressionExprKind Þ typeof UnaryExpressionnoLValue1](eEnv)
+  = letexc vValue = Eval[UnaryExpressionnoLValue1](e)
+     in stringResult(valueTypeof(v))

+ +

Eval[UnaryExpressionExprKind Þ ++ Lvalue](eEnv)
+  = letexc operandReferenceReference = Eval[Lvalue](e)
+     in letexc operandValueValue = referenceGetValue(operandReference)
+     in letexc operandDouble = coerceToDouble(operandValue)
+     in let resDouble = doubleAdd(operand, 1.0)
+     in letexc uVoid = referencePutValue(operandReferencedoubleValue res)
+     in doubleResult(res)

+ +

Eval[UnaryExpressionExprKind Þ -- Lvalue](eEnv)
+  = letexc operandReferenceReference = Eval[Lvalue](e)
+     in letexc operandValueValue = referenceGetValue(operandReference)
+     in letexc operandDouble = coerceToDouble(operandValue)
+     in let resDouble = doubleSubtract(operand, 1.0)
+     in letexc uVoid = referencePutValue(operandReferencedoubleValue res)
+     in doubleResult(res)

+ +

Eval[UnaryExpressionExprKind Þ + UnaryExpressionanyValue1](eEnv)
+  = letexc operandValueValue = Eval[UnaryExpressionanyValue1](e)
+     in letexc operandDouble = coerceToDouble(operandValue)
+     in doubleResult(operand)

+ +

Eval[UnaryExpressionExprKind Þ - UnaryExpressionanyValue1](eEnv)
+  = letexc operandValueValue = Eval[UnaryExpressionanyValue1](e)
+     in letexc operandDouble = coerceToDouble(operandValue)
+     in doubleResult(doubleNegate(operand))

+ +

Eval[UnaryExpressionExprKind Þ ~ UnaryExpressionanyValue1](eEnv)
+  = letexc operandValueValue = Eval[UnaryExpressionanyValue1](e)
+     in letexc operandInteger = coerceToInt32(operandValue)
+     in integerResult(bitwiseXor(operand, -1))

+ +

Eval[UnaryExpressionExprKind Þ ! UnaryExpressionanyValue1](eEnv)
+  = letexc operandValueValue = Eval[UnaryExpressionanyValue1](e)
+     in booleanResult(not coerceToBoolean(operandValue))

+ +

valueTypeof(vValue) : String
+  = case v of
+        undefinedValue: “undefined”;
+        nullValue: “object”;
+        booleanValue: “boolean”;
+        doubleValue: “number”;
+        stringValue: “string”;
+        objectValue(oObject): o.typeofName
+        end

+ +

Multiplicative Operators

+ +

Syntax

+ +
+
MultiplicativeExpressionExprKind Þ
+
   UnaryExpressionExprKind
+
|  MultiplicativeExpressionanyValue * UnaryExpressionanyValue
+
|  MultiplicativeExpressionanyValue / UnaryExpressionanyValue
+
|  MultiplicativeExpressionanyValue % UnaryExpressionanyValue
+
+

Semantics

+ +

action Eval[MultiplicativeExpressionExprKind] : Env ® ValueOrException

+ +

Eval[MultiplicativeExpressionExprKind Þ UnaryExpressionExprKind]
+  = Eval[UnaryExpressionExprKind]

+ +

Eval[MultiplicativeExpressionExprKind Þ MultiplicativeExpressionanyValue1 * UnaryExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[MultiplicativeExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[UnaryExpressionanyValue](e)
+     in applyBinaryDoubleOperator(doubleMultiplyleftValuerightValue)

+ +

Eval[MultiplicativeExpressionExprKind Þ MultiplicativeExpressionanyValue1 / UnaryExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[MultiplicativeExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[UnaryExpressionanyValue](e)
+     in applyBinaryDoubleOperator(doubleDivideleftValuerightValue)

+ +

Eval[MultiplicativeExpressionExprKind Þ MultiplicativeExpressionanyValue1 % UnaryExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[MultiplicativeExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[UnaryExpressionanyValue](e)
+     in applyBinaryDoubleOperator(doubleRemainderleftValuerightValue)

+ +

applyBinaryDoubleOperator(operatorDouble × Double ® DoubleleftValueValuerightValueValue)
+  : ValueOrException
+  = letexc leftNumberDouble = coerceToDouble(leftValue)
+     in letexc rightNumberDouble = coerceToDouble(rightValue)
+     in doubleResult(operator(leftNumberrightNumber))

+ +

Additive Operators

+ +

Syntax

+ +
+
AdditiveExpressionExprKind Þ
+
   MultiplicativeExpressionExprKind
+
|  AdditiveExpressionanyValue + MultiplicativeExpressionanyValue
+
|  AdditiveExpressionanyValue - MultiplicativeExpressionanyValue
+
+

Semantics

+ +

action Eval[AdditiveExpressionExprKind] : Env ® ValueOrException

+ +

Eval[AdditiveExpressionExprKind Þ MultiplicativeExpressionExprKind]
+  = Eval[MultiplicativeExpressionExprKind]

+ +

Eval[AdditiveExpressionExprKind Þ AdditiveExpressionanyValue1 + MultiplicativeExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[AdditiveExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[MultiplicativeExpressionanyValue](e)
+     in letexc leftPrimitiveValue = coerceToPrimitive(leftValuenoHint)
+     in letexc rightPrimitiveValue = coerceToPrimitive(rightValuenoHint)
+     in if leftPrimitive is stringValue or rightPrimitive is stringValue
+         then letexc leftStringString = coerceToString(leftPrimitive)
+                in letexc rightStringString = coerceToString(rightPrimitive)
+                in stringResult(leftString ¨ rightString)
+         else applyBinaryDoubleOperator(doubleAddleftPrimitiverightPrimitive)

+ +

Eval[AdditiveExpressionExprKind Þ AdditiveExpressionanyValue1 - MultiplicativeExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[AdditiveExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[MultiplicativeExpressionanyValue](e)
+     in applyBinaryDoubleOperator(doubleSubtractleftValuerightValue)

+ +

Bitwise Shift Operators

+ +

Syntax

+ +
+
ShiftExpressionExprKind Þ
+
   AdditiveExpressionExprKind
+
|  ShiftExpressionanyValue << AdditiveExpressionanyValue
+
|  ShiftExpressionanyValue >> AdditiveExpressionanyValue
+
|  ShiftExpressionanyValue >>> AdditiveExpressionanyValue
+
+

Semantics

+ +

action Eval[ShiftExpressionExprKind] : Env ® ValueOrException

+ +

Eval[ShiftExpressionExprKind Þ AdditiveExpressionExprKind]
+  = Eval[AdditiveExpressionExprKind]

+ +

Eval[ShiftExpressionExprKind Þ ShiftExpressionanyValue1 << AdditiveExpressionanyValue]
+            (eEnv)
+  = letexc bitmapValueValue = Eval[ShiftExpressionanyValue1](e)
+     in letexc countValueValue = Eval[AdditiveExpressionanyValue](e)
+     in letexc bitmapInteger = coerceToUint32(bitmapValue)
+     in letexc countInteger = coerceToUint32(countValue)
+     in integerResult(
+             uint32ToInt32(bitwiseAnd(bitwiseShift(bitmapbitwiseAnd(count, 31)), 4294967295)))

+ +

Eval[ShiftExpressionExprKind Þ ShiftExpressionanyValue1 >> AdditiveExpressionanyValue]
+            (eEnv)
+  = letexc bitmapValueValue = Eval[ShiftExpressionanyValue1](e)
+     in letexc countValueValue = Eval[AdditiveExpressionanyValue](e)
+     in letexc bitmapInteger = coerceToInt32(bitmapValue)
+     in letexc countInteger = coerceToUint32(countValue)
+     in integerResult(bitwiseShift(bitmap, -bitwiseAnd(count, 31)))

+ +

Eval[ShiftExpressionExprKind Þ ShiftExpressionanyValue1 >>> AdditiveExpressionanyValue]
+            (eEnv)
+  = letexc bitmapValueValue = Eval[ShiftExpressionanyValue1](e)
+     in letexc countValueValue = Eval[AdditiveExpressionanyValue](e)
+     in letexc bitmapInteger = coerceToUint32(bitmapValue)
+     in letexc countInteger = coerceToUint32(countValue)
+     in integerResult(bitwiseShift(bitmap, -bitwiseAnd(count, 31)))

+ +

Relational Operators

+ +

Syntax

+ +
+
RelationalExpressionExprKind Þ
+
   ShiftExpressionExprKind
+
|  RelationalExpressionanyValue < ShiftExpressionanyValue
+
|  RelationalExpressionanyValue > ShiftExpressionanyValue
+
|  RelationalExpressionanyValue <= ShiftExpressionanyValue
+
|  RelationalExpressionanyValue >= ShiftExpressionanyValue
+
+

Semantics

+ +

action Eval[RelationalExpressionExprKind] : Env ® ValueOrException

+ +

Eval[RelationalExpressionExprKind Þ ShiftExpressionExprKind]
+  = Eval[ShiftExpressionExprKind]

+ +

Eval[RelationalExpressionExprKind Þ RelationalExpressionanyValue1 < ShiftExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[RelationalExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[ShiftExpressionanyValue](e)
+     in orderValues(leftValuerightValuetruefalse)

+ +

Eval[RelationalExpressionExprKind Þ RelationalExpressionanyValue1 > ShiftExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[RelationalExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[ShiftExpressionanyValue](e)
+     in orderValues(rightValueleftValuetruefalse)

+ +

Eval[RelationalExpressionExprKind Þ RelationalExpressionanyValue1 <= ShiftExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[RelationalExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[ShiftExpressionanyValue](e)
+     in orderValues(rightValueleftValuefalsetrue)

+ +

Eval[RelationalExpressionExprKind Þ RelationalExpressionanyValue1 >= ShiftExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[RelationalExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[ShiftExpressionanyValue](e)
+     in orderValues(leftValuerightValuefalsetrue)

+ +

orderValues(leftValueValuerightValueValuelessBooleangreaterOrEqualBoolean)
+  : ValueOrException
+  = letexc leftPrimitiveValue = coerceToPrimitive(leftValuenumberHint)
+     in letexc rightPrimitiveValue = coerceToPrimitive(rightValuenumberHint)
+     in if leftPrimitive is stringValue and rightPrimitive is stringValue
+         then booleanResult(
+                    compareStrings(
+                        leftPrimitive.stringValue,
+                        rightPrimitive.stringValue,
+                        less,
+                        greaterOrEqual,
+                        greaterOrEqual))
+         else letexc leftNumberDouble = coerceToDouble(leftPrimitive)
+               in letexc rightNumberDouble = coerceToDouble(rightPrimitive)
+               in booleanResult(
+                       doubleCompare(
+                           leftNumber,
+                           rightNumber,
+                           less,
+                           greaterOrEqual,
+                           greaterOrEqual,
+                           false))

+ +

compareStrings(leftStringrightStringlessBooleanequalBooleangreaterBoolean)
+  : Boolean
+  = if empty(leftand empty(right)
+     then equal
+     else if empty(left)
+     then less
+     else if empty(right)
+     then greater
+     else let leftCharCodeInteger = characterToCode(first(left));
+               rightCharCodeInteger = characterToCode(first(right))
+           in if leftCharCode < rightCharCode
+               then less
+               else if leftCharCode > rightCharCode
+               then greater
+               else compareStrings(rest(left), rest(right), lessequalgreater)

+ +

Equality Operators

+ +

Syntax

+ +
+
EqualityExpressionExprKind Þ
+
   RelationalExpressionExprKind
+
|  EqualityExpressionanyValue == RelationalExpressionanyValue
+
|  EqualityExpressionanyValue != RelationalExpressionanyValue
+
|  EqualityExpressionanyValue === RelationalExpressionanyValue
+
|  EqualityExpressionanyValue !== RelationalExpressionanyValue
+
+

Semantics

+ +

action Eval[EqualityExpressionExprKind] : Env ® ValueOrException

+ +

Eval[EqualityExpressionExprKind Þ RelationalExpressionExprKind]
+  = Eval[RelationalExpressionExprKind]

+ +

Eval[EqualityExpressionExprKind Þ EqualityExpressionanyValue1 == RelationalExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[EqualityExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[RelationalExpressionanyValue](e)
+     in letexc eqBoolean = compareValues(leftValuerightValue)
+     in booleanResult(eq)

+ +

Eval[EqualityExpressionExprKind Þ EqualityExpressionanyValue1 != RelationalExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[EqualityExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[RelationalExpressionanyValue](e)
+     in letexc eqBoolean = compareValues(leftValuerightValue)
+     in booleanResult(not eq)

+ +

Eval[EqualityExpressionExprKind Þ EqualityExpressionanyValue1 === RelationalExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[EqualityExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[RelationalExpressionanyValue](e)
+     in booleanResult(strictCompareValues(leftValuerightValue))

+ +

Eval[EqualityExpressionExprKind Þ EqualityExpressionanyValue1 !== RelationalExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[EqualityExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[RelationalExpressionanyValue](e)
+     in booleanResult(not strictCompareValues(leftValuerightValue))

+ +

compareValues(leftValueValuerightValueValue) : BooleanOrException
+  = case leftValue of
+        undefinedValuenullValue:
+              case rightValue of
+                 undefinedValuenullValuenormal true;
+                 booleanValuedoubleValuestringValueobjectValuenormal false
+                 end;
+        booleanValue(leftBoolBoolean):
+              case rightValue of
+                 undefinedValuenullValuenormal false;
+                 booleanValue(rightBoolBoolean): normal (not (leftBool xor rightBool));
+                 doubleValuestringValueobjectValue:
+                       compareDoubleToValue(coerceBooleanToDouble(leftBool), rightValue)
+                 end;
+        doubleValue(leftNumberDouble): compareDoubleToValue(leftNumberrightValue);
+        stringValue(leftStrString):
+              case rightValue of
+                 undefinedValuenullValuenormal false;
+                 booleanValue(rightBoolBoolean):
+                       letexc leftNumberDouble = coerceToDouble(leftValue)
+                       in normal doubleEqual(leftNumbercoerceBooleanToDouble(rightBool));
+                 doubleValue(rightNumberDouble):
+                       letexc leftNumberDouble = coerceToDouble(leftValue)
+                       in normal doubleEqual(leftNumberrightNumber);
+                 stringValue(rightStrString):
+                       normal compareStrings(leftStrrightStrfalsetruefalse);
+                 objectValue:
+                       letexc rightPrimitiveValue = coerceToPrimitive(rightValuenoHint)
+                       in compareValues(leftValuerightPrimitive)
+                 end;
+        objectValue(leftObjObject):
+              case rightValue of
+                 undefinedValuenullValuenormal false;
+                 booleanValue(rightBoolBoolean):
+                       letexc leftPrimitiveValue = coerceToPrimitive(leftValuenoHint)
+                       in compareValues(
+                               leftPrimitive,
+                               doubleValue coerceBooleanToDouble(rightBool));
+                 doubleValuestringValue:
+                       letexc leftPrimitiveValue = coerceToPrimitive(leftValuenoHint)
+                       in compareValues(leftPrimitiverightValue);
+                 objectValue(rightObjObject):
+                       normal (leftObj.properties º rightObj.properties)
+                 end
+        end

+ +

compareDoubleToValue(leftNumberDoublerightValueValue) : BooleanOrException
+  = case rightValue of
+        undefinedValuenullValuenormal false;
+        booleanValuedoubleValuestringValue:
+              letexc rightNumberDouble = coerceToDouble(rightValue)
+              in normal doubleEqual(leftNumberrightNumber);
+        objectValue:
+              letexc rightPrimitiveValue = coerceToPrimitive(rightValuenoHint)
+              in compareDoubleToValue(leftNumberrightPrimitive)
+        end

+ +

doubleEqual(xDoubleyDouble) : Boolean
+  = doubleCompare(xyfalsetruefalsefalse)

+ +

strictCompareValues(leftValueValuerightValueValue) : Boolean
+  = case leftValue of
+        undefinedValuerightValue is undefinedValue;
+        nullValuerightValue is nullValue;
+        booleanValue(leftBoolBoolean):
+              case rightValue of
+                 booleanValue(rightBoolBoolean): not (leftBool xor rightBool);
+                 undefinedValuenullValuedoubleValuestringValueobjectValuefalse
+                 end;
+        doubleValue(leftNumberDouble):
+              case rightValue of
+                 doubleValue(rightNumberDouble): doubleEqual(leftNumberrightNumber);
+                 undefinedValuenullValuebooleanValuestringValueobjectValuefalse
+                 end;
+        stringValue(leftStrString):
+              case rightValue of
+                 stringValue(rightStrString):
+                       compareStrings(leftStrrightStrfalsetruefalse);
+                 undefinedValuenullValuebooleanValuedoubleValueobjectValuefalse
+                 end;
+        objectValue(leftObjObject):
+              case rightValue of
+                 objectValue(rightObjObject): leftObj.properties º rightObj.properties;
+                 undefinedValuenullValuebooleanValuedoubleValuestringValuefalse
+                 end
+        end

+ +

Binary Bitwise Operators

+ +

Syntax

+ +
+
BitwiseAndExpressionExprKind Þ
+
   EqualityExpressionExprKind
+
|  BitwiseAndExpressionanyValue & EqualityExpressionanyValue
+
+
+
BitwiseXorExpressionExprKind Þ
+
   BitwiseAndExpressionExprKind
+
|  BitwiseXorExpressionanyValue ^ BitwiseAndExpressionanyValue
+
+
+
BitwiseOrExpressionExprKind Þ
+
   BitwiseXorExpressionExprKind
+
|  BitwiseOrExpressionanyValue | BitwiseXorExpressionanyValue
+
+

Semantics

+ +

action Eval[BitwiseAndExpressionExprKind] : Env ® ValueOrException

+ +

Eval[BitwiseAndExpressionExprKind Þ EqualityExpressionExprKind]
+  = Eval[EqualityExpressionExprKind]

+ +

Eval[BitwiseAndExpressionExprKind Þ BitwiseAndExpressionanyValue1 & EqualityExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[BitwiseAndExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[EqualityExpressionanyValue](e)
+     in applyBinaryBitwiseOperator(bitwiseAndleftValuerightValue)

+ +

action Eval[BitwiseXorExpressionExprKind] : Env ® ValueOrException

+ +

Eval[BitwiseXorExpressionExprKind Þ BitwiseAndExpressionExprKind]
+  = Eval[BitwiseAndExpressionExprKind]

+ +

Eval[BitwiseXorExpressionExprKind Þ BitwiseXorExpressionanyValue1 ^ BitwiseAndExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[BitwiseXorExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[BitwiseAndExpressionanyValue](e)
+     in applyBinaryBitwiseOperator(bitwiseXorleftValuerightValue)

+ +

action Eval[BitwiseOrExpressionExprKind] : Env ® ValueOrException

+ +

Eval[BitwiseOrExpressionExprKind Þ BitwiseXorExpressionExprKind]
+  = Eval[BitwiseXorExpressionExprKind]

+ +

Eval[BitwiseOrExpressionExprKind Þ BitwiseOrExpressionanyValue1 | BitwiseXorExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[BitwiseOrExpressionanyValue1](e)
+     in letexc rightValueValue = Eval[BitwiseXorExpressionanyValue](e)
+     in applyBinaryBitwiseOperator(bitwiseOrleftValuerightValue)

+ +

applyBinaryBitwiseOperator(operatorInteger × Integer ® IntegerleftValueValuerightValueValue)
+  : ValueOrException
+  = letexc leftIntInteger = coerceToInt32(leftValue)
+     in letexc rightIntInteger = coerceToInt32(rightValue)
+     in integerResult(operator(leftIntrightInt))

+ +

Binary Logical Operators

+ +

Syntax

+ +
+
LogicalAndExpressionExprKind Þ
+
   BitwiseOrExpressionExprKind
+
|  LogicalAndExpressionanyValue && BitwiseOrExpressionanyValue
+
+
+
LogicalOrExpressionExprKind Þ
+
   LogicalAndExpressionExprKind
+
|  LogicalOrExpressionanyValue || LogicalAndExpressionanyValue
+
+

Semantics

+ +

action Eval[LogicalAndExpressionExprKind] : Env ® ValueOrException

+ +

Eval[LogicalAndExpressionExprKind Þ BitwiseOrExpressionExprKind]
+  = Eval[BitwiseOrExpressionExprKind]

+ +

Eval[LogicalAndExpressionExprKind Þ LogicalAndExpressionanyValue1 && BitwiseOrExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[LogicalAndExpressionanyValue1](e)
+     in if coerceToBoolean(leftValue)
+         then Eval[BitwiseOrExpressionanyValue](e)
+         else normal leftValue

+ +

action Eval[LogicalOrExpressionExprKind] : Env ® ValueOrException

+ +

Eval[LogicalOrExpressionExprKind Þ LogicalAndExpressionExprKind]
+  = Eval[LogicalAndExpressionExprKind]

+ +

Eval[LogicalOrExpressionExprKind Þ LogicalOrExpressionanyValue1 || LogicalAndExpressionanyValue]
+            (eEnv)
+  = letexc leftValueValue = Eval[LogicalOrExpressionanyValue1](e)
+     in if coerceToBoolean(leftValue)
+         then normal leftValue
+         else Eval[LogicalAndExpressionanyValue](e)

+ +

Conditional Operator

+ +

Syntax

+ +
+
ConditionalExpressionExprKind Þ
+
   LogicalOrExpressionExprKind
+
|  LogicalOrExpressionanyValue ? AssignmentExpressionanyValue : AssignmentExpressionanyValue
+
+

Semantics

+ +

action Eval[ConditionalExpressionExprKind] : Env ® ValueOrException

+ +

Eval[ConditionalExpressionExprKind Þ LogicalOrExpressionExprKind]
+  = Eval[LogicalOrExpressionExprKind]

+ +

Eval[ConditionalExpressionExprKind Þ LogicalOrExpressionanyValue ? AssignmentExpressionanyValue1 : AssignmentExpressionanyValue2]
+            (eEnv)
+  = letexc conditionValue = Eval[LogicalOrExpressionanyValue](e)
+     in if coerceToBoolean(condition)
+         then Eval[AssignmentExpressionanyValue1](e)
+         else Eval[AssignmentExpressionanyValue2](e)

+ +

Assignment Operators

+ +

Syntax

+ +
+
AssignmentExpressionExprKind Þ
+
   ConditionalExpressionExprKind
+
|  Lvalue = AssignmentExpressionanyValue
+
+

Expressions

+ +

Syntax

+ +
+
CommaExpressionExprKind Þ AssignmentExpressionExprKind
+
+

Semantics

+ +

action Eval[AssignmentExpressionExprKind] : Env ® ValueOrException

+ +

Eval[AssignmentExpressionExprKind Þ ConditionalExpressionExprKind]
+  = Eval[ConditionalExpressionExprKind]

+ +

Eval[AssignmentExpressionExprKind Þ Lvalue = AssignmentExpressionanyValue1](eEnv)
+  = letexc leftReferenceReference = Eval[Lvalue](e)
+     in letexc rightValueValue = Eval[AssignmentExpressionanyValue1](e)
+     in letexc uVoid = referencePutValue(leftReferencerightValue)
+     in normal rightValue

+ +

action Eval[CommaExpressionExprKind] : Env ® ValueOrException

+ +

Eval[CommaExpressionExprKind Þ AssignmentExpressionExprKind]
+  = Eval[AssignmentExpressionExprKind]

+ +

Syntax

+ +
+
Expression Þ CommaExpressionanyValue
+
+

Semantics

+ +

action Eval[Expression] : Env ® ValueOrException

+ +

Eval[Expression Þ CommaExpressionanyValue] = Eval[CommaExpressionanyValue]

+ +

Programs

+ +

Syntax

+ +
+
Program Þ Expression End
+
+

Semantics

+ +

action Eval[Program] : ValueOrException

+ +

Eval[Program Þ Expression End] = Eval[Expression](ánullObjectOrNullñEnv)

+ + + diff --git a/mozilla/js2/semantics/ECMA Grammar.lisp b/mozilla/js2/semantics/ECMA Grammar.lisp new file mode 100644 index 00000000000..771d69be731 --- /dev/null +++ b/mozilla/js2/semantics/ECMA Grammar.lisp @@ -0,0 +1,852 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; ECMAScript sample grammar portions +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + +(declaim (optimize (debug 3))) + +(progn + (defparameter *gw* + (generate-world + "G" + '((grammar code-grammar :lr-1 :program) + + (%section "Types") + + (deftype value (oneof undefined-value + null-value + (boolean-value boolean) + (double-value double) + (string-value string) + (object-value object))) + (deftype object-or-null (oneof null-object-or-null (object-object-or-null object))) + (deftype object (tuple (properties (address (vector property))) + (typeof-name string) + (prototype object-or-null) + (get (-> (prop-name) value-or-exception)) + (put (-> (prop-name value) void-or-exception)) + (delete (-> (prop-name) boolean-or-exception)) + (call (-> (object-or-null (vector value)) reference-or-exception)) + (construct (-> ((vector value)) object-or-exception)) + (default-value (-> (default-value-hint) value-or-exception)))) + (deftype default-value-hint (oneof no-hint number-hint string-hint)) + (deftype property (tuple (name string) (read-only boolean) (enumerable boolean) (permanent boolean) (value (address value)))) + + (deftype prop-name string) + (deftype place (tuple (base object) (property prop-name))) + (deftype reference (oneof (value-reference value) (place-reference place) (virtual-reference prop-name))) + + + (deftype integer-or-exception (oneof (normal integer) (abrupt exception))) + (deftype void-or-exception (oneof normal (abrupt exception))) + (deftype boolean-or-exception (oneof (normal boolean) (abrupt exception))) + (deftype double-or-exception (oneof (normal double) (abrupt exception))) + (deftype string-or-exception (oneof (normal string) (abrupt exception))) + (deftype object-or-exception (oneof (normal object) (abrupt exception))) + (deftype value-or-exception (oneof (normal value) (abrupt exception))) + (deftype reference-or-exception (oneof (normal reference) (abrupt exception))) + (deftype value-list-or-exception (oneof (normal (vector value)) (abrupt exception))) + + (%section "Helper Functions") + + (define (object-or-null-to-value (o object-or-null)) value + (case o + (null-object-or-null (oneof null-value)) + ((object-object-or-null obj object) (oneof object-value obj)))) + + (define undefined-result value-or-exception + (oneof normal (oneof undefined-value))) + (define null-result value-or-exception + (oneof normal (oneof null-value))) + (define (boolean-result (b boolean)) value-or-exception + (oneof normal (oneof boolean-value b))) + (define (double-result (d double)) value-or-exception + (oneof normal (oneof double-value d))) + (define (integer-result (i integer)) value-or-exception + (double-result (rational-to-double (integer-to-rational i)))) + (define (string-result (s string)) value-or-exception + (oneof normal (oneof string-value s))) + (define (object-result (o object)) value-or-exception + (oneof normal (oneof object-value o))) + + (%section "Exceptions") + + (deftype exception (oneof (exception value) (error error))) + (deftype error (oneof coerce-to-primitive-error + coerce-to-object-error + get-value-error + put-value-error + delete-error)) + + (define (make-error (err error)) exception + (oneof error err)) + + (%section "Objects") + + + (%section "Conversions") + + (define (reference-get-value (rv reference)) value-or-exception + (case rv + ((value-reference v value) (oneof normal v)) + ((place-reference r place) ((& get (& base r)) (& property r))) + (virtual-reference (typed-oneof value-or-exception abrupt (make-error (oneof get-value-error)))))) + + (define (reference-put-value (rv reference) (v value)) void-or-exception + (case rv + (value-reference (typed-oneof void-or-exception abrupt (make-error (oneof put-value-error)))) + ((place-reference r place) ((& put (& base r)) (& property r) v)) + (virtual-reference (bottom void-or-exception)))) + + (%section "Coercions") + + (define (coerce-to-boolean (v value)) boolean + (case v + (((undefined-value null-value)) false) + ((boolean-value b boolean) b) + ((double-value d double) (not (or (double-is-zero d) (double-is-nan d)))) + ((string-value s string) (!= (length s) 0)) + (object-value true))) + + (define (coerce-boolean-to-double (b boolean)) double + (if b 1.0 0.0)) + + (define (coerce-to-double (v value)) double-or-exception + (case v + (undefined-value (oneof normal nan)) + (null-value (oneof normal 0.0)) + ((boolean-value b boolean) (oneof normal (coerce-boolean-to-double b))) + ((double-value d double) (oneof normal d)) + (string-value (bottom double-or-exception)) + (object-value (bottom double-or-exception)))) + + (define (coerce-to-uint32 (v value)) integer-or-exception + (letexc (d double (coerce-to-double v)) + (oneof normal (double-to-uint32 d)))) + + (define (coerce-to-int32 (v value)) integer-or-exception + (letexc (d double (coerce-to-double v)) + (oneof normal (uint32-to-int32 (double-to-uint32 d))))) + + (define (uint32-to-int32 (ui integer)) integer + (if (< ui #x80000000) + ui + (- ui #x100000000))) + + (define (coerce-to-string (v value)) string-or-exception + (case v + (undefined-value (oneof normal "undefined")) + (null-value (oneof normal "null")) + ((boolean-value b boolean) (if b (oneof normal "true") (oneof normal "false"))) + (double-value (bottom string-or-exception)) + ((string-value s string) (oneof normal s)) + (object-value (bottom string-or-exception)))) + + (define (coerce-to-primitive (v value) (hint default-value-hint)) value-or-exception + (case v + (((undefined-value null-value boolean-value double-value string-value)) (oneof normal v)) + ((object-value o object) + (letexc (pv value ((& default-value o) hint)) + (case pv + (((undefined-value null-value boolean-value double-value string-value)) (oneof normal pv)) + (object-value (typed-oneof value-or-exception abrupt (make-error (oneof coerce-to-primitive-error))))))))) + + (define (coerce-to-object (v value)) object-or-exception + (case v + (((undefined-value null-value)) (typed-oneof object-or-exception abrupt (make-error (oneof coerce-to-object-error)))) + (boolean-value (bottom object-or-exception)) + (double-value (bottom object-or-exception)) + (string-value (bottom object-or-exception)) + ((object-value o object) (oneof normal o)))) + + (%section "Environments") + + (deftype env (tuple (this object-or-null))) + (define (lookup-identifier (e env :unused) (id string :unused)) reference-or-exception + (bottom reference-or-exception)) + + (%section "Terminal Actions") + + (declare-action eval-identifier $identifier string) + (declare-action eval-number $number double) + (declare-action eval-string $string string) + + (terminal-action eval-identifier $identifier cdr) + (terminal-action eval-number $number cdr) + (terminal-action eval-string $string cdr) + (%print-actions) + + (%section "Primary Expressions") + + (declare-action eval :primary-rvalue (-> (env) value-or-exception)) + (production :primary-rvalue (this) primary-rvalue-this + ((eval (e env)) + (oneof normal (object-or-null-to-value (& this e))))) + (production :primary-rvalue (null) primary-rvalue-null + ((eval (e env :unused)) + null-result)) + (production :primary-rvalue (true) primary-rvalue-true + ((eval (e env :unused)) + (boolean-result true))) + (production :primary-rvalue (false) primary-rvalue-false + ((eval (e env :unused)) + (boolean-result false))) + (production :primary-rvalue ($number) primary-rvalue-number + ((eval (e env :unused)) + (double-result (eval-number $number)))) + (production :primary-rvalue ($string) primary-rvalue-string + ((eval (e env :unused)) + (string-result (eval-string $string)))) + (production :primary-rvalue (\( (:comma-expression no-l-value) \)) primary-rvalue-parentheses + (eval (eval :comma-expression))) + + (declare-action eval :primary-lvalue (-> (env) reference-or-exception)) + (production :primary-lvalue ($identifier) primary-lvalue-identifier + ((eval (e env)) + (lookup-identifier e (eval-identifier $identifier)))) + (production :primary-lvalue (\( :lvalue \)) primary-lvalue-parentheses + (eval (eval :lvalue))) + (%print-actions) + + (%section "Left-Side Expressions") + + (grammar-argument :expr-kind any-value no-l-value) + (grammar-argument :member-expr-kind call no-call) + + (declare-action eval (:member-lvalue :member-expr-kind) (-> (env) reference-or-exception)) + (production (:member-lvalue no-call) (:primary-lvalue) member-lvalue-primary-lvalue + (eval (eval :primary-lvalue))) + (production (:member-lvalue call) (:lvalue :arguments) member-lvalue-call-member-lvalue + ((eval (e env)) + (letexc (function-reference reference ((eval :lvalue) e)) + (letexc (function value (reference-get-value function-reference)) + (letexc (arguments (vector value) ((eval :arguments) e)) + (let ((this object-or-null + (case function-reference + (((value-reference virtual-reference)) (oneof null-object-or-null)) + ((place-reference p place) (oneof object-object-or-null (& base p)))))) + (call-object function this arguments))))))) + (production (:member-lvalue call) ((:member-expression no-call no-l-value) :arguments) member-lvalue-call-member-expression-no-call + ((eval (e env)) + (letexc (function value ((eval :member-expression) e)) + (letexc (arguments (vector value) ((eval :arguments) e)) + (call-object function (oneof null-object-or-null) arguments))))) + (production (:member-lvalue :member-expr-kind) ((:member-expression :member-expr-kind any-value) \[ :expression \]) member-lvalue-array + ((eval (e env)) + (letexc (container value ((eval :member-expression) e)) + (letexc (property value ((eval :expression) e)) + (read-property container property))))) + (production (:member-lvalue :member-expr-kind) ((:member-expression :member-expr-kind any-value) \. $identifier) member-lvalue-property + ((eval (e env)) + (letexc (container value ((eval :member-expression) e)) + (read-property container (oneof string-value (eval-identifier $identifier)))))) + + (declare-action eval (:member-expression :member-expr-kind :expr-kind) (-> (env) value-or-exception)) + (%rule (:member-expression no-call no-l-value)) + (%rule (:member-expression no-call any-value)) + (%rule (:member-expression call any-value)) + (production (:member-expression no-call :expr-kind) (:primary-rvalue) member-expression-primary-rvalue + (eval (eval :primary-rvalue))) + (production (:member-expression :member-expr-kind any-value) ((:member-lvalue :member-expr-kind)) member-expression-member-lvalue + ((eval (e env)) + (letexc (ref reference ((eval :member-lvalue) e)) + (reference-get-value ref)))) + (production (:member-expression no-call :expr-kind) (new (:member-expression no-call any-value) :arguments) member-expression-new + ((eval (e env)) + (letexc (constructor value ((eval :member-expression) e)) + (letexc (arguments (vector value) ((eval :arguments) e)) + (construct-object constructor arguments))))) + + (declare-action eval (:new-expression :expr-kind) (-> (env) value-or-exception)) + (production (:new-expression :expr-kind) ((:member-expression no-call :expr-kind)) new-expression-member-expression + (eval (eval :member-expression))) + (production (:new-expression :expr-kind) (new (:new-expression any-value)) new-expression-new + ((eval (e env)) + (letexc (constructor value ((eval :new-expression) e)) + (construct-object constructor (vector-of value))))) + + (declare-action eval :arguments (-> (env) value-list-or-exception)) + (production :arguments (\( \)) arguments-empty + ((eval (e env :unused)) + (oneof normal (vector-of value)))) + (production :arguments (\( :argument-list \)) arguments-list + (eval (eval :argument-list))) + + (declare-action eval :argument-list (-> (env) value-list-or-exception)) + (production :argument-list ((:assignment-expression any-value)) argument-list-one + ((eval (e env)) + (letexc (arg value ((eval :assignment-expression) e)) + (oneof normal (vector arg))))) + (production :argument-list (:argument-list \, (:assignment-expression any-value)) argument-list-more + ((eval (e env)) + (letexc (args (vector value) ((eval :argument-list) e)) + (letexc (arg value ((eval :assignment-expression) e)) + (oneof normal (append args (vector arg))))))) + + (declare-action eval :lvalue (-> (env) reference-or-exception)) + (production :lvalue ((:member-lvalue call)) lvalue-member-lvalue-call + (eval (eval :member-lvalue))) + (production :lvalue ((:member-lvalue no-call)) lvalue-member-lvalue-no-call + (eval (eval :member-lvalue))) + (%print-actions) + + (define (read-property (container value) (property value)) reference-or-exception + (letexc (obj object (coerce-to-object container)) + (letexc (name prop-name (coerce-to-string property)) + (oneof normal (oneof place-reference (tuple place obj name)))))) + + (define (call-object (function value) (this object-or-null) (arguments (vector value))) reference-or-exception + (case function + (((undefined-value null-value boolean-value double-value string-value)) + (typed-oneof reference-or-exception abrupt (make-error (oneof coerce-to-object-error)))) + ((object-value o object) + ((& call o) this arguments)))) + + (define (construct-object (constructor value) (arguments (vector value))) value-or-exception + (case constructor + (((undefined-value null-value boolean-value double-value string-value)) + (typed-oneof value-or-exception abrupt (make-error (oneof coerce-to-object-error)))) + ((object-value o object) + (letexc (res object ((& construct o) arguments)) + (object-result res))))) + + (%section "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 + (eval (eval :new-expression))) + (production (:postfix-expression any-value) ((:member-expression call any-value)) postfix-expression-member-expression-call + (eval (eval :member-expression))) + (production (:postfix-expression :expr-kind) (:lvalue ++) postfix-expression-increment + ((eval (e env)) + (letexc (operand-reference reference ((eval :lvalue) e)) + (letexc (operand-value value (reference-get-value operand-reference)) + (letexc (operand double (coerce-to-double operand-value)) + (letexc (u void (reference-put-value operand-reference (oneof double-value (double-add operand 1.0))) + :unused) + (double-result operand))))))) + (production (:postfix-expression :expr-kind) (:lvalue --) postfix-expression-decrement + ((eval (e env)) + (letexc (operand-reference reference ((eval :lvalue) e)) + (letexc (operand-value value (reference-get-value operand-reference)) + (letexc (operand double (coerce-to-double operand-value)) + (letexc (u void (reference-put-value operand-reference (oneof double-value (double-subtract operand 1.0))) + :unused) + (double-result operand))))))) + (%print-actions) + + (%section "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 + (eval (eval :postfix-expression))) + (production (:unary-expression :expr-kind) (delete :lvalue) unary-expression-delete + ((eval (e env)) + (letexc (rv reference ((eval :lvalue) e)) + (case rv + (value-reference (typed-oneof value-or-exception abrupt (make-error (oneof delete-error)))) + ((place-reference r place) + (letexc (b boolean ((& delete (& base r)) (& property r))) + (boolean-result b))) + (virtual-reference (boolean-result true)))))) + (production (:unary-expression :expr-kind) (void (:unary-expression any-value)) unary-expression-void + ((eval (e env)) + (letexc (operand value ((eval :unary-expression) e) :unused) + undefined-result))) + (production (:unary-expression :expr-kind) (typeof :lvalue) unary-expression-typeof-lvalue + ((eval (e env)) + (letexc (rv reference ((eval :lvalue) e)) + (case rv + ((value-reference v value) (string-result (value-typeof v))) + ((place-reference r place) + (letexc (v value ((& get (& base r)) (& property r))) + (string-result (value-typeof v)))) + (virtual-reference (string-result "undefined")))))) + (production (:unary-expression :expr-kind) (typeof (:unary-expression no-l-value)) unary-expression-typeof-expression + ((eval (e env)) + (letexc (v value ((eval :unary-expression) e)) + (string-result (value-typeof v))))) + (production (:unary-expression :expr-kind) (++ :lvalue) unary-expression-increment + ((eval (e env)) + (letexc (operand-reference reference ((eval :lvalue) e)) + (letexc (operand-value value (reference-get-value operand-reference)) + (letexc (operand double (coerce-to-double operand-value)) + (let ((res double (double-add operand 1.0))) + (letexc (u void (reference-put-value operand-reference (oneof double-value res)) :unused) + (double-result res)))))))) + (production (:unary-expression :expr-kind) (-- :lvalue) unary-expression-decrement + ((eval (e env)) + (letexc (operand-reference reference ((eval :lvalue) e)) + (letexc (operand-value value (reference-get-value operand-reference)) + (letexc (operand double (coerce-to-double operand-value)) + (let ((res double (double-subtract operand 1.0))) + (letexc (u void (reference-put-value operand-reference (oneof double-value res)) :unused) + (double-result res)))))))) + (production (:unary-expression :expr-kind) (+ (:unary-expression any-value)) unary-expression-plus + ((eval (e env)) + (letexc (operand-value value ((eval :unary-expression) e)) + (letexc (operand double (coerce-to-double operand-value)) + (double-result operand))))) + (production (:unary-expression :expr-kind) (- (:unary-expression any-value)) unary-expression-minus + ((eval (e env)) + (letexc (operand-value value ((eval :unary-expression) e)) + (letexc (operand double (coerce-to-double operand-value)) + (double-result (double-negate operand)))))) + (production (:unary-expression :expr-kind) (~ (:unary-expression any-value)) unary-expression-bitwise-not + ((eval (e env)) + (letexc (operand-value value ((eval :unary-expression) e)) + (letexc (operand integer (coerce-to-int32 operand-value)) + (integer-result (bitwise-xor operand -1)))))) + (production (:unary-expression :expr-kind) (! (:unary-expression any-value)) unary-expression-logical-not + ((eval (e env)) + (letexc (operand-value value ((eval :unary-expression) e)) + (boolean-result (not (coerce-to-boolean operand-value)))))) + (%print-actions) + + (define (value-typeof (v value)) string + (case v + (undefined-value "undefined") + (null-value "object") + (boolean-value "boolean") + (double-value "number") + (string-value "string") + ((object-value o object) (& typeof-name o)))) + + (%section "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 + (eval (eval :unary-expression))) + (production (:multiplicative-expression :expr-kind) ((:multiplicative-expression any-value) * (:unary-expression any-value)) multiplicative-expression-multiply + ((eval (e env)) + (letexc (left-value value ((eval :multiplicative-expression) e)) + (letexc (right-value value ((eval :unary-expression) e)) + (apply-binary-double-operator double-multiply left-value right-value))))) + (production (:multiplicative-expression :expr-kind) ((:multiplicative-expression any-value) / (:unary-expression any-value)) multiplicative-expression-divide + ((eval (e env)) + (letexc (left-value value ((eval :multiplicative-expression) e)) + (letexc (right-value value ((eval :unary-expression) e)) + (apply-binary-double-operator double-divide left-value right-value))))) + (production (:multiplicative-expression :expr-kind) ((:multiplicative-expression any-value) % (:unary-expression any-value)) multiplicative-expression-remainder + ((eval (e env)) + (letexc (left-value value ((eval :multiplicative-expression) e)) + (letexc (right-value value ((eval :unary-expression) e)) + (apply-binary-double-operator double-remainder left-value right-value))))) + (%print-actions) + + (define (apply-binary-double-operator (operator (-> (double double) double)) (left-value value) (right-value value)) value-or-exception + (letexc (left-number double (coerce-to-double left-value)) + (letexc (right-number double (coerce-to-double right-value)) + (double-result (operator left-number right-number))))) + + (%section "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 + (eval (eval :multiplicative-expression))) + (production (:additive-expression :expr-kind) ((:additive-expression any-value) + (:multiplicative-expression any-value)) additive-expression-add + ((eval (e env)) + (letexc (left-value value ((eval :additive-expression) e)) + (letexc (right-value value ((eval :multiplicative-expression) e)) + (letexc (left-primitive value (coerce-to-primitive left-value (oneof no-hint))) + (letexc (right-primitive value (coerce-to-primitive right-value (oneof no-hint))) + (if (or (is string-value left-primitive) (is string-value right-primitive)) + (letexc (left-string string (coerce-to-string left-primitive)) + (letexc (right-string string (coerce-to-string right-primitive)) + (string-result (append left-string right-string)))) + (apply-binary-double-operator double-add left-primitive right-primitive)))))))) + (production (:additive-expression :expr-kind) ((:additive-expression any-value) - (:multiplicative-expression any-value)) additive-expression-subtract + ((eval (e env)) + (letexc (left-value value ((eval :additive-expression) e)) + (letexc (right-value value ((eval :multiplicative-expression) e)) + (apply-binary-double-operator double-subtract left-value right-value))))) + (%print-actions) + + (%section "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 + (eval (eval :additive-expression))) + (production (:shift-expression :expr-kind) ((:shift-expression any-value) << (:additive-expression any-value)) shift-expression-left + ((eval (e env)) + (letexc (bitmap-value value ((eval :shift-expression) e)) + (letexc (count-value value ((eval :additive-expression) e)) + (letexc (bitmap integer (coerce-to-uint32 bitmap-value)) + (letexc (count integer (coerce-to-uint32 count-value)) + (integer-result (uint32-to-int32 (bitwise-and (bitwise-shift bitmap (bitwise-and count #x1F)) + #xFFFFFFFF))))))))) + (production (:shift-expression :expr-kind) ((:shift-expression any-value) >> (:additive-expression any-value)) shift-expression-right-signed + ((eval (e env)) + (letexc (bitmap-value value ((eval :shift-expression) e)) + (letexc (count-value value ((eval :additive-expression) e)) + (letexc (bitmap integer (coerce-to-int32 bitmap-value)) + (letexc (count integer (coerce-to-uint32 count-value)) + (integer-result (bitwise-shift bitmap (neg (bitwise-and count #x1F)))))))))) + (production (:shift-expression :expr-kind) ((:shift-expression any-value) >>> (:additive-expression any-value)) shift-expression-right-unsigned + ((eval (e env)) + (letexc (bitmap-value value ((eval :shift-expression) e)) + (letexc (count-value value ((eval :additive-expression) e)) + (letexc (bitmap integer (coerce-to-uint32 bitmap-value)) + (letexc (count integer (coerce-to-uint32 count-value)) + (integer-result (bitwise-shift bitmap (neg (bitwise-and count #x1F)))))))))) + (%print-actions) + + (%section "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 + (eval (eval :shift-expression))) + (production (:relational-expression :expr-kind) ((:relational-expression any-value) < (:shift-expression any-value)) relational-expression-less + ((eval (e env)) + (letexc (left-value value ((eval :relational-expression) e)) + (letexc (right-value value ((eval :shift-expression) e)) + (order-values left-value right-value true false))))) + (production (:relational-expression :expr-kind) ((:relational-expression any-value) > (:shift-expression any-value)) relational-expression-greater + ((eval (e env)) + (letexc (left-value value ((eval :relational-expression) e)) + (letexc (right-value value ((eval :shift-expression) e)) + (order-values right-value left-value true false))))) + (production (:relational-expression :expr-kind) ((:relational-expression any-value) <= (:shift-expression any-value)) relational-expression-less-or-equal + ((eval (e env)) + (letexc (left-value value ((eval :relational-expression) e)) + (letexc (right-value value ((eval :shift-expression) e)) + (order-values right-value left-value false true))))) + (production (:relational-expression :expr-kind) ((:relational-expression any-value) >= (:shift-expression any-value)) relational-expression-greater-or-equal + ((eval (e env)) + (letexc (left-value value ((eval :relational-expression) e)) + (letexc (right-value value ((eval :shift-expression) e)) + (order-values left-value right-value false true))))) + (%print-actions) + + (define (order-values (left-value value) (right-value value) (less boolean) (greater-or-equal boolean)) value-or-exception + (letexc (left-primitive value (coerce-to-primitive left-value (oneof number-hint))) + (letexc (right-primitive value (coerce-to-primitive right-value (oneof number-hint))) + (if (and (is string-value left-primitive) (is string-value right-primitive)) + (boolean-result + (compare-strings (select string-value left-primitive) (select string-value right-primitive) less greater-or-equal greater-or-equal)) + (letexc (left-number double (coerce-to-double left-primitive)) + (letexc (right-number double (coerce-to-double right-primitive)) + (boolean-result (double-compare left-number right-number less greater-or-equal greater-or-equal false)))))))) + + (define (compare-strings (left string) (right string) (less boolean) (equal boolean) (greater boolean)) boolean + (if (and (empty left) (empty right)) + equal + (if (empty left) + less + (if (empty right) + greater + (let ((left-char-code integer (character-to-code (first left))) + (right-char-code integer (character-to-code (first right)))) + (if (< left-char-code right-char-code) + less + (if (> left-char-code right-char-code) + greater + (compare-strings (rest left) (rest right) less equal greater)))))))) + + (%section "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 + (eval (eval :relational-expression))) + (production (:equality-expression :expr-kind) ((:equality-expression any-value) == (:relational-expression any-value)) equality-expression-equal + ((eval (e env)) + (letexc (left-value value ((eval :equality-expression) e)) + (letexc (right-value value ((eval :relational-expression) e)) + (letexc (eq boolean (compare-values left-value right-value)) + (boolean-result eq)))))) + (production (:equality-expression :expr-kind) ((:equality-expression any-value) != (:relational-expression any-value)) equality-expression-not-equal + ((eval (e env)) + (letexc (left-value value ((eval :equality-expression) e)) + (letexc (right-value value ((eval :relational-expression) e)) + (letexc (eq boolean (compare-values left-value right-value)) + (boolean-result (not eq))))))) + (production (:equality-expression :expr-kind) ((:equality-expression any-value) === (:relational-expression any-value)) equality-expression-strict-equal + ((eval (e env)) + (letexc (left-value value ((eval :equality-expression) e)) + (letexc (right-value value ((eval :relational-expression) e)) + (boolean-result (strict-compare-values left-value right-value)))))) + (production (:equality-expression :expr-kind) ((:equality-expression any-value) !== (:relational-expression any-value)) equality-expression-strict-not-equal + ((eval (e env)) + (letexc (left-value value ((eval :equality-expression) e)) + (letexc (right-value value ((eval :relational-expression) e)) + (boolean-result (not (strict-compare-values left-value right-value))))))) + (%print-actions) + + (define (compare-values (left-value value) (right-value value)) boolean-or-exception + (case left-value + (((undefined-value null-value)) + (case right-value + (((undefined-value null-value)) (oneof normal true)) + (((boolean-value double-value string-value object-value)) (oneof normal false)))) + ((boolean-value left-bool boolean) + (case right-value + (((undefined-value null-value)) (oneof normal false)) + ((boolean-value right-bool boolean) (oneof normal (not (xor left-bool right-bool)))) + (((double-value string-value object-value)) + (compare-double-to-value (coerce-boolean-to-double left-bool) right-value)))) + ((double-value left-number double) + (compare-double-to-value left-number right-value)) + ((string-value left-str string) + (case right-value + (((undefined-value null-value)) (oneof normal false)) + ((boolean-value right-bool boolean) + (letexc (left-number double (coerce-to-double left-value)) + (oneof normal (double-equal left-number (coerce-boolean-to-double right-bool))))) + ((double-value right-number double) + (letexc (left-number double (coerce-to-double left-value)) + (oneof normal (double-equal left-number right-number)))) + ((string-value right-str string) + (oneof normal (compare-strings left-str right-str false true false))) + (object-value + (letexc (right-primitive value (coerce-to-primitive right-value (oneof no-hint))) + (compare-values left-value right-primitive))))) + ((object-value left-obj object) + (case right-value + (((undefined-value null-value)) (oneof normal false)) + ((boolean-value right-bool boolean) + (letexc (left-primitive value (coerce-to-primitive left-value (oneof no-hint))) + (compare-values left-primitive (oneof double-value (coerce-boolean-to-double right-bool))))) + (((double-value string-value)) + (letexc (left-primitive value (coerce-to-primitive left-value (oneof no-hint))) + (compare-values left-primitive right-value))) + ((object-value right-obj object) + (oneof normal (address-equal (& properties left-obj) (& properties right-obj)))))))) + + (define (compare-double-to-value (left-number double) (right-value value)) boolean-or-exception + (case right-value + (((undefined-value null-value)) (oneof normal false)) + (((boolean-value double-value string-value)) + (letexc (right-number double (coerce-to-double right-value)) + (oneof normal (double-equal left-number right-number)))) + (object-value + (letexc (right-primitive value (coerce-to-primitive right-value (oneof no-hint))) + (compare-double-to-value left-number right-primitive))))) + + (define (double-equal (x double) (y double)) boolean + (double-compare x y false true false false)) + + (define (strict-compare-values (left-value value) (right-value value)) boolean + (case left-value + (undefined-value + (is undefined-value right-value)) + (null-value + (is null-value right-value)) + ((boolean-value left-bool boolean) + (case right-value + ((boolean-value right-bool boolean) (not (xor left-bool right-bool))) + (((undefined-value null-value double-value string-value object-value)) false))) + ((double-value left-number double) + (case right-value + ((double-value right-number double) (double-equal left-number right-number)) + (((undefined-value null-value boolean-value string-value object-value)) false))) + ((string-value left-str string) + (case right-value + ((string-value right-str string) + (compare-strings left-str right-str false true false)) + (((undefined-value null-value boolean-value double-value object-value)) false))) + ((object-value left-obj object) + (case right-value + ((object-value right-obj object) + (address-equal (& properties left-obj) (& properties right-obj))) + (((undefined-value null-value boolean-value double-value string-value)) false))))) + + (%section "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 + (eval (eval :equality-expression))) + (production (:bitwise-and-expression :expr-kind) ((:bitwise-and-expression any-value) & (:equality-expression any-value)) bitwise-and-expression-and + ((eval (e env)) + (letexc (left-value value ((eval :bitwise-and-expression) e)) + (letexc (right-value value ((eval :equality-expression) e)) + (apply-binary-bitwise-operator bitwise-and left-value right-value))))) + + (declare-action eval (:bitwise-xor-expression :expr-kind) (-> (env) value-or-exception)) + (production (:bitwise-xor-expression :expr-kind) ((:bitwise-and-expression :expr-kind)) bitwise-xor-expression-bitwise-and + (eval (eval :bitwise-and-expression))) + (production (:bitwise-xor-expression :expr-kind) ((:bitwise-xor-expression any-value) ^ (:bitwise-and-expression any-value)) bitwise-xor-expression-xor + ((eval (e env)) + (letexc (left-value value ((eval :bitwise-xor-expression) e)) + (letexc (right-value value ((eval :bitwise-and-expression) e)) + (apply-binary-bitwise-operator bitwise-xor left-value right-value))))) + + (declare-action eval (:bitwise-or-expression :expr-kind) (-> (env) value-or-exception)) + (production (:bitwise-or-expression :expr-kind) ((:bitwise-xor-expression :expr-kind)) bitwise-or-expression-bitwise-xor + (eval (eval :bitwise-xor-expression))) + (production (:bitwise-or-expression :expr-kind) ((:bitwise-or-expression any-value) \| (:bitwise-xor-expression any-value)) bitwise-or-expression-or + ((eval (e env)) + (letexc (left-value value ((eval :bitwise-or-expression) e)) + (letexc (right-value value ((eval :bitwise-xor-expression) e)) + (apply-binary-bitwise-operator bitwise-or left-value right-value))))) + (%print-actions) + + (define (apply-binary-bitwise-operator (operator (-> (integer integer) integer)) (left-value value) (right-value value)) value-or-exception + (letexc (left-int integer (coerce-to-int32 left-value)) + (letexc (right-int integer (coerce-to-int32 right-value)) + (integer-result (operator left-int right-int))))) + + (%section "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 + (eval (eval :bitwise-or-expression))) + (production (:logical-and-expression :expr-kind) ((:logical-and-expression any-value) && (:bitwise-or-expression any-value)) logical-and-expression-and + ((eval (e env)) + (letexc (left-value value ((eval :logical-and-expression) e)) + (if (coerce-to-boolean left-value) + ((eval :bitwise-or-expression) e) + (oneof normal left-value))))) + + (declare-action eval (:logical-or-expression :expr-kind) (-> (env) value-or-exception)) + (production (:logical-or-expression :expr-kind) ((:logical-and-expression :expr-kind)) logical-or-expression-logical-and + (eval (eval :logical-and-expression))) + (production (:logical-or-expression :expr-kind) ((:logical-or-expression any-value) \|\| (:logical-and-expression any-value)) logical-or-expression-or + ((eval (e env)) + (letexc (left-value value ((eval :logical-or-expression) e)) + (if (coerce-to-boolean left-value) + (oneof normal left-value) + ((eval :logical-and-expression) e))))) + (%print-actions) + + (%section "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 + (eval (eval :logical-or-expression))) + (production (:conditional-expression :expr-kind) ((:logical-or-expression any-value) ? (:assignment-expression any-value) \: (:assignment-expression any-value)) conditional-expression-conditional + ((eval (e env)) + (letexc (condition value ((eval :logical-or-expression) e)) + (if (coerce-to-boolean condition) + ((eval :assignment-expression 1) e) + ((eval :assignment-expression 2) e))))) + (%print-actions) + + (%section "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 + (eval (eval :conditional-expression))) + (production (:assignment-expression :expr-kind) (:lvalue = (:assignment-expression any-value)) assignment-expression-assignment + ((eval (e env)) + (letexc (left-reference reference ((eval :lvalue) e)) + (letexc (right-value value ((eval :assignment-expression) e)) + (letexc (u void (reference-put-value left-reference right-value) :unused) + (oneof normal right-value)))))) + #| + (production (:assignment-expression :expr-kind) (:lvalue :compound-assignment (:assignment-expression any-value)) assignment-expression-compound-assignment + ((eval (e env)) + (letexc (left-reference reference ((eval :lvalue) e)) + (letexc (left-value value (reference-get-value left-reference)) + (letexc (right-value value ((eval :assignment-expression) e)) + (letexc (res-value ((compound-operator :compound-assignment) left-value right-value)) + (letexc (u void (reference-put-value left-reference res-value) :unused) + (oneof normal res-value)))))))) + + (declare-action compound-operator :compound-assignment (-> (value value) value-or-exception)) + (production :compound-assignment (*=) compound-assignment-multiply + (compound-operator (binary-double-compound-operator double-multiply))) + (production :compound-assignment (/=) compound-assignment-divide + (compound-operator (binary-double-compound-operator double-divide))) + (production :compound-assignment (%=) compound-assignment-remainder + (compound-operator (binary-double-compound-operator double-remainder))) + (production :compound-assignment (+=) compound-assignment-add + (compound-operator (binary-double-compound-operator double-remainder))) + (production :compound-assignment (-=) compound-assignment-subtract + (compound-operator (binary-double-compound-operator double-subtract))) + (%print-actions) + + (define (binary-double-compound-operator (operator (-> (double double) double))) (-> (value value) value-or-exception) + (lambda ((left-value value) (right-value value)) + (letexc (left-number double (coerce-to-double left-value)) + (letexc (right-number double (coerce-to-double right-value)) + (oneof normal (oneof double-value (operator left-number right-number))))))) + |# + (%section "Expressions") + + (declare-action eval (:comma-expression :expr-kind) (-> (env) value-or-exception)) + (production (:comma-expression :expr-kind) ((:assignment-expression :expr-kind)) comma-expression-assignment + (eval (eval :assignment-expression))) + (%print-actions) + + (declare-action eval :expression (-> (env) value-or-exception)) + (production :expression ((:comma-expression any-value)) expression-comma-expression + (eval (eval :comma-expression))) + (%print-actions) + + (%section "Programs") + + (declare-action eval :program value-or-exception) + (production :program (:expression $end) program + (eval ((eval :expression) (tuple env (oneof null-object-or-null))))) + ))) + + (defparameter *gg* (world-grammar *gw* 'code-grammar))) + + +(defun token-terminal (token) + (if (symbolp token) + token + (car token))) + +(defun ecma-parse-tokens (tokens &key trace) + (action-parse *gg* #'token-terminal tokens :trace trace)) + + +(defun ecma-parse (string &key trace) + (let ((tokens (tokenize string))) + (when trace + (format *trace-output* "~S~%" tokens)) + (action-parse *gg* #'token-terminal tokens :trace trace))) + + +; Same as ecma-parse except that also print the action results nicely. +(defun ecma-pparse (string &key (stream t) trace) + (multiple-value-bind (results types) (ecma-parse string :trace trace) + (print-values results types stream) + (terpri stream) + (values results types))) + + +#| +(depict-rtf-to-local-file + "ECMA Grammar.rtf" + #'(lambda (rtf-stream) + (depict-world-commands rtf-stream *gw*))) + +(depict-html-to-local-file + "ECMA Grammar.html" + #'(lambda (rtf-stream) + (depict-world-commands rtf-stream *gw*)) + "ECMA Grammar") + +(with-local-output (s "ECMA Grammar.txt") (print-grammar *gg* s)) + + +(ecma-pparse "('abc')") +(ecma-pparse "!~ 352") +(ecma-pparse "1e308%.125") +(ecma-pparse "-3>>>10-6") +(ecma-pparse "-3>>0") +(ecma-pparse "1+2*3|16") +(ecma-pparse "1==true") +(ecma-pparse "1=true") +(ecma-pparse "x=true") +(ecma-pparse "2*4+17+0x32") +(ecma-pparse "+'ab'+'de'") +|# diff --git a/mozilla/js2/semantics/ECMA Grammar.rtf b/mozilla/js2/semantics/ECMA Grammar.rtf new file mode 100644 index 00000000000..a72cfd4999b --- /dev/null +++ b/mozilla/js2/semantics/ECMA Grammar.rtf @@ -0,0 +1,1860 @@ +{\rtf1\mac\ansicpg10000\uc1\deff0\deflang2057\deflangfe2057 +{\fonttbl{\f0\froman\fcharset256\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\f3\ftech\fcharset2\fprq2 Symbol;}{\f4\fnil\fcharset256\fprq2 Helvetica;} +{\f5\fmodern\fcharset256\fprq2 Courier New;}{\f6\fnil\fcharset256\fprq2 Palatino;} +{\f7\fscript\fcharset256\fprq2 Zapf Chancery;}{\f8\ftech\fcharset2\fprq2 Zapf Dingbats;}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; +\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0 +\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0 +\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;} +{\stylesheet{\widctlpar\fs20\lang2057\snext0 Normal;} +{\s1\qj\sa120\widctlpar\fs20\lang2057\sbasedon0\snext1 Body Text;} +{\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057\sbasedon3\snext1 heading 3;} +{\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057\sbasedon0\snext1 heading 4;} +{\s10\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext10 Grammar;} +{\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057\sbasedon0\snext12 Grammar Header;} +{\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext14 Grammar LHS;} +{\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar LHS Last;} +{\s14\fi-1260\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon10\snext14 Grammar +RHS;} +{\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon14\snext12 Grammar +RHS Last;} +{\s16\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar Argument;} +{\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext20 Semantics;} +{\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon20\snext21 Semantics Next;} +{\*\cs30\additive Default Paragraph Font;} +{\*\cs31\b\f5\cf2\lang1024\additive\sbasedon30 Character Literal;} +{\*\cs32\b0\f0\cf9\additive\sbasedon30 Character Literal Control;} +{\*\cs33\b\f6\cf10\lang1024\additive\sbasedon30 Terminal;} +{\*\cs34\b\f5\cf2\lang1024\additive\sbasedon33 Terminal Keyword;} +{\*\cs35\i\f6\cf13\lang1024\additive\sbasedon30 Nonterminal;} +{\*\cs36\i0\additive\sbasedon30 Nonterminal Attribute;} +{\*\cs37\additive\sbasedon30 Nonterminal Argument;} +{\*\cs40\b\f0\additive\sbasedon30 Semantic Keyword;} +{\*\cs41\f0\cf6\lang1024\additive\sbasedon30 Type Expression;} +{\*\cs42\scaps\f0\cf6\lang1024\additive\sbasedon41 Type Name;} +{\*\cs43\f4\cf6\lang1024\additive\sbasedon41 Field Name;} +{\*\cs44\i\f0\cf11\lang1024\additive\sbasedon30 Global Variable;} +{\*\cs45\i\f0\cf4\lang1024\additive\sbasedon30 Local Variable;} +{\*\cs46\f7\cf12\lang1024\additive\sbasedon30 Action Name;}} +\widowctrl\ftnbj\aenddoc\fet0\formshade\viewkind4\viewscale125\pgbrdrhead\pgbrdrfoot\sectd\pard +\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Types\par\pard\plain\s11\sb60 +\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 Value}\line = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{\line {\cs43\f4\cf6\lang1024 undefinedValue}; +\line {\cs43\f4\cf6\lang1024 nullValue};\line +{\cs43\f4\cf6\lang1024 booleanValue}: {\cs42\scaps\f0\cf6\lang1024 Boolean};\line +{\cs43\f4\cf6\lang1024 doubleValue}: {\cs42\scaps\f0\cf6\lang1024 Double};\line +{\cs43\f4\cf6\lang1024 stringValue}: {\cs42\scaps\f0\cf6\lang1024 String};\line +{\cs43\f4\cf6\lang1024 objectValue}: {\cs42\scaps\f0\cf6\lang1024 Object}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 ObjectOrNull} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 nullObjectOrNull}; +{\cs43\f4\cf6\lang1024 objectObjectOrNull}: {\cs42\scaps\f0\cf6\lang1024 Object}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 Object}\line = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 tuple} \{\line {\cs43\f4\cf6\lang1024 properties}: +{\cs42\scaps\f0\cf6\lang1024 Property}[] +{\field{\*\fldinst SYMBOL 173 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}};\line +{\cs43\f4\cf6\lang1024 typeofName}: {\cs42\scaps\f0\cf6\lang1024 String};\line +{\cs43\f4\cf6\lang1024 prototype}: {\cs42\scaps\f0\cf6\lang1024 ObjectOrNull};\line +{\cs43\f4\cf6\lang1024 get}: {\cs42\scaps\f0\cf6\lang1024 PropName} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 ValueOrException};\line {\cs43\f4\cf6\lang1024 put}: +{\cs42\scaps\f0\cf6\lang1024 PropName} +{\field{\*\fldinst SYMBOL 180 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 Value} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 VoidOrException};\line {\cs43\f4\cf6\lang1024 delete}: +{\cs42\scaps\f0\cf6\lang1024 PropName} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 BooleanOrException};\line {\cs43\f4\cf6\lang1024 call}: +{\cs42\scaps\f0\cf6\lang1024 ObjectOrNull} +{\field{\*\fldinst SYMBOL 180 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 Value}[] +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 ReferenceOrException};\line +{\cs43\f4\cf6\lang1024 construct}: {\cs42\scaps\f0\cf6\lang1024 Value}[] +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 ObjectOrException};\line +{\cs43\f4\cf6\lang1024 defaultValue}: {\cs42\scaps\f0\cf6\lang1024 DefaultValueHint} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 ValueOrException}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 DefaultValueHint} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 noHint}; +{\cs43\f4\cf6\lang1024 numberHint}; {\cs43\f4\cf6\lang1024 stringHint}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 Property}\line = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 tuple} \{\line {\cs43\f4\cf6\lang1024 name}: +{\cs42\scaps\f0\cf6\lang1024 String};\line {\cs43\f4\cf6\lang1024 readOnly}: +{\cs42\scaps\f0\cf6\lang1024 Boolean};\line {\cs43\f4\cf6\lang1024 enumerable}: +{\cs42\scaps\f0\cf6\lang1024 Boolean};\line {\cs43\f4\cf6\lang1024 permanent}: +{\cs42\scaps\f0\cf6\lang1024 Boolean};\line {\cs43\f4\cf6\lang1024 value}: +{\cs42\scaps\f0\cf6\lang1024 Value} +{\field{\*\fldinst SYMBOL 173 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 PropName} = {\cs42\scaps\f0\cf6\lang1024 String} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 Place} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 tuple} \{{\cs43\f4\cf6\lang1024 base}: +{\cs42\scaps\f0\cf6\lang1024 Object}; {\cs43\f4\cf6\lang1024 property}: +{\cs42\scaps\f0\cf6\lang1024 PropName}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 Reference}\line = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 valueReference}: +{\cs42\scaps\f0\cf6\lang1024 Value}; {\cs43\f4\cf6\lang1024 placeReference}: +{\cs42\scaps\f0\cf6\lang1024 Place}; {\cs43\f4\cf6\lang1024 virtualReference}: +{\cs42\scaps\f0\cf6\lang1024 PropName}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 IntegerOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 Integer}; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 VoidOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}; +{\cs43\f4\cf6\lang1024 abrupt}: {\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 BooleanOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 DoubleOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 Double}; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 StringOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 String}; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 ObjectOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 Object}; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 Value}; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 ReferenceOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 Reference}; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 ValueListOrException} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 normal}: +{\cs42\scaps\f0\cf6\lang1024 Value}[]; {\cs43\f4\cf6\lang1024 abrupt}: +{\cs42\scaps\f0\cf6\lang1024 Exception}\}} +\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Helper Functions\par +\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20 +\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs44\i\f0\cf11\lang1024 objectOrNullToValue}({\cs45\i\f0\cf4\lang1024 o}: +{\cs42\scaps\f0\cf6\lang1024 ObjectOrNull}) : {\cs42\scaps\f0\cf6\lang1024 Value}\line = +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 o} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 nullObjectOrNull}: {\cs43\f4\cf6\lang1024 nullValue};\line +{\cs43\f4\cf6\lang1024 objectObjectOrNull}({\cs45\i\f0\cf4\lang1024 obj}: +{\cs42\scaps\f0\cf6\lang1024 Object}): {\cs43\f4\cf6\lang1024 objectValue} +{\cs45\i\f0\cf4\lang1024 obj}\line {\cs40\b\f0 end}\par +{\cs44\i\f0\cf11\lang1024 undefinedResult} : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs43\f4\cf6\lang1024 normal} {\cs43\f4\cf6\lang1024 undefinedValue}\par +{\cs44\i\f0\cf11\lang1024 nullResult} : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs43\f4\cf6\lang1024 normal} {\cs43\f4\cf6\lang1024 nullValue}\par +{\cs44\i\f0\cf11\lang1024 booleanResult}({\cs45\i\f0\cf4\lang1024 b}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}) : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs43\f4\cf6\lang1024 normal} {\cs43\f4\cf6\lang1024 booleanValue} {\cs45\i\f0\cf4\lang1024 b}\par +{\cs44\i\f0\cf11\lang1024 doubleResult}({\cs45\i\f0\cf4\lang1024 d}: +{\cs42\scaps\f0\cf6\lang1024 Double}) : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs43\f4\cf6\lang1024 normal} {\cs43\f4\cf6\lang1024 doubleValue} {\cs45\i\f0\cf4\lang1024 d}\par +{\cs44\i\f0\cf11\lang1024 integerResult}({\cs45\i\f0\cf4\lang1024 i}: +{\cs42\scaps\f0\cf6\lang1024 Integer}) : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs44\i\f0\cf11\lang1024 doubleResult}({\cs44\i\f0\cf11\lang1024 rationalToDouble}( +{\cs45\i\f0\cf4\lang1024 i}))\par{\cs44\i\f0\cf11\lang1024 stringResult}({\cs45\i\f0\cf4\lang1024 s} +: {\cs42\scaps\f0\cf6\lang1024 String}) : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs43\f4\cf6\lang1024 normal} {\cs43\f4\cf6\lang1024 stringValue} {\cs45\i\f0\cf4\lang1024 s}\par +{\cs44\i\f0\cf11\lang1024 objectResult}({\cs45\i\f0\cf4\lang1024 o}: +{\cs42\scaps\f0\cf6\lang1024 Object}) : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} = +{\cs43\f4\cf6\lang1024 normal} {\cs43\f4\cf6\lang1024 objectValue} {\cs45\i\f0\cf4\lang1024 o}\par +\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Exceptions\par\pard\plain +\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60 +\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 type} +{\cs42\scaps\f0\cf6\lang1024 Exception} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{{\cs43\f4\cf6\lang1024 exception}: +{\cs42\scaps\f0\cf6\lang1024 Value}; {\cs43\f4\cf6\lang1024 error}: +{\cs42\scaps\f0\cf6\lang1024 Error}\}} +\par{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 Error}\line = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{\line +{\cs43\f4\cf6\lang1024 coerceToPrimitiveError};\line +{\cs43\f4\cf6\lang1024 coerceToObjectError};\line {\cs43\f4\cf6\lang1024 getValueError}; +\line {\cs43\f4\cf6\lang1024 putValueError};\line +{\cs43\f4\cf6\lang1024 deleteError}\}} +\par{\cs44\i\f0\cf11\lang1024 makeError}({\cs45\i\f0\cf4\lang1024 err}: +{\cs42\scaps\f0\cf6\lang1024 Error}) : {\cs42\scaps\f0\cf6\lang1024 Exception} = +{\cs43\f4\cf6\lang1024 error} {\cs45\i\f0\cf4\lang1024 err}\par\pard\plain\s2\sa60\keep\keepn +\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Objects\par Conversions\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs44\i\f0\cf11\lang1024 referenceGetValue}( +{\cs45\i\f0\cf4\lang1024 rv}: {\cs42\scaps\f0\cf6\lang1024 Reference}) : +{\cs42\scaps\f0\cf6\lang1024 ValueOrException}\line = {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 rv} {\cs40\b\f0 of}\line {\cs43\f4\cf6\lang1024 valueReference}( +{\cs45\i\f0\cf4\lang1024 v}: {\cs42\scaps\f0\cf6\lang1024 Value}): {\cs43\f4\cf6\lang1024 normal} +{\cs45\i\f0\cf4\lang1024 v};\line {\cs43\f4\cf6\lang1024 placeReference}( +{\cs45\i\f0\cf4\lang1024 r}: {\cs42\scaps\f0\cf6\lang1024 Place}): {\cs45\i\f0\cf4\lang1024 r}. +{\cs43\f4\cf6\lang1024 base}.{\cs43\f4\cf6\lang1024 get}({\cs45\i\f0\cf4\lang1024 r}. +{\cs43\f4\cf6\lang1024 property});\line {\cs43\f4\cf6\lang1024 virtualReference}: +{\cs43\f4\cf6\lang1024 abrupt}{\sub\cs42\scaps\f0\cf6\lang1024 ValueOrException} +{\cs44\i\f0\cf11\lang1024 makeError}({\cs43\f4\cf6\lang1024 getValueError})\line +{\cs40\b\f0 end}\par{\cs44\i\f0\cf11\lang1024 referencePutValue}({\cs45\i\f0\cf4\lang1024 rv}: +{\cs42\scaps\f0\cf6\lang1024 Reference}, {\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 VoidOrException}\line = +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rv} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 valueReference}: {\cs43\f4\cf6\lang1024 abrupt} +{\sub\cs42\scaps\f0\cf6\lang1024 VoidOrException} {\cs44\i\f0\cf11\lang1024 makeError}( +{\cs43\f4\cf6\lang1024 putValueError});\line {\cs43\f4\cf6\lang1024 placeReference}( +{\cs45\i\f0\cf4\lang1024 r}: {\cs42\scaps\f0\cf6\lang1024 Place}): {\cs45\i\f0\cf4\lang1024 r}. +{\cs43\f4\cf6\lang1024 base}.{\cs43\f4\cf6\lang1024 put}({\cs45\i\f0\cf4\lang1024 r}. +{\cs43\f4\cf6\lang1024 property}, {\cs45\i\f0\cf4\lang1024 v});\line +{\cs43\f4\cf6\lang1024 virtualReference}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\line {\cs40\b\f0 end} +\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Coercions\par\pard +\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs44\i\f0\cf11\lang1024 coerceToBoolean}( +{\cs45\i\f0\cf4\lang1024 v}: {\cs42\scaps\f0\cf6\lang1024 Value}) : +{\cs42\scaps\f0\cf6\lang1024 Boolean}\line = {\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 v} +{\cs40\b\f0 of}\line {\cs43\f4\cf6\lang1024 undefinedValue}, +{\cs43\f4\cf6\lang1024 nullValue}: {\cs44\i\f0\cf11\lang1024 false};\line +{\cs43\f4\cf6\lang1024 booleanValue}({\cs45\i\f0\cf4\lang1024 b}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}): {\cs45\i\f0\cf4\lang1024 b};\line +{\cs43\f4\cf6\lang1024 doubleValue}({\cs45\i\f0\cf4\lang1024 d}: +{\cs42\scaps\f0\cf6\lang1024 Double}): {\cs40\b\f0 not} ({\cs44\i\f0\cf11\lang1024 doubleIsZero}( +{\cs45\i\f0\cf4\lang1024 d}) {\cs40\b\f0 or} {\cs44\i\f0\cf11\lang1024 doubleIsNan}( +{\cs45\i\f0\cf4\lang1024 d}));\line {\cs43\f4\cf6\lang1024 stringValue}( +{\cs45\i\f0\cf4\lang1024 s}: {\cs42\scaps\f0\cf6\lang1024 String}): +{\cs44\i\f0\cf11\lang1024 length}({\cs45\i\f0\cf4\lang1024 s}) \u8800\'AD 0;\line +{\cs43\f4\cf6\lang1024 objectValue}: {\cs44\i\f0\cf11\lang1024 true}\line {\cs40\b\f0 end} +\par{\cs44\i\f0\cf11\lang1024 coerceBooleanToDouble}({\cs45\i\f0\cf4\lang1024 b}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}) : {\cs42\scaps\f0\cf6\lang1024 Double}\line = +{\cs40\b\f0 if} {\cs45\i\f0\cf4\lang1024 b}\line {\cs40\b\f0 then} 1.0\line +{\cs40\b\f0 else} 0.0\par{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 DoubleOrException}\line = +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 v} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}: {\cs43\f4\cf6\lang1024 normal} NaN;\line +{\cs43\f4\cf6\lang1024 nullValue}: {\cs43\f4\cf6\lang1024 normal} 0.0;\line +{\cs43\f4\cf6\lang1024 booleanValue}({\cs45\i\f0\cf4\lang1024 b}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}): {\cs43\f4\cf6\lang1024 normal} +{\cs44\i\f0\cf11\lang1024 coerceBooleanToDouble}({\cs45\i\f0\cf4\lang1024 b});\line +{\cs43\f4\cf6\lang1024 doubleValue}({\cs45\i\f0\cf4\lang1024 d}: +{\cs42\scaps\f0\cf6\lang1024 Double}): {\cs43\f4\cf6\lang1024 normal} {\cs45\i\f0\cf4\lang1024 d}; +\line {\cs43\f4\cf6\lang1024 stringValue}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}};\line +{\cs43\f4\cf6\lang1024 objectValue}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\line {\cs40\b\f0 end} +\par{\cs44\i\f0\cf11\lang1024 coerceToUint32}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 IntegerOrException}\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 d}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 v})\line {\cs40\b\f0 in} +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 doubleToUint32}({\cs45\i\f0\cf4\lang1024 d} +)\par{\cs44\i\f0\cf11\lang1024 coerceToInt32}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 IntegerOrException}\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 d}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 v})\line {\cs40\b\f0 in} +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 uint32ToInt32}( +{\cs44\i\f0\cf11\lang1024 doubleToUint32}({\cs45\i\f0\cf4\lang1024 d}))\par +{\cs44\i\f0\cf11\lang1024 uint32ToInt32}({\cs45\i\f0\cf4\lang1024 ui}: +{\cs42\scaps\f0\cf6\lang1024 Integer}) : {\cs42\scaps\f0\cf6\lang1024 Integer}\line = +{\cs40\b\f0 if} {\cs45\i\f0\cf4\lang1024 ui} < 2147483648\line {\cs40\b\f0 then} +{\cs45\i\f0\cf4\lang1024 ui}\line {\cs40\b\f0 else} {\cs45\i\f0\cf4\lang1024 ui} \endash 42949 +67296\par{\cs44\i\f0\cf11\lang1024 coerceToString}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 StringOrException}\line = +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 v} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}: {\cs43\f4\cf6\lang1024 normal} \ldblquote +{\cs31\b\f5\cf2\lang1024 undefined}\rdblquote;\line {\cs43\f4\cf6\lang1024 nullValue}: +{\cs43\f4\cf6\lang1024 normal} \ldblquote{\cs31\b\f5\cf2\lang1024 null}\rdblquote;\line +{\cs43\f4\cf6\lang1024 booleanValue}({\cs45\i\f0\cf4\lang1024 b}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}):\line {\cs40\b\f0 if} +{\cs45\i\f0\cf4\lang1024 b}\line {\cs40\b\f0 then} {\cs43\f4\cf6\lang1024 normal} +\ldblquote{\cs31\b\f5\cf2\lang1024 true}\rdblquote\line {\cs40\b\f0 else} +{\cs43\f4\cf6\lang1024 normal} \ldblquote{\cs31\b\f5\cf2\lang1024 false}\rdblquote;\line +{\cs43\f4\cf6\lang1024 doubleValue}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}};\line +{\cs43\f4\cf6\lang1024 stringValue}({\cs45\i\f0\cf4\lang1024 s}: +{\cs42\scaps\f0\cf6\lang1024 String}): {\cs43\f4\cf6\lang1024 normal} {\cs45\i\f0\cf4\lang1024 s}; +\line {\cs43\f4\cf6\lang1024 objectValue}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\line {\cs40\b\f0 end} +\par{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}, {\cs45\i\f0\cf4\lang1024 hint}: +{\cs42\scaps\f0\cf6\lang1024 DefaultValueHint}) : {\cs42\scaps\f0\cf6\lang1024 ValueOrException} +\line = {\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 v} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}: {\cs43\f4\cf6\lang1024 normal} {\cs45\i\f0\cf4\lang1024 v}; +\line {\cs43\f4\cf6\lang1024 objectValue}({\cs45\i\f0\cf4\lang1024 o}: +{\cs42\scaps\f0\cf6\lang1024 Object}):\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 pv}: {\cs42\scaps\f0\cf6\lang1024 Value} = {\cs45\i\f0\cf4\lang1024 o}. +{\cs43\f4\cf6\lang1024 defaultValue}({\cs45\i\f0\cf4\lang1024 hint})\line +{\cs40\b\f0 in} {\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 pv} {\cs40\b\f0 of}\line + {\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}:\line {\cs43\f4\cf6\lang1024 normal} +{\cs45\i\f0\cf4\lang1024 pv};\line {\cs43\f4\cf6\lang1024 objectValue}: +{\cs43\f4\cf6\lang1024 abrupt}{\sub\cs42\scaps\f0\cf6\lang1024 ValueOrException} +{\cs44\i\f0\cf11\lang1024 makeError}({\cs43\f4\cf6\lang1024 coerceToPrimitiveError})\line + {\cs40\b\f0 end}\line {\cs40\b\f0 end}\par +{\cs44\i\f0\cf11\lang1024 coerceToObject}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 ObjectOrException}\line = +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 v} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}: +{\cs43\f4\cf6\lang1024 abrupt}{\sub\cs42\scaps\f0\cf6\lang1024 ObjectOrException} +{\cs44\i\f0\cf11\lang1024 makeError}({\cs43\f4\cf6\lang1024 coerceToObjectError});\line +{\cs43\f4\cf6\lang1024 booleanValue}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}};\line +{\cs43\f4\cf6\lang1024 doubleValue}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}};\line +{\cs43\f4\cf6\lang1024 stringValue}: +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}};\line +{\cs43\f4\cf6\lang1024 objectValue}({\cs45\i\f0\cf4\lang1024 o}: +{\cs42\scaps\f0\cf6\lang1024 Object}): {\cs43\f4\cf6\lang1024 normal} {\cs45\i\f0\cf4\lang1024 o} +\line {\cs40\b\f0 end}\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24 +\lang2057 Environments\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Seman +tics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 type} +{\cs42\scaps\f0\cf6\lang1024 Env} = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 tuple} \{{\cs43\f4\cf6\lang1024 this}: +{\cs42\scaps\f0\cf6\lang1024 ObjectOrNull}\}} +\par{\cs44\i\f0\cf11\lang1024 lookupIdentifier}({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env}, {\cs45\i\f0\cf4\lang1024 id}: +{\cs42\scaps\f0\cf6\lang1024 String}) : {\cs42\scaps\f0\cf6\lang1024 ReferenceOrException} = +{\field{\*\fldinst SYMBOL 94 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s2\sa60\keep +\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Terminal Actions\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 EvalIdentifier}[ +{\cs33\b\f6\cf10\lang1024 Identifier}] : {\cs42\scaps\f0\cf6\lang1024 String}\par{\cs40\b\f0 action} + {\cs46\f7\cf12\lang1024 EvalNumber}[{\cs33\b\f6\cf10\lang1024 Number}] : +{\cs42\scaps\f0\cf6\lang1024 Double}\par{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 EvalString}[ +{\cs33\b\f6\cf10\lang1024 String}] : {\cs42\scaps\f0\cf6\lang1024 String}\par\pard\plain\s2\sa60 +\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Primary Expressions\par\pard\plain\s11\sb60 +\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 this}\par| +\tab{\cs34\b\f5\cf2\lang1024 null}\par|\tab{\cs34\b\f5\cf2\lang1024 true}\par|\tab +{\cs34\b\f5\cf2\lang1024 false}\par|\tab{\cs33\b\f6\cf10\lang1024 Number}\par|\tab +{\cs33\b\f6\cf10\lang1024 String}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024(} +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 noLValue} {\cs34\b\f5\cf2\lang1024)}\par +\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PrimaryLvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024 Identifier} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Lvalue} {\cs34\b\f5\cf2\lang1024)}\par\pard +\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 this} +]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) = {\cs43\f4\cf6\lang1024 normal} +{\cs44\i\f0\cf11\lang1024 objectOrNullToValue}({\cs45\i\f0\cf4\lang1024 e}. +{\cs43\f4\cf6\lang1024 this})\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 null} +]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) = +{\cs44\i\f0\cf11\lang1024 nullResult}\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 true} +]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) = +{\cs44\i\f0\cf11\lang1024 booleanResult}({\cs44\i\f0\cf11\lang1024 true})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 false}]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) = +{\cs44\i\f0\cf11\lang1024 booleanResult}({\cs44\i\f0\cf11\lang1024 false})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024 Number}]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) = + {\cs44\i\f0\cf11\lang1024 doubleResult}({\cs46\f7\cf12\lang1024 EvalNumber}[ +{\cs33\b\f6\cf10\lang1024 Number}])\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024 String}]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) = + {\cs44\i\f0\cf11\lang1024 stringResult}({\cs46\f7\cf12\lang1024 EvalString}[ +{\cs33\b\f6\cf10\lang1024 String}])\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024(} +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 noLValue} {\cs34\b\f5\cf2\lang1024)}] = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 noLValue}]\par +\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 PrimaryLvalue}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Re +ferenceOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryLvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024 Identifier}]({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs44\i\f0\cf11\lang1024 lookupIdentifier}( +{\cs45\i\f0\cf4\lang1024 e}, {\cs46\f7\cf12\lang1024 EvalIdentifier}[ +{\cs33\b\f6\cf10\lang1024 Identifier}])\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryLvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024(} +{\cs35\i\f6\cf13\lang1024 Lvalue} {\cs34\b\f5\cf2\lang1024)}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Lvalue}]\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b +\fs24\lang2057 Left-Side Expressions\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20 +\lang2057 Syntax\par\pard\plain\s16\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 206 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \{ +{\cs35\i\f6\cf13\lang1024\cs36\i0 anyValue}, {\cs35\i\f6\cf13\lang1024\cs36\i0 noLValue}\}\par +{\cs35\i\f6\cf13\lang1024\cs37 MemberExprKind} +{\field{\*\fldinst SYMBOL 206 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \{ +{\cs35\i\f6\cf13\lang1024\cs36\i0 call}, {\cs35\i\f6\cf13\lang1024\cs36\i0 noCall}\}\par\pard\plain +\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 noCall} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 PrimaryLvalue}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024[} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024]}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024.} {\cs33\b\f6\cf10\lang1024 Identifier}\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 call} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 Lvalue} +{\cs35\i\f6\cf13\lang1024 Arguments}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 noLValue} +{\cs35\i\f6\cf13\lang1024 Arguments}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 call},\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024[} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024]}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 call},\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024.} {\cs33\b\f6\cf10\lang1024 Identifier}\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 noLValue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 new} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 anyValue} +{\cs35\i\f6\cf13\lang1024 Arguments}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 anyValue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 noCall}\par\pard\plain\s15\fi-1260\li1800\sa120 +\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 new} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 anyValue} +{\cs35\i\f6\cf13\lang1024 Arguments}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 call},\cs36\i0 anyValue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 call}\par\pard\plain\s12\fi-1440\li1800\sb120 +\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs37 ExprKind}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs34\b\f5\cf2\lang1024 new} {\cs35\i\f6\cf13\lang1024 NewExpression\super\cs36\i0 anyValue}\par +\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Arguments} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024(} +{\cs34\b\f5\cf2\lang1024)}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0 +\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 ArgumentList} +{\cs34\b\f5\cf2\lang1024)}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ArgumentList} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ArgumentList} {\cs34\b\f5\cf2\lang1024,} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Lvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 call}\par\pard\plain\s15\fi-1260\li1800\sa120 +\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 noCall}\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs37 MemberExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Re +ferenceOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 noCall} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 PrimaryLvalue}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryLvalue}]\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 call} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Lvalue} {\cs35\i\f6\cf13\lang1024 Arguments}]({\cs45\i\f0\cf4\lang1024 e}: + {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 functionReference}: {\cs42\scaps\f0\cf6\lang1024 Reference} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line + {\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 function}: +{\cs42\scaps\f0\cf6\lang1024 Value} = {\cs44\i\f0\cf11\lang1024 referenceGetValue}( +{\cs45\i\f0\cf4\lang1024 functionReference})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 arguments}: {\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Value}[]} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Arguments}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 in} {\cs40\b\f0 let} {\cs45\i\f0\cf4\lang1024 this}: +{\cs42\scaps\f0\cf6\lang1024 ObjectOrNull}\line = {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 functionReference} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 valueReference}, {\cs43\f4\cf6\lang1024 virtualReference}: +{\cs43\f4\cf6\lang1024 nullObjectOrNull};\line +{\cs43\f4\cf6\lang1024 placeReference}({\cs45\i\f0\cf4\lang1024 p}: +{\cs42\scaps\f0\cf6\lang1024 Place}): {\cs43\f4\cf6\lang1024 objectObjectOrNull} +{\cs45\i\f0\cf4\lang1024 p}.{\cs43\f4\cf6\lang1024 base}\line {\cs40\b\f0 end} +\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 callObject}({\cs45\i\f0\cf4\lang1024 function}, + {\cs45\i\f0\cf4\lang1024 this}, {\cs45\i\f0\cf4\lang1024 arguments})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 call} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 noLValue} +{\cs35\i\f6\cf13\lang1024 Arguments}]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env} +)\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 function}: +{\cs42\scaps\f0\cf6\lang1024 Value} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs36\i0 noLValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 arguments}: {\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Value}[]} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Arguments}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 callObject}({\cs45\i\f0\cf4\lang1024 function}, + {\cs43\f4\cf6\lang1024 nullObjectOrNull}, {\cs45\i\f0\cf4\lang1024 arguments})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs37 MemberExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs37 MemberExprKind},\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024[} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024]}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 container}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs37 MemberExprKind},\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 property}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Expression}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 readProperty}( +{\cs45\i\f0\cf4\lang1024 container}, {\cs45\i\f0\cf4\lang1024 property})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs37 MemberExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs37 MemberExprKind},\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024.} {\cs33\b\f6\cf10\lang1024 Identifier}]\line ( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 container}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs37 MemberExprKind},\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 readProperty}( +{\cs45\i\f0\cf4\lang1024 container}, {\cs43\f4\cf6\lang1024 stringValue} +{\cs46\f7\cf12\lang1024 EvalIdentifier}[{\cs33\b\f6\cf10\lang1024 Identifier}])\par\pard\plain\s20 +\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs37 MemberExprKind},\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PrimaryRvalue}]\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs37 MemberExprKind},\cs36\i0 anyValue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs37 MemberExprKind}]({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 ref}: +{\cs42\scaps\f0\cf6\lang1024 Reference} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs37 MemberExprKind}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 referenceGetValue}( +{\cs45\i\f0\cf4\lang1024 ref})\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 new} +{\cs35\i\f6\cf13\lang1024 MemberExpression{\super{\cs36\i0 noCall},\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs35\i\f6\cf13\lang1024 Arguments}]\line ({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 constructor}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression{\super{\cs36\i0 noCall},\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 arguments}: {\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Value}[]} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Arguments}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 constructObject}( +{\cs45\i\f0\cf4\lang1024 constructor}, {\cs45\i\f0\cf4\lang1024 arguments})\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 noCall},\cs37 ExprKind}]\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 new} +{\cs35\i\f6\cf13\lang1024 NewExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 constructor}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 NewExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 constructObject}( +{\cs45\i\f0\cf4\lang1024 constructor}, {\b[]}{\sub\cs42\scaps\f0\cf6\lang1024 Value})\par\pard\plain +\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Arguments}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueListOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Arguments} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024(} +{\cs34\b\f5\cf2\lang1024)}]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) = +{\cs43\f4\cf6\lang1024 normal} {\b[]}{\sub\cs42\scaps\f0\cf6\lang1024 Value}\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Arguments} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024(} +{\cs35\i\f6\cf13\lang1024 ArgumentList} {\cs34\b\f5\cf2\lang1024)}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ArgumentList}]\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ArgumentList}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueListOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ArgumentList} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue}]({\cs45\i\f0\cf4\lang1024 e}: + {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 arg}: +{\cs42\scaps\f0\cf6\lang1024 Value} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 in} {\cs43\f4\cf6\lang1024 normal} {\b[}{\cs45\i\f0\cf4\lang1024 arg}{\b]} +\par{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ArgumentList} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ArgumentList\b0\i0\sub 1} {\cs34\b\f5\cf2\lang1024,} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue}]({\cs45\i\f0\cf4\lang1024 e}: + {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 args}: +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Value}[]} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ArgumentList\b0\i0\sub 1}]({\cs45\i\f0\cf4\lang1024 e})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 arg}: +{\cs42\scaps\f0\cf6\lang1024 Value} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 in} {\cs43\f4\cf6\lang1024 normal} ({\cs45\i\f0\cf4\lang1024 args} +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs45\i\f0\cf4\lang1024 arg}{\b]})\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Lvalue}] : + +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Re +ferenceOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Lvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 call}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 call}]\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Lvalue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 noCall}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberLvalue\super\cs36\i0 noCall}]\par\pard\plain\s20\li180\sb60\sa60 +\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs44\i\f0\cf11\lang1024 readProperty}( +{\cs45\i\f0\cf4\lang1024 container}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 property}: {\cs42\scaps\f0\cf6\lang1024 Value}) : +{\cs42\scaps\f0\cf6\lang1024 ReferenceOrException}\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 obj}: {\cs42\scaps\f0\cf6\lang1024 Object} = +{\cs44\i\f0\cf11\lang1024 coerceToObject}({\cs45\i\f0\cf4\lang1024 container})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 name}: +{\cs42\scaps\f0\cf6\lang1024 PropName} = {\cs44\i\f0\cf11\lang1024 coerceToString}( +{\cs45\i\f0\cf4\lang1024 property})\line {\cs40\b\f0 in} {\cs43\f4\cf6\lang1024 normal} +{\cs43\f4\cf6\lang1024 placeReference} +{\b{\field{\*\fldinst SYMBOL 225 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +{\cs45\i\f0\cf4\lang1024 obj}, {\cs45\i\f0\cf4\lang1024 name} +{\b{\field{\*\fldinst SYMBOL 241 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +{\sub\cs42\scaps\f0\cf6\lang1024 Place}\par{\cs44\i\f0\cf11\lang1024 callObject}( +{\cs45\i\f0\cf4\lang1024 function}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 this}: {\cs42\scaps\f0\cf6\lang1024 ObjectOrNull}, +{\cs45\i\f0\cf4\lang1024 arguments}: {\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Value}[]}) : + {\cs42\scaps\f0\cf6\lang1024 ReferenceOrException}\line = {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 function} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}:\line {\cs43\f4\cf6\lang1024 abrupt} +{\sub\cs42\scaps\f0\cf6\lang1024 ReferenceOrException} {\cs44\i\f0\cf11\lang1024 makeError}( +{\cs43\f4\cf6\lang1024 coerceToObjectError});\line {\cs43\f4\cf6\lang1024 objectValue}( +{\cs45\i\f0\cf4\lang1024 o}: {\cs42\scaps\f0\cf6\lang1024 Object}): {\cs45\i\f0\cf4\lang1024 o}. +{\cs43\f4\cf6\lang1024 call}({\cs45\i\f0\cf4\lang1024 this}, {\cs45\i\f0\cf4\lang1024 arguments}) +\line {\cs40\b\f0 end}\par{\cs44\i\f0\cf11\lang1024 constructObject}( +{\cs45\i\f0\cf4\lang1024 constructor}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 arguments}: {\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Value}[]}) : + {\cs42\scaps\f0\cf6\lang1024 ValueOrException}\line = {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 constructor} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}:\line {\cs43\f4\cf6\lang1024 abrupt} +{\sub\cs42\scaps\f0\cf6\lang1024 ValueOrException} {\cs44\i\f0\cf11\lang1024 makeError}( +{\cs43\f4\cf6\lang1024 coerceToObjectError});\line {\cs43\f4\cf6\lang1024 objectValue}( +{\cs45\i\f0\cf4\lang1024 o}: {\cs42\scaps\f0\cf6\lang1024 Object}):\line +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 res}: {\cs42\scaps\f0\cf6\lang1024 Object} = +{\cs45\i\f0\cf4\lang1024 o}.{\cs43\f4\cf6\lang1024 construct}({\cs45\i\f0\cf4\lang1024 arguments}) +\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 objectResult}( +{\cs45\i\f0\cf4\lang1024 res})\line {\cs40\b\f0 end}\par\pard\plain\s2\sa60\keep\keepn +\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Postfix Expressions\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs36\i0 anyValue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs36\i0 anyValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 call},\cs36\i0 anyValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 Lvalue} {\cs34\b\f5\cf2\lang1024 ++}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 Lvalue} +{\cs34\b\f5\cf2\lang1024 --}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs36\i0 noLValue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs36\i0 noLValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 Lvalue} {\cs34\b\f5\cf2\lang1024 ++}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 Lvalue} +{\cs34\b\f5\cf2\lang1024 --}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20 +\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs37 ExprKind}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 NewExpression\super\cs37 ExprKind}]\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs36\i0 anyValue} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 call},\cs36\i0 anyValue}]\line = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MemberExpression\super{\cs36\i0 call},\cs36\i0 anyValue}]\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Lvalue} {\cs34\b\f5\cf2\lang1024 ++}]({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operandReference}: {\cs42\scaps\f0\cf6\lang1024 Reference} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line + {\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operandValue}: +{\cs42\scaps\f0\cf6\lang1024 Value} = {\cs44\i\f0\cf11\lang1024 referenceGetValue}( +{\cs45\i\f0\cf4\lang1024 operandReference})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operand}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 operandValue})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 u}: {\cs42\scaps\f0\cf6\lang1024 Void} +\line = {\cs44\i\f0\cf11\lang1024 referencePutValue}( +{\cs45\i\f0\cf4\lang1024 operandReference}, {\cs43\f4\cf6\lang1024 doubleValue} +{\cs44\i\f0\cf11\lang1024 doubleAdd}({\cs45\i\f0\cf4\lang1024 operand}, 1.0))\line +{\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 doubleResult}({\cs45\i\f0\cf4\lang1024 operand})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Lvalue} {\cs34\b\f5\cf2\lang1024 --}]({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operandReference}: {\cs42\scaps\f0\cf6\lang1024 Reference} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line + {\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operandValue}: +{\cs42\scaps\f0\cf6\lang1024 Value} = {\cs44\i\f0\cf11\lang1024 referenceGetValue}( +{\cs45\i\f0\cf4\lang1024 operandReference})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operand}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 operandValue})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 u}: {\cs42\scaps\f0\cf6\lang1024 Void} +\line = {\cs44\i\f0\cf11\lang1024 referencePutValue}( +{\cs45\i\f0\cf4\lang1024 operandReference}, {\cs43\f4\cf6\lang1024 doubleValue} +{\cs44\i\f0\cf11\lang1024 doubleSubtract}({\cs45\i\f0\cf4\lang1024 operand}, 1.0))\line +{\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 doubleResult}({\cs45\i\f0\cf4\lang1024 operand})\par\pard +\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Unary Operators\par\pard\plain +\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs37 ExprKind}\par|\tab +{\cs34\b\f5\cf2\lang1024 delete} {\cs35\i\f6\cf13\lang1024 Lvalue}\par|\tab +{\cs34\b\f5\cf2\lang1024 void} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par +|\tab{\cs34\b\f5\cf2\lang1024 typeof} {\cs35\i\f6\cf13\lang1024 Lvalue}\par|\tab +{\cs34\b\f5\cf2\lang1024 typeof} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 noLValue} +\par|\tab{\cs34\b\f5\cf2\lang1024 ++} {\cs35\i\f6\cf13\lang1024 Lvalue}\par|\tab +{\cs34\b\f5\cf2\lang1024 --} {\cs35\i\f6\cf13\lang1024 Lvalue}\par|\tab{\cs34\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par|\tab +{\cs34\b\f5\cf2\lang1024 -} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par| +\tab{\cs34\b\f5\cf2\lang1024~} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par +\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs34\b\f5\cf2\lang1024!} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par +\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20 +\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 PostfixExpression\super\cs37 ExprKind}]\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 delete} {\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 rv}: +{\cs42\scaps\f0\cf6\lang1024 Reference} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rv} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 valueReference}: {\cs43\f4\cf6\lang1024 abrupt} +{\sub\cs42\scaps\f0\cf6\lang1024 ValueOrException} {\cs44\i\f0\cf11\lang1024 makeError}( +{\cs43\f4\cf6\lang1024 deleteError});\line {\cs43\f4\cf6\lang1024 placeReference}( +{\cs45\i\f0\cf4\lang1024 r}: {\cs42\scaps\f0\cf6\lang1024 Place}):\line +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 b}: {\cs42\scaps\f0\cf6\lang1024 Boolean} = +{\cs45\i\f0\cf4\lang1024 r}.{\cs43\f4\cf6\lang1024 base}.{\cs43\f4\cf6\lang1024 delete}( +{\cs45\i\f0\cf4\lang1024 r}.{\cs43\f4\cf6\lang1024 property})\line {\cs40\b\f0 in} + {\cs44\i\f0\cf11\lang1024 booleanResult}({\cs45\i\f0\cf4\lang1024 b});\line +{\cs43\f4\cf6\lang1024 virtualReference}: {\cs44\i\f0\cf11\lang1024 booleanResult}( +{\cs44\i\f0\cf11\lang1024 true})\line {\cs40\b\f0 end}\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 void} + {\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operand}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 undefinedResult} +\par{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 typeof} {\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e}: +{\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 rv}: +{\cs42\scaps\f0\cf6\lang1024 Reference} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rv} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 valueReference}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}): {\cs44\i\f0\cf11\lang1024 stringResult}( +{\cs44\i\f0\cf11\lang1024 valueTypeof}({\cs45\i\f0\cf4\lang1024 v}));\line +{\cs43\f4\cf6\lang1024 placeReference}({\cs45\i\f0\cf4\lang1024 r}: +{\cs42\scaps\f0\cf6\lang1024 Place}):\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 v}: {\cs42\scaps\f0\cf6\lang1024 Value} = {\cs45\i\f0\cf4\lang1024 r}. +{\cs43\f4\cf6\lang1024 base}.{\cs43\f4\cf6\lang1024 get}({\cs45\i\f0\cf4\lang1024 r}. +{\cs43\f4\cf6\lang1024 property})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 stringResult}({\cs44\i\f0\cf11\lang1024 valueTypeof}( +{\cs45\i\f0\cf4\lang1024 v}));\line {\cs43\f4\cf6\lang1024 virtualReference}: +{\cs44\i\f0\cf11\lang1024 stringResult}(\ldblquote{\cs31\b\f5\cf2\lang1024 undefined}\rdblquote) +\line {\cs40\b\f0 end}\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 typeof} +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 noLValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 v}: {\cs42\scaps\f0\cf6\lang1024 Value} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 noLValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 stringResult}( +{\cs44\i\f0\cf11\lang1024 valueTypeof}({\cs45\i\f0\cf4\lang1024 v}))\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 ++} +{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) +\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operandReference}: +{\cs42\scaps\f0\cf6\lang1024 Reference} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operandValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 referenceGetValue}({\cs45\i\f0\cf4\lang1024 operandReference})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operand}: +{\cs42\scaps\f0\cf6\lang1024 Double} = {\cs44\i\f0\cf11\lang1024 coerceToDouble}( +{\cs45\i\f0\cf4\lang1024 operandValue})\line {\cs40\b\f0 in} {\cs40\b\f0 let} +{\cs45\i\f0\cf4\lang1024 res}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 doubleAdd}({\cs45\i\f0\cf4\lang1024 operand}, 1.0)\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 u}: {\cs42\scaps\f0\cf6\lang1024 Void} += {\cs44\i\f0\cf11\lang1024 referencePutValue}({\cs45\i\f0\cf4\lang1024 operandReference}, +{\cs43\f4\cf6\lang1024 doubleValue} {\cs45\i\f0\cf4\lang1024 res})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 doubleResult}({\cs45\i\f0\cf4\lang1024 res})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 --} +{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env}) +\line = {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operandReference}: +{\cs42\scaps\f0\cf6\lang1024 Reference} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operandValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 referenceGetValue}({\cs45\i\f0\cf4\lang1024 operandReference})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 operand}: +{\cs42\scaps\f0\cf6\lang1024 Double} = {\cs44\i\f0\cf11\lang1024 coerceToDouble}( +{\cs45\i\f0\cf4\lang1024 operandValue})\line {\cs40\b\f0 in} {\cs40\b\f0 let} +{\cs45\i\f0\cf4\lang1024 res}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 doubleSubtract}({\cs45\i\f0\cf4\lang1024 operand}, 1.0)\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 u}: {\cs42\scaps\f0\cf6\lang1024 Void} += {\cs44\i\f0\cf11\lang1024 referencePutValue}({\cs45\i\f0\cf4\lang1024 operandReference}, +{\cs43\f4\cf6\lang1024 doubleValue} {\cs45\i\f0\cf4\lang1024 res})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 doubleResult}({\cs45\i\f0\cf4\lang1024 res})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operandValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operand}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 operandValue})\line +{\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 doubleResult}({\cs45\i\f0\cf4\lang1024 operand})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 -} +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operandValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operand}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 operandValue})\line +{\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 doubleResult}({\cs44\i\f0\cf11\lang1024 doubleNegate}( +{\cs45\i\f0\cf4\lang1024 operand}))\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024~} +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operandValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operand}: {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 coerceToInt32}({\cs45\i\f0\cf4\lang1024 operandValue})\line +{\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 integerResult}({\cs44\i\f0\cf11\lang1024 bitwiseXor}( +{\cs45\i\f0\cf4\lang1024 operand}, -1))\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024!} +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 operandValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 UnaryExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 booleanResult}( +{\cs40\b\f0 not} {\cs44\i\f0\cf11\lang1024 coerceToBoolean}({\cs45\i\f0\cf4\lang1024 operandValue})) +\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs44\i\f0\cf11\lang1024 valueTypeof}({\cs45\i\f0\cf4\lang1024 v}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 String}\line = +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 v} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}: \ldblquote{\cs31\b\f5\cf2\lang1024 undefined}\rdblquote; +\line {\cs43\f4\cf6\lang1024 nullValue}: \ldblquote{\cs31\b\f5\cf2\lang1024 object} +\rdblquote;\line {\cs43\f4\cf6\lang1024 booleanValue}: \ldblquote +{\cs31\b\f5\cf2\lang1024 boolean}\rdblquote;\line {\cs43\f4\cf6\lang1024 doubleValue}: +\ldblquote{\cs31\b\f5\cf2\lang1024 number}\rdblquote;\line +{\cs43\f4\cf6\lang1024 stringValue}: \ldblquote{\cs31\b\f5\cf2\lang1024 string}\rdblquote;\line + {\cs43\f4\cf6\lang1024 objectValue}({\cs45\i\f0\cf4\lang1024 o}: +{\cs42\scaps\f0\cf6\lang1024 Object}): {\cs45\i\f0\cf4\lang1024 o}. +{\cs43\f4\cf6\lang1024 typeofName}\line {\cs40\b\f0 end}\par\pard\plain\s2\sa60\keep\keepn +\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Multiplicative Operators\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind}\par|\tab +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024*} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par| +\tab{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024/} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par +\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue} +{\cs34\b\f5\cf2\lang1024%} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}\par +\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20 +\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs37 ExprKind}]\par +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024*} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 applyBinaryDoubleOperator}({\cs44\i\f0\cf11\lang1024 doubleMultiply}, +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue})\par +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024/} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 applyBinaryDoubleOperator}({\cs44\i\f0\cf11\lang1024 doubleDivide}, +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue})\par +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024%} {\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 UnaryExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 applyBinaryDoubleOperator}({\cs44\i\f0\cf11\lang1024 doubleRemainder}, +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue})\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs44\i\f0\cf11\lang1024 applyBinaryDoubleOperator}({\cs45\i\f0\cf4\lang1024 operator}: +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Double} +{\field{\*\fldinst SYMBOL 180 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 Double} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Do +uble} +, {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value})\line : +{\cs42\scaps\f0\cf6\lang1024 ValueOrException}\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftNumber}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 leftValue})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 rightNumber}: +{\cs42\scaps\f0\cf6\lang1024 Double} = {\cs44\i\f0\cf11\lang1024 coerceToDouble}( +{\cs45\i\f0\cf4\lang1024 rightValue})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 doubleResult}({\cs45\i\f0\cf4\lang1024 operator}( +{\cs45\i\f0\cf4\lang1024 leftNumber}, {\cs45\i\f0\cf4\lang1024 rightNumber}))\par\pard\plain\s2\sa60 +\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Additive Operators\par\pard\plain\s11\sb60 +\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind}\par|\tab +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024 -} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60 +\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs37 ExprKind}]\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AdditiveExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue}]\line ( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AdditiveExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs43\f4\cf6\lang1024 noHint})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 rightValue}, +{\cs43\f4\cf6\lang1024 noHint})\line {\cs40\b\f0 in} {\cs40\b\f0 if} +{\cs45\i\f0\cf4\lang1024 leftPrimitive} {\cs40\b\f0 is} {\cs43\f4\cf6\lang1024 stringValue} +{\cs40\b\f0 or} {\cs45\i\f0\cf4\lang1024 rightPrimitive} {\cs40\b\f0 is} +{\cs43\f4\cf6\lang1024 stringValue}\line {\cs40\b\f0 then} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftString}: {\cs42\scaps\f0\cf6\lang1024 String} = +{\cs44\i\f0\cf11\lang1024 coerceToString}({\cs45\i\f0\cf4\lang1024 leftPrimitive})\line + {\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 rightString}: +{\cs42\scaps\f0\cf6\lang1024 String} = {\cs44\i\f0\cf11\lang1024 coerceToString}( +{\cs45\i\f0\cf4\lang1024 rightPrimitive})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 stringResult}({\cs45\i\f0\cf4\lang1024 leftString} +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} +{\cs45\i\f0\cf4\lang1024 rightString})\line {\cs40\b\f0 else} +{\cs44\i\f0\cf11\lang1024 applyBinaryDoubleOperator}({\cs44\i\f0\cf11\lang1024 doubleAdd}, +{\cs45\i\f0\cf4\lang1024 leftPrimitive}, {\cs45\i\f0\cf4\lang1024 rightPrimitive})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AdditiveExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024 -} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue}]\line ( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AdditiveExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 applyBinaryDoubleOperator}({\cs44\i\f0\cf11\lang1024 doubleSubtract}, +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue})\par\pard\plain\s2\sa60 +\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Bitwise Shift Operators\par\pard\plain\s11 +\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120 +\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind}\par|\tab +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024<<} +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024>>} +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024>>>} +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs37 ExprKind}]\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ShiftExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024<<} {\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 bitmapValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ShiftExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 countValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 bitmap}: {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 coerceToUint32}({\cs45\i\f0\cf4\lang1024 bitmapValue})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 count}: +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 coerceToUint32}( +{\cs45\i\f0\cf4\lang1024 countValue})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 integerResult}(\line {\cs44\i\f0\cf11\lang1024 uint32ToInt32} +({\cs44\i\f0\cf11\lang1024 bitwiseAnd}({\cs44\i\f0\cf11\lang1024 bitwiseShift}( +{\cs45\i\f0\cf4\lang1024 bitmap}, {\cs44\i\f0\cf11\lang1024 bitwiseAnd}( +{\cs45\i\f0\cf4\lang1024 count}, 31)), 4294967295)))\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ShiftExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024>>} {\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 bitmapValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ShiftExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 countValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 bitmap}: {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 coerceToInt32}({\cs45\i\f0\cf4\lang1024 bitmapValue})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 count}: +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 coerceToUint32}( +{\cs45\i\f0\cf4\lang1024 countValue})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 integerResult}({\cs44\i\f0\cf11\lang1024 bitwiseShift}( +{\cs45\i\f0\cf4\lang1024 bitmap}, \endash{\cs44\i\f0\cf11\lang1024 bitwiseAnd}( +{\cs45\i\f0\cf4\lang1024 count}, 31)))\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ShiftExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024>>>} {\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 bitmapValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ShiftExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 countValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 AdditiveExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 bitmap}: {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 coerceToUint32}({\cs45\i\f0\cf4\lang1024 bitmapValue})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 count}: +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 coerceToUint32}( +{\cs45\i\f0\cf4\lang1024 countValue})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 integerResult}({\cs44\i\f0\cf11\lang1024 bitwiseShift}( +{\cs45\i\f0\cf4\lang1024 bitmap}, \endash{\cs44\i\f0\cf11\lang1024 bitwiseAnd}( +{\cs45\i\f0\cf4\lang1024 count}, 31)))\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3 +\b\fs24\lang2057 Relational Operators\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20 +\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024<} +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024>} +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024<=} +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024>=} +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs37 ExprKind}]\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024<} {\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 orderValues}( +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue}, +{\cs44\i\f0\cf11\lang1024 true}, {\cs44\i\f0\cf11\lang1024 false})\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024>} {\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 orderValues}( +{\cs45\i\f0\cf4\lang1024 rightValue}, {\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs44\i\f0\cf11\lang1024 true}, {\cs44\i\f0\cf11\lang1024 false})\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024<=} {\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 orderValues}( +{\cs45\i\f0\cf4\lang1024 rightValue}, {\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs44\i\f0\cf11\lang1024 false}, {\cs44\i\f0\cf11\lang1024 true})\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024>=} {\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 RelationalExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ShiftExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 orderValues}( +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue}, +{\cs44\i\f0\cf11\lang1024 false}, {\cs44\i\f0\cf11\lang1024 true})\par\pard\plain\s20\li180\sb60 +\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs44\i\f0\cf11\lang1024 orderValues}( +{\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 less}: {\cs42\scaps\f0\cf6\lang1024 Boolean}, +{\cs45\i\f0\cf4\lang1024 greaterOrEqual}: {\cs42\scaps\f0\cf6\lang1024 Boolean})\line : +{\cs42\scaps\f0\cf6\lang1024 ValueOrException}\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs43\f4\cf6\lang1024 numberHint})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 rightValue}, +{\cs43\f4\cf6\lang1024 numberHint})\line {\cs40\b\f0 in} {\cs40\b\f0 if} +{\cs45\i\f0\cf4\lang1024 leftPrimitive} {\cs40\b\f0 is} {\cs43\f4\cf6\lang1024 stringValue} +{\cs40\b\f0 and} {\cs45\i\f0\cf4\lang1024 rightPrimitive} {\cs40\b\f0 is} +{\cs43\f4\cf6\lang1024 stringValue}\line {\cs40\b\f0 then} +{\cs44\i\f0\cf11\lang1024 booleanResult}(\line +{\cs44\i\f0\cf11\lang1024 compareStrings}(\line +{\cs45\i\f0\cf4\lang1024 leftPrimitive}.{\cs43\f4\cf6\lang1024 stringValue},\line + {\cs45\i\f0\cf4\lang1024 rightPrimitive}.{\cs43\f4\cf6\lang1024 stringValue},\line + {\cs45\i\f0\cf4\lang1024 less},\line +{\cs45\i\f0\cf4\lang1024 greaterOrEqual},\line +{\cs45\i\f0\cf4\lang1024 greaterOrEqual}))\line {\cs40\b\f0 else} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftNumber}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 leftPrimitive})\line + {\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 rightNumber}: +{\cs42\scaps\f0\cf6\lang1024 Double} = {\cs44\i\f0\cf11\lang1024 coerceToDouble}( +{\cs45\i\f0\cf4\lang1024 rightPrimitive})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 booleanResult}(\line +{\cs44\i\f0\cf11\lang1024 doubleCompare}(\line +{\cs45\i\f0\cf4\lang1024 leftNumber},\line +{\cs45\i\f0\cf4\lang1024 rightNumber},\line +{\cs45\i\f0\cf4\lang1024 less},\line +{\cs45\i\f0\cf4\lang1024 greaterOrEqual},\line +{\cs45\i\f0\cf4\lang1024 greaterOrEqual},\line +{\cs44\i\f0\cf11\lang1024 false}))\par{\cs44\i\f0\cf11\lang1024 compareStrings}( +{\cs45\i\f0\cf4\lang1024 left}: {\cs42\scaps\f0\cf6\lang1024 String}, +{\cs45\i\f0\cf4\lang1024 right}: {\cs42\scaps\f0\cf6\lang1024 String}, +{\cs45\i\f0\cf4\lang1024 less}: {\cs42\scaps\f0\cf6\lang1024 Boolean}, +{\cs45\i\f0\cf4\lang1024 equal}: {\cs42\scaps\f0\cf6\lang1024 Boolean}, +{\cs45\i\f0\cf4\lang1024 greater}: {\cs42\scaps\f0\cf6\lang1024 Boolean})\line : +{\cs42\scaps\f0\cf6\lang1024 Boolean}\line = {\cs40\b\f0 if} {\cs44\i\f0\cf11\lang1024 empty}( +{\cs45\i\f0\cf4\lang1024 left}) {\cs40\b\f0 and} {\cs44\i\f0\cf11\lang1024 empty}( +{\cs45\i\f0\cf4\lang1024 right})\line {\cs40\b\f0 then} {\cs45\i\f0\cf4\lang1024 equal}\line + {\cs40\b\f0 else} {\cs40\b\f0 if} {\cs44\i\f0\cf11\lang1024 empty}({\cs45\i\f0\cf4\lang1024 left} +)\line {\cs40\b\f0 then} {\cs45\i\f0\cf4\lang1024 less}\line {\cs40\b\f0 else} +{\cs40\b\f0 if} {\cs44\i\f0\cf11\lang1024 empty}({\cs45\i\f0\cf4\lang1024 right})\line +{\cs40\b\f0 then} {\cs45\i\f0\cf4\lang1024 greater}\line {\cs40\b\f0 else} {\cs40\b\f0 let} +{\cs45\i\f0\cf4\lang1024 leftCharCode}: {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 characterToCode}({\cs44\i\f0\cf11\lang1024 first}( +{\cs45\i\f0\cf4\lang1024 left}));\line {\cs45\i\f0\cf4\lang1024 rightCharCode}: +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 characterToCode}( +{\cs44\i\f0\cf11\lang1024 first}({\cs45\i\f0\cf4\lang1024 right}))\line {\cs40\b\f0 in} +{\cs40\b\f0 if} {\cs45\i\f0\cf4\lang1024 leftCharCode} < {\cs45\i\f0\cf4\lang1024 rightCharCode} +\line {\cs40\b\f0 then} {\cs45\i\f0\cf4\lang1024 less}\line +{\cs40\b\f0 else} {\cs40\b\f0 if} {\cs45\i\f0\cf4\lang1024 leftCharCode} > +{\cs45\i\f0\cf4\lang1024 rightCharCode}\line {\cs40\b\f0 then} +{\cs45\i\f0\cf4\lang1024 greater}\line {\cs40\b\f0 else} +{\cs44\i\f0\cf11\lang1024 compareStrings}({\cs44\i\f0\cf11\lang1024 rest}( +{\cs45\i\f0\cf4\lang1024 left}), {\cs44\i\f0\cf11\lang1024 rest}({\cs45\i\f0\cf4\lang1024 right}), +{\cs45\i\f0\cf4\lang1024 less}, {\cs45\i\f0\cf4\lang1024 equal}, {\cs45\i\f0\cf4\lang1024 greater}) +\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Equality Operators +\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind}\par|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024==} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024!=} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}\par|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024===} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024!==} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 ExprKind}] +\par{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024==} {\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} +]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 eq}: {\cs42\scaps\f0\cf6\lang1024 Boolean} = +{\cs44\i\f0\cf11\lang1024 compareValues}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs45\i\f0\cf4\lang1024 rightValue})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 booleanResult}({\cs45\i\f0\cf4\lang1024 eq})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024!=} {\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} +]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 eq}: {\cs42\scaps\f0\cf6\lang1024 Boolean} = +{\cs44\i\f0\cf11\lang1024 compareValues}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs45\i\f0\cf4\lang1024 rightValue})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 booleanResult}({\cs40\b\f0 not} {\cs45\i\f0\cf4\lang1024 eq})\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024===} {\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} +]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 booleanResult}( +{\cs44\i\f0\cf11\lang1024 strictCompareValues}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs45\i\f0\cf4\lang1024 rightValue}))\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024!==} {\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 EqualityExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 anyValue} +]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs44\i\f0\cf11\lang1024 booleanResult}( +{\cs40\b\f0 not} {\cs44\i\f0\cf11\lang1024 strictCompareValues}({\cs45\i\f0\cf4\lang1024 leftValue}, + {\cs45\i\f0\cf4\lang1024 rightValue}))\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs44\i\f0\cf11\lang1024 compareValues}({\cs45\i\f0\cf4\lang1024 leftValue}: +{\cs42\scaps\f0\cf6\lang1024 Value}, {\cs45\i\f0\cf4\lang1024 rightValue}: +{\cs42\scaps\f0\cf6\lang1024 Value}) : {\cs42\scaps\f0\cf6\lang1024 BooleanOrException}\line = +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 leftValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}:\line +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}: +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 true};\line +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}, {\cs43\f4\cf6\lang1024 objectValue}: +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 false}\line +{\cs40\b\f0 end};\line {\cs43\f4\cf6\lang1024 booleanValue}( +{\cs45\i\f0\cf4\lang1024 leftBool}: {\cs42\scaps\f0\cf6\lang1024 Boolean}):\line +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}: +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 false};\line +{\cs43\f4\cf6\lang1024 booleanValue}({\cs45\i\f0\cf4\lang1024 rightBool}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}): {\cs43\f4\cf6\lang1024 normal} ({\cs40\b\f0 not} ( +{\cs45\i\f0\cf4\lang1024 leftBool} {\cs40\b\f0 xor} {\cs45\i\f0\cf4\lang1024 rightBool}));\line + {\cs43\f4\cf6\lang1024 doubleValue}, {\cs43\f4\cf6\lang1024 stringValue}, +{\cs43\f4\cf6\lang1024 objectValue}:\line +{\cs44\i\f0\cf11\lang1024 compareDoubleToValue}({\cs44\i\f0\cf11\lang1024 coerceBooleanToDouble}( +{\cs45\i\f0\cf4\lang1024 leftBool}), {\cs45\i\f0\cf4\lang1024 rightValue})\line +{\cs40\b\f0 end};\line {\cs43\f4\cf6\lang1024 doubleValue}( +{\cs45\i\f0\cf4\lang1024 leftNumber}: {\cs42\scaps\f0\cf6\lang1024 Double}): +{\cs44\i\f0\cf11\lang1024 compareDoubleToValue}({\cs45\i\f0\cf4\lang1024 leftNumber}, +{\cs45\i\f0\cf4\lang1024 rightValue});\line {\cs43\f4\cf6\lang1024 stringValue}( +{\cs45\i\f0\cf4\lang1024 leftStr}: {\cs42\scaps\f0\cf6\lang1024 String}):\line +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}: +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 false};\line +{\cs43\f4\cf6\lang1024 booleanValue}({\cs45\i\f0\cf4\lang1024 rightBool}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}):\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftNumber}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 leftValue})\line + {\cs40\b\f0 in} {\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 doubleEqual}( +{\cs45\i\f0\cf4\lang1024 leftNumber}, {\cs44\i\f0\cf11\lang1024 coerceBooleanToDouble}( +{\cs45\i\f0\cf4\lang1024 rightBool}));\line {\cs43\f4\cf6\lang1024 doubleValue}( +{\cs45\i\f0\cf4\lang1024 rightNumber}: {\cs42\scaps\f0\cf6\lang1024 Double}):\line + {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftNumber}: {\cs42\scaps\f0\cf6\lang1024 Double} + = {\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 leftValue})\line + {\cs40\b\f0 in} {\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 doubleEqual}( +{\cs45\i\f0\cf4\lang1024 leftNumber}, {\cs45\i\f0\cf4\lang1024 rightNumber});\line +{\cs43\f4\cf6\lang1024 stringValue}({\cs45\i\f0\cf4\lang1024 rightStr}: +{\cs42\scaps\f0\cf6\lang1024 String}):\line {\cs43\f4\cf6\lang1024 normal} +{\cs44\i\f0\cf11\lang1024 compareStrings}({\cs45\i\f0\cf4\lang1024 leftStr}, +{\cs45\i\f0\cf4\lang1024 rightStr}, {\cs44\i\f0\cf11\lang1024 false}, +{\cs44\i\f0\cf11\lang1024 true}, {\cs44\i\f0\cf11\lang1024 false});\line +{\cs43\f4\cf6\lang1024 objectValue}:\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 rightValue}, +{\cs43\f4\cf6\lang1024 noHint})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 compareValues}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs45\i\f0\cf4\lang1024 rightPrimitive})\line {\cs40\b\f0 end};\line +{\cs43\f4\cf6\lang1024 objectValue}({\cs45\i\f0\cf4\lang1024 leftObj}: +{\cs42\scaps\f0\cf6\lang1024 Object}):\line {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}: +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 false};\line +{\cs43\f4\cf6\lang1024 booleanValue}({\cs45\i\f0\cf4\lang1024 rightBool}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}):\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs43\f4\cf6\lang1024 noHint})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 compareValues}(\line +{\cs45\i\f0\cf4\lang1024 leftPrimitive},\line +{\cs43\f4\cf6\lang1024 doubleValue} {\cs44\i\f0\cf11\lang1024 coerceBooleanToDouble}( +{\cs45\i\f0\cf4\lang1024 rightBool}));\line {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}:\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 leftValue}, +{\cs43\f4\cf6\lang1024 noHint})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 compareValues}({\cs45\i\f0\cf4\lang1024 leftPrimitive}, +{\cs45\i\f0\cf4\lang1024 rightValue});\line {\cs43\f4\cf6\lang1024 objectValue}( +{\cs45\i\f0\cf4\lang1024 rightObj}: {\cs42\scaps\f0\cf6\lang1024 Object}):\line + {\cs43\f4\cf6\lang1024 normal} ({\cs45\i\f0\cf4\lang1024 leftObj}. +{\cs43\f4\cf6\lang1024 properties} +{\field{\*\fldinst SYMBOL 186 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs45\i\f0\cf4\lang1024 rightObj}.{\cs43\f4\cf6\lang1024 properties})\line +{\cs40\b\f0 end}\line {\cs40\b\f0 end}\par{\cs44\i\f0\cf11\lang1024 compareDoubleToValue}( +{\cs45\i\f0\cf4\lang1024 leftNumber}: {\cs42\scaps\f0\cf6\lang1024 Double}, +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value}) : +{\cs42\scaps\f0\cf6\lang1024 BooleanOrException}\line = {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}: +{\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 false};\line +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}:\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightNumber}: {\cs42\scaps\f0\cf6\lang1024 Double} = +{\cs44\i\f0\cf11\lang1024 coerceToDouble}({\cs45\i\f0\cf4\lang1024 rightValue})\line +{\cs40\b\f0 in} {\cs43\f4\cf6\lang1024 normal} {\cs44\i\f0\cf11\lang1024 doubleEqual}( +{\cs45\i\f0\cf4\lang1024 leftNumber}, {\cs45\i\f0\cf4\lang1024 rightNumber});\line +{\cs43\f4\cf6\lang1024 objectValue}:\line {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightPrimitive}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs44\i\f0\cf11\lang1024 coerceToPrimitive}({\cs45\i\f0\cf4\lang1024 rightValue}, +{\cs43\f4\cf6\lang1024 noHint})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 compareDoubleToValue}({\cs45\i\f0\cf4\lang1024 leftNumber}, +{\cs45\i\f0\cf4\lang1024 rightPrimitive})\line {\cs40\b\f0 end}\par +{\cs44\i\f0\cf11\lang1024 doubleEqual}({\cs45\i\f0\cf4\lang1024 x}: +{\cs42\scaps\f0\cf6\lang1024 Double}, {\cs45\i\f0\cf4\lang1024 y}: +{\cs42\scaps\f0\cf6\lang1024 Double}) : {\cs42\scaps\f0\cf6\lang1024 Boolean}\line = +{\cs44\i\f0\cf11\lang1024 doubleCompare}({\cs45\i\f0\cf4\lang1024 x}, {\cs45\i\f0\cf4\lang1024 y}, +{\cs44\i\f0\cf11\lang1024 false}, {\cs44\i\f0\cf11\lang1024 true}, {\cs44\i\f0\cf11\lang1024 false}, + {\cs44\i\f0\cf11\lang1024 false})\par{\cs44\i\f0\cf11\lang1024 strictCompareValues}( +{\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value}) : +{\cs42\scaps\f0\cf6\lang1024 Boolean}\line = {\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 leftValue} + {\cs40\b\f0 of}\line {\cs43\f4\cf6\lang1024 undefinedValue}: +{\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 is} {\cs43\f4\cf6\lang1024 undefinedValue};\line + {\cs43\f4\cf6\lang1024 nullValue}: {\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 is} +{\cs43\f4\cf6\lang1024 nullValue};\line {\cs43\f4\cf6\lang1024 booleanValue}( +{\cs45\i\f0\cf4\lang1024 leftBool}: {\cs42\scaps\f0\cf6\lang1024 Boolean}):\line +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 booleanValue}({\cs45\i\f0\cf4\lang1024 rightBool}: +{\cs42\scaps\f0\cf6\lang1024 Boolean}): {\cs40\b\f0 not} ({\cs45\i\f0\cf4\lang1024 leftBool} +{\cs40\b\f0 xor} {\cs45\i\f0\cf4\lang1024 rightBool});\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 doubleValue}, {\cs43\f4\cf6\lang1024 stringValue}, +{\cs43\f4\cf6\lang1024 objectValue}: {\cs44\i\f0\cf11\lang1024 false}\line +{\cs40\b\f0 end};\line {\cs43\f4\cf6\lang1024 doubleValue}( +{\cs45\i\f0\cf4\lang1024 leftNumber}: {\cs42\scaps\f0\cf6\lang1024 Double}):\line +{\cs40\b\f0 case} {\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 doubleValue}({\cs45\i\f0\cf4\lang1024 rightNumber}: +{\cs42\scaps\f0\cf6\lang1024 Double}): {\cs44\i\f0\cf11\lang1024 doubleEqual}( +{\cs45\i\f0\cf4\lang1024 leftNumber}, {\cs45\i\f0\cf4\lang1024 rightNumber});\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 stringValue}, +{\cs43\f4\cf6\lang1024 objectValue}: {\cs44\i\f0\cf11\lang1024 false}\line +{\cs40\b\f0 end};\line {\cs43\f4\cf6\lang1024 stringValue}({\cs45\i\f0\cf4\lang1024 leftStr} +: {\cs42\scaps\f0\cf6\lang1024 String}):\line {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 stringValue}({\cs45\i\f0\cf4\lang1024 rightStr}: +{\cs42\scaps\f0\cf6\lang1024 String}):\line +{\cs44\i\f0\cf11\lang1024 compareStrings}({\cs45\i\f0\cf4\lang1024 leftStr}, +{\cs45\i\f0\cf4\lang1024 rightStr}, {\cs44\i\f0\cf11\lang1024 false}, +{\cs44\i\f0\cf11\lang1024 true}, {\cs44\i\f0\cf11\lang1024 false});\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 objectValue}: {\cs44\i\f0\cf11\lang1024 false}\line +{\cs40\b\f0 end};\line {\cs43\f4\cf6\lang1024 objectValue}({\cs45\i\f0\cf4\lang1024 leftObj} +: {\cs42\scaps\f0\cf6\lang1024 Object}):\line {\cs40\b\f0 case} +{\cs45\i\f0\cf4\lang1024 rightValue} {\cs40\b\f0 of}\line +{\cs43\f4\cf6\lang1024 objectValue}({\cs45\i\f0\cf4\lang1024 rightObj}: +{\cs42\scaps\f0\cf6\lang1024 Object}): {\cs45\i\f0\cf4\lang1024 leftObj}. +{\cs43\f4\cf6\lang1024 properties} +{\field{\*\fldinst SYMBOL 186 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs45\i\f0\cf4\lang1024 rightObj}.{\cs43\f4\cf6\lang1024 properties};\line +{\cs43\f4\cf6\lang1024 undefinedValue}, {\cs43\f4\cf6\lang1024 nullValue}, +{\cs43\f4\cf6\lang1024 booleanValue}, {\cs43\f4\cf6\lang1024 doubleValue}, +{\cs43\f4\cf6\lang1024 stringValue}: {\cs44\i\f0\cf11\lang1024 false}\line +{\cs40\b\f0 end}\line {\cs40\b\f0 end}\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar +\hyphpar0\level3\b\fs24\lang2057 Binary Bitwise Operators\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024&} +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs36\i0 anyValue}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 ExprKind}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024^} +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs36\i0 anyValue}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 ExprKind}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024|} +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 ExprKind}]\par +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024&} {\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs36\i0 anyValue}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 applyBinaryBitwiseOperator}({\cs44\i\f0\cf11\lang1024 bitwiseAnd}, +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue})\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 ExprKind}] +\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024^} {\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs36\i0 anyValue} +]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 applyBinaryBitwiseOperator}({\cs44\i\f0\cf11\lang1024 bitwiseXor}, +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue})\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 ExprKind}] +\par{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 ExprKind} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024|} {\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs36\i0 anyValue} +]({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 applyBinaryBitwiseOperator}({\cs44\i\f0\cf11\lang1024 bitwiseOr}, +{\cs45\i\f0\cf4\lang1024 leftValue}, {\cs45\i\f0\cf4\lang1024 rightValue})\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs44\i\f0\cf11\lang1024 applyBinaryBitwiseOperator}({\cs45\i\f0\cf4\lang1024 operator}: +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Integer} +{\field{\*\fldinst SYMBOL 180 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs42\scaps\f0\cf6\lang1024 Integer} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 In +teger} +, {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value}, +{\cs45\i\f0\cf4\lang1024 rightValue}: {\cs42\scaps\f0\cf6\lang1024 Value})\line : +{\cs42\scaps\f0\cf6\lang1024 ValueOrException}\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftInt}: {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 coerceToInt32}({\cs45\i\f0\cf4\lang1024 leftValue})\line +{\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 rightInt}: +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 coerceToInt32}( +{\cs45\i\f0\cf4\lang1024 rightValue})\line {\cs40\b\f0 in} +{\cs44\i\f0\cf11\lang1024 integerResult}({\cs45\i\f0\cf4\lang1024 operator}( +{\cs45\i\f0\cf4\lang1024 leftInt}, {\cs45\i\f0\cf4\lang1024 rightInt}))\par\pard\plain\s2\sa60\keep +\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Binary Logical Operators\par\pard\plain\s11\sb60 +\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 ExprKind}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024&&} +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs36\i0 anyValue}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 ExprKind}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024||} +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 ExprKind}] +\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024&&} {\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 if} +{\cs44\i\f0\cf11\lang1024 coerceToBoolean}({\cs45\i\f0\cf4\lang1024 leftValue})\line +{\cs40\b\f0 then} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs36\i0 anyValue}]({\cs45\i\f0\cf4\lang1024 e}) +\line {\cs40\b\f0 else} {\cs43\f4\cf6\lang1024 normal} {\cs45\i\f0\cf4\lang1024 leftValue} +\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 ExprKind}] +\par{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 ExprKind} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024||} {\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs36\i0 anyValue}] +\line ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = +{\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 leftValue}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 if} +{\cs44\i\f0\cf11\lang1024 coerceToBoolean}({\cs45\i\f0\cf4\lang1024 leftValue})\line +{\cs40\b\f0 then} {\cs43\f4\cf6\lang1024 normal} {\cs45\i\f0\cf4\lang1024 leftValue}\line +{\cs40\b\f0 else} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs36\i0 anyValue}]({\cs45\i\f0\cf4\lang1024 e}) +\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Conditional Operator +\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 ExprKind}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024?} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024:} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 ExprKind}] +\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs36\i0 anyValue} {\cs34\b\f5\cf2\lang1024?} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1} +{\cs34\b\f5\cf2\lang1024:} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression{\super\cs36\i0 anyValue}\b0\i0\sub 2}]\line + ({\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 condition}: {\cs42\scaps\f0\cf6\lang1024 Value} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs36\i0 anyValue}] +({\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 if} +{\cs44\i\f0\cf11\lang1024 coerceToBoolean}({\cs45\i\f0\cf4\lang1024 condition})\line +{\cs40\b\f0 then} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 else} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression{\super\cs36\i0 anyValue}\b0\i0\sub 2}]( +{\cs45\i\f0\cf4\lang1024 e})\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24 +\lang2057 Assignment Operators\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20 +\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 ExprKind}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 Lvalue} +{\cs34\b\f5\cf2\lang1024=} {\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 anyValue} +\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Expressions\par\pard +\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s13\fi-1440 +\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 ExprKind}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 ExprKind}] +\par{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Lvalue} {\cs34\b\f5\cf2\lang1024=} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e}: {\cs42\scaps\f0\cf6\lang1024 Env})\line = {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 leftReference}: {\cs42\scaps\f0\cf6\lang1024 Reference} = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Lvalue}]({\cs45\i\f0\cf4\lang1024 e})\line + {\cs40\b\f0 in} {\cs40\b\f0 letexc} {\cs45\i\f0\cf4\lang1024 rightValue}: +{\cs42\scaps\f0\cf6\lang1024 Value} = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 AssignmentExpression{\super\cs36\i0 anyValue}\b0\i0\sub 1}]( +{\cs45\i\f0\cf4\lang1024 e})\line {\cs40\b\f0 in} {\cs40\b\f0 letexc} +{\cs45\i\f0\cf4\lang1024 u}: {\cs42\scaps\f0\cf6\lang1024 Void} = +{\cs44\i\f0\cf11\lang1024 referencePutValue}({\cs45\i\f0\cf4\lang1024 leftReference}, +{\cs45\i\f0\cf4\lang1024 rightValue})\line {\cs40\b\f0 in} {\cs43\f4\cf6\lang1024 normal} +{\cs45\i\f0\cf4\lang1024 rightValue}\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs37 ExprKind}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs37 ExprKind} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 ExprKind}]\line = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 ExprKind}] +\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s13 +\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Expression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 anyValue}\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Expression}] : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 Env} +{\field{\*\fldinst SYMBOL 174 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \cs42\scaps\f0\cf6\lang1024 Va +lueOrException} +\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Expression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 anyValue}] = {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 anyValue}]\par\pard\plain\s2\sa60\keep\keepn +\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Programs\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar +\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 Program} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Expression} {\cs33\b\f6\cf10\lang1024 End}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Program}] : {\cs42\scaps\f0\cf6\lang1024 ValueOrException}\par\pard\plain +\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Eval}[ +{\cs35\i\f6\cf13\lang1024 Program} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Expression} {\cs33\b\f6\cf10\lang1024 End}] = +{\cs46\f7\cf12\lang1024 Eval}[{\cs35\i\f6\cf13\lang1024 Expression}]( +{\b{\field{\*\fldinst SYMBOL 225 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +{\cs43\f4\cf6\lang1024 nullObjectOrNull} +{\b{\field{\*\fldinst SYMBOL 241 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +{\sub\cs42\scaps\f0\cf6\lang1024 Env})\par} \ No newline at end of file diff --git a/mozilla/js2/semantics/ECMA Grammar.txt b/mozilla/js2/semantics/ECMA Grammar.txt new file mode 100644 index 00000000000..21de936022d --- /dev/null +++ b/mozilla/js2/semantics/ECMA Grammar.txt @@ -0,0 +1,8976 @@ +Terminals: $$ ! != !== $END $IDENTIFIER $NUMBER $STRING % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? DELETE FALSE NEW NULL THIS + TRUE TYPEOF VOID [ ] ^ \| |\|\|| ~ +Nonterminals: :% :PROGRAM :EXPRESSION #
# # + # # # # # # # # # # # # # # :PRIMARY-RVALUE # + # # # # # # # # # # # # # # :LVALUE # :PRIMARY-LVALUE + # # # # :ARGUMENTS :ARGUMENT-LIST +Rules: + :% -> :PROGRAM P0 [NIL] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + :PROGRAM -> :EXPRESSION $END P135 [PROGRAM] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + :EXPRESSION -> # P134 [EXPRESSION-COMMA-EXPRESSION] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P132 [COMMA-EXPRESSION-ASSIGNMENT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P128 [ASSIGNMENT-EXPRESSION-CONDITIONAL] + | :LVALUE = # P130 [ASSIGNMENT-EXPRESSION-ASSIGNMENT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P124 [CONDITIONAL-EXPRESSION-LOGICAL-OR] + | # ? # \: # + P126 [CONDITIONAL-EXPRESSION-CONDITIONAL] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P120 [LOGICAL-OR-EXPRESSION-LOGICAL-AND] + | # |\|\|| # + P122 [LOGICAL-OR-EXPRESSION-OR] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P116 [LOGICAL-AND-EXPRESSION-BITWISE-OR] + | # && # + P118 [LOGICAL-AND-EXPRESSION-AND] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P112 [BITWISE-OR-EXPRESSION-BITWISE-XOR] + | # \| # + P114 [BITWISE-OR-EXPRESSION-OR] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P108 [BITWISE-XOR-EXPRESSION-BITWISE-AND] + | # ^ # + P110 [BITWISE-XOR-EXPRESSION-XOR] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P104 [BITWISE-AND-EXPRESSION-EQUALITY] + | # & # + P106 [BITWISE-AND-EXPRESSION-AND] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P94 [EQUALITY-EXPRESSION-RELATIONAL] + | # == # + P96 [EQUALITY-EXPRESSION-EQUAL] + | # != # + P98 [EQUALITY-EXPRESSION-NOT-EQUAL] + | # === # + P100 [EQUALITY-EXPRESSION-STRICT-EQUAL] + | # !== # + P102 [EQUALITY-EXPRESSION-STRICT-NOT-EQUAL] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P84 [RELATIONAL-EXPRESSION-SHIFT] + | # < # + P86 [RELATIONAL-EXPRESSION-LESS] + | # > # + P88 [RELATIONAL-EXPRESSION-GREATER] + | # <= # + P90 [RELATIONAL-EXPRESSION-LESS-OR-EQUAL] + | # >= # + P92 [RELATIONAL-EXPRESSION-GREATER-OR-EQUAL] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P76 [SHIFT-EXPRESSION-ADDITIVE] + | # << # P78 [SHIFT-EXPRESSION-LEFT] + | # >> # P80 [SHIFT-EXPRESSION-RIGHT-SIGNED] + | # >>> # + P82 [SHIFT-EXPRESSION-RIGHT-UNSIGNED] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P70 [ADDITIVE-EXPRESSION-MULTIPLICATIVE] + | # + # + P72 [ADDITIVE-EXPRESSION-ADD] + | # - # + P74 [ADDITIVE-EXPRESSION-SUBTRACT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P62 [MULTIPLICATIVE-EXPRESSION-UNARY] + | # * # + P64 [MULTIPLICATIVE-EXPRESSION-MULTIPLY] + | # / # + P66 [MULTIPLICATIVE-EXPRESSION-DIVIDE] + | # % # + P68 [MULTIPLICATIVE-EXPRESSION-REMAINDER] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P40 [UNARY-EXPRESSION-POSTFIX] + | DELETE :LVALUE P42 [UNARY-EXPRESSION-DELETE] + | VOID # P44 [UNARY-EXPRESSION-VOID] + | TYPEOF :LVALUE P46 [UNARY-EXPRESSION-TYPEOF-LVALUE] + | TYPEOF # P48 [UNARY-EXPRESSION-TYPEOF-EXPRESSION] + | ++ :LVALUE P50 [UNARY-EXPRESSION-INCREMENT] + | -- :LVALUE P52 [UNARY-EXPRESSION-DECREMENT] + | + # P54 [UNARY-EXPRESSION-PLUS] + | - # P56 [UNARY-EXPRESSION-MINUS] + | ~ # P58 [UNARY-EXPRESSION-BITWISE-NOT] + | ! # P60 [UNARY-EXPRESSION-LOGICAL-NOT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P33 [POSTFIX-EXPRESSION-NEW] + | # P35 [POSTFIX-EXPRESSION-MEMBER-EXPRESSION-CALL] + | :LVALUE ++ P36 [POSTFIX-EXPRESSION-INCREMENT] + | :LVALUE -- P38 [POSTFIX-EXPRESSION-DECREMENT] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + # -> # P23 [NEW-EXPRESSION-MEMBER-EXPRESSION] + | NEW # P25 [NEW-EXPRESSION-NEW] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + # -> :PRIMARY-RVALUE P17 [MEMBER-EXPRESSION-PRIMARY-RVALUE] + | # P20 [MEMBER-EXPRESSION-MEMBER-LVALUE] + | NEW # :ARGUMENTS P21 [MEMBER-EXPRESSION-NEW] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + :PRIMARY-RVALUE -> THIS P1 [PRIMARY-RVALUE-THIS] + | NULL P2 [PRIMARY-RVALUE-NULL] + | TRUE P3 [PRIMARY-RVALUE-TRUE] + | FALSE P4 [PRIMARY-RVALUE-FALSE] + | $NUMBER P5 [PRIMARY-RVALUE-NUMBER] + | $STRING P6 [PRIMARY-RVALUE-STRING] + | \( # \) P7 [PRIMARY-RVALUE-PARENTHESES] + Initial terminals: $NUMBER $STRING \( FALSE NULL THIS TRUE + + # -> # P133 [COMMA-EXPRESSION-ASSIGNMENT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P129 [ASSIGNMENT-EXPRESSION-CONDITIONAL] + | :LVALUE = # P131 [ASSIGNMENT-EXPRESSION-ASSIGNMENT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P125 [CONDITIONAL-EXPRESSION-LOGICAL-OR] + | # ? # \: # + P127 [CONDITIONAL-EXPRESSION-CONDITIONAL] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P121 [LOGICAL-OR-EXPRESSION-LOGICAL-AND] + | # |\|\|| # + P123 [LOGICAL-OR-EXPRESSION-OR] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P117 [LOGICAL-AND-EXPRESSION-BITWISE-OR] + | # && # + P119 [LOGICAL-AND-EXPRESSION-AND] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P113 [BITWISE-OR-EXPRESSION-BITWISE-XOR] + | # \| # + P115 [BITWISE-OR-EXPRESSION-OR] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P109 [BITWISE-XOR-EXPRESSION-BITWISE-AND] + | # ^ # + P111 [BITWISE-XOR-EXPRESSION-XOR] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P105 [BITWISE-AND-EXPRESSION-EQUALITY] + | # & # + P107 [BITWISE-AND-EXPRESSION-AND] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P95 [EQUALITY-EXPRESSION-RELATIONAL] + | # == # + P97 [EQUALITY-EXPRESSION-EQUAL] + | # != # + P99 [EQUALITY-EXPRESSION-NOT-EQUAL] + | # === # + P101 [EQUALITY-EXPRESSION-STRICT-EQUAL] + | # !== # + P103 [EQUALITY-EXPRESSION-STRICT-NOT-EQUAL] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P85 [RELATIONAL-EXPRESSION-SHIFT] + | # < # + P87 [RELATIONAL-EXPRESSION-LESS] + | # > # + P89 [RELATIONAL-EXPRESSION-GREATER] + | # <= # + P91 [RELATIONAL-EXPRESSION-LESS-OR-EQUAL] + | # >= # + P93 [RELATIONAL-EXPRESSION-GREATER-OR-EQUAL] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P77 [SHIFT-EXPRESSION-ADDITIVE] + | # << # P79 [SHIFT-EXPRESSION-LEFT] + | # >> # P81 [SHIFT-EXPRESSION-RIGHT-SIGNED] + | # >>> # + P83 [SHIFT-EXPRESSION-RIGHT-UNSIGNED] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P71 [ADDITIVE-EXPRESSION-MULTIPLICATIVE] + | # + # + P73 [ADDITIVE-EXPRESSION-ADD] + | # - # + P75 [ADDITIVE-EXPRESSION-SUBTRACT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P63 [MULTIPLICATIVE-EXPRESSION-UNARY] + | # * # + P65 [MULTIPLICATIVE-EXPRESSION-MULTIPLY] + | # / # + P67 [MULTIPLICATIVE-EXPRESSION-DIVIDE] + | # % # + P69 [MULTIPLICATIVE-EXPRESSION-REMAINDER] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P41 [UNARY-EXPRESSION-POSTFIX] + | DELETE :LVALUE P43 [UNARY-EXPRESSION-DELETE] + | VOID # P45 [UNARY-EXPRESSION-VOID] + | TYPEOF :LVALUE P47 [UNARY-EXPRESSION-TYPEOF-LVALUE] + | TYPEOF # P49 [UNARY-EXPRESSION-TYPEOF-EXPRESSION] + | ++ :LVALUE P51 [UNARY-EXPRESSION-INCREMENT] + | -- :LVALUE P53 [UNARY-EXPRESSION-DECREMENT] + | + # P55 [UNARY-EXPRESSION-PLUS] + | - # P57 [UNARY-EXPRESSION-MINUS] + | ~ # P59 [UNARY-EXPRESSION-BITWISE-NOT] + | ! # P61 [UNARY-EXPRESSION-LOGICAL-NOT] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + + # -> # P34 [POSTFIX-EXPRESSION-NEW] + | :LVALUE ++ P37 [POSTFIX-EXPRESSION-INCREMENT] + | :LVALUE -- P39 [POSTFIX-EXPRESSION-DECREMENT] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + :LVALUE -> # P31 [LVALUE-MEMBER-LVALUE-CALL] + | # P32 [LVALUE-MEMBER-LVALUE-NO-CALL] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + # -> :PRIMARY-LVALUE P10 [MEMBER-LVALUE-PRIMARY-LVALUE] + | # [ :EXPRESSION ] P14 [MEMBER-LVALUE-ARRAY] + | # \. $IDENTIFIER P16 [MEMBER-LVALUE-PROPERTY] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + :PRIMARY-LVALUE -> $IDENTIFIER P8 [PRIMARY-LVALUE-IDENTIFIER] + | \( :LVALUE \) P9 [PRIMARY-LVALUE-PARENTHESES] + Initial terminals: $IDENTIFIER \( + + # -> :LVALUE :ARGUMENTS P11 [MEMBER-LVALUE-CALL-MEMBER-LVALUE] + | # :ARGUMENTS P12 [MEMBER-LVALUE-CALL-MEMBER-EXPRESSION-NO-CALL] + | # [ :EXPRESSION ] P13 [MEMBER-LVALUE-ARRAY] + | # \. $IDENTIFIER P15 [MEMBER-LVALUE-PROPERTY] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + # -> # P19 [MEMBER-EXPRESSION-MEMBER-LVALUE] + Initial terminals: $IDENTIFIER $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + # -> # P24 [NEW-EXPRESSION-MEMBER-EXPRESSION] + | NEW # P26 [NEW-EXPRESSION-NEW] + Initial terminals: $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + # -> :PRIMARY-RVALUE P18 [MEMBER-EXPRESSION-PRIMARY-RVALUE] + | NEW # :ARGUMENTS P22 [MEMBER-EXPRESSION-NEW] + Initial terminals: $NUMBER $STRING \( FALSE NEW NULL THIS TRUE + + :ARGUMENTS -> \( \) P27 [ARGUMENTS-EMPTY] + | \( :ARGUMENT-LIST \) P28 [ARGUMENTS-LIST] + Initial terminals: \( + + :ARGUMENT-LIST -> # P29 [ARGUMENT-LIST-ONE] + | :ARGUMENT-LIST \, # P30 [ARGUMENT-LIST-MORE] + Initial terminals: ! $IDENTIFIER $NUMBER $STRING \( + ++ - -- DELETE FALSE NEW NULL THIS TRUE TYPEOF VOID ~ + +States: + S0: + :% -> . :PROGRAM {$$} + :PROGRAM -> . :EXPRESSION $END {$$} + :EXPRESSION -> . # {$END} + # -> . # {$END} + # -> . # {$END} + # -> . :LVALUE = # {$END} + # -> . # {$END} + # -> + . # ? # \: # + {$END} + # -> . # {$END ? |\|\||} + # -> . # |\|\|| # {$END ? |\|\||} + # -> . # {$END && ? |\|\||} + # -> . # && # {$END && ? |\|\||} + # -> . # {$END && ? \| |\|\||} + # -> . # \| # + {$END && ? \| |\|\||} + # -> . # {$END && ? ^ \| |\|\||} + # -> . # ^ # + {$END && ? ^ \| |\|\||} + # -> . # {$END & && ? ^ \| |\|\||} + # -> . # & # + {$END & && ? ^ \| |\|\||} + # -> . # {!= !== $END & && == === ? ^ \| |\|\||} + # -> . # == # + {!= !== $END & && == === ? ^ \| |\|\||} + # -> . # != # + {!= !== $END & && == === ? ^ \| |\|\||} + # -> . # === # + {!= !== $END & && == === ? ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && == === ? ^ \| |\|\||} + # -> . # {!= !== $END & && < <= == === > >= ? ^ \| |\|\||} + # -> . # < # + {!= !== $END & && < <= == === > >= ? ^ \| |\|\||} + # -> . # > # + {!= !== $END & && < <= == === > >= ? ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && < <= == === > >= ? ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && < <= == === > >= ? ^ \| |\|\||} + # -> . # {!= !== $END & && < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # << # + {!= !== $END & && < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END & && + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + # + {!= !== $END & && + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # - # + {!= !== $END & && + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # {!= !== $END % & && * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== $END % & && * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== $END % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== $END % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== $END % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== $END % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== $END % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== $END % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== $END % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {!= !== $END % & && * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S3 # => S4 + # => S5 # => S6 # => S7 + # => S8 # => S9 # => S10 + # => S11 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :EXPRESSION => S32 :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :PROGRAM => S39 + + S1: + # -> ! . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S273 + + S2: + # -> # . {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce SHIFT-EXPRESSION-ADDITIVE + => shift S183 + - => shift S184 + + S3: + # -> # . {$END ]} + Transitions: $END ] => reduce COMMA-EXPRESSION-ASSIGNMENT + + S4: + # -> # . {$END && \) \, \: ? ] ^ \| |\|\||} + # -> # . & # + {$END & && \) \, \: ? ] ^ \| |\|\||} + Transitions: $END && \) \, \: ? ] ^ \| |\|\|| => reduce BITWISE-XOR-EXPRESSION-BITWISE-AND & => shift S224 + + S5: + # -> # . {$END && \) \, \: ? ] |\|\||} + # -> # . \| # + {$END && \) \, \: ? ] \| |\|\||} + Transitions: $END && \) \, \: ? ] |\|\|| => reduce LOGICAL-AND-EXPRESSION-BITWISE-OR \| => shift S220 + + S6: + # -> # . {$END && \) \, \: ? ] \| |\|\||} + # -> # . ^ # + {$END && \) \, \: ? ] ^ \| |\|\||} + Transitions: $END && \) \, \: ? ] \| |\|\|| => reduce BITWISE-OR-EXPRESSION-BITWISE-XOR ^ => shift S222 + + S7: + :EXPRESSION -> # . {$END ]} + Transitions: $END ] => reduce EXPRESSION-COMMA-EXPRESSION + + S8: + # -> # . {$END \) \, \: ]} + Transitions: $END \) \, \: ] => reduce ASSIGNMENT-EXPRESSION-CONDITIONAL + + S9: + # -> # . {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> # . !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + Transitions: != => shift S226 !== => shift S227 $END & && \) \, \: ? ] ^ \| |\|\|| => reduce BITWISE-AND-EXPRESSION-EQUALITY + == => shift S228 === => shift S229 + + S10: + # -> # . {$END \) \, \: ? ] |\|\||} + # -> # . && # + {$END && \) \, \: ? ] |\|\||} + Transitions: $END \) \, \: ? ] |\|\|| => reduce LOGICAL-OR-EXPRESSION-LOGICAL-AND && => shift S218 + + S11: + # -> + # . ? # \: # + {$END \) \, \: ]} + # -> # . {$END \) \, \: ]} + # -> # . |\|\|| # + {$END \) \, \: ? ] |\|\||} + Transitions: $END \) \, \: ] => reduce CONDITIONAL-EXPRESSION-LOGICAL-OR ? => shift S267 |\|\|| => shift S268 + + S12: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce POSTFIX-EXPRESSION-MEMBER-EXPRESSION-CALL + \. => shift S108 [ => shift S109 + + S13: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce NEW-EXPRESSION-MEMBER-EXPRESSION + \. => shift S91 [ => shift S93 + + S14: + # -> # . :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: \( => shift S47 + Gotos: :ARGUMENTS => S107 + + S15: + :LVALUE -> # . {\( ++ -- =} + # -> # . + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-EXPRESSION-MEMBER-LVALUE + \( ++ -- = => reduce LVALUE-MEMBER-LVALUE-CALL + + S16: + # -> # . + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> # . {\( ++ -- =} + Transitions: != !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-EXPRESSION-MEMBER-LVALUE + \( ++ -- = => reduce LVALUE-MEMBER-LVALUE-NO-CALL + + S17: + # -> # . + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce ADDITIVE-EXPRESSION-MULTIPLICATIVE + % => shift S186 * => shift S187 / => shift S188 + + S18: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce POSTFIX-EXPRESSION-NEW + + S19: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-POSTFIX + + S20: + # -> # . {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: == === ? ] ^ \| |\|\|| => reduce EQUALITY-EXPRESSION-RELATIONAL < => shift S231 <= => shift S232 + > => shift S233 >= => shift S234 + + S21: + # -> # . {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\|| => reduce RELATIONAL-EXPRESSION-SHIFT << => shift S200 + >> => shift S201 >>> => shift S202 + + S22: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce MULTIPLICATIVE-EXPRESSION-UNARY + + S23: + :PRIMARY-LVALUE -> $IDENTIFIER . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-LVALUE-IDENTIFIER + + S24: + :PRIMARY-RVALUE -> $NUMBER . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-RVALUE-NUMBER + + S25: + :PRIMARY-RVALUE -> $STRING . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-RVALUE-STRING + + S26: + :PRIMARY-RVALUE -> \( . # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {% \( \) * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( \) * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( \) * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( \) * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( \) * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( \) * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( \) * \. / [} + :PRIMARY-LVALUE -> \( . :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {\( \) ++ -- \. = [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {\( \) ++ -- \. = [} + # -> . # {? |\|\||} + # -> . # |\|\|| # {? |\|\||} + # -> . # {&& ? |\|\||} + # -> . # && # {&& ? |\|\||} + # -> . # {&& ? \| |\|\||} + # -> . # \| # {&& ? \| |\|\||} + # -> . # {&& ^ \|} + # -> . # ^ # {&& ^ \|} + # -> . # {& ^ \|} + # -> . # & # {& ^ \|} + # -> . # {!= !== & == === ^} + # -> . # == # {!= !== & == === ^} + # -> . # != # {!= !== & == === ^} + # -> . # === # {!= !== & == === ^} + # -> . # !== # {!= !== & == === ^} + # -> . # {!= !== & < <= == === > >=} + # -> . # < # {!= !== & < <= == === > >=} + # -> . # > # {!= !== & < <= == === > >=} + # -> . # <= # + {!= !== & < <= == === > >=} + # -> . # >= # + {!= !== & < <= == === > >=} + # -> . # {!= !== < << <= == === > >= >> >>>} + # -> . # << # + {!= !== < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== < << <= == === > >= >> >>>} + # -> . # {+ - < << <= > >= >> >>>} + # -> . # + # + {+ - < << <= > >= >> >>>} + # -> . # - # + {+ - < << <= > >= >> >>>} + # -> . # {% * + - / << >> >>>} + # -> . # * # + {% * + - / << >> >>>} + # -> . # / # + {% * + - / << >> >>>} + # -> . # % # + {% * + - / << >> >>>} + # -> . # {% * + - /} + # -> . DELETE :LVALUE {% * + - /} + # -> . VOID # {% * + - /} + # -> . TYPEOF :LVALUE {% * + - /} + # -> . TYPEOF # {% * + - /} + # -> . ++ :LVALUE {% * + - /} + # -> . -- :LVALUE {% * + - /} + # -> . + # {% * + - /} + # -> . - # {% * + - /} + # -> . ~ # {% * + - /} + # -> . ! # {% * + - /} + # -> . # {% * + - /} + # -> . # {% * + - /} + # -> . :LVALUE ++ {% * + - /} + # -> . :LVALUE -- {% * + - /} + # -> . # {% * + - /} + # -> . NEW # {% * + - /} + # -> . :PRIMARY-RVALUE {% * + - \. / [} + # -> . # {% * + - \. / [} + # -> . NEW # :ARGUMENTS {% * + - \. / [} + # -> . # {\)} + # -> . # {\)} + # -> . :LVALUE = # {\)} + # -> . # {\)} + # -> + . # ? # \: # + {\)} + # -> . # {\)} + # -> . # |\|\|| # {\)} + # -> . # {\)} + # -> . # && # {\)} + # -> . # {\)} + # -> . # \| # {\)} + # -> . # {\)} + # -> . # ^ # {\)} + # -> . # {\)} + # -> . # & # {\)} + # -> . # {\)} + # -> . # == # {\)} + # -> . # != # {\)} + # -> . # === # {\)} + # -> . # !== # {\)} + # -> . # {\)} + # -> . # < # {\)} + # -> . # > # {\)} + # -> . # <= # {\)} + # -> . # >= # {\)} + # -> . # {\)} + # -> . # << # {\)} + # -> . # >> # {\)} + # -> . # >>> # {\)} + # -> . # {\)} + # -> . # + # {\)} + # -> . # - # {\)} + # -> . # {\)} + # -> . # * # {\)} + # -> . # / # {\)} + # -> . # % # {\)} + # -> . # {\)} + # -> . DELETE :LVALUE {\)} + # -> . VOID # {\)} + # -> . TYPEOF :LVALUE {\)} + # -> . TYPEOF # {\)} + # -> . ++ :LVALUE {\)} + # -> . -- :LVALUE {\)} + # -> . + # {\)} + # -> . - # {\)} + # -> . ~ # {\)} + # -> . ! # {\)} + # -> . # {\)} + # -> . :LVALUE ++ {\)} + # -> . :LVALUE -- {\)} + :LVALUE -> . # {\( \) ++ -- =} + :LVALUE -> . # {\( \) ++ -- =} + # -> . :PRIMARY-LVALUE {% \( \) * ++ -- \. / = [} + # -> . # [ :EXPRESSION ] {% \( \) * ++ -- \. / = [} + # -> . # \. $IDENTIFIER {% \( \) * ++ -- \. / = [} + # -> . :LVALUE :ARGUMENTS {% \( \) * ++ -- \. / = [} + # -> . # :ARGUMENTS {% \( \) * ++ -- \. / = [} + # -> . # [ :EXPRESSION ] {% \( \) * ++ -- \. / = [} + # -> . # \. $IDENTIFIER {% \( \) * ++ -- \. / = [} + # -> . # {% * + - \. / [} + # -> . # {\)} + # -> . NEW # {\)} + # -> . :PRIMARY-RVALUE {\( \)} + # -> . NEW # :ARGUMENTS {\( \)} + Transitions: ! => shift S124 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S151 + ++ => shift S152 - => shift S153 -- => shift S154 DELETE => shift S155 FALSE => shift S33 NEW => shift S157 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S159 VOID => shift S160 ~ => shift S161 + Gotos: # => S12 # => S13 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 + # => S61 # => S64 # => S65 + # => S125 # => S126 # => S127 + # => S128 # => S129 + # => S130 # => S131 + # => S132 # => S133 + # => S134 # => S135 # => S136 + # => S137 # => S138 + # => S139 # => S140 + # => S141 # => S142 # => S143 + # => S144 # => S145 + # => S146 # => S147 # => S148 + # => S149 # => S150 :LVALUE => S156 :PRIMARY-RVALUE => S158 + + S27: + # -> + . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S123 + + S28: + # -> ++ . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + :LVALUE -> . # + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S74 :LVALUE => S122 + + S29: + # -> - . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S121 + + S30: + # -> -- . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + :LVALUE -> . # + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S74 :LVALUE => S120 + + S31: + # -> DELETE . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + :LVALUE -> . # + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S74 :LVALUE => S119 + + S32: + :PROGRAM -> :EXPRESSION . $END {$$} + Transitions: $END => shift S118 + + S33: + :PRIMARY-RVALUE -> FALSE . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-RVALUE-FALSE + + S34: + # -> :LVALUE . = # {$END \) \, \: ]} + # -> :LVALUE . -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: \( => shift S47 ++ => shift S48 -- => shift S49 = => shift S116 + Gotos: :ARGUMENTS => S50 + + S35: + # -> NEW . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> NEW . # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> NEW . # :ARGUMENTS {\(} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S87 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: :PRIMARY-LVALUE => S37 # => S85 :PRIMARY-RVALUE => S88 # => S90 + # => S114 + + S36: + :PRIMARY-RVALUE -> NULL . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-RVALUE-NULL + + S37: + # -> :PRIMARY-LVALUE . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| + => reduce MEMBER-LVALUE-PRIMARY-LVALUE + + + S38: + # -> :PRIMARY-RVALUE . + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> :PRIMARY-RVALUE . {\(} + Transitions: != !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-EXPRESSION-PRIMARY-RVALUE + \( => reduce MEMBER-EXPRESSION-PRIMARY-RVALUE + + S39: + :% -> :PROGRAM . {$$} + Transitions: $$ => accept + + S40: + :PRIMARY-RVALUE -> THIS . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-RVALUE-THIS + + S41: + :PRIMARY-RVALUE -> TRUE . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-RVALUE-TRUE + + S42: + # -> TYPEOF . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> TYPEOF . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + :LVALUE -> . # + {!= !== $END % & && \( \) * + ++ \, - -- / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + :LVALUE -> . # + {!= !== $END % & && \( \) * + ++ \, - -- / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {\. [} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: ! => shift S58 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S67 + ++ => shift S68 - => shift S69 -- => shift S70 DELETE => shift S71 FALSE => shift S33 NEW => shift S73 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S75 VOID => shift S76 ~ => shift S77 + Gotos: :PRIMARY-LVALUE => S37 # => S59 # => S60 + # => S61 # => S62 # => S63 + # => S64 # => S65 # => S66 + :LVALUE => S72 :PRIMARY-RVALUE => S74 + + S43: + # -> VOID . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S57 + + S44: + # -> ~ . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + # => S45 :LVALUE => S46 + + S45: + # -> ~ # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-BITWISE-NOT + + S46: + # -> :LVALUE . -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: \( => shift S47 ++ => shift S48 -- => shift S49 + Gotos: :ARGUMENTS => S50 + + S47: + :ARGUMENTS -> \( . :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> \( . \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # {\) \,} + # -> . :LVALUE = # {\) \,} + # -> . # {\) \,} + # -> + . # ? # \: # + {\) \,} + # -> . # {\) \, ? |\|\||} + # -> . # |\|\|| # {\) \, ? |\|\||} + # -> . # {&& \) \, ? |\|\||} + # -> . # && # {&& \) \, ? |\|\||} + # -> . # {&& \) \, ? \| |\|\||} + # -> . # \| # + {&& \) \, ? \| |\|\||} + # -> . # {&& \) \, ? ^ \| |\|\||} + # -> . # ^ # + {&& \) \, ? ^ \| |\|\||} + # -> . # {& && \) \, ? ^ \| |\|\||} + # -> . # & # + {& && \) \, ? ^ \| |\|\||} + # -> . # {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # == # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # != # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # === # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # !== # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # < # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # > # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # <= # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # >= # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # << # + {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >> # + {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >>> # + {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== & && \) + \, - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + # + {!= !== & && \) + \, - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # - # + {!= !== & && \) + \, - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # * # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # / # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # % # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + :ARGUMENT-LIST -> . # {\) \,} + :ARGUMENT-LIST -> . :ARGUMENT-LIST \, # {\) \,} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 \) => shift S52 + + => shift S27 ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 # => S51 :ARGUMENT-LIST => S53 + + S48: + # -> :LVALUE ++ . {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce POSTFIX-EXPRESSION-INCREMENT + + S49: + # -> :LVALUE -- . {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce POSTFIX-EXPRESSION-DECREMENT + + S50: + # -> :LVALUE :ARGUMENTS . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| + => reduce MEMBER-LVALUE-CALL-MEMBER-LVALUE + + + S51: + :ARGUMENT-LIST -> # . {\) \,} + Transitions: \) \, => reduce ARGUMENT-LIST-ONE + + S52: + :ARGUMENTS -> \( \) . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce ARGUMENTS-EMPTY + + S53: + :ARGUMENTS -> \( :ARGUMENT-LIST . \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENT-LIST -> :ARGUMENT-LIST . \, # {\) \,} + Transitions: \) => shift S54 \, => shift S55 + + S54: + :ARGUMENTS -> \( :ARGUMENT-LIST \) . + {!= !== $END % & && \( * + ++ - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \( * + ++ - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\|| => reduce ARGUMENTS-LIST + + S55: + :ARGUMENT-LIST -> :ARGUMENT-LIST \, . # {\) \,} + # -> . # {\) \,} + # -> . :LVALUE = # {\) \,} + # -> . # {\) \,} + # -> + . # ? # \: # + {\) \,} + # -> . # {\) \, ? |\|\||} + # -> . # |\|\|| # {\) \, ? |\|\||} + # -> . # {&& \) \, ? |\|\||} + # -> . # && # {&& \) \, ? |\|\||} + # -> . # {&& \) \, ? \| |\|\||} + # -> . # \| # + {&& \) \, ? \| |\|\||} + # -> . # {&& \) \, ? ^ \| |\|\||} + # -> . # ^ # + {&& \) \, ? ^ \| |\|\||} + # -> . # {& && \) \, ? ^ \| |\|\||} + # -> . # & # + {& && \) \, ? ^ \| |\|\||} + # -> . # {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # == # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # != # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # === # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # !== # + {!= !== & && \) \, == === ? ^ \| |\|\||} + # -> . # {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # < # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # > # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # <= # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # >= # + {!= !== & && \) \, < <= == === > >= ? ^ \| |\|\||} + # -> . # {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # << # + {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >> # + {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >>> # + {!= !== & && \) \, < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== & && \) + \, - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + # + {!= !== & && \) + \, - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # - # + {!= !== & && \) + \, - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # * # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # / # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # % # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # {!= !== % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 # => S56 + + S56: + :ARGUMENT-LIST -> :ARGUMENT-LIST \, # . {\) \,} + Transitions: \) \, => reduce ARGUMENT-LIST-MORE + + S57: + # -> VOID # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-VOID + + S58: + # -> ! . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S113 + + S59: + # -> # . \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: \. => shift S108 [ => shift S109 + + S60: + # -> # . \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: \. => shift S91 [ => shift S93 + + S61: + # -> # . :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce NEW-EXPRESSION-MEMBER-EXPRESSION + \( => shift S47 + Gotos: :ARGUMENTS => S107 + + S62: + :LVALUE -> # . + {!= !== $END % & && \( \) * + ++ \, - -- / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . {\. [} + Transitions: != !== $END % & && \( \) * + ++ \, - -- / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce LVALUE-MEMBER-LVALUE-CALL + \. [ => reduce MEMBER-EXPRESSION-MEMBER-LVALUE + + S63: + # -> # . {\. [} + :LVALUE -> # . + {!= !== $END % & && \( \) * + ++ \, - -- / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce LVALUE-MEMBER-LVALUE-NO-CALL + \. [ => reduce MEMBER-EXPRESSION-MEMBER-LVALUE + + S64: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce POSTFIX-EXPRESSION-NEW + + S65: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-POSTFIX + + S66: + # -> TYPEOF # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-TYPEOF-EXPRESSION + + S67: + # -> + . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S106 + + S68: + # -> ++ . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :LVALUE -> . # {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S74 :LVALUE => S105 + + S69: + # -> - . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S104 + + S70: + # -> -- . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :LVALUE -> . # {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S74 :LVALUE => S103 + + S71: + # -> DELETE . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :LVALUE -> . # {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S74 :LVALUE => S98 + + S72: + # -> TYPEOF :LVALUE . {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( \) {\( ++ -- \. [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {\( ++ -- \. [} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-TYPEOF-LVALUE + \( => shift S47 ++ => shift S82 -- => shift S83 + Gotos: :ARGUMENTS => S50 + + S73: + # -> NEW . # :ARGUMENTS {\. [} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> NEW . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> NEW . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + # -> . :PRIMARY-LVALUE {\( \. [} + # -> . # [ :EXPRESSION ] {\( \. [} + # -> . # \. $IDENTIFIER {\( \. [} + :PRIMARY-LVALUE -> . $IDENTIFIER {\( \. [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {\( \. [} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S87 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: :PRIMARY-LVALUE => S37 # => S84 # => S85 + # => S86 :PRIMARY-RVALUE => S88 + + S74: + # -> :PRIMARY-RVALUE . {\. [} + # -> :PRIMARY-RVALUE . + {!= !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce MEMBER-EXPRESSION-PRIMARY-RVALUE + \. [ => reduce MEMBER-EXPRESSION-PRIMARY-RVALUE + + S75: + # -> TYPEOF . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> TYPEOF . :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :LVALUE -> . # + {!= !== $END % & && \( \) * + ++ \, - -- / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :LVALUE -> . # + {!= !== $END % & && \( \) * + ++ \, - -- / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-LVALUE {\( ++ -- \. [} + # -> . # [ :EXPRESSION ] {\( ++ -- \. [} + # -> . # \. $IDENTIFIER {\( ++ -- \. [} + :PRIMARY-LVALUE -> . $IDENTIFIER {\( ++ --} + :PRIMARY-LVALUE -> . \( :LVALUE \) {\( ++ --} + # -> . :LVALUE :ARGUMENTS {\( ++ -- \. [} + # -> . # :ARGUMENTS {\( ++ -- \. [} + # -> . # [ :EXPRESSION ] {\( ++ -- \. [} + # -> . # \. $IDENTIFIER {\( ++ -- \. [} + # -> . # {\. [} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: ! => shift S58 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S67 + ++ => shift S68 - => shift S69 -- => shift S70 DELETE => shift S71 FALSE => shift S33 NEW => shift S73 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S75 VOID => shift S76 ~ => shift S77 + Gotos: :PRIMARY-LVALUE => S37 # => S59 # => S60 + # => S61 # => S62 # => S63 + # => S64 # => S65 :PRIMARY-RVALUE => S74 + # => S80 :LVALUE => S81 + + S76: + # -> VOID . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S79 + + S77: + # -> ~ . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S78 + + S78: + # -> ~ # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-BITWISE-NOT + + S79: + # -> VOID # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-VOID + + S80: + # -> TYPEOF # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-TYPEOF-EXPRESSION + + S81: + # -> TYPEOF :LVALUE . {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> :LVALUE . -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> :LVALUE . ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS {\( ++ -- \. [} + :ARGUMENTS -> . \( \) {\( ++ -- \. [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {\( ++ -- \. [} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-TYPEOF-LVALUE + \( => shift S47 ++ => shift S82 -- => shift S83 + Gotos: :ARGUMENTS => S50 + + S82: + # -> :LVALUE ++ . {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce POSTFIX-EXPRESSION-INCREMENT + + S83: + # -> :LVALUE -- . {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce POSTFIX-EXPRESSION-DECREMENT + + S84: + # -> # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> NEW # . :ARGUMENTS {\. [} + # -> # . \. $IDENTIFIER {\( \. [} + # -> # . [ :EXPRESSION ] {\( \. [} + # -> NEW # . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce NEW-EXPRESSION-MEMBER-EXPRESSION + \( => shift S47 \. => shift S91 [ => shift S93 + Gotos: :ARGUMENTS => S97 + + S85: + # -> # . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-EXPRESSION-MEMBER-LVALUE + + S86: + # -> NEW # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce NEW-EXPRESSION-NEW + + S87: + # -> NEW . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> NEW . # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S87 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: :PRIMARY-LVALUE => S37 # => S85 :PRIMARY-RVALUE => S88 # => S89 + # => S90 + + S88: + # -> :PRIMARY-RVALUE . + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-EXPRESSION-PRIMARY-RVALUE + + S89: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> NEW # . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce NEW-EXPRESSION-MEMBER-EXPRESSION + \( => shift S47 \. => shift S91 [ => shift S93 + Gotos: :ARGUMENTS => S92 + + S90: + # -> NEW # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce NEW-EXPRESSION-NEW + + S91: + # -> # \. . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: $IDENTIFIER => shift S96 + + S92: + # -> NEW # :ARGUMENTS . + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\|| => reduce MEMBER-EXPRESSION-NEW + + S93: + # -> # [ . :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :EXPRESSION -> . # {]} + # -> . # {]} + # -> . # {]} + # -> . :LVALUE = # {]} + # -> . # {]} + # -> + . # ? # \: # + {]} + # -> . # {? ] |\|\||} + # -> . # |\|\|| # {? ] |\|\||} + # -> . # {&& ? ] |\|\||} + # -> . # && # {&& ? ] |\|\||} + # -> . # {&& ? ] \| |\|\||} + # -> . # \| # {&& ? ] \| |\|\||} + # -> . # {&& ? ] ^ \| |\|\||} + # -> . # ^ # + {&& ? ] ^ \| |\|\||} + # -> . # {& && ? ] ^ \| |\|\||} + # -> . # & # {& && ? ] ^ \| |\|\||} + # -> . # {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # {!= !== & && + - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== & && + - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== & && + - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S3 # => S4 + # => S5 # => S6 # => S7 + # => S8 # => S9 # => S10 + # => S11 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :EXPRESSION => S94 + + S94: + # -> # [ :EXPRESSION . ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: ] => shift S95 + + S95: + # -> # [ :EXPRESSION ] . + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\|| => reduce MEMBER-LVALUE-ARRAY + + S96: + # -> # \. $IDENTIFIER . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-LVALUE-PROPERTY + + S97: + # -> NEW # :ARGUMENTS . {\. [} + # -> NEW # :ARGUMENTS . + {!= !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce MEMBER-EXPRESSION-NEW + \. [ => reduce MEMBER-EXPRESSION-NEW + + S98: + # -> DELETE :LVALUE . {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-DELETE \( => shift S47 + Gotos: :ARGUMENTS => S50 + + S99: + # -> NEW . # :ARGUMENTS {\. [} + # -> . :PRIMARY-RVALUE {\( \. [} + # -> . # {\( \. [} + # -> . NEW # :ARGUMENTS {\( \. [} + # -> NEW . # :ARGUMENTS {\(} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + # -> . :PRIMARY-LVALUE {\( \. [} + # -> . # [ :EXPRESSION ] {\( \. [} + # -> . # \. $IDENTIFIER {\( \. [} + :PRIMARY-LVALUE -> . $IDENTIFIER {\( \. [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {\( \. [} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S101 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: :PRIMARY-LVALUE => S37 # => S85 :PRIMARY-RVALUE => S88 # => S100 + + S100: + # -> NEW # . :ARGUMENTS {\. [} + # -> # . \. $IDENTIFIER {\( \. [} + # -> # . [ :EXPRESSION ] {\( \. [} + # -> NEW # . :ARGUMENTS {\(} + :ARGUMENTS -> . \( \) {\( \. [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {\( \. [} + Transitions: \( => shift S47 \. => shift S91 [ => shift S93 + Gotos: :ARGUMENTS => S97 + + S101: + # -> NEW . # :ARGUMENTS {\( \. [} + # -> . :PRIMARY-RVALUE {\( \. [} + # -> . # {\( \. [} + # -> . NEW # :ARGUMENTS {\( \. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + # -> . :PRIMARY-LVALUE {\( \. [} + # -> . # [ :EXPRESSION ] {\( \. [} + # -> . # \. $IDENTIFIER {\( \. [} + :PRIMARY-LVALUE -> . $IDENTIFIER {\( \. [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {\( \. [} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S101 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: :PRIMARY-LVALUE => S37 # => S85 :PRIMARY-RVALUE => S88 # => S102 + + S102: + # -> NEW # . :ARGUMENTS {\( \. [} + # -> # . \. $IDENTIFIER {\( \. [} + # -> # . [ :EXPRESSION ] {\( \. [} + :ARGUMENTS -> . \( \) {\( \. [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {\( \. [} + Transitions: \( => shift S47 \. => shift S91 [ => shift S93 + Gotos: :ARGUMENTS => S92 + + S103: + # -> -- :LVALUE . {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-DECREMENT \( => shift S47 + Gotos: :ARGUMENTS => S50 + + S104: + # -> - # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-MINUS + + S105: + # -> ++ :LVALUE . {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-INCREMENT \( => shift S47 + Gotos: :ARGUMENTS => S50 + + S106: + # -> + # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-PLUS + + S107: + # -> # :ARGUMENTS . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| + => reduce MEMBER-LVALUE-CALL-MEMBER-EXPRESSION-NO-CALL + + + S108: + # -> # \. . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: $IDENTIFIER => shift S112 + + S109: + # -> # [ . :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :EXPRESSION -> . # {]} + # -> . # {]} + # -> . # {]} + # -> . :LVALUE = # {]} + # -> . # {]} + # -> + . # ? # \: # + {]} + # -> . # {? ] |\|\||} + # -> . # |\|\|| # {? ] |\|\||} + # -> . # {&& ? ] |\|\||} + # -> . # && # {&& ? ] |\|\||} + # -> . # {&& ? ] \| |\|\||} + # -> . # \| # {&& ? ] \| |\|\||} + # -> . # {&& ? ] ^ \| |\|\||} + # -> . # ^ # + {&& ? ] ^ \| |\|\||} + # -> . # {& && ? ] ^ \| |\|\||} + # -> . # & # {& && ? ] ^ \| |\|\||} + # -> . # {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== & && == === ? ] ^ \| |\|\||} + # -> . # {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== & && < <= == === > >= ? ] ^ \| |\|\||} + # -> . # {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== & && < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # {!= !== & && + - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== & && + - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== & && + - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # {!= !== % & && * + - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== % & && \( * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # {!= !== % & && * + - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S3 # => S4 + # => S5 # => S6 # => S7 + # => S8 # => S9 # => S10 + # => S11 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :EXPRESSION => S110 + + S110: + # -> # [ :EXPRESSION . ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: ] => shift S111 + + S111: + # -> # [ :EXPRESSION ] . + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\|| => reduce MEMBER-LVALUE-ARRAY + + S112: + # -> # \. $IDENTIFIER . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-LVALUE-PROPERTY + + S113: + # -> ! # . + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ^ \| |\|\|| => reduce UNARY-EXPRESSION-LOGICAL-NOT + + S114: + # -> # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> NEW # . :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . \. $IDENTIFIER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> # . [ :EXPRESSION ] + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> NEW # . :ARGUMENTS {\(} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce NEW-EXPRESSION-MEMBER-EXPRESSION + \( => shift S47 \. => shift S91 [ => shift S93 + Gotos: :ARGUMENTS => S115 + + S115: + # -> NEW # :ARGUMENTS . + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> NEW # :ARGUMENTS . {\(} + Transitions: != !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce MEMBER-EXPRESSION-NEW + \( => reduce MEMBER-EXPRESSION-NEW + + S116: + # -> :LVALUE = . # {$END \) \, \: ]} + # -> . # {$END \) \, ]} + # -> . :LVALUE = # {$END \) \, ]} + # -> . # {$END \) \, ]} + # -> + . # ? # \: # + {$END \) \, ]} + # -> . # {$END \) \, ? ] |\|\||} + # -> . # |\|\|| # + {$END \) \, ? ] |\|\||} + # -> . # {$END && \) \, ? ] |\|\||} + # -> . # && # + {$END && \) \, ? ] |\|\||} + # -> . # {$END && \) \, ? ] \| |\|\||} + # -> . # \| # + {$END && \) \, ? ] \| |\|\||} + # -> . # {$END && \) \, ? ] ^ \| |\|\||} + # -> . # ^ # + {$END && \) \, ? ] ^ \| |\|\||} + # -> . # {$END & && \) \, ? ] ^ \| |\|\||} + # -> . # & # + {$END & && \) \, ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== $END & && \) \, == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== $END & && \) \, == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== $END & && \) \, == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && \) \, == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, < <= == === > >= ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 # => S117 + + S117: + # -> :LVALUE = # . {$END \) \, ]} + Transitions: $END \) \, ] => reduce ASSIGNMENT-EXPRESSION-ASSIGNMENT + + S118: + :PROGRAM -> :EXPRESSION $END . {$$} + Transitions: $$ => reduce PROGRAM + + S119: + # -> DELETE :LVALUE . {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-DELETE \( => shift S47 + Gotos: :ARGUMENTS => S50 + + S120: + # -> -- :LVALUE . {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-DECREMENT + \( => shift S47 + Gotos: :ARGUMENTS => S50 + + S121: + # -> - # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-MINUS + + S122: + # -> ++ :LVALUE . {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-INCREMENT + \( => shift S47 + Gotos: :ARGUMENTS => S50 + + S123: + # -> + # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-PLUS + + S124: + # -> ! . # {% * + - /} + # -> . # {% \) * /} + # -> . DELETE :LVALUE {% \) * /} + # -> . VOID # {% \) * /} + # -> . TYPEOF :LVALUE {% \) * /} + # -> . TYPEOF # {% \) * /} + # -> . ++ :LVALUE {% \) * /} + # -> . -- :LVALUE {% \) * /} + # -> . + # {% \) * /} + # -> . - # {% \) * /} + # -> . ~ # {% \) * /} + # -> . ! # {% \) * /} + # -> ! . # {\)} + # -> . # {% * /} + # -> . # {% * /} + # -> . :LVALUE ++ {% * /} + # -> . :LVALUE -- {% * /} + # -> . # {% * /} + # -> . NEW # {% * /} + # -> . :PRIMARY-RVALUE {% * \. / [} + # -> . # {% * \. / [} + # -> . NEW # :ARGUMENTS {% * \. / [} + :PRIMARY-RVALUE -> . THIS {% \( * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * \. / [} + # -> . :LVALUE :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + # -> . # {% * \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S18 # => S19 + :PRIMARY-LVALUE => S37 :LVALUE => S46 # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S266 + + S125: + # -> # . {!= !== < << <= == === > >= >> >>>} + # -> # . - # + {+ - < << <= > >= >> >>>} + # -> # . + # + {+ - < << <= > >= >> >>>} + # -> # . - # {\)} + # -> # . + # {\)} + Transitions: != !== < << <= == === > >= >> >>> => reduce SHIFT-EXPRESSION-ADDITIVE + => shift S262 - => shift S263 + + S126: + # -> # . {\)} + Transitions: \) => reduce SHIFT-EXPRESSION-ADDITIVE + + S127: + # -> # . {\)} + Transitions: \) => reduce COMMA-EXPRESSION-ASSIGNMENT + + S128: + # -> # . {&& ^ \|} + # -> # . & # {& ^ \|} + # -> # . & # {\)} + Transitions: & => shift S260 && ^ \| => reduce BITWISE-XOR-EXPRESSION-BITWISE-AND + + S129: + # -> # . {\)} + Transitions: \) => reduce BITWISE-XOR-EXPRESSION-BITWISE-AND + + S130: + # -> # . {&& ? |\|\||} + # -> # . \| # {&& ? \| |\|\||} + # -> # . \| # {\)} + Transitions: && ? |\|\|| => reduce LOGICAL-AND-EXPRESSION-BITWISE-OR \| => shift S258 + + S131: + # -> # . {\)} + Transitions: \) => reduce LOGICAL-AND-EXPRESSION-BITWISE-OR + + S132: + # -> # . {&& ? \| |\|\||} + # -> # . ^ # {&& ^ \|} + # -> # . ^ # {\)} + Transitions: && ? \| |\|\|| => reduce BITWISE-OR-EXPRESSION-BITWISE-XOR ^ => shift S256 + + S133: + # -> # . {\)} + Transitions: \) => reduce BITWISE-OR-EXPRESSION-BITWISE-XOR + + S134: + :PRIMARY-RVALUE -> \( # . \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: \) => shift S255 + + S135: + # -> # . {\)} + Transitions: \) => reduce ASSIGNMENT-EXPRESSION-CONDITIONAL + + S136: + # -> # . {& ^ \|} + # -> # . !== # {!= !== & == === ^} + # -> # . === # {!= !== & == === ^} + # -> # . != # {!= !== & == === ^} + # -> # . == # {!= !== & == === ^} + # -> # . !== # {\)} + # -> # . === # {\)} + # -> # . != # {\)} + # -> # . == # {\)} + Transitions: != => shift S247 !== => shift S248 & ^ \| => reduce BITWISE-AND-EXPRESSION-EQUALITY == => shift S249 === => shift S250 + + S137: + # -> # . {\)} + Transitions: \) => reduce BITWISE-AND-EXPRESSION-EQUALITY + + S138: + # -> # . {? |\|\||} + # -> # . && # {&& ? |\|\||} + # -> # . && # {\)} + Transitions: && => shift S245 ? |\|\|| => reduce LOGICAL-OR-EXPRESSION-LOGICAL-AND + + S139: + # -> # . {\)} + Transitions: \) => reduce LOGICAL-OR-EXPRESSION-LOGICAL-AND + + S140: + # -> # . |\|\|| # {? |\|\||} + # -> + # . ? # \: # + {\)} + # -> # . |\|\|| # {\)} + Transitions: ? => shift S215 |\|\|| => shift S216 + + S141: + # -> # . {\)} + Transitions: \) => reduce CONDITIONAL-EXPRESSION-LOGICAL-OR + + S142: + :LVALUE -> # . {\( \) ++ -- =} + # -> # . {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + Transitions: != !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\|| => reduce MEMBER-EXPRESSION-MEMBER-LVALUE + \( \) ++ -- = => reduce LVALUE-MEMBER-LVALUE-CALL + + S143: + # -> # . + {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> # . {\( \) ++ -- =} + Transitions: != !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\|| => reduce MEMBER-EXPRESSION-MEMBER-LVALUE + \( \) ++ -- = => reduce LVALUE-MEMBER-LVALUE-NO-CALL + + S144: + # -> # . {+ - < << <= > >= >> >>>} + # -> # . % # {% * + - / << >> >>>} + # -> # . / # {% * + - / << >> >>>} + # -> # . * # {% * + - / << >> >>>} + # -> # . % # {\)} + # -> # . / # {\)} + # -> # . * # {\)} + Transitions: % => shift S209 * => shift S210 + - < << <= > >= >> >>> => reduce ADDITIVE-EXPRESSION-MULTIPLICATIVE / => shift S211 + + S145: + # -> # . {\)} + Transitions: \) => reduce ADDITIVE-EXPRESSION-MULTIPLICATIVE + + S146: + # -> # . {!= !== & == === ^} + # -> # . >= # {!= !== & < <= == === > >=} + # -> # . <= # {!= !== & < <= == === > >=} + # -> # . > # {!= !== & < <= == === > >=} + # -> # . < # {!= !== & < <= == === > >=} + # -> # . >= # {\)} + # -> # . <= # {\)} + # -> # . > # {\)} + # -> # . < # {\)} + Transitions: != !== & == === ^ => reduce EQUALITY-EXPRESSION-RELATIONAL < => shift S195 <= => shift S196 > => shift S197 + >= => shift S198 + + S147: + # -> # . {\)} + Transitions: \) => reduce EQUALITY-EXPRESSION-RELATIONAL + + S148: + # -> # . {!= !== & < <= == === > >=} + # -> # . >>> # + {!= !== < << <= == === > >= >> >>>} + # -> # . >> # {!= !== < << <= == === > >= >> >>>} + # -> # . << # {!= !== < << <= == === > >= >> >>>} + # -> # . >>> # {\)} + # -> # . >> # {\)} + # -> # . << # {\)} + Transitions: != !== & < <= == === > >= => reduce RELATIONAL-EXPRESSION-SHIFT << => shift S179 >> => shift S180 >>> => shift S181 + + S149: + # -> # . {\)} + Transitions: \) => reduce RELATIONAL-EXPRESSION-SHIFT + + S150: + # -> # . {\)} + Transitions: \) => reduce MULTIPLICATIVE-EXPRESSION-UNARY + + S151: + # -> + . # {% * + - /} + # -> . # {% \) * /} + # -> . DELETE :LVALUE {% \) * /} + # -> . VOID # {% \) * /} + # -> . TYPEOF :LVALUE {% \) * /} + # -> . TYPEOF # {% \) * /} + # -> . ++ :LVALUE {% \) * /} + # -> . -- :LVALUE {% \) * /} + # -> . + # {% \) * /} + # -> . - # {% \) * /} + # -> . ~ # {% \) * /} + # -> . ! # {% \) * /} + # -> + . # {\)} + # -> . # {% * /} + # -> . # {% * /} + # -> . :LVALUE ++ {% * /} + # -> . :LVALUE -- {% * /} + # -> . # {% * /} + # -> . NEW # {% * /} + # -> . :PRIMARY-RVALUE {% * \. / [} + # -> . # {% * \. / [} + # -> . NEW # :ARGUMENTS {% * \. / [} + :PRIMARY-RVALUE -> . THIS {% \( * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * \. / [} + # -> . :LVALUE :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + # -> . # {% * \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S18 # => S19 + :PRIMARY-LVALUE => S37 :LVALUE => S46 # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S178 + + S152: + # -> ++ . :LVALUE {% * + - /} + # -> ++ . :LVALUE {\)} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # {% \( \) * /} + :LVALUE -> . # {% \( \) * /} + # -> . :PRIMARY-LVALUE {% \( * \. / [} + # -> . # [ :EXPRESSION ] {% \( * \. / [} + # -> . # \. $IDENTIFIER {% \( * \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \( * /} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \( * /} + # -> . :LVALUE :ARGUMENTS {% \( * \. / [} + # -> . # :ARGUMENTS {% \( * \. / [} + # -> . # [ :EXPRESSION ] {% \( * \. / [} + # -> . # \. $IDENTIFIER {% \( * \. / [} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S158 :LVALUE => S177 + + S153: + # -> - . # {% * + - /} + # -> . # {% \) * /} + # -> . DELETE :LVALUE {% \) * /} + # -> . VOID # {% \) * /} + # -> . TYPEOF :LVALUE {% \) * /} + # -> . TYPEOF # {% \) * /} + # -> . ++ :LVALUE {% \) * /} + # -> . -- :LVALUE {% \) * /} + # -> . + # {% \) * /} + # -> . - # {% \) * /} + # -> . ~ # {% \) * /} + # -> . ! # {% \) * /} + # -> - . # {\)} + # -> . # {% * /} + # -> . # {% * /} + # -> . :LVALUE ++ {% * /} + # -> . :LVALUE -- {% * /} + # -> . # {% * /} + # -> . NEW # {% * /} + # -> . :PRIMARY-RVALUE {% * \. / [} + # -> . # {% * \. / [} + # -> . NEW # :ARGUMENTS {% * \. / [} + :PRIMARY-RVALUE -> . THIS {% \( * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * \. / [} + # -> . :LVALUE :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + # -> . # {% * \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S18 # => S19 + :PRIMARY-LVALUE => S37 :LVALUE => S46 # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S176 + + S154: + # -> -- . :LVALUE {% * + - /} + # -> -- . :LVALUE {\)} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # {% \( \) * /} + :LVALUE -> . # {% \( \) * /} + # -> . :PRIMARY-LVALUE {% \( * \. / [} + # -> . # [ :EXPRESSION ] {% \( * \. / [} + # -> . # \. $IDENTIFIER {% \( * \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \( * /} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \( * /} + # -> . :LVALUE :ARGUMENTS {% \( * \. / [} + # -> . # :ARGUMENTS {% \( * \. / [} + # -> . # [ :EXPRESSION ] {% \( * \. / [} + # -> . # \. $IDENTIFIER {% \( * \. / [} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S158 :LVALUE => S175 + + S155: + # -> DELETE . :LVALUE {% * + - /} + # -> DELETE . :LVALUE {\)} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {\( \. [} + :PRIMARY-RVALUE -> . NULL {\( \. [} + :PRIMARY-RVALUE -> . TRUE {\( \. [} + :PRIMARY-RVALUE -> . FALSE {\( \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \. [} + :PRIMARY-RVALUE -> . $STRING {\( \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \. [} + :LVALUE -> . # {% \( \) * /} + :LVALUE -> . # {% \( \) * /} + # -> . :PRIMARY-LVALUE {% \( * \. / [} + # -> . # [ :EXPRESSION ] {% \( * \. / [} + # -> . # \. $IDENTIFIER {% \( * \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \( * /} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \( * /} + # -> . :LVALUE :ARGUMENTS {% \( * \. / [} + # -> . # :ARGUMENTS {% \( * \. / [} + # -> . # [ :EXPRESSION ] {% \( * \. / [} + # -> . # \. $IDENTIFIER {% \( * \. / [} + # -> . # {\. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S99 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: # => S14 :PRIMARY-LVALUE => S37 # => S59 + # => S60 # => S62 # => S63 + :PRIMARY-RVALUE => S158 :LVALUE => S174 + + S156: + # -> :LVALUE . -- {% * + - /} + # -> :LVALUE . ++ {% * + - /} + # -> :LVALUE . = # {\)} + # -> :LVALUE . -- {\)} + # -> :LVALUE . ++ {\)} + :PRIMARY-LVALUE -> \( :LVALUE . \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> :LVALUE . :ARGUMENTS {% \( \) * ++ -- \. / = [} + :ARGUMENTS -> . \( \) {% \( \) * ++ -- \. / = [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {% \( \) * ++ -- \. / = [} + Transitions: \( => shift S47 \) => shift S169 ++ => shift S170 -- => shift S171 = => shift S172 + Gotos: :ARGUMENTS => S50 + + S157: + # -> NEW . # {% * + - /} + # -> . # {% \) * + - /} + # -> . NEW # {% \) * + - /} + # -> NEW . # :ARGUMENTS {% * + - \. / [} + # -> . :PRIMARY-RVALUE {% \( \) * + - \. / [} + # -> . # {% \( \) * + - \. / [} + # -> . NEW # :ARGUMENTS {% \( \) * + - \. / [} + # -> NEW . # {\)} + # -> NEW . # :ARGUMENTS {\( \)} + :PRIMARY-RVALUE -> . THIS {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . NULL {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( \) * + - \. / [} + # -> . :PRIMARY-LVALUE {% \( \) * + - \. / [} + # -> . # [ :EXPRESSION ] {% \( \) * + - \. / [} + # -> . # \. $IDENTIFIER {% \( \) * + - \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \( \) * + - \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \( \) * + - \. / [} + Transitions: $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 FALSE => shift S33 NEW => shift S87 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 + Gotos: :PRIMARY-LVALUE => S37 # => S85 :PRIMARY-RVALUE => S88 # => S166 + # => S167 + + S158: + # -> :PRIMARY-RVALUE . {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> :PRIMARY-RVALUE . {\( \)} + Transitions: != !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\|| => reduce MEMBER-EXPRESSION-PRIMARY-RVALUE + \( \) => reduce MEMBER-EXPRESSION-PRIMARY-RVALUE + + S159: + # -> TYPEOF . # {% * + - /} + # -> TYPEOF . :LVALUE {% * + - /} + # -> TYPEOF . # {\)} + # -> TYPEOF . :LVALUE {\)} + # -> . # {% \) * /} + # -> . DELETE :LVALUE {% \) * /} + # -> . VOID # {% \) * /} + # -> . TYPEOF :LVALUE {% \) * /} + # -> . TYPEOF # {% \) * /} + # -> . ++ :LVALUE {% \) * /} + # -> . -- :LVALUE {% \) * /} + # -> . + # {% \) * /} + # -> . - # {% \) * /} + # -> . ~ # {% \) * /} + # -> . ! # {% \) * /} + # -> . :PRIMARY-RVALUE {\. [} + # -> . # {\. [} + # -> . NEW # :ARGUMENTS {\. [} + :PRIMARY-RVALUE -> . THIS {% \( * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * \. / [} + # -> . # {% * /} + # -> . :LVALUE ++ {% * /} + # -> . :LVALUE -- {% * /} + :LVALUE -> . # {% \( \) * ++ -- /} + :LVALUE -> . # {% \( \) * ++ -- /} + # -> . :PRIMARY-LVALUE {\( ++ -- \. [} + # -> . # [ :EXPRESSION ] {\( ++ -- \. [} + # -> . # \. $IDENTIFIER {\( ++ -- \. [} + :PRIMARY-LVALUE -> . $IDENTIFIER {\( ++ --} + :PRIMARY-LVALUE -> . \( :LVALUE \) {\( ++ --} + # -> . :LVALUE :ARGUMENTS {\( ++ -- \. [} + # -> . # :ARGUMENTS {\( ++ -- \. [} + # -> . # [ :EXPRESSION ] {\( ++ -- \. [} + # -> . # \. $IDENTIFIER {\( ++ -- \. [} + # -> . # {\. [} + # -> . # {% * /} + # -> . NEW # {% * /} + # -> . :PRIMARY-RVALUE {% \( * /} + # -> . NEW # :ARGUMENTS {% \( * /} + Transitions: ! => shift S58 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S67 + ++ => shift S68 - => shift S69 -- => shift S70 DELETE => shift S71 FALSE => shift S33 NEW => shift S73 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S75 VOID => shift S76 ~ => shift S77 + Gotos: :PRIMARY-LVALUE => S37 # => S59 # => S60 + # => S61 # => S62 # => S63 + # => S64 # => S65 :PRIMARY-RVALUE => S74 + # => S164 :LVALUE => S165 + + S160: + # -> VOID . # {% * + - /} + # -> . # {% \) * /} + # -> . DELETE :LVALUE {% \) * /} + # -> . VOID # {% \) * /} + # -> . TYPEOF :LVALUE {% \) * /} + # -> . TYPEOF # {% \) * /} + # -> . ++ :LVALUE {% \) * /} + # -> . -- :LVALUE {% \) * /} + # -> . + # {% \) * /} + # -> . - # {% \) * /} + # -> . ~ # {% \) * /} + # -> . ! # {% \) * /} + # -> VOID . # {\)} + # -> . # {% * /} + # -> . # {% * /} + # -> . :LVALUE ++ {% * /} + # -> . :LVALUE -- {% * /} + # -> . # {% * /} + # -> . NEW # {% * /} + # -> . :PRIMARY-RVALUE {% * \. / [} + # -> . # {% * \. / [} + # -> . NEW # :ARGUMENTS {% * \. / [} + :PRIMARY-RVALUE -> . THIS {% \( * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * \. / [} + # -> . :LVALUE :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + # -> . # {% * \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S18 # => S19 + :PRIMARY-LVALUE => S37 :LVALUE => S46 # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S163 + + S161: + # -> ~ . # {% * + - /} + # -> . # {% \) * /} + # -> . DELETE :LVALUE {% \) * /} + # -> . VOID # {% \) * /} + # -> . TYPEOF :LVALUE {% \) * /} + # -> . TYPEOF # {% \) * /} + # -> . ++ :LVALUE {% \) * /} + # -> . -- :LVALUE {% \) * /} + # -> . + # {% \) * /} + # -> . - # {% \) * /} + # -> . ~ # {% \) * /} + # -> . ! # {% \) * /} + # -> ~ . # {\)} + # -> . # {% * /} + # -> . # {% * /} + # -> . :LVALUE ++ {% * /} + # -> . :LVALUE -- {% * /} + # -> . # {% * /} + # -> . NEW # {% * /} + # -> . :PRIMARY-RVALUE {% * \. / [} + # -> . # {% * \. / [} + # -> . NEW # :ARGUMENTS {% * \. / [} + :PRIMARY-RVALUE -> . THIS {% \( * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * \. / [} + # -> . :LVALUE :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # :ARGUMENTS {% \( * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( * ++ -- \. / [} + # -> . # {% * \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S18 # => S19 + :PRIMARY-LVALUE => S37 :LVALUE => S46 # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S162 + + S162: + # -> ~ # . {% * /} + # -> ~ # . {\)} + Transitions: % * / => reduce UNARY-EXPRESSION-BITWISE-NOT \) => reduce UNARY-EXPRESSION-BITWISE-NOT + + S163: + # -> VOID # . {% * /} + # -> VOID # . {\)} + Transitions: % * / => reduce UNARY-EXPRESSION-VOID \) => reduce UNARY-EXPRESSION-VOID + + S164: + # -> TYPEOF # . {% * /} + # -> TYPEOF # . {\)} + Transitions: % * / => reduce UNARY-EXPRESSION-TYPEOF-EXPRESSION \) => reduce UNARY-EXPRESSION-TYPEOF-EXPRESSION + + S165: + # -> TYPEOF :LVALUE . {% * /} + # -> TYPEOF :LVALUE . {\)} + # -> :LVALUE . -- {% * /} + # -> :LVALUE . ++ {% * /} + # -> :LVALUE . :ARGUMENTS {\( ++ -- \. [} + :ARGUMENTS -> . \( \) {\( ++ -- \. [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {\( ++ -- \. [} + Transitions: % * / => reduce UNARY-EXPRESSION-TYPEOF-LVALUE \( => shift S47 \) => reduce UNARY-EXPRESSION-TYPEOF-LVALUE ++ => shift S82 + -- => shift S83 + Gotos: :ARGUMENTS => S50 + + S166: + # -> # . {% \) * + - /} + # -> NEW # . :ARGUMENTS {% * + - \. / [} + # -> # . \. $IDENTIFIER {% \( \) * + - \. / [} + # -> # . [ :EXPRESSION ] {% \( \) * + - \. / [} + # -> NEW # . :ARGUMENTS {\( \)} + :ARGUMENTS -> . \( \) {% \( \) * \. / [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {% \( \) * \. / [} + Transitions: % \) * + - / => reduce NEW-EXPRESSION-MEMBER-EXPRESSION \( => shift S47 \. => shift S91 [ => shift S93 + Gotos: :ARGUMENTS => S168 + + S167: + # -> NEW # . {% * + - /} + # -> NEW # . {\)} + Transitions: % * + - / => reduce NEW-EXPRESSION-NEW \) => reduce NEW-EXPRESSION-NEW + + S168: + # -> NEW # :ARGUMENTS . {% * \. / [} + # -> NEW # :ARGUMENTS . {\( \)} + Transitions: % * \. / [ => reduce MEMBER-EXPRESSION-NEW \( \) => reduce MEMBER-EXPRESSION-NEW + + S169: + :PRIMARY-LVALUE -> \( :LVALUE \) . + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\|| + => reduce PRIMARY-LVALUE-PARENTHESES + + + S170: + # -> :LVALUE ++ . {% * + - /} + # -> :LVALUE ++ . {\)} + Transitions: % * + - / => reduce POSTFIX-EXPRESSION-INCREMENT \) => reduce POSTFIX-EXPRESSION-INCREMENT + + S171: + # -> :LVALUE -- . {% * + - /} + # -> :LVALUE -- . {\)} + Transitions: % * + - / => reduce POSTFIX-EXPRESSION-DECREMENT \) => reduce POSTFIX-EXPRESSION-DECREMENT + + S172: + # -> :LVALUE = . # {\)} + # -> . # {\)} + # -> . :LVALUE = # {\)} + # -> . # {\)} + # -> + . # ? # \: # + {\)} + # -> . # {\) ? |\|\||} + # -> . # |\|\|| # {\) ? |\|\||} + # -> . # {&& \) ? |\|\||} + # -> . # && # {&& \) ? |\|\||} + # -> . # {&& \) ? \| |\|\||} + # -> . # \| # {&& \) ? \| |\|\||} + # -> . # {&& \) ? ^ \| |\|\||} + # -> . # ^ # + {&& \) ? ^ \| |\|\||} + # -> . # {& && \) ? ^ \| |\|\||} + # -> . # & # + {& && \) ? ^ \| |\|\||} + # -> . # {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # == # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # != # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # === # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # !== # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # < # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # > # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # <= # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # >= # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # << # + {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >> # + {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >>> # + {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== & && \) + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + # + {!= !== & && \) + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # - # + {!= !== & && \) + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # * # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # / # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # % # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 # => S173 + + S173: + # -> :LVALUE = # . {\)} + Transitions: \) => reduce ASSIGNMENT-EXPRESSION-ASSIGNMENT + + S174: + # -> DELETE :LVALUE . {% * /} + # -> DELETE :LVALUE . {\)} + # -> :LVALUE . :ARGUMENTS {% \( * \. / [} + :ARGUMENTS -> . \( \) {% \( * \. / [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {% \( * \. / [} + Transitions: % * / => reduce UNARY-EXPRESSION-DELETE \( => shift S47 \) => reduce UNARY-EXPRESSION-DELETE + Gotos: :ARGUMENTS => S50 + + S175: + # -> -- :LVALUE . {% * /} + # -> -- :LVALUE . {\)} + # -> :LVALUE . :ARGUMENTS {% \( * \. / [} + :ARGUMENTS -> . \( \) {% \( * \. / [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {% \( * \. / [} + Transitions: % * / => reduce UNARY-EXPRESSION-DECREMENT \( => shift S47 \) => reduce UNARY-EXPRESSION-DECREMENT + Gotos: :ARGUMENTS => S50 + + S176: + # -> - # . {% * /} + # -> - # . {\)} + Transitions: % * / => reduce UNARY-EXPRESSION-MINUS \) => reduce UNARY-EXPRESSION-MINUS + + S177: + # -> ++ :LVALUE . {% * /} + # -> ++ :LVALUE . {\)} + # -> :LVALUE . :ARGUMENTS {% \( * \. / [} + :ARGUMENTS -> . \( \) {% \( * \. / [} + :ARGUMENTS -> . \( :ARGUMENT-LIST \) {% \( * \. / [} + Transitions: % * / => reduce UNARY-EXPRESSION-INCREMENT \( => shift S47 \) => reduce UNARY-EXPRESSION-INCREMENT + Gotos: :ARGUMENTS => S50 + + S178: + # -> + # . {% * /} + # -> + # . {\)} + Transitions: % * / => reduce UNARY-EXPRESSION-PLUS \) => reduce UNARY-EXPRESSION-PLUS + + S179: + # -> # << . # {!= !== < << <= == === > >= >> >>>} + # -> # << . # {\)} + # -> . # {\) + - < << <= > >= >> >>>} + # -> . # + # + {\) + - < << <= > >= >> >>>} + # -> . # - # + {\) + - < << <= > >= >> >>>} + # -> . # {% \) * + - /} + # -> . # * # {% \) * + - /} + # -> . # / # {% \) * + - /} + # -> . # % # {% \) * + - /} + # -> . # {% \) * + - /} + # -> . DELETE :LVALUE {% \) * + - /} + # -> . VOID # {% \) * + - /} + # -> . TYPEOF :LVALUE {% \) * + - /} + # -> . TYPEOF # {% \) * + - /} + # -> . ++ :LVALUE {% \) * + - /} + # -> . -- :LVALUE {% \) * + - /} + # -> . + # {% \) * + - /} + # -> . - # {% \) * + - /} + # -> . ~ # {% \) * + - /} + # -> . ! # {% \) * + - /} + # -> . # {% \) * + - /} + # -> . # {% \) * + - /} + # -> . :LVALUE ++ {% \) * + - /} + # -> . :LVALUE -- {% \) * + - /} + # -> . # {% \) * + - /} + # -> . NEW # {% \) * + - /} + # -> . :PRIMARY-RVALUE {% \) * + - \. / [} + # -> . # {% \) * + - \. / [} + # -> . NEW # :ARGUMENTS {% \) * + - \. / [} + :PRIMARY-RVALUE -> . THIS {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . NULL {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( \) * + - \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( \) * + - \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( \) * + ++ - -- \. / [} + # -> . # [ :EXPRESSION ] {% \( \) * + ++ - -- \. / [} + # -> . # \. $IDENTIFIER {% \( \) * + ++ - -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \) * + - \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \) * + - \. / [} + # -> . :LVALUE :ARGUMENTS {% \( \) * + ++ - -- \. / [} + # -> . # :ARGUMENTS {% \( \) * + ++ - -- \. / [} + # -> . # [ :EXPRESSION ] {% \( \) * + ++ - -- \. / [} + # -> . # \. $IDENTIFIER {% \( \) * + ++ - -- \. / [} + # -> . # {% \) * + - \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S194 + + S180: + # -> # >> . # {!= !== < << <= == === > >= >> >>>} + # -> # >> . # {\)} + # -> . # {\) + - < << <= > >= >> >>>} + # -> . # + # + {\) + - < << <= > >= >> >>>} + # -> . # - # + {\) + - < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . # * # + {% * + - / < << <= > >= >> >>>} + # -> . # / # + {% * + - / < << <= > >= >> >>>} + # -> . # % # + {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . DELETE :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . VOID # {% * + - / < << <= > >= >> >>>} + # -> . TYPEOF :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . TYPEOF # {% * + - / < << <= > >= >> >>>} + # -> . ++ :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . -- :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . + # {% * + - / < << <= > >= >> >>>} + # -> . - # {% * + - / < << <= > >= >> >>>} + # -> . ~ # {% * + - / < << <= > >= >> >>>} + # -> . ! # {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . :LVALUE ++ {% * + - / < << <= > >= >> >>>} + # -> . :LVALUE -- {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . NEW # {% * + - / < << <= > >= >> >>>} + # -> . :PRIMARY-RVALUE {% * + - \. / < << <= > >= >> >>> [} + # -> . # {% * + - \. / < << <= > >= >> >>> [} + # -> . NEW # :ARGUMENTS {% * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {% \( * + - \. / < << <= > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * + - \. / < << <= > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * + - \. / < << <= > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # :ARGUMENTS {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # {% * + - \. / < << <= > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S193 + + S181: + # -> # >>> . # + {!= !== < << <= == === > >= >> >>>} + # -> # >>> . # {\)} + # -> . # {\) + - < << <= > >= >> >>>} + # -> . # + # + {\) + - < << <= > >= >> >>>} + # -> . # - # + {\) + - < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . # * # + {% * + - / < << <= > >= >> >>>} + # -> . # / # + {% * + - / < << <= > >= >> >>>} + # -> . # % # + {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . DELETE :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . VOID # {% * + - / < << <= > >= >> >>>} + # -> . TYPEOF :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . TYPEOF # {% * + - / < << <= > >= >> >>>} + # -> . ++ :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . -- :LVALUE {% * + - / < << <= > >= >> >>>} + # -> . + # {% * + - / < << <= > >= >> >>>} + # -> . - # {% * + - / < << <= > >= >> >>>} + # -> . ~ # {% * + - / < << <= > >= >> >>>} + # -> . ! # {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . :LVALUE ++ {% * + - / < << <= > >= >> >>>} + # -> . :LVALUE -- {% * + - / < << <= > >= >> >>>} + # -> . # {% * + - / < << <= > >= >> >>>} + # -> . NEW # {% * + - / < << <= > >= >> >>>} + # -> . :PRIMARY-RVALUE {% * + - \. / < << <= > >= >> >>> [} + # -> . # {% * + - \. / < << <= > >= >> >>> [} + # -> . NEW # :ARGUMENTS {% * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {% \( * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {% \( * + - \. / < << <= > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * + - \. / < << <= > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * + - \. / < << <= > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # :ARGUMENTS {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # {% * + - \. / < << <= > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S182 + + S182: + # -> # >>> # . {< << <= > >= >> >>>} + # -> # . - # + {\) + - < << <= > >= >> >>>} + # -> # . + # + {\) + - < << <= > >= >> >>>} + # -> # >>> # . {\)} + Transitions: \) => reduce SHIFT-EXPRESSION-RIGHT-UNSIGNED + => shift S183 - => shift S184 + < << <= > >= >> >>> => reduce SHIFT-EXPRESSION-RIGHT-UNSIGNED + + S183: + # -> # + . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S192 + + S184: + # -> # - . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S185 + + S185: + # -> # - # . + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce ADDITIVE-EXPRESSION-SUBTRACT % => shift S186 + * => shift S187 / => shift S188 + + S186: + # -> # % . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S191 + + S187: + # -> # * . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S190 + + S188: + # -> # / . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S189 + + S189: + # -> # / # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce MULTIPLICATIVE-EXPRESSION-DIVIDE + + S190: + # -> # * # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce MULTIPLICATIVE-EXPRESSION-MULTIPLY + + S191: + # -> # % # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce MULTIPLICATIVE-EXPRESSION-REMAINDER + + S192: + # -> # + # . + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce ADDITIVE-EXPRESSION-ADD % => shift S186 + * => shift S187 / => shift S188 + + S193: + # -> # >> # . {< << <= > >= >> >>>} + # -> # . - # + {\) + - < << <= > >= >> >>>} + # -> # . + # + {\) + - < << <= > >= >> >>>} + # -> # >> # . {\)} + Transitions: \) => reduce SHIFT-EXPRESSION-RIGHT-SIGNED + => shift S183 - => shift S184 + < << <= > >= >> >>> => reduce SHIFT-EXPRESSION-RIGHT-SIGNED + + S194: + # -> # << # . {< << <= > >= >> >>>} + # -> # . - # + {\) + - < << <= > >= >> >>>} + # -> # . + # + {\) + - < << <= > >= >> >>>} + # -> # << # . {\)} + Transitions: \) => reduce SHIFT-EXPRESSION-LEFT + => shift S183 - => shift S184 < << <= > >= >> >>> => reduce SHIFT-EXPRESSION-LEFT + + S195: + # -> # < . # {!= !== & < <= == === > >=} + # -> # < . # {\)} + # -> . # {!= !== \) < << <= == === > >= >> >>>} + # -> . # << # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # {\) + - << >> >>>} + # -> . # + # {\) + - << >> >>>} + # -> . # - # {\) + - << >> >>>} + # -> . # {% \) * + - / << >> >>>} + # -> . # * # + {% \) * + - / << >> >>>} + # -> . # / # + {% \) * + - / << >> >>>} + # -> . # % # + {% \) * + - / << >> >>>} + # -> . # {% \) * + - / << >> >>>} + # -> . DELETE :LVALUE {% \) * + - / << >> >>>} + # -> . VOID # {% \) * + - / << >> >>>} + # -> . TYPEOF :LVALUE {% \) * + - / << >> >>>} + # -> . TYPEOF # {% \) * + - / << >> >>>} + # -> . ++ :LVALUE {% \) * + - / << >> >>>} + # -> . -- :LVALUE {% \) * + - / << >> >>>} + # -> . + # {% \) * + - / << >> >>>} + # -> . - # {% \) * + - / << >> >>>} + # -> . ~ # {% \) * + - / << >> >>>} + # -> . ! # {% \) * + - / << >> >>>} + # -> . # {% \) * + - / << >> >>>} + # -> . # {% \) * + - / << >> >>>} + # -> . :LVALUE ++ {% \) * + - / << >> >>>} + # -> . :LVALUE -- {% \) * + - / << >> >>>} + # -> . # {% \) * + - / << >> >>>} + # -> . NEW # {% \) * + - / << >> >>>} + # -> . :PRIMARY-RVALUE {% \) * + - \. / << >> >>> [} + # -> . # {% \) * + - \. / << >> >>> [} + # -> . NEW # :ARGUMENTS {% \) * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . THIS {% \( \) * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . NULL {% \( \) * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . TRUE {% \( \) * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . FALSE {% \( \) * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {% \( \) * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . $STRING {% \( \) * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {% \( \) * + - \. / << >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( \) * + ++ - -- \. / << >> >>> [} + # -> . # [ :EXPRESSION ] {% \( \) * + ++ - -- \. / << >> >>> [} + # -> . # \. $IDENTIFIER {% \( \) * + ++ - -- \. / << >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \) * + - \. / << >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \) * + - \. / << >> >>> [} + # -> . :LVALUE :ARGUMENTS {% \( \) * + ++ - -- \. / << >> >>> [} + # -> . # :ARGUMENTS {% \( \) * + ++ - -- \. / << >> >>> [} + # -> . # [ :EXPRESSION ] {% \( \) * + ++ - -- \. / << >> >>> [} + # -> . # \. $IDENTIFIER {% \( \) * + ++ - -- \. / << >> >>> [} + # -> . # {% \) * + - \. / << >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S208 + + S196: + # -> # <= . # {!= !== & < <= == === > >=} + # -> # <= . # {\)} + # -> . # {!= !== \) < << <= == === > >= >> >>>} + # -> . # << # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # {!= !== + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== + - < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S207 + + S197: + # -> # > . # {!= !== & < <= == === > >=} + # -> # > . # {\)} + # -> . # {!= !== \) < << <= == === > >= >> >>>} + # -> . # << # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # {!= !== + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== + - < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S206 + + S198: + # -> # >= . # {!= !== & < <= == === > >=} + # -> # >= . # {\)} + # -> . # {!= !== \) < << <= == === > >= >> >>>} + # -> . # << # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # {!= !== + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== + - < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % \( * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER {!= !== % \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S199 + + S199: + # -> # >= # . {!= !== < <= == === > >=} + # -> # . >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . << # + {!= !== \) < << <= == === > >= >> >>>} + # -> # >= # . {\)} + Transitions: != !== < <= == === > >= => reduce RELATIONAL-EXPRESSION-GREATER-OR-EQUAL \) => reduce RELATIONAL-EXPRESSION-GREATER-OR-EQUAL + << => shift S200 >> => shift S201 >>> => shift S202 + + S200: + # -> # << . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S205 + + S201: + # -> # >> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S204 + + S202: + # -> # >>> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S203 + + S203: + # -> # >>> # . + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce SHIFT-EXPRESSION-RIGHT-UNSIGNED + => shift S183 + - => shift S184 + + S204: + # -> # >> # . + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce SHIFT-EXPRESSION-RIGHT-SIGNED + => shift S183 + - => shift S184 + + S205: + # -> # << # . + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce SHIFT-EXPRESSION-LEFT + => shift S183 + - => shift S184 + + S206: + # -> # > # . {!= !== < <= == === > >=} + # -> # . >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . << # + {!= !== \) < << <= == === > >= >> >>>} + # -> # > # . {\)} + Transitions: != !== < <= == === > >= => reduce RELATIONAL-EXPRESSION-GREATER \) => reduce RELATIONAL-EXPRESSION-GREATER << => shift S200 + >> => shift S201 >>> => shift S202 + + S207: + # -> # <= # . {!= !== < <= == === > >=} + # -> # . >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . << # + {!= !== \) < << <= == === > >= >> >>>} + # -> # <= # . {\)} + Transitions: != !== < <= == === > >= => reduce RELATIONAL-EXPRESSION-LESS-OR-EQUAL \) => reduce RELATIONAL-EXPRESSION-LESS-OR-EQUAL + << => shift S200 >> => shift S201 >>> => shift S202 + + S208: + # -> # < # . {!= !== < <= == === > >=} + # -> # . >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> # . << # + {!= !== \) < << <= == === > >= >> >>>} + # -> # < # . {\)} + Transitions: != !== < <= == === > >= => reduce RELATIONAL-EXPRESSION-LESS \) => reduce RELATIONAL-EXPRESSION-LESS << => shift S200 + >> => shift S201 >>> => shift S202 + + S209: + # -> # % . # {% * + - / << >> >>>} + # -> # % . # {\)} + # -> . # {% \) * + - /} + # -> . DELETE :LVALUE {% \) * + - /} + # -> . VOID # {% \) * + - /} + # -> . TYPEOF :LVALUE {% \) * + - /} + # -> . TYPEOF # {% \) * + - /} + # -> . ++ :LVALUE {% \) * + - /} + # -> . -- :LVALUE {% \) * + - /} + # -> . + # {% \) * + - /} + # -> . - # {% \) * + - /} + # -> . ~ # {% \) * + - /} + # -> . ! # {% \) * + - /} + # -> . # {% * + - /} + # -> . # {% * + - /} + # -> . :LVALUE ++ {% * + - /} + # -> . :LVALUE -- {% * + - /} + # -> . # {% * + - /} + # -> . NEW # {% * + - /} + # -> . :PRIMARY-RVALUE {% * + - \. / [} + # -> . # {% * + - \. / [} + # -> . NEW # :ARGUMENTS {% * + - \. / [} + :PRIMARY-RVALUE -> . THIS {% \( * + - \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * + - \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * + - \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * + - \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * + - \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * + - \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * + - \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * + ++ - -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * + - \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * + - \. / [} + # -> . :LVALUE :ARGUMENTS {% \( * + ++ - -- \. / [} + # -> . # :ARGUMENTS {% \( * + ++ - -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / [} + # -> . # {% * + - \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S214 + + S210: + # -> # * . # {% * + - / << >> >>>} + # -> # * . # {\)} + # -> . # {% \) * + - /} + # -> . DELETE :LVALUE {% \) * + - /} + # -> . VOID # {% \) * + - /} + # -> . TYPEOF :LVALUE {% \) * + - /} + # -> . TYPEOF # {% \) * + - /} + # -> . ++ :LVALUE {% \) * + - /} + # -> . -- :LVALUE {% \) * + - /} + # -> . + # {% \) * + - /} + # -> . - # {% \) * + - /} + # -> . ~ # {% \) * + - /} + # -> . ! # {% \) * + - /} + # -> . # {\)} + # -> . # {\)} + # -> . :LVALUE ++ {\)} + # -> . :LVALUE -- {\)} + # -> . # {\)} + # -> . NEW # {\)} + # -> . :PRIMARY-RVALUE {\) \. [} + # -> . # {\) \. [} + # -> . NEW # :ARGUMENTS {\) \. [} + :PRIMARY-RVALUE -> . THIS {\( \) \. [} + :PRIMARY-RVALUE -> . NULL {\( \) \. [} + :PRIMARY-RVALUE -> . TRUE {\( \) \. [} + :PRIMARY-RVALUE -> . FALSE {\( \) \. [} + :PRIMARY-RVALUE -> . $NUMBER {\( \) \. [} + :PRIMARY-RVALUE -> . $STRING {\( \) \. [} + :PRIMARY-RVALUE -> . \( # \) {\( \) \. [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {\( \) ++ -- \. [} + # -> . # [ :EXPRESSION ] {\( \) ++ -- \. [} + # -> . # \. $IDENTIFIER {\( \) ++ -- \. [} + :PRIMARY-LVALUE -> . $IDENTIFIER {\) \. [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {\) \. [} + # -> . :LVALUE :ARGUMENTS {\( \) ++ -- \. [} + # -> . # :ARGUMENTS {\( \) ++ -- \. [} + # -> . # [ :EXPRESSION ] {\( \) ++ -- \. [} + # -> . # \. $IDENTIFIER {\( \) ++ -- \. [} + # -> . # {\) \. [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S213 + + S211: + # -> # / . # {% * + - / << >> >>>} + # -> # / . # {\)} + # -> . # {% \) * + - /} + # -> . DELETE :LVALUE {% \) * + - /} + # -> . VOID # {% \) * + - /} + # -> . TYPEOF :LVALUE {% \) * + - /} + # -> . TYPEOF # {% \) * + - /} + # -> . ++ :LVALUE {% \) * + - /} + # -> . -- :LVALUE {% \) * + - /} + # -> . + # {% \) * + - /} + # -> . - # {% \) * + - /} + # -> . ~ # {% \) * + - /} + # -> . ! # {% \) * + - /} + # -> . # {% * + - /} + # -> . # {% * + - /} + # -> . :LVALUE ++ {% * + - /} + # -> . :LVALUE -- {% * + - /} + # -> . # {% * + - /} + # -> . NEW # {% * + - /} + # -> . :PRIMARY-RVALUE {% * + - \. / [} + # -> . # {% * + - \. / [} + # -> . NEW # :ARGUMENTS {% * + - \. / [} + :PRIMARY-RVALUE -> . THIS {% \( * + - \. / [} + :PRIMARY-RVALUE -> . NULL {% \( * + - \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( * + - \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( * + - \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * + - \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( * + - \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( * + - \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * + ++ - -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * + - \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * + - \. / [} + # -> . :LVALUE :ARGUMENTS {% \( * + ++ - -- \. / [} + # -> . # :ARGUMENTS {% \( * + ++ - -- \. / [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / [} + # -> . # {% * + - \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S212 + + S212: + # -> # / # . {% * + - /} + # -> # / # . {\)} + Transitions: % * + - / => reduce MULTIPLICATIVE-EXPRESSION-DIVIDE \) => reduce MULTIPLICATIVE-EXPRESSION-DIVIDE + + S213: + # -> # * # . {% * + - /} + # -> # * # . {\)} + Transitions: % * + - / => reduce MULTIPLICATIVE-EXPRESSION-MULTIPLY \) => reduce MULTIPLICATIVE-EXPRESSION-MULTIPLY + + S214: + # -> # % # . {% * + - /} + # -> # % # . {\)} + Transitions: % * + - / => reduce MULTIPLICATIVE-EXPRESSION-REMAINDER \) => reduce MULTIPLICATIVE-EXPRESSION-REMAINDER + + S215: + # -> + # ? . # \: # + {\)} + # -> . # {\:} + # -> . :LVALUE = # {\:} + # -> . # {\:} + # -> + . # ? # \: # + {\:} + # -> . # {\: ? |\|\||} + # -> . # |\|\|| # {\: ? |\|\||} + # -> . # {&& \: ? |\|\||} + # -> . # && # {&& \: ? |\|\||} + # -> . # {&& \: ? \| |\|\||} + # -> . # \| # {&& \: ? \| |\|\||} + # -> . # {&& \: ? ^ \| |\|\||} + # -> . # ^ # + {&& \: ? ^ \| |\|\||} + # -> . # {& && \: ? ^ \| |\|\||} + # -> . # & # + {& && \: ? ^ \| |\|\||} + # -> . # {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # == # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # != # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # === # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # !== # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # < # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # > # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # <= # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # >= # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # << # + {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >> # + {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >>> # + {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== & && + - \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + # + {!= !== & && + - \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # - # + {!= !== & && + - \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # * # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # / # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # % # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S17 + # => S18 # => S19 # => S20 + # => S21 # => S22 :LVALUE => S34 :PRIMARY-LVALUE => S37 + # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S242 + + S216: + # -> # |\|\|| . # {? |\|\||} + # -> # |\|\|| . # {\)} + # -> . # {&& \) ? |\|\||} + # -> . # && # {&& \) ? |\|\||} + # -> . # {&& \) \|} + # -> . # \| # {&& \) \|} + # -> . # {&& \) ^ \|} + # -> . # ^ # {&& \) ^ \|} + # -> . # {& && \) ^ \|} + # -> . # & # {& && \) ^ \|} + # -> . # {!= !== & && \) == === ^ \|} + # -> . # == # + {!= !== & && \) == === ^ \|} + # -> . # != # + {!= !== & && \) == === ^ \|} + # -> . # === # + {!= !== & && \) == === ^ \|} + # -> . # !== # + {!= !== & && \) == === ^ \|} + # -> . # {!= !== & && \) < <= == === > >= ^ \|} + # -> . # < # + {!= !== & && \) < <= == === > >= ^ \|} + # -> . # > # + {!= !== & && \) < <= == === > >= ^ \|} + # -> . # <= # + {!= !== & && \) < <= == === > >= ^ \|} + # -> . # >= # + {!= !== & && \) < <= == === > >= ^ \|} + # -> . # {!= !== & && \) < << <= == === > >= >> >>> ^ \|} + # -> . # << # + {!= !== & && \) < << <= == === > >= >> >>> ^ \|} + # -> . # >> # + {!= !== & && \) < << <= == === > >= >> >>> ^ \|} + # -> . # >>> # + {!= !== & && \) < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== & && \) + - < << <= == === > >= >> >>> ^ \|} + # -> . # + # + {!= !== & && \) + - < << <= == === > >= >> >>> ^ \|} + # -> . # - # + {!= !== & && \) + - < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # * # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # / # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # % # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . DELETE :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . VOID # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . TYPEOF :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . TYPEOF # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . ++ :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . -- :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . + # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . - # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . ~ # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . ! # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . :LVALUE ++ {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . :LVALUE -- {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . NEW # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . :PRIMARY-RVALUE {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . NEW # :ARGUMENTS + {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % & && \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . :LVALUE :ARGUMENTS {!= !== % & && \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # :ARGUMENTS + {!= !== % & && \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S9 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S217 + + S217: + # -> # |\|\|| # . {? |\|\||} + # -> # . && # {&& \) ? |\|\||} + # -> # |\|\|| # . {\)} + Transitions: && => shift S218 \) => reduce LOGICAL-OR-EXPRESSION-OR ? |\|\|| => reduce LOGICAL-OR-EXPRESSION-OR + + S218: + # -> # && . # + {$END && \) \, \: ? ] |\|\||} + # -> . # {$END && \) \, \: ? ] \| |\|\||} + # -> . # \| # + {$END && \) \, \: ? ] \| |\|\||} + # -> . # {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # ^ # + {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # & # + {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S6 + # => S9 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S219 + + S219: + # -> # && # . + {$END && \) \, \: ? ] |\|\||} + # -> # . \| # + {$END && \) \, \: ? ] \| |\|\||} + Transitions: $END && \) \, \: ? ] |\|\|| => reduce LOGICAL-AND-EXPRESSION-AND \| => shift S220 + + S220: + # -> # \| . # + {$END && \) \, \: ? ] \| |\|\||} + # -> . # {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # ^ # + {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # & # + {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S9 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S221 + + S221: + # -> # \| # . + {$END && \) \, \: ? ] \| |\|\||} + # -> # . ^ # + {$END && \) \, \: ? ] ^ \| |\|\||} + Transitions: $END && \) \, \: ? ] \| |\|\|| => reduce BITWISE-OR-EXPRESSION-OR ^ => shift S222 + + S222: + # -> # ^ . # + {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # & # + {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S9 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S223 + + S223: + # -> # ^ # . + {$END && \) \, \: ? ] ^ \| |\|\||} + # -> # . & # + {$END & && \) \, \: ? ] ^ \| |\|\||} + Transitions: $END && \) \, \: ? ] ^ \| |\|\|| => reduce BITWISE-XOR-EXPRESSION-XOR & => shift S224 + + S224: + # -> # & . # + {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S225 + + S225: + # -> # & # . + {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> # . !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + Transitions: != => shift S226 !== => shift S227 $END & && \) \, \: ? ] ^ \| |\|\|| => reduce BITWISE-AND-EXPRESSION-AND == => shift S228 + === => shift S229 + + S226: + # -> # != . # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S21 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S241 + + S227: + # -> # !== . # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S21 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S240 + + S228: + # -> # == . # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S21 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S239 + + S229: + # -> # === . # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S21 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S230 + + S230: + # -> # === # . + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: == === ? ] ^ \| |\|\|| => reduce EQUALITY-EXPRESSION-STRICT-EQUAL < => shift S231 <= => shift S232 + > => shift S233 >= => shift S234 + + S231: + # -> # < . # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S238 + + S232: + # -> # <= . # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S237 + + S233: + # -> # > . # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S236 + + S234: + # -> # >= . # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 + :LVALUE => S46 # => S235 + + S235: + # -> # >= # . + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\|| => reduce RELATIONAL-EXPRESSION-GREATER-OR-EQUAL << => shift S200 + >> => shift S201 >>> => shift S202 + + S236: + # -> # > # . + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\|| => reduce RELATIONAL-EXPRESSION-GREATER << => shift S200 + >> => shift S201 >>> => shift S202 + + S237: + # -> # <= # . + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\|| => reduce RELATIONAL-EXPRESSION-LESS-OR-EQUAL << => shift S200 + >> => shift S201 >>> => shift S202 + + S238: + # -> # < # . + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> # . << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\|| => reduce RELATIONAL-EXPRESSION-LESS << => shift S200 + >> => shift S201 >>> => shift S202 + + S239: + # -> # == # . + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: == === ? ] ^ \| |\|\|| => reduce EQUALITY-EXPRESSION-EQUAL < => shift S231 <= => shift S232 + > => shift S233 >= => shift S234 + + S240: + # -> # !== # . + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: == === ? ] ^ \| |\|\|| => reduce EQUALITY-EXPRESSION-STRICT-NOT-EQUAL < => shift S231 + <= => shift S232 > => shift S233 >= => shift S234 + + S241: + # -> # != # . + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> # . >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> # . < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + Transitions: != !== $END & && \) \, \: == === ? ] ^ \| |\|\|| => reduce EQUALITY-EXPRESSION-NOT-EQUAL < => shift S231 <= => shift S232 + > => shift S233 >= => shift S234 + + S242: + # -> + # ? # . \: # + {\)} + Transitions: \: => shift S243 + + S243: + # -> + # ? # \: . # + {\)} + # -> . # {\)} + # -> . :LVALUE = # {\)} + # -> . # {\)} + # -> + . # ? # \: # + {\)} + # -> . # {\) ? |\|\||} + # -> . # |\|\|| # {\) ? |\|\||} + # -> . # {&& \) ? |\|\||} + # -> . # && # {&& \) ? |\|\||} + # -> . # {&& \) ? \| |\|\||} + # -> . # \| # {&& \) ? \| |\|\||} + # -> . # {&& \) ? ^ \| |\|\||} + # -> . # ^ # + {&& \) ? ^ \| |\|\||} + # -> . # {& && \) ? ^ \| |\|\||} + # -> . # & # + {& && \) ? ^ \| |\|\||} + # -> . # {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # == # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # != # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # === # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # !== # + {!= !== & && \) == === ? ^ \| |\|\||} + # -> . # {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # < # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # > # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # <= # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # >= # + {!= !== & && \) < <= == === > >= ? ^ \| |\|\||} + # -> . # {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # << # + {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >> # + {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >>> # + {!= !== & && \) < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== & && \) + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + # + {!= !== & && \) + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # - # + {!= !== & && \) + - < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # * # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # / # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # % # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # {!= !== % & && \) * + - / < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( \) * + ++ - -- \. / < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {!= !== % & && \) * + - \. / < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 # => S244 + + S244: + # -> + # ? # \: # . + {\)} + Transitions: \) => reduce CONDITIONAL-EXPRESSION-CONDITIONAL + + S245: + # -> # && . # {&& ? |\|\||} + # -> # && . # {\)} + # -> . # {&& \) ? \| |\|\||} + # -> . # \| # {&& \) ? \| |\|\||} + # -> . # {\) ^ \|} + # -> . # ^ # {\) ^ \|} + # -> . # {& \) ^ \|} + # -> . # & # {& \) ^ \|} + # -> . # {!= !== & \) == === ^ \|} + # -> . # == # {!= !== & \) == === ^ \|} + # -> . # != # {!= !== & \) == === ^ \|} + # -> . # === # + {!= !== & \) == === ^ \|} + # -> . # !== # + {!= !== & \) == === ^ \|} + # -> . # {!= !== & \) < <= == === > >= ^ \|} + # -> . # < # + {!= !== & \) < <= == === > >= ^ \|} + # -> . # > # + {!= !== & \) < <= == === > >= ^ \|} + # -> . # <= # + {!= !== & \) < <= == === > >= ^ \|} + # -> . # >= # + {!= !== & \) < <= == === > >= ^ \|} + # -> . # {!= !== & \) < << <= == === > >= >> >>> ^ \|} + # -> . # << # + {!= !== & \) < << <= == === > >= >> >>> ^ \|} + # -> . # >> # + {!= !== & \) < << <= == === > >= >> >>> ^ \|} + # -> . # >>> # + {!= !== & \) < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== & \) + - < << <= == === > >= >> >>> ^ \|} + # -> . # + # + {!= !== & \) + - < << <= == === > >= >> >>> ^ \|} + # -> . # - # + {!= !== & \) + - < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # * # + {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # / # + {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # % # + {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . DELETE :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . VOID # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . TYPEOF :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . TYPEOF # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . ++ :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . -- :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . + # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . - # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . ~ # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . ! # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . :LVALUE ++ {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . :LVALUE -- {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . NEW # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^ \|} + # -> . :PRIMARY-RVALUE {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . NEW # :ARGUMENTS + {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . THIS {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . NULL {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . TRUE {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . FALSE {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . $STRING {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # [ :EXPRESSION ] + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # \. $IDENTIFIER + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . :LVALUE :ARGUMENTS {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # :ARGUMENTS + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # [ :EXPRESSION ] + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # \. $IDENTIFIER + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . # {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^ \|} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S6 + # => S9 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S246 + + S246: + # -> # && # . {&& ? |\|\||} + # -> # . \| # {&& \) ? \| |\|\||} + # -> # && # . {\)} + Transitions: && ? |\|\|| => reduce LOGICAL-AND-EXPRESSION-AND \) => reduce LOGICAL-AND-EXPRESSION-AND \| => shift S220 + + S247: + # -> # != . # {!= !== & == === ^} + # -> # != . # {\)} + # -> . # {!= !== & \) < <= == === > >=} + # -> . # < # + {!= !== & \) < <= == === > >=} + # -> . # > # + {!= !== & \) < <= == === > >=} + # -> . # <= # + {!= !== & \) < <= == === > >=} + # -> . # >= # + {!= !== & \) < <= == === > >=} + # -> . # {!= !== & < << <= == === > >= >> >>>} + # -> . # << # + {!= !== & < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== & < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== & < << <= == === > >= >> >>>} + # -> . # {!= !== & + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== & + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== & + - < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 + # => S17 # => S18 # => S19 + # => S21 # => S22 :PRIMARY-LVALUE => S37 :LVALUE => S46 + # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S254 + + S248: + # -> # !== . # {!= !== & == === ^} + # -> # !== . # {\)} + # -> . # {!= !== & \) < <= == === > >=} + # -> . # < # + {!= !== & \) < <= == === > >=} + # -> . # > # + {!= !== & \) < <= == === > >=} + # -> . # <= # + {!= !== & \) < <= == === > >=} + # -> . # >= # + {!= !== & \) < <= == === > >=} + # -> . # {!= !== & < << <= == === > >= >> >>>} + # -> . # << # + {!= !== & < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== & < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== & < << <= == === > >= >> >>>} + # -> . # {!= !== & + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== & + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== & + - < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 + # => S17 # => S18 # => S19 + # => S21 # => S22 :PRIMARY-LVALUE => S37 :LVALUE => S46 + # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S253 + + S249: + # -> # == . # {!= !== & == === ^} + # -> # == . # {\)} + # -> . # {!= !== & \) < <= == === > >=} + # -> . # < # + {!= !== & \) < <= == === > >=} + # -> . # > # + {!= !== & \) < <= == === > >=} + # -> . # <= # + {!= !== & \) < <= == === > >=} + # -> . # >= # + {!= !== & \) < <= == === > >=} + # -> . # {\) < << <= > >= >> >>>} + # -> . # << # {\) < << <= > >= >> >>>} + # -> . # >> # {\) < << <= > >= >> >>>} + # -> . # >>> # {\) < << <= > >= >> >>>} + # -> . # {\) + - < << <= > >= >> >>>} + # -> . # + # + {\) + - < << <= > >= >> >>>} + # -> . # - # + {\) + - < << <= > >= >> >>>} + # -> . # {% \) * + - / < << <= > >= >> >>>} + # -> . # * # + {% \) * + - / < << <= > >= >> >>>} + # -> . # / # + {% \) * + - / < << <= > >= >> >>>} + # -> . # % # + {% \) * + - / < << <= > >= >> >>>} + # -> . # {% \) * + - / < << <= > >= >> >>>} + # -> . DELETE :LVALUE {% \) * + - / < << <= > >= >> >>>} + # -> . VOID # {% \) * + - / < << <= > >= >> >>>} + # -> . TYPEOF :LVALUE {% \) * + - / < << <= > >= >> >>>} + # -> . TYPEOF # {% \) * + - / < << <= > >= >> >>>} + # -> . ++ :LVALUE {% \) * + - / < << <= > >= >> >>>} + # -> . -- :LVALUE {% \) * + - / < << <= > >= >> >>>} + # -> . + # {% \) * + - / < << <= > >= >> >>>} + # -> . - # {% \) * + - / < << <= > >= >> >>>} + # -> . ~ # {% \) * + - / < << <= > >= >> >>>} + # -> . ! # {% \) * + - / < << <= > >= >> >>>} + # -> . # {% \) * + - / < << <= > >= >> >>>} + # -> . # {% \) * + - / < << <= > >= >> >>>} + # -> . :LVALUE ++ {% \) * + - / < << <= > >= >> >>>} + # -> . :LVALUE -- {% \) * + - / < << <= > >= >> >>>} + # -> . # {% \) * + - / < << <= > >= >> >>>} + # -> . NEW # {% \) * + - / < << <= > >= >> >>>} + # -> . :PRIMARY-RVALUE {% \) * + - \. / < << <= > >= >> >>> [} + # -> . # {% \) * + - \. / < << <= > >= >> >>> [} + # -> . NEW # :ARGUMENTS {% \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {% \( \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {% \( \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {% \( \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {% \( \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {% \( \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {% \( \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {% \( \) * + - \. / < << <= > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( \) * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # [ :EXPRESSION ] {% \( \) * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # \. $IDENTIFIER {% \( \) * + ++ - -- \. / < << <= > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \) * + - \. / < << <= > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \) * + - \. / < << <= > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {% \( \) * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # :ARGUMENTS {% \( \) * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # [ :EXPRESSION ] {% \( \) * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # \. $IDENTIFIER {% \( \) * + ++ - -- \. / < << <= > >= >> >>> [} + # -> . # {% \) * + - \. / < << <= > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S21 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S252 + + S250: + # -> # === . # {!= !== & == === ^} + # -> # === . # {\)} + # -> . # {!= !== & \) < <= == === > >=} + # -> . # < # + {!= !== & \) < <= == === > >=} + # -> . # > # + {!= !== & \) < <= == === > >=} + # -> . # <= # + {!= !== & \) < <= == === > >=} + # -> . # >= # + {!= !== & \) < <= == === > >=} + # -> . # {!= !== & < << <= == === > >= >> >>>} + # -> . # << # + {!= !== & < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== & < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== & < << <= == === > >= >> >>>} + # -> . # {!= !== & + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== & + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== & + - < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % & * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & \( * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 + # => S17 # => S18 # => S19 + # => S21 # => S22 :PRIMARY-LVALUE => S37 :LVALUE => S46 + # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S251 + + S251: + # -> # === # . {!= !== & == ===} + # -> # . >= # + {!= !== & \) < <= == === > >=} + # -> # . <= # + {!= !== & \) < <= == === > >=} + # -> # . > # + {!= !== & \) < <= == === > >=} + # -> # . < # + {!= !== & \) < <= == === > >=} + # -> # === # . {\)} + Transitions: != !== & == === => reduce EQUALITY-EXPRESSION-STRICT-EQUAL \) => reduce EQUALITY-EXPRESSION-STRICT-EQUAL < => shift S231 + <= => shift S232 > => shift S233 >= => shift S234 + + S252: + # -> # == # . {!= !== & == ===} + # -> # . >= # + {!= !== & \) < <= == === > >=} + # -> # . <= # + {!= !== & \) < <= == === > >=} + # -> # . > # + {!= !== & \) < <= == === > >=} + # -> # . < # + {!= !== & \) < <= == === > >=} + # -> # == # . {\)} + Transitions: != !== & == === => reduce EQUALITY-EXPRESSION-EQUAL \) => reduce EQUALITY-EXPRESSION-EQUAL < => shift S231 <= => shift S232 + > => shift S233 >= => shift S234 + + S253: + # -> # !== # . {!= !== & == ===} + # -> # . >= # + {!= !== & \) < <= == === > >=} + # -> # . <= # + {!= !== & \) < <= == === > >=} + # -> # . > # + {!= !== & \) < <= == === > >=} + # -> # . < # + {!= !== & \) < <= == === > >=} + # -> # !== # . {\)} + Transitions: != !== & == === => reduce EQUALITY-EXPRESSION-STRICT-NOT-EQUAL \) => reduce EQUALITY-EXPRESSION-STRICT-NOT-EQUAL + < => shift S231 <= => shift S232 > => shift S233 >= => shift S234 + + S254: + # -> # != # . {!= !== & == ===} + # -> # . >= # + {!= !== & \) < <= == === > >=} + # -> # . <= # + {!= !== & \) < <= == === > >=} + # -> # . > # + {!= !== & \) < <= == === > >=} + # -> # . < # + {!= !== & \) < <= == === > >=} + # -> # != # . {\)} + Transitions: != !== & == === => reduce EQUALITY-EXPRESSION-NOT-EQUAL \) => reduce EQUALITY-EXPRESSION-NOT-EQUAL < => shift S231 + <= => shift S232 > => shift S233 >= => shift S234 + + S255: + :PRIMARY-RVALUE -> \( # \) . + {!= !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + Transitions: != !== $END % & && \( \) * + \, - \. / < << <= == === > >= >> >>> ? [ ] ^ \| |\|\|| => reduce PRIMARY-RVALUE-PARENTHESES + + S256: + # -> # ^ . # {&& ^ \|} + # -> # ^ . # {\)} + # -> . # {& \) ^ \|} + # -> . # & # {& \) ^ \|} + # -> . # {!= !== & \) == ===} + # -> . # == # {!= !== & \) == ===} + # -> . # != # {!= !== & \) == ===} + # -> . # === # {!= !== & \) == ===} + # -> . # !== # {!= !== & \) == ===} + # -> . # {!= !== & \) < <= == === > >=} + # -> . # < # + {!= !== & \) < <= == === > >=} + # -> . # > # + {!= !== & \) < <= == === > >=} + # -> . # <= # + {!= !== & \) < <= == === > >=} + # -> . # >= # + {!= !== & \) < <= == === > >=} + # -> . # {!= !== & \) < << <= == === > >= >> >>>} + # -> . # << # + {!= !== & \) < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== & \) < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== & \) < << <= == === > >= >> >>>} + # -> . # {!= !== & \) + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== & \) + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== & \) + - < << <= == === > >= >> >>>} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % & \) * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S9 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S257 + + S257: + # -> # ^ # . {^ \|} + # -> # . & # {& \) ^ \|} + # -> # ^ # . {\)} + Transitions: & => shift S224 \) => reduce BITWISE-XOR-EXPRESSION-XOR ^ \| => reduce BITWISE-XOR-EXPRESSION-XOR + + S258: + # -> # \| . # {&& ? \| |\|\||} + # -> # \| . # {\)} + # -> . # {&& \) ^ \|} + # -> . # ^ # {&& \) ^ \|} + # -> . # {& \) ^} + # -> . # & # {& \) ^} + # -> . # {!= !== & \) == === ^} + # -> . # == # {!= !== & \) == === ^} + # -> . # != # {!= !== & \) == === ^} + # -> . # === # {!= !== & \) == === ^} + # -> . # !== # {!= !== & \) == === ^} + # -> . # {!= !== & \) < <= == === > >= ^} + # -> . # < # + {!= !== & \) < <= == === > >= ^} + # -> . # > # + {!= !== & \) < <= == === > >= ^} + # -> . # <= # + {!= !== & \) < <= == === > >= ^} + # -> . # >= # + {!= !== & \) < <= == === > >= ^} + # -> . # {!= !== & \) < << <= == === > >= >> >>> ^} + # -> . # << # + {!= !== & \) < << <= == === > >= >> >>> ^} + # -> . # >> # + {!= !== & \) < << <= == === > >= >> >>> ^} + # -> . # >>> # + {!= !== & \) < << <= == === > >= >> >>> ^} + # -> . # {!= !== & \) + - < << <= == === > >= >> >>> ^} + # -> . # + # + {!= !== & \) + - < << <= == === > >= >> >>> ^} + # -> . # - # + {!= !== & \) + - < << <= == === > >= >> >>> ^} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . # * # + {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . # / # + {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . # % # + {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . DELETE :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . VOID # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . TYPEOF :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . TYPEOF # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . ++ :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . -- :LVALUE {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . + # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . - # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . ~ # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . ! # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . :LVALUE ++ {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . :LVALUE -- {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . NEW # {!= !== % & \) * + - / < << <= == === > >= >> >>> ^} + # -> . :PRIMARY-RVALUE {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^} + # -> . # {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^} + # -> . NEW # :ARGUMENTS + {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-RVALUE -> . THIS {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-RVALUE -> . NULL {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-RVALUE -> . TRUE {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-RVALUE -> . FALSE {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-RVALUE -> . $STRING {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & \( \) * + - \. / < << <= == === > >= >> >>> [ ^} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^} + # -> . # [ :EXPRESSION ] + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^} + # -> . # \. $IDENTIFIER + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^} + # -> . :LVALUE :ARGUMENTS {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^} + # -> . # :ARGUMENTS + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^} + # -> . # [ :EXPRESSION ] + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^} + # -> . # \. $IDENTIFIER + {!= !== % & \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [ ^} + # -> . # {!= !== % & \) * + - \. / < << <= == === > >= >> >>> [ ^} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S9 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S259 + + S259: + # -> # \| # . {&& \|} + # -> # . ^ # {&& \) ^ \|} + # -> # \| # . {\)} + Transitions: && \| => reduce BITWISE-OR-EXPRESSION-OR \) => reduce BITWISE-OR-EXPRESSION-OR ^ => shift S222 + + S260: + # -> # & . # {& ^ \|} + # -> # & . # {\)} + # -> . # {!= !== & \) == === ^} + # -> . # == # {!= !== & \) == === ^} + # -> . # != # {!= !== & \) == === ^} + # -> . # === # {!= !== & \) == === ^} + # -> . # !== # {!= !== & \) == === ^} + # -> . # {!= !== \) < <= == === > >=} + # -> . # < # + {!= !== \) < <= == === > >=} + # -> . # > # + {!= !== \) < <= == === > >=} + # -> . # <= # + {!= !== \) < <= == === > >=} + # -> . # >= # + {!= !== \) < <= == === > >=} + # -> . # {!= !== \) < << <= == === > >= >> >>>} + # -> . # << # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # >>> # + {!= !== \) < << <= == === > >= >> >>>} + # -> . # {!= !== \) + - < << <= == === > >= >> >>>} + # -> . # + # + {!= !== \) + - < << <= == === > >= >> >>>} + # -> . # - # + {!= !== \) + - < << <= == === > >= >> >>>} + # -> . # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . # * # + {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . # / # + {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . # % # + {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . DELETE :LVALUE {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . VOID # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF :LVALUE {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . TYPEOF # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . ++ :LVALUE {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . -- :LVALUE {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . + # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . - # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . ~ # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . ! # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE ++ {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . :LVALUE -- {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . NEW # {!= !== % \) * + - / < << <= == === > >= >> >>>} + # -> . :PRIMARY-RVALUE {!= !== % \) * + - \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % \) * + - \. / < << <= == === > >= >> >>> [} + # -> . NEW # :ARGUMENTS + {!= !== % \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . THIS {!= !== % \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . NULL {!= !== % \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . TRUE {!= !== % \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . FALSE {!= !== % \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . $STRING {!= !== % \( \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {!= !== % \( \) * + - \. / < << <= == === > >= >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {!= !== % \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % \) * + - \. / < << <= == === > >= >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % \) * + - \. / < << <= == === > >= >> >>> [} + # -> . :LVALUE :ARGUMENTS {!= !== % \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # :ARGUMENTS + {!= !== % \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # [ :EXPRESSION ] + {!= !== % \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # \. $IDENTIFIER + {!= !== % \( \) * + ++ - -- \. / < << <= == === > >= >> >>> [} + # -> . # {!= !== % \) * + - \. / < << <= == === > >= >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S261 + + S261: + # -> # & # . {& ^} + # -> # . !== # {!= !== & \) == === ^} + # -> # . === # {!= !== & \) == === ^} + # -> # . != # {!= !== & \) == === ^} + # -> # . == # {!= !== & \) == === ^} + # -> # & # . {\)} + Transitions: != => shift S226 !== => shift S227 & ^ => reduce BITWISE-AND-EXPRESSION-AND \) => reduce BITWISE-AND-EXPRESSION-AND + == => shift S228 === => shift S229 + + S262: + # -> # + . # + {+ - < << <= > >= >> >>>} + # -> # + . # {\)} + # -> . # {% \) * + - / << >> >>>} + # -> . # * # + {% \) * + - / << >> >>>} + # -> . # / # + {% \) * + - / << >> >>>} + # -> . # % # + {% \) * + - / << >> >>>} + # -> . # {% \) * /} + # -> . DELETE :LVALUE {% \) * /} + # -> . VOID # {% \) * /} + # -> . TYPEOF :LVALUE {% \) * /} + # -> . TYPEOF # {% \) * /} + # -> . ++ :LVALUE {% \) * /} + # -> . -- :LVALUE {% \) * /} + # -> . + # {% \) * /} + # -> . - # {% \) * /} + # -> . ~ # {% \) * /} + # -> . ! # {% \) * /} + # -> . # {% \) * /} + # -> . # {% \) * /} + # -> . :LVALUE ++ {% \) * /} + # -> . :LVALUE -- {% \) * /} + # -> . # {% \) * /} + # -> . NEW # {% \) * /} + # -> . :PRIMARY-RVALUE {% \) * \. / [} + # -> . # {% \) * \. / [} + # -> . NEW # :ARGUMENTS {% \) * \. / [} + :PRIMARY-RVALUE -> . THIS {% \( \) * \. / [} + :PRIMARY-RVALUE -> . NULL {% \( \) * \. / [} + :PRIMARY-RVALUE -> . TRUE {% \( \) * \. / [} + :PRIMARY-RVALUE -> . FALSE {% \( \) * \. / [} + :PRIMARY-RVALUE -> . $NUMBER {% \( \) * \. / [} + :PRIMARY-RVALUE -> . $STRING {% \( \) * \. / [} + :PRIMARY-RVALUE -> . \( # \) {% \( \) * \. / [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( \) * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( \) * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( \) * ++ -- \. / [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% \) * \. / [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% \) * \. / [} + # -> . :LVALUE :ARGUMENTS {% \( \) * ++ -- \. / [} + # -> . # :ARGUMENTS {% \( \) * ++ -- \. / [} + # -> . # [ :EXPRESSION ] {% \( \) * ++ -- \. / [} + # -> . # \. $IDENTIFIER {% \( \) * ++ -- \. / [} + # -> . # {% \) * \. / [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S18 # => S19 # => S22 + :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 # => S265 + + S263: + # -> # - . # + {+ - < << <= > >= >> >>>} + # -> # - . # {\)} + # -> . # {% \) * + - / << >> >>>} + # -> . # * # + {% \) * + - / << >> >>>} + # -> . # / # + {% \) * + - / << >> >>>} + # -> . # % # + {% \) * + - / << >> >>>} + # -> . # {% * + - / << >> >>>} + # -> . DELETE :LVALUE {% * + - / << >> >>>} + # -> . VOID # {% * + - / << >> >>>} + # -> . TYPEOF :LVALUE {% * + - / << >> >>>} + # -> . TYPEOF # {% * + - / << >> >>>} + # -> . ++ :LVALUE {% * + - / << >> >>>} + # -> . -- :LVALUE {% * + - / << >> >>>} + # -> . + # {% * + - / << >> >>>} + # -> . - # {% * + - / << >> >>>} + # -> . ~ # {% * + - / << >> >>>} + # -> . ! # {% * + - / << >> >>>} + # -> . # {% * + - / << >> >>>} + # -> . # {% * + - / << >> >>>} + # -> . :LVALUE ++ {% * + - / << >> >>>} + # -> . :LVALUE -- {% * + - / << >> >>>} + # -> . # {% * + - / << >> >>>} + # -> . NEW # {% * + - / << >> >>>} + # -> . :PRIMARY-RVALUE {% * + - \. / << >> >>> [} + # -> . # {% * + - \. / << >> >>> [} + # -> . NEW # :ARGUMENTS {% * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . THIS {% \( * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . NULL {% \( * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . TRUE {% \( * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . FALSE {% \( * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . $NUMBER {% \( * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . $STRING {% \( * + - \. / << >> >>> [} + :PRIMARY-RVALUE -> . \( # \) {% \( * + - \. / << >> >>> [} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE {% \( * + ++ - -- \. / << >> >>> [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / << >> >>> [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / << >> >>> [} + :PRIMARY-LVALUE -> . $IDENTIFIER {% * + - \. / << >> >>> [} + :PRIMARY-LVALUE -> . \( :LVALUE \) {% * + - \. / << >> >>> [} + # -> . :LVALUE :ARGUMENTS {% \( * + ++ - -- \. / << >> >>> [} + # -> . # :ARGUMENTS {% \( * + ++ - -- \. / << >> >>> [} + # -> . # [ :EXPRESSION ] {% \( * + ++ - -- \. / << >> >>> [} + # -> . # \. $IDENTIFIER {% \( * + ++ - -- \. / << >> >>> [} + # -> . # {% * + - \. / << >> >>> [} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S12 # => S13 + # => S14 # => S18 # => S19 + # => S22 :PRIMARY-LVALUE => S37 :LVALUE => S46 # => S142 + # => S143 :PRIMARY-RVALUE => S158 # => S264 + + S264: + # -> # - # . {+ - << >> >>>} + # -> # . % # + {% \) * + - / << >> >>>} + # -> # . / # + {% \) * + - / << >> >>>} + # -> # . * # + {% \) * + - / << >> >>>} + # -> # - # . {\)} + Transitions: % => shift S186 \) => reduce ADDITIVE-EXPRESSION-SUBTRACT * => shift S187 + + - << >> >>> => reduce ADDITIVE-EXPRESSION-SUBTRACT / => shift S188 + + S265: + # -> # + # . {+ - << >> >>>} + # -> # . % # + {% \) * + - / << >> >>>} + # -> # . / # + {% \) * + - / << >> >>>} + # -> # . * # + {% \) * + - / << >> >>>} + # -> # + # . {\)} + Transitions: % => shift S186 \) => reduce ADDITIVE-EXPRESSION-ADD * => shift S187 + - << >> >>> => reduce ADDITIVE-EXPRESSION-ADD + / => shift S188 + + S266: + # -> ! # . {% * /} + # -> ! # . {\)} + Transitions: % * / => reduce UNARY-EXPRESSION-LOGICAL-NOT \) => reduce UNARY-EXPRESSION-LOGICAL-NOT + + S267: + # -> + # ? . # \: # + {$END \) \, \: ]} + # -> . # {\:} + # -> + . # ? # \: # + {\:} + # -> . # {\:} + # -> . :LVALUE = # {\:} + # -> . # {\: ? |\|\||} + # -> . # |\|\|| # {\: ? |\|\||} + # -> . # {&& \: ? |\|\||} + # -> . # && # {&& \: ? |\|\||} + # -> . # {&& \: ? \| |\|\||} + # -> . # \| # {&& \: ? \| |\|\||} + # -> . # {&& \: ? ^ \| |\|\||} + # -> . # ^ # + {&& \: ? ^ \| |\|\||} + # -> . # {& && \: ? ^ \| |\|\||} + # -> . # & # + {& && \: ? ^ \| |\|\||} + # -> . # {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # == # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # != # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # === # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # !== # + {!= !== & && \: == === ? ^ \| |\|\||} + # -> . # {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # < # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # > # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # <= # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # >= # + {!= !== & && \: < <= == === > >= ? ^ \| |\|\||} + # -> . # {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # << # + {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >> # + {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # >>> # + {!= !== & && \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== & && + - \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + # + {!= !== & && + - \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # - # + {!= !== & && + - \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # * # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # / # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # % # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . VOID # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . TYPEOF # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . -- :LVALUE {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . + # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . - # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ~ # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . ! # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :LVALUE -- {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . # + {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . NEW # {!= !== % & && * + - / \: < << <= == === > >= >> >>> ? ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # + {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) {!= !== % & && \( * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== % & && \( * + ++ - -- \. / \: < << <= = == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . # {!= !== % & && * + - \. / \: < << <= == === > >= >> >>> ? [ ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S17 + # => S18 # => S19 # => S20 + # => S21 # => S22 :LVALUE => S34 :PRIMARY-LVALUE => S37 + # => S142 # => S143 :PRIMARY-RVALUE => S158 + # => S270 + + S268: + # -> # |\|\|| . # + {$END \) \, \: ? ] |\|\||} + # -> . # {$END && \) \, \: ? ] |\|\||} + # -> . # && # + {$END && \) \, \: ? ] |\|\||} + # -> . # {$END && \) \, \: ? ] \| |\|\||} + # -> . # \| # + {$END && \) \, \: ? ] \| |\|\||} + # -> . # {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # ^ # + {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # & # + {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ --} + :LVALUE -> . # {\( ++ --} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S9 # => S12 + # => S13 # => S14 # => S15 + # => S16 # => S17 # => S18 + # => S19 # => S20 # => S21 + # => S22 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 :LVALUE => S46 + # => S269 + + S269: + # -> # |\|\|| # . + {$END \) \, \: ? ] |\|\||} + # -> # . && # + {$END && \) \, \: ? ] |\|\||} + Transitions: $END \) \, \: ? ] |\|\|| => reduce LOGICAL-OR-EXPRESSION-OR && => shift S218 + + S270: + # -> + # ? # . \: # + {$END \) \, \: ]} + Transitions: \: => shift S271 + + S271: + # -> + # ? # \: . # + {$END \) \, \: ]} + # -> . # {$END \) \, \: ]} + # -> + . # ? # \: # + {$END \) \, \: ]} + # -> . # {$END \) \, \: ]} + # -> . :LVALUE = # {$END \) \, \: ]} + # -> . # {$END \) \, \: ? ] |\|\||} + # -> . # |\|\|| # + {$END \) \, \: ? ] |\|\||} + # -> . # {$END && \) \, \: ? ] |\|\||} + # -> . # && # + {$END && \) \, \: ? ] |\|\||} + # -> . # {$END && \) \, \: ? ] \| |\|\||} + # -> . # \| # + {$END && \) \, \: ? ] \| |\|\||} + # -> . # {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # ^ # + {$END && \) \, \: ? ] ^ \| |\|\||} + # -> . # {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # & # + {$END & && \) \, \: ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # == # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # != # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # === # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # !== # + {!= !== $END & && \) \, \: == === ? ] ^ \| |\|\||} + # -> . # {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # < # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # > # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # <= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # >= # + {!= !== $END & && \) \, \: < <= == === > >= ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # << # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # >>> # + {!= !== $END & && \) \, \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # - # + {!= !== $END & && \) + \, - \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # * # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # / # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # % # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . DELETE :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . VOID # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . TYPEOF # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ++ :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . -- :LVALUE {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . + # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . - # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ~ # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . ! # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE ++ {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :LVALUE -- {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . NEW # + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . NEW # :ARGUMENTS + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . THIS + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . NULL + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . TRUE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . FALSE + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $NUMBER + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . $STRING + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-RVALUE -> . \( # \) + {!= !== $END % & && \( \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :LVALUE -> . # {\( ++ -- =} + :LVALUE -> . # {\( ++ -- =} + # -> . :PRIMARY-LVALUE + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . $IDENTIFIER + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + :PRIMARY-LVALUE -> . \( :LVALUE \) + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :LVALUE :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # :ARGUMENTS + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # [ :EXPRESSION ] + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # \. $IDENTIFIER + {!= !== $END % & && \( \) * + ++ \, - -- \. / \: < << <= = == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . # + {!= !== $END % & && \) * + \, - \. / \: < << <= == === > >= >> >>> ? [ ] ^ \| |\|\||} + # -> . :PRIMARY-RVALUE {\(} + # -> . NEW # :ARGUMENTS {\(} + Transitions: ! => shift S1 $IDENTIFIER => shift S23 $NUMBER => shift S24 $STRING => shift S25 \( => shift S26 + => shift S27 + ++ => shift S28 - => shift S29 -- => shift S30 DELETE => shift S31 FALSE => shift S33 NEW => shift S35 + NULL => shift S36 THIS => shift S40 TRUE => shift S41 TYPEOF => shift S42 VOID => shift S43 ~ => shift S44 + Gotos: # => S2 # => S4 # => S5 + # => S6 # => S8 # => S9 + # => S10 # => S11 + # => S12 # => S13 + # => S14 # => S15 # => S16 + # => S17 # => S18 # => S19 + # => S20 # => S21 # => S22 + :LVALUE => S34 :PRIMARY-LVALUE => S37 :PRIMARY-RVALUE => S38 # => S272 + + S272: + # -> + # ? # \: # . + {$END \) \, \: ]} + Transitions: $END \) \, \: ] => reduce CONDITIONAL-EXPRESSION-CONDITIONAL + + S273: + # -> ! # . + {!= !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\||} + Transitions: != !== $END % & && \) * + \, - / \: < << <= == === > >= >> >>> ? ] ^ \| |\|\|| => reduce UNARY-EXPRESSION-LOGICAL-NOT + diff --git a/mozilla/js2/semantics/ECMA Lexer Charclasses.rtf b/mozilla/js2/semantics/ECMA Lexer Charclasses.rtf new file mode 100644 index 00000000000..31365c6c27c --- /dev/null +++ b/mozilla/js2/semantics/ECMA Lexer Charclasses.rtf @@ -0,0 +1,572 @@ +{\rtf1\mac\ansicpg10000\uc1\deff0\deflang2057\deflangfe2057 +{\fonttbl{\f0\froman\fcharset256\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\f3\ftech\fcharset2\fprq2 Symbol;}{\f4\fnil\fcharset256\fprq2 Helvetica;} +{\f5\fmodern\fcharset256\fprq2 Courier New;}{\f6\fnil\fcharset256\fprq2 Palatino;} +{\f7\fscript\fcharset256\fprq2 Zapf Chancery;}{\f8\ftech\fcharset2\fprq2 Zapf Dingbats;}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; +\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0 +\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0 +\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;} +{\stylesheet{\widctlpar\fs20\lang2057\snext0 Normal;} +{\s1\qj\sa120\widctlpar\fs20\lang2057\sbasedon0\snext1 Body Text;} +{\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057\sbasedon3\snext1 heading 3;} +{\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057\sbasedon0\snext1 heading 4;} +{\s10\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext10 Grammar;} +{\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057\sbasedon0\snext12 Grammar Header;} +{\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext14 Grammar LHS;} +{\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar LHS Last;} +{\s14\fi-1260\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon10\snext14 Grammar +RHS;} +{\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon14\snext12 Grammar +RHS Last;} +{\s16\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar Argument;} +{\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext20 Semantics;} +{\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon20\snext21 Semantics Next;} +{\*\cs30\additive Default Paragraph Font;} +{\*\cs31\b\f5\cf2\lang1024\additive\sbasedon30 Character Literal;} +{\*\cs32\b0\f0\cf9\additive\sbasedon30 Character Literal Control;} +{\*\cs33\b\f6\cf10\lang1024\additive\sbasedon30 Terminal;} +{\*\cs34\b\f5\cf2\lang1024\additive\sbasedon33 Terminal Keyword;} +{\*\cs35\i\f6\cf13\lang1024\additive\sbasedon30 Nonterminal;} +{\*\cs36\i0\additive\sbasedon30 Nonterminal Attribute;} +{\*\cs37\additive\sbasedon30 Nonterminal Argument;} +{\*\cs40\b\f0\additive\sbasedon30 Semantic Keyword;} +{\*\cs41\f0\cf6\lang1024\additive\sbasedon30 Type Expression;} +{\*\cs42\scaps\f0\cf6\lang1024\additive\sbasedon41 Type Name;} +{\*\cs43\f4\cf6\lang1024\additive\sbasedon41 Field Name;} +{\*\cs44\i\f0\cf11\lang1024\additive\sbasedon30 Global Variable;} +{\*\cs45\i\f0\cf4\lang1024\additive\sbasedon30 Local Variable;} +{\*\cs46\f7\cf12\lang1024\additive\sbasedon30 Action Name;}} +\widowctrl\ftnbj\aenddoc\fet0\formshade\viewkind4\viewscale125\pgbrdrhead\pgbrdrfoot\sectd\pard +\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Character Classes\par\pard\plain\s13 +\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 WhiteSpaceCharacter} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7TAB\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7VT\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7FF\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7SP\u187\'C8}\par +{\cs35\i\f6\cf13\lang1024 LineTerminator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7LF\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7CR\u187\'C8}\par +{\cs35\i\f6\cf13\lang1024 NonTerminator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AnyCharacter} {\b except} {\cs35\i\f6\cf13\lang1024 LineTerminator}\par +{\cs35\i\f6\cf13\lang1024 NonTerminatorOrSlash} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonTerminator} {\b except} {\cs31\b\f5\cf2\lang1024/}\par +{\cs35\i\f6\cf13\lang1024 NonTerminatorOrAsteriskOrSlash} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonTerminator} {\b except} {\cs31\b\f5\cf2\lang1024*} | +{\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 IdentifierLetter} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 A} | +{\cs31\b\f5\cf2\lang1024 B} | {\cs31\b\f5\cf2\lang1024 C} | {\cs31\b\f5\cf2\lang1024 D} | +{\cs31\b\f5\cf2\lang1024 E} | {\cs31\b\f5\cf2\lang1024 F} | {\cs31\b\f5\cf2\lang1024 G} | +{\cs31\b\f5\cf2\lang1024 H} | {\cs31\b\f5\cf2\lang1024 I} | {\cs31\b\f5\cf2\lang1024 J} | +{\cs31\b\f5\cf2\lang1024 K} | {\cs31\b\f5\cf2\lang1024 L} | {\cs31\b\f5\cf2\lang1024 M} | +{\cs31\b\f5\cf2\lang1024 N} | {\cs31\b\f5\cf2\lang1024 O} | {\cs31\b\f5\cf2\lang1024 P} | +{\cs31\b\f5\cf2\lang1024 Q} | {\cs31\b\f5\cf2\lang1024 R} | {\cs31\b\f5\cf2\lang1024 S} | +{\cs31\b\f5\cf2\lang1024 T} | {\cs31\b\f5\cf2\lang1024 U} | {\cs31\b\f5\cf2\lang1024 V} | +{\cs31\b\f5\cf2\lang1024 W} | {\cs31\b\f5\cf2\lang1024 X} | {\cs31\b\f5\cf2\lang1024 Y} | +{\cs31\b\f5\cf2\lang1024 Z}\par|\tab{\cs31\b\f5\cf2\lang1024 a} | {\cs31\b\f5\cf2\lang1024 b} | +{\cs31\b\f5\cf2\lang1024 c} | {\cs31\b\f5\cf2\lang1024 d} | {\cs31\b\f5\cf2\lang1024 e} | +{\cs31\b\f5\cf2\lang1024 f} | {\cs31\b\f5\cf2\lang1024 g} | {\cs31\b\f5\cf2\lang1024 h} | +{\cs31\b\f5\cf2\lang1024 i} | {\cs31\b\f5\cf2\lang1024 j} | {\cs31\b\f5\cf2\lang1024 k} | +{\cs31\b\f5\cf2\lang1024 l} | {\cs31\b\f5\cf2\lang1024 m} | {\cs31\b\f5\cf2\lang1024 n} | +{\cs31\b\f5\cf2\lang1024 o} | {\cs31\b\f5\cf2\lang1024 p} | {\cs31\b\f5\cf2\lang1024 q} | +{\cs31\b\f5\cf2\lang1024 r} | {\cs31\b\f5\cf2\lang1024 s} | {\cs31\b\f5\cf2\lang1024 t} | +{\cs31\b\f5\cf2\lang1024 u} | {\cs31\b\f5\cf2\lang1024 v} | {\cs31\b\f5\cf2\lang1024 w} | +{\cs31\b\f5\cf2\lang1024 x} | {\cs31\b\f5\cf2\lang1024 y} | {\cs31\b\f5\cf2\lang1024 z}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs31\b\f5\cf2\lang1024$} | {\cs31\b\f5\cf2\lang1024_}\par\pard\plain\s13\fi-1440\li1800\sb120 +\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 DecimalDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | +{\cs31\b\f5\cf2\lang1024 4} | {\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | +{\cs31\b\f5\cf2\lang1024 7} | {\cs31\b\f5\cf2\lang1024 8} | {\cs31\b\f5\cf2\lang1024 9}\par +{\cs35\i\f6\cf13\lang1024 NonZeroDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 1} | +{\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | {\cs31\b\f5\cf2\lang1024 4} | +{\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | {\cs31\b\f5\cf2\lang1024 7} | +{\cs31\b\f5\cf2\lang1024 8} | {\cs31\b\f5\cf2\lang1024 9}\par{\cs35\i\f6\cf13\lang1024 OctalDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | +{\cs31\b\f5\cf2\lang1024 4} | {\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | +{\cs31\b\f5\cf2\lang1024 7}\par{\cs35\i\f6\cf13\lang1024 ZeroToThree} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3}\par +{\cs35\i\f6\cf13\lang1024 FourToSeven} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 4} | +{\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | {\cs31\b\f5\cf2\lang1024 7}\par +{\cs35\i\f6\cf13\lang1024 HexDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | +{\cs31\b\f5\cf2\lang1024 4} | {\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | +{\cs31\b\f5\cf2\lang1024 7} | {\cs31\b\f5\cf2\lang1024 8} | {\cs31\b\f5\cf2\lang1024 9} | +{\cs31\b\f5\cf2\lang1024 A} | {\cs31\b\f5\cf2\lang1024 B} | {\cs31\b\f5\cf2\lang1024 C} | +{\cs31\b\f5\cf2\lang1024 D} | {\cs31\b\f5\cf2\lang1024 E} | {\cs31\b\f5\cf2\lang1024 F} | +{\cs31\b\f5\cf2\lang1024 a} | {\cs31\b\f5\cf2\lang1024 b} | {\cs31\b\f5\cf2\lang1024 c} | +{\cs31\b\f5\cf2\lang1024 d} | {\cs31\b\f5\cf2\lang1024 e} | {\cs31\b\f5\cf2\lang1024 f}\par +{\cs35\i\f6\cf13\lang1024 ExponentIndicator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 E} | +{\cs31\b\f5\cf2\lang1024 e}\par{\cs35\i\f6\cf13\lang1024 HexIndicator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 X} | +{\cs31\b\f5\cf2\lang1024 x}\par{\cs35\i\f6\cf13\lang1024 PlainStringChar} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AnyCharacter} {\b except} {\cs31\b\f5\cf2\lang1024'} | +{\cs31\b\f5\cf2\lang1024"} | {\cs31\b\f5\cf2\lang1024\\} | {\cs35\i\f6\cf13\lang1024 OctalDigit} | +{\cs35\i\f6\cf13\lang1024 LineTerminator}\par{\cs35\i\f6\cf13\lang1024 StringNonEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonTerminator} {\b except} {\cs35\i\f6\cf13\lang1024 OctalDigit} | +{\cs31\b\f5\cf2\lang1024 x} | {\cs31\b\f5\cf2\lang1024 u} | {\cs31\b\f5\cf2\lang1024'} | +{\cs31\b\f5\cf2\lang1024"} | {\cs31\b\f5\cf2\lang1024\\} | {\cs31\b\f5\cf2\lang1024 b} | +{\cs31\b\f5\cf2\lang1024 f} | {\cs31\b\f5\cf2\lang1024 n} | {\cs31\b\f5\cf2\lang1024 r} | +{\cs31\b\f5\cf2\lang1024 t} | {\cs31\b\f5\cf2\lang1024 v}\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Grammar\par\pard\plain\s1\qj\sa120\widctlpar\fs20\lang2057 Sta +rt nonterminal: {\cs35\i\f6\cf13\lang1024 NextToken}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120 +\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NextToken} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 WhiteSpace} {\cs35\i\f6\cf13\lang1024 Token}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 LineBreaks} +\par|\tab{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord}\par|\tab +{\cs35\i\f6\cf13\lang1024 Punctuator}\par|\tab{\cs35\i\f6\cf13\lang1024 NumericLiteral}\par|\tab +{\cs35\i\f6\cf13\lang1024 StringLiteral}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 EndOfInput}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 EndOfInput} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024 End}\par +\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LineComment} {\cs33\b\f6\cf10\lang1024 End}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 StringLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024'} +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} {\cs31\b\f5\cf2\lang1024'}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs31\b\f5\cf2\lang1024"} {\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} +{\cs31\b\f5\cf2\lang1024"}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs36\i0 double}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} {\cs31\b\f5\cf2\lang1024\\} +{\cs35\i\f6\cf13\lang1024 ShortOctalEscape}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs36\i0 double} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} +{\cs35\i\f6\cf13\lang1024 PlainStringChar}\par|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 double}\par|\tab +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs36\i0 double} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} +{\cs31\b\f5\cf2\lang1024\\} {\cs35\i\f6\cf13\lang1024 OrdinaryEscape}\par\pard\plain\s13\fi-1440 +\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 double} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024'}\par +\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs36\i0 single}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} {\cs31\b\f5\cf2\lang1024\\} +{\cs35\i\f6\cf13\lang1024 ShortOctalEscape}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ShortOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 OctalDigit} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ZeroToThree} {\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs36\i0 single} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} +{\cs35\i\f6\cf13\lang1024 PlainStringChar}\par|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 single}\par|\tab +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs36\i0 single} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} +{\cs31\b\f5\cf2\lang1024\\} {\cs35\i\f6\cf13\lang1024 OrdinaryEscape}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 StringCharEscape}\par|\tab{\cs35\i\f6\cf13\lang1024 FullOctalEscape}\par| +\tab{\cs35\i\f6\cf13\lang1024 HexEscape}\par|\tab{\cs35\i\f6\cf13\lang1024 UnicodeEscape}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 StringNonEscape}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 StringNonEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Other_}\par +|\tab{\cs31\b\f5\cf2\lang1024~}\par|\tab{\cs31\b\f5\cf2\lang1024\}}\par|\tab +{\cs31\b\f5\cf2\lang1024|}\par|\tab{\cs31\b\f5\cf2\lang1024\{}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars8_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars7_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars6_}\par|\tab{\cs31\b\f5\cf2\lang1024^}\par|\tab +{\cs31\b\f5\cf2\lang1024]}\par|\tab{\cs31\b\f5\cf2\lang1024[}\par|\tab{\cs31\b\f5\cf2\lang1024 X} +\par|\tab{\cs31\b\f5\cf2\lang1024?}\par|\tab{\cs31\b\f5\cf2\lang1024>}\par|\tab +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024<}\par|\tab{\cs31\b\f5\cf2\lang1024;}\par +|\tab{\cs31\b\f5\cf2\lang1024:}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars5_}\par|\tab +{\cs31\b\f5\cf2\lang1024/}\par|\tab{\cs31\b\f5\cf2\lang1024.}\par|\tab{\cs31\b\f5\cf2\lang1024 -} +\par|\tab{\cs31\b\f5\cf2\lang1024,}\par|\tab{\cs31\b\f5\cf2\lang1024 +}\par|\tab +{\cs31\b\f5\cf2\lang1024*}\par|\tab{\cs31\b\f5\cf2\lang1024)}\par|\tab{\cs31\b\f5\cf2\lang1024(}\par +|\tab{\cs31\b\f5\cf2\lang1024&}\par|\tab{\cs31\b\f5\cf2\lang1024%}\par|\tab +{\cs31\b\f5\cf2\lang1024!}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0 +\fs20\lang1024|\tab{\cs33\b\f6\cf10\lang1024_Chars2_}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120 +\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 UnicodeEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 u} +{\cs35\i\f6\cf13\lang1024 HexDigit} {\cs35\i\f6\cf13\lang1024 HexDigit} +{\cs35\i\f6\cf13\lang1024 HexDigit} {\cs35\i\f6\cf13\lang1024 HexDigit}\par +{\cs35\i\f6\cf13\lang1024 HexEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 x} +{\cs35\i\f6\cf13\lang1024 HexDigit} {\cs35\i\f6\cf13\lang1024 HexDigit}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 FullOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 FourToSeven} {\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ZeroToThree} {\cs35\i\f6\cf13\lang1024 OctalDigit} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ZeroToThree} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Chars3_} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs31\b\f5\cf2\lang1024 0}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 FourToSeven} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024_Chars4_}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024'}\par|\tab +{\cs31\b\f5\cf2\lang1024"}\par|\tab{\cs31\b\f5\cf2\lang1024\\}\par|\tab{\cs31\b\f5\cf2\lang1024 b} +\par|\tab{\cs31\b\f5\cf2\lang1024 f}\par|\tab{\cs31\b\f5\cf2\lang1024 n}\par|\tab +{\cs31\b\f5\cf2\lang1024 r}\par|\tab{\cs31\b\f5\cf2\lang1024 t}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024 v}\par\pard\plain +\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 single} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024"}\par +\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PlainStringChar} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Other_}\par +|\tab{\cs31\b\f5\cf2\lang1024~}\par|\tab{\cs31\b\f5\cf2\lang1024\}}\par|\tab +{\cs31\b\f5\cf2\lang1024|}\par|\tab{\cs31\b\f5\cf2\lang1024\{}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars8_}\par|\tab{\cs31\b\f5\cf2\lang1024 x}\par|\tab +{\cs31\b\f5\cf2\lang1024 v}\par|\tab{\cs31\b\f5\cf2\lang1024 u}\par|\tab{\cs31\b\f5\cf2\lang1024 t} +\par|\tab{\cs31\b\f5\cf2\lang1024 r}\par|\tab{\cs31\b\f5\cf2\lang1024 n}\par|\tab +{\cs31\b\f5\cf2\lang1024 f}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars7_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars6_}\par|\tab{\cs31\b\f5\cf2\lang1024 b}\par|\tab +{\cs31\b\f5\cf2\lang1024^}\par|\tab{\cs31\b\f5\cf2\lang1024]}\par|\tab{\cs31\b\f5\cf2\lang1024[}\par +|\tab{\cs31\b\f5\cf2\lang1024 X}\par|\tab{\cs31\b\f5\cf2\lang1024?}\par|\tab +{\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024<}\par +|\tab{\cs31\b\f5\cf2\lang1024;}\par|\tab{\cs31\b\f5\cf2\lang1024:}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars5_}\par|\tab{\cs31\b\f5\cf2\lang1024/}\par|\tab +{\cs31\b\f5\cf2\lang1024.}\par|\tab{\cs31\b\f5\cf2\lang1024 -}\par|\tab{\cs31\b\f5\cf2\lang1024,} +\par|\tab{\cs31\b\f5\cf2\lang1024 +}\par|\tab{\cs31\b\f5\cf2\lang1024*}\par|\tab +{\cs31\b\f5\cf2\lang1024)}\par|\tab{\cs31\b\f5\cf2\lang1024(}\par|\tab{\cs31\b\f5\cf2\lang1024&}\par +|\tab{\cs31\b\f5\cf2\lang1024%}\par|\tab{\cs31\b\f5\cf2\lang1024!}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs33\b\f6\cf10\lang1024_Chars2_}\par\pard +\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NumericLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalLiteral}\par|\tab{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral}\par +\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 0} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 OctalDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Chars4_} +\par|\tab{\cs33\b\f6\cf10\lang1024_Chars3_}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024 0}\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 0} +{\cs35\i\f6\cf13\lang1024 HexIndicator} {\cs35\i\f6\cf13\lang1024 HexDigit}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral} {\cs35\i\f6\cf13\lang1024 HexDigit}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 HexDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 f}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars7_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars6_}\par|\tab +{\cs31\b\f5\cf2\lang1024 b}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars5_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars4_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars3_}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024 0} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 HexIndicator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 x}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs31\b\f5\cf2\lang1024 X}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 DecimalLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Mantissa} {\cs35\i\f6\cf13\lang1024 Exponent}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Exponent} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ExponentIndicator} {\cs35\i\f6\cf13\lang1024 SignedInteger}\par\pard\plain +\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 SignedInteger} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par|\tab{\cs31\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024 -} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ExponentIndicator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024_Chars7_}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 Mantissa} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral}\par|\tab +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} {\cs31\b\f5\cf2\lang1024.}\par|\tab +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} {\cs31\b\f5\cf2\lang1024.} +{\cs35\i\f6\cf13\lang1024 Fraction}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024.} {\cs35\i\f6\cf13\lang1024 Fraction}\par\pard +\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Fraction} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 0}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 NonZeroDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NonZeroDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Chars5_} +\par|\tab{\cs33\b\f6\cf10\lang1024_Chars4_}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs33\b\f6\cf10\lang1024_Chars3_}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024<}\par|\tab{\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024=} {\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024!} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024!} {\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024,}\par|\tab{\cs31\b\f5\cf2\lang1024!}\par +|\tab{\cs31\b\f5\cf2\lang1024~}\par|\tab{\cs31\b\f5\cf2\lang1024?}\par|\tab +{\cs31\b\f5\cf2\lang1024:}\par|\tab{\cs31\b\f5\cf2\lang1024.}\par|\tab{\cs31\b\f5\cf2\lang1024&} +{\cs31\b\f5\cf2\lang1024&}\par|\tab{\cs31\b\f5\cf2\lang1024|} {\cs31\b\f5\cf2\lang1024|}\par|\tab +{\cs31\b\f5\cf2\lang1024 +} {\cs31\b\f5\cf2\lang1024 +}\par|\tab{\cs31\b\f5\cf2\lang1024 -} +{\cs31\b\f5\cf2\lang1024 -}\par|\tab{\cs31\b\f5\cf2\lang1024 +}\par|\tab{\cs31\b\f5\cf2\lang1024 -} +\par|\tab{\cs31\b\f5\cf2\lang1024*}\par|\tab{\cs31\b\f5\cf2\lang1024/}\par|\tab +{\cs31\b\f5\cf2\lang1024&}\par|\tab{\cs31\b\f5\cf2\lang1024|}\par|\tab{\cs31\b\f5\cf2\lang1024^}\par +|\tab{\cs31\b\f5\cf2\lang1024%}\par|\tab{\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024<}\par| +\tab{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024 +} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024 -} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024*} {\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024&} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024|} {\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024^} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024%} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024(}\par|\tab{\cs31\b\f5\cf2\lang1024)}\par +|\tab{\cs31\b\f5\cf2\lang1024\{}\par|\tab{\cs31\b\f5\cf2\lang1024\}}\par|\tab +{\cs31\b\f5\cf2\lang1024[}\par|\tab{\cs31\b\f5\cf2\lang1024]}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024;}\par\pard\plain +\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 IdentifierName}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 IdentifierLetter}\par|\tab{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\cs35\i\f6\cf13\lang1024 IdentifierLetter}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 DecimalDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Chars5_} +\par|\tab{\cs33\b\f6\cf10\lang1024_Chars4_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars3_}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs31\b\f5\cf2\lang1024 0}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 IdentifierLetter} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Chars8_} +\par|\tab{\cs31\b\f5\cf2\lang1024 x}\par|\tab{\cs31\b\f5\cf2\lang1024 v}\par|\tab +{\cs31\b\f5\cf2\lang1024 u}\par|\tab{\cs31\b\f5\cf2\lang1024 t}\par|\tab{\cs31\b\f5\cf2\lang1024 r} +\par|\tab{\cs31\b\f5\cf2\lang1024 n}\par|\tab{\cs31\b\f5\cf2\lang1024 f}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars7_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars6_}\par|\tab +{\cs31\b\f5\cf2\lang1024 b}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0 +\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024 X}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 LineBreaks} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 LineBreak} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LineBreaks} {\cs35\i\f6\cf13\lang1024 WhiteSpace} +{\cs35\i\f6\cf13\lang1024 LineBreak}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 LineBreak} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LineTerminator}\par|\tab{\cs35\i\f6\cf13\lang1024 LineComment} +{\cs35\i\f6\cf13\lang1024 LineTerminator}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 MultiLineBlockComment}\par\pard\plain +\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MultiLineBlockComment} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024*} {\cs35\i\f6\cf13\lang1024 MultiLineBlockCommentCharacters} +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs31\b\f5\cf2\lang1024*} +{\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 MultiLineBlockCommentCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs35\i\f6\cf13\lang1024 LineTerminator}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MultiLineBlockCommentCharacters} +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs35\i\f6\cf13\lang1024 LineTerminator}\par\pard +\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LineComment} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024/} {\cs35\i\f6\cf13\lang1024 LineCommentCharacters}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LineCommentCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LineCommentCharacters} {\cs35\i\f6\cf13\lang1024 NonTerminator}\par\pard +\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NonTerminator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Other_}\par +|\tab{\cs31\b\f5\cf2\lang1024~}\par|\tab{\cs31\b\f5\cf2\lang1024\}}\par|\tab +{\cs31\b\f5\cf2\lang1024|}\par|\tab{\cs31\b\f5\cf2\lang1024\{}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars8_}\par|\tab{\cs31\b\f5\cf2\lang1024 x}\par|\tab +{\cs31\b\f5\cf2\lang1024 v}\par|\tab{\cs31\b\f5\cf2\lang1024 u}\par|\tab{\cs31\b\f5\cf2\lang1024 t} +\par|\tab{\cs31\b\f5\cf2\lang1024 r}\par|\tab{\cs31\b\f5\cf2\lang1024 n}\par|\tab +{\cs31\b\f5\cf2\lang1024 f}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars7_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars6_}\par|\tab{\cs31\b\f5\cf2\lang1024 b}\par|\tab +{\cs31\b\f5\cf2\lang1024^}\par|\tab{\cs31\b\f5\cf2\lang1024]}\par|\tab{\cs31\b\f5\cf2\lang1024\\} +\par|\tab{\cs31\b\f5\cf2\lang1024[}\par|\tab{\cs31\b\f5\cf2\lang1024 X}\par|\tab +{\cs31\b\f5\cf2\lang1024?}\par|\tab{\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024=}\par +|\tab{\cs31\b\f5\cf2\lang1024<}\par|\tab{\cs31\b\f5\cf2\lang1024;}\par|\tab +{\cs31\b\f5\cf2\lang1024:}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars5_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars4_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars3_}\par|\tab +{\cs31\b\f5\cf2\lang1024 0}\par|\tab{\cs31\b\f5\cf2\lang1024/}\par|\tab{\cs31\b\f5\cf2\lang1024.} +\par|\tab{\cs31\b\f5\cf2\lang1024 -}\par|\tab{\cs31\b\f5\cf2\lang1024,}\par|\tab +{\cs31\b\f5\cf2\lang1024 +}\par|\tab{\cs31\b\f5\cf2\lang1024*}\par|\tab{\cs31\b\f5\cf2\lang1024)} +\par|\tab{\cs31\b\f5\cf2\lang1024(}\par|\tab{\cs31\b\f5\cf2\lang1024'}\par|\tab +{\cs31\b\f5\cf2\lang1024&}\par|\tab{\cs31\b\f5\cf2\lang1024%}\par|\tab{\cs31\b\f5\cf2\lang1024"}\par +|\tab{\cs31\b\f5\cf2\lang1024!}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs33\b\f6\cf10\lang1024_Chars2_}\par\pard\plain\s13\fi-1440\li1800 +\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LineTerminator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024_Chars1_}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 WhiteSpace} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 WhiteSpace} {\cs35\i\f6\cf13\lang1024 WhiteSpaceCharacter}\par\pard\plain +\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 WhiteSpace} {\cs35\i\f6\cf13\lang1024 SingleLineBlockComment}\par\pard +\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 SingleLineBlockComment} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024*} {\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} +{\cs31\b\f5\cf2\lang1024*} {\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs35\i\f6\cf13\lang1024 NonTerminatorOrSlash} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 PreSlashCharacters} {\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PreSlashCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} +{\cs35\i\f6\cf13\lang1024 NonTerminatorOrAsteriskOrSlash}\par\pard\plain\s15\fi-1260\li1800\sa120 +\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 PreSlashCharacters} +{\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NonTerminatorOrAsteriskOrSlash} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Other_}\par +|\tab{\cs31\b\f5\cf2\lang1024~}\par|\tab{\cs31\b\f5\cf2\lang1024\}}\par|\tab +{\cs31\b\f5\cf2\lang1024|}\par|\tab{\cs31\b\f5\cf2\lang1024\{}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars8_}\par|\tab{\cs31\b\f5\cf2\lang1024 x}\par|\tab +{\cs31\b\f5\cf2\lang1024 v}\par|\tab{\cs31\b\f5\cf2\lang1024 u}\par|\tab{\cs31\b\f5\cf2\lang1024 t} +\par|\tab{\cs31\b\f5\cf2\lang1024 r}\par|\tab{\cs31\b\f5\cf2\lang1024 n}\par|\tab +{\cs31\b\f5\cf2\lang1024 f}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars7_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars6_}\par|\tab{\cs31\b\f5\cf2\lang1024 b}\par|\tab +{\cs31\b\f5\cf2\lang1024^}\par|\tab{\cs31\b\f5\cf2\lang1024]}\par|\tab{\cs31\b\f5\cf2\lang1024\\} +\par|\tab{\cs31\b\f5\cf2\lang1024[}\par|\tab{\cs31\b\f5\cf2\lang1024 X}\par|\tab +{\cs31\b\f5\cf2\lang1024?}\par|\tab{\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024=}\par +|\tab{\cs31\b\f5\cf2\lang1024<}\par|\tab{\cs31\b\f5\cf2\lang1024;}\par|\tab +{\cs31\b\f5\cf2\lang1024:}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars5_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars4_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars3_}\par|\tab +{\cs31\b\f5\cf2\lang1024 0}\par|\tab{\cs31\b\f5\cf2\lang1024.}\par|\tab{\cs31\b\f5\cf2\lang1024 -} +\par|\tab{\cs31\b\f5\cf2\lang1024,}\par|\tab{\cs31\b\f5\cf2\lang1024 +}\par|\tab +{\cs31\b\f5\cf2\lang1024)}\par|\tab{\cs31\b\f5\cf2\lang1024(}\par|\tab{\cs31\b\f5\cf2\lang1024'}\par +|\tab{\cs31\b\f5\cf2\lang1024&}\par|\tab{\cs31\b\f5\cf2\lang1024%}\par|\tab +{\cs31\b\f5\cf2\lang1024"}\par|\tab{\cs31\b\f5\cf2\lang1024!}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs33\b\f6\cf10\lang1024_Chars2_}\par\pard +\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NonTerminatorOrSlash} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024_Other_}\par +|\tab{\cs31\b\f5\cf2\lang1024~}\par|\tab{\cs31\b\f5\cf2\lang1024\}}\par|\tab +{\cs31\b\f5\cf2\lang1024|}\par|\tab{\cs31\b\f5\cf2\lang1024\{}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars8_}\par|\tab{\cs31\b\f5\cf2\lang1024 x}\par|\tab +{\cs31\b\f5\cf2\lang1024 v}\par|\tab{\cs31\b\f5\cf2\lang1024 u}\par|\tab{\cs31\b\f5\cf2\lang1024 t} +\par|\tab{\cs31\b\f5\cf2\lang1024 r}\par|\tab{\cs31\b\f5\cf2\lang1024 n}\par|\tab +{\cs31\b\f5\cf2\lang1024 f}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars7_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars6_}\par|\tab{\cs31\b\f5\cf2\lang1024 b}\par|\tab +{\cs31\b\f5\cf2\lang1024^}\par|\tab{\cs31\b\f5\cf2\lang1024]}\par|\tab{\cs31\b\f5\cf2\lang1024\\} +\par|\tab{\cs31\b\f5\cf2\lang1024[}\par|\tab{\cs31\b\f5\cf2\lang1024 X}\par|\tab +{\cs31\b\f5\cf2\lang1024?}\par|\tab{\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024=}\par +|\tab{\cs31\b\f5\cf2\lang1024<}\par|\tab{\cs31\b\f5\cf2\lang1024;}\par|\tab +{\cs31\b\f5\cf2\lang1024:}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars5_}\par|\tab +{\cs33\b\f6\cf10\lang1024_Chars4_}\par|\tab{\cs33\b\f6\cf10\lang1024_Chars3_}\par|\tab +{\cs31\b\f5\cf2\lang1024 0}\par|\tab{\cs31\b\f5\cf2\lang1024.}\par|\tab{\cs31\b\f5\cf2\lang1024 -} +\par|\tab{\cs31\b\f5\cf2\lang1024,}\par|\tab{\cs31\b\f5\cf2\lang1024 +}\par|\tab +{\cs31\b\f5\cf2\lang1024*}\par|\tab{\cs31\b\f5\cf2\lang1024)}\par|\tab{\cs31\b\f5\cf2\lang1024(}\par +|\tab{\cs31\b\f5\cf2\lang1024'}\par|\tab{\cs31\b\f5\cf2\lang1024&}\par|\tab +{\cs31\b\f5\cf2\lang1024%}\par|\tab{\cs31\b\f5\cf2\lang1024"}\par|\tab{\cs31\b\f5\cf2\lang1024!}\par +\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs33\b\f6\cf10\lang1024_Chars2_}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 WhiteSpaceCharacter} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024_Chars2_}\par} \ No newline at end of file diff --git a/mozilla/js2/semantics/ECMA Lexer.html b/mozilla/js2/semantics/ECMA Lexer.html new file mode 100644 index 00000000000..91462e045aa --- /dev/null +++ b/mozilla/js2/semantics/ECMA Lexer.html @@ -0,0 +1,1413 @@ + + + +ECMA Lexer + + + + +

Comments

+ +

Syntax

+ +
+
LineComment Þ / / LineCommentCharacters
+
+
+
LineCommentCharacters Þ
+
   «empty»
+
|  LineCommentCharacters NonTerminator
+
+
NonTerminator Þ AnyCharacter except LineTerminator
+
+
SingleLineBlockComment Þ / * BlockCommentCharacters * /
+
+
+
BlockCommentCharacters Þ
+
   «empty»
+
|  BlockCommentCharacters NonTerminatorOrSlash
+
|  PreSlashCharacters /
+
+
+
PreSlashCharacters Þ
+
   «empty»
+
|  BlockCommentCharacters NonTerminatorOrAsteriskOrSlash
+
|  PreSlashCharacters /
+
+
NonTerminatorOrSlash Þ NonTerminator except /
+
NonTerminatorOrAsteriskOrSlash Þ NonTerminator except * | /
+
+
MultiLineBlockComment Þ / * MultiLineBlockCommentCharacters BlockCommentCharacters * /
+
+
+
MultiLineBlockCommentCharacters Þ
+
   BlockCommentCharacters LineTerminator
+
|  MultiLineBlockCommentCharacters BlockCommentCharacters LineTerminator
+
+

White space

+ +

Syntax

+ +
+
WhiteSpace Þ
+
   «empty»
+
|  WhiteSpace WhiteSpaceCharacter
+
|  WhiteSpace SingleLineBlockComment
+
+
WhiteSpaceCharacter Þ «TAB» | «VT» | «FF» | «SP»
+

Line breaks

+ +

Syntax

+ +
+
LineBreak Þ
+
   LineTerminator
+
|  LineComment LineTerminator
+
|  MultiLineBlockComment
+
+
LineTerminator Þ «LF» | «CR»
+
+
LineBreaks Þ
+
   LineBreak
+
|  LineBreaks WhiteSpace LineBreak
+
+

Tokens

+ +

Syntax

+ +
+
NextToken Þ WhiteSpace Token
+
+
+
Token Þ
+
   LineBreaks
+
|  IdentifierOrReservedWord
+
|  Punctuator
+
|  NumericLiteral
+
|  StringLiteral
+
|  EndOfInput
+
+
+
EndOfInput Þ
+
   End
+
|  LineComment End
+
+

Semantics

+ +

type Token
+  = oneof {
+           identifierString;
+           reservedWordString;
+           punctuatorString;
+           numberDouble;
+           stringString;
+           lineBreaks;
+           end}

+ +

action Token[NextToken] : Token

+ +

Token[NextToken Þ WhiteSpace Token] = Token[Token]

+ +

action Token[Token] : Token

+ +

Token[Token Þ LineBreaks] = lineBreaks

+ +

Token[Token Þ IdentifierOrReservedWord] = Token[IdentifierOrReservedWord]

+ +

Token[Token Þ Punctuator] = punctuator Punctuator[Punctuator]

+ +

Token[Token Þ NumericLiteral] = number DoubleValue[NumericLiteral]

+ +

Token[Token Þ StringLiteral] = string StringValue[StringLiteral]

+ +

Token[Token Þ EndOfInput] = end

+ +

Keywords

+ +

Syntax

+ +
+
IdentifierName Þ
+
   IdentifierLetter
+
|  IdentifierName IdentifierLetter
+
|  IdentifierName DecimalDigit
+
+
IdentifierLetter Þ
+
   A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
+
|  a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z
+
|  $ | _
+
DecimalDigit Þ 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
+

Semantics

+ +

action Name[IdentifierName] : String

+ +

Name[IdentifierName Þ IdentifierLetter] = [CharacterValue[IdentifierLetter]]

+ +

Name[IdentifierName Þ IdentifierName1 IdentifierLetter]
+  = Name[IdentifierName1¨ [CharacterValue[IdentifierLetter]]

+ +

Name[IdentifierName Þ IdentifierName1 DecimalDigit]
+  = Name[IdentifierName1¨ [CharacterValue[DecimalDigit]]

+ +

action CharacterValue[IdentifierLetter] : Character = IdentifierLetter

+ +

action CharacterValue[DecimalDigit] : Character = DecimalDigit

+ +

action DigitValue[DecimalDigit] : Integer = digitValue(DecimalDigit)

+ +

keywords : String[]
+  = [break”,
+      “case”,
+      “catch”,
+      “continue”,
+      “default”,
+      “delete”,
+      “do”,
+      “else”,
+      “finally”,
+      “for”,
+      “function”,
+      “if”,
+      “in”,
+      “new”,
+      “return”,
+      “switch”,
+      “this”,
+      “throw”,
+      “try”,
+      “typeof”,
+      “var”,
+      “void”,
+      “while”,
+      “with]

+ +

futureReservedWords : String[]
+  = [class”, “const”, “debugger”, “enum”, “export”, “extends”, “import”, “super]

+ +

literals : String[] = [null”, “true”, “false]

+ +

reservedWords : String[] = keywords ¨ futureReservedWords ¨ literals

+ +

member(idStringlistString[]) : Boolean
+  = if empty(list)
+     then false
+     else let sString = first(list)
+           in if stringEqual(ids)
+               then true
+               else member(idrest(list))

+ +

Syntax

+ +
+
IdentifierOrReservedWord Þ IdentifierName
+
+

Semantics

+ +

action Token[IdentifierOrReservedWord] : Token

+ +

Token[IdentifierOrReservedWord Þ IdentifierName]
+  = let idString = Name[IdentifierName]
+     in if member(idreservedWords)
+         then reservedWord id
+         else identifier id

+ +

Punctuators

+ +

Syntax

+ +
+
Punctuator Þ
+
   =
+
|  >
+
|  <
+
|  = =
+
|  = = =
+
|  < =
+
|  > =
+
|  ! =
+
|  ! = =
+
|  ,
+
|  !
+
|  ~
+
|  ?
+
|  :
+
|  .
+
|  & &
+
|  | |
+
|  + +
+
|  - -
+
|  +
+
|  -
+
|  *
+
|  /
+
|  &
+
|  |
+
|  ^
+
|  %
+
|  < <
+
|  > >
+
|  > > >
+
|  + =
+
|  - =
+
|  * =
+
|  / =
+
|  & =
+
|  | =
+
|  ^ =
+
|  % =
+
|  < < =
+
|  > > =
+
|  > > > =
+
|  (
+
|  )
+
|  {
+
|  }
+
|  [
+
|  ]
+
|  ;
+
+

Semantics

+ +

action Punctuator[Punctuator] : String

+ +

Punctuator[Punctuator Þ =] = “=

+ +

Punctuator[Punctuator Þ >] = “>

+ +

Punctuator[Punctuator Þ <] = “<

+ +

Punctuator[Punctuator Þ = =] = “==

+ +

Punctuator[Punctuator Þ = = =] = “===

+ +

Punctuator[Punctuator Þ < =] = “<=

+ +

Punctuator[Punctuator Þ > =] = “>=

+ +

Punctuator[Punctuator Þ ! =] = “!=

+ +

Punctuator[Punctuator Þ ! = =] = “!==

+ +

Punctuator[Punctuator Þ ,] = “,

+ +

Punctuator[Punctuator Þ !] = “!

+ +

Punctuator[Punctuator Þ ~] = “~

+ +

Punctuator[Punctuator Þ ?] = “?

+ +

Punctuator[Punctuator Þ :] = “:

+ +

Punctuator[Punctuator Þ .] = “.

+ +

Punctuator[Punctuator Þ & &] = “&&

+ +

Punctuator[Punctuator Þ | |] = “||

+ +

Punctuator[Punctuator Þ + +] = “++

+ +

Punctuator[Punctuator Þ - -] = “--

+ +

Punctuator[Punctuator Þ +] = “+

+ +

Punctuator[Punctuator Þ -] = “-

+ +

Punctuator[Punctuator Þ *] = “*

+ +

Punctuator[Punctuator Þ /] = “/

+ +

Punctuator[Punctuator Þ &] = “&

+ +

Punctuator[Punctuator Þ |] = “|

+ +

Punctuator[Punctuator Þ ^] = “^

+ +

Punctuator[Punctuator Þ %] = “%

+ +

Punctuator[Punctuator Þ < <] = “<<

+ +

Punctuator[Punctuator Þ > >] = “>>

+ +

Punctuator[Punctuator Þ > > >] = “>>>

+ +

Punctuator[Punctuator Þ + =] = “+=

+ +

Punctuator[Punctuator Þ - =] = “-=

+ +

Punctuator[Punctuator Þ * =] = “*=

+ +

Punctuator[Punctuator Þ / =] = “/=

+ +

Punctuator[Punctuator Þ & =] = “&=

+ +

Punctuator[Punctuator Þ | =] = “|=

+ +

Punctuator[Punctuator Þ ^ =] = “^=

+ +

Punctuator[Punctuator Þ % =] = “%=

+ +

Punctuator[Punctuator Þ < < =] = “<<=

+ +

Punctuator[Punctuator Þ > > =] = “>>=

+ +

Punctuator[Punctuator Þ > > > =] = “>>>=

+ +

Punctuator[Punctuator Þ (] = “(

+ +

Punctuator[Punctuator Þ )] = “)

+ +

Punctuator[Punctuator Þ {] = “{

+ +

Punctuator[Punctuator Þ }] = “}

+ +

Punctuator[Punctuator Þ [] = “[

+ +

Punctuator[Punctuator Þ ]] = “]

+ +

Punctuator[Punctuator Þ ;] = “;

+ +

Numeric literals

+ +

Syntax

+ +
+
NumericLiteral Þ
+
   DecimalLiteral
+
|  HexIntegerLiteral
+
|  OctalIntegerLiteral
+
+

Semantics

+ +

action DoubleValue[NumericLiteral] : Double

+ +

DoubleValue[NumericLiteral Þ DecimalLiteral]
+  = rationalToDouble(RationalValue[DecimalLiteral])

+ +

DoubleValue[NumericLiteral Þ HexIntegerLiteral]
+  = rationalToDouble(IntegerValue[HexIntegerLiteral])

+ +

DoubleValue[NumericLiteral Þ OctalIntegerLiteral]
+  = rationalToDouble(IntegerValue[OctalIntegerLiteral])

+ +

expt(baseRationalexponentInteger) : Rational
+  = if exponent = 0
+     then 1
+     else if exponent < 0
+     then 1/expt(base, -exponent)
+     else base*expt(baseexponent - 1)

+ +

Syntax

+ +
+
DecimalLiteral Þ Mantissa Exponent
+
+
+
Mantissa Þ
+
   DecimalIntegerLiteral
+
|  DecimalIntegerLiteral .
+
|  DecimalIntegerLiteral . Fraction
+
|  . Fraction
+
+
+
DecimalIntegerLiteral Þ
+
   0
+
|  NonZeroDecimalDigits
+
+
+
NonZeroDecimalDigits Þ
+
   NonZeroDigit
+
|  NonZeroDecimalDigits DecimalDigit
+
+
NonZeroDigit Þ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
+
+
Fraction Þ DecimalDigits
+
+

Semantics

+ +

action RationalValue[DecimalLiteral] : Rational

+ +

RationalValue[DecimalLiteral Þ Mantissa Exponent]
+  = RationalValue[Mantissa]*expt(10, IntegerValue[Exponent])

+ +

action RationalValue[Mantissa] : Rational

+ +

RationalValue[Mantissa Þ DecimalIntegerLiteral] = IntegerValue[DecimalIntegerLiteral]

+ +

RationalValue[Mantissa Þ DecimalIntegerLiteral .] = IntegerValue[DecimalIntegerLiteral]

+ +

RationalValue[Mantissa Þ DecimalIntegerLiteral . Fraction]
+  = IntegerValue[DecimalIntegerLiteral] + RationalValue[Fraction]

+ +

RationalValue[Mantissa Þ . Fraction] = RationalValue[Fraction]

+ +

action IntegerValue[DecimalIntegerLiteral] : Integer

+ +

IntegerValue[DecimalIntegerLiteral Þ 0] = 0

+ +

IntegerValue[DecimalIntegerLiteral Þ NonZeroDecimalDigits]
+  = IntegerValue[NonZeroDecimalDigits]

+ +

action IntegerValue[NonZeroDecimalDigits] : Integer

+ +

IntegerValue[NonZeroDecimalDigits Þ NonZeroDigit] = DecimalValue[NonZeroDigit]

+ +

IntegerValue[NonZeroDecimalDigits Þ NonZeroDecimalDigits1 DecimalDigit]
+  = 10*IntegerValue[NonZeroDecimalDigits1] + DecimalValue[DecimalDigit]

+ +

action DigitValue[NonZeroDigit] : Integer = digitValue(NonZeroDigit)

+ +

action RationalValue[Fraction] : Rational

+ +

RationalValue[Fraction Þ DecimalDigits]
+  = IntegerValue[DecimalDigits]/expt(10, NDigits[DecimalDigits])

+ +

Syntax

+ +
+
Exponent Þ
+
   «empty»
+
|  ExponentIndicator SignedInteger
+
+
ExponentIndicator Þ E | e
+
+
SignedInteger Þ
+
   DecimalDigits
+
|  + DecimalDigits
+
|  - DecimalDigits
+
+

Semantics

+ +

action IntegerValue[Exponent] : Integer

+ +

IntegerValue[Exponent Þ «empty»] = 0

+ +

IntegerValue[Exponent Þ ExponentIndicator SignedInteger] = IntegerValue[SignedInteger]

+ +

action IntegerValue[SignedInteger] : Integer

+ +

IntegerValue[SignedInteger Þ DecimalDigits] = IntegerValue[DecimalDigits]

+ +

IntegerValue[SignedInteger Þ + DecimalDigits] = IntegerValue[DecimalDigits]

+ +

IntegerValue[SignedInteger Þ - DecimalDigits] = -IntegerValue[DecimalDigits]

+ +

Syntax

+ +
+
DecimalDigits Þ
+
   DecimalDigit
+
|  DecimalDigits DecimalDigit
+
+

Semantics

+ +

action IntegerValue[DecimalDigits] : Integer

+ +

action NDigits[DecimalDigits] : Integer

+ +

IntegerValue[DecimalDigits Þ DecimalDigit] = DecimalValue[DecimalDigit]

+ +

NDigits[DecimalDigits Þ DecimalDigit] = 1

+ +

IntegerValue[DecimalDigits Þ DecimalDigits1 DecimalDigit]
+  = 10*IntegerValue[DecimalDigits1] + DecimalValue[DecimalDigit]

+ +

NDigits[DecimalDigits Þ DecimalDigits1 DecimalDigit] = NDigits[DecimalDigits1] + 1

+ +

Syntax

+ +
+
HexIntegerLiteral Þ
+
   0 HexIndicator HexDigit
+
|  HexIntegerLiteral HexDigit
+
+
HexIndicator Þ X | x
+
HexDigit Þ 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | a | b | c | d | e | f
+
+
OctalIntegerLiteral Þ
+
   0 OctalDigit
+
|  OctalIntegerLiteral OctalDigit
+
+
OctalDigit Þ 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7
+

Semantics

+ +

action IntegerValue[HexIntegerLiteral] : Integer

+ +

IntegerValue[HexIntegerLiteral Þ 0 HexIndicator HexDigit] = HexValue[HexDigit]

+ +

IntegerValue[HexIntegerLiteral Þ HexIntegerLiteral1 HexDigit]
+  = 16*IntegerValue[HexIntegerLiteral1] + HexValue[HexDigit]

+ +

action DigitValue[HexDigit] : Integer = digitValue(HexDigit)

+ +

action IntegerValue[OctalIntegerLiteral] : Integer

+ +

IntegerValue[OctalIntegerLiteral Þ 0 OctalDigit] = OctalValue[OctalDigit]

+ +

IntegerValue[OctalIntegerLiteral Þ OctalIntegerLiteral1 OctalDigit]
+  = 8*IntegerValue[OctalIntegerLiteral1] + OctalValue[OctalDigit]

+ +

action CharacterValue[OctalDigit] : Character = OctalDigit

+ +

action DigitValue[OctalDigit] : Integer = digitValue(OctalDigit)

+ +

String literals

+ +

Syntax

+ +
Quote Î {singledouble}
+
+
StringLiteral Þ
+
   ' StringCharssingle '
+
|  " StringCharsdouble "
+
+

Semantics

+ +

action StringValue[StringLiteral] : String

+ +

StringValue[StringLiteral Þ ' StringCharssingle '] = StringValue[StringCharssingle]

+ +

StringValue[StringLiteral Þ " StringCharsdouble "] = StringValue[StringCharsdouble]

+ +

Syntax

+ +
+
StringCharsQuote Þ
+
   OrdinaryStringCharsQuote
+
|  StringCharsQuote \ ShortOctalEscape
+
+
+
OrdinaryStringCharsQuote Þ
+
   «empty»
+
|  StringCharsQuote PlainStringChar
+
|  StringCharsQuote PlainStringQuoteQuote
+
|  OrdinaryStringCharsQuote OctalDigit
+
|  StringCharsQuote \ OrdinaryEscape
+
+
PlainStringChar Þ AnyCharacter except ' | " | \ | OctalDigit | LineTerminator
+
+
PlainStringQuotesingle Þ "
+
+
+
PlainStringQuotedouble Þ '
+
+

Semantics

+ +

action StringValue[StringCharsQuote] : String

+ +

StringValue[StringCharsQuote Þ OrdinaryStringCharsQuote]
+  = StringValue[OrdinaryStringCharsQuote]

+ +

StringValue[StringCharsQuote Þ StringCharsQuote1 \ ShortOctalEscape]
+  = StringValue[StringCharsQuote1¨ [CharacterValue[ShortOctalEscape]]

+ +

action StringValue[OrdinaryStringCharsQuote] : String

+ +

StringValue[OrdinaryStringCharsQuote Þ «empty»] = “”

+ +

StringValue[OrdinaryStringCharsQuote Þ StringCharsQuote PlainStringChar]
+  = StringValue[StringCharsQuote¨ [CharacterValue[PlainStringChar]]

+ +

StringValue[OrdinaryStringCharsQuote Þ StringCharsQuote PlainStringQuoteQuote]
+  = StringValue[StringCharsQuote¨ [CharacterValue[PlainStringQuoteQuote]]

+ +

StringValue[OrdinaryStringCharsQuote Þ OrdinaryStringCharsQuote1 OctalDigit]
+  = StringValue[OrdinaryStringCharsQuote1¨ [CharacterValue[OctalDigit]]

+ +

StringValue[OrdinaryStringCharsQuote Þ StringCharsQuote \ OrdinaryEscape]
+  = StringValue[StringCharsQuote¨ [CharacterValue[OrdinaryEscape]]

+ +

action CharacterValue[PlainStringChar] : Character = PlainStringChar

+ +

action CharacterValue[PlainStringQuoteQuote] : Character

+ +

CharacterValue[PlainStringQuotesingle Þ "] = ‘"

+ +

CharacterValue[PlainStringQuotedouble Þ '] = ‘'

+ +

Syntax

+ +
+
OrdinaryEscape Þ
+
   StringCharEscape
+
|  FullOctalEscape
+
|  HexEscape
+
|  UnicodeEscape
+
|  StringNonEscape
+
+
StringNonEscape Þ NonTerminator except OctalDigit | x | u | ' | " | \ | b | f | n | r | t | v
+

Semantics

+ +

action CharacterValue[OrdinaryEscape] : Character

+ +

CharacterValue[OrdinaryEscape Þ StringCharEscape] = CharacterValue[StringCharEscape]

+ +

CharacterValue[OrdinaryEscape Þ FullOctalEscape] = CharacterValue[FullOctalEscape]

+ +

CharacterValue[OrdinaryEscape Þ HexEscape] = CharacterValue[HexEscape]

+ +

CharacterValue[OrdinaryEscape Þ UnicodeEscape] = CharacterValue[UnicodeEscape]

+ +

CharacterValue[OrdinaryEscape Þ StringNonEscape] = CharacterValue[StringNonEscape]

+ +

action CharacterValue[StringNonEscape] : Character = StringNonEscape

+ +

Syntax

+ +
+
StringCharEscape Þ
+
   '
+
|  "
+
|  \
+
|  b
+
|  f
+
|  n
+
|  r
+
|  t
+
|  v
+
+

Semantics

+ +

action CharacterValue[StringCharEscape] : Character

+ +

CharacterValue[StringCharEscape Þ '] = ‘'

+ +

CharacterValue[StringCharEscape Þ "] = ‘"

+ +

CharacterValue[StringCharEscape Þ \] = ‘\

+ +

CharacterValue[StringCharEscape Þ b] = ‘«BS»

+ +

CharacterValue[StringCharEscape Þ f] = ‘«FF»

+ +

CharacterValue[StringCharEscape Þ n] = ‘«LF»

+ +

CharacterValue[StringCharEscape Þ r] = ‘«CR»

+ +

CharacterValue[StringCharEscape Þ t] = ‘«TAB»

+ +

CharacterValue[StringCharEscape Þ v] = ‘«VT»

+ +

Syntax

+ +
+
ShortOctalEscape Þ
+
   OctalDigit
+
|  ZeroToThree OctalDigit
+
+
+
FullOctalEscape Þ
+
   FourToSeven OctalDigit
+
|  ZeroToThree OctalDigit OctalDigit
+
+
ZeroToThree Þ 0 | 1 | 2 | 3
+
FourToSeven Þ 4 | 5 | 6 | 7
+
+
HexEscape Þ x HexDigit HexDigit
+
+
+
UnicodeEscape Þ u HexDigit HexDigit HexDigit HexDigit
+
+

Semantics

+ +

action CharacterValue[ShortOctalEscape] : Character

+ +

CharacterValue[ShortOctalEscape Þ OctalDigit] = codeToCharacter(OctalValue[OctalDigit])

+ +

CharacterValue[ShortOctalEscape Þ ZeroToThree OctalDigit]
+  = codeToCharacter(8*OctalValue[ZeroToThree] + OctalValue[OctalDigit])

+ +

action CharacterValue[FullOctalEscape] : Character

+ +

CharacterValue[FullOctalEscape Þ FourToSeven OctalDigit]
+  = codeToCharacter(8*OctalValue[FourToSeven] + OctalValue[OctalDigit])

+ +

CharacterValue[FullOctalEscape Þ ZeroToThree OctalDigit1 OctalDigit2]
+  = codeToCharacter(
+         64*OctalValue[ZeroToThree] + 8*OctalValue[OctalDigit1] + OctalValue[OctalDigit2])

+ +

action DigitValue[ZeroToThree] : Integer = digitValue(ZeroToThree)

+ +

action DigitValue[FourToSeven] : Integer = digitValue(FourToSeven)

+ +

action CharacterValue[HexEscape] : Character

+ +

CharacterValue[HexEscape Þ x HexDigit1 HexDigit2]
+  = codeToCharacter(16*HexValue[HexDigit1] + HexValue[HexDigit2])

+ +

action CharacterValue[UnicodeEscape] : Character

+ +

CharacterValue[UnicodeEscape Þ u HexDigit1 HexDigit2 HexDigit3 HexDigit4]
+  = codeToCharacter(
+         4096*HexValue[HexDigit1] + 256*HexValue[HexDigit2] + 16*HexValue[HexDigit3] +
+         HexValue[HexDigit4])

+ + + diff --git a/mozilla/js2/semantics/ECMA Lexer.lisp b/mozilla/js2/semantics/ECMA Lexer.lisp new file mode 100644 index 00000000000..43cf710516a --- /dev/null +++ b/mozilla/js2/semantics/ECMA Lexer.lisp @@ -0,0 +1,487 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; ECMAScript sample lexer +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + +(defun digit-char-16 (char) + (assert-non-null (digit-char-p char 16))) + + +(progn + (defparameter *lw* + (generate-world + "L" + '((lexer code-lexer + :lalr-1 + :next-token + ((:white-space-character (#?0009 #?000B #?000C #\space) ()) + (:line-terminator (#?000A #?000D) ()) + (:non-terminator (- every :line-terminator) ()) + (:non-terminator-or-slash (- :non-terminator (#\/)) ()) + (:non-terminator-or-asterisk-or-slash (- :non-terminator (#\* #\/)) ()) + (:identifier-letter (++ (#\A #\B #\C #\D #\E #\F #\G #\H #\I #\J #\K #\L #\M #\N #\O #\P #\Q #\R #\S #\T #\U #\V #\W #\X #\Y #\Z) + (#\a #\b #\c #\d #\e #\f #\g #\h #\i #\j #\k #\l #\m #\n #\o #\p #\q #\r #\s #\t #\u #\v #\w #\x #\y #\z) + (#\$ #\_)) + ((character-value character-value))) + (:decimal-digit (#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9) + ((character-value character-value) + (decimal-value digit-value))) + (:non-zero-digit (#\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9) + ((decimal-value digit-value))) + (:octal-digit (#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7) + ((character-value character-value) + (octal-value digit-value))) + (:zero-to-three (#\0 #\1 #\2 #\3) + ((octal-value digit-value))) + (:four-to-seven (#\4 #\5 #\6 #\7) + ((octal-value digit-value))) + (:hex-digit (#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9 #\A #\B #\C #\D #\E #\F #\a #\b #\c #\d #\e #\f) + ((hex-value digit-value))) + (:exponent-indicator (#\E #\e) ()) + (:hex-indicator (#\X #\x) ()) + (:plain-string-char (- every (+ (#\' #\" #\\) :octal-digit :line-terminator)) + ((character-value character-value))) + (:string-non-escape (- :non-terminator (+ :octal-digit (#\x #\u #\' #\" #\\ #\b #\f #\n #\r #\t #\v))) + ((character-value character-value)))) + ((character-value character identity (*)) + (digit-value integer digit-char-16 ((:global-variable "digitValue") "(" * ")")))) + + (%section "Comments") + (production :line-comment (#\/ #\/ :line-comment-characters) line-comment) + + (production :line-comment-characters () line-comment-characters-empty) + (production :line-comment-characters (:line-comment-characters :non-terminator) line-comment-characters-chars) + (%charclass :non-terminator) + + (production :single-line-block-comment (#\/ #\* :block-comment-characters #\* #\/) single-line-block-comment) + + (production :block-comment-characters () block-comment-characters-empty) + (production :block-comment-characters (:block-comment-characters :non-terminator-or-slash) block-comment-characters-chars) + (production :block-comment-characters (:pre-slash-characters #\/) block-comment-characters-slash) + + (production :pre-slash-characters () pre-slash-characters-empty) + (production :pre-slash-characters (:block-comment-characters :non-terminator-or-asterisk-or-slash) pre-slash-characters-chars) + (production :pre-slash-characters (:pre-slash-characters #\/) pre-slash-characters-slash) + + (%charclass :non-terminator-or-slash) + (%charclass :non-terminator-or-asterisk-or-slash) + + (production :multi-line-block-comment (#\/ #\* :multi-line-block-comment-characters :block-comment-characters #\* #\/) multi-line-block-comment) + + (production :multi-line-block-comment-characters (:block-comment-characters :line-terminator) multi-line-block-comment-characters-first) + (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") + + (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") + + (production :line-break (:line-terminator) line-break-line-terminator) + (production :line-break (:line-comment :line-terminator) line-break-line-comment) + (production :line-break (:multi-line-block-comment) line-break-multi-line-block-comment) + (%charclass :line-terminator) + + (production :line-breaks (:line-break) line-breaks-first) + (production :line-breaks (:line-breaks :white-space :line-break) line-breaks-rest) + + (%section "Tokens") + + (declare-action token :next-token token) + (production :next-token (:white-space :token) next-token + (token (token :token))) + + (declare-action token :token token) + (production :token (:line-breaks) token-line-breaks + (token (oneof line-breaks))) + (production :token (:identifier-or-reserved-word) token-identifier-or-reserved-word + (token (token :identifier-or-reserved-word))) + (production :token (:punctuator) token-punctuator + (token (oneof punctuator (punctuator :punctuator)))) + (production :token (:numeric-literal) token-numeric-literal + (token (oneof number (double-value :numeric-literal)))) + (production :token (:string-literal) token-string-literal + (token (oneof string (string-value :string-literal)))) + (production :token (:end-of-input) token-end + (token (oneof end))) + + (production :end-of-input ($end) end-of-input-end) + (production :end-of-input (:line-comment $end) end-of-input-line-comment) + + (deftype token (oneof (identifier string) (reserved-word string) (punctuator string) (number double) (string string) line-breaks end)) + (%print-actions) + + (%section "Keywords") + + (declare-action name :identifier-name string) + (production :identifier-name (:identifier-letter) identifier-name-letter + (name (vector (character-value :identifier-letter)))) + (production :identifier-name (:identifier-name :identifier-letter) identifier-name-next-letter + (name (append (name :identifier-name) (vector (character-value :identifier-letter))))) + (production :identifier-name (:identifier-name :decimal-digit) identifier-name-next-digit + (name (append (name :identifier-name) (vector (character-value :decimal-digit))))) + (%charclass :identifier-letter) + (%charclass :decimal-digit) + (%print-actions) + + (define keywords (vector string) + (vector "break" "case" "catch" "continue" "default" "delete" "do" "else" "finally" "for" "function" "if" "in" + "new" "return" "switch" "this" "throw" "try" "typeof" "var" "void" "while" "with")) + (define future-reserved-words (vector string) + (vector "class" "const" "debugger" "enum" "export" "extends" "import" "super")) + (define literals (vector string) + (vector "null" "true" "false")) + (define reserved-words (vector string) + (append keywords (append future-reserved-words literals))) + + (define (member (id string) (list (vector string))) boolean + (if (empty list) + false + (let ((s string (first list))) + (if (string-equal id s) + true + (member id (rest list)))))) + + (declare-action token :identifier-or-reserved-word token) + (production :identifier-or-reserved-word (:identifier-name) identifier-or-reserved-word-identifier-name + (token (let ((id string (name :identifier-name))) + (if (member id reserved-words) + (oneof reserved-word id) + (oneof identifier id))))) + (%print-actions) + + (%section "Punctuators") + + (declare-action punctuator :punctuator string) + (production :punctuator (#\=) punctuator-assignment (punctuator "=")) + (production :punctuator (#\>) punctuator-greater-than (punctuator ">")) + (production :punctuator (#\<) punctuator-less-than (punctuator "<")) + (production :punctuator (#\= #\=) punctuator-equal (punctuator "==")) + (production :punctuator (#\= #\= #\=) punctuator-identical (punctuator "===")) + (production :punctuator (#\< #\=) punctuator-less-than-or-equal (punctuator "<=")) + (production :punctuator (#\> #\=) punctuator-greater-than-or-equal (punctuator ">=")) + (production :punctuator (#\! #\=) punctuator-not-equal (punctuator "!=")) + (production :punctuator (#\! #\= #\=) punctuator-not-identical (punctuator "!==")) + (production :punctuator (#\,) punctuator-comma (punctuator ",")) + (production :punctuator (#\!) punctuator-not (punctuator "!")) + (production :punctuator (#\~) punctuator-complement (punctuator "~")) + (production :punctuator (#\?) punctuator-question (punctuator "?")) + (production :punctuator (#\:) punctuator-colon (punctuator ":")) + (production :punctuator (#\.) punctuator-period (punctuator ".")) + (production :punctuator (#\& #\&) punctuator-logical-and (punctuator "&&")) + (production :punctuator (#\| #\|) punctuator-logical-or (punctuator "||")) + (production :punctuator (#\+ #\+) punctuator-increment (punctuator "++")) + (production :punctuator (#\- #\-) punctuator-decrement (punctuator "--")) + (production :punctuator (#\+) punctuator-plus (punctuator "+")) + (production :punctuator (#\-) punctuator-minus (punctuator "-")) + (production :punctuator (#\*) punctuator-times (punctuator "*")) + (production :punctuator (#\/) punctuator-divide (punctuator "/")) + (production :punctuator (#\&) punctuator-and (punctuator "&")) + (production :punctuator (#\|) punctuator-or (punctuator "|")) + (production :punctuator (#\^) punctuator-xor (punctuator "^")) + (production :punctuator (#\%) punctuator-modulo (punctuator "%")) + (production :punctuator (#\< #\<) punctuator-left-shift (punctuator "<<")) + (production :punctuator (#\> #\>) punctuator-right-shift (punctuator ">>")) + (production :punctuator (#\> #\> #\>) punctuator-logical-right-shift (punctuator ">>>")) + (production :punctuator (#\+ #\=) punctuator-plus-equals (punctuator "+=")) + (production :punctuator (#\- #\=) punctuator-minus-equals (punctuator "-=")) + (production :punctuator (#\* #\=) punctuator-times-equals (punctuator "*=")) + (production :punctuator (#\/ #\=) punctuator-divide-equals (punctuator "/=")) + (production :punctuator (#\& #\=) punctuator-and-equals (punctuator "&=")) + (production :punctuator (#\| #\=) punctuator-or-equals (punctuator "|=")) + (production :punctuator (#\^ #\=) punctuator-xor-equals (punctuator "^=")) + (production :punctuator (#\% #\=) punctuator-modulo-equals (punctuator "%=")) + (production :punctuator (#\< #\< #\=) punctuator-left-shift-equals (punctuator "<<=")) + (production :punctuator (#\> #\> #\=) punctuator-right-shift-equals (punctuator ">>=")) + (production :punctuator (#\> #\> #\> #\=) punctuator-logical-right-shift-equals (punctuator ">>>=")) + (production :punctuator (#\() punctuator-open-parenthesis (punctuator "(")) + (production :punctuator (#\)) punctuator-close-parenthesis (punctuator ")")) + (production :punctuator (#\{) punctuator-open-brace (punctuator "{")) + (production :punctuator (#\}) punctuator-close-brace (punctuator "}")) + (production :punctuator (#\[) punctuator-open-bracket (punctuator "[")) + (production :punctuator (#\]) punctuator-close-bracket (punctuator "]")) + (production :punctuator (#\;) punctuator-semicolon (punctuator ";")) + (%print-actions) + + (%section "Numeric literals") + + (declare-action double-value :numeric-literal double) + (production :numeric-literal (:decimal-literal) numeric-literal-decimal + (double-value (rational-to-double (rational-value :decimal-literal)))) + (production :numeric-literal (:hex-integer-literal) numeric-literal-hex + (double-value (rational-to-double (integer-to-rational (integer-value :hex-integer-literal))))) + (production :numeric-literal (:octal-integer-literal) numeric-literal-octal + (double-value (rational-to-double (integer-to-rational (integer-value :octal-integer-literal))))) + (%print-actions) + + (define (expt (base rational) (exponent integer)) rational + (if (= exponent 0) + (integer-to-rational 1) + (if (< exponent 0) + (rational/ (integer-to-rational 1) (expt base (neg exponent))) + (rational* base (expt base (- exponent 1)))))) + + (declare-action rational-value :decimal-literal rational) + (production :decimal-literal (:mantissa :exponent) decimal-literal + (rational-value (rational* (rational-value :mantissa) (expt (integer-to-rational 10) (integer-value :exponent))))) + + (declare-action rational-value :mantissa rational) + (production :mantissa (:decimal-integer-literal) mantissa-integer + (rational-value (integer-to-rational (integer-value :decimal-integer-literal)))) + (production :mantissa (:decimal-integer-literal #\.) mantissa-integer-dot + (rational-value (integer-to-rational (integer-value :decimal-integer-literal)))) + (production :mantissa (:decimal-integer-literal #\. :fraction) mantissa-integer-dot-fraction + (rational-value (rational+ (integer-to-rational (integer-value :decimal-integer-literal)) + (rational-value :fraction)))) + (production :mantissa (#\. :fraction) mantissa-dot-fraction + (rational-value (rational-value :fraction))) + + (declare-action integer-value :decimal-integer-literal integer) + (production :decimal-integer-literal (#\0) decimal-integer-literal-0 + (integer-value 0)) + (production :decimal-integer-literal (:non-zero-decimal-digits) decimal-integer-literal-nonzero + (integer-value (integer-value :non-zero-decimal-digits))) + + (declare-action integer-value :non-zero-decimal-digits integer) + (production :non-zero-decimal-digits (:non-zero-digit) non-zero-decimal-digits-first + (integer-value (decimal-value :non-zero-digit))) + (production :non-zero-decimal-digits (:non-zero-decimal-digits :decimal-digit) non-zero-decimal-digits-rest + (integer-value (+ (* 10 (integer-value :non-zero-decimal-digits)) (decimal-value :decimal-digit)))) + + (%charclass :non-zero-digit) + + (declare-action rational-value :fraction rational) + (production :fraction (:decimal-digits) fraction-decimal-digits + (rational-value (rational/ (integer-to-rational (integer-value :decimal-digits)) + (expt (integer-to-rational 10) (n-digits :decimal-digits))))) + (%print-actions) + + (declare-action integer-value :exponent integer) + (production :exponent () exponent-none + (integer-value 0)) + (production :exponent (:exponent-indicator :signed-integer) exponent-integer + (integer-value (integer-value :signed-integer))) + (%charclass :exponent-indicator) + + (declare-action integer-value :signed-integer integer) + (production :signed-integer (:decimal-digits) signed-integer-no-sign + (integer-value (integer-value :decimal-digits))) + (production :signed-integer (#\+ :decimal-digits) signed-integer-plus + (integer-value (integer-value :decimal-digits))) + (production :signed-integer (#\- :decimal-digits) signed-integer-minus + (integer-value (neg (integer-value :decimal-digits)))) + (%print-actions) + + (declare-action integer-value :decimal-digits integer) + (declare-action n-digits :decimal-digits integer) + (production :decimal-digits (:decimal-digit) decimal-digits-first + (integer-value (decimal-value :decimal-digit)) + (n-digits 1)) + (production :decimal-digits (:decimal-digits :decimal-digit) decimal-digits-rest + (integer-value (+ (* 10 (integer-value :decimal-digits)) (decimal-value :decimal-digit))) + (n-digits (+ (n-digits :decimal-digits) 1))) + (%print-actions) + + (declare-action integer-value :hex-integer-literal integer) + (production :hex-integer-literal (#\0 :hex-indicator :hex-digit) hex-integer-literal-first + (integer-value (hex-value :hex-digit))) + (production :hex-integer-literal (:hex-integer-literal :hex-digit) hex-integer-literal-rest + (integer-value (+ (* 16 (integer-value :hex-integer-literal)) (hex-value :hex-digit)))) + (%charclass :hex-indicator) + (%charclass :hex-digit) + + (declare-action integer-value :octal-integer-literal integer) + (production :octal-integer-literal (#\0 :octal-digit) octal-integer-literal-first + (integer-value (octal-value :octal-digit))) + (production :octal-integer-literal (:octal-integer-literal :octal-digit) octal-integer-literal-rest + (integer-value (+ (* 8 (integer-value :octal-integer-literal)) (octal-value :octal-digit)))) + (%charclass :octal-digit) + (%print-actions) + + (%section "String literals") + + (grammar-argument :quote single double) + (declare-action string-value :string-literal string) + (production :string-literal (#\' (:string-chars single) #\') string-literal-single + (string-value (string-value :string-chars))) + (production :string-literal (#\" (:string-chars double) #\") string-literal-double + (string-value (string-value :string-chars))) + (%print-actions) + + (declare-action string-value (:string-chars :quote) string) + (production (:string-chars :quote) ((:ordinary-string-chars :quote)) string-chars-ordinary + (string-value (string-value :ordinary-string-chars))) + (production (:string-chars :quote) ((:string-chars :quote) #\\ :short-octal-escape) string-chars-short-escape + (string-value (append (string-value :string-chars) + (vector (character-value :short-octal-escape))))) + + (declare-action string-value (:ordinary-string-chars :quote) string) + (production (:ordinary-string-chars :quote) () ordinary-string-chars-empty + (string-value "")) + (production (:ordinary-string-chars :quote) ((:string-chars :quote) :plain-string-char) ordinary-string-chars-char + (string-value (append (string-value :string-chars) + (vector (character-value :plain-string-char))))) + (production (:ordinary-string-chars :quote) ((:string-chars :quote) (:plain-string-quote :quote)) ordinary-string-chars-quote + (string-value (append (string-value :string-chars) + (vector (character-value :plain-string-quote))))) + (production (:ordinary-string-chars :quote) ((:ordinary-string-chars :quote) :octal-digit) ordinary-string-chars-octal + (string-value (append (string-value :ordinary-string-chars) + (vector (character-value :octal-digit))))) + (production (:ordinary-string-chars :quote) ((:string-chars :quote) #\\ :ordinary-escape) ordinary-string-chars-escape + (string-value (append (string-value :string-chars) + (vector (character-value :ordinary-escape))))) + + (%charclass :plain-string-char) + + (declare-action character-value (:plain-string-quote :quote) character) + (production (:plain-string-quote single) (#\") plain-string-quote-single + (character-value #\")) + (production (:plain-string-quote double) (#\') plain-string-quote-double + (character-value #\')) + (%print-actions) + + (declare-action character-value :ordinary-escape character) + (production :ordinary-escape (:string-char-escape) ordinary-escape-character + (character-value (character-value :string-char-escape))) + (production :ordinary-escape (:full-octal-escape) ordinary-escape-full-octal + (character-value (character-value :full-octal-escape))) + (production :ordinary-escape (:hex-escape) ordinary-escape-hex + (character-value (character-value :hex-escape))) + (production :ordinary-escape (:unicode-escape) ordinary-escape-unicode + (character-value (character-value :unicode-escape))) + (production :ordinary-escape (:string-non-escape) ordinary-escape-non-escape + (character-value (character-value :string-non-escape))) + (%charclass :string-non-escape) + (%print-actions) + + (declare-action character-value :string-char-escape character) + (production :string-char-escape (#\') string-char-escape-single-quote (character-value #\')) + (production :string-char-escape (#\") string-char-escape-double-quote (character-value #\")) + (production :string-char-escape (#\\) string-char-escape-backslash (character-value #\\)) + (production :string-char-escape (#\b) string-char-escape-backspace (character-value #?0008)) + (production :string-char-escape (#\f) string-char-escape-form-feed (character-value #?000C)) + (production :string-char-escape (#\n) string-char-escape-new-line (character-value #?000A)) + (production :string-char-escape (#\r) string-char-escape-return (character-value #?000D)) + (production :string-char-escape (#\t) string-char-escape-tab (character-value #?0009)) + (production :string-char-escape (#\v) string-char-escape-vertical-tab (character-value #?000B)) + (%print-actions) + + (declare-action character-value :short-octal-escape character) + (production :short-octal-escape (:octal-digit) short-octal-escape-1 + (character-value (code-to-character (octal-value :octal-digit)))) + (production :short-octal-escape (:zero-to-three :octal-digit) short-octal-escape-2 + (character-value (code-to-character (+ (* 8 (octal-value :zero-to-three)) + (octal-value :octal-digit))))) + + (declare-action character-value :full-octal-escape character) + (production :full-octal-escape (:four-to-seven :octal-digit) full-octal-escape-2 + (character-value (code-to-character (+ (* 8 (octal-value :four-to-seven)) + (octal-value :octal-digit))))) + (production :full-octal-escape (:zero-to-three :octal-digit :octal-digit) full-octal-escape-3 + (character-value (code-to-character (+ (+ (* 64 (octal-value :zero-to-three)) + (* 8 (octal-value :octal-digit 1))) + (octal-value :octal-digit 2))))) + (%charclass :zero-to-three) + (%charclass :four-to-seven) + + (declare-action character-value :hex-escape character) + (production :hex-escape (#\x :hex-digit :hex-digit) hex-escape-2 + (character-value (code-to-character (+ (* 16 (hex-value :hex-digit 1)) + (hex-value :hex-digit 2))))) + + (declare-action character-value :unicode-escape character) + (production :unicode-escape (#\u :hex-digit :hex-digit :hex-digit :hex-digit) unicode-escape-4 + (character-value (code-to-character (+ (+ (+ (* 4096 (hex-value :hex-digit 1)) + (* 256 (hex-value :hex-digit 2))) + (* 16 (hex-value :hex-digit 3))) + (hex-value :hex-digit 4))))) + (%print-actions) + + ))) + + (defparameter *ll* (world-lexer *lw* 'code-lexer)) + (defparameter *lg* (lexer-grammar *ll*)) + (set-up-lexer-metagrammar *ll*) + (defparameter *lm* (lexer-metagrammar *ll*))) + +#| +(depict-rtf-to-local-file + "ECMA Lexer Charclasses.rtf" + #'(lambda (rtf-stream) + (depict-paragraph (rtf-stream ':grammar-header) + (depict rtf-stream "Character Classes")) + (dolist (charclass (lexer-charclasses *ll*)) + (depict-charclass rtf-stream charclass)) + (depict-paragraph (rtf-stream ':grammar-header) + (depict rtf-stream "Grammar")) + (depict-grammar rtf-stream *lg*))) + +(depict-rtf-to-local-file + "ECMA Lexer.rtf" + #'(lambda (rtf-stream) + (depict-world-commands rtf-stream *lw*))) + +(depict-html-to-local-file + "ECMA Lexer.html" + #'(lambda (rtf-stream) + (depict-world-commands rtf-stream *lw*)) + "ECMA Lexer") + +(with-local-output (s "ECMA Lexer.txt") (print-lexer *ll* s) (print-grammar *lg* s)) + +(print-illegal-strings m) + +(lexer-pparse *ll* "0x20") +(lexer-pparse *ll* "2b") +(lexer-pparse *ll* " 3.75" :trace t) +(lexer-pparse *ll* "25" :trace :code) +(lexer-pmetaparse *ll* "32+abc//23e-a4*7e-2 3 id4 4ef;") +(lexer-pmetaparse *ll* "32+abc//23e-a4*7e-2 3 id4 4ef; +") +(lexer-pmetaparse *ll* "32+abc/ /23e-a4*7e-2 3 /*id4 4*-/ef; + +fjds*/y//z") +(lexer-pmetaparse *ll* "3a+in'a+b\\147\"de'\"'\"") +|# + + +; Return the ECMAScript input string as a list of tokens like: +; (($number . 3.0) + - ++ else ($string . "a+bgde") ($end)) +; Line breaks are removed. +(defun tokenize (string) + (delete + '($line-breaks) + (mapcar + #'(lambda (token-value) + (let ((token-value (car token-value))) + (ecase (car token-value) + (identifier (cons '$identifier (cdr token-value))) + ((reserved-word punctuator) (intern (string-upcase (cdr token-value)))) + (number (cons '$number (cdr token-value))) + (string (cons '$string (cdr token-value))) + (line-breaks '($line-breaks)) + (end '($end))))) + (lexer-metaparse *ll* string)) + :test #'equal)) + + diff --git a/mozilla/js2/semantics/ECMA Lexer.rtf b/mozilla/js2/semantics/ECMA Lexer.rtf new file mode 100644 index 00000000000..6591fac225a --- /dev/null +++ b/mozilla/js2/semantics/ECMA Lexer.rtf @@ -0,0 +1,1042 @@ +{\rtf1\mac\ansicpg10000\uc1\deff0\deflang2057\deflangfe2057 +{\fonttbl{\f0\froman\fcharset256\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\f3\ftech\fcharset2\fprq2 Symbol;}{\f4\fnil\fcharset256\fprq2 Helvetica;} +{\f5\fmodern\fcharset256\fprq2 Courier New;}{\f6\fnil\fcharset256\fprq2 Palatino;} +{\f7\fscript\fcharset256\fprq2 Zapf Chancery;}{\f8\ftech\fcharset2\fprq2 Zapf Dingbats;}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; +\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0 +\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0 +\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;} +{\stylesheet{\widctlpar\fs20\lang2057\snext0 Normal;} +{\s1\qj\sa120\widctlpar\fs20\lang2057\sbasedon0\snext1 Body Text;} +{\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057\sbasedon3\snext1 heading 3;} +{\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057\sbasedon0\snext1 heading 4;} +{\s10\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext10 Grammar;} +{\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057\sbasedon0\snext12 Grammar Header;} +{\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext14 Grammar LHS;} +{\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar LHS Last;} +{\s14\fi-1260\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon10\snext14 Grammar +RHS;} +{\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon14\snext12 Grammar +RHS Last;} +{\s16\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar Argument;} +{\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext20 Semantics;} +{\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon20\snext21 Semantics Next;} +{\*\cs30\additive Default Paragraph Font;} +{\*\cs31\b\f5\cf2\lang1024\additive\sbasedon30 Character Literal;} +{\*\cs32\b0\f0\cf9\additive\sbasedon30 Character Literal Control;} +{\*\cs33\b\f6\cf10\lang1024\additive\sbasedon30 Terminal;} +{\*\cs34\b\f5\cf2\lang1024\additive\sbasedon33 Terminal Keyword;} +{\*\cs35\i\f6\cf13\lang1024\additive\sbasedon30 Nonterminal;} +{\*\cs36\i0\additive\sbasedon30 Nonterminal Attribute;} +{\*\cs37\additive\sbasedon30 Nonterminal Argument;} +{\*\cs40\b\f0\additive\sbasedon30 Semantic Keyword;} +{\*\cs41\f0\cf6\lang1024\additive\sbasedon30 Type Expression;} +{\*\cs42\scaps\f0\cf6\lang1024\additive\sbasedon41 Type Name;} +{\*\cs43\f4\cf6\lang1024\additive\sbasedon41 Field Name;} +{\*\cs44\i\f0\cf11\lang1024\additive\sbasedon30 Global Variable;} +{\*\cs45\i\f0\cf4\lang1024\additive\sbasedon30 Local Variable;} +{\*\cs46\f7\cf12\lang1024\additive\sbasedon30 Action Name;}} +\widowctrl\ftnbj\aenddoc\fet0\formshade\viewkind4\viewscale125\pgbrdrhead\pgbrdrfoot\sectd\pard +\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Comments\par\pard\plain\s11 +\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s13\fi-1440\li1800\sb120 +\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 LineComment} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024/} {\cs35\i\f6\cf13\lang1024 LineCommentCharacters}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LineCommentCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LineCommentCharacters} {\cs35\i\f6\cf13\lang1024 NonTerminator}\par\pard +\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NonTerminator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AnyCharacter} {\b except} {\cs35\i\f6\cf13\lang1024 LineTerminator}\par +{\cs35\i\f6\cf13\lang1024 SingleLineBlockComment} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024*} {\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} +{\cs31\b\f5\cf2\lang1024*} {\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs35\i\f6\cf13\lang1024 NonTerminatorOrSlash} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 PreSlashCharacters} {\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PreSlashCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} +{\cs35\i\f6\cf13\lang1024 NonTerminatorOrAsteriskOrSlash}\par\pard\plain\s15\fi-1260\li1800\sa120 +\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 PreSlashCharacters} +{\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NonTerminatorOrSlash} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonTerminator} {\b except} {\cs31\b\f5\cf2\lang1024/}\par +{\cs35\i\f6\cf13\lang1024 NonTerminatorOrAsteriskOrSlash} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonTerminator} {\b except} {\cs31\b\f5\cf2\lang1024*} | +{\cs31\b\f5\cf2\lang1024/}\par{\cs35\i\f6\cf13\lang1024 MultiLineBlockComment} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024*} {\cs35\i\f6\cf13\lang1024 MultiLineBlockCommentCharacters} +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs31\b\f5\cf2\lang1024*} +{\cs31\b\f5\cf2\lang1024/}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 MultiLineBlockCommentCharacters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs35\i\f6\cf13\lang1024 LineTerminator}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MultiLineBlockCommentCharacters} +{\cs35\i\f6\cf13\lang1024 BlockCommentCharacters} {\cs35\i\f6\cf13\lang1024 LineTerminator}\par\pard +\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 White space\par\pard\plain\s11 +\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120 +\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 WhiteSpace} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 WhiteSpace} {\cs35\i\f6\cf13\lang1024 WhiteSpaceCharacter}\par\pard\plain +\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 WhiteSpace} {\cs35\i\f6\cf13\lang1024 SingleLineBlockComment}\par\pard +\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 WhiteSpaceCharacter} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7TAB\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7VT\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7FF\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7SP\u187\'C8}\par\pard\plain\s2\sa60\keep\keepn +\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Line breaks\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 LineBreak} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LineTerminator}\par|\tab{\cs35\i\f6\cf13\lang1024 LineComment} +{\cs35\i\f6\cf13\lang1024 LineTerminator}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 MultiLineBlockComment}\par\pard\plain +\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LineTerminator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7LF\u187\'C8} | +{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7CR\u187\'C8}\par\pard\plain\s12\fi-1440\li1800\sb120 +\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 LineBreaks} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 LineBreak} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LineBreaks} {\cs35\i\f6\cf13\lang1024 WhiteSpace} +{\cs35\i\f6\cf13\lang1024 LineBreak}\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b +\fs24\lang2057 Tokens\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax +\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NextToken} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 WhiteSpace} {\cs35\i\f6\cf13\lang1024 Token}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 LineBreaks} +\par|\tab{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord}\par|\tab +{\cs35\i\f6\cf13\lang1024 Punctuator}\par|\tab{\cs35\i\f6\cf13\lang1024 NumericLiteral}\par|\tab +{\cs35\i\f6\cf13\lang1024 StringLiteral}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 EndOfInput}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 EndOfInput} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024 End}\par +\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LineComment} {\cs33\b\f6\cf10\lang1024 End}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 type} {\cs42\scaps\f0\cf6\lang1024 Token}\line = +{\cs41\f0\cf6\lang1024{\cs40\b\f0 oneof} \{\line {\cs43\f4\cf6\lang1024 identifier}: +{\cs42\scaps\f0\cf6\lang1024 String};\line {\cs43\f4\cf6\lang1024 reservedWord}: +{\cs42\scaps\f0\cf6\lang1024 String};\line {\cs43\f4\cf6\lang1024 punctuator}: +{\cs42\scaps\f0\cf6\lang1024 String};\line {\cs43\f4\cf6\lang1024 number}: +{\cs42\scaps\f0\cf6\lang1024 Double};\line {\cs43\f4\cf6\lang1024 string}: +{\cs42\scaps\f0\cf6\lang1024 String};\line {\cs43\f4\cf6\lang1024 lineBreaks};\line + {\cs43\f4\cf6\lang1024 end}\}} +\par{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Token}[{\cs35\i\f6\cf13\lang1024 NextToken}] : +{\cs42\scaps\f0\cf6\lang1024 Token}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 Token}[{\cs35\i\f6\cf13\lang1024 NextToken} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 WhiteSpace} {\cs35\i\f6\cf13\lang1024 Token}] = +{\cs46\f7\cf12\lang1024 Token}[{\cs35\i\f6\cf13\lang1024 Token}]\par\pard\plain\s20\li180\sb60\sa60 +\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Token}[ +{\cs35\i\f6\cf13\lang1024 Token}] : {\cs42\scaps\f0\cf6\lang1024 Token}\par\pard\plain\s21\li540 +\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Token}[ +{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 LineBreaks}] = {\cs43\f4\cf6\lang1024 lineBreaks}\par +{\cs46\f7\cf12\lang1024 Token}[{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord}] = {\cs46\f7\cf12\lang1024 Token}[ +{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord}]\par{\cs46\f7\cf12\lang1024 Token}[ +{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Punctuator}] = {\cs43\f4\cf6\lang1024 punctuator} +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator}]\par +{\cs46\f7\cf12\lang1024 Token}[{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NumericLiteral}] = {\cs43\f4\cf6\lang1024 number} +{\cs46\f7\cf12\lang1024 DoubleValue}[{\cs35\i\f6\cf13\lang1024 NumericLiteral}]\par +{\cs46\f7\cf12\lang1024 Token}[{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 StringLiteral}] = {\cs43\f4\cf6\lang1024 string} +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringLiteral}]\par +{\cs46\f7\cf12\lang1024 Token}[{\cs35\i\f6\cf13\lang1024 Token} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 EndOfInput}] = {\cs43\f4\cf6\lang1024 end}\par\pard\plain\s2\sa60\keep +\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Keywords\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 IdentifierLetter}\par|\tab{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\cs35\i\f6\cf13\lang1024 IdentifierLetter}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 IdentifierLetter} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 A} | +{\cs31\b\f5\cf2\lang1024 B} | {\cs31\b\f5\cf2\lang1024 C} | {\cs31\b\f5\cf2\lang1024 D} | +{\cs31\b\f5\cf2\lang1024 E} | {\cs31\b\f5\cf2\lang1024 F} | {\cs31\b\f5\cf2\lang1024 G} | +{\cs31\b\f5\cf2\lang1024 H} | {\cs31\b\f5\cf2\lang1024 I} | {\cs31\b\f5\cf2\lang1024 J} | +{\cs31\b\f5\cf2\lang1024 K} | {\cs31\b\f5\cf2\lang1024 L} | {\cs31\b\f5\cf2\lang1024 M} | +{\cs31\b\f5\cf2\lang1024 N} | {\cs31\b\f5\cf2\lang1024 O} | {\cs31\b\f5\cf2\lang1024 P} | +{\cs31\b\f5\cf2\lang1024 Q} | {\cs31\b\f5\cf2\lang1024 R} | {\cs31\b\f5\cf2\lang1024 S} | +{\cs31\b\f5\cf2\lang1024 T} | {\cs31\b\f5\cf2\lang1024 U} | {\cs31\b\f5\cf2\lang1024 V} | +{\cs31\b\f5\cf2\lang1024 W} | {\cs31\b\f5\cf2\lang1024 X} | {\cs31\b\f5\cf2\lang1024 Y} | +{\cs31\b\f5\cf2\lang1024 Z}\par|\tab{\cs31\b\f5\cf2\lang1024 a} | {\cs31\b\f5\cf2\lang1024 b} | +{\cs31\b\f5\cf2\lang1024 c} | {\cs31\b\f5\cf2\lang1024 d} | {\cs31\b\f5\cf2\lang1024 e} | +{\cs31\b\f5\cf2\lang1024 f} | {\cs31\b\f5\cf2\lang1024 g} | {\cs31\b\f5\cf2\lang1024 h} | +{\cs31\b\f5\cf2\lang1024 i} | {\cs31\b\f5\cf2\lang1024 j} | {\cs31\b\f5\cf2\lang1024 k} | +{\cs31\b\f5\cf2\lang1024 l} | {\cs31\b\f5\cf2\lang1024 m} | {\cs31\b\f5\cf2\lang1024 n} | +{\cs31\b\f5\cf2\lang1024 o} | {\cs31\b\f5\cf2\lang1024 p} | {\cs31\b\f5\cf2\lang1024 q} | +{\cs31\b\f5\cf2\lang1024 r} | {\cs31\b\f5\cf2\lang1024 s} | {\cs31\b\f5\cf2\lang1024 t} | +{\cs31\b\f5\cf2\lang1024 u} | {\cs31\b\f5\cf2\lang1024 v} | {\cs31\b\f5\cf2\lang1024 w} | +{\cs31\b\f5\cf2\lang1024 x} | {\cs31\b\f5\cf2\lang1024 y} | {\cs31\b\f5\cf2\lang1024 z}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs31\b\f5\cf2\lang1024$} | {\cs31\b\f5\cf2\lang1024_}\par\pard\plain\s13\fi-1440\li1800\sb120 +\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 DecimalDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | +{\cs31\b\f5\cf2\lang1024 4} | {\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | +{\cs31\b\f5\cf2\lang1024 7} | {\cs31\b\f5\cf2\lang1024 8} | {\cs31\b\f5\cf2\lang1024 9}\par\pard +\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Name}[ +{\cs35\i\f6\cf13\lang1024 IdentifierName}] : {\cs42\scaps\f0\cf6\lang1024 String}\par\pard\plain\s21 +\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Name}[ +{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 IdentifierLetter}] = {\b[}{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 IdentifierLetter}]{\b]}\par{\cs46\f7\cf12\lang1024 Name}[ +{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 IdentifierName\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 IdentifierLetter}] +\line = {\cs46\f7\cf12\lang1024 Name}[{\cs35\i\f6\cf13\lang1024 IdentifierName\b0\i0\sub 1}] +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 IdentifierLetter}]{\b]}\par +{\cs46\f7\cf12\lang1024 Name}[{\cs35\i\f6\cf13\lang1024 IdentifierName} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 IdentifierName\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 DecimalDigit}]\line + = {\cs46\f7\cf12\lang1024 Name}[{\cs35\i\f6\cf13\lang1024 IdentifierName\b0\i0\sub 1}] +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 DecimalDigit}]{\b]}\par\pard\plain +\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 IdentifierLetter}] : +{\cs42\scaps\f0\cf6\lang1024 Character} = {\cs35\i\f6\cf13\lang1024 IdentifierLetter}\par +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 DecimalDigit}] + : {\cs42\scaps\f0\cf6\lang1024 Character} = {\cs35\i\f6\cf13\lang1024 DecimalDigit}\par +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 DigitValue}[{\cs35\i\f6\cf13\lang1024 DecimalDigit}] : +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 digitValue}( +{\cs35\i\f6\cf13\lang1024 DecimalDigit})\par{\cs44\i\f0\cf11\lang1024 keywords} : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 String}[]}\line = {\b[}\ldblquote +{\cs31\b\f5\cf2\lang1024 break}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 case} +\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 catch}\rdblquote,\line \ldblquote +{\cs31\b\f5\cf2\lang1024 continue}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 default} +\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 delete}\rdblquote,\line \ldblquote +{\cs31\b\f5\cf2\lang1024 do}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 else} +\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 finally}\rdblquote,\line \ldblquote +{\cs31\b\f5\cf2\lang1024 for}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 function} +\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 if}\rdblquote,\line \ldblquote +{\cs31\b\f5\cf2\lang1024 in}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 new}\rdblquote +,\line \ldblquote{\cs31\b\f5\cf2\lang1024 return}\rdblquote,\line \ldblquote +{\cs31\b\f5\cf2\lang1024 switch}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 this} +\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 throw}\rdblquote,\line \ldblquote +{\cs31\b\f5\cf2\lang1024 try}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 typeof} +\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 var}\rdblquote,\line \ldblquote +{\cs31\b\f5\cf2\lang1024 void}\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 while} +\rdblquote,\line \ldblquote{\cs31\b\f5\cf2\lang1024 with}\rdblquote{\b]}\par +{\cs44\i\f0\cf11\lang1024 futureReservedWords} : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 String}[]}\line = {\b[}\ldblquote +{\cs31\b\f5\cf2\lang1024 class}\rdblquote, \ldblquote{\cs31\b\f5\cf2\lang1024 const}\rdblquote, +\ldblquote{\cs31\b\f5\cf2\lang1024 debugger}\rdblquote, \ldblquote{\cs31\b\f5\cf2\lang1024 enum} +\rdblquote, \ldblquote{\cs31\b\f5\cf2\lang1024 export}\rdblquote, \ldblquote +{\cs31\b\f5\cf2\lang1024 extends}\rdblquote, \ldblquote{\cs31\b\f5\cf2\lang1024 import}\rdblquote, +\ldblquote{\cs31\b\f5\cf2\lang1024 super}\rdblquote{\b]}\par{\cs44\i\f0\cf11\lang1024 literals} : +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 String}[]} = {\b[}\ldblquote +{\cs31\b\f5\cf2\lang1024 null}\rdblquote, \ldblquote{\cs31\b\f5\cf2\lang1024 true}\rdblquote, +\ldblquote{\cs31\b\f5\cf2\lang1024 false}\rdblquote{\b]}\par{\cs44\i\f0\cf11\lang1024 reservedWords} + : {\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 String}[]} = +{\cs44\i\f0\cf11\lang1024 keywords} +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} +{\cs44\i\f0\cf11\lang1024 futureReservedWords} +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} +{\cs44\i\f0\cf11\lang1024 literals}\par{\cs44\i\f0\cf11\lang1024 member}( +{\cs45\i\f0\cf4\lang1024 id}: {\cs42\scaps\f0\cf6\lang1024 String}, {\cs45\i\f0\cf4\lang1024 list}: +{\cs41\f0\cf6\lang1024{\cs42\scaps\f0\cf6\lang1024 String}[]}) : +{\cs42\scaps\f0\cf6\lang1024 Boolean}\line = {\cs40\b\f0 if} {\cs44\i\f0\cf11\lang1024 empty}( +{\cs45\i\f0\cf4\lang1024 list})\line {\cs40\b\f0 then} {\cs44\i\f0\cf11\lang1024 false}\line + {\cs40\b\f0 else} {\cs40\b\f0 let} {\cs45\i\f0\cf4\lang1024 s}: +{\cs42\scaps\f0\cf6\lang1024 String} = {\cs44\i\f0\cf11\lang1024 first}( +{\cs45\i\f0\cf4\lang1024 list})\line {\cs40\b\f0 in} {\cs40\b\f0 if} +{\cs44\i\f0\cf11\lang1024 stringEqual}({\cs45\i\f0\cf4\lang1024 id}, {\cs45\i\f0\cf4\lang1024 s}) +\line {\cs40\b\f0 then} {\cs44\i\f0\cf11\lang1024 true}\line +{\cs40\b\f0 else} {\cs44\i\f0\cf11\lang1024 member}({\cs45\i\f0\cf4\lang1024 id}, +{\cs44\i\f0\cf11\lang1024 rest}({\cs45\i\f0\cf4\lang1024 list}))\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 IdentifierName}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b +\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Token}[ +{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord}] : {\cs42\scaps\f0\cf6\lang1024 Token}\par\pard +\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Token}[ +{\cs35\i\f6\cf13\lang1024 IdentifierOrReservedWord} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 IdentifierName}]\line = {\cs40\b\f0 let} {\cs45\i\f0\cf4\lang1024 id}: +{\cs42\scaps\f0\cf6\lang1024 String} = {\cs46\f7\cf12\lang1024 Name}[ +{\cs35\i\f6\cf13\lang1024 IdentifierName}]\line {\cs40\b\f0 in} {\cs40\b\f0 if} +{\cs44\i\f0\cf11\lang1024 member}({\cs45\i\f0\cf4\lang1024 id}, +{\cs44\i\f0\cf11\lang1024 reservedWords})\line {\cs40\b\f0 then} +{\cs43\f4\cf6\lang1024 reservedWord} {\cs45\i\f0\cf4\lang1024 id}\line {\cs40\b\f0 else} +{\cs43\f4\cf6\lang1024 identifier} {\cs45\i\f0\cf4\lang1024 id}\par\pard\plain\s2\sa60\keep\keepn +\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Punctuators\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024<}\par|\tab{\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024=} {\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024!} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024!} {\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024,}\par|\tab{\cs31\b\f5\cf2\lang1024!}\par +|\tab{\cs31\b\f5\cf2\lang1024~}\par|\tab{\cs31\b\f5\cf2\lang1024?}\par|\tab +{\cs31\b\f5\cf2\lang1024:}\par|\tab{\cs31\b\f5\cf2\lang1024.}\par|\tab{\cs31\b\f5\cf2\lang1024&} +{\cs31\b\f5\cf2\lang1024&}\par|\tab{\cs31\b\f5\cf2\lang1024|} {\cs31\b\f5\cf2\lang1024|}\par|\tab +{\cs31\b\f5\cf2\lang1024 +} {\cs31\b\f5\cf2\lang1024 +}\par|\tab{\cs31\b\f5\cf2\lang1024 -} +{\cs31\b\f5\cf2\lang1024 -}\par|\tab{\cs31\b\f5\cf2\lang1024 +}\par|\tab{\cs31\b\f5\cf2\lang1024 -} +\par|\tab{\cs31\b\f5\cf2\lang1024*}\par|\tab{\cs31\b\f5\cf2\lang1024/}\par|\tab +{\cs31\b\f5\cf2\lang1024&}\par|\tab{\cs31\b\f5\cf2\lang1024|}\par|\tab{\cs31\b\f5\cf2\lang1024^}\par +|\tab{\cs31\b\f5\cf2\lang1024%}\par|\tab{\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024<}\par| +\tab{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>}\par|\tab{\cs31\b\f5\cf2\lang1024 +} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024 -} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024*} {\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024&} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024|} {\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024^} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024%} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024=}\par|\tab +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024=}\par|\tab{\cs31\b\f5\cf2\lang1024(}\par|\tab{\cs31\b\f5\cf2\lang1024)}\par +|\tab{\cs31\b\f5\cf2\lang1024\{}\par|\tab{\cs31\b\f5\cf2\lang1024\}}\par|\tab +{\cs31\b\f5\cf2\lang1024[}\par|\tab{\cs31\b\f5\cf2\lang1024]}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024;}\par\pard\plain +\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60 +\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 Punctuator} +[{\cs35\i\f6\cf13\lang1024 Punctuator}] : {\cs42\scaps\f0\cf6\lang1024 String}\par\pard\plain\s21 +\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024=}] = +\ldblquote{\cs31\b\f5\cf2\lang1024=}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024>}] = +\ldblquote{\cs31\b\f5\cf2\lang1024>}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024<}] = +\ldblquote{\cs31\b\f5\cf2\lang1024<}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024==}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024=} +{\cs31\b\f5\cf2\lang1024=} {\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024===} +\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024<} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024<=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024>=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024!} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024!=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024!} +{\cs31\b\f5\cf2\lang1024=} {\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024!==} +\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024,}] = +\ldblquote{\cs31\b\f5\cf2\lang1024,}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024!}] = +\ldblquote{\cs31\b\f5\cf2\lang1024!}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024~}] = +\ldblquote{\cs31\b\f5\cf2\lang1024~}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024?}] = +\ldblquote{\cs31\b\f5\cf2\lang1024?}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024:}] = +\ldblquote{\cs31\b\f5\cf2\lang1024:}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024.}] = +\ldblquote{\cs31\b\f5\cf2\lang1024.}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024&} +{\cs31\b\f5\cf2\lang1024&}] = \ldblquote{\cs31\b\f5\cf2\lang1024&&}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024|} +{\cs31\b\f5\cf2\lang1024|}] = \ldblquote{\cs31\b\f5\cf2\lang1024||}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 +} +{\cs31\b\f5\cf2\lang1024 +}] = \ldblquote{\cs31\b\f5\cf2\lang1024 ++}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 -} +{\cs31\b\f5\cf2\lang1024 -}] = \ldblquote{\cs31\b\f5\cf2\lang1024 --}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 +}] = + \ldblquote{\cs31\b\f5\cf2\lang1024 +}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 -}] = + \ldblquote{\cs31\b\f5\cf2\lang1024 -}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024*}] = +\ldblquote{\cs31\b\f5\cf2\lang1024*}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/}] = +\ldblquote{\cs31\b\f5\cf2\lang1024/}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024&}] = +\ldblquote{\cs31\b\f5\cf2\lang1024&}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024|}] = +\ldblquote{\cs31\b\f5\cf2\lang1024|}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024^}] = +\ldblquote{\cs31\b\f5\cf2\lang1024^}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024%}] = +\ldblquote{\cs31\b\f5\cf2\lang1024%}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024<} +{\cs31\b\f5\cf2\lang1024<}] = \ldblquote{\cs31\b\f5\cf2\lang1024<<}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024>}] = \ldblquote{\cs31\b\f5\cf2\lang1024>>}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>}] = \ldblquote{\cs31\b\f5\cf2\lang1024>>>} +\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 +} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024 +=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 -} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024 -=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024*} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024*=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024/} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024/=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024&} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024&=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024|} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024|=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024^} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024^=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024%} +{\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024%=}\rdblquote\par +{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024<} +{\cs31\b\f5\cf2\lang1024<} {\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024<<=} +\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024=}] = \ldblquote{\cs31\b\f5\cf2\lang1024>>=} +\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024>} +{\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024>} {\cs31\b\f5\cf2\lang1024=}] = \ldblquote +{\cs31\b\f5\cf2\lang1024>>>=}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024(}] = +\ldblquote{\cs31\b\f5\cf2\lang1024(}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024)}] = +\ldblquote{\cs31\b\f5\cf2\lang1024)}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024\{}] = + \ldblquote{\cs31\b\f5\cf2\lang1024\{}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024\}}] = + \ldblquote{\cs31\b\f5\cf2\lang1024\}}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024[}] = +\ldblquote{\cs31\b\f5\cf2\lang1024[}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024]}] = +\ldblquote{\cs31\b\f5\cf2\lang1024]}\rdblquote\par{\cs46\f7\cf12\lang1024 Punctuator}[ +{\cs35\i\f6\cf13\lang1024 Punctuator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024;}] = +\ldblquote{\cs31\b\f5\cf2\lang1024;}\rdblquote\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar +\hyphpar0\level3\b\fs24\lang2057 Numeric literals\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar +\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NumericLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalLiteral}\par|\tab{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral}\par +\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar +\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 DoubleValue}[ +{\cs35\i\f6\cf13\lang1024 NumericLiteral}] : {\cs42\scaps\f0\cf6\lang1024 Double}\par\pard\plain\s21 +\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 DoubleValue}[ +{\cs35\i\f6\cf13\lang1024 NumericLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalLiteral}]\line = {\cs44\i\f0\cf11\lang1024 rationalToDouble}( +{\cs46\f7\cf12\lang1024 RationalValue}[{\cs35\i\f6\cf13\lang1024 DecimalLiteral}])\par +{\cs46\f7\cf12\lang1024 DoubleValue}[{\cs35\i\f6\cf13\lang1024 NumericLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral}]\line = {\cs44\i\f0\cf11\lang1024 rationalToDouble}( +{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral}])\par +{\cs46\f7\cf12\lang1024 DoubleValue}[{\cs35\i\f6\cf13\lang1024 NumericLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral}]\line = {\cs44\i\f0\cf11\lang1024 rationalToDouble} +({\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral}])\par\pard +\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs44\i\f0\cf11\lang1024 expt}( +{\cs45\i\f0\cf4\lang1024 base}: {\cs42\scaps\f0\cf6\lang1024 Rational}, +{\cs45\i\f0\cf4\lang1024 exponent}: {\cs42\scaps\f0\cf6\lang1024 Integer}) : +{\cs42\scaps\f0\cf6\lang1024 Rational}\line = {\cs40\b\f0 if} {\cs45\i\f0\cf4\lang1024 exponent} = + 0\line {\cs40\b\f0 then} 1\line {\cs40\b\f0 else} {\cs40\b\f0 if} +{\cs45\i\f0\cf4\lang1024 exponent} < 0\line {\cs40\b\f0 then} 1/{\cs44\i\f0\cf11\lang1024 expt} +({\cs45\i\f0\cf4\lang1024 base}, \endash{\cs45\i\f0\cf4\lang1024 exponent})\line +{\cs40\b\f0 else} {\cs45\i\f0\cf4\lang1024 base}*{\cs44\i\f0\cf11\lang1024 expt}( +{\cs45\i\f0\cf4\lang1024 base}, {\cs45\i\f0\cf4\lang1024 exponent} \endash 1)\par\pard\plain\s11 +\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s13\fi-1440\li1800\sb120 +\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 DecimalLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Mantissa} {\cs35\i\f6\cf13\lang1024 Exponent}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Mantissa} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral}\par|\tab +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} {\cs31\b\f5\cf2\lang1024.}\par|\tab +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} {\cs31\b\f5\cf2\lang1024.} +{\cs35\i\f6\cf13\lang1024 Fraction}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024.} {\cs35\i\f6\cf13\lang1024 Fraction}\par\pard +\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 0}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 NonZeroDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NonZeroDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 1} | +{\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | {\cs31\b\f5\cf2\lang1024 4} | +{\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | {\cs31\b\f5\cf2\lang1024 7} | +{\cs31\b\f5\cf2\lang1024 8} | {\cs31\b\f5\cf2\lang1024 9}\par{\cs35\i\f6\cf13\lang1024 Fraction} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b +\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 RationalValue}[{\cs35\i\f6\cf13\lang1024 DecimalLiteral} +] : {\cs42\scaps\f0\cf6\lang1024 Rational}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs46\f7\cf12\lang1024 RationalValue}[{\cs35\i\f6\cf13\lang1024 DecimalLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Mantissa} {\cs35\i\f6\cf13\lang1024 Exponent}]\line = +{\cs46\f7\cf12\lang1024 RationalValue}[{\cs35\i\f6\cf13\lang1024 Mantissa}]* +{\cs44\i\f0\cf11\lang1024 expt}(10, {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 Exponent}])\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 RationalValue}[ +{\cs35\i\f6\cf13\lang1024 Mantissa}] : {\cs42\scaps\f0\cf6\lang1024 Rational}\par\pard\plain\s21 +\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 RationalValue}[ +{\cs35\i\f6\cf13\lang1024 Mantissa} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral}] = {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral}]\par{\cs46\f7\cf12\lang1024 RationalValue}[ +{\cs35\i\f6\cf13\lang1024 Mantissa} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} {\cs31\b\f5\cf2\lang1024.}] = +{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral}]\par +{\cs46\f7\cf12\lang1024 RationalValue}[{\cs35\i\f6\cf13\lang1024 Mantissa} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} {\cs31\b\f5\cf2\lang1024.} +{\cs35\i\f6\cf13\lang1024 Fraction}]\line = {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral}] + {\cs46\f7\cf12\lang1024 RationalValue}[ +{\cs35\i\f6\cf13\lang1024 Fraction}]\par{\cs46\f7\cf12\lang1024 RationalValue}[ +{\cs35\i\f6\cf13\lang1024 Mantissa} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024.} +{\cs35\i\f6\cf13\lang1024 Fraction}] = {\cs46\f7\cf12\lang1024 RationalValue}[ +{\cs35\i\f6\cf13\lang1024 Fraction}]\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral}] : {\cs42\scaps\f0\cf6\lang1024 Integer}\par\pard +\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0}] = + 0\par{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 DecimalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits}]\line = {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits}]\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits}] : {\cs42\scaps\f0\cf6\lang1024 Integer}\par\pard +\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonZeroDigit}] = {\cs46\f7\cf12\lang1024 DecimalValue}[ +{\cs35\i\f6\cf13\lang1024 NonZeroDigit}]\par{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 DecimalDigit}] +\line = 10*{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 NonZeroDecimalDigits\b0\i0\sub 1}] + {\cs46\f7\cf12\lang1024 DecimalValue} +[{\cs35\i\f6\cf13\lang1024 DecimalDigit}]\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 DigitValue}[ +{\cs35\i\f6\cf13\lang1024 NonZeroDigit}] : {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 digitValue}({\cs35\i\f6\cf13\lang1024 NonZeroDigit})\par +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 RationalValue}[{\cs35\i\f6\cf13\lang1024 Fraction}] : +{\cs42\scaps\f0\cf6\lang1024 Rational}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 RationalValue}[{\cs35\i\f6\cf13\lang1024 Fraction} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}]\line = {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits}]/{\cs44\i\f0\cf11\lang1024 expt}(10, +{\cs46\f7\cf12\lang1024 NDigits}[{\cs35\i\f6\cf13\lang1024 DecimalDigits}])\par\pard\plain\s11\sb60 +\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 Exponent} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ExponentIndicator} {\cs35\i\f6\cf13\lang1024 SignedInteger}\par\pard\plain +\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ExponentIndicator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 E} | +{\cs31\b\f5\cf2\lang1024 e}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 SignedInteger} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par|\tab{\cs31\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024 -} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b +\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 Exponent}] : +{\cs42\scaps\f0\cf6\lang1024 Integer}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 Exponent} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \u171\'C7empty\u187\'C8] = 0 +\par{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 Exponent} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ExponentIndicator} {\cs35\i\f6\cf13\lang1024 SignedInteger}] = +{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 SignedInteger}]\par\pard\plain\s20 +\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 SignedInteger}] : +{\cs42\scaps\f0\cf6\lang1024 Integer}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 SignedInteger} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}] = {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits}]\par{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 SignedInteger} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}] = {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits}]\par{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 SignedInteger} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 -} +{\cs35\i\f6\cf13\lang1024 DecimalDigits}] = \endash{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits}]\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b +\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b +\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 DecimalDigits}] +: {\cs42\scaps\f0\cf6\lang1024 Integer}\par{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 NDigits}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits}] : {\cs42\scaps\f0\cf6\lang1024 Integer}\par\pard\plain\s21 +\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}] = {\cs46\f7\cf12\lang1024 DecimalValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigit}]\par{\cs46\f7\cf12\lang1024 NDigits}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigit}] = 1\par{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigits\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 DecimalDigit}]\line + = 10*{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 DecimalDigits\b0\i0\sub 1}] + +{\cs46\f7\cf12\lang1024 DecimalValue}[{\cs35\i\f6\cf13\lang1024 DecimalDigit}]\par +{\cs46\f7\cf12\lang1024 NDigits}[{\cs35\i\f6\cf13\lang1024 DecimalDigits} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 DecimalDigits\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 DecimalDigit}] = +{\cs46\f7\cf12\lang1024 NDigits}[{\cs35\i\f6\cf13\lang1024 DecimalDigits\b0\i0\sub 1}] + 1\par\pard +\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 0} +{\cs35\i\f6\cf13\lang1024 HexIndicator} {\cs35\i\f6\cf13\lang1024 HexDigit}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral} {\cs35\i\f6\cf13\lang1024 HexDigit}\par\pard\plain\s13 +\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 HexIndicator} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 X} | +{\cs31\b\f5\cf2\lang1024 x}\par{\cs35\i\f6\cf13\lang1024 HexDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | +{\cs31\b\f5\cf2\lang1024 4} | {\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | +{\cs31\b\f5\cf2\lang1024 7} | {\cs31\b\f5\cf2\lang1024 8} | {\cs31\b\f5\cf2\lang1024 9} | +{\cs31\b\f5\cf2\lang1024 A} | {\cs31\b\f5\cf2\lang1024 B} | {\cs31\b\f5\cf2\lang1024 C} | +{\cs31\b\f5\cf2\lang1024 D} | {\cs31\b\f5\cf2\lang1024 E} | {\cs31\b\f5\cf2\lang1024 F} | +{\cs31\b\f5\cf2\lang1024 a} | {\cs31\b\f5\cf2\lang1024 b} | {\cs31\b\f5\cf2\lang1024 c} | +{\cs31\b\f5\cf2\lang1024 d} | {\cs31\b\f5\cf2\lang1024 e} | {\cs31\b\f5\cf2\lang1024 f}\par\pard +\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024 0} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 OctalDigit} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3} | +{\cs31\b\f5\cf2\lang1024 4} | {\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | +{\cs31\b\f5\cf2\lang1024 7}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 +Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral}] : {\cs42\scaps\f0\cf6\lang1024 Integer}\par\pard\plain +\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} +{\cs35\i\f6\cf13\lang1024 HexIndicator} {\cs35\i\f6\cf13\lang1024 HexDigit}] = +{\cs46\f7\cf12\lang1024 HexValue}[{\cs35\i\f6\cf13\lang1024 HexDigit}]\par +{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 HexDigit}]\line + = 16*{\cs46\f7\cf12\lang1024 IntegerValue}[{\cs35\i\f6\cf13\lang1024 HexIntegerLiteral\b0\i0\sub 1} +] + {\cs46\f7\cf12\lang1024 HexValue}[{\cs35\i\f6\cf13\lang1024 HexDigit}]\par\pard\plain\s20\li180 +\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 DigitValue}[{\cs35\i\f6\cf13\lang1024 HexDigit}] : +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 digitValue}( +{\cs35\i\f6\cf13\lang1024 HexDigit})\par{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral}] : {\cs42\scaps\f0\cf6\lang1024 Integer}\par\pard +\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} +{\cs35\i\f6\cf13\lang1024 OctalDigit}] = {\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit}]\par{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 OctalDigit}] +\line = 8*{\cs46\f7\cf12\lang1024 IntegerValue}[ +{\cs35\i\f6\cf13\lang1024 OctalIntegerLiteral\b0\i0\sub 1}] + {\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit}]\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit}] : {\cs42\scaps\f0\cf6\lang1024 Character} = +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 DigitValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit}] : {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 digitValue}({\cs35\i\f6\cf13\lang1024 OctalDigit})\par\pard\plain\s2\sa60 +\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 String literals\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s16\fi-1440\li1800\sb120\sa120 +\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024\cs37 Quote} +{\field{\*\fldinst SYMBOL 206 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \{ +{\cs35\i\f6\cf13\lang1024\cs36\i0 single}, {\cs35\i\f6\cf13\lang1024\cs36\i0 double}\}\par\pard +\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 StringLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024'} +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} {\cs31\b\f5\cf2\lang1024'}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs31\b\f5\cf2\lang1024"} {\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} +{\cs31\b\f5\cf2\lang1024"}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 S +emantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024 +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringLiteral}] : + {\cs42\scaps\f0\cf6\lang1024 String}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024'} +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single} {\cs31\b\f5\cf2\lang1024'}] = +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 single}] +\par{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringLiteral} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024"} +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double} {\cs31\b\f5\cf2\lang1024"}] = +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringChars\super\cs36\i0 double}] +\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} {\cs31\b\f5\cf2\lang1024\\} +{\cs35\i\f6\cf13\lang1024 ShortOctalEscape}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} {\cs35\i\f6\cf13\lang1024 PlainStringChar} +\par|\tab{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs37 Quote}\par|\tab +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} +{\cs31\b\f5\cf2\lang1024\\} {\cs35\i\f6\cf13\lang1024 OrdinaryEscape}\par\pard\plain\s13\fi-1440 +\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PlainStringChar} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AnyCharacter} {\b except} {\cs31\b\f5\cf2\lang1024'} | +{\cs31\b\f5\cf2\lang1024"} | {\cs31\b\f5\cf2\lang1024\\} | {\cs35\i\f6\cf13\lang1024 OctalDigit} | +{\cs35\i\f6\cf13\lang1024 LineTerminator}\par +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 single} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024"}\par +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 double} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024'}\par +\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20 +\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote}] : +{\cs42\scaps\f0\cf6\lang1024 String}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote}]\line = +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} +]\par{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 StringChars{\super\cs37 Quote}\b0\i0\sub 1} {\cs31\b\f5\cf2\lang1024\\} +{\cs35\i\f6\cf13\lang1024 ShortOctalEscape}]\line = {\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 StringChars{\super\cs37 Quote}\b0\i0\sub 1}] +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 ShortOctalEscape}]{\b]}\par\pard +\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} +] : {\cs42\scaps\f0\cf6\lang1024 String}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \u171\'C7empty\u187\'C8] = +\ldblquote\rdblquote\par{\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} {\cs35\i\f6\cf13\lang1024 PlainStringChar}] +\line = {\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote}] +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 PlainStringChar}]{\b]}\par +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs37 Quote}]\line = +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote}] +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs37 Quote} +]{\b]}\par{\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars{\super\cs37 Quote}\b0\i0\sub 1} +{\cs35\i\f6\cf13\lang1024 OctalDigit}]\line = {\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars{\super\cs37 Quote}\b0\i0\sub 1}] +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 OctalDigit}]{\b]}\par +{\cs46\f7\cf12\lang1024 StringValue}[{\cs35\i\f6\cf13\lang1024 OrdinaryStringChars\super\cs37 Quote} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote} {\cs31\b\f5\cf2\lang1024\\} +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape}]\line = {\cs46\f7\cf12\lang1024 StringValue}[ +{\cs35\i\f6\cf13\lang1024 StringChars\super\cs37 Quote}] +{\field{\*\fldinst SYMBOL 58 \\f "Zapf Dingbats" \\s 10}{\fldrslt\f8\fs20}} {\b[} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 OrdinaryEscape}]{\b]}\par\pard +\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 PlainStringChar}] : +{\cs42\scaps\f0\cf6\lang1024 Character} = {\cs35\i\f6\cf13\lang1024 PlainStringChar}\par +{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs37 Quote}] : +{\cs42\scaps\f0\cf6\lang1024 Character}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 single} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024"}] = +\lquote{\cs31\b\f5\cf2\lang1024"}\rquote\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 PlainStringQuote\super\cs36\i0 double} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024'}] = +\lquote{\cs31\b\f5\cf2\lang1024'}\rquote\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b +\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 OrdinaryEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 StringCharEscape}\par|\tab{\cs35\i\f6\cf13\lang1024 FullOctalEscape}\par| +\tab{\cs35\i\f6\cf13\lang1024 HexEscape}\par|\tab{\cs35\i\f6\cf13\lang1024 UnicodeEscape}\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 StringNonEscape}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 StringNonEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 NonTerminator} {\b except} {\cs35\i\f6\cf13\lang1024 OctalDigit} | +{\cs31\b\f5\cf2\lang1024 x} | {\cs31\b\f5\cf2\lang1024 u} | {\cs31\b\f5\cf2\lang1024'} | +{\cs31\b\f5\cf2\lang1024"} | {\cs31\b\f5\cf2\lang1024\\} | {\cs31\b\f5\cf2\lang1024 b} | +{\cs31\b\f5\cf2\lang1024 f} | {\cs31\b\f5\cf2\lang1024 n} | {\cs31\b\f5\cf2\lang1024 r} | +{\cs31\b\f5\cf2\lang1024 t} | {\cs31\b\f5\cf2\lang1024 v}\par\pard\plain\s11\sb60\keep\keepn +\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape}] : {\cs42\scaps\f0\cf6\lang1024 Character}\par\pard\plain +\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 StringCharEscape}] = {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 StringCharEscape}]\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 FullOctalEscape}] = {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 FullOctalEscape}]\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 HexEscape}] = {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 HexEscape}]\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 UnicodeEscape}] = {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 UnicodeEscape}]\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 OrdinaryEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 StringNonEscape}] = {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 StringNonEscape}]\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar +\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 StringNonEscape}] : {\cs42\scaps\f0\cf6\lang1024 Character} = +{\cs35\i\f6\cf13\lang1024 StringNonEscape}\par\pard\plain\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b +\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs31\b\f5\cf2\lang1024'}\par|\tab +{\cs31\b\f5\cf2\lang1024"}\par|\tab{\cs31\b\f5\cf2\lang1024\\}\par|\tab{\cs31\b\f5\cf2\lang1024 b} +\par|\tab{\cs31\b\f5\cf2\lang1024 f}\par|\tab{\cs31\b\f5\cf2\lang1024 n}\par|\tab +{\cs31\b\f5\cf2\lang1024 r}\par|\tab{\cs31\b\f5\cf2\lang1024 t}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs31\b\f5\cf2\lang1024 v}\par\pard\plain +\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60 +\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 StringCharEscape}] : +{\cs42\scaps\f0\cf6\lang1024 Character}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024'}] = +\lquote{\cs31\b\f5\cf2\lang1024'}\rquote\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024"}] = +\lquote{\cs31\b\f5\cf2\lang1024"}\rquote\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024\\}] = + \lquote{\cs31\b\f5\cf2\lang1024\\}\rquote\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 b}] = + \lquote{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7BS\u187\'C8}\rquote\par +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 f}] = + \lquote{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7FF\u187\'C8}\rquote\par +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 n}] = + \lquote{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7LF\u187\'C8}\rquote\par +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 r}] = + \lquote{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7CR\u187\'C8}\rquote\par +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 t}] = + \lquote{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7TAB\u187\'C8}\rquote\par +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 StringCharEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 v}] = + \lquote{\cs31\b\f5\cf2\lang1024\cs32\b0\f0\cf9\u171\'C7VT\u187\'C8}\rquote\par\pard\plain\s11\sb60 +\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Syntax\par\pard\plain\s12\fi-1440\li1800\sb120\keep +\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ShortOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 OctalDigit} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ZeroToThree} {\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 FullOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 FourToSeven} {\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ZeroToThree} {\cs35\i\f6\cf13\lang1024 OctalDigit} +{\cs35\i\f6\cf13\lang1024 OctalDigit}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ZeroToThree} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 0} | +{\cs31\b\f5\cf2\lang1024 1} | {\cs31\b\f5\cf2\lang1024 2} | {\cs31\b\f5\cf2\lang1024 3}\par +{\cs35\i\f6\cf13\lang1024 FourToSeven} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 4} | +{\cs31\b\f5\cf2\lang1024 5} | {\cs31\b\f5\cf2\lang1024 6} | {\cs31\b\f5\cf2\lang1024 7}\par +{\cs35\i\f6\cf13\lang1024 HexEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 x} +{\cs35\i\f6\cf13\lang1024 HexDigit} {\cs35\i\f6\cf13\lang1024 HexDigit}\par +{\cs35\i\f6\cf13\lang1024 UnicodeEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 u} +{\cs35\i\f6\cf13\lang1024 HexDigit} {\cs35\i\f6\cf13\lang1024 HexDigit} +{\cs35\i\f6\cf13\lang1024 HexDigit} {\cs35\i\f6\cf13\lang1024 HexDigit}\par\pard\plain\s11\sb60\keep +\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057 Semantics\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 ShortOctalEscape}] : {\cs42\scaps\f0\cf6\lang1024 Character}\par\pard +\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 CharacterValue} +[{\cs35\i\f6\cf13\lang1024 ShortOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 OctalDigit}] = {\cs44\i\f0\cf11\lang1024 codeToCharacter}( +{\cs46\f7\cf12\lang1024 OctalValue}[{\cs35\i\f6\cf13\lang1024 OctalDigit}])\par +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 ShortOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ZeroToThree} {\cs35\i\f6\cf13\lang1024 OctalDigit}]\line = +{\cs44\i\f0\cf11\lang1024 codeToCharacter}(8*{\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 ZeroToThree}] + {\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit}])\par\pard\plain\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0 +\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 FullOctalEscape}] : {\cs42\scaps\f0\cf6\lang1024 Character}\par\pard\plain +\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 FullOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 FourToSeven} {\cs35\i\f6\cf13\lang1024 OctalDigit}]\line = +{\cs44\i\f0\cf11\lang1024 codeToCharacter}(8*{\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 FourToSeven}] + {\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit}])\par{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 FullOctalEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 ZeroToThree} {\cs35\i\f6\cf13\lang1024 OctalDigit\b0\i0\sub 1} +{\cs35\i\f6\cf13\lang1024 OctalDigit\b0\i0\sub 2}]\line = +{\cs44\i\f0\cf11\lang1024 codeToCharacter}(\line 64*{\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 ZeroToThree}] + 8*{\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit\b0\i0\sub 1}] + {\cs46\f7\cf12\lang1024 OctalValue}[ +{\cs35\i\f6\cf13\lang1024 OctalDigit\b0\i0\sub 2}])\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 DigitValue}[ +{\cs35\i\f6\cf13\lang1024 ZeroToThree}] : {\cs42\scaps\f0\cf6\lang1024 Integer} = +{\cs44\i\f0\cf11\lang1024 digitValue}({\cs35\i\f6\cf13\lang1024 ZeroToThree})\par{\cs40\b\f0 action} + {\cs46\f7\cf12\lang1024 DigitValue}[{\cs35\i\f6\cf13\lang1024 FourToSeven}] : +{\cs42\scaps\f0\cf6\lang1024 Integer} = {\cs44\i\f0\cf11\lang1024 digitValue}( +{\cs35\i\f6\cf13\lang1024 FourToSeven})\par{\cs40\b\f0 action} +{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 HexEscape}] : +{\cs42\scaps\f0\cf6\lang1024 Character}\par\pard\plain\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20 +\lang1024{\cs46\f7\cf12\lang1024 CharacterValue}[{\cs35\i\f6\cf13\lang1024 HexEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 x} +{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 2}] +\line = {\cs44\i\f0\cf11\lang1024 codeToCharacter}(16*{\cs46\f7\cf12\lang1024 HexValue}[ +{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 1}] + {\cs46\f7\cf12\lang1024 HexValue}[ +{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 2}])\par\pard\plain\s20\li180\sb60\sa60\keep +\nowidctlpar\hyphpar0\fs20\lang1024{\cs40\b\f0 action} {\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 UnicodeEscape}] : {\cs42\scaps\f0\cf6\lang1024 Character}\par\pard\plain +\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024{\cs46\f7\cf12\lang1024 CharacterValue}[ +{\cs35\i\f6\cf13\lang1024 UnicodeEscape} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs31\b\f5\cf2\lang1024 u} +{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 1} {\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 2} +{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 3} {\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 4}] +\line = {\cs44\i\f0\cf11\lang1024 codeToCharacter}(\line 4096* +{\cs46\f7\cf12\lang1024 HexValue}[{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 1}] + 256* +{\cs46\f7\cf12\lang1024 HexValue}[{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 2}] + 16* +{\cs46\f7\cf12\lang1024 HexValue}[{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 3}] +\line +{\cs46\f7\cf12\lang1024 HexValue}[{\cs35\i\f6\cf13\lang1024 HexDigit\b0\i0\sub 4}])\par} \ No newline at end of file diff --git a/mozilla/js2/semantics/Grammar.lisp b/mozilla/js2/semantics/Grammar.lisp new file mode 100644 index 00000000000..c5d1cc23566 --- /dev/null +++ b/mozilla/js2/semantics/Grammar.lisp @@ -0,0 +1,1183 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; LALR(1) and LR(1) grammar generator +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; ------------------------------------------------------------------------------------------------------ +;;; TERMINALSETS + +;;; A set of terminals is a bitset represented by an integer, indexed by terminal numbers. + +(deftype terminalset () 'integer) + +(defconstant *empty-terminalset* 0) + +; Return true if terminalset is empty. +(declaim (inline terminalset-empty?)) +(defun terminalset-empty? (terminalset) + (zerop terminalset)) + + +; Return true if the two terminalsets are equal. +(declaim (inline terminalset-=)) +(defun terminalset-= (terminalset1 terminalset2) + (= terminalset1 terminalset2)) + + +; Return true if the terminalset1 is a subset of (or equal to) terminalset2. +(declaim (inline terminalset-<=)) +(defun terminalset-<= (terminalset1 terminalset2) + (zerop (logandc2 terminalset1 terminalset2))) + + +; Return true if the two terminalsets are disjoint. +(declaim (inline terminalsets-disjoint)) +(defun terminalsets-disjoint (terminalset1 terminalset2) + (zerop (logand terminalset1 terminalset2))) + + +; Merge two sets of lookaheads sorted by increasing terminal numbers, eliminating +; duplicates. Return the combined set. +(declaim (inline terminalset-union)) +(defun terminalset-union (terminalset1 terminalset2) + (logior terminalset1 terminalset2)) + + +; Return a unique serial number for the given terminal. +(declaim (inline terminal-number)) +(defun terminal-number (grammar terminal) + (assert-non-null (gethash terminal (grammar-terminal-numbers grammar)) + "Can't find terminal ~S" terminal)) + + +; Return true if the terminal is present in the terminalset. +(defun terminal-in-terminalset (grammar terminal terminalset) + (logbitp (terminal-number grammar terminal) terminalset)) + + +; Return a one-element terminalset containing the given terminal. +(declaim (inline make-terminalset)) +(defun make-terminalset (grammar terminal) + (ash 1 (terminal-number grammar terminal))) + + +; Call f on every terminal in the terminalset in reverse order. +(defun map-terminalset-reverse (f grammar terminalset) + (do () + ((zerop terminalset)) + (let ((last (1- (integer-length terminalset)))) + (funcall f (svref (grammar-terminals grammar) last)) + (setq terminalset (- terminalset (ash 1 last)))))) + + +; Return a list containing the terminals in the terminalset. +(defun terminalset-list (grammar terminalset) + (let ((terminals nil)) + (map-terminalset-reverse #'(lambda (terminal) (push terminal terminals)) + grammar terminalset) + terminals)) + + +(defun print-terminalset (grammar terminalset &optional (stream t)) + (pprint-fill stream (terminalset-list grammar terminalset) nil)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; ACTIONS + +;;; An action describes one semantic function associated with a production. +;;; The action code is a lisp form that evaluates to a function f that takes +;;; the following arguments: +;;; the values returned by the rhs's first grammar symbol's actions, in order of the +;;; actions of that grammar symbol; +;;; the values returned by the rhs's second grammar symbol's actions, in order of the +;;; actions of that grammar symbol; +;;; ... +;;; the values returned by the rhs's last grammar symbol's actions, in order of the +;;; actions of that grammar symbol. +;;; Function f returns one value, which is the result of this action. +(defstruct (action (:constructor make-action (expr)) + (:predicate action?)) + (expr nil :read-only t) ;The unparsed source expression that defines the action + (code nil)) ;The generated lisp source code that performs the action + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GENERALIZED PRODUCTIONS + +;;; A general-production is a common base class for the production and generic-production classes. +(defstruct (general-production (:constructor nil) (:copier nil) (:predicate general-production?)) + (lhs nil :type general-nonterminal :read-only t) ;The general-nonterminal on the left-hand side of this general-production + (rhs nil :type list :read-only t) ;List of general grammar symbols to which that general-nonterminal expands + (name nil :read-only t)) ;This general-production's name that will be used to name the parse tree node + + +; If general-production is a generic-production, return its list of productions; +; if general-production is a production, return it in a one-element list. +(defun general-production-productions (general-production) + (if (production? general-production) + (list general-production) + (generic-production-productions general-production))) + + +; Emit a markup paragraph for the left-hand-side of a general production. +(defun depict-general-production-lhs (markup-stream lhs-general-nonterminal) + (depict-paragraph (markup-stream ':grammar-lhs) + (depict-general-nonterminal markup-stream lhs-general-nonterminal) + (depict markup-stream " " ':derives-10))) + + +; Emit a markup paragraph for the right-hand-side of a general production. +; first is true if this is the first production in a rule. +; last is true if this is the last production in a rule. +(defun depict-general-production-rhs (markup-stream general-production first last) + (depict-paragraph (markup-stream (if last ':grammar-rhs-last ':grammar-rhs)) + (if first + (depict markup-stream ':tab3) + (depict markup-stream "|" ':tab2)) + (let ((rhs (general-production-rhs general-production))) + (depict-list markup-stream #'depict-general-grammar-symbol rhs + :separator " " + :empty '(:left-angle-quote "empty" :right-angle-quote))))) + + +; Emit the general production, including both its left and right-hand sides. +; Include serial number subscripts on all rhs grammar symbols that both +; appear more than once in the rhs or appear in the lhs; and +; have symbols that are present in the symbols-with-subscripts list. +(defun depict-general-production (markup-stream general-production &optional symbols-with-subscripts) + (let ((lhs (general-production-lhs general-production)) + (rhs (general-production-rhs general-production))) + (depict-general-nonterminal markup-stream lhs) + (depict markup-stream " " ':derives-10) + (if rhs + (let ((counts-hash (make-hash-table :test *grammar-symbol-=*))) + (when symbols-with-subscripts + (dolist (symbol symbols-with-subscripts) + (setf (gethash symbol counts-hash) 0)) + (dolist (general-grammar-symbol (cons lhs rhs)) + (let ((symbol (general-grammar-symbol-symbol general-grammar-symbol))) + (when (gethash symbol counts-hash) + (incf (gethash symbol counts-hash))))) + (maphash #'(lambda (symbol count) + (assert-true (> count 0)) + (if (> count 1) + (setf (gethash symbol counts-hash) 0) + (remhash symbol counts-hash))) + counts-hash)) + (dolist (general-grammar-symbol rhs) + (let* ((symbol (general-grammar-symbol-symbol general-grammar-symbol)) + (subscript (and (gethash symbol counts-hash) (incf (gethash symbol counts-hash))))) + (depict-space markup-stream) + (depict-general-grammar-symbol markup-stream general-grammar-symbol subscript)))) + (depict markup-stream " " ':left-angle-quote "empty" :right-angle-quote)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; PRODUCTIONS + +;;; A production describes the expansion of a nonterminal (the lhs) into +;;; a string of zero or more grammar symbols (the rhs). +;;; Each production has a unique number. Earlier productions have smaller numbers. +;;; There is exactly one production structure for a given production, so eq can be +;;; used to test for production equality. +;;; +;;; The evaluator is a lisp form that evaluates to a function f that takes one argument -- +;;; the old state of the parser's value stack -- and returns the new state of that stack. +(defstruct (production (:include general-production (lhs nil :type nonterminal :read-only t)) + (:constructor make-production (lhs rhs name rhs-length number)) + (:copier nil) (:predicate production?)) + (rhs-length nil :type integer :read-only t) ;Number of grammar symbols in the rhs + (number nil :type integer :read-only t) ;This production's serial number + ;The following fields are used for the action generator. + (actions nil :type list) ;List of (action-symbol . action-or-nil) in the same order as the action-symbols + ; ; are listed in the grammar's action-signatures hash table for this lhs + (n-action-args nil :type (or null integer)) ;Total size of the action-signatures of all grammar symbols in the rhs + (evaluator-code nil) ;The lisp evaluator's source code + (evaluator nil :type (or null function))) ;The lisp evaluator of the action + + +; Return a list of terminals in this production's rhs. +; The list may contain duplicates. +(declaim (inline production-terminals)) +(defun production-terminals (production) + (remove-if (complement #'terminal?) (production-rhs production))) + + +; Return a list of nonterminals in this production's rhs. +; The list may contain duplicates. +(declaim (inline production-nonterminals)) +(defun production-nonterminals (production) + (remove-if (complement #'nonterminal?) (production-rhs production))) + + +(defun print-production (production &optional (stream t)) + (format stream "~<~W -> ~:I~_~:[ ~;~:*~{~W ~:_~}~]~:> ~:_[~W]" + (list (production-lhs production) (production-rhs production)) + (production-name production))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GENERIC PRODUCTIONS + +;;; A generic production describes a set of productions generated by instantiating a +;;; production with a generic nonterminal on the lhs. All productions in this set are +;;; generated by replacing the arguments in the lhs nonterminal with attributes and making +;;; corresponding replacements on the production's rhs. All productions in this set share +;;; the same name. Note that this set might not cover all productions with the same +;;; nonterminal symbol on the lhs because some parameters of the lhs nonterminal might be +;;; originally listed as attributes and not arguments. +;;; A generic production is not a production and does not have a number or actions. + +(defstruct (generic-production (:include general-production (lhs nil :type generic-nonterminal :read-only t)) + (:constructor make-generic-production (lhs rhs name productions)) + (:copier nil) + (:predicate generic-production?)) + (productions nil :type list :read-only t)) ;List of instantiations of this generic production + + +; Return a new generic-production or production with the given nonterminal argument replaced by the given attribute. +; If the resulting production isn't generic, an existing attributed production is returned. +(defun generic-production-substitute (grammar-parametrization attribute argument generic-production) + (let ((new-lhs (general-grammar-symbol-substitute attribute argument (generic-production-lhs generic-production))) + (productions (generic-production-productions generic-production))) + (if (generic-nonterminal? new-lhs) + (make-generic-production + new-lhs + (mapcar #'(lambda (rhs-general-grammar-symbol) + (general-grammar-symbol-substitute attribute argument rhs-general-grammar-symbol)) + (generic-production-rhs generic-production)) + (generic-production-name generic-production) + (remove-if #'(lambda (production) + (not (general-nonterminal-is-instance? grammar-parametrization new-lhs (production-lhs production)))) + productions)) + + (assert-non-null (find new-lhs productions :key #'production-lhs :test #'eq))))) + + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GENERALIZED RULES + +;;; A general-rule is a common base class for the rule and generic-rule classes. +(defstruct (general-rule (:constructor nil) (:copier nil) (:predicate general-rule?)) + (productions nil :type list)) ;The list of all general productions for this rule's general nonterminal lhs + + +; Return this rule's lhs (which is the same for all productions). +(declaim (inline general-rule-lhs)) +(defun general-rule-lhs (general-rule) + (general-production-lhs (first (general-rule-productions general-rule)))) + + +; Emit markup paragraphs for the grammar general rule. +; If the rule is short enough (only one production), emit the rule on one line. +(defun depict-general-rule (markup-stream general-rule) + (depict-block-style (markup-stream ':grammar-rule) + (let ((general-productions (general-rule-productions general-rule))) + (assert-true general-productions) + (if (cdr general-productions) + (labels + ((emit-general-productions (general-productions first) + (let ((general-production (first general-productions)) + (rest (rest general-productions))) + (depict-general-production-rhs markup-stream general-production first (endp rest)) + (when rest + (emit-general-productions rest nil))))) + (depict-general-production-lhs markup-stream (general-rule-lhs general-rule)) + (emit-general-productions general-productions t)) + (depict-paragraph (markup-stream ':grammar-lhs-last) + (depict-general-production markup-stream (first general-productions))))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; RULES + +;;; A rule is the set of all productions with the same lhs nonterminal. +;;; There is exactly one rule structure for a given nonterminal lhs, so eq can be +;;; used to test for rule equality. +(defstruct (rule (:include general-rule (productions nil :type list :read-only t)) + (:constructor make-rule (productions)) + (:copier nil) + (:predicate rule?)) + ;productions ;The list of all productions for this rule's nonterminal lhs + (number nil :type (or null integer)) ;This nonterminal's serial number + (derives-epsilon nil :type bool) ;True if some direct or indirect expansion of this nonterminal can return epsilon + (initial-terminals *empty-terminalset* :type terminalset)) ;Set of all terminals that can begin some expansion of this nonterminal + + +; Return a list of nonterminals in this rule's rhs. +; The list may contain duplicates. +(defun rule-nonterminals (rule) + (mapcan #'(lambda (production) (copy-list (production-nonterminals production))) + (rule-productions rule))) + + +; Return a unique serial number for the given nonterminal. +(defun nonterminal-number (grammar nonterminal) + (rule-number (assert-non-null (gethash nonterminal (grammar-rules grammar)) + "Can't find nonterminal ~S" nonterminal))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GENERIC RULES + +;;; A generic rule is the set of all generic productions with the same lhs generic nonterminal. +(defstruct (generic-rule (:include general-rule) + (:constructor make-generic-rule (productions)) + (:copier nil) + (:predicate generic-rule?))) +; productions ;The list of all generic-productions for this rule's generic nonterminal lhs + + +; Return a new generic-rule with the given nonterminal argument replaced by the given attribute. +; The resulting rule must still be generic -- it is an error to call this so that it would result +; in a rule with a plain or attributed lhs nonterminal. +(defun generic-rule-substitute (grammar-parametrization attribute argument generic-rule) + (make-generic-rule + (mapcar #'(lambda (generic-production) + (assert-type (generic-production-substitute grammar-parametrization attribute argument generic-production) + generic-production)) + (generic-rule-productions generic-rule)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR ITEMS + +;;; An item is a tuple , where prod is a production and +;;; position is an integer between 0 and length(rhs(production)), inclusive. +;;; The first position elements of production's rhs are called "seen" +;;; and the rest are called "unseen". +;;; There is exactly one item structure for a given combination, +;;; so eq can be used to test for item equality. +(defstruct (item (:constructor allocate-item (production dot unseen number next)) + (:copier nil) + (:predicate item?)) + (production nil :type production :read-only t) ;The production to which this item corresponds + (dot nil :type integer :read-only t) ;List of grammar symbols to which that nonterminal expands + (unseen nil :type list :read-only t) ;Portion of production's rhs to the right of the dot + (number nil :type integer :read-only t) ;Unique number (i.e. different from any other item's number) + (next nil :type item :read-only t)) ;The item with the same production but dot shifted one to the right; nil if unseen is nil + + +; Return the first grammar symbol to the right of the item's dot or nil if +; the dot is already at the rightmost position. +(declaim (inline item-next-symbol)) +(defun item-next-symbol (item) + (first (item-unseen item))) + + +; Return the lhs of the item's production. +(declaim (inline item-lhs)) +(defun item-lhs (item) + (production-lhs (item-production item))) + + +; Make an item with the given production and dot location (which must be an integer +; between 0 and length(rhs(production)), inclusive. Reuse an existing item in the +; grammar if possible. +(defun make-item (grammar production dot) + (let* ((items-hash (grammar-items-hash grammar)) + (key (cons production dot)) + (existing-item (gethash key items-hash))) + (or + existing-item + (progn + (assert-true (<= dot (length (production-rhs production)))) + (let* ((unseen (nthcdr dot (production-rhs production))) + (next (and unseen (make-item grammar production (1+ dot)))) + (number (+ (* (production-number production) (1+ (grammar-max-production-length grammar))) dot))) + (setf (gethash key items-hash) + (allocate-item production dot unseen number next))))))) + + +(defun print-item (item &optional (stream t)) + (let ((production (item-production item))) + (format stream "~W -> ~:_" (production-lhs production)) + (pprint-logical-block (stream (production-rhs production)) + (do ((n (item-dot item) (1- n)) + (first t)) + () + (when (zerop n) + (if first + (setq first nil) + (format stream " ~:_")) + (write-char #\. stream)) + (pprint-exit-if-list-exhausted) + (if first + (setq first nil) + (format stream " ~:_")) + (write (pprint-pop) :stream stream))))) + +(defmethod print-object ((item item) stream) + (print-unreadable-object (item stream) + (format stream "item ~@_") + (print-item item stream))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR LAITEMS + +;;; A laitem is an item with associated lookahead information. +;;; Unlike items, laitem structures are not shared among the states. +(defstruct (laitem (:constructor allocate-laitem (grammar item lookaheads)) + (:copier nil) + (:predicate laitem?)) + (grammar nil :type grammar :read-only t) ;The grammar to which this laitem belongs + (item nil :type item :read-only t) ;The item to which this laitem corresponds + (lookaheads nil :type terminalset) ;Set of lookahead terminals + (propagates nil :type list)) ;List of laitems to which lookaheads propagate from this laitem (see note below) +;When parsing a LALR(1) grammar, propagates is the list of all laitems (in this and other states) +;to which lookaheads propagate from this laitem. +;When parsing a LR(1) grammar, propagates is the list of all laitems to which lookaheads propagate from this laitem +;without following a shift transition. Such laitems must necessarily be in the same state. In the LR(1) case each +;laitem listed in the propagates list must come after this laitem in this state's laitems list. + + +(defvar *lookahead-print-column* 70) + +(defun print-laitem (laitem &optional (stream t)) + (print-item (laitem-item laitem) stream) + (format stream " ~vT~_" *lookahead-print-column*) + (pprint-logical-block (stream nil :prefix "{" :suffix "}") + (print-terminalset (laitem-grammar laitem) (laitem-lookaheads laitem) stream))) + +(defmethod print-object ((laitem laitem) stream) + (print-unreadable-object (laitem stream) + (format stream "laitem ~@_") + (print-laitem laitem stream))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR TRANSITIONS + +;;; A grammar transition is one of the following: +;;; (:shift state) ;Shift and go to the given state +;;; (:reduce production) ;Reduce by the given production +;;; (:accept) ;Accept the input + +(declaim (inline make-shift-transition)) +(defun make-shift-transition (state) + (assert-type state state) + (list :shift state)) + +(declaim (inline make-reduce-transition)) +(defun make-reduce-transition (production) + (assert-type production production) + (list :reduce production)) + +(declaim (inline make-accept-transition)) +(defun make-accept-transition () + (list :accept)) + + +(declaim (inline transition-kind)) +(defun transition-kind (transition) + (first transition)) + +(declaim (inline transition-state)) +(defun transition-state (transition) + (assert-true (eq (first transition) :shift)) + (second transition)) + +(defun (setf transition-state) (state transition) + (assert-true (eq (first transition) :shift)) + (setf (second transition) state)) + +(declaim (inline transition-production)) +(defun transition-production (transition) + (assert-true (eq (first transition) :reduce)) + (second transition)) + + +(defun print-transition (transition stream) + (case (transition-kind transition) + (:shift (format stream "shift S~D" (state-number (transition-state transition)))) + (:reduce (format stream "reduce ~W" (production-name (transition-production transition)))) + (:accept (format stream "accept")) + (t (error "Bad transition: ~S" transition)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR STATES + +(defstruct (state (:constructor allocate-state (number kernel laitems)) + (:copier nil) + (:predicate state?)) + (number nil :type integer :read-only t) ;Serial number of the state + (kernel nil :type list :read-only t) ;List of kernel items in order of increasing item-number values + (laitems nil :type list :read-only t) ;List of laitems (topologically sorted by the propagates relation when parsing LR(1)) + (transitions nil :type list) ;List of (terminal . transition) + (gotos nil :type list)) ;List of (nonterminal . state) + + +; If all outgoing transitions from the state are the same reduction, return that +; reduction's production; otherwise return nil. +(defun forwarding-state-production (state) + (let ((transitions (state-transitions state))) + (and transitions + (let ((transition (cdar transitions))) + (and (eq (transition-kind transition) :reduce) + (null (rassoc transition (cdr transitions) :test (complement #'equal))) + (transition-production transition)))))) + + +; Return the laitem corresponding to the given item in the given state. +(declaim (inline state-laitem)) +(defun state-laitem (state item) + (assert-non-null (find item (state-laitems state) :key #'laitem-item) + "State ~S doesn't have item ~S" state item)) + + +; Return true if this laitem is in the state's kernel either because the dot +; is not at the leftmost position or because the lhs is the start nonterminal. +(defun laitem-in-kernel? (laitem) + (let ((item (laitem-item laitem))) + (or (not (zerop (item-dot item))) + (grammar-symbol-= (item-lhs item) *start-nonterminal*)))) + + +; Return the state's list of laitems sorted by the criteria below. +; Criterion 1 is the major sorting order, criterion 2 decides the sorting order of items +; equal by criterion 1, etc. +; 1. laitems whose lhs matches the lhs of any kernel item in this state come before +; laitems whose lhs does not match the lhs of any kernel item in this state. +; 2. laitems are sorted by the number of their lhs nonterminal. +; 3. laitems in this state's kernel come before laitems not in the kernel. +; 4. laitems earlier in (state-laitems state) come before laitems later in (state-laitems state). +(defun laitems-sorted-nicely (state) + (let ((laitems (copy-list (state-laitems state)))) + (when laitems + (let ((grammar (laitem-grammar (first laitems)))) + (labels + ((lhs-matches-some-kernel-item (lhs-nonterminal) + (member lhs-nonterminal (state-kernel state) :test *grammar-symbol-=* :key #'item-lhs)) + (laitem-< (laitem1 laitem2) + (let* ((item1 (laitem-item laitem1)) + (item2 (laitem-item laitem2)) + (lhs1 (item-lhs item1)) + (lhs2 (item-lhs item2)) + (lhs-number-1 (nonterminal-number grammar lhs1)) + (lhs-number-2 (nonterminal-number grammar lhs2)) + (item1-lhs-matches-some-kernel-item (lhs-matches-some-kernel-item lhs1)) + (item2-lhs-matches-some-kernel-item (lhs-matches-some-kernel-item lhs2))) + (cond + ((and item1-lhs-matches-some-kernel-item (not item2-lhs-matches-some-kernel-item)) t) + ((and (not item1-lhs-matches-some-kernel-item) item2-lhs-matches-some-kernel-item) nil) + ((< lhs-number-1 lhs-number-2) t) + ((> lhs-number-1 lhs-number-2) nil) + (t (let ((item1-in-kernel (laitem-in-kernel? laitem1)) + (item2-in-kernel (laitem-in-kernel? laitem2))) + (cond + ((and item1-in-kernel (not item2-in-kernel)) t) + ((and (not item1-in-kernel) item2-in-kernel) nil) + (t (dolist (state-laitem (state-laitems state) nil) + (cond + ((eq state-laitem laitem2) (return nil)) + ((eq state-laitem laitem1) (return t)))))))))))) + (stable-sort laitems #'laitem-<)))))) + + +(defun print-state (state &optional (stream t)) + (pprint-logical-block (stream nil) + (format stream "S~D:" (state-number state)) + (pprint-indent :block 2 stream) + (pprint-newline :mandatory stream) + (pprint-logical-block (stream (laitems-sorted-nicely state)) + (do ((first t nil)) + () + (pprint-exit-if-list-exhausted) + (unless first + (pprint-newline :mandatory stream)) + (let ((laitem (pprint-pop))) + (pprint-logical-block (stream nil) + (unless (laitem-in-kernel? laitem) + (write-string " " stream)) + (pprint-indent :block 4 stream) + (print-laitem laitem stream))))) + (when (state-transitions state) + (pprint-newline :mandatory stream) + (pprint-logical-block (stream (collect-equivalences (state-transitions state) :test #'equal) :prefix "Transitions: ") + (loop + (pprint-exit-if-list-exhausted) + (let ((transition-cons (pprint-pop))) + (pprint-logical-block (stream nil) + (pprint-fill stream (car transition-cons) nil) + (format stream " ~2I~_=> " (car transition-cons)) + (print-transition (cdr transition-cons) stream)) + (format stream " ~:_"))))) + (when (state-gotos state) + (pprint-newline :mandatory stream) + (pprint-logical-block (stream (state-gotos state) :prefix "Gotos: ") + (loop + (pprint-exit-if-list-exhausted) + (let ((goto-cons (pprint-pop))) + (format stream "~@<~W ~:_=> ~:_S~D~:> ~:_" (car goto-cons) (state-number (cdr goto-cons))))))))) + + +(defmethod print-object ((state state) stream) + (print-unreadable-object (state stream) + (format stream "state S~D" (state-number state)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; PARAMETER TREES + +;;; A parameter tree describes which nonterminal parameters are generic and which are specific in all +;;; productions derived from the same nonterminal symbol. The tree has as many levels as there are +;;; parameters for that nonterminal symbol. A level is generic if it is generic in all applicable +;;; productions; otherwise it is specific. +;;; +;;; The parameter tree (and each of its subtrees) can have one of three forms: +;;; (:rule ) +;;; if the generic nonterminal has no remaining parameters; +;;; (:argument ) +;;; if the first remaining nonterminal parameter is an argument in all productions seen so far; +;;; (:attributes ( . ) ( . ) ...) +;;; if the first remaining nonterminal parameter can be one of several attributes in productions seen so far; +;;; if argument-or-nil is not nil, it is an argument that includes all of the provided attributes. +;;; +;;; The parameter tree (and each of its subtrees) is mutable and updated in place. +;;; + + +; Create and return an initial parameter tree for the given remaining parameters +; of the general-production. +(defun make-parameter-subtree (grammar parameters general-production) + (cond + (parameters + (let ((parameter (first parameters)) + (subtree (make-parameter-subtree grammar (rest parameters) general-production))) + (if (nonterminal-argument? parameter) + (list ':argument parameter subtree) + (list ':attributes nil (cons parameter subtree))))) + ((production? general-production) + (list ':rule (grammar-rule grammar (production-lhs general-production)))) + (t + (assert-true (generic-production? general-production)) + (list ':rule (make-generic-rule (list general-production)))))) + + +; Create and return an initial parameter tree for the general-production. +(defun make-parameter-tree (grammar general-production) + (make-parameter-subtree grammar + (general-nonterminal-parameters (general-production-lhs general-production)) + general-production)) + + +; The parameter subtree has kind :argument at its top level. Convert it in place +; into kind :attributes. +(defun parameter-subtree-divide-argument (grammar parameter-subtree) + (let ((argument (second parameter-subtree)) + (argument-subtree (third parameter-subtree))) + (labels + ((substitute-argument-with (attribute subtree) + (ecase (first subtree) + (:rule + (let* ((general-rule (second subtree)) + (lhs (general-rule-lhs general-rule)) + (new-lhs (general-grammar-symbol-substitute attribute argument lhs))) + (assert-true (generic-rule? general-rule)) + (list ':rule + (if (generic-nonterminal? new-lhs) + (generic-rule-substitute grammar attribute argument general-rule) + (grammar-rule grammar new-lhs))))) + (:argument + (list ':argument + (second subtree) + (substitute-argument-with attribute (third subtree)))) + (:attributes + (list ':attributes + (second subtree) + (mapcar #'(lambda (argument-subtree-binding) + (cons (car argument-subtree-binding) + (substitute-argument-with attribute (cdr argument-subtree-binding)))) + (cddr subtree)))))) + + (create-attribute-subtree-binding (attribute) + (cons attribute (substitute-argument-with attribute argument-subtree)))) + + (setf (first parameter-subtree) ':attributes) + (setf (cddr parameter-subtree) + (mapcar #'create-attribute-subtree-binding + (grammar-parametrization-lookup-argument grammar argument)))))) + + +; Mutate the parameter subtree to add the general-production to its rules. +; parameters are the nonterminal parameters for the remaining subtree levels. +(defun parameter-subtree-add-production (grammar parameter-subtree parameters general-production) + (let ((lhs (general-production-lhs general-production)) + (kind (first parameter-subtree))) + (cond + ((eq kind :rule) + (let ((general-rule (second parameter-subtree))) + (cond + (parameters + (error "Extra nonterminal parameters ~S for ~S" parameters lhs)) + ((production? general-production) + (assert-true (member general-production (rule-productions general-rule) :test #'eq))) + (t + (assert-true (generic-production? general-production)) + (assert-true (not (member general-production (generic-rule-productions general-rule) :test #'eq))) + (setf (generic-rule-productions general-rule) + (nconc (generic-rule-productions general-rule) (list general-production))))))) + ((null parameters) + (error "Missing nonterminal parameters in ~S" lhs)) + (t + (let ((parameter (first parameters)) + (parameters-rest (rest parameters))) + (ecase kind + (:argument + (let ((argument (second parameter-subtree)) + (argument-subtree (third parameter-subtree))) + (if (nonterminal-argument? parameter) + (if (eq parameter argument) + (parameter-subtree-add-production grammar argument-subtree parameters-rest general-production) + (error "Nonterminal argument conflict: ~S vs. ~S" parameter argument)) + (progn + (parameter-subtree-divide-argument grammar parameter-subtree) + (parameter-subtree-add-production grammar parameter-subtree parameters general-production))))) + (:attributes + (let ((argument (second parameter-subtree)) + (attribute-subtree-bindings (cddr parameter-subtree))) + (if (nonterminal-argument? parameter) + (let ((argument-attributes (grammar-parametrization-lookup-argument grammar parameter))) + (labels + ((add-attribute-production (attribute-subtree-binding) + (let ((attribute (car attribute-subtree-binding))) + (unless (member attribute argument-attributes :test #'eq) + (error "Attribute ~S is not a member of argument ~S" attribute parameter)) + (parameter-subtree-add-production + grammar + (cdr attribute-subtree-binding) + parameters-rest + (generic-production-substitute grammar attribute parameter general-production))))) + (cond + ((null argument) + (mapc #'add-attribute-production attribute-subtree-bindings) + (setf (cddr parameter-subtree) + (nconc attribute-subtree-bindings + (mapcan #'(lambda (attribute) + (unless (assoc attribute attribute-subtree-bindings :test #'eq) + (list + (cons attribute + (make-parameter-subtree + grammar + parameters-rest + (generic-production-substitute grammar attribute parameter general-production)))))) + argument-attributes))) + (setf (second parameter-subtree) parameter)) + ((eq parameter argument) + (assert-true (= (length attribute-subtree-bindings) (length argument-attributes))) + (mapc #'add-attribute-production attribute-subtree-bindings)) + (t (error "Nonterminal argument conflict: ~S vs. ~S" parameter argument))))) + + (let ((attribute-subtree-binding (assoc parameter attribute-subtree-bindings :test #'eq))) + (cond + (attribute-subtree-binding + (parameter-subtree-add-production grammar (cdr attribute-subtree-binding) parameters-rest general-production)) + (argument + (error "Attribute ~S is not a member of argument ~S" parameter argument)) + (t + (setf (cddr parameter-subtree) + (nconc attribute-subtree-bindings + (list (cons parameter + (make-parameter-subtree grammar parameters-rest general-production))))))))))))))))) + + +; Mutate the parameter tree to add the general-production to its rules. +(defun parameter-tree-add-production (grammar parameter-tree general-production) + (parameter-subtree-add-production grammar + parameter-tree + (general-nonterminal-parameters (general-production-lhs general-production)) + general-production) + parameter-tree) + + +; Return a freshly consed list of all rules and generic-rules in the parameter tree. +(defun parameter-tree-general-rules (parameter-tree) + (ecase (first parameter-tree) + (:rule (list (second parameter-tree))) + (:argument (parameter-tree-general-rules (third parameter-tree))) + (:attributes + (mapcan + #'(lambda (argument-subtree-binding) + (parameter-tree-general-rules (cdr argument-subtree-binding))) + (cddr parameter-tree))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR + +(defstruct (grammar (:include grammar-parametrization) + (:constructor allocate-grammar) + (:copier nil) + (:predicate grammar?)) + (terminals nil :type simple-vector :read-only t) ;Vector of all terminals (in order of terminal numbers) + (nonterminals nil :type simple-vector :read-only t) ;Vector of all nonterminals (in a depth-first order) + (nonterminals-list nil :type list :read-only t) ;List version of the nonterminals vector + (terminal-numbers nil :type hash-table :read-only t) ;Hash table of terminal -> terminal number + (terminal-actions nil :type hash-table :read-only t) ;Hash table of terminal -> list of (action-symbol . action-function-or-nil) + (rules nil :type hash-table :read-only t) ;Hash table of nonterminal -> rule + (parameter-trees nil :type hash-table :read-only t) ;Hash table of nonterminal-symbol -> parameter-tree + (max-production-length nil :type integer :read-only t) ;Maximum number of grammar symbols on the rhs of a production + (general-productions nil :type hash-table :read-only t);Hash table of production-name -> general-production + (n-productions nil :type integer :read-only t) ;Number of productions in the grammar + ;The following fields are used for the parser. + (items-hash nil :type hash-table :read-only t) ;Hash table of (production . dot) -> item + (states nil :type list) ;List of LR(0) states (in order of state numbers) + ;The following fields are used for the action generator. + (action-signatures nil :type (or null hash-table))) ;Hash table of grammar-symbol -> list of (action-symbol . type-or-type-expr) + + +; Return a rule for the given nonterminal lhs. +(defun grammar-rule (grammar lhs) + (or (gethash lhs (grammar-rules grammar)) + (error "Can't find rule for ~S" lhs))) + + +; Return a list of general-rules that together form a partition of all productions whose lhs's +; are instances of the given lhs-general-nonterminal. +; The given lhs-general-nonterminal must have been given as the lhs for at least one general production +; source when constructing this grammar. +(defun grammar-general-rules (grammar lhs-general-nonterminal) + (if (generic-nonterminal? lhs-general-nonterminal) + (parameter-tree-general-rules (gethash (generic-nonterminal-symbol lhs-general-nonterminal) (grammar-parameter-trees grammar))) + (list (grammar-rule grammar lhs-general-nonterminal)))) + + +; Return the start production for the grammar. +(defun grammar-start-production (grammar) + (assert-non-null (first (rule-productions (grammar-rule grammar *start-nonterminal*))))) + + +; Return the user (not internal) start-symbol of the grammar. +(defun gramar-user-start-symbol (grammar) + (assert-non-null (first (production-rhs (grammar-start-production grammar))))) + + +; Return the production with the given name in the grammar. +; The returned production may be a production or a generic-production. +; Signal an error if there is no such production. +(defun grammar-general-production (grammar production-name) + (or (gethash production-name (grammar-general-productions grammar)) + (error "Production ~S not found" production-name))) + + +; Call f on each production in the grammar in an unspecified order. +(defun each-grammar-production (grammar f) + (maphash + #'(lambda (lhs rule) + (declare (ignore lhs)) + (mapc f (rule-productions rule))) + (grammar-rules grammar))) + + +; Return the starting state for the grammar. +(defun grammar-start-state (grammar) + (assert-non-null (first (grammar-states grammar)))) + + +; Return the state numbered n in the grammar. +(defun grammar-state (grammar n) + (assert-non-null (nth n (grammar-states grammar)))) + + +; Return true if symbol ==>* epsilon. +(defun symbol-derives-epsilon (grammar symbol) + (assert-type symbol grammar-symbol) + (and (nonterminal? symbol) + (rule-derives-epsilon (grammar-rule grammar symbol)))) + + +; Return the terminalset of all terminals a that satisfy +; symbol ==>* a rest, +; where rest is an arbitrary string of grammar symbols. +(defun symbol-initial-terminals (grammar symbol) + (assert-type symbol grammar-symbol) + (if (nonterminal? symbol) + (rule-initial-terminals (grammar-rule grammar symbol)) + (make-terminalset grammar symbol))) + + +; Given symbol-string, an arbitrary string of grammar symbols, +; return two values: a terminalset S and a boolean B. +; S is the terminalset of all terminals a that satisfy +; symbol-string ==>* a rest, +; where rest is an arbitrary string of grammar symbols. +; B is true if symbol-string ==>* epsilon. +(defun string-initial-terminals (grammar symbol-string) + (let ((initial-terminals *empty-terminalset*) + (derives-epsilon nil)) + (dolist (element symbol-string (setq derives-epsilon t)) + (setq initial-terminals (terminalset-union initial-terminals (symbol-initial-terminals grammar element))) + (unless (symbol-derives-epsilon grammar element) + (return))) + (values initial-terminals derives-epsilon))) + + +; Intern attributed or generic nonterminals in the production's lhs and rhs. Return the +; resulting production source. +(defun intern-production-source (grammar-parametrization production-source) + (assert-type production-source (tuple (or user-nonterminal cons) (list (or user-grammar-symbol cons)) identifier)) + (let ((production-lhs-source (first production-source)) + (production-rhs-source (second production-source)) + (production-name (third production-source))) + (if (or (consp production-lhs-source) (some #'consp production-rhs-source)) + (multiple-value-bind (lhs-nonterminal lhs-arguments) (grammar-parametrization-intern grammar-parametrization production-lhs-source) + (list lhs-nonterminal + (mapcar #'(lambda (grammar-symbol-source) + (if (consp grammar-symbol-source) + (grammar-parametrization-intern grammar-parametrization grammar-symbol-source lhs-arguments) + grammar-symbol-source)) + production-rhs-source) + production-name)) + production-source))) + + +; Make a grammar structure out of a grammar in source form. +; A grammar-source is a list of productions; each production is a list of: +; a nonterminal A (the lhs); +; a list of grammar symbols forming A's expansion (the rhs); +; a production name. +; Nonterminals in the lhs and rhs can be parametrized; in this case such a nonterminal +; is represented by a list whose first element is the name and the remaining elements are +; the arguments or attributes. Any nonterminal argument in the rhs must also be an argument +; of the lhs nonterminal. The lhs nonterminal must not have duplicate arguments. The lhs +; nonterminal can have attributes, thereby designating a specialization instead of a fully +; generic production. +(defun make-grammar (grammar-parametrization start-symbol grammar-source) + (let ((interned-grammar-source + (mapcar #'(lambda (production-source) + (intern-production-source grammar-parametrization production-source)) + grammar-source)) + (rules (make-hash-table :test #'eq)) + (terminals-hash (make-hash-table :test *grammar-symbol-=*)) + (general-productions (make-hash-table :test #'equal)) + (production-number 0) + (max-production-length 1)) + + ;Create the starting production: *start-nonterminal* ==> start-symbol + (setf (gethash *start-nonterminal* rules) + (list (make-production *start-nonterminal* (list start-symbol) nil 1 0))) + + ;Create the rest of the productions. + (flet + ((create-production (lhs rhs name) + (let ((production (make-production lhs rhs name (length rhs) (incf production-number)))) + (push production (gethash lhs rules)) + (dolist (rhs-terminal (production-terminals production)) + (setf (gethash rhs-terminal terminals-hash) t)) + production))) + + (dolist (production-source interned-grammar-source) + (let* ((production-lhs (first production-source)) + (production-rhs (second production-source)) + (production-name (third production-source)) + (lhs-arguments (general-grammar-symbol-arguments production-lhs))) + (setq max-production-length (max max-production-length (length production-rhs))) + (when (gethash production-name general-productions) + (error "Duplicate production name ~S" production-name)) + (setf (gethash production-name general-productions) + (if lhs-arguments + (let ((productions nil)) + (grammar-parametrization-each-permutation + grammar-parametrization + #'(lambda (bound-argument-alist) + (push (create-production + (instantiate-general-grammar-symbol bound-argument-alist production-lhs) + (mapcar #'(lambda (general-grammar-symbol) + (instantiate-general-grammar-symbol bound-argument-alist general-grammar-symbol)) + production-rhs) + production-name) + productions)) + lhs-arguments) + (make-generic-production production-lhs production-rhs production-name (nreverse productions))) + (create-production production-lhs production-rhs production-name)))))) + + + ;Change all values of the rules hash table to contain rule structures + ;instead of mere lists of rules. Also check that all referenced nonterminals + ;have been defined. + (maphash + #'(lambda (rule-lhs rule-productions) + (dolist (rule-production rule-productions) + (dolist (rhs-nonterminal (production-nonterminals rule-production)) + (unless (gethash rhs-nonterminal rules) + (error "Nonterminal ~S used but not defined" rhs-nonterminal)))) + (setf (gethash rule-lhs rules) + (make-rule (nreverse rule-productions)))) + rules) + + (let ((nonterminals-list (depth-first-search + *grammar-symbol-=* + #'(lambda (nonterminal) (rule-nonterminals (gethash nonterminal rules))) + *start-nonterminal*))) + (when (/= (length nonterminals-list) (hash-table-count rules)) + (let ((dead-nonterminals (set-difference (hash-table-keys rules) nonterminals-list :test *grammar-symbol-=*))) + (warn "The following nonterminals are not reachable from start: ~S" dead-nonterminals) + (setq nonterminals-list (nconc nonterminals-list dead-nonterminals)))) + + (let ((terminals (coerce (cons *end-marker* (sorted-hash-table-keys terminals-hash)) + 'simple-vector)) + (nonterminals (coerce nonterminals-list 'simple-vector))) + (dotimes (n (length terminals)) + (setf (gethash (svref terminals n) terminals-hash) n)) + (dotimes (n (length nonterminals)) + (setf (rule-number (gethash (svref nonterminals n) rules)) n)) + (let ((grammar (allocate-grammar + :argument-attributes (grammar-parametrization-argument-attributes grammar-parametrization) + :terminals terminals + :nonterminals-list nonterminals-list + :nonterminals nonterminals + :terminal-numbers terminals-hash + :terminal-actions (make-hash-table :test *grammar-symbol-=*) + :rules rules + :parameter-trees (make-hash-table :test *grammar-symbol-=*) + :max-production-length max-production-length + :general-productions general-productions + :n-productions production-number + :items-hash (make-hash-table :test #'equal)))) + + ;Compute the values of derives-epsilon and initial-terminals in each rule. + (do ((changed t)) + ((not changed)) + (setq changed nil) + (dolist (nonterminal (grammar-nonterminals-list grammar)) + (let ((rule (grammar-rule grammar nonterminal)) + (new-initial-terminals *empty-terminalset*) + (new-derives-epsilon nil)) + (dolist (production (rule-productions rule)) + (multiple-value-bind (production-initial-terminals production-derives-epsilon) + (string-initial-terminals grammar (production-rhs production)) + (setq new-initial-terminals (terminalset-union new-initial-terminals production-initial-terminals)) + (when production-derives-epsilon + (setq new-derives-epsilon t)))) + (assert-true (or new-derives-epsilon (not (rule-derives-epsilon rule)))) + (assert-true (terminalset-<= (rule-initial-terminals rule) new-initial-terminals)) + (unless (terminalset-= new-initial-terminals (rule-initial-terminals rule)) + (setf (rule-initial-terminals rule) new-initial-terminals) + (setq changed t)) + (unless (eq new-derives-epsilon (rule-derives-epsilon rule)) + (setf (rule-derives-epsilon rule) t) + (setq changed t))))) + + ;Compute the parameter-trees entries. + (let ((parameter-trees (grammar-parameter-trees grammar))) + (dolist (production-source interned-grammar-source) + (let ((general-production (gethash (third production-source) general-productions))) + (let ((lhs-general-nonterminal (general-production-lhs general-production))) + (when (or (generic-nonterminal? lhs-general-nonterminal) + (attributed-nonterminal? lhs-general-nonterminal)) + (let* ((lhs-symbol (general-grammar-symbol-symbol lhs-general-nonterminal)) + (parameter-tree (gethash lhs-symbol parameter-trees))) + (if parameter-tree + (parameter-tree-add-production grammar parameter-tree general-production) + (setf (gethash lhs-symbol parameter-trees) + (make-parameter-tree grammar general-production))))))))) + grammar))))) + + +(defvar *name-print-column* 70) + +; Print the grammar nicely. +(defun print-grammar (grammar &optional (stream t) &key (details t)) + (labels + ((print-production-number (n) + (format nil "P~D" n))) + (let ((production-number-width (length (print-production-number (grammar-n-productions grammar))))) + (pprint-logical-block (stream nil) + (format stream "Terminals: ~@_~<~@{~W ~:_~}~:>~:@_" (coerce (grammar-terminals grammar) 'list)) + (when details + (format stream "Nonterminals: ~@_~<~@{~W ~:_~}~:>~:@_" (grammar-nonterminals-list grammar))) + + ;Print the rules. + (pprint-logical-block (stream (grammar-nonterminals-list grammar)) + (pprint-exit-if-list-exhausted) + (format stream "Rules:") + (pprint-indent :block 2 stream) + (pprint-newline :mandatory stream) + (loop + (let* ((rule-lhs (pprint-pop)) + (rule (grammar-rule grammar rule-lhs))) + (pprint-logical-block (stream nil) + (pprint-logical-block (stream (rule-productions rule) :prefix (format nil "~W " rule-lhs)) + (pprint-exit-if-list-exhausted) + (format stream "-> ") + (loop + (let ((production (pprint-pop))) + (format stream "~@<~:[ ~;~:*~{~W ~:_~}~] ~_~vT~vA [~W]~:>" + (production-rhs production) *name-print-column* + production-number-width (print-production-number (production-number production)) + (production-name production))) + (pprint-exit-if-list-exhausted) + (format stream "~:@_ | "))) + (pprint-indent :block 2 stream) + (when details + (format stream "~:@_Initial terminals: ~@_~@<~:[~; ~:_~]~{~W ~:_~}~:>" + (rule-derives-epsilon rule) + (terminalset-list grammar (rule-initial-terminals rule))))) + (pprint-newline :mandatory stream)) + (pprint-exit-if-list-exhausted) + (pprint-newline :mandatory stream))) + + ;Print the states. + (pprint-newline :mandatory stream) + (pprint-logical-block (stream (grammar-states grammar)) + (pprint-exit-if-list-exhausted) + (format stream "States:") + (pprint-indent :block 2 stream) + (pprint-newline :mandatory stream) + (loop + (print-state (pprint-pop) stream) + (pprint-newline :mandatory stream) + (pprint-exit-if-list-exhausted) + (pprint-newline :mandatory stream)))) + (pprint-newline :mandatory stream)))) + + +(defmethod print-object ((grammar grammar) stream) + (print-unreadable-object (grammar stream :identity t) + (write-string "grammar" stream))) + + +; Emit markup paragraphs for the grammar. +(defun depict-grammar (markup-stream grammar) + (depict-paragraph (markup-stream ':body-text) + (depict markup-stream "Start nonterminal: ") + (depict-general-nonterminal markup-stream (gramar-user-start-symbol grammar))) + (dolist (nonterminal (grammar-nonterminals-list grammar)) + (unless (grammar-symbol-= nonterminal *start-nonterminal*) + (depict-general-rule markup-stream (grammar-rule grammar nonterminal))))) + + +; Return a list of nontrivial sets of states with the same kernels. +(defun grammar-kernel-sets (grammar) + (let ((states-hash (make-hash-table :test #'equal)) + (equivalences nil)) + (dolist (state (grammar-states grammar)) + (push state (gethash (state-kernel state) states-hash))) + (maphash #'(lambda (kernel states) + (declare (ignore kernel)) + (unless (= (length states) 1) + (push (nreverse states) equivalences))) + states-hash) + (sort equivalences #'< :key #'(lambda (equivalence) + (state-number (first equivalence)))))) \ No newline at end of file diff --git a/mozilla/js2/semantics/GrammarSymbol.lisp b/mozilla/js2/semantics/GrammarSymbol.lisp new file mode 100644 index 00000000000..6f0c4b7edaf --- /dev/null +++ b/mozilla/js2/semantics/GrammarSymbol.lisp @@ -0,0 +1,483 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; LALR(1) and LR(1) parametrized grammar utilities +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; ------------------------------------------------------------------------------------------------------ +;;; UTILITIES + +(declaim (inline identifier?)) +(defun identifier? (form) + (and form (symbolp form) (not (keywordp form)))) + +(deftype identifier () '(satisfies identifier?)) + + +; Make sure that form is one of the following: +; A symbol +; An integer +; A float +; A character +; A string +; A list of zero or more forms that also satisfy ensure-proper-form; +; the list cannot be dotted. +; Return the form. +(defun ensure-proper-form (form) + (labels + ((ensure-list-form (form) + (or (null form) + (and (consp form) + (progn + (ensure-proper-form (car form)) + (ensure-list-form (cdr form))))))) + (unless + (or (symbolp form) + (integerp form) + (floatp form) + (characterp form) + (stringp form) + (ensure-list-form form)) + (error "Bad form: ~S" form)) + form)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; TERMINALS + +; A terminal is any of the following: +; A symbol that is neither nil nor a keyword +; A string; +; A character; +; An integer. +(defun terminal? (x) + (and x + (or (and (symbolp x) (not (keywordp x))) + (stringp x) + (characterp x) + (integerp x)))) + +; The following terminals are reserved and may not be used in user input: +; $$ Marker for end of token stream +(defconstant *end-marker* '$$) +(defconstant *end-marker-terminal-number* 0) + +(deftype terminal () '(satisfies terminal?)) +(deftype user-terminal () `(and terminal (not (eql ,*end-marker*)))) + + +; Emit markup for a terminal. subscript is an optional integer. +(defun depict-terminal (markup-stream terminal &optional subscript) + (cond + ((characterp terminal) + (depict-char-style (markup-stream ':character-literal) + (depict-character markup-stream terminal) + (when subscript + (depict-char-style (markup-stream ':plain-subscript) + (depict-integer markup-stream subscript))))) + ((and terminal (symbolp terminal)) + (let ((name (symbol-name terminal))) + (if (and (> (length name) 0) (char= (char name 0) #\$)) + (depict-char-style (markup-stream ':terminal) + (depict markup-stream (subseq (symbol-upper-mixed-case-name terminal) 1)) + (when subscript + (depict-char-style (markup-stream ':plain-subscript) + (depict-integer markup-stream subscript)))) + (progn + (depict-char-style (markup-stream ':terminal-keyword) + (depict markup-stream (string-downcase name))) + (when subscript + (depict-char-style (markup-stream ':terminal) + (depict-char-style (markup-stream ':plain-subscript) + (depict-integer markup-stream subscript)))))))) + (t (error "Don't know how to emit markup for terminal ~S" terminal)))) + + + +;;; ------------------------------------------------------------------------------------------------------ +;;; NONTERMINAL PARAMETERS + +(declaim (inline nonterminal-parameter?)) +(defun nonterminal-parameter? (x) + (symbolp x)) +(deftype nonterminal-parameter () 'symbol) + + +; Return true if this nonterminal parameter is a constant. +(declaim (inline nonterminal-attribute?)) +(defun nonterminal-attribute? (parameter) + (and (symbolp parameter) (not (keywordp parameter)))) +(deftype nonterminal-attribute () '(and symbol (not keyword))) + + +(defun depict-nonterminal-attribute (markup-stream attribute) + (depict-char-style (markup-stream ':nonterminal) + (depict-char-style (markup-stream ':nonterminal-attribute) + (depict markup-stream (symbol-lower-mixed-case-name attribute))))) + + +; Return true if this nonterminal parameter is a variable. +(declaim (inline nonterminal-argument?)) +(defun nonterminal-argument? (parameter) + (keywordp parameter)) +(deftype nonterminal-argument () 'keyword) + + +(defparameter *special-nonterminal-arguments* + '(:alpha :beta :gamma :delta :epsilon :zeta :eta :theta :iota :kappa :lambda :mu :nu + :xi :omicron :pi :rho :sigma :tau :upsilon :phi :chi :psi :omega)) + +(defun depict-nonterminal-argument-symbol (markup-stream argument) + (depict-char-style (markup-stream ':nonterminal-argument) + (depict markup-stream + (if (member argument *special-nonterminal-arguments*) + argument + (symbol-upper-mixed-case-name argument))))) + +(defun depict-nonterminal-argument (markup-stream argument) + (depict-char-style (markup-stream ':nonterminal) + (depict-nonterminal-argument-symbol markup-stream argument))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; ATTRIBUTED NONTERMINALS + +; An attributed-nonterminal is a specific instantiation of a generic-nonterminal. +(defstruct (attributed-nonterminal (:constructor allocate-attributed-nonterminal (symbol attributes)) + (:copier nil) + (:predicate attributed-nonterminal?)) + (symbol nil :type keyword :read-only t) ;The name of the attributed nonterminal + (attributes nil :type list :read-only t)) ;Ordered list of nonterminal attributes + + +; Make an attributed nonterminal with the given symbol and attributes. If there +; are no attributes, return the symbol as a plain nonterminal. +; Nonterminals are eq whenever they have identical symbols and attribute lists. +(defun make-attributed-nonterminal (symbol attributes) + (assert-type symbol keyword) + (assert-type attributes (list nonterminal-attribute)) + (if attributes + (let ((generic-nonterminals (get symbol 'generic-nonterminals))) + (or (cdr (assoc attributes generic-nonterminals :test #'equal)) + (let ((attributed-nonterminal (allocate-attributed-nonterminal symbol attributes))) + (setf (get symbol 'generic-nonterminals) + (acons attributes attributed-nonterminal generic-nonterminals)) + attributed-nonterminal))) + symbol)) + + +(defmethod print-object ((attributed-nonterminal attributed-nonterminal) stream) + (print-unreadable-object (attributed-nonterminal stream) + (format stream "a ~@_~W~{ ~:_~W~}" + (attributed-nonterminal-symbol attributed-nonterminal) + (attributed-nonterminal-attributes attributed-nonterminal)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GENERIC NONTERMINALS + +; A generic-nonterminal is a parametrized nonterminal that can expand into two or more +; attributed-nonterminals. +(defstruct (generic-nonterminal (:constructor allocate-generic-nonterminal (symbol parameters)) + (:copier nil) + (:predicate generic-nonterminal?)) + (symbol nil :type keyword :read-only t) ;The name of the generic nonterminal + (parameters nil :type list :read-only t)) ;Ordered list of nonterminal attributes or arguments + + +; Make a generic nonterminal with the given symbol and parameters. If none of +; the parameters is an argument, make an attributed nonterminal instead. If there +; are no parameters, return the symbol as a plain nonterminal. +; Nonterminals are eq whenever they have identical symbols and parameter lists. +(defun make-generic-nonterminal (symbol parameters) + (assert-type symbol keyword) + (if parameters + (let ((generic-nonterminals (get symbol 'generic-nonterminals))) + (or (cdr (assoc parameters generic-nonterminals :test #'equal)) + (progn + (assert-type parameters (list nonterminal-parameter)) + (let ((generic-nonterminal (if (every #'nonterminal-attribute? parameters) + (allocate-attributed-nonterminal symbol parameters) + (allocate-generic-nonterminal symbol parameters)))) + (setf (get symbol 'generic-nonterminals) + (acons parameters generic-nonterminal generic-nonterminals)) + generic-nonterminal)))) + symbol)) + + +(defmethod print-object ((generic-nonterminal generic-nonterminal) stream) + (print-unreadable-object (generic-nonterminal stream) + (format stream "g ~@_~W~{ ~:_~W~}" + (generic-nonterminal-symbol generic-nonterminal) + (generic-nonterminal-parameters generic-nonterminal)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; NONTERMINALS + +;;; A nonterminal is a keyword or an attributed-nonterminal. +(declaim (inline nonterminal?)) +(defun nonterminal? (x) + (or (keywordp x) (attributed-nonterminal? x))) + +; The following nonterminals are reserved and may not be used in user input: +; :% Nonterminal that expands to the start nonterminal + +(defconstant *start-nonterminal* :%) + +(deftype nonterminal () '(or keyword attributed-nonterminal)) +(deftype user-nonterminal () `(and nonterminal (not (eql ,*start-nonterminal*)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GENERAL NONTERMINALS + +;;; A general-nonterminal is a nonterminal or a generic-nonterminal. +(declaim (inline general-nonterminal?)) +(defun general-nonterminal? (x) + (or (nonterminal? x) (generic-nonterminal? x))) + +(deftype general-nonterminal () '(or nonterminal generic-nonterminal)) + + +; Return the list of parameters in the general-nonterminal. The list is empty if the +; general-nonterminal is a plain nonterminal. +(defun general-nonterminal-parameters (general-nonterminal) + (cond + ((attributed-nonterminal? general-nonterminal) (attributed-nonterminal-attributes general-nonterminal)) + ((generic-nonterminal? general-nonterminal) (generic-nonterminal-parameters general-nonterminal)) + (t (progn + (assert-true (keywordp general-nonterminal)) + nil)))) + + +; Emit markup for a general-nonterminal. subscript is an optional integer. +(defun depict-general-nonterminal (markup-stream general-nonterminal &optional subscript) + (depict-char-style (markup-stream ':nonterminal) + (labels + ((depict-nonterminal-parameter (markup-stream parameter) + (if (nonterminal-attribute? parameter) + (depict-char-style (markup-stream ':nonterminal-attribute) + (depict markup-stream (symbol-lower-mixed-case-name parameter))) + (depict-nonterminal-argument-symbol markup-stream parameter))) + + (depict-parametrized-nonterminal (symbol parameters) + (depict markup-stream (symbol-upper-mixed-case-name symbol)) + (depict-char-style (markup-stream ':superscript) + (depict-list markup-stream #'depict-nonterminal-parameter parameters + :separator ",")))) + + (cond + ((keywordp general-nonterminal) + (depict markup-stream (symbol-upper-mixed-case-name general-nonterminal))) + ((attributed-nonterminal? general-nonterminal) + (depict-parametrized-nonterminal (attributed-nonterminal-symbol general-nonterminal) + (attributed-nonterminal-attributes general-nonterminal))) + ((generic-nonterminal? general-nonterminal) + (depict-parametrized-nonterminal (generic-nonterminal-symbol general-nonterminal) + (generic-nonterminal-parameters general-nonterminal))) + (t (error "Bad nonterminal ~S" general-nonterminal))) + (when subscript + (depict-char-style (markup-stream ':plain-subscript) + (depict-integer markup-stream subscript)))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR SYMBOLS + +;;; A grammar-symbol is either a terminal or a nonterminal. +(deftype grammar-symbol () '(or terminal nonterminal)) +(deftype user-grammar-symbol () '(or user-terminal user-nonterminal)) + +;;; A general-grammar-symbol is either a terminal or a general-nonterminal. +(deftype general-grammar-symbol () '(or terminal general-nonterminal)) + + +; Return true if the two grammar symbols are the same symbol. +(declaim (inline grammar-symbol-=)) +(defun grammar-symbol-= (grammar-symbol1 grammar-symbol2) + (eql grammar-symbol1 grammar-symbol2)) +; A version of grammar-symbol-= suitable for being the test function for hash tables. +(defconstant *grammar-symbol-=* #'eql) + + +; Return the general-grammar-symbol's symbol. Return it unchanged if it is not +; an attributed or generic nonterminal. +(defun general-grammar-symbol-symbol (general-grammar-symbol) + (cond + ((attributed-nonterminal? general-grammar-symbol) (attributed-nonterminal-symbol general-grammar-symbol)) + ((generic-nonterminal? general-grammar-symbol) (generic-nonterminal-symbol general-grammar-symbol)) + (t (assert-type general-grammar-symbol (or keyword terminal))))) + + +; Return the list of arguments in the general-grammar-symbol. The list is empty if the +; general-grammar-symbol is not a generic nonterminal. +(defun general-grammar-symbol-arguments (general-grammar-symbol) + (and (generic-nonterminal? general-grammar-symbol) + (remove-if (complement #'nonterminal-argument?) (generic-nonterminal-parameters general-grammar-symbol)))) + + +; Emit markup for a general-grammar-symbol. subscript is an optional integer. +(defun depict-general-grammar-symbol (markup-stream general-grammar-symbol &optional subscript) + (if (general-nonterminal? general-grammar-symbol) + (depict-general-nonterminal markup-stream general-grammar-symbol subscript) + (depict-terminal markup-stream general-grammar-symbol subscript))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GRAMMAR PARAMETRIZATIONS + +; A grammar parametrization holds the rules for converting nonterminal arguments into nonterminal attributes. +(defstruct (grammar-parametrization (:constructor allocate-grammar-parametrization (argument-attributes)) + (:predicate grammar-parametrization?)) + (argument-attributes nil :type hash-table :read-only t)) ;Hash table of nonterminal-argument -> list of nonterminal-attributes + + +(defun make-grammar-parametrization () + (allocate-grammar-parametrization (make-hash-table :test #'eq))) + + +; Declare that nonterminal arguments with the given name can hold any of the +; given nonterminal attributes given. At least one attribute must be provided. +(defun grammar-parametrization-declare-argument (grammar-parametrization argument attributes) + (assert-type argument nonterminal-argument) + (assert-type attributes (list nonterminal-attribute)) + (assert-true attributes) + (when (gethash argument (grammar-parametrization-argument-attributes grammar-parametrization)) + (error "Duplicate parametrized grammar argument ~S" argument)) + (setf (gethash argument (grammar-parametrization-argument-attributes grammar-parametrization)) attributes)) + + +; Return the attributes to which the given argument may expand. +(defun grammar-parametrization-lookup-argument (grammar-parametrization argument) + (assert-non-null (gethash argument (grammar-parametrization-argument-attributes grammar-parametrization)))) + + +; Create a plain, attributed, or generic grammar symbol from the specification in grammar-symbol-source. +; If grammar-symbol-source is not a cons, it is a plain grammar symbol. If it is a list, its first element +; must be a keyword that is a nonterminal's symbol and the other elements must be nonterminal +; parameters. +; Return two values: +; the grammar symbol +; a list of arguments used in the grammar symbol. +; If allowed-arguments is given, check that each argument is in the allowed-arguments list; +; if not, allow any arguments declared in grammar-parametrization but do not allow duplicates. +(defun grammar-parametrization-intern (grammar-parametrization grammar-symbol-source &optional (allowed-arguments nil allow-duplicates)) + (if (consp grammar-symbol-source) + (progn + (assert-type grammar-symbol-source (cons keyword (list nonterminal-parameter))) + (let* ((symbol (car grammar-symbol-source)) + (parameters (cdr grammar-symbol-source)) + (arguments (remove-if (complement #'nonterminal-argument?) parameters))) + (mapl #'(lambda (arguments) + (let ((argument (car arguments))) + (if allow-duplicates + (unless (member argument allowed-arguments :test #'eq) + (error "Undefined nonterminal argument ~S" argument)) + (progn + (unless (gethash argument (grammar-parametrization-argument-attributes grammar-parametrization)) + (error "Undeclared nonterminal argument ~S" argument)) + (when (member argument (cdr arguments) :test #'eq) + (error "Duplicate nonterminal argument ~S" argument)))))) + arguments) + (values (make-generic-nonterminal symbol parameters) arguments))) + (values grammar-symbol-source nil))) + + +; Call f on each possible binding permutation of the given arguments concatenated with the bindings in +; bound-argument-alist. f takes one argument, an association list that maps arguments to attributes. +(defun grammar-parametrization-each-permutation (grammar-parametrization f arguments &optional bound-argument-alist) + (if arguments + (let ((argument (car arguments)) + (rest-arguments (cdr arguments))) + (dolist (attribute (grammar-parametrization-lookup-argument grammar-parametrization argument)) + (grammar-parametrization-each-permutation grammar-parametrization f rest-arguments (acons argument attribute bound-argument-alist)))) + (funcall f bound-argument-alist))) + + +; If general-grammar-symbol is a generic-nonterminal, return one possible binding permutation of its arguments; +; otherwise return nil. +(defun nonterminal-sample-bound-argument-alist (grammar-parametrization general-grammar-symbol) + (when (generic-nonterminal? general-grammar-symbol) + (grammar-parametrization-each-permutation + grammar-parametrization + #'(lambda (bound-argument-alist) (return-from nonterminal-sample-bound-argument-alist bound-argument-alist)) + (general-grammar-symbol-arguments general-grammar-symbol)))) + + +; If the grammar symbol is a generic nonterminal, convert it into an attributed nonterminal +; by instantiating its arguments with the corresponding attributes from the bound-argument-alist. +; If the grammar symbol is already an attributed or plain nonterminal, return it unchanged. +(defun instantiate-general-grammar-symbol (bound-argument-alist general-grammar-symbol) + (if (generic-nonterminal? general-grammar-symbol) + (make-attributed-nonterminal + (generic-nonterminal-symbol general-grammar-symbol) + (mapcar #'(lambda (parameter) + (if (nonterminal-argument? parameter) + (let ((binding (assoc parameter bound-argument-alist :test #'eq))) + (if binding + (cdr binding) + (error "Unbound nonterminal argument ~S" parameter))) + parameter)) + (generic-nonterminal-parameters general-grammar-symbol))) + (assert-type general-grammar-symbol grammar-symbol))) + + +; If the grammar symbol is a generic nonterminal parametrized on argument, substitute +; attribute for argument in it and return the modified grammar symbol. Otherwise, return it unchanged. +(defun general-grammar-symbol-substitute (attribute argument general-grammar-symbol) + (assert-type attribute nonterminal-attribute) + (assert-type argument nonterminal-argument) + (if (and (generic-nonterminal? general-grammar-symbol) + (member argument (generic-nonterminal-parameters general-grammar-symbol) :test #'eq)) + (make-generic-nonterminal + (generic-nonterminal-symbol general-grammar-symbol) + (substitute attribute argument (generic-nonterminal-parameters general-grammar-symbol) :test #'eq)) + (assert-type general-grammar-symbol general-grammar-symbol))) + + +; If the general grammar symbol is a generic nonterminal, return a list of all possible attributed nonterminals +; that can be instantiated from it; otherwise, return a one-element list containing the given general grammar symbol. +(defun general-grammar-symbol-instances (grammar-parametrization general-grammar-symbol) + (if (generic-nonterminal? general-grammar-symbol) + (let ((instances nil)) + (grammar-parametrization-each-permutation + grammar-parametrization + #'(lambda (bound-argument-alist) + (push (instantiate-general-grammar-symbol bound-argument-alist general-grammar-symbol) instances)) + (general-grammar-symbol-arguments general-grammar-symbol)) + (nreverse instances)) + (list (assert-type general-grammar-symbol grammar-symbol)))) + + +; Return true if grammar-symbol can be obtained by calling instantiate-general-grammar-symbol on +; general-grammar-symbol. +(defun general-nonterminal-is-instance? (grammar-parametrization general-grammar-symbol grammar-symbol) + (or (grammar-symbol-= general-grammar-symbol grammar-symbol) + (and (generic-nonterminal? general-grammar-symbol) + (attributed-nonterminal? grammar-symbol) + (let ((parameters (generic-nonterminal-parameters general-grammar-symbol)) + (attributes (attributed-nonterminal-attributes grammar-symbol))) + (and (= (length parameters) (length attributes)) + (every #'(lambda (parameter attribute) + (or (eq parameter attribute) + (and (nonterminal-argument? parameter) + (member attribute (grammar-parametrization-lookup-argument grammar-parametrization parameter) :test #'eq)))) + parameters + attributes)))))) diff --git a/mozilla/js2/semantics/HTML.lisp b/mozilla/js2/semantics/HTML.lisp new file mode 100644 index 00000000000..a854f816e5f --- /dev/null +++ b/mozilla/js2/semantics/HTML.lisp @@ -0,0 +1,531 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1999 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; HTML output generator +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; ------------------------------------------------------------------------------------------------------ +;;; ELEMENTS + +(defstruct (html-element (:constructor make-html-element (name self-closing indent + newlines-before newlines-begin newlines-end newlines-after)) + (:predicate html-element?)) + (name nil :type symbol :read-only t) ;Name of the tag + (self-closing nil :type bool :read-only t) ;True if the closing tag should be omitted + (indent nil :type integer :read-only t) ;Number of spaces by which to indent this tag's contents in HTML source + (newlines-before nil :type integer :read-only t) ;Number of HTML source newlines preceding the opening tag + (newlines-begin nil :type integer :read-only t) ;Number of HTML source newlines immediately following the opening tag + (newlines-end nil :type integer :read-only t) ;Number of HTML source newlines immediately preceding the closing tag + (newlines-after nil :type integer :read-only t)) ;Number of HTML source newlines following the closing tag + + +; Define symbol to refer to the given html-element. +(defun define-html (symbol newlines-before newlines-begin newlines-end newlines-after &key self-closing (indent 0)) + (setf (get symbol 'html-element) (make-html-element symbol self-closing indent + newlines-before newlines-begin newlines-end newlines-after))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; ELEMENT DEFINITIONS + +(define-html 'a 0 0 0 0) +(define-html 'b 0 0 0 0) +(define-html 'blockquote 1 0 0 1 :indent 2) +(define-html 'body 1 1 1 1) +(define-html 'br 0 0 0 1 :self-closing t) +(define-html 'code 0 0 0 0) +(define-html 'dd 1 0 0 1 :indent 2) +(define-html 'del 0 0 0 0) +(define-html 'div 1 0 0 1 :indent 2) +(define-html 'dl 1 0 0 2 :indent 2) +(define-html 'dt 1 0 0 1 :indent 2) +(define-html 'em 0 0 0 0) +(define-html 'h1 1 0 0 2 :indent 2) +(define-html 'h2 1 0 0 2 :indent 2) +(define-html 'h3 1 0 0 2 :indent 2) +(define-html 'h4 1 0 0 2 :indent 2) +(define-html 'h5 1 0 0 2 :indent 2) +(define-html 'h6 1 0 0 2 :indent 2) +(define-html 'head 1 1 1 2) +(define-html 'hr 1 0 0 1 :self-closing t) +(define-html 'html 0 1 1 1) +(define-html 'i 0 0 0 0) +(define-html 'li 1 0 0 1 :indent 2) +(define-html 'link 1 0 0 1 :self-closing t) +(define-html 'ol 1 1 1 2 :indent 2) +(define-html 'p 1 0 0 2) +(define-html 'span 0 0 0 0) +(define-html 'strong 0 0 0 0) +(define-html 'sub 0 0 0 0) +(define-html 'sup 0 0 0 0) +(define-html 'table 1 1 1 2) +(define-html 'td 1 0 0 1 :indent 2) +(define-html 'th 1 0 0 1 :indent 2) +(define-html 'title 1 0 0 1) +(define-html 'tr 1 0 0 1 :indent 2) +(define-html 'u 0 0 0 0) +(define-html 'ul 1 1 1 2 :indent 2) +(define-html 'var 0 0 0 0) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; ENTITIES + +(defvar *html-entities-list* + '((#\& . "amp") + (#\" . "quot") + (#\< . "lt") + (#\> . "gt") + (nbsp . "nbsp"))) + +(defvar *html-entities-hash* (make-hash-table)) + +(dolist (entity-binding *html-entities-list*) + (setf (gethash (first entity-binding) *html-entities-hash*) (rest entity-binding))) + + +; Return a freshly consed list of that represent the characters in the string except that +; '&', '<', and '>' are replaced by their entities and spaces are replaced by the entity +; given by the space parameter (which should be either 'space or 'nbsp). +(defun escape-html-characters (string space) + (let ((html-sources nil)) + (labels + ((escape-remainder (start) + (let ((i (position-if #'(lambda (char) (member char '(#\& #\< #\> #\space))) string :start start))) + (if i + (let ((char (char string i))) + (unless (= i start) + (push (subseq string start i) html-sources)) + (push (if (eql char #\space) space char) html-sources) + (escape-remainder (1+ i))) + (push (if (zerop start) string (subseq string start)) html-sources))))) + (unless (zerop (length string)) + (escape-remainder 0)) + (nreverse html-sources)))) + + +; Escape all content strings in the html-source, while interpreting :nowrap pseudo-tags. +; Return a freshly consed list of html-sources. +(defun escape-html-source (html-source space) + (cond + ((stringp html-source) + (escape-html-characters html-source space)) + ((or (characterp html-source) (symbolp html-source) (integerp html-source)) + (list html-source)) + ((consp html-source) + (let ((tag (first html-source)) + (contents (rest html-source))) + (if (eq tag ':nowrap) + (mapcan #'(lambda (html-source) (escape-html-source html-source 'nbsp)) contents) + (list (cons tag + (mapcan #'(lambda (html-source) (escape-html-source html-source space)) contents)))))) + (t (error "Bad html-source: ~S" html-source)))) + + +; Escape all content strings in the html-source, while interpreting :nowrap pseudo-tags. +(defun escape-html (html-source) + (let ((results (escape-html-source html-source 'space))) + (assert-true (= (length results) 1)) + (first results))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; HTML WRITER + +;; has one of the following formats: +;; ;String to be printed literally +;; ;Named entity +;; ;Numbered entity +;; space ;Space or newline +;; ( ... ) ;Tag and its contents +;; ((:nest ... ) ... ) ;Equivalent to ( (... ( ... ))) +;; +;; has one of the following formats: +;; ;Tag with no attributes +;; ( ... ) ;Tag with attributes +;; :nowrap ;Pseudo-tag indicating that spaces in contents should be non-breaking +;; +;; has one of the following formats: +;; ( ) ;Attribute name and value +;; () ;Attribute name with omitted value + + +(defparameter *html-right-margin* 100) + +(defvar *current-html-pos*) ;Number of characters written to the current line of the stream; nil if *current-html-newlines* is nonzero +(defvar *current-html-pending*) ;String following a space or newline pending to be printed on the current line or nil if none +(defvar *current-html-indent*) ;Indent to use for emit-html-newlines-and-indent calls +(defvar *current-html-newlines*) ;Number of consecutive newlines just written to the stream; zero if last character wasn't a newline + + +; Flush *current-html-pending* onto the stream. +(defun flush-current-html-pending (stream) + (when *current-html-pending* + (unless (zerop (length *current-html-pending*)) + (write-char #\space stream) + (write-string *current-html-pending* stream) + (incf *current-html-pos* (1+ (length *current-html-pending*)))) + (setq *current-html-pending* nil))) + + +; Emit n-newlines onto the stream and indent the next line by *current-html-indent* spaces. +(defun emit-html-newlines-and-indent (stream n-newlines) + (decf n-newlines *current-html-newlines*) + (when (plusp n-newlines) + (flush-current-html-pending stream) + (dotimes (i n-newlines) + (write-char #\newline stream)) + (incf *current-html-newlines* n-newlines) + (setq *current-html-pos* nil))) + + +; Write the string to the stream, observing *current-html-pending* and *current-html-pos*. +(defun write-html-string (stream html-string) + (unless (zerop (length html-string)) + (unless *current-html-pos* + (setq *current-html-newlines* 0) + (write-string (make-string *current-html-indent* :initial-element #\space) stream) + (setq *current-html-pos* *current-html-indent*)) + (if *current-html-pending* + (progn + (setq *current-html-pending* (if (zerop (length *current-html-pending*)) + html-string + (concatenate 'string *current-html-pending* html-string))) + (when (>= (+ *current-html-pos* (length *current-html-pending*)) *html-right-margin*) + (write-char #\newline stream) + (write-string *current-html-pending* stream) + (setq *current-html-pos* (length *current-html-pending*)) + (setq *current-html-pending* nil))) + (progn + (write-string html-string stream) + (incf *current-html-pos* (length html-string)))))) + + +; Emit the html tag with the given tag-symbol (name), attributes, and contents. +(defun write-html-tag (stream tag-symbol attributes contents) + (let ((element (assert-non-null (get tag-symbol 'html-element)))) + (emit-html-newlines-and-indent stream (html-element-newlines-before element)) + (write-html-string stream (format nil "<~A" (html-element-name element))) + (let ((*current-html-indent* (+ *current-html-indent* (html-element-indent element)))) + (dolist (attribute attributes) + (let ((name (first attribute)) + (value (second attribute))) + (write-html-source stream 'space) + (write-html-string stream (string-downcase (symbol-name name))) + (when value + (write-html-string stream (format nil "=\"~A\"" value))))) + (write-html-string stream ">") + (emit-html-newlines-and-indent stream (html-element-newlines-begin element)) + (dolist (html-source contents) + (write-html-source stream html-source))) + (unless (html-element-self-closing element) + (emit-html-newlines-and-indent stream (html-element-newlines-end element)) + (write-html-string stream (format nil "" (html-element-name element)))) + (emit-html-newlines-and-indent stream (html-element-newlines-after element)))) + + +; Write html-source to the character stream. +(defun write-html-source (stream html-source) + (cond + ((stringp html-source) + (write-html-string stream html-source)) + ((eq html-source 'space) + (when (zerop *current-html-newlines*) + (flush-current-html-pending stream) + (setq *current-html-pending* ""))) + ((or (characterp html-source) (symbolp html-source)) + (let ((entity-name (gethash html-source *html-entities-hash*))) + (cond + (entity-name + (write-html-string stream (format nil "&~A;" entity-name))) + ((characterp html-source) + (write-html-string stream (string html-source))) + (t (error "Bad html-source ~S" html-source))))) + ((integerp html-source) + (assert-true (and (>= html-source 0) (< html-source 65536))) + (write-html-string stream (format nil "&#~D;" html-source))) + ((consp html-source) + (let ((tag (first html-source)) + (contents (rest html-source))) + (if (consp tag) + (write-html-tag stream (first tag) (rest tag) contents) + (write-html-tag stream tag nil contents)))) + (t (error "Bad html-source: ~S" html-source)))) + + +; Write the top-level html-source to the character stream. +(defun write-html (html-source &optional (stream t)) + (with-standard-io-syntax + (let ((*print-readably* nil) + (*print-escape* nil) + (*print-case* :upcase) + (*current-html-pos* nil) + (*current-html-pending* nil) + (*current-html-indent* 0) + (*current-html-newlines* 9999)) + (write-string "" stream) + (write-char #\newline stream) + (write-html-source stream (escape-html html-source))))) + + +; Write html to the text file with the given name (relative to the +; local directory). +(defun write-html-to-local-file (filename html) + (with-open-file (stream (merge-pathnames filename *semantic-engine-directory*) + :direction :output + :if-exists :supersede + #+mcl :mac-file-creator #+mcl "MOSS") + (write-html html stream))) + + +; Expand the :nest constructs inside html-source. +(defun unnest-html-source (html-source) + (labels + ((unnest-tags (tags contents) + (assert-true tags) + (cons (first tags) + (if (endp (rest tags)) + contents + (list (unnest-tags (rest tags) contents)))))) + (if (consp html-source) + (let ((tag (first html-source)) + (contents (rest html-source))) + (if (and (consp tag) (eq (first tag) ':nest)) + (unnest-html-source (unnest-tags (rest tag) contents)) + (cons tag (mapcar #'unnest-html-source contents)))) + html-source))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; HTML MAPPINGS + +(defparameter *html-definitions* + '(((:new-line t) (br)) + + ;Misc. + (:tab2 nbsp nbsp) + (:tab3 nbsp nbsp nbsp) + + ;Symbols (-10 suffix means 10-point, etc.) + ((:bullet 1) #x2022) + ((:minus 1) "-") + ((:not-equal 1) #x2260) + ((:less-or-equal 1) #x2264) + ((:greater-or-equal 1) #x2265) + ((:infinity 1) #x221E) + ((:left-single-quote 1) #x2018) + ((:right-single-quote 1) #x2019) + ((:left-double-quote 1) #x201C) + ((:right-double-quote 1) #x201D) + ((:left-angle-quote 1) #x00AB) + ((:right-angle-quote 1) #x00BB) + ((:bottom-10 1) (:symbol #\x5E)) ;#x22A5 + ((:up-arrow-10 1) (:symbol #\xAD)) ;#x2191 + ((:function-arrow-10 2) (:symbol #\xAE)) ;#x2192 + ((:cartesian-product-10 2) #x00D7) + ((:identical-10 2) (:symbol #\xBA)) ;#x2261 + ((:member-10 2) (:symbol #\xCE)) ;#x2208 + ((:derives-10 2) (:symbol #\xDE)) ;#x21D2 + ((:left-triangle-bracket-10 1) (:symbol #\xE1)) ;#x2329 + ((:right-triangle-bracket-10 1) (:symbol #\xF1)) ;#x232A + ((:big-plus-10 2) (:symbol #\xA8)) ;#x271A + + ((:alpha 1) (:symbol "a")) + ((:beta 1) (:symbol "b")) + ((:chi 1) (:symbol "c")) + ((:delta 1) (:symbol "d")) + ((:epsilon 1) (:symbol "e")) + ((:phi 1) (:symbol "f")) + ((:gamma 1) (:symbol "g")) + ((:eta 1) (:symbol "h")) + ((:iota 1) (:symbol "i")) + ((:kappa 1) (:symbol "k")) + ((:lambda 1) (:symbol "l")) + ((:mu 1) (:symbol "m")) + ((:nu 1) (:symbol "n")) + ((:omicron 1) (:symbol "o")) + ((:pi 1) (:symbol "p")) + ((:theta 1) (:symbol "q")) + ((:rho 1) (:symbol "r")) + ((:sigma 1) (:symbol "s")) + ((:tau 1) (:symbol "t")) + ((:upsilon 1) (:symbol "u")) + ((:omega 1) (:symbol "w")) + ((:xi 1) (:symbol "x")) + ((:psi 1) (:symbol "y")) + ((:zeta 1) (:symbol "z")) + + ;Block Styles + (:body-text p) + (:section-heading h2) + (:subsection-heading h3) + (:grammar-header h4) + (:grammar-rule (:nest :nowrap (div (class "grammar-rule")))) + (:grammar-lhs (:nest :nowrap (div (class "grammar-lhs")))) + (:grammar-lhs-last :grammar-lhs) + (:grammar-rhs (:nest :nowrap (div (class "grammar-rhs")))) + (:grammar-rhs-last :grammar-rhs) + (:grammar-argument (:nest :nowrap (div (class "grammar-argument")))) + (:semantics (:nest :nowrap (p (class "semantics")))) + (:semantics-next (:nest :nowrap (p (class "semantics-next")))) + + ;Inline Styles + (:symbol (span (class "symbol"))) + (:character-literal code) + (:character-literal-control (span (class "control"))) + (:terminal (span (class "terminal"))) + (:terminal-keyword (code (class "terminal-keyword"))) + (:nonterminal (var (class "nonterminal"))) + (:nonterminal-attribute (span (class "nonterminal-attribute"))) + (:nonterminal-argument (span (class "nonterminal-argument"))) + (:semantic-keyword (span (class "semantic-keyword"))) + (:type-expression (span (class "type-expression"))) + (:type-name (span (class "type-name"))) + (:field-name (span (class "field-name"))) + (:global-variable (span (class "global-variable"))) + (:local-variable (span (class "local-variable"))) + (:action-name (span (class "action-name"))) + + ;Specials + (:invisible del) + ((:but-not 6) (b "except")) + (:subscript sub) + (:superscript sup) + (:plain-subscript :subscript) + ((:action-begin 1) "[") + ((:action-end 1) "]") + ((:vector-begin 1) (b "[")) + ((:vector-end 1) (b "]")) + ((:empty-vector 2) (b "[]")) + ((:vector-append 2) :big-plus-10) + ((:tuple-begin 1) (b :left-triangle-bracket-10)) + ((:tuple-end 1) (b :right-triangle-bracket-10)) + ((:unit 4) (:global-variable "unit")) + ((:true 4) (:global-variable "true")) + ((:false 5) (:global-variable "false")) + )) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; HTML STREAMS + +(defstruct (html-stream (:include markup-stream) + (:constructor allocate-html-stream (env head tail level logical-position)) + (:copier nil) + (:predicate html-stream?))) + + +(defmethod print-object ((html-stream html-stream) stream) + (print-unreadable-object (html-stream stream :identity t) + (write-string "html-stream" stream))) + + +; Make a new, empty, open html-stream with the given definitions for its markup-env. +(defun make-html-stream (markup-env level &optional logical-position) + (let ((head (list nil))) + (allocate-html-stream markup-env head head level logical-position))) + + +; Make a new, empty, open, top-level html-stream with the given definitions +; for its markup-env. +(defun make-top-level-html-stream (html-definitions) + (let ((head (list nil)) + (markup-env (make-markup-env))) + (markup-env-define-alist markup-env html-definitions) + (allocate-html-stream markup-env head head *markup-stream-top-level* nil))) + + +; Return the approximate width of the html item; return t if it is a line break. +; Also allow html tags as long as they do not contain line breaks. +(defmethod markup-group-width ((html-stream html-stream) item) + (if (consp item) + (reduce #'+ (rest item) :key #'(lambda (subitem) (markup-group-width html-stream subitem))) + (markup-width html-stream item))) + + +; Create a top-level html-stream and call emitter to emit its contents. +; emitter takes one argument -- an html-stream to which it should emit paragraphs. +; Return the top-level html-stream. +(defun depict-html-top-level (emitter title) + (let ((html-stream (make-top-level-html-stream *html-definitions*))) + (markup-stream-append1 html-stream 'html) + (depict-block-style (html-stream 'head) + (depict-block-style (html-stream 'title) + (markup-stream-append1 html-stream title)) + (markup-stream-append1 html-stream '((link (rel "stylesheet") (href "styles.css"))))) + (depict-block-style (html-stream 'body) + (funcall emitter html-stream)) + html-stream)) + + +; Create a top-level html-stream and call emitter to emit its contents. +; emitter takes one argument -- an html-stream to which it should emit paragraphs. +; Write the resulting html to the text file with the given name (relative to the +; local directory). +(defun depict-html-to-local-file (filename emitter title) + (let ((top-html-stream (depict-html-top-level emitter title))) + (write-html-to-local-file filename (markup-stream-output top-html-stream)))) + + +; Return the markup accumulated in the markup-stream after expanding all of its macros. +; The markup-stream is closed after this function is called. +(defmethod markup-stream-output ((html-stream html-stream)) + (unnest-html-source + (markup-env-expand (markup-stream-env html-stream) (markup-stream-unexpanded-output html-stream) '(:nowrap :nest)))) + + + +(defmethod depict-block-style-f ((html-stream html-stream) block-style emitter) + (assert-true (<= (markup-stream-level html-stream) *markup-stream-paragraph-level*)) + (assert-true (and block-style (symbolp block-style))) + (let ((inner-html-stream (make-html-stream (markup-stream-env html-stream) *markup-stream-paragraph-level* nil))) + (markup-stream-append1 inner-html-stream block-style) + (prog1 + (funcall emitter inner-html-stream) + (markup-stream-append1 html-stream (markup-stream-unexpanded-output inner-html-stream))))) + + +(defmethod depict-paragraph-f ((html-stream html-stream) paragraph-style emitter) + (assert-true (= (markup-stream-level html-stream) *markup-stream-paragraph-level*)) + (assert-true (and paragraph-style (symbolp paragraph-style))) + (let ((inner-html-stream (make-html-stream (markup-stream-env html-stream) *markup-stream-content-level* (make-logical-position)))) + (markup-stream-append1 inner-html-stream paragraph-style) + (prog1 + (funcall emitter inner-html-stream) + (markup-stream-append1 html-stream (markup-stream-unexpanded-output inner-html-stream))))) + + +(defmethod depict-char-style-f ((html-stream html-stream) char-style emitter) + (assert-true (>= (markup-stream-level html-stream) *markup-stream-content-level*)) + (assert-true (and char-style (symbolp char-style))) + (let ((inner-html-stream (make-html-stream (markup-stream-env html-stream) *markup-stream-content-level* (markup-stream-logical-position html-stream)))) + (markup-stream-append1 inner-html-stream char-style) + (prog1 + (funcall emitter inner-html-stream) + (markup-stream-append1 html-stream (markup-stream-unexpanded-output inner-html-stream))))) + + +#| +(write-html + '(html + (head + (:nowrap (title "This is my title!<>"))) + ((body (atr1 "abc") (beta) (qq)) + "My page this is " (br) (p)))) +|# diff --git a/mozilla/js2/semantics/JS14.html b/mozilla/js2/semantics/JS14.html new file mode 100644 index 00000000000..a28114fc04c --- /dev/null +++ b/mozilla/js2/semantics/JS14.html @@ -0,0 +1,800 @@ + + + +JavaScript 2.0 Grammar + + + + +

Expressions

+ +

Primary Expressions

+ +
+
PrimaryExpression Þ
+
   this
+
|  null
+
|  true
+
|  false
+
|  Number
+
|  String
+
|  Identifier
+
|  RegularExpression
+
|  ( Expression )
+
+

Left-Side Expressions

+ +
c Î {allowCallsnoCalls}
+
a Î {allowInnoIn}
+
+
MemberExpressionnoCalls Þ
+
   PrimaryExpression
+
|  MemberExpressionnoCalls [ Expression ]
+
|  MemberExpressionnoCalls . Identifier
+
|  new MemberExpressionnoCalls Arguments
+
+
+
MemberExpressionallowCalls Þ
+
   MemberExpressionnoCalls Arguments
+
|  MemberExpressionallowCalls Arguments
+
|  MemberExpressionallowCalls [ Expression ]
+
|  MemberExpressionallowCalls . Identifier
+
+
+
NewExpression Þ
+
   MemberExpressionnoCalls
+
|  new NewExpression
+
+
+
Arguments Þ
+
   ( )
+
|  ( ArgumentList )
+
+
+
ArgumentList Þ
+
   AssignmentExpressionallowIn
+
|  ArgumentList , AssignmentExpressionallowIn
+
+
+
LeftSideExpression Þ
+
   NewExpression
+
|  MemberExpressionallowCalls
+
+

Postfix Expressions

+ +
+
PostfixExpression Þ
+
   LeftSideExpression
+
|  LeftSideExpression ++
+
|  LeftSideExpression --
+
+

Unary Operators

+ +
+
UnaryExpression Þ
+
   PostfixExpression
+
|  delete LeftSideExpression
+
|  void UnaryExpression
+
|  typeof UnaryExpression
+
|  ++ LeftSideExpression
+
|  -- LeftSideExpression
+
|  + UnaryExpression
+
|  - UnaryExpression
+
|  ~ UnaryExpression
+
|  ! UnaryExpression
+
+

Multiplicative Operators

+ +
+
MultiplicativeExpression Þ
+
   UnaryExpression
+
|  MultiplicativeExpression * UnaryExpression
+
|  MultiplicativeExpression / UnaryExpression
+
|  MultiplicativeExpression % UnaryExpression
+
+

Additive Operators

+ +
+
AdditiveExpression Þ
+
   MultiplicativeExpression
+
|  AdditiveExpression + MultiplicativeExpression
+
|  AdditiveExpression - MultiplicativeExpression
+
+

Bitwise Shift Operators

+ +
+
ShiftExpression Þ
+
   AdditiveExpression
+
|  ShiftExpression << AdditiveExpression
+
|  ShiftExpression >> AdditiveExpression
+
|  ShiftExpression >>> AdditiveExpression
+
+

Relational Operators

+ +
+
RelationalExpressionallowIn Þ
+
   ShiftExpression
+
|  RelationalExpressionallowIn < ShiftExpression
+
|  RelationalExpressionallowIn > ShiftExpression
+
|  RelationalExpressionallowIn <= ShiftExpression
+
|  RelationalExpressionallowIn >= ShiftExpression
+
|  RelationalExpressionallowIn instanceof ShiftExpression
+
|  RelationalExpressionallowIn in ShiftExpression
+
+
+
RelationalExpressionnoIn Þ
+
   ShiftExpression
+
|  RelationalExpressionnoIn < ShiftExpression
+
|  RelationalExpressionnoIn > ShiftExpression
+
|  RelationalExpressionnoIn <= ShiftExpression
+
|  RelationalExpressionnoIn >= ShiftExpression
+
|  RelationalExpressionnoIn instanceof ShiftExpression
+
+

Equality Operators

+ +
+
EqualityExpressiona Þ
+
   RelationalExpressiona
+
|  EqualityExpressiona == RelationalExpressiona
+
|  EqualityExpressiona != RelationalExpressiona
+
|  EqualityExpressiona === RelationalExpressiona
+
|  EqualityExpressiona !== RelationalExpressiona
+
+

Binary Bitwise Operators

+ +
+
BitwiseAndExpressiona Þ
+
   EqualityExpressiona
+
|  BitwiseAndExpressiona & EqualityExpressiona
+
+
+
BitwiseXorExpressiona Þ
+
   BitwiseAndExpressiona
+
|  BitwiseXorExpressiona ^ BitwiseAndExpressiona
+
+
+
BitwiseOrExpressiona Þ
+
   BitwiseXorExpressiona
+
|  BitwiseOrExpressiona | BitwiseXorExpressiona
+
+

Binary Logical Operators

+ +
+
LogicalAndExpressiona Þ
+
   BitwiseOrExpressiona
+
|  LogicalAndExpressiona && BitwiseOrExpressiona
+
+
+
LogicalOrExpressiona Þ
+
   LogicalAndExpressiona
+
|  LogicalOrExpressiona || LogicalAndExpressiona
+
+

Conditional Operator

+ +
+
ConditionalExpressiona Þ
+
   LogicalOrExpressiona
+
|  LogicalOrExpressiona ? AssignmentExpressiona : AssignmentExpressiona
+
+

Assignment Operators

+ +
+
AssignmentExpressiona Þ
+
   ConditionalExpressiona
+
|  LeftSideExpression = AssignmentExpressiona
+
|  LeftSideExpression CompoundAssignment AssignmentExpressiona
+
+
+
CompoundAssignment Þ
+
   *=
+
|  /=
+
|  %=
+
|  +=
+
|  -=
+
+

Expressions

+ +
+
CommaExpressiona Þ AssignmentExpressiona
+
+
+
Expression Þ CommaExpressionallowIn
+
+
+
OptionalExpression Þ
+
   Expression
+
|  «empty»
+
+

Statements

+ +
w Î {abbrevabbrevNonEmptyabbrevNoShortIffull}
+
+
Statementw Þ
+
   BlocklikeStatement
+
|  UnterminatedStatement ;
+
|  NonuniformStatementw
+
|  IfStatementw
+
|  WhileStatementw
+
|  ForStatementw
+
|  LabeledStatementw
+
+
+
NonuniformStatementabbrev Þ
+
   EmptyStatement ;
+
|  EmptyStatement
+
|  UnterminatedStatement
+
+
+
NonuniformStatementabbrevNonEmpty Þ
+
   EmptyStatement ;
+
|  UnterminatedStatement
+
+
+
NonuniformStatementabbrevNoShortIf Þ
+
   EmptyStatement ;
+
|  UnterminatedStatement
+
|  EmptyStatement
+
+
+
NonuniformStatementfull Þ EmptyStatement ;
+
+
+
BlocklikeStatement Þ
+
   Block
+
|  SwitchStatement
+
|  TryStatement
+
+
+
UnterminatedStatement Þ
+
   VariableStatement
+
|  ExpressionStatement
+
|  DoStatement
+
|  ContinueStatement
+
|  BreakStatement
+
|  ReturnStatement
+
|  ThrowStatement
+
+

Block

+ +
+
Block Þ { BlockStatements }
+
+
+
BlockStatements Þ
+
   Statementabbrev
+
|  BlockStatementsPrefix StatementabbrevNonEmpty
+
+
+
BlockStatementsPrefix Þ
+
   Statementfull
+
|  BlockStatementsPrefix Statementfull
+
+

Variable Statement

+ +
+
VariableStatement Þ var VariableDeclarationListallowIn
+
+
+
VariableDeclarationLista Þ
+
   VariableDeclarationa
+
|  VariableDeclarationLista , VariableDeclarationa
+
+
+
VariableDeclarationa Þ
+
   Identifier
+
|  Identifier = AssignmentExpressiona
+
+

Empty Statement

+ +
+
EmptyStatement Þ «empty»
+
+

Expression Statement

+ +
+
ExpressionStatement Þ Expression
+
+

If Statement

+ +
+
IfStatementabbrev Þ
+
   if ( Expression ) Statementabbrev
+
|  if ( Expression ) StatementabbrevNoShortIf else Statementabbrev
+
+
+
IfStatementabbrevNonEmpty Þ
+
   if ( Expression ) StatementabbrevNonEmpty
+
|  if ( Expression ) StatementabbrevNoShortIf else StatementabbrevNonEmpty
+
+
+
IfStatementfull Þ
+
   if ( Expression ) Statementfull
+
|  if ( Expression ) StatementabbrevNoShortIf else Statementfull
+
+
+
IfStatementabbrevNoShortIf Þ if ( Expression ) StatementabbrevNoShortIf else StatementabbrevNoShortIf
+
+

Do-While Statement

+ +
+
DoStatement Þ do StatementabbrevNonEmpty while ( Expression )
+
+

While Statement

+ +
+
WhileStatementw Þ while ( Expression ) Statementw
+
+

For Statements

+ +
+
ForStatementw Þ
+
   for ( ForInitializer ; OptionalExpression ; OptionalExpression ) Statementw
+
|  for ( ForInBinding in Expression ) Statementw
+
+
+
ForInitializer Þ
+
   «empty»
+
|  CommaExpressionnoIn
+
|  var VariableDeclarationListnoIn
+
+
+
ForInBinding Þ
+
   LeftSideExpression
+
|  var VariableDeclarationnoIn
+
+

Continue and Break Statements

+ +
+
ContinueStatement Þ continue OptionalLabel
+
+
+
BreakStatement Þ break OptionalLabel
+
+
+
OptionalLabel Þ
+
   «empty»
+
|  Identifier
+
+

Labeled Statements

+ +
+
LabeledStatementw Þ Identifier : Statementw
+
+

Return Statement

+ +
+
ReturnStatement Þ return OptionalExpression
+
+

Switch Statement

+ +
+
SwitchStatement Þ
+
   switch ( Expression ) { }
+
|  switch ( Expression ) { CaseGroups LastCaseGroup }
+
+
+
CaseGroups Þ
+
   «empty»
+
|  CaseGroups CaseGroup
+
+
+
CaseGroup Þ CaseGuards BlockStatementsPrefix
+
+
+
LastCaseGroup Þ CaseGuards BlockStatements
+
+
+
CaseGuards Þ
+
   CaseGuard
+
|  CaseGuards CaseGuard
+
+
+
CaseGuard Þ
+
   case Expression :
+
|  default :
+
+

Throw Statement

+ +
+
ThrowStatement Þ throw Expression
+
+

Try Statement

+ +
+
TryStatement Þ
+
   try Block CatchClauses
+
|  try Block FinallyClause
+
|  try Block CatchClauses FinallyClause
+
+
+
CatchClauses Þ
+
   CatchClause
+
|  CatchClauses CatchClause
+
+
+
CatchClause Þ catch ( Identifier ) Block
+
+
+
FinallyClause Þ finally Block
+
+

Functions

+ +
+
FunctionDeclaration Þ function Identifier ( FormalParameters ) { FunctionStatements }
+
+
+
FormalParameters Þ
+
   «empty»
+
|  FormalParametersPrefix
+
+
+
FormalParametersPrefix Þ
+
   Identifier
+
|  FormalParametersPrefix , Identifier
+
+
+
FunctionStatements Þ
+
   FunctionStatementabbrev
+
|  FunctionStatementsPrefix FunctionStatementabbrevNonEmpty
+
+
+
FunctionStatementsPrefix Þ
+
   FunctionStatementfull
+
|  FunctionStatementsPrefix FunctionStatementfull
+
+
+
FunctionStatementw Þ
+
   Statementw
+
|  FunctionDeclaration
+
+

Programs

+ +
+
Program Þ FunctionStatements
+
+ + diff --git a/mozilla/js2/semantics/JS14.lisp b/mozilla/js2/semantics/JS14.lisp new file mode 100644 index 00000000000..82faa35511a --- /dev/null +++ b/mozilla/js2/semantics/JS14.lisp @@ -0,0 +1,361 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1999 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; Sample JavaScript 1.x grammar +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + +(declaim (optimize (debug 3))) + +(progn + (defparameter *jw* + (generate-world + "J" + '((grammar code-grammar :lr-1 :program) + + (%section "Expressions") + + (%subsection "Primary Expressions") + (production :primary-expression (this) primary-expression-this) + (production :primary-expression (null) primary-expression-null) + (production :primary-expression (true) primary-expression-true) + (production :primary-expression (false) primary-expression-false) + (production :primary-expression ($number) primary-expression-number) + (production :primary-expression ($string) primary-expression-string) + (production :primary-expression ($identifier) primary-expression-identifier) + (production :primary-expression ($regular-expression) primary-expression-regular-expression) + (production :primary-expression (\( :expression \)) primary-expression-parentheses) + + + (%subsection "Left-Side Expressions") + (grammar-argument :chi allow-calls no-calls) + (grammar-argument :alpha allow-in no-in) + + (production (:member-expression no-calls) (:primary-expression) member-expression-primary-expression) + (production (:member-expression allow-calls) ((:member-expression no-calls) :arguments) call-expression-call-member-expression) + (production (:member-expression allow-calls) ((:member-expression allow-calls) :arguments) call-expression-call-call-expression) + (production (:member-expression :chi) ((:member-expression :chi) \[ :expression \]) member-expression-array) + (production (:member-expression :chi) ((:member-expression :chi) \. $identifier) member-expression-property) + (production (:member-expression no-calls) (new (:member-expression no-calls) :arguments) member-expression-new) + + (production :new-expression ((:member-expression no-calls)) new-expression-member-expression) + (production :new-expression (new :new-expression) new-expression-new) + + (production :arguments (\( \)) arguments-empty) + (production :arguments (\( :argument-list \)) arguments-list) + + (production :argument-list ((:assignment-expression allow-in)) argument-list-one) + (production :argument-list (:argument-list \, (:assignment-expression allow-in)) argument-list-more) + + (production :left-side-expression (:new-expression) left-side-expression-new-expression) + (production :left-side-expression ((:member-expression allow-calls)) left-side-expression-call-expression) + + + (%subsection "Postfix Expressions") + (production :postfix-expression (:left-side-expression) postfix-expression-left-side-expression) + (production :postfix-expression (:left-side-expression ++) postfix-expression-increment) + (production :postfix-expression (:left-side-expression --) postfix-expression-decrement) + + + (%subsection "Unary Operators") + (production :unary-expression (:postfix-expression) unary-expression-postfix) + (production :unary-expression (delete :left-side-expression) unary-expression-delete) + (production :unary-expression (void :unary-expression) unary-expression-void) + (production :unary-expression (typeof :unary-expression) unary-expression-typeof) + (production :unary-expression (++ :left-side-expression) unary-expression-increment) + (production :unary-expression (-- :left-side-expression) unary-expression-decrement) + (production :unary-expression (+ :unary-expression) unary-expression-plus) + (production :unary-expression (- :unary-expression) unary-expression-minus) + (production :unary-expression (~ :unary-expression) unary-expression-bitwise-not) + (production :unary-expression (! :unary-expression) unary-expression-logical-not) + + + (%subsection "Multiplicative Operators") + (production :multiplicative-expression (:unary-expression) multiplicative-expression-unary) + (production :multiplicative-expression (:multiplicative-expression * :unary-expression) multiplicative-expression-multiply) + (production :multiplicative-expression (:multiplicative-expression / :unary-expression) multiplicative-expression-divide) + (production :multiplicative-expression (:multiplicative-expression % :unary-expression) multiplicative-expression-remainder) + + + (%subsection "Additive Operators") + (production :additive-expression (:multiplicative-expression) additive-expression-multiplicative) + (production :additive-expression (:additive-expression + :multiplicative-expression) additive-expression-add) + (production :additive-expression (:additive-expression - :multiplicative-expression) additive-expression-subtract) + + + (%subsection "Bitwise Shift Operators") + (production :shift-expression (:additive-expression) shift-expression-additive) + (production :shift-expression (:shift-expression << :additive-expression) shift-expression-left) + (production :shift-expression (:shift-expression >> :additive-expression) shift-expression-right-signed) + (production :shift-expression (:shift-expression >>> :additive-expression) shift-expression-right-unsigned) + + + (%subsection "Relational Operators") + (production (:relational-expression :alpha) (:shift-expression) relational-expression-shift) + (production (:relational-expression :alpha) ((:relational-expression :alpha) < :shift-expression) relational-expression-less) + (production (:relational-expression :alpha) ((:relational-expression :alpha) > :shift-expression) relational-expression-greater) + (production (:relational-expression :alpha) ((:relational-expression :alpha) <= :shift-expression) relational-expression-less-or-equal) + (production (:relational-expression :alpha) ((:relational-expression :alpha) >= :shift-expression) relational-expression-greater-or-equal) + (production (:relational-expression :alpha) ((:relational-expression :alpha) instanceof :shift-expression) relational-expression-instanceof) + (production (:relational-expression allow-in) ((:relational-expression allow-in) in :shift-expression) relational-expression-in) + + + (%subsection "Equality Operators") + (production (:equality-expression :alpha) ((:relational-expression :alpha)) equality-expression-relational) + (production (:equality-expression :alpha) ((:equality-expression :alpha) == (:relational-expression :alpha)) equality-expression-equal) + (production (:equality-expression :alpha) ((:equality-expression :alpha) != (:relational-expression :alpha)) equality-expression-not-equal) + (production (:equality-expression :alpha) ((:equality-expression :alpha) === (:relational-expression :alpha)) equality-expression-strict-equal) + (production (:equality-expression :alpha) ((:equality-expression :alpha) !== (:relational-expression :alpha)) equality-expression-strict-not-equal) + + + (%subsection "Binary Bitwise Operators") + (production (:bitwise-and-expression :alpha) ((:equality-expression :alpha)) bitwise-and-expression-equality) + (production (:bitwise-and-expression :alpha) ((:bitwise-and-expression :alpha) & (:equality-expression :alpha)) bitwise-and-expression-and) + + (production (:bitwise-xor-expression :alpha) ((:bitwise-and-expression :alpha)) bitwise-xor-expression-bitwise-and) + (production (:bitwise-xor-expression :alpha) ((:bitwise-xor-expression :alpha) ^ (:bitwise-and-expression :alpha)) bitwise-xor-expression-xor) + + (production (:bitwise-or-expression :alpha) ((:bitwise-xor-expression :alpha)) bitwise-or-expression-bitwise-xor) + (production (:bitwise-or-expression :alpha) ((:bitwise-or-expression :alpha) \| (:bitwise-xor-expression :alpha)) bitwise-or-expression-or) + + + (%subsection "Binary Logical Operators") + (production (:logical-and-expression :alpha) ((:bitwise-or-expression :alpha)) logical-and-expression-bitwise-or) + (production (:logical-and-expression :alpha) ((:logical-and-expression :alpha) && (:bitwise-or-expression :alpha)) logical-and-expression-and) + + (production (:logical-or-expression :alpha) ((:logical-and-expression :alpha)) logical-or-expression-logical-and) + (production (:logical-or-expression :alpha) ((:logical-or-expression :alpha) \|\| (:logical-and-expression :alpha)) logical-or-expression-or) + + + (%subsection "Conditional Operator") + (production (:conditional-expression :alpha) ((:logical-or-expression :alpha)) conditional-expression-logical-or) + (production (:conditional-expression :alpha) ((:logical-or-expression :alpha) ? (:assignment-expression :alpha) \: (:assignment-expression :alpha)) conditional-expression-conditional) + + + (%subsection "Assignment Operators") + (production (:assignment-expression :alpha) ((:conditional-expression :alpha)) assignment-expression-conditional) + (production (:assignment-expression :alpha) (:left-side-expression = (:assignment-expression :alpha)) assignment-expression-assignment) + (production (:assignment-expression :alpha) (:left-side-expression :compound-assignment (:assignment-expression :alpha)) assignment-expression-compound) + + (production :compound-assignment (*=) compound-assignment-multiply) + (production :compound-assignment (/=) compound-assignment-divide) + (production :compound-assignment (%=) compound-assignment-remainder) + (production :compound-assignment (+=) compound-assignment-add) + (production :compound-assignment (-=) compound-assignment-subtract) + + + (%subsection "Expressions") + (production (:comma-expression :alpha) ((:assignment-expression :alpha)) comma-expression-assignment) + + (production :expression ((:comma-expression allow-in)) expression-comma-expression) + + (production :optional-expression (:expression) optional-expression-expression) + (production :optional-expression () optional-expression-empty) + + + (%section "Statements") + + (grammar-argument :omega + abbrev ;optional semicolon + abbrev-non-empty ;optional semicolon as long as statement isn't empty + abbrev-no-short-if ;optional semicolon, but statement must not end with an if without an else + full) ;semicolon required at the end + + (production (:statement :omega) (:blocklike-statement) statement-blocklike-statement) + (production (:statement :omega) (:unterminated-statement \;) statement-unterminated-statement) + (production (:statement :omega) ((:nonuniform-statement :omega)) statement-nonuniform-statement) + (production (:statement :omega) ((:if-statement :omega)) statement-if-statement) + (production (:statement :omega) ((:while-statement :omega)) statement-while-statement) + (production (:statement :omega) ((:for-statement :omega)) statement-for-statement) + (production (:statement :omega) ((:labeled-statement :omega)) statement-labeled-statement) + + ;Statements that differ depending on omega + (production (:nonuniform-statement :omega) (:empty-statement \;) nonuniform-statement-empty-statement) + (production (:nonuniform-statement abbrev) (:empty-statement) nonuniform-statement-empty-statement-abbrev) + (production (:nonuniform-statement abbrev) (:unterminated-statement) nonuniform-statement-unterminated-statement-abbrev) + (production (:nonuniform-statement abbrev-non-empty) (:unterminated-statement) nonuniform-statement-unterminated-statement-abbrev-non-empty) + (production (:nonuniform-statement abbrev-no-short-if) (:unterminated-statement) nonuniform-statement-unterminated-statement-abbrev-no-short-if) + (production (:nonuniform-statement abbrev-no-short-if) (:empty-statement) nonuniform-statement-empty-statement-abbrev-no-short-if) + + ;Statements that always end with a '}' + (production :blocklike-statement (:block) blocklike-statement-block) + (production :blocklike-statement (:switch-statement) blocklike-statement-switch-statement) + (production :blocklike-statement (:try-statement) blocklike-statement-try-statement) + + ;Statements that must be followed by a semicolon unless followed by a '}', 'else', or 'while' in a do-while + (production :unterminated-statement (:variable-statement) unterminated-statement-variable-statement) + (production :unterminated-statement (:expression-statement) unterminated-statement-expression-statement) + (production :unterminated-statement (:do-statement) unterminated-statement-do-statement) + (production :unterminated-statement (:continue-statement) unterminated-statement-continue-statement) + (production :unterminated-statement (:break-statement) unterminated-statement-break-statement) + (production :unterminated-statement (:return-statement) unterminated-statement-return-statement) + (production :unterminated-statement (:throw-statement) unterminated-statement-throw-statement) + + + (%subsection "Block") + (production :block ({ :block-statements }) block-block-statements) + + (production :block-statements ((:statement abbrev)) block-statements-one) + (production :block-statements (:block-statements-prefix (:statement abbrev-non-empty)) block-statements-more) + + (production :block-statements-prefix ((:statement full)) block-statements-prefix-one) + (production :block-statements-prefix (:block-statements-prefix (:statement full)) block-statements-prefix-more) + + + (%subsection "Variable Statement") + (production :variable-statement (var (:variable-declaration-list allow-in)) variable-statement-declaration) + + (production (:variable-declaration-list :alpha) ((:variable-declaration :alpha)) variable-declaration-list-one) + (production (:variable-declaration-list :alpha) ((:variable-declaration-list :alpha) \, (:variable-declaration :alpha)) variable-declaration-list-more) + + (production (:variable-declaration :alpha) ($identifier) variable-declaration-identifier) + (production (:variable-declaration :alpha) ($identifier = (:assignment-expression :alpha)) variable-declaration-initializer) + + + (%subsection "Empty Statement") + (production :empty-statement () empty-statement-empty) + + + (%subsection "Expression Statement") + (production :expression-statement (:expression) expression-statement-expression) + + + (%subsection "If Statement") + (production (:if-statement abbrev) (if \( :expression \) (:statement abbrev)) if-statement-if-then-abbrev) + (production (:if-statement abbrev-non-empty) (if \( :expression \) (:statement abbrev-non-empty)) if-statement-if-then-abbrev-non-empty) + (production (:if-statement full) (if \( :expression \) (:statement full)) if-statement-if-then-full) + (production (:if-statement :omega) (if \( :expression \) (:statement abbrev-no-short-if) + else (:statement :omega)) if-statement-if-then-else) + + + (%subsection "Do-While Statement") + (production :do-statement (do (:statement abbrev-non-empty) while \( :expression \)) do-statement-do-while) + + + (%subsection "While Statement") + (production (:while-statement :omega) (while \( :expression \) (:statement :omega)) while-statement-while) + + + (%subsection "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 \) (:statement :omega)) for-statement-in) + + (production :for-initializer () for-initializer-empty) + (production :for-initializer ((:comma-expression no-in)) for-initializer-expression) + (production :for-initializer (var (:variable-declaration-list no-in)) for-initializer-variable-declaration) + + (production :for-in-binding (:left-side-expression) for-in-binding-expression) + (production :for-in-binding (var (:variable-declaration no-in)) for-in-binding-variable-declaration) + + + (%subsection "Continue and Break Statements") + (production :continue-statement (continue :optional-label) continue-statement-optional-label) + + (production :break-statement (break :optional-label) break-statement-optional-label) + + (production :optional-label () optional-label-default) + (production :optional-label ($identifier) optional-label-identifier) + + + (%subsection "Labeled Statements") + (production (:labeled-statement :omega) ($identifier \: (:statement :omega)) labeled-statement-label) + + + (%subsection "Return Statement") + (production :return-statement (return :optional-expression) return-statement-optional-expression) + + + (%subsection "Switch Statement") + (production :switch-statement (switch \( :expression \) { }) switch-statement-empty) + (production :switch-statement (switch \( :expression \) { :case-groups :last-case-group }) switch-statement-cases) + + (production :case-groups () case-groups-empty) + (production :case-groups (:case-groups :case-group) case-groups-more) + + (production :case-group (:case-guards :block-statements-prefix) case-group-block-statements-prefix) + + (production :last-case-group (:case-guards :block-statements) last-case-group-block-statements) + + (production :case-guards (:case-guard) case-guards-one) + (production :case-guards (:case-guards :case-guard) case-guards-more) + + (production :case-guard (case :expression \:) case-guard-case) + (production :case-guard (default \:) case-guard-default) + + + (%subsection "Throw Statement") + (production :throw-statement (throw :expression) throw-statement-throw) + + + (%subsection "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) + + (production :catch-clauses (:catch-clause) catch-clauses-one) + (production :catch-clauses (:catch-clauses :catch-clause) catch-clauses-more) + + (production :catch-clause (catch \( $identifier \) :block) catch-clause-block) + + (production :finally-clause (finally :block) finally-clause-block) + + + (%section "Functions") + + (production :function-declaration (function $identifier \( :formal-parameters \) { :function-statements }) function-declaration-statements) + + (production :formal-parameters () formal-parameters-none) + (production :formal-parameters (:formal-parameters-prefix) formal-parameters-some) + + (production :formal-parameters-prefix ($identifier) formal-parameters-prefix-one) + (production :formal-parameters-prefix (:formal-parameters-prefix \, $identifier) formal-parameters-prefix-more) + + (production :function-statements ((:function-statement abbrev)) function-statements-one) + (production :function-statements (:function-statements-prefix (:function-statement abbrev-non-empty)) function-statements-more) + + (production :function-statements-prefix ((:function-statement full)) function-statements-prefix-one) + (production :function-statements-prefix (:function-statements-prefix (:function-statement full)) function-statements-prefix-more) + + (production (:function-statement :omega) ((:statement :omega)) function-statement-statement) + (production (:function-statement :omega) (:function-declaration) function-statement-function-declaration) + + + (%section "Programs") + + (production :program (:function-statements) program) + ))) + + (defparameter *jg* (world-grammar *jw* 'code-grammar))) + + +#| +(let ((*visible-modes* nil)) + (depict-rtf-to-local-file + "JS14.rtf" + #'(lambda (rtf-stream) + (depict-world-commands rtf-stream *jw*)))) + +(let ((*visible-modes* nil)) + (depict-html-to-local-file + "JS14.html" + #'(lambda (rtf-stream) + (depict-world-commands rtf-stream *jw*)) + "JavaScript 2.0 Grammar")) + +(with-local-output (s "JS14.txt") (print-grammar *jg* s)) +|# diff --git a/mozilla/js2/semantics/JS14.rtf b/mozilla/js2/semantics/JS14.rtf new file mode 100644 index 00000000000..26b3de9aa8b --- /dev/null +++ b/mozilla/js2/semantics/JS14.rtf @@ -0,0 +1,700 @@ +{\rtf1\mac\ansicpg10000\uc1\deff0\deflang2057\deflangfe2057 +{\fonttbl{\f0\froman\fcharset256\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\f3\ftech\fcharset2\fprq2 Symbol;}{\f4\fnil\fcharset256\fprq2 Helvetica;} +{\f5\fmodern\fcharset256\fprq2 Courier New;}{\f6\fnil\fcharset256\fprq2 Palatino;} +{\f7\fscript\fcharset256\fprq2 Zapf Chancery;}{\f8\ftech\fcharset2\fprq2 Zapf Dingbats;}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; +\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0 +\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0 +\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;} +{\stylesheet{\widctlpar\fs20\lang2057\snext0 Normal;} +{\s1\qj\sa120\widctlpar\fs20\lang2057\sbasedon0\snext1 Body Text;} +{\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057\sbasedon3\snext1 heading 3;} +{\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057\sbasedon0\snext1 heading 4;} +{\s10\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext10 Grammar;} +{\s11\sb60\keep\keepn\nowidctlpar\hyphpar0\b\fs20\lang2057\sbasedon0\snext12 Grammar Header;} +{\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext14 Grammar LHS;} +{\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar LHS Last;} +{\s14\fi-1260\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon10\snext14 Grammar +RHS;} +{\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024\sbasedon14\snext12 Grammar +RHS Last;} +{\s16\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024\sbasedon10 +\snext12 Grammar Argument;} +{\s20\li180\sb60\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon0\snext20 Semantics;} +{\s21\li540\sa60\keep\nowidctlpar\hyphpar0\fs20\lang1024\sbasedon20\snext21 Semantics Next;} +{\*\cs30\additive Default Paragraph Font;} +{\*\cs31\b\f5\cf2\lang1024\additive\sbasedon30 Character Literal;} +{\*\cs32\b0\f0\cf9\additive\sbasedon30 Character Literal Control;} +{\*\cs33\b\f6\cf10\lang1024\additive\sbasedon30 Terminal;} +{\*\cs34\b\f5\cf2\lang1024\additive\sbasedon33 Terminal Keyword;} +{\*\cs35\i\f6\cf13\lang1024\additive\sbasedon30 Nonterminal;} +{\*\cs36\i0\additive\sbasedon30 Nonterminal Attribute;} +{\*\cs37\additive\sbasedon30 Nonterminal Argument;} +{\*\cs40\b\f0\additive\sbasedon30 Semantic Keyword;} +{\*\cs41\f0\cf6\lang1024\additive\sbasedon30 Type Expression;} +{\*\cs42\scaps\f0\cf6\lang1024\additive\sbasedon41 Type Name;} +{\*\cs43\f4\cf6\lang1024\additive\sbasedon41 Field Name;} +{\*\cs44\i\f0\cf11\lang1024\additive\sbasedon30 Global Variable;} +{\*\cs45\i\f0\cf4\lang1024\additive\sbasedon30 Local Variable;} +{\*\cs46\f7\cf12\lang1024\additive\sbasedon30 Action Name;}} +\widowctrl\ftnbj\aenddoc\fet0\formshade\viewkind4\viewscale125\pgbrdrhead\pgbrdrfoot\sectd\pard +\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Expressions\par\pard\plain\s3 +\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Primary Expressions\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PrimaryExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 this}\par| +\tab{\cs34\b\f5\cf2\lang1024 null}\par|\tab{\cs34\b\f5\cf2\lang1024 true}\par|\tab +{\cs34\b\f5\cf2\lang1024 false}\par|\tab{\cs33\b\f6\cf10\lang1024 Number}\par|\tab +{\cs33\b\f6\cf10\lang1024 String}\par|\tab{\cs33\b\f6\cf10\lang1024 Identifier}\par|\tab +{\cs33\b\f6\cf10\lang1024 RegularExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024(} +{\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)}\par\pard\plain\s3\sa30\keep\keepn +\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Left-Side Expressions\par\pard\plain\s16\fi-1440\li1800 +\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024\cs37{\field{\*\fldinst SYMBOL 99 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +{\field{\*\fldinst SYMBOL 206 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \{ +{\cs35\i\f6\cf13\lang1024\cs36\i0 allowCalls}, {\cs35\i\f6\cf13\lang1024\cs36\i0 noCalls}\}\par +{\cs35\i\f6\cf13\lang1024\cs37{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +{\field{\*\fldinst SYMBOL 206 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \{ +{\cs35\i\f6\cf13\lang1024\cs36\i0 allowIn}, {\cs35\i\f6\cf13\lang1024\cs36\i0 noIn}\}\par\pard\plain +\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 noCalls} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 PrimaryExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 noCalls} {\cs34\b\f5\cf2\lang1024[} +{\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024]}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 noCalls} {\cs34\b\f5\cf2\lang1024.} +{\cs33\b\f6\cf10\lang1024 Identifier}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720 +\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 new} +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 noCalls} +{\cs35\i\f6\cf13\lang1024 Arguments}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 allowCalls} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 noCalls} +{\cs35\i\f6\cf13\lang1024 Arguments}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 allowCalls} +{\cs35\i\f6\cf13\lang1024 Arguments}\par|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 allowCalls} {\cs34\b\f5\cf2\lang1024[} +{\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024]}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 allowCalls} {\cs34\b\f5\cf2\lang1024.} +{\cs33\b\f6\cf10\lang1024 Identifier}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 NewExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 noCalls}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 new} +{\cs35\i\f6\cf13\lang1024 NewExpression}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 Arguments} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024(} +{\cs34\b\f5\cf2\lang1024)}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0 +\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 ArgumentList} +{\cs34\b\f5\cf2\lang1024)}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ArgumentList} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 allowIn}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 ArgumentList} {\cs34\b\f5\cf2\lang1024,} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs36\i0 allowIn}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LeftSideExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 NewExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 MemberExpression\super\cs36\i0 allowCalls}\par\pard\plain\s3\sa30\keep +\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Postfix Expressions\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 PostfixExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LeftSideExpression}\par|\tab{\cs35\i\f6\cf13\lang1024 LeftSideExpression} +{\cs34\b\f5\cf2\lang1024 ++}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0 +\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 LeftSideExpression} {\cs34\b\f5\cf2\lang1024 --}\par +\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Unary Operators\par\pard +\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 UnaryExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 PostfixExpression}\par|\tab{\cs34\b\f5\cf2\lang1024 delete} +{\cs35\i\f6\cf13\lang1024 LeftSideExpression}\par|\tab{\cs34\b\f5\cf2\lang1024 void} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par|\tab{\cs34\b\f5\cf2\lang1024 typeof} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par|\tab{\cs34\b\f5\cf2\lang1024 ++} +{\cs35\i\f6\cf13\lang1024 LeftSideExpression}\par|\tab{\cs34\b\f5\cf2\lang1024 --} +{\cs35\i\f6\cf13\lang1024 LeftSideExpression}\par|\tab{\cs34\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par|\tab{\cs34\b\f5\cf2\lang1024 -} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par|\tab{\cs34\b\f5\cf2\lang1024~} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024!} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0 +\level4\b\fs20\lang2057 Multiplicative Operators\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression} {\cs34\b\f5\cf2\lang1024*} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression} {\cs34\b\f5\cf2\lang1024/} +{\cs35\i\f6\cf13\lang1024 UnaryExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression} +{\cs34\b\f5\cf2\lang1024%} {\cs35\i\f6\cf13\lang1024 UnaryExpression}\par\pard\plain\s3\sa30\keep +\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Additive Operators\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 AdditiveExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 AdditiveExpression} {\cs34\b\f5\cf2\lang1024 +} +{\cs35\i\f6\cf13\lang1024 MultiplicativeExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 AdditiveExpression} +{\cs34\b\f5\cf2\lang1024 -} {\cs35\i\f6\cf13\lang1024 MultiplicativeExpression}\par\pard\plain\s3 +\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Bitwise Shift Operators\par\pard\plain +\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ShiftExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 AdditiveExpression}\par|\tab{\cs35\i\f6\cf13\lang1024 ShiftExpression} +{\cs34\b\f5\cf2\lang1024<<} {\cs35\i\f6\cf13\lang1024 AdditiveExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 ShiftExpression} {\cs34\b\f5\cf2\lang1024>>} +{\cs35\i\f6\cf13\lang1024 AdditiveExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 ShiftExpression} +{\cs34\b\f5\cf2\lang1024>>>} {\cs35\i\f6\cf13\lang1024 AdditiveExpression}\par\pard\plain\s3\sa30 +\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Relational Operators\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 allowIn} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 allowIn} {\cs34\b\f5\cf2\lang1024<} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 allowIn} {\cs34\b\f5\cf2\lang1024>} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 allowIn} {\cs34\b\f5\cf2\lang1024<=} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 allowIn} {\cs34\b\f5\cf2\lang1024>=} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 allowIn} +{\cs34\b\f5\cf2\lang1024 instanceof} {\cs35\i\f6\cf13\lang1024 ShiftExpression}\par\pard\plain\s15 +\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 allowIn} {\cs34\b\f5\cf2\lang1024 in} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 noIn} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 noIn} {\cs34\b\f5\cf2\lang1024<} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 noIn} {\cs34\b\f5\cf2\lang1024>} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 noIn} {\cs34\b\f5\cf2\lang1024<=} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par|\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 noIn} {\cs34\b\f5\cf2\lang1024>=} +{\cs35\i\f6\cf13\lang1024 ShiftExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs36\i0 noIn} + {\cs34\b\f5\cf2\lang1024 instanceof} {\cs35\i\f6\cf13\lang1024 ShiftExpression}\par\pard\plain\s3 +\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Equality Operators\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024==} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024!=} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024===} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024!==} +{\cs35\i\f6\cf13\lang1024 RelationalExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Binary Bitwise Operat +ors\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20 +\lang1024 +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024&} +{\cs35\i\f6\cf13\lang1024 EqualityExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024^} +{\cs35\i\f6\cf13\lang1024 BitwiseAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024|} +{\cs35\i\f6\cf13\lang1024 BitwiseXorExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Binary Logical Operat +ors\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20 +\lang1024 +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024&&} +{\cs35\i\f6\cf13\lang1024 BitwiseOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024||} +{\cs35\i\f6\cf13\lang1024 LogicalAndExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Conditional Operator +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LogicalOrExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024?} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024:} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Assignment Operators +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 ConditionalExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par|\tab{\cs35\i\f6\cf13\lang1024 LeftSideExpression} {\cs34\b\f5\cf2\lang1024=} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LeftSideExpression} {\cs35\i\f6\cf13\lang1024 CompoundAssignment} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CompoundAssignment} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024*=}\par|\tab +{\cs34\b\f5\cf2\lang1024/=}\par|\tab{\cs34\b\f5\cf2\lang1024%=}\par|\tab{\cs34\b\f5\cf2\lang1024 +=} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs34\b\f5\cf2\lang1024 -=}\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20 +\lang2057 Expressions\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par{\cs35\i\f6\cf13\lang1024 Expression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 allowIn}\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 OptionalExpression} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 Expression} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab\u171\'C7 +empty\u187\'C8\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Stateme +nts\par\pard\plain\s16\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20 +\lang1024 +{\cs35\i\f6\cf13\lang1024\cs37{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 206 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \{ +{\cs35\i\f6\cf13\lang1024\cs36\i0 abbrev}, {\cs35\i\f6\cf13\lang1024\cs36\i0 abbrevNonEmpty}, +{\cs35\i\f6\cf13\lang1024\cs36\i0 abbrevNoShortIf}, {\cs35\i\f6\cf13\lang1024\cs36\i0 full}\}\par +\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 Statement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 BlocklikeStatement}\par|\tab +{\cs35\i\f6\cf13\lang1024 UnterminatedStatement} {\cs34\b\f5\cf2\lang1024;}\par|\tab +{\cs35\i\f6\cf13\lang1024 NonuniformStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par|\tab +{\cs35\i\f6\cf13\lang1024 IfStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par|\tab +{\cs35\i\f6\cf13\lang1024 WhileStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par|\tab +{\cs35\i\f6\cf13\lang1024 ForStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 LabeledStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NonuniformStatement\super\cs36\i0 abbrev} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 EmptyStatement} {\cs34\b\f5\cf2\lang1024;}\par|\tab +{\cs35\i\f6\cf13\lang1024 EmptyStatement}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 UnterminatedStatement}\par\pard\plain +\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NonuniformStatement\super\cs36\i0 abbrevNonEmpty} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 EmptyStatement} {\cs34\b\f5\cf2\lang1024;}\par\pard\plain\s15\fi-1260 +\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 UnterminatedStatement}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NonuniformStatement\super\cs36\i0 abbrevNoShortIf} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 EmptyStatement} {\cs34\b\f5\cf2\lang1024;}\par|\tab +{\cs35\i\f6\cf13\lang1024 UnterminatedStatement}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 EmptyStatement}\par\pard +\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 NonuniformStatement\super\cs36\i0 full} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 EmptyStatement} {\cs34\b\f5\cf2\lang1024;}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BlocklikeStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 Block}\par| +\tab{\cs35\i\f6\cf13\lang1024 SwitchStatement}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 TryStatement}\par\pard\plain +\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 UnterminatedStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 VariableStatement}\par|\tab{\cs35\i\f6\cf13\lang1024 ExpressionStatement} +\par|\tab{\cs35\i\f6\cf13\lang1024 DoStatement}\par|\tab{\cs35\i\f6\cf13\lang1024 ContinueStatement} +\par|\tab{\cs35\i\f6\cf13\lang1024 BreakStatement}\par|\tab +{\cs35\i\f6\cf13\lang1024 ReturnStatement}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 ThrowStatement}\par\pard\plain\s3\sa30 +\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Block\par\pard\plain\s13\fi-1440\li1800 +\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 Block} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024\{} +{\cs35\i\f6\cf13\lang1024 BlockStatements} {\cs34\b\f5\cf2\lang1024\}}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BlockStatements} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrev}\par\pard\plain\s15\fi-1260\li1800\sa120 +\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 BlockStatementsPrefix} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNonEmpty}\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 BlockStatementsPrefix} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 full}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 BlockStatementsPrefix} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 full}\par\pard\plain\s3\sa30\keep\keepn +\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Variable Statement\par\pard\plain\s13\fi-1440\li1800 +\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 VariableStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 var} +{\cs35\i\f6\cf13\lang1024 VariableDeclarationList\super\cs36\i0 allowIn}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 VariableDeclarationList\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 VariableDeclaration\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 VariableDeclarationList\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\cs34\b\f5\cf2\lang1024,} +{\cs35\i\f6\cf13\lang1024 VariableDeclaration\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 VariableDeclaration\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024 Identifier} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs33\b\f6\cf10\lang1024 Identifier} {\cs34\b\f5\cf2\lang1024=} +{\cs35\i\f6\cf13\lang1024 AssignmentExpression\super\cs37 +{\field{\*\fldinst SYMBOL 97 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Empty Statement\par +\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 EmptyStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} \u171\'C7empty\u187\'C8\par +\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Expression Statement\par +\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ExpressionStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 Expression}\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4 +\b\fs20\lang2057 If Statement\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 IfStatement\super\cs36\i0 abbrev} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 if} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrev}\par\pard\plain\s15\fi-1260\li1800\sa120 +\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 if} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNoShortIf} {\cs34\b\f5\cf2\lang1024 else} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrev}\par\pard\plain\s12\fi-1440\li1800\sb120 +\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 IfStatement\super\cs36\i0 abbrevNonEmpty} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 if} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNonEmpty}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 if} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNoShortIf} {\cs34\b\f5\cf2\lang1024 else} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNonEmpty}\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 IfStatement\super\cs36\i0 full} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 if} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 full}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 if} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNoShortIf} {\cs34\b\f5\cf2\lang1024 else} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 full}\par\pard\plain\s13\fi-1440\li1800\sb120 +\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 IfStatement\super\cs36\i0 abbrevNoShortIf} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 if} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNoShortIf} {\cs34\b\f5\cf2\lang1024 else} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNoShortIf}\par\pard\plain\s3\sa30\keep\keepn +\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Do-While Statement\par\pard\plain\s13\fi-1440\li1800 +\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 DoStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} {\cs34\b\f5\cf2\lang1024 do} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs36\i0 abbrevNonEmpty} {\cs34\b\f5\cf2\lang1024 while} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)}\par\pard +\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 While Statement\par\pard\plain +\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 WhileStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 while} {\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} +{\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 For Statements\par +\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ForStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 for} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 ForInitializer} {\cs34\b\f5\cf2\lang1024;} +{\cs35\i\f6\cf13\lang1024 OptionalExpression} {\cs34\b\f5\cf2\lang1024;} +{\cs35\i\f6\cf13\lang1024 OptionalExpression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs34\b\f5\cf2\lang1024 for} {\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 ForInBinding} +{\cs34\b\f5\cf2\lang1024 in} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ForInitializer} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par|\tab +{\cs35\i\f6\cf13\lang1024 CommaExpression\super\cs36\i0 noIn}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 var} +{\cs35\i\f6\cf13\lang1024 VariableDeclarationList\super\cs36\i0 noIn}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ForInBinding} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 LeftSideExpression}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 var} +{\cs35\i\f6\cf13\lang1024 VariableDeclaration\super\cs36\i0 noIn}\par\pard\plain\s3\sa30\keep\keepn +\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Continue and Break Statements\par\pard\plain\s13 +\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ContinueStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 continue} {\cs35\i\f6\cf13\lang1024 OptionalLabel}\par +{\cs35\i\f6\cf13\lang1024 BreakStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 break} {\cs35\i\f6\cf13\lang1024 OptionalLabel}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 OptionalLabel} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs33\b\f6\cf10\lang1024 Identifier}\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4 +\b\fs20\lang2057 Labeled Statements\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 LabeledStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs33\b\f6\cf10\lang1024 Identifier} {\cs34\b\f5\cf2\lang1024:} +{\cs35\i\f6\cf13\lang1024 Statement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Return Statement\par +\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 ReturnStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 return} {\cs35\i\f6\cf13\lang1024 OptionalExpression}\par\pard\plain\s3 +\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Switch Statement\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 SwitchStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 switch} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs34\b\f5\cf2\lang1024\{} {\cs34\b\f5\cf2\lang1024\}}\par\pard\plain\s15\fi-1260\li1800\sa120\keep +\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 switch} +{\cs34\b\f5\cf2\lang1024(} {\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024)} +{\cs34\b\f5\cf2\lang1024\{} {\cs35\i\f6\cf13\lang1024 CaseGroups} +{\cs35\i\f6\cf13\lang1024 LastCaseGroup} {\cs34\b\f5\cf2\lang1024\}}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CaseGroups} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 CaseGroups} {\cs35\i\f6\cf13\lang1024 CaseGroup}\par\pard\plain\s13 +\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CaseGroup} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 CaseGuards} {\cs35\i\f6\cf13\lang1024 BlockStatementsPrefix}\par +{\cs35\i\f6\cf13\lang1024 LastCaseGroup} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 CaseGuards} {\cs35\i\f6\cf13\lang1024 BlockStatements}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CaseGuards} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs35\i\f6\cf13\lang1024 CaseGuard} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 CaseGuards} {\cs35\i\f6\cf13\lang1024 CaseGuard}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CaseGuard} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 case} +{\cs35\i\f6\cf13\lang1024 Expression} {\cs34\b\f5\cf2\lang1024:}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 default} +{\cs34\b\f5\cf2\lang1024:}\par\pard\plain\s3\sa30\keep\keepn\nowidctlpar\hyphpar0\level4\b\fs20 +\lang2057 Throw Statement\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep\nowidctlpar\hyphpar0 +\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 ThrowStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 throw} {\cs35\i\f6\cf13\lang1024 Expression}\par\pard\plain\s3\sa30\keep +\keepn\nowidctlpar\hyphpar0\level4\b\fs20\lang2057 Try Statement\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 TryStatement} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs34\b\f5\cf2\lang1024 try} +{\cs35\i\f6\cf13\lang1024 Block} {\cs35\i\f6\cf13\lang1024 CatchClauses}\par|\tab +{\cs34\b\f5\cf2\lang1024 try} {\cs35\i\f6\cf13\lang1024 Block} +{\cs35\i\f6\cf13\lang1024 FinallyClause}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs34\b\f5\cf2\lang1024 try} {\cs35\i\f6\cf13\lang1024 Block} +{\cs35\i\f6\cf13\lang1024 CatchClauses} {\cs35\i\f6\cf13\lang1024 FinallyClause}\par\pard\plain\s12 +\fi-1440\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 CatchClauses} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 CatchClause}\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar +\tx720\hyphpar0\fs20\lang1024|\tab{\cs35\i\f6\cf13\lang1024 CatchClauses} +{\cs35\i\f6\cf13\lang1024 CatchClause}\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 CatchClause} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 catch} {\cs34\b\f5\cf2\lang1024(} {\cs33\b\f6\cf10\lang1024 Identifier} +{\cs34\b\f5\cf2\lang1024)} {\cs35\i\f6\cf13\lang1024 Block}\par +{\cs35\i\f6\cf13\lang1024 FinallyClause} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 finally} {\cs35\i\f6\cf13\lang1024 Block}\par\pard\plain\s2\sa60\keep\keepn +\nowidctlpar\hyphpar0\level3\b\fs24\lang2057 Functions\par\pard\plain\s13\fi-1440\li1800\sb120\sa120 +\keep\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 FunctionDeclaration} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs34\b\f5\cf2\lang1024 function} {\cs33\b\f6\cf10\lang1024 Identifier} {\cs34\b\f5\cf2\lang1024(} +{\cs35\i\f6\cf13\lang1024 FormalParameters} {\cs34\b\f5\cf2\lang1024)} {\cs34\b\f5\cf2\lang1024\{} +{\cs35\i\f6\cf13\lang1024 FunctionStatements} {\cs34\b\f5\cf2\lang1024\}}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 FormalParameters} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab\u171\'C7empty\u187\'C8\par\pard +\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 FormalParametersPrefix}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 FormalParametersPrefix} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab{\cs33\b\f6\cf10\lang1024 Identifier} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 FormalParametersPrefix} {\cs34\b\f5\cf2\lang1024,} +{\cs33\b\f6\cf10\lang1024 Identifier}\par\pard\plain\s12\fi-1440\li1800\sb120\keep\keepn\nowidctlpar +\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 FunctionStatements} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 FunctionStatement\super\cs36\i0 abbrev}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 FunctionStatementsPrefix} +{\cs35\i\f6\cf13\lang1024 FunctionStatement\super\cs36\i0 abbrevNonEmpty}\par\pard\plain\s12\fi-1440 +\li1800\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 FunctionStatementsPrefix} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 FunctionStatement\super\cs36\i0 full}\par\pard\plain\s15\fi-1260\li1800 +\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 FunctionStatementsPrefix} +{\cs35\i\f6\cf13\lang1024 FunctionStatement\super\cs36\i0 full}\par\pard\plain\s12\fi-1440\li1800 +\sb120\keep\keepn\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024 +{\cs35\i\f6\cf13\lang1024 FunctionStatement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} + {\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}\par\pard\plain\s14\fi-1260 +\li1800\keep\keepn\nowidctlpar\tx720\hyphpar0\fs20\lang1024\tab +{\cs35\i\f6\cf13\lang1024 Statement\super\cs37 +{\field{\*\fldinst SYMBOL 119 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}}} +\par\pard\plain\s15\fi-1260\li1800\sa120\keep\nowidctlpar\tx720\hyphpar0\fs20\lang1024|\tab +{\cs35\i\f6\cf13\lang1024 FunctionDeclaration}\par\pard\plain\s2\sa60\keep\keepn\nowidctlpar +\hyphpar0\level3\b\fs24\lang2057 Programs\par\pard\plain\s13\fi-1440\li1800\sb120\sa120\keep +\nowidctlpar\hyphpar0\outlinelevel4\fs20\lang1024{\cs35\i\f6\cf13\lang1024 Program} +{\field{\*\fldinst SYMBOL 222 \\f "Symbol" \\s 10}{\fldrslt\f3\fs20}} +{\cs35\i\f6\cf13\lang1024 FunctionStatements}\par} \ No newline at end of file diff --git a/mozilla/js2/semantics/Lexer.lisp b/mozilla/js2/semantics/Lexer.lisp new file mode 100644 index 00000000000..27287b618cc --- /dev/null +++ b/mozilla/js2/semantics/Lexer.lisp @@ -0,0 +1,624 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; Lexer grammar generator +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; A lexer grammar is an extension of a standard grammar that combines both parsing and combining +;;; characters into character classes. +;;; +;;; A lexer grammar is comprised of the following: +;;; a start nonterminal; +;;; a list of grammar productions, in which each terminal must be a character; +;;; a list of character classes, where each class is a list of: +;;; a nonterminal C; +;;; an expression that denotes the set of characters in character class C; +;;; a list of bindings, each containing: +;;; an action name; +;;; a lexer-action name; +;;; a list of lexer-action bindings, each containing: +;;; a lexer-action name; +;;; the type of this lexer-action's value; +;;; the name of a lisp function (char -> value) that performs the lexer-action on a character. +;;; +;;; Grammar productions may refer to character classes C as nonterminals. +;;; +;;; An expression can be any of the following: +;;; C The name of a previously defined character class. +;;; every The set of all characters +;;; (char1 char2 ... charn) The set of characters {char1, char2, ..., charn} +;;; (+ ... ) The set union of , ..., , +;;; which should be disjoint. +;;; (++ ... ) Same as +, but printed on separate lines. +;;; (- ) The set of characters in but not ; +;;; should be a subset of . + + +;;; ------------------------------------------------------------------------------------------------------ +;;; SETS OF CHARACTERS + +;;; A character set is represented by an integer. +;;; The set may be infinite as long as its complement is finite. +;;; Bit n is set if the character with code n is a member of the set. +;;; The integer is negative if the set is infinite. + + +; Print the charset +(defun print-charset (charset &optional (stream t)) + (pprint-logical-block (stream (bitmap-to-ranges charset) :prefix "{" :suffix "}") + (pprint-exit-if-list-exhausted) + (loop + (flet + ((int-to-char (i) + (if (or (eq i :infinity) (= i char-code-limit)) + :infinity + (code-char i)))) + (let* ((range (pprint-pop)) + (lo (int-to-char (car range))) + (hi (int-to-char (cdr range)))) + (write (if (eql lo hi) lo (list lo hi)) :stream stream :pretty t) + (pprint-exit-if-list-exhausted) + (format stream " ~:_")))))) + + +; Return the character set consisting of the single character char. +(declaim (inline char-charset)) +(defun char-charset (char) + (ash 1 (char-code char))) + + +; Return the character set consisting of adding char to the given charset. +(defun charset-add-char (charset char) + (let ((i (char-code char))) + (if (logbitp i charset) + charset + (logior charset (ash 1 i))))) + + +; Return the union of the two character sets, which should be disjoint. +(defun charset-union (charset1 charset2) + (unless (zerop (logand charset1 charset2)) + (error "Union of overlapping character sets")) + (logior charset1 charset2)) + + +; Return the difference of the two character sets, the second of which should be +; a subset of the first. +(defun charset-difference (charset1 charset2) + (unless (zerop (logandc1 charset1 charset2)) + (error "Difference of non-subset character sets")) + (logandc2 charset1 charset2)) + + +; Return true if the character set is empty. +(declaim (inline charset-empty?)) +(defun charset-empty? (charset) + (zerop charset)) + + +; Return true if the character set is infinite. +(declaim (inline charset-infinite?)) +(defun charset-infinite? (charset) + (minusp charset)) + + +; If the character set contains exactly one character, return that character; +; otherwise, return nil. +(defun charset-char (charset) + (let ((hi (1- (integer-length charset)))) + (and (plusp charset) (= charset (ash 1 hi)) (code-char hi)))) + + +; Return the highest character in the character set, which must be finite and nonempty. +(declaim (inline charset-highest-char)) +(defun charset-highest-char (charset) + (assert-true (plusp charset)) + (code-char (1- (integer-length charset)))) + + +; Given a list of charsets, return a list of the largest possible +; charsets (called partitions) such that: +; for any input charset C and partition P, either P is entirely contained in C or it is disjoint from C; +; all partitions are mutually disjoint; +; the union of all partitions is the infinite set of all characters. +(defun compute-partitions (charsets) + (labels + ((split-partitions (partitions charset) + (mapcan #'(lambda (partition) + (remove-if #'zerop (list (logand partition charset) (logandc2 partition charset)))) + partitions)) + (partition< (partition1 partition2) + (cond + ((minusp partition1) nil) + ((minusp partition2) t) + (t (< partition1 partition2))))) + (sort (reduce #'split-partitions charsets :initial-value '(-1)) + #'partition<))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; LEXER-ACTIONS + +(defstruct (lexer-action (:constructor make-lexer-action (name number type-expr function-name markup)) + (:copier nil) + (:predicate lexer-action?)) + (name nil :type identifier :read-only t) ;The action name to use for this lexer-action + (number nil :type integer :read-only t) ;Serial number of this lexer-action + (type-expr nil :read-only t) ;A type expression that specifies the result type of list function function-name + (function-name nil :type identifier :read-only t) ;A lisp function (char -> value) that performs the lexer-action on a character + (markup nil :type list :read-only t)) ;Markup template describing this lexer-action; replace '* with the nonterminal + + +(defun print-lexer-action (lexer-action &optional (stream t)) + (format stream "~@<~A ~@_~:I: ~<<<~;~W~;>>~:> ~_= ~<<~;#'~W~;>~:>~:>" + (lexer-action-name lexer-action) + (list (lexer-action-type-expr lexer-action)) + (list (lexer-action-function-name lexer-action)))) + + +(defun depict-lexer-action (markup-stream lexer-action nonterminal) + (dolist (markup-item (lexer-action-markup lexer-action)) + (if (eq markup-item '*) + (depict-general-nonterminal markup-stream nonterminal) + (depict-group markup-stream markup-item)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; CHARCLASSES + +(defstruct (charclass (:constructor make-charclass (nonterminal charset-source charset actions)) + (:predicate charclass?)) + (nonterminal nil :type nonterminal :read-only t) ;The nonterminal on the left-hand side of this production + (charset-source nil :read-only t) ;The source expression for the charset + (charset nil :type integer :read-only t) ;The set of characters in this class + (actions nil :type list :read-only t)) ;List of (action-name . lexer-action) + + +; Evaluate a whose syntax is given at the top of this file. +; Return the charset. +; charclasses-hash is a hash table of nonterminal -> charclass. +(defun eval-charset-expr (charclasses-hash expr) + (cond + ((null expr) 0) + ((eq expr 'every) -1) + ((symbolp expr) + (charclass-charset + (or (gethash expr charclasses-hash) + (error "Character class ~S not defined" expr)))) + ((consp expr) + (labels + ((recursive-eval (expr) + (eval-charset-expr charclasses-hash expr))) + (case (car expr) + ((+ ++) (reduce #'charset-union (cdr expr) :initial-value 0 :key #'recursive-eval)) + (- (unless (cdr expr) + (error "Bad character set expression ~S" expr)) + (reduce #'charset-difference (cdr expr) :key #'recursive-eval)) + (t (reduce #'charset-union expr :key #'char-charset))))) + (t (error "Bad character set expression ~S" expr)))) + + +(defun print-charclass (charclass &optional (stream t)) + (pprint-logical-block (stream nil) + (format stream "~W -> ~@_~:I" (charclass-nonterminal charclass)) + (print-charset (charclass-charset charclass) stream) + (format stream " ~_") + (pprint-fill stream (mapcar #'car (charclass-actions charclass))))) + + +; Emit markup for the lexer charset expression. +(defun depict-charset-source (markup-stream expr) + (cond + ((null expr) (error "Can't emit null charset expression")) + ((eq expr 'every) (depict-general-nonterminal markup-stream ':any-character)) + ((symbolp expr) (depict-general-nonterminal markup-stream expr)) + ((consp expr) + (case (car expr) + ((+ ++) (depict-list markup-stream #'depict-charset-source (cdr expr) :separator " | ")) + (- (depict-charset-source markup-stream (second expr)) + (depict markup-stream " " :but-not " ") + (depict-list markup-stream #'depict-charset-source (cddr expr) :separator " | ")) + (t (depict-list markup-stream #'depict-terminal expr :separator " | ")))) + (t (error "Bad character set expression ~S" expr)))) + + +; Emit markup paragraphs for the lexer charclass. +(defun depict-charclass (markup-stream charclass) + (let ((nonterminal (charclass-nonterminal charclass)) + (expr (charclass-charset-source charclass))) + (if (and (consp expr) (eq (car expr) '++)) + (let* ((subexprs (cdr expr)) + (length (length subexprs))) + (depict-paragraph (markup-stream ':grammar-lhs) + (depict-general-nonterminal markup-stream nonterminal) + (depict markup-stream " " ':derives-10)) + (dotimes (i length) + (depict-paragraph (markup-stream (if (= i (1- length)) ':grammar-rhs-last ':grammar-rhs)) + (if (zerop i) + (depict markup-stream ':tab3) + (depict markup-stream "|" ':tab2)) + (depict-charset-source markup-stream (nth i subexprs))))) + (depict-paragraph (markup-stream ':grammar-lhs-last) + (depict-general-nonterminal markup-stream (charclass-nonterminal charclass)) + (depict markup-stream " " ':derives-10 " ") + (depict-charset-source markup-stream expr))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; PARTITIONS + +(defstruct (partition (:constructor make-partition (charset lexer-actions)) + (:predicate partition?)) + (charset nil :type integer :read-only t) ;The set of characters in this partition + (lexer-actions nil :type list :read-only t)) ;List of lexer-actions needed on characters in this partition + +(defconstant *default-partition-name* '$_other_) ;partition-name to use for characters not found in lexer-char-tokens + + +(defun print-partition (partition-name partition &optional (stream t)) + (pprint-logical-block (stream nil) + (format stream "~W -> ~@_~:I" partition-name) + (print-charset (partition-charset partition) stream) + (format stream " ~_") + (pprint-fill stream (mapcar #'lexer-action-name (partition-lexer-actions partition))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; LEXER + + +(defstruct (lexer (:constructor allocate-lexer) + (:copier nil) + (:predicate lexer?)) + (lexer-actions nil :type hash-table :read-only t) ;Hash table of lexer-action-name -> lexer-action + (charclasses nil :type list :read-only t) ;List of charclasses in the order in which they were given + (charclasses-hash nil :type hash-table :read-only t) ;Hash table of nonterminal -> charclass + (char-tokens nil :type hash-table :read-only t) ;Hash table of character -> (character or partition-name) + (partition-names nil :type list :read-only t) ;List of partition names in the order in which they were created + (partitions nil :type hash-table :read-only t) ;Hash table of partition-name -> partition + (grammar nil :type (or null grammar)) ;Grammar that accepts exactly one lexer token + (metagrammar nil :type (or null metagrammar))) ;Grammar that accepts the longest input sequence that forms a token + + +; Return a function (character -> terminal) that classifies an input character +; as either itself or a partition-name. +; If the returned function is called on a non-character, it returns its input unchanged. +(defun lexer-classifier (lexer) + (let ((char-tokens (lexer-char-tokens lexer))) + #'(lambda (char) + (if (characterp char) + (gethash char char-tokens *default-partition-name*) + char)))) + + +; Return the charclass that defines the given lexer nonterminal or nil if none. +(defun lexer-charclass (lexer nonterminal) + (gethash nonterminal (lexer-charclasses-hash lexer))) + + +; Return the charset of all characters that appear as terminals in grammar-source. +(defun grammar-singletons (grammar-source) + (assert-type grammar-source (list (tuple t (list t) identifier))) + (let ((singletons 0)) + (dolist (production-source grammar-source) + (dolist (grammar-symbol (second production-source)) + (when (characterp grammar-symbol) + (setq singletons (charset-add-char singletons grammar-symbol))))) + singletons)) + + +; Return the list of all lexer-action-names that appear in at least one charclass of which this +; partition is a subset. +(defun collect-lexer-action-names (charclasses partition) + (let ((lexer-action-names nil)) + (dolist (charclass charclasses) + (unless (zerop (logand (charclass-charset charclass) partition)) + (dolist (action (charclass-actions charclass)) + (pushnew (cdr action) lexer-action-names)))) + (sort lexer-action-names #'< :key #'lexer-action-number))) + + +; Make a lexer structure corresponding to a grammar with the given source. +; charclasses-source is a list of character classes, where each class is a list of: +; a nonterminal C; +; an expression that denotes the set of characters in character class C; +; a list of bindings, each containing: +; an action name; +; a lexer-action name. +; lexer-actions-source is a list of lexer-action bindings, each containing: +; a lexer-action name; +; the type of this lexer-action's value; +; the name of a lisp function (char -> value) that performs the lexer-action on a character. +; This does not make the lexer's grammar; use make-lexer-and-grammar for that. +(defun make-lexer (charclasses-source lexer-actions-source grammar-source) + (assert-type charclasses-source (list (tuple nonterminal t (list (tuple identifier identifier))))) + (assert-type lexer-actions-source (list (tuple identifier t identifier list))) + (let ((lexer-actions (make-hash-table :test #'eq)) + (charclasses nil) + (charclasses-hash (make-hash-table :test *grammar-symbol-=*)) + (charsets nil) + (singletons (grammar-singletons grammar-source))) + (let ((lexer-action-number 0)) + (dolist (lexer-action-source lexer-actions-source) + (let ((name (first lexer-action-source)) + (type-expr (second lexer-action-source)) + (function (third lexer-action-source)) + (markup (fourth lexer-action-source))) + (when (gethash name lexer-actions) + (error "Attempt to redefine lexer action ~S" name)) + (setf (gethash name lexer-actions) + (make-lexer-action name (incf lexer-action-number) type-expr function markup))))) + + (dolist (charclass-source charclasses-source) + (let ((nonterminal (first charclass-source)) + (charset (eval-charset-expr charclasses-hash (ensure-proper-form (second charclass-source)))) + (actions + (mapcar #'(lambda (action-source) + (let* ((lexer-action-name (second action-source)) + (lexer-action (gethash lexer-action-name lexer-actions))) + (unless lexer-action + (error "Unknown lexer-action ~S" lexer-action-name)) + (cons (first action-source) lexer-action))) + (third charclass-source)))) + (when (gethash nonterminal charclasses-hash) + (error "Attempt to redefine character class ~S" nonterminal)) + (when (charset-empty? charset) + (error "Empty character class ~S" nonterminal)) + (let ((charclass (make-charclass nonterminal (second charclass-source) charset actions))) + (push charclass charclasses) + (setf (gethash nonterminal charclasses-hash) charclass) + (push charset charsets)))) + (setq charclasses (nreverse charclasses)) + (bitmap-each-bit #'(lambda (i) (push (ash 1 i) charsets)) + singletons) + (let ((char-tokens (make-hash-table :test #'eql)) + (partition-names nil) + (partitions (make-hash-table :test #'eq)) + (current-partition-number 0)) + (dolist (partition (compute-partitions charsets)) + (let ((singleton (charset-char partition))) + (cond + (singleton (setf (gethash singleton char-tokens) singleton)) + ((charset-infinite? partition) + (push *default-partition-name* partition-names) + (setf (gethash *default-partition-name* partitions) + (make-partition partition (collect-lexer-action-names charclasses partition)))) + (t (let ((token (intern (format nil "$_CHARS~D_" (incf current-partition-number))))) + (bitmap-each-bit #'(lambda (i) + (setf (gethash (code-char i) char-tokens) token)) + partition) + (push token partition-names) + (setf (gethash token partitions) + (make-partition partition (collect-lexer-action-names charclasses partition)))))))) + (allocate-lexer + :lexer-actions lexer-actions + :charclasses charclasses + :charclasses-hash charclasses-hash + :char-tokens char-tokens + :partition-names (nreverse partition-names) + :partitions partitions)))) + + +(defun print-lexer (lexer &optional (stream t)) + (let* ((lexer-actions (lexer-lexer-actions lexer)) + (lexer-action-names (sort (hash-table-keys lexer-actions) #'< + :key #'(lambda (lexer-action-name) + (lexer-action-number (gethash lexer-action-name lexer-actions))))) + (charclasses (lexer-charclasses lexer)) + (partition-names (lexer-partition-names lexer)) + (partitions (lexer-partitions lexer)) + (singletons nil)) + + (when lexer-action-names + (pprint-logical-block (stream lexer-action-names) + (format stream "Lexer Actions:~2I") + (loop + (pprint-newline :mandatory stream) + (let ((lexer-action (gethash (pprint-pop) lexer-actions))) + (print-lexer-action lexer-action stream)) + (pprint-exit-if-list-exhausted))) + (pprint-newline :mandatory stream) + (pprint-newline :mandatory stream)) + + (when charclasses + (pprint-logical-block (stream charclasses) + (format stream "Charclasses:~2I") + (loop + (pprint-newline :mandatory stream) + (let ((charclass (pprint-pop))) + (print-charclass charclass stream)) + (pprint-exit-if-list-exhausted))) + (pprint-newline :mandatory stream) + (pprint-newline :mandatory stream)) + + (when partition-names + (pprint-logical-block (stream partition-names) + (format stream "Partitions:~2I") + (loop + (pprint-newline :mandatory stream) + (let ((partition-name (pprint-pop))) + (print-partition partition-name (gethash partition-name partitions) stream)) + (pprint-exit-if-list-exhausted))) + (pprint-newline :mandatory stream) + (pprint-newline :mandatory stream)) + + (maphash + #'(lambda (char char-or-partition) + (if (eql char char-or-partition) + (push char singletons) + (assert-type char-or-partition identifier))) + (lexer-char-tokens lexer)) + (setq singletons (sort singletons #'char<)) + (when singletons + (format stream "Singletons: ~@_~<~@{~W ~:_~}~:>~:@_~:@_" singletons)))) + + +(defmethod print-object ((lexer lexer) stream) + (print-unreadable-object (lexer stream :identity t) + (write-string "lexer" stream))) + + +;;; ------------------------------------------------------------------------------------------------------ + + +; Return two values: +; extra grammar productions that define the character class nonterminals out of characters and tokens; +; extra commands that: +; define the partitions used in this lexer; +; define the actions of these productions. +(defun lexer-grammar-and-commands (lexer) + (labels + ((component-partitions (charset partitions) + (if (charset-empty? charset) + partitions + (let* ((partition-name (if (charset-infinite? charset) + *default-partition-name* + (gethash (charset-highest-char charset) (lexer-char-tokens lexer)))) + (partition (gethash partition-name (lexer-partitions lexer)))) + (component-partitions (charset-difference charset (partition-charset partition)) + (cons partition partitions)))))) + (let ((productions nil) + (commands nil)) + (dolist (charclass (lexer-charclasses lexer)) + (let ((nonterminal (charclass-nonterminal charclass)) + (production-number 0)) + (dolist (action (charclass-actions charclass)) + (let ((lexer-action (cdr action))) + (push (list 'declare-action (car action) nonterminal (lexer-action-type-expr lexer-action)) commands))) + (do ((charset (charclass-charset charclass))) + ((charset-empty? charset)) + (let* ((partition-name (if (charset-infinite? charset) + *default-partition-name* + (gethash (charset-highest-char charset) (lexer-char-tokens lexer)))) + (partition-charset (if (characterp partition-name) + (char-charset partition-name) + (partition-charset (gethash partition-name (lexer-partitions lexer))))) + (production-name (intern (format nil "~A-~D" nonterminal (incf production-number))))) + (push (list nonterminal (list partition-name) production-name) productions) + (dolist (action (charclass-actions charclass)) + (let* ((lexer-action (cdr action)) + (body (if (characterp partition-name) + (let* ((lexer-action-function (lexer-action-function-name lexer-action)) + (result (funcall lexer-action-function partition-name))) + (typecase result + (integer result) + (character result) + ((eql nil) 'false) + ((eql t) 'true) + (t (error "Cannot infer the type of ~S's result ~S" lexer-action-function result)))) + (list (lexer-action-name lexer-action) partition-name)))) + (push (list 'action (car action) production-name body nil) commands))) + (setq charset (charset-difference charset partition-charset)))))) + + (let ((partition-commands + (mapcan + #'(lambda (partition-name) + (mapcan #'(lambda (lexer-action) + (let ((lexer-action-name (lexer-action-name lexer-action))) + (list + (list 'declare-action lexer-action-name partition-name (lexer-action-type-expr lexer-action)) + (list 'terminal-action lexer-action-name partition-name (lexer-action-function-name lexer-action))))) + (partition-lexer-actions (gethash partition-name (lexer-partitions lexer))))) + (lexer-partition-names lexer)))) + (values + (nreverse productions) + (nconc partition-commands (nreverse commands))))))) + + +; Make a lexer and grammar from the given source. +; kind should be either :lalr-1 or :lr-1. +; charclasses-source is a list of character classes, and +; lexer-actions-source is a list of lexer-action bindings; see make-lexer. +; start-symbol is the grammar's start symbol, and grammar-source is its source. +; Return two values: +; the lexer (including the grammar in its grammar field); +; list of extra commands that: +; define the partitions used in this lexer; +; define the actions of these productions. +(defun make-lexer-and-grammar (kind charclasses-source lexer-actions-source parametrization start-symbol grammar-source) + (let ((lexer (make-lexer charclasses-source lexer-actions-source grammar-source))) + (multiple-value-bind (extra-grammar-source extra-commands) (lexer-grammar-and-commands lexer) + (let ((grammar (make-and-compile-grammar kind parametrization start-symbol (append extra-grammar-source grammar-source)))) + (setf (lexer-grammar lexer) grammar) + (values lexer extra-commands))))) + + +; Parse the input string to produce a list of action results. +; If trace is: +; nil, don't print trace information +; :code, print trace information, including action code +; other print trace information +; Return two values: +; the list of action results; +; the list of action results' types. +(defun lexer-parse (lexer string &key trace) + (let ((in (coerce string 'list))) + (action-parse (lexer-grammar lexer) (lexer-classifier lexer) in :trace trace))) + + +; Same as lexer-parse except that also print the action results nicely. +(defun lexer-pparse (lexer string &key (stream t) trace) + (multiple-value-bind (results types) (lexer-parse lexer string :trace trace) + (print-values results types stream) + (terpri stream) + (values results types))) + + +; Compute the lexer grammar's metagrammar. +(defun set-up-lexer-metagrammar (lexer) + (setf (lexer-metagrammar lexer) (make-metagrammar (lexer-grammar lexer)))) + + + +; Parse the input string into elements, where each element is the longest +; possible string of input characters that is accepted by the grammar. +; The grammar's terminals are all characters that may appear in the input +; string plus the symbol $END which is inserted after the last character of +; the string. +; Return the list of lists of action results of the elements. +; If trace is: +; nil, don't print trace information +; :code, print trace information, including action code +; other print trace information +; Return two values: +; the list of lists of action results; +; the list of action results' types. Each of the lists of action results has +; this type signature. +(defun lexer-metaparse (lexer string &key trace) + (let ((metagrammar (lexer-metagrammar lexer))) + (do ((in (append (coerce string 'list) '($end))) + (results-lists nil)) + ((endp in) (values (nreverse results-lists) (grammar-user-start-action-types (metagrammar-grammar metagrammar)))) + (multiple-value-bind (results in-rest) (action-metaparse metagrammar (lexer-classifier lexer) in :trace trace) + (setq in in-rest) + (push results results-lists))))) + + +; Same as lexer-metaparse except that also print the action results nicely. +(defun lexer-pmetaparse (lexer string &key (stream t) trace) + (multiple-value-bind (results-lists types) (lexer-metaparse lexer string :trace trace) + (pprint-logical-block (stream results-lists) + (pprint-exit-if-list-exhausted) + (loop + (print-values (pprint-pop) types stream :prefix "(" :suffix ")") + (pprint-exit-if-list-exhausted) + (format stream " ~_"))) + (terpri stream) + (values results-lists types))) + diff --git a/mozilla/js2/semantics/Main.lisp b/mozilla/js2/semantics/Main.lisp new file mode 100644 index 00000000000..84805f36259 --- /dev/null +++ b/mozilla/js2/semantics/Main.lisp @@ -0,0 +1,42 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; ECMAScript semantic loader +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +(defparameter *semantic-engine-filenames* + '("Utilities" "Markup" "RTF" "HTML" "GrammarSymbol" "Grammar" "Parser" "Metaparser" "Lexer" "Calculus" "CalculusMarkup" "JS14" "ECMA Lexer" "ECMA Grammar")) + +(defparameter *semantic-engine-directory* + (make-pathname + :directory (pathname-directory (truename *loading-file-source-file*)))) + +(defun load-semantic-engine () + (dolist (filename *semantic-engine-filenames*) + (let ((pathname (merge-pathnames filename *semantic-engine-directory*))) + (load pathname :verbose t)))) + +(defmacro with-local-output ((stream filename) &body body) + `(with-open-file (,stream (merge-pathnames ,filename *semantic-engine-directory*) + :direction :output + :if-exists :supersede) + ,@body)) + + +(load-semantic-engine) diff --git a/mozilla/js2/semantics/Markup.lisp b/mozilla/js2/semantics/Markup.lisp new file mode 100644 index 00000000000..236a69688dc --- /dev/null +++ b/mozilla/js2/semantics/Markup.lisp @@ -0,0 +1,508 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1999 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; Common RTF and HTML writing utilities +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +(defvar *trace-logical-blocks* nil) ;Emit logical blocks to *trace-output* while processing +(defvar *show-logical-blocks* nil) ;Emit logical block boundaries as hidden rtf text + +(defvar *markup-logical-line-width* 90) ;Approximate maximum number of characters to display on a single logical line +(defvar *average-space-width* 2/3) ;Width of a space as a percentage of average character width when calculating logical line widths + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MARKUP ENVIRONMENTS + + +(defstruct (markup-env (:constructor allocate-markup-env (macros widths))) + (macros nil :type hash-table :read-only t) ;Hash table of keyword -> expansion list + (widths nil :type hash-table :read-only t)) ;Hash table of keyword -> estimated width of macro expansion; +; ; zero-width entries can be omitted; multiline entries have t for a width. + + +(defun make-markup-env () + (allocate-markup-env (make-hash-table :test #'eq) (make-hash-table :test #'eq))) + + +; Recursively expand all keywords in markup-tree, producing a freshly consed expansion tree. +; Allow keywords in the permitted-keywords list to be present in the output without generating an error. +(defun markup-env-expand (markup-env markup-tree permitted-keywords) + (mapcan + #'(lambda (markup-element) + (cond + ((keywordp markup-element) + (let ((expansion (gethash markup-element (markup-env-macros markup-env) *get2-nonce*))) + (if (eq expansion *get2-nonce*) + (if (member markup-element permitted-keywords :test #'eq) + (list markup-element) + (error "Unknown markup macro ~S" markup-element)) + (markup-env-expand markup-env expansion permitted-keywords)))) + ((listp markup-element) + (list (markup-env-expand markup-env markup-element permitted-keywords))) + (t (list markup-element)))) + markup-tree)) + + +(defun markup-env-define (markup-env keyword expansion &optional width) + (assert-type keyword keyword) + (assert-type expansion (list t)) + (assert-type width (or null integer (eql t))) + (when (gethash keyword (markup-env-macros markup-env)) + (warn "Redefining markup macro ~S" keyword)) + (setf (gethash keyword (markup-env-macros markup-env)) expansion) + (if width + (setf (gethash keyword (markup-env-widths markup-env)) width) + (remhash keyword (markup-env-widths markup-env)))) + + +(defun markup-env-append (markup-env keyword expansion) + (assert-type keyword keyword) + (assert-type expansion (list t)) + (setf (gethash keyword (markup-env-macros markup-env)) + (append (gethash keyword (markup-env-macros markup-env)) expansion))) + + +(defun markup-env-define-alist (markup-env keywords-and-expansions) + (dolist (keyword-and-expansion keywords-and-expansions) + (let ((keyword (car keyword-and-expansion)) + (expansion (cdr keyword-and-expansion))) + (cond + ((not (consp keyword)) + (markup-env-define markup-env keyword expansion)) + ((eq (first keyword) '+) + (markup-env-append markup-env (second keyword) expansion)) + (t (markup-env-define markup-env (first keyword) expansion (second keyword))))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; LOGICAL POSITIONS + +(defstruct logical-position + (n-hard-breaks 0 :type integer) ;Number of :new-line's in the current paragraph or logical block + (position 0 :type integer) ;Current character position. If n-hard-breaks is zero, only includes characters written into this logical block + ; ; plus the minimal position from the enclosing block. If n-hard-breaks is nonzero, includes indent and characters + ; ; written since the last hard break. + (surplus 0 :type integer) ;Value to subtract from position if soft breaks were hard breaks in this logical block + (n-soft-breaks nil :type (or null integer)) ;Number of soft-breaks in the current paragraph or nil if not inside a depict-logical-block + (indent 0 :type (or null integer))) ;Indent for next line + + +; Return the value the position would have if soft breaks became hard breaks in this logical block. +(declaim (inline logical-position-minimal-position)) +(defun logical-position-minimal-position (logical-position) + (- (logical-position-position logical-position) (logical-position-surplus logical-position))) + + +; Advance the logical position by width characters. If width is t, +; advance to the next line. +(defun logical-position-advance (logical-position width) + (if (eq width t) + (progn + (incf (logical-position-n-hard-breaks logical-position)) + (setf (logical-position-position logical-position) 0) + (setf (logical-position-surplus logical-position) 0)) + (incf (logical-position-position logical-position) width))) + + +(defstruct (soft-break (:constructor make-soft-break (width))) + (width 0 :type integer)) ;Number of spaces by which to replace this soft break if it doesn't turn into a hard break; t if unconditional + + +; Destructively replace any soft-break that appears in a car position in the tree with +; the spliced result of calling f on that soft-break. f should return a non-null list that can +; be nconc'd. +(defun substitute-soft-breaks (tree f) + (do ((subtree tree next-subtree) + (next-subtree (cdr tree) (cdr next-subtree))) + ((endp subtree)) + (let ((item (car subtree))) + (cond + ((soft-break-p item) + (let* ((splice (assert-non-null (funcall f item))) + (splice-rest (cdr splice))) + (setf (car subtree) (car splice)) + (setf (cdr subtree) (nconc splice-rest next-subtree)))) + ((consp item) (substitute-soft-breaks item f))))) + tree) + + +; Destructively replace any soft-break that appears in a car position in the tree +; with width spaces, where width is the soft-break's width. +(defun remove-soft-breaks (tree) + (substitute-soft-breaks + tree + #'(lambda (soft-break) + (list (make-string (soft-break-width soft-break) :initial-element #\space :element-type 'base-character))))) + + +; Return a freshly consed markup list for a hard line break followed by indent spaces. +(defun hard-break-markup (indent) + (if (zerop indent) + (list ':new-line) + (list ':new-line (make-string indent :initial-element #\space :element-type 'base-character)))) + + +; Destructively replace any soft-break that appears in a car position in the tree +; with a line break followed by indent spaces. +(defun expand-soft-breaks (tree indent) + (substitute-soft-breaks + tree + #'(lambda (soft-break) + (declare (ignore soft-break)) + (hard-break-markup indent)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MARKUP STREAMS + +(defstruct (markup-stream (:copier nil) (:predicate markup-stream?)) + (env nil :type markup-env :read-only t) + (level nil :type integer) ;0 for emitting top-level group; 1 for emitting sections; 2 for emitting paragraphs; 3 for emitting paragraph contents + (head nil :type list) ;Pointer to a dummy cons-cell whose cdr is the output markup list. + ; ; A markup-stream may destructively modify any sublists of head that contain a soft-break. + (tail nil :type list) ;Last cons cell of the output list; new cells are added in place to this cell's cdr; nil after markup-stream is closed. + (pretail nil :type list) ;Tail's predecessor if tail's car is a block that can be inlined at the end of the output list; nil otherwise. + (logical-position nil :type logical-position)) ;Information about the current logical lines or nil if not emitting paragraph contents + +; ;RTF ;HTML +(defconstant *markup-stream-top-level* 0) ;Top-level group ;Top level +(defconstant *markup-stream-section-level* 1) ;Sections ;(not used) +(defconstant *markup-stream-paragraph-level* 2) ;Paragraphs ;Block tags +(defconstant *markup-stream-content-level* 3) ;Paragraph contents ;Inline tags + + +; Return the markup accumulated in the markup-stream. +; The markup-stream is closed after this function is called. +(defun markup-stream-unexpanded-output (markup-stream) + (when (markup-stream-pretail markup-stream) + ;Inline the last block at the end of the markup-stream. + (setf (cdr (markup-stream-pretail markup-stream)) (car (markup-stream-tail markup-stream))) + (setf (markup-stream-pretail markup-stream) nil)) + (setf (markup-stream-tail markup-stream) nil) ;Close the stream. + (cdr (assert-non-null (markup-stream-head markup-stream)))) + + +; Return the markup accumulated in the markup-stream after expanding all of its macros. +; The markup-stream is closed after this function is called. +(defgeneric markup-stream-output (markup-stream)) + + +; Append one item to the end of the markup-stream. +(defun markup-stream-append1 (markup-stream item) + (setf (markup-stream-pretail markup-stream) nil) + (let ((item-cons (list item))) + (setf (cdr (markup-stream-tail markup-stream)) item-cons) + (setf (markup-stream-tail markup-stream) item-cons))) + + +; Return the approximate width of the markup item; return t if it is a line break. +(defun markup-width (markup-stream item) + (cond + ((stringp item) (round (- (length item) (* (count #\space item) (- 1 *average-space-width*))))) + ((keywordp item) (gethash item (markup-env-widths (markup-stream-env markup-stream)) 0)) + ((and item (symbolp item)) 0) + (t (error "Bad item in markup-width" item)))) + + +; Return the approximate width of the markup item; return t if it is a line break. +; Also allow markup groups as long as they do not contain line breaks. +(defgeneric markup-group-width (markup-stream item)) + + +; Append zero or more markup items to the end of the markup-stream. +; The items must be either keywords, symbols, or strings. +(defun depict (markup-stream &rest markup-list) + (assert-true (>= (markup-stream-level markup-stream) *markup-stream-content-level*)) + (dolist (markup markup-list) + (markup-stream-append1 markup-stream markup) + (logical-position-advance (markup-stream-logical-position markup-stream) (markup-width markup-stream markup)))) + + +; Same as depict except that the items may be groups as well. +(defun depict-group (markup-stream &rest markup-list) + (assert-true (>= (markup-stream-level markup-stream) *markup-stream-content-level*)) + (dolist (markup markup-list) + (markup-stream-append1 markup-stream markup) + (logical-position-advance (markup-stream-logical-position markup-stream) (markup-group-width markup-stream markup)))) + + +; If markup-item-or-list is a list, emit its contents via depict. +; If markup-item-or-list is not a list, emit it via depict. +(defun depict-item-or-list (markup-stream markup-item-or-list) + (if (listp markup-item-or-list) + (apply #'depict markup-stream markup-item-or-list) + (depict markup-stream markup-item-or-list))) + + +; If markup-item-or-list is a list, emit its contents via depict-group. +; If markup-item-or-list is not a list, emit it via depict. +(defun depict-item-or-group-list (markup-stream markup-item-or-list) + (if (listp markup-item-or-list) + (apply #'depict-group markup-stream markup-item-or-list) + (depict markup-stream markup-item-or-list))) + + +; markup-stream must be a variable that names a markup-stream that is currently +; accepting paragraphs. Execute body with markup-stream bound to a markup-stream +; to which the body can emit contents. The given block-style is applied to all +; paragraphs emitted by body (in the HTML emitter only; RTF has no block styles). +; Return the result value of body. +(defmacro depict-block-style ((markup-stream block-style) &body body) + `(depict-block-style-f ,markup-stream ,block-style + #'(lambda (,markup-stream) ,@body))) + +(defgeneric depict-block-style-f (markup-stream block-style emitter)) + + +; markup-stream must be a variable that names a markup-stream that is currently +; accepting paragraphs. Emit a paragraph with the given paragraph-style (which +; must be a symbol) whose contents are emitted by body. When executing body, +; markup-stream is bound to a markup-stream to which body should emit the paragraph's contents. +; Return the result value of body. +(defmacro depict-paragraph ((markup-stream paragraph-style) &body body) + `(depict-paragraph-f ,markup-stream ,paragraph-style + #'(lambda (,markup-stream) ,@body))) + +(defgeneric depict-paragraph-f (markup-stream paragraph-style emitter)) + + +; markup-stream must be a variable that names a markup-stream that is currently +; accepting paragraph contents. Execute body with markup-stream bound to a markup-stream +; to which the body can emit contents. The given char-style is applied to all such +; contents emitted by body. +; Return the result value of body. +(defmacro depict-char-style ((markup-stream char-style) &body body) + `(depict-char-style-f ,markup-stream ,char-style + #'(lambda (,markup-stream) ,@body))) + +(defgeneric depict-char-style-f (markup-stream char-style emitter)) + + +(defun depict-logical-block-f (markup-stream indent emitter) + (assert-true (>= (markup-stream-level markup-stream) *markup-stream-content-level*)) + (if indent + (let* ((logical-position (markup-stream-logical-position markup-stream)) + (cumulative-indent (+ (logical-position-indent logical-position) indent)) + (minimal-position (logical-position-minimal-position logical-position)) + (inner-logical-position (make-logical-position :position minimal-position + :n-soft-breaks 0 + :indent cumulative-indent)) + (old-tail (markup-stream-tail markup-stream))) + (setf (markup-stream-logical-position markup-stream) inner-logical-position) + (when *show-logical-blocks* + (markup-stream-append1 markup-stream (list ':invisible (format nil "<~D" indent)))) + (prog1 + (funcall emitter markup-stream) + (when *show-logical-blocks* + (markup-stream-append1 markup-stream '(:invisible ">"))) + (assert-true (eq (markup-stream-logical-position markup-stream) inner-logical-position)) + (let* ((tree (cdr old-tail)) + (inner-position (logical-position-position inner-logical-position)) + (inner-count (- inner-position minimal-position)) + (inner-n-hard-breaks (logical-position-n-hard-breaks inner-logical-position)) + (inner-n-soft-breaks (logical-position-n-soft-breaks inner-logical-position))) + (when *trace-logical-blocks* + (format *trace-output* "Block ~:W:~%position ~D, count ~D, n-hard-breaks ~D, n-soft-breaks ~D~%~%" + tree inner-position inner-count inner-n-hard-breaks inner-n-soft-breaks)) + (cond + ((zerop inner-n-soft-breaks) + (assert-true (zerop (logical-position-surplus inner-logical-position))) + (if (zerop inner-n-hard-breaks) + (incf (logical-position-position logical-position) inner-count) + (progn + (incf (logical-position-n-hard-breaks logical-position) inner-n-hard-breaks) + (setf (logical-position-position logical-position) inner-position) + (setf (logical-position-surplus logical-position) 0)))) + ((and (zerop inner-n-hard-breaks) (<= inner-position *markup-logical-line-width*)) + (assert-true tree) + (remove-soft-breaks tree) + (incf (logical-position-position logical-position) inner-count)) + (t + (assert-true tree) + (expand-soft-breaks tree cumulative-indent) + (incf (logical-position-n-hard-breaks logical-position) (+ inner-n-hard-breaks inner-n-soft-breaks)) + (setf (logical-position-position logical-position) (logical-position-minimal-position inner-logical-position)) + (setf (logical-position-surplus logical-position) 0)))) + (setf (markup-stream-logical-position markup-stream) logical-position))) + (funcall emitter markup-stream))) + + +; markup-stream must be a variable that names a markup-stream that is currently +; accepting paragraph contents. Execute body with markup-stream bound to a markup-stream +; to which the body can emit contents. body can call depict-break, which will either +; all expand to the widths given to the depict-break calls or all expand to line breaks +; followed by indents to the current indent level plus the given indent. +; If indent is nil, don't create the logical block and just evaluate body. +; Return the result value of body. +(defmacro depict-logical-block ((markup-stream indent) &body body) + `(depict-logical-block-f ,markup-stream ,indent + #'(lambda (,markup-stream) ,@body))) + + +; Emit a conditional line break. If the line break is not needed, emit width spaces instead. +; If width is t or omitted, the line break is unconditional. +; If width is nil, do nothing. +; If the line break is needed, the new line is indented to the current indent level. +; Must be called from the dynamic scope of a depict-logical-block. +(defun depict-break (markup-stream &optional (width t)) + (assert-true (>= (markup-stream-level markup-stream) *markup-stream-content-level*)) + (when width + (let* ((logical-position (markup-stream-logical-position markup-stream)) + (indent (logical-position-indent logical-position))) + (if (eq width t) + (depict-item-or-list markup-stream (hard-break-markup indent)) + (progn + (incf (logical-position-n-soft-breaks logical-position)) + (incf (logical-position-position logical-position) width) + (let ((surplus (- (logical-position-position logical-position) (round (* indent *average-space-width*))))) + (when (< surplus 0) + (setq surplus 0)) + (setf (logical-position-surplus logical-position) surplus)) + (when *show-logical-blocks* + (markup-stream-append1 markup-stream '(:invisible :bullet))) + (markup-stream-append1 markup-stream (make-soft-break width))))))) + + +; Call emitter to emit each element of the given list onto the markup-stream. +; emitter takes two arguments -- the markup-stream and the element of list to be emitted. +; Emit prefix before the list and suffix after the list. If prefix-break is supplied, call +; depict-break with it as the argument after the prefix. +; If indent is non-nil, enclose the list elements in a logical block with the given indent. +; Emit separator between any two emitted elements. If break is supplied, call +; depict-break with it as the argument after each separator. +; If the list is empty, emit empty unless it is :error, in which case signal an error. +; +; prefix, suffix, separator, and empty should be lists of markup elements appropriate for depict. +; If any of these lists has only one element that is not itself a list, then that list can be +; abbreviated to just that element (as in depict-item-or-list). +; +(defun depict-list (markup-stream emitter list &key indent prefix prefix-break suffix separator break (empty :error)) + (assert-true (or indent (not (or prefix-break break)))) + (labels + ((emit-element (markup-stream list) + (funcall emitter markup-stream (first list)) + (let ((rest (rest list))) + (when rest + (depict-item-or-list markup-stream separator) + (depict-break markup-stream break) + (emit-element markup-stream rest))))) + + (depict-item-or-list markup-stream prefix) + (cond + (list + (depict-logical-block (markup-stream indent) + (depict-break markup-stream prefix-break) + (emit-element markup-stream list))) + ((eq empty ':error) (error "Non-empty list required")) + (t (depict-item-or-list markup-stream empty))) + (depict-item-or-list markup-stream suffix))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MARKUP FOR CHARACTERS AND STRINGS + +(defparameter *character-names* + '((#x00 . "NUL") + (#x08 . "BS") + (#x09 . "TAB") + (#x0A . "LF") + (#x0B . "VT") + (#x0C . "FF") + (#x0D . "CR") + (#x20 . "SP"))) + +; Emit markup for the given character. The character is emitted without any formatting if it is a +; printable character and not a member of the escape-list list of characters. Otherwise the +; character is emitted with :character-literal-control formatting. +; The markup-stream should already be set to :character-literal formatting. +(defun depict-character (markup-stream char &optional (escape-list '(#\space))) + (let ((code (char-code char))) + (if (and (>= code 32) (< code 127) (not (member char escape-list))) + (depict markup-stream (string char)) + (depict-char-style (markup-stream ':character-literal-control) + (let ((name (or (cdr (assoc code *character-names*)) + (format nil "u~4,'0X" code)))) + (depict markup-stream ':left-angle-quote name ':right-angle-quote)))))) + + +; Emit markup for the given string, enclosing it in curly double quotes. +; The markup-stream should be set to normal formatting. +(defun depict-string (markup-stream string) + (depict markup-stream ':left-double-quote) + (unless (equal string "") + (depict-char-style (markup-stream ':character-literal) + (dotimes (i (length string)) + (depict-character markup-stream (char string i) nil)))) + (depict markup-stream ':right-double-quote)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MARKUP FOR IDENTIFIERS + +; Return string converted from dash-separated-uppercase-words to mixed case, +; with the first character capitalized if capitalize is true. +; The string should contain only letters, dashes, and numbers. +(defun string-to-mixed-case (string &optional capitalize) + (let* ((length (length string)) + (dst-string (make-array length :element-type 'base-character :fill-pointer 0))) + (dotimes (i length) + (let ((char (char string i))) + (if (eql char #\-) + (if capitalize + (error "Double capitalize") + (setq capitalize t)) + (progn + (cond + ((upper-case-p char) + (if capitalize + (setq capitalize nil) + (setq char (char-downcase char)))) + ((digit-char-p char)) + ((member char '(#\$ #\_))) + (t (error "Bad string-to-mixed-case character ~A" char))) + (vector-push char dst-string))))) + dst-string)) + + +; Return a string containing the symbol's name in mixed case with the first letter capitalized. +(defun symbol-upper-mixed-case-name (symbol) + (or (get symbol :upper-mixed-case-name) + (setf (get symbol :upper-mixed-case-name) (string-to-mixed-case (symbol-name symbol) t)))) + + +; Return a string containing the symbol's name in mixed case with the first letter in lower case. +(defun symbol-lower-mixed-case-name (symbol) + (or (get symbol :lower-mixed-case-name) + (setf (get symbol :lower-mixed-case-name) (string-to-mixed-case (symbol-name symbol))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MISCELLANEOUS MARKUP + + +; Append a space to the end of the markup-stream. +(defun depict-space (markup-stream) + (depict markup-stream " ")) + + +; Emit markup for the given integer, displaying it in decimal. +(defun depict-integer (markup-stream i) + (depict markup-stream (format nil "~D" i))) + diff --git a/mozilla/js2/semantics/Metaparser.lisp b/mozilla/js2/semantics/Metaparser.lisp new file mode 100644 index 00000000000..87b6d51b3cf --- /dev/null +++ b/mozilla/js2/semantics/Metaparser.lisp @@ -0,0 +1,356 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; Finite-state machine generator +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; ------------------------------------------------------------------------------------------------------ +;;; METATRANSITION + +(defstruct (metatransition (:constructor make-metatransition (next-metastate pre-productions post-productions))) + (next-metastate nil :read-only t) ;Next metastate to enter or nil if this is an accept transition + (pre-productions nil :read-only t) ;List of productions reduced by this transition (in order from first to last) before the shift + (post-productions nil :read-only t)) ;List of productions reduced by this transition (in order from first to last) after the shift + + +;;; ------------------------------------------------------------------------------------------------------ +;;; METASTATE + +;;; A metastate is a list of states that represents a possible stack that the +;;; LALR(1) parser may encounter. +(defstruct (metastate (:constructor make-metastate (stack number transitions))) + (stack nil :type list :read-only t) ;List of states that comprises a possible stack + (number nil :type integer :read-only t) ;Serial number of this metastate + (transitions nil :type simple-vector :read-only t)) ;Array, indexed by terminal numbers, of either nil or metatransition structures + +(declaim (inline metastate-transition)) +(defun metastate-transition (metastate terminal-number) + (svref (metastate-transitions metastate) terminal-number)) + + +(defun print-metastate (metastate metagrammar &optional (stream t)) + (let ((grammar (metagrammar-grammar metagrammar))) + (pprint-logical-block (stream nil) + (format stream "M~D:~2I ~@_~<~@{S~D ~:_~}~:>~:@_" + (metastate-number metastate) + (nreverse (mapcar #'state-number (metastate-stack metastate)))) + (let ((transitions (metastate-transitions metastate))) + (dotimes (terminal-number (length transitions)) + (let ((transition (svref transitions terminal-number)) + (terminal (svref (grammar-terminals grammar) terminal-number))) + (when transition + (let ((next-metastate (metatransition-next-metastate transition))) + (pprint-logical-block (stream nil) + (format stream "~W ==> ~@_~:I~:[accept~;M~:*~D~] ~_" + terminal + (and next-metastate (metastate-number next-metastate))) + (pprint-fill stream (mapcar #'production-name (metatransition-pre-productions transition))) + (format stream " ~@_") + (pprint-fill stream (mapcar #'production-name (metatransition-post-productions transition)))) + (pprint-newline :mandatory stream))))))))) + + +(defmethod print-object ((metastate metastate) stream) + (print-unreadable-object (metastate stream) + (format stream "metastate S~D" (metastate-number metastate)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; METAGRAMMAR + +(defstruct (metagrammar (:constructor allocate-metagrammar)) + (grammar nil :type grammar :read-only t) ;The grammar to which this metagrammar corresponds + (metastates nil :type list :read-only t) ;List of metastates ordered by metastate numbers + (start nil :type metastate :read-only t)) ;The start metastate + + +(defun make-metagrammar (grammar) + (let* ((terminals (grammar-terminals grammar)) + (n-terminals (length terminals)) + (metastates-hash (make-hash-table :test #'equal)) ;Hash table of (list of state) -> metastate + (metastates nil) + (metastate-number -1)) + (labels + (;Return the stack after applying the given reduction production. + (apply-reduction-production (stack production) + (let* ((stack (nthcdr (production-rhs-length production) stack)) + (state (first stack)) + (dst-state (assert-non-null + (cdr (assoc (production-lhs production) (state-gotos state) :test *grammar-symbol-=*)))) + (dst-stack (cons dst-state stack))) + (if (member dst-state stack :test #'eq) + (error "This grammar cannot be represented by a FSM. Stack: ~S" dst-stack) + dst-stack))) + + (get-metatransition (stack terminal productions) + (let* ((state (first stack)) + (transition (cdr (assoc terminal (state-transitions state) :test *grammar-symbol-=*)))) + (when transition + (case (transition-kind transition) + (:shift + (multiple-value-bind (metastate forwarding-productions) (get-metastate (transition-state transition) stack t) + (make-metatransition metastate (nreverse productions) forwarding-productions))) + (:reduce + (let ((production (transition-production transition))) + (get-metatransition (apply-reduction-production stack production) terminal (cons production productions)))) + (:accept (make-metatransition nil (nreverse productions) nil)) + (t (error "Bad transition: ~S" transition)))))) + + ;Return the metastate corresponding to the state stack (stack-top . stack-rest). Construct a new + ;metastate if necessary. + ;If simplify is true and stack-top is a state for which every outgoing transition is the same + ;reduction, return two values: + ; the metastate reached by following that reduction (doing it recursively if needed) + ; a list of reduction productions followed this way. + (get-metastate (stack-top stack-rest simplify) + (let* ((stack (cons stack-top stack-rest)) + (existing-metastate (gethash stack metastates-hash))) + (cond + (existing-metastate (values existing-metastate nil)) + ((member stack-top stack-rest :test #'eq) + (error "This grammar cannot be represented by a FSM. Stack: ~S" stack)) + (t (let ((forwarding-production (and simplify (forwarding-state-production stack-top)))) + (if forwarding-production + (let ((stack (apply-reduction-production stack forwarding-production))) + (multiple-value-bind (metastate forwarding-productions) (get-metastate (car stack) (cdr stack) simplify) + (values metastate (cons forwarding-production forwarding-productions)))) + (let* ((transitions (make-array n-terminals :initial-element nil)) + (metastate (make-metastate stack (incf metastate-number) transitions))) + (setf (gethash stack metastates-hash) metastate) + (push metastate metastates) + (dotimes (n n-terminals) + (setf (svref transitions n) + (get-metatransition stack (svref terminals n) nil))) + (values metastate nil))))))))) + + (let ((start-metastate (get-metastate (grammar-start-state grammar) nil nil))) + (allocate-metagrammar :grammar grammar + :metastates (nreverse metastates) + :start start-metastate))))) + + +; Print the metagrammar nicely. +(defun print-metagrammar (metagrammar &optional (stream t) &key (grammar t) (details t)) + (pprint-logical-block (stream nil) + (when grammar + (print-grammar (metagrammar-grammar metagrammar) stream :details details)) + + ;Print the metastates. + (format stream "Start metastate: ~@_M~D~:@_~:@_" (metastate-number (metagrammar-start metagrammar))) + (pprint-logical-block (stream (metagrammar-metastates metagrammar)) + (pprint-exit-if-list-exhausted) + (format stream "Metastates:~2I~:@_") + (loop + (print-metastate (pprint-pop) metagrammar stream) + (pprint-exit-if-list-exhausted) + (pprint-newline :mandatory stream)))) + (pprint-newline :mandatory stream)) + + +(defmethod print-object ((metagrammar metagrammar) stream) + (print-unreadable-object (metagrammar stream :identity t) + (write-string "metagrammar" stream))) + + +; Find the longest possible prefix of the input list of tokens that is accepted by the +; grammar. Parse that prefix and return two values: +; the list of action results; +; the tail of the input list of tokens remaining to be parsed. +; Signal an error if no prefix of the input list is accepted by the grammar. +; +; token-terminal is a function that returns a terminal symbol when given an input token. +; If trace is: +; nil, don't print trace information +; :code, print trace information, including action code +; other print trace information +(defun action-metaparse (metagrammar token-terminal input &key trace) + (if trace + (trace-action-metaparse metagrammar token-terminal input trace) + (let ((grammar (metagrammar-grammar metagrammar))) + (labels + ((transition-value-stack (value-stack productions) + (dolist (production productions) + (setq value-stack (funcall (production-evaluator production) value-stack))) + value-stack) + + (cut (input good-metastate good-input good-value-stack) + (unless good-metastate + (error "Parse error on ~S ..." (ldiff input (nthcdr 10 input)))) + (let ((last-metatransition (metastate-transition good-metastate *end-marker-terminal-number*))) + (assert-true (null (metatransition-next-metastate last-metatransition))) + (assert-true (null (metatransition-post-productions last-metatransition))) + (values + (reverse (transition-value-stack good-value-stack (metatransition-pre-productions last-metatransition))) + good-input)))) + + (do ((metastate (metagrammar-start metagrammar)) + (input input (cdr input)) + (value-stack nil) + (last-good-metastate nil) + last-good-input + last-good-value-stack) + (nil) + (when (metastate-transition metastate *end-marker-terminal-number*) + (setq last-good-metastate metastate) + (setq last-good-input input) + (setq last-good-value-stack value-stack)) + (when (endp input) + (return (cut input last-good-metastate last-good-input last-good-value-stack))) + (let* ((token (first input)) + (terminal (funcall token-terminal token)) + (terminal-number (terminal-number grammar terminal)) + (metatransition (metastate-transition metastate terminal-number))) + (unless metatransition + (return (cut input last-good-metastate last-good-input last-good-value-stack))) + (setq value-stack (transition-value-stack value-stack (metatransition-pre-productions metatransition))) + (dolist (action-function-binding (gethash terminal (grammar-terminal-actions grammar))) + (push (funcall (cdr action-function-binding) token) value-stack)) + (setq value-stack (transition-value-stack value-stack (metatransition-post-productions metatransition))) + (setq metastate (metatransition-next-metastate metatransition)))))))) + + +; Same as action-parse, but with tracing information +; If trace is: +; :code, print trace information, including action code +; other print trace information +(defun trace-action-metaparse (metagrammar token-terminal input trace) + (let + ((grammar (metagrammar-grammar metagrammar))) + (labels + ((print-stacks (value-stack type-stack) + (write-string " " *trace-output*) + (if value-stack + (print-values (reverse value-stack) (reverse type-stack) *trace-output*) + (write-string "empty" *trace-output*)) + (pprint-newline :mandatory *trace-output*)) + + (transition-value-stack (value-stack type-stack productions) + (dolist (production productions) + (write-string " reduce " *trace-output*) + (if (eq trace :code) + (write production :stream *trace-output* :pretty t) + (print-production production *trace-output*)) + (pprint-newline :mandatory *trace-output*) + (setq value-stack (funcall (production-evaluator production) value-stack)) + (setq type-stack (nthcdr (production-n-action-args production) type-stack)) + (dolist (action-signature (grammar-symbol-signature grammar (production-lhs production))) + (push (cdr action-signature) type-stack)) + (print-stacks value-stack type-stack)) + (values value-stack type-stack)) + + (cut (input good-metastate good-input good-value-stack good-type-stack) + (unless good-metastate + (error "Parse error on ~S ..." (ldiff input (nthcdr 10 input)))) + (let ((last-metatransition (metastate-transition good-metastate *end-marker-terminal-number*))) + (assert-true (null (metatransition-next-metastate last-metatransition))) + (assert-true (null (metatransition-post-productions last-metatransition))) + (format *trace-output* "cut to M~D~:@_" (metastate-number good-metastate)) + (print-stacks good-value-stack good-type-stack) + (pprint-newline :mandatory *trace-output*) + (values + (reverse (transition-value-stack good-value-stack good-type-stack (metatransition-pre-productions last-metatransition))) + good-input)))) + + (do ((metastate (metagrammar-start metagrammar)) + (input input (cdr input)) + (value-stack nil) + (type-stack nil) + (last-good-metastate nil) + last-good-input + last-good-value-stack + last-good-type-stack) + (nil) + (format *trace-output* "M~D" (metastate-number metastate)) + (when (metastate-transition metastate *end-marker-terminal-number*) + (write-string " (good)" *trace-output*) + (setq last-good-metastate metastate) + (setq last-good-input input) + (setq last-good-value-stack value-stack) + (setq last-good-type-stack type-stack)) + (write-string ": " *trace-output*) + (when (endp input) + (return (cut input last-good-metastate last-good-input last-good-value-stack last-good-type-stack))) + (let* ((token (first input)) + (terminal (funcall token-terminal token)) + (terminal-number (terminal-number grammar terminal)) + (metatransition (metastate-transition metastate terminal-number))) + (unless metatransition + (format *trace-output* "shift ~W: " terminal) + (return (cut input last-good-metastate last-good-input last-good-value-stack last-good-type-stack))) + (format *trace-output* "transition to M~D~:@_" (metastate-number (metatransition-next-metastate metatransition))) + (multiple-value-setq (value-stack type-stack) + (transition-value-stack value-stack type-stack (metatransition-pre-productions metatransition))) + (dolist (action-function-binding (gethash terminal (grammar-terminal-actions grammar))) + (push (funcall (cdr action-function-binding) token) value-stack)) + (dolist (action-signature (grammar-symbol-signature grammar terminal)) + (push (cdr action-signature) type-stack)) + (format *trace-output* "shift ~W~:@_" terminal) + (print-stacks value-stack type-stack) + (multiple-value-setq (value-stack type-stack) + (transition-value-stack value-stack type-stack (metatransition-post-productions metatransition))) + (setq metastate (metatransition-next-metastate metatransition))))))) + + +; Compute all representative strings of terminals such that, for each such string S: +; S is rejected by the grammar's language; +; all prefixes of S are also rejected by the grammar's language; +; for any S and all strings of terminals T, the concatenated string ST is also +; rejected by the grammar's language; +; no string S1 is a prefix of (or equal to) another string S2. +; Often there are infinitely many such strings S, so only output one for each illegal +; metaparser transition. +; Return a list of S's, where each S is itself a list of terminals. +(defun compute-illegal-strings (metagrammar) + (let* ((grammar (metagrammar-grammar metagrammar)) + (terminals (grammar-terminals grammar)) + (n-terminals (length terminals)) + (metastates (metagrammar-metastates metagrammar)) + (n-metastates (length metastates)) + (visited-metastates (make-array n-metastates :element-type 'bit :initial-element 0)) + (illegal-strings nil)) + (labels + ((visit (metastate reversed-string) + (let ((metastate-number (metastate-number metastate))) + (when (= (sbit visited-metastates metastate-number) 0) + (setf (sbit visited-metastates metastate-number) 1) + (let ((metatransitions (metastate-transitions metastate))) + ;If there is a transition for the end marker from this state, then string + ;is accepted by the language, so cut off the search. + (unless (svref metatransitions *end-marker-terminal-number*) + (dotimes (terminal-number n-terminals) + (unless (= terminal-number *end-marker-terminal-number*) + (let ((metatransition (svref metatransitions terminal-number)) + (reversed-string (cons (svref terminals terminal-number) reversed-string))) + (if metatransition + (visit (metatransition-next-metastate metatransition) reversed-string) + (push (reverse reversed-string) illegal-strings))))))))))) + + (visit (metagrammar-start metagrammar) nil) + (nreverse illegal-strings)))) + + +; Compute and print illegal strings of terminals. See compute-illegal-strings. +(defun print-illegal-strings (metagrammar &optional (stream t)) + (pprint-logical-block (stream (compute-illegal-strings metagrammar)) + (format stream "Illegal strings:~2I") + (loop + (pprint-exit-if-list-exhausted) + (pprint-newline :mandatory stream) + (pprint-fill stream (pprint-pop)))) + (pprint-newline :mandatory stream)) diff --git a/mozilla/js2/semantics/Parser.lisp b/mozilla/js2/semantics/Parser.lisp new file mode 100644 index 00000000000..f82cbeff6f1 --- /dev/null +++ b/mozilla/js2/semantics/Parser.lisp @@ -0,0 +1,675 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; LALR(1) and LR(1) grammar generator +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; ------------------------------------------------------------------------------------------------------ + +; kernel-item-alist is a list of pairs (item . prev), where item is a kernel item +; and prev is either nil or a laitem. kernel is a list of the kernel items in a canonical order. +; Return a new state with the given list of kernel items and state number. +; For each non-null prev in kernel-item-alist, update (laitem-propagates prev) to include the +; corresponding laitem in the new state. +(defun make-state (grammar kernel kernel-item-alist number initial-lookaheads) + (let ((laitems nil) + (laitems-hash (make-hash-table :test #'eq))) + (labels + ;Create a laitem for this item and add the association item->laitem to the laitems-hash + ;hash table if it's not there already. Regardless of whether a new laitem was created, + ;update the laitem's lookaheads to also include the given lookaheads. + ;If prev is non-null, update (laitem-propagates prev) to include the laitem if it's not + ;already included there. + ;If a new laitem was created and its first symbol after the dot exists and is a + ;nonterminal A, recursively close items A->.rhs corresponding to all rhs's in the + ;grammar's rule for A. + ((close-item (item lookaheads prev) + (let ((laitem (gethash item laitems-hash))) + (if laitem + (setf (laitem-lookaheads laitem) + (terminalset-union (laitem-lookaheads laitem) lookaheads)) + (let ((item-next-symbol (item-next-symbol item))) + (setq laitem (allocate-laitem grammar item lookaheads)) + (push laitem laitems) + (setf (gethash item laitems-hash) laitem) + (when (nonterminal? item-next-symbol) + (multiple-value-bind (next-lookaheads epsilon-lookahead) + (string-initial-terminals grammar (rest (item-unseen item))) + (let ((next-prev (and epsilon-lookahead laitem))) + (dolist (production (rule-productions (grammar-rule grammar item-next-symbol))) + (close-item (make-item grammar production 0) next-lookaheads next-prev))))))) + (when prev + (pushnew laitem (laitem-propagates prev)))))) + + (dolist (acons kernel-item-alist nil) + (let ((item (car acons)) + (prev (cdr acons))) + (close-item item initial-lookaheads prev))) + (allocate-state number kernel (nreverse laitems))))) + + +; f is a function that takes two arguments: +; a grammar symbol, and +; a list of kernel items in order of increasing item number. +; a list of pairs (item . prev), where item is a kernel item and prev is a laitem; +; For each possible symbol X that can be shifted while in the given state S, call +; f giving it S and the list of items that constitute the kernel of that shift's destination +; state. The prev's are the sources of the corresponding shifted items. +(defun state-each-shift-item-alist (f state) + (let ((shift-symbols-hash (make-hash-table :test *grammar-symbol-=*))) + (dolist (source-laitem (state-laitems state)) + (let* ((source-item (laitem-item source-laitem)) + (shift-symbol (item-next-symbol source-item))) + (when shift-symbol + (push (cons (item-next source-item) source-laitem) + (gethash shift-symbol shift-symbols-hash))))) + ;Use dolist/gethash instead of maphash to make state assignments deterministic. + (dolist (shift-symbol (sorted-hash-table-keys shift-symbols-hash)) + (let ((kernel-item-alist (gethash shift-symbol shift-symbols-hash))) + (funcall f shift-symbol (sort (mapcar #'car kernel-item-alist) #'< :key #'item-number) kernel-item-alist))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; LR(1) + + +; kernel-item-alist should have the same kernel items as state. +; Return true if the prev lookaheads in kernel-item-alist are the same as or subsets of +; the corresponding lookaheads in the state's kernel laitems. +(defun state-subsumes-lookaheads (state kernel-item-alist) + (every + #'(lambda (acons) + (terminalset-<= (laitem-lookaheads (cdr acons)) + (laitem-lookaheads (state-laitem state (car acons))))) + kernel-item-alist)) + + +; kernel-item-alist should have the same kernel items as state. +; Return true if the prev lookaheads in kernel-item-alist are weakly compatible +; with the lookaheads in the state's kernel laitems. +(defun state-weakly-compatible (state kernel-item-alist) + (labels + ((lookahead-weakly-compatible (lookahead1a lookahead1b lookahead2a lookahead2b) + (or (and (terminalsets-disjoint lookahead1a lookahead2b) + (terminalsets-disjoint lookahead1b lookahead2a)) + (not (terminalsets-disjoint lookahead1a lookahead1b)) + (not (terminalsets-disjoint lookahead2a lookahead2b)))) + + (lookahead-list-weakly-compatible (lookahead1a lookaheads1 lookahead2a lookaheads2) + (or (endp lookaheads1) + (and (lookahead-weakly-compatible lookahead1a (first lookaheads1) lookahead2a (first lookaheads2)) + (lookahead-list-weakly-compatible lookahead1a (rest lookaheads1) lookahead2a (rest lookaheads2))))) + + (lookahead-lists-weakly-compatible (lookaheads1 lookaheads2) + (or (endp lookaheads1) + (and (lookahead-list-weakly-compatible (first lookaheads1) (rest lookaheads1) (first lookaheads2) (rest lookaheads2)) + (lookahead-lists-weakly-compatible (rest lookaheads1) (rest lookaheads2)))))) + + (or (= (length kernel-item-alist) 1) + (lookahead-lists-weakly-compatible + (mapcar #'(lambda (acons) (laitem-lookaheads (state-laitem state (car acons)))) kernel-item-alist) + (mapcar #'(lambda (acons) (laitem-lookaheads (cdr acons))) kernel-item-alist))))) + + +; Propagate all lookaheads in the state. +(defun propagate-internal-lookaheads (state) + (dolist (src-laitem (state-laitems state)) + (let ((src-lookaheads (laitem-lookaheads src-laitem))) + (dolist (dst-laitem (laitem-propagates src-laitem)) + (setf (laitem-lookaheads dst-laitem) + (terminalset-union (laitem-lookaheads dst-laitem) src-lookaheads)))))) + + +; Propagate all lookaheads in kernel-item-alist, which must target destination-state. +; Mark destination-state as dirty in the dirty-states hash table. +(defun propagate-external-lookaheads (kernel-item-alist destination-state dirty-states) + (dolist (acons kernel-item-alist) + (let ((dest-laitem (state-laitem destination-state (car acons))) + (src-laitem (cdr acons))) + (setf (laitem-lookaheads dest-laitem) + (terminalset-union (laitem-lookaheads dest-laitem) (laitem-lookaheads src-laitem))))) + (setf (gethash destination-state dirty-states) t)) + + +; Make all states in the grammar and return the initial state. +; Initialize the grammar's list of states. +; Set up the laitems' propagate lists but do not propagate lookaheads yet. +; Initialize the states' gotos lists. +; Initialize the states' shift (but not reduce or accept) transitions in the transitions lists. +(defun add-all-lr-states (grammar) + (let* ((initial-item (make-item grammar (grammar-start-production grammar) 0)) + (lr-states-hash (make-hash-table :test #'equal)) ;kernel -> list of states with that kernel + (initial-kernel (list initial-item)) + (initial-state (make-state grammar initial-kernel (list (cons initial-item nil)) 0 (make-terminalset grammar *end-marker*))) + (states (list initial-state)) + (next-state-number 1)) + (setf (gethash initial-kernel lr-states-hash) (list initial-state)) + (do ((source-states (list initial-state)) + (dirty-states (make-hash-table :test #'eq))) ;Set of states whose kernel lookaheads changed and haven't been propagated yet + ((and (endp source-states) (zerop (hash-table-count dirty-states)))) + (labels + ((make-destination-state (kernel kernel-item-alist) + (let* ((possible-destination-states (gethash kernel lr-states-hash)) + (destination-state (find-if #'(lambda (possible-destination-state) + (state-subsumes-lookaheads possible-destination-state kernel-item-alist)) + possible-destination-states))) + (cond + (destination-state) + ((setq destination-state (find-if #'(lambda (possible-destination-state) + (state-weakly-compatible possible-destination-state kernel-item-alist)) + possible-destination-states)) + (propagate-external-lookaheads kernel-item-alist destination-state dirty-states)) + (t + (setq destination-state (make-state grammar kernel kernel-item-alist next-state-number *empty-terminalset*)) + (propagate-external-lookaheads kernel-item-alist destination-state dirty-states) + (push destination-state (gethash kernel lr-states-hash)) + (incf next-state-number) + (push destination-state states) + (push destination-state source-states))) + destination-state)) + + (update-destination-state (destination-state kernel-item-alist) + (cond + ((state-subsumes-lookaheads destination-state kernel-item-alist) + destination-state) + ((state-weakly-compatible destination-state kernel-item-alist) + (propagate-external-lookaheads kernel-item-alist destination-state dirty-states) + destination-state) + (t (make-destination-state (state-kernel destination-state) kernel-item-alist))))) + + (if source-states + (let ((source-state (pop source-states))) + (remhash source-state dirty-states) + (propagate-internal-lookaheads source-state) + (state-each-shift-item-alist + #'(lambda (shift-symbol kernel kernel-item-alist) + (let ((destination-state (make-destination-state kernel kernel-item-alist))) + (if (nonterminal? shift-symbol) + (push (cons shift-symbol destination-state) + (state-gotos source-state)) + (push (cons shift-symbol (make-shift-transition destination-state)) + (state-transitions source-state))))) + source-state)) + (dolist (dirty-state (sort (hash-table-keys dirty-states) #'< :key #'state-number)) + (when (remhash dirty-state dirty-states) + (propagate-internal-lookaheads dirty-state) + (state-each-shift-item-alist + #'(lambda (shift-symbol kernel kernel-item-alist) + (declare (ignore kernel)) + (if (nonterminal? shift-symbol) + (let* ((destination-binding (assoc shift-symbol (state-gotos dirty-state) :test *grammar-symbol-=*)) + (destination-state (assert-non-null (cdr destination-binding)))) + (setf (cdr destination-binding) (update-destination-state destination-state kernel-item-alist))) + (let* ((destination-transition (cdr (assoc shift-symbol (state-transitions dirty-state) :test *grammar-symbol-=*))) + (destination-state (assert-non-null (transition-state destination-transition)))) + (setf (transition-state destination-transition) + (update-destination-state destination-state kernel-item-alist))))) + dirty-state)))))) + (setf (grammar-states grammar) (nreverse states)) + initial-state)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; LALR(1) + + +; Make all states in the grammar and return the initial state. +; Initialize the grammar's list of states. +; Set up the laitems' propagate lists but do not propagate lookaheads yet. +; Initialize the states' gotos lists. +; Initialize the states' shift (but not reduce or accept) transitions in the transitions lists. +(defun add-all-lalr-states (grammar) + (let* ((initial-item (make-item grammar (grammar-start-production grammar) 0)) + (lalr-states-hash (make-hash-table :test #'equal)) ;kernel -> state + (initial-kernel (list initial-item)) + (initial-state (make-state grammar initial-kernel (list (cons initial-item nil)) 0 (make-terminalset grammar *end-marker*))) + (states (list initial-state)) + (next-state-number 1)) + (setf (gethash initial-kernel lalr-states-hash) initial-state) + (do ((source-states (list initial-state))) + ((endp source-states)) + (let ((source-state (pop source-states))) + (state-each-shift-item-alist + #'(lambda (shift-symbol kernel kernel-item-alist) + (let ((destination-state (gethash kernel lalr-states-hash))) + (if destination-state + (dolist (acons kernel-item-alist) + (pushnew (state-laitem destination-state (car acons)) (laitem-propagates (cdr acons)))) + (progn + (setq destination-state (make-state grammar kernel kernel-item-alist next-state-number *empty-terminalset*)) + (setf (gethash kernel lalr-states-hash) destination-state) + (incf next-state-number) + (push destination-state states) + (push destination-state source-states))) + (if (nonterminal? shift-symbol) + (push (cons shift-symbol destination-state) + (state-gotos source-state)) + (push (cons shift-symbol (make-shift-transition destination-state)) + (state-transitions source-state))))) + source-state))) + (setf (grammar-states grammar) (nreverse states)) + initial-state)) + + +; Propagate the lookaheads in the LALR(1) grammar. +(defun propagate-lalr-lookaheads (grammar) + (let ((dirty-laitems (make-hash-table :test #'eq))) + (dolist (state (grammar-states grammar)) + (dolist (laitem (state-laitems state)) + (when (and (laitem-propagates laitem) (not (terminalset-empty? (laitem-lookaheads laitem)))) + (setf (gethash laitem dirty-laitems) t)))) + (do () + ((zerop (hash-table-count dirty-laitems))) + (dolist (dirty-laitem (hash-table-keys dirty-laitems)) + (remhash dirty-laitem dirty-laitems) + (let ((src-lookaheads (laitem-lookaheads dirty-laitem))) + (dolist (dst-laitem (laitem-propagates dirty-laitem)) + (let* ((old-dst-lookaheads (laitem-lookaheads dst-laitem)) + (new-dst-lookaheads (terminalset-union old-dst-lookaheads src-lookaheads))) + (unless (terminalset-= old-dst-lookaheads new-dst-lookaheads) + (setf (laitem-lookaheads dst-laitem) new-dst-lookaheads) + (setf (gethash dst-laitem dirty-laitems) t))))))) + + ;Erase the propagates chains in all laitems. + (dolist (state (grammar-states grammar)) + (dolist (laitem (state-laitems state)) + (setf (laitem-propagates laitem) nil))))) + + +;;; ------------------------------------------------------------------------------------------------------ + + +; Calculate the reduce and accept transitions in the grammar. +; Also sort all transitions by their terminal numbers and gotos by their nonterminal numbers. +; Conflicting transitions are sorted as follows: +; shifts come before reduces and accepts +; accepts come before reduces +; reduces with lower production numbers come before reduces with higher production numbers +; Disambiguation will choose the first member of a sorted list of conflicting transitions. +(defun finish-transitions (grammar) + (dolist (state (grammar-states grammar)) + (dolist (laitem (state-laitems state)) + (let ((item (laitem-item laitem))) + (unless (item-next-symbol item) + (if (grammar-symbol-= (item-lhs item) *start-nonterminal*) + (when (terminal-in-terminalset grammar *end-marker* (laitem-lookaheads laitem)) + (push (cons *end-marker* (make-accept-transition)) + (state-transitions state))) + (map-terminalset-reverse + #'(lambda (lookahead) + (push (cons lookahead (make-reduce-transition (item-production item))) + (state-transitions state))) + grammar + (laitem-lookaheads laitem)))))) + (setf (state-gotos state) + (sort (state-gotos state) #'< :key #'(lambda (goto-cons) (state-number (cdr goto-cons))))) + (setf (state-transitions state) + (sort (state-transitions state) + #'(lambda (transition-cons-1 transition-cons-2) + (let ((terminal-number-1 (terminal-number grammar (car transition-cons-1))) + (terminal-number-2 (terminal-number grammar (car transition-cons-2)))) + (cond + ((< terminal-number-1 terminal-number-2) t) + ((> terminal-number-1 terminal-number-2) nil) + (t (let* ((transition1 (cdr transition-cons-1)) + (transition2 (cdr transition-cons-2)) + (transition-kind-1 (transition-kind transition1)) + (transition-kind-2 (transition-kind transition2))) + (cond + ((eq transition-kind-2 :shift) nil) + ((eq transition-kind-1 :shift) t) + ((eq transition-kind-2 :accept) nil) + ((eq transition-kind-1 :accept) t) + (t (let ((production-number-1 (production-number (transition-production transition1))) + (production-number-2 (production-number (transition-production transition2)))) + (< production-number-1 production-number-2))))))))))))) + + +; Find ambiguities, if any, in the grammar. Report them on the given stream. +; Fix all ambiguities in favor of the first transition listed +; (the transitions were ordered by finish-transitions). +(defun report-and-fix-ambiguities (grammar stream) + (let ((found-ambiguities nil)) + (pprint-logical-block (stream nil) + (dolist (state (grammar-states grammar)) + (labels + + ((report-ambiguity (transition-cons other-transition-conses) + (unless found-ambiguities + (setq found-ambiguities t) + (format stream "~&Ambiguities:") + (pprint-indent :block 2 stream)) + (pprint-newline :mandatory stream) + (pprint-logical-block (stream nil) + (format stream "S~D: ~W ~:_=> ~:_" (state-number state) (car transition-cons)) + (pprint-logical-block (stream nil) + (dolist (a (cons transition-cons other-transition-conses)) + (print-transition (cdr a) stream) + (format stream " ~:_"))))) + + ; Check the list of transition-conses and report ambiguities. + ; start is the start of a possibly larger list of transition-conses whose tail + ; is the given list. If ambiguities exist, return a copy of start up to the + ; position of list in it followed by list with ambiguities removed. If not, + ; return start unchanged. + (check (transition-conses start) + (if transition-conses + (let* ((transition-cons (first transition-conses)) + (transition-terminal (car transition-cons)) + (transition-conses-rest (rest transition-conses))) + (if transition-conses-rest + (if (grammar-symbol-= transition-terminal (car (first transition-conses-rest))) + (let ((unrelated-transitions + (member-if #'(lambda (a) (not (grammar-symbol-= transition-terminal (car a)))) + transition-conses-rest))) + (report-ambiguity transition-cons (ldiff transition-conses-rest unrelated-transitions)) + (check unrelated-transitions (append (ldiff start transition-conses-rest) unrelated-transitions))) + (check transition-conses-rest start)) + start)) + start))) + + (let ((transition-conses (state-transitions state))) + (setf (state-transitions state) (check transition-conses transition-conses)))))) + (when found-ambiguities + (pprint-newline :mandatory stream)))) + + +; Erase the existing parser, if any, for the given grammar. +(defun clear-parser (grammar) + (clrhash (grammar-items-hash grammar)) + (setf (grammar-states grammar) nil)) + + +; Construct a LR or LALR parser in the given grammar. kind should be either :lalr-1 or :lr-1. +; Return the grammar. +(defun compile-parser (grammar kind) + (clear-parser grammar) + (ecase kind + (:lalr-1 + (add-all-lalr-states grammar) + (propagate-lalr-lookaheads grammar)) + (:lr-1 + (add-all-lr-states grammar))) + (finish-transitions grammar) + (report-and-fix-ambiguities grammar *error-output*) + grammar) + + +; Make the grammar and compile its parser. kind should be either :lalr-1 or :lr-1. +(defun make-and-compile-grammar (kind parametrization start-symbol grammar-source) + (compile-parser (make-grammar parametrization start-symbol grammar-source) + kind)) + + +;;; ------------------------------------------------------------------------------------------------------ + +; Parse the input list of tokens to produce a parse tree. +; token-terminal is a function that returns a terminal symbol when given an input token. +(defun parse (grammar token-terminal input) + (labels + (;Continue the parse with the given parser stack and remainder of input. + (parse-step (stack input) + (if (endp input) + (parse-step-1 stack *end-marker* nil nil) + (let ((token (first input))) + (parse-step-1 stack (funcall token-terminal token) token (rest input))))) + + ;Same as parse-step except that the next input terminal has been determined already. + ;input-rest contains the input tokens after the next token. + (parse-step-1 (stack terminal token input-rest) + (let* ((state (caar stack)) + (transition (cdr (assoc terminal (state-transitions state) :test *grammar-symbol-=*)))) + (if transition + (case (transition-kind transition) + (:shift (parse-step (acons (transition-state transition) token stack) input-rest)) + (:reduce (let ((production (transition-production transition)) + (expansion nil)) + (dotimes (i (production-rhs-length production)) + (push (cdr (pop stack)) expansion)) + (let* ((state (caar stack)) + (dst-state (assert-non-null + (cdr (assoc (production-lhs production) (state-gotos state) :test *grammar-symbol-=*)))) + (named-expansion (cons (production-name production) expansion))) + (parse-step-1 (acons dst-state named-expansion stack) terminal token input-rest)))) + (:accept (cdar stack)) + (t (error "Bad transition: ~S" transition))) + (error "Parse error on ~S followed by ~S ..." token (ldiff input-rest (nthcdr 10 input-rest))))))) + + (parse-step (list (cons (grammar-start-state grammar) nil)) input))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; ACTIONS + +; Initialize the action-signatures hash table, setting each grammar symbol's signature +; to null for now. Also clear all production actions in the grammar. +(defun clear-actions (grammar) + (let ((action-signatures (make-hash-table :test *grammar-symbol-=*)) + (terminals (grammar-terminals grammar)) + (nonterminals (grammar-nonterminals grammar))) + (dotimes (i (length terminals)) + (setf (gethash (svref terminals i) action-signatures) nil)) + (dotimes (i (length nonterminals)) + (setf (gethash (svref nonterminals i) action-signatures) nil)) + (setf (grammar-action-signatures grammar) action-signatures) + (each-grammar-production + grammar + #'(lambda (production) + (setf (production-actions production) nil) + (setf (production-n-action-args production) nil) + (setf (production-evaluator-code production) nil) + (setf (production-evaluator production) nil))) + (clrhash (grammar-terminal-actions grammar)))) + + +; Declare the type of action action-symbol, when called on general-grammar-symbol, to be type-expr. +; Signal an error on duplicate actions. +; It's OK if some of the symbol instances don't exist, as long as at least one does. +(defun declare-action (grammar general-grammar-symbol action-symbol type-expr) + (unless (and action-symbol (symbolp action-symbol)) + (error "Bad action name ~S" action-symbol)) + (let ((action-signatures (grammar-action-signatures grammar)) + (grammar-symbols (general-grammar-symbol-instances grammar general-grammar-symbol)) + (symbol-exists nil)) + (dolist (grammar-symbol grammar-symbols) + (let ((signature (gethash grammar-symbol action-signatures :undefined))) + (unless (eq signature :undefined) + (setq symbol-exists t) + (when (assoc action-symbol signature :test #'eq) + (error "Attempt to redefine the type of action ~S on ~S" action-symbol grammar-symbol)) + (setf (gethash grammar-symbol action-signatures) + (nconc signature (list (cons action-symbol type-expr)))) + (if (nonterminal? grammar-symbol) + (dolist (production (rule-productions (grammar-rule grammar grammar-symbol))) + (setf (production-actions production) + (nconc (production-actions production) (list (cons action-symbol nil))))) + (let ((terminal-actions (grammar-terminal-actions grammar))) + (assert-type grammar-symbol terminal) + (setf (gethash grammar-symbol terminal-actions) + (nconc (gethash grammar-symbol terminal-actions) (list (cons action-symbol nil))))))))) + (unless symbol-exists + (error "Bad action grammar symbol ~S" grammar-symbols)))) + + +; Return the list of pairs (action-symbol . type-or-type-expr) for this grammar-symbol. +; The pairs are in order from oldest to newest action-symbols added to this grammar-symbol. +(declaim (inline grammar-symbol-signature)) +(defun grammar-symbol-signature (grammar grammar-symbol) + (gethash grammar-symbol (grammar-action-signatures grammar))) + + +; Return the list of action types of the grammar's user start-symbol. +(defun grammar-user-start-action-types (grammar) + (mapcar #'cdr (grammar-symbol-signature grammar (gramar-user-start-symbol grammar)))) + + +; If action action-symbol is declared on grammar-symbol, return two values: +; t, and +; the action's type-expr; +; If not, return nil. +(defun action-declaration (grammar grammar-symbol action-symbol) + (let ((declaration (assoc action-symbol (grammar-symbol-signature grammar grammar-symbol) :test #'eq))) + (and declaration + (values t (cdr declaration))))) + + +; Call f on every action declaration, passing it two arguments: +; the grammar-symbol; +; a pair (action-symbol . type-expr). +; f may modify the action's type-expr. +(defun each-action-declaration (grammar f) + (maphash #'(lambda (grammar-symbol signature) + (dolist (action-declaration signature) + (funcall f grammar-symbol action-declaration))) + (grammar-action-signatures grammar))) + + +; Define action action-symbol, when called on the production with the given name, +; to be action-expr. The action should have been declared already. +(defun define-action (grammar production-name action-symbol action-expr) + (dolist (production (general-production-productions (grammar-general-production grammar production-name))) + (let ((definition (assoc action-symbol (production-actions production) :test #'eq))) + (cond + ((null definition) + (error "Attempt to define action ~S on ~S, which hasn't been declared yet" action-symbol production-name)) + ((cdr definition) + (error "Duplicate definition of action ~S on ~S" action-symbol production-name)) + (t (setf (cdr definition) (make-action action-expr))))))) + + +; Define action action-symbol, when called on the given terminal, +; to execute the given function, which should take a token as an input and +; produce a value of the proper type as output. +; The action should have been declared already. +(defun define-terminal-action (grammar terminal action-symbol action-function) + (assert-type action-function function) + (let ((definition (assoc action-symbol (gethash terminal (grammar-terminal-actions grammar)) :test #'eq))) + (cond + ((null definition) + (error "Attempt to define action ~S on ~S, which hasn't been declared yet" action-symbol terminal)) + ((cdr definition) + (error "Duplicate definition of action ~S on ~S" action-symbol terminal)) + (t (setf (cdr definition) action-function))))) + + + +; Parse the input list of tokens to produce a list of action results. +; token-terminal is a function that returns a terminal symbol when given an input token. +; If trace is: +; nil, don't print trace information +; :code, print trace information, including action code +; other print trace information +; Return two values: +; the list of action results; +; the list of action results' types. +(defun action-parse (grammar token-terminal input &key trace) + (labels + (;Continue the parse with the given stacks and remainder of input. + (parse-step (state-stack value-stack input) + (if (endp input) + (parse-step-1 state-stack value-stack *end-marker* nil nil) + (let ((token (first input))) + (parse-step-1 state-stack value-stack (funcall token-terminal token) token (rest input))))) + + ;Same as parse-step except that the next input terminal has been determined already. + ;input-rest contains the input tokens after the next token. + (parse-step-1 (state-stack value-stack terminal token input-rest) + (let* ((state (car state-stack)) + (transition (cdr (assoc terminal (state-transitions state) :test *grammar-symbol-=*)))) + (if transition + (case (transition-kind transition) + (:shift + (dolist (action-function-binding (gethash terminal (grammar-terminal-actions grammar))) + (push (funcall (cdr action-function-binding) token) value-stack)) + (parse-step (cons (transition-state transition) state-stack) value-stack input-rest)) + (:reduce + (let* ((production (transition-production transition)) + (state-stack (nthcdr (production-rhs-length production) state-stack)) + (state (car state-stack)) + (dst-state (assert-non-null + (cdr (assoc (production-lhs production) (state-gotos state) :test *grammar-symbol-=*)))) + (value-stack (funcall (production-evaluator production) value-stack))) + (parse-step-1 (cons dst-state state-stack) value-stack terminal token input-rest))) + (:accept (values (nreverse value-stack) (grammar-user-start-action-types grammar))) + (t (error "Bad transition: ~S" transition))) + (error "Parse error on ~S followed by ~S ..." token (ldiff input-rest (nthcdr 10 input-rest))))))) + + (if trace + (trace-action-parse grammar token-terminal input trace) + (parse-step (list (grammar-start-state grammar)) nil input)))) + + +; Same as action-parse, but with tracing information +; If trace is: +; :code, print trace information, including action code +; other print trace information +; Return two values: +; the list of action results; +; the list of action results' types. +(defun trace-action-parse (grammar token-terminal input trace) + (labels + (;Continue the parse with the given stacks and remainder of input. + ;type-stack contains the types of corresponding value-stack entries. + (parse-step (state-stack value-stack type-stack input) + (if (endp input) + (parse-step-1 state-stack value-stack type-stack *end-marker* nil nil) + (let ((token (first input))) + (parse-step-1 state-stack value-stack type-stack (funcall token-terminal token) token (rest input))))) + + ;Same as parse-step except that the next input terminal has been determined already. + ;input-rest contains the input tokens after the next token. + (parse-step-1 (state-stack value-stack type-stack terminal token input-rest) + (let* ((state (car state-stack)) + (transition (cdr (assoc terminal (state-transitions state) :test *grammar-symbol-=*)))) + (format *trace-output* "S~D: ~@_" (state-number state)) + (print-values (reverse value-stack) (reverse type-stack) *trace-output*) + (pprint-newline :mandatory *trace-output*) + (if transition + (case (transition-kind transition) + (:shift + (format *trace-output* " shift ~W~:@_" terminal) + (dolist (action-function-binding (gethash terminal (grammar-terminal-actions grammar))) + (push (funcall (cdr action-function-binding) token) value-stack)) + (dolist (action-signature (grammar-symbol-signature grammar terminal)) + (push (cdr action-signature) type-stack)) + (parse-step (cons (transition-state transition) state-stack) value-stack type-stack input-rest)) + (:reduce + (let ((production (transition-production transition))) + (write-string " reduce " *trace-output*) + (if (eq trace :code) + (write production :stream *trace-output* :pretty t) + (print-production production *trace-output*)) + (pprint-newline :mandatory *trace-output*) + (let* ((state-stack (nthcdr (production-rhs-length production) state-stack)) + (state (car state-stack)) + (dst-state (assert-non-null + (cdr (assoc (production-lhs production) (state-gotos state) :test *grammar-symbol-=*)))) + (value-stack (funcall (production-evaluator production) value-stack)) + (type-stack (nthcdr (production-n-action-args production) type-stack))) + (dolist (action-signature (grammar-symbol-signature grammar (production-lhs production))) + (push (cdr action-signature) type-stack)) + (parse-step-1 (cons dst-state state-stack) value-stack type-stack terminal token input-rest)))) + (:accept + (format *trace-output* " accept~:@_") + (values (nreverse value-stack) (nreverse type-stack))) + (t (error "Bad transition: ~S" transition))) + (error "Parse error on ~S followed by ~S ..." token (ldiff input-rest (nthcdr 10 input-rest))))))) + + (parse-step (list (grammar-start-state grammar)) nil nil input))) + diff --git a/mozilla/js2/semantics/README b/mozilla/js2/semantics/README new file mode 100644 index 00000000000..c71123a432b --- /dev/null +++ b/mozilla/js2/semantics/README @@ -0,0 +1,10 @@ +js/semantics contains experimental code used to generate LR(1) and LALR(1) +grammars for JavaScript as well as compile and check formal semantics for +JavaScript. The semantics can be executed directly or printed into either +HTML or Microsoft Word RTF formats. + +This code is written in standard Common Lisp. It's been used under Macintosh +Common Lisp 4.0, but should also work under other Common Lisp implementations. + +Contact Waldemar Horwat (waldemar@netscape.com or waldemar@acm.org) for +more information. diff --git a/mozilla/js2/semantics/RTF.lisp b/mozilla/js2/semantics/RTF.lisp new file mode 100644 index 00000000000..a638325a6ba --- /dev/null +++ b/mozilla/js2/semantics/RTF.lisp @@ -0,0 +1,699 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; RTF reader and writer +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; 1440 twips/inch +;;; 20 twips/pt + +(defparameter *rtf-definitions* + '((:rtf-intro rtf 1 mac ansicpg 10000 uc 1 deff 0 deflang 2057 deflangfe 2057) + + ;Fonts + ((+ :rtf-intro) :fonttbl) + (:fonttbl (fonttbl :fonts)) + + (:times f 0) + ((+ :fonts) (:times froman fcharset 256 fprq 2 (* panose "02020603050405020304") "Times New Roman;")) + (:symbol f 3) + ((+ :fonts) (:symbol ftech fcharset 2 fprq 2 "Symbol;")) + (:helvetica f 4) + ((+ :fonts) (:helvetica fnil fcharset 256 fprq 2 "Helvetica;")) + (:courier f 5) + ((+ :fonts) (:courier fmodern fcharset 256 fprq 2 "Courier New;")) + (:palatino f 6) + ((+ :fonts) (:palatino fnil fcharset 256 fprq 2 "Palatino;")) + (:zapf-chancery f 7) + ((+ :fonts) (:zapf-chancery fscript fcharset 256 fprq 2 "Zapf Chancery;")) + (:zapf-dingbats f 8) + ((+ :fonts) (:zapf-dingbats ftech fcharset 2 fprq 2 "Zapf Dingbats;")) + + + ;Color table + ((+ :rtf-intro) :colortbl) + (:colortbl (colortbl ";" ;0 + red 0 green 0 blue 0 ";" ;1 + red 0 green 0 blue 255 ";" ;2 + red 0 green 255 blue 255 ";" ;3 + red 0 green 255 blue 0 ";" ;4 + red 255 green 0 blue 255 ";" ;5 + red 255 green 0 blue 0 ";" ;6 + red 255 green 255 blue 0 ";" ;7 + red 255 green 255 blue 255 ";" ;8 + red 0 green 0 blue 128 ";" ;9 + red 0 green 128 blue 128 ";" ;10 + red 0 green 128 blue 0 ";" ;11 + red 128 green 0 blue 128 ";" ;12 + red 128 green 0 blue 0 ";" ;13 + red 128 green 128 blue 0 ";" ;14 + red 128 green 128 blue 128 ";" ;15 + red 192 green 192 blue 192 ";")) ;16 + (:black cf 1) + (:blue cf 2) + (:turquoise cf 3) + (:bright-green cf 4) + (:pink cf 5) + (:red cf 6) + (:yellow cf 7) + (:white cf 8) + (:dark-blue cf 9) + (:teal cf 10) + (:green cf 11) + (:violet cf 12) + (:dark-red cf 13) + (:dark-yellow cf 14) + (:gray-50 cf 15) + (:gray-25 cf 16) + + + ;Misc. + (:tab2 tab) + (:tab3 tab) + (:8-pt fs 16) + (:9-pt fs 18) + (:10-pt fs 20) + (:12-pt fs 24) + (:no-language lang 1024) + (:english lang 1033) + (:english-uk lang 2057) + + (:reset-section sectd) + (:new-section sect) + (:reset-paragraph pard plain) + ((:new-paragraph t) par) + ((:new-line t) line) + + ;Symbols (-10 suffix means 10-point, etc.) + ((:bullet 1) bullet) + ((:minus 1) endash) + ((:not-equal 1) u 8800 \' 173) + ((:less-or-equal 1) u 8804 \' 178) + ((:greater-or-equal 1) u 8805 \' 179) + ((:infinity 1) u 8734 \' 176) + ((:left-single-quote 1) lquote) + ((:right-single-quote 1) rquote) + ((:left-double-quote 1) ldblquote) + ((:right-double-quote 1) rdblquote) + ((:left-angle-quote 1) u 171 \' 199) + ((:right-angle-quote 1) u 187 \' 200) + ((:bottom-10 1) (field (* fldinst "SYMBOL 94 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:up-arrow-10 1) (field (* fldinst "SYMBOL 173 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:function-arrow-10 2) (field (* fldinst "SYMBOL 174 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:cartesian-product-10 2) (field (* fldinst "SYMBOL 180 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:identical-10 2) (field (* fldinst "SYMBOL 186 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:member-10 2) (field (* fldinst "SYMBOL 206 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:derives-10 2) (field (* fldinst "SYMBOL 222 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:left-triangle-bracket-10 1) (field (* fldinst "SYMBOL 225 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:right-triangle-bracket-10 1) (field (* fldinst "SYMBOL 241 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:big-plus-10 2) (field (* fldinst "SYMBOL 58 \\f \"Zapf Dingbats\" \\s 10") (fldrslt :zapf-dingbats :10-pt))) + + ((:alpha 1) (field (* fldinst "SYMBOL 97 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:beta 1) (field (* fldinst "SYMBOL 98 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:chi 1) (field (* fldinst "SYMBOL 99 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:delta 1) (field (* fldinst "SYMBOL 100 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:epsilon 1) (field (* fldinst "SYMBOL 101 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:phi 1) (field (* fldinst "SYMBOL 102 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:gamma 1) (field (* fldinst "SYMBOL 103 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:eta 1) (field (* fldinst "SYMBOL 104 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:iota 1) (field (* fldinst "SYMBOL 105 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:kappa 1) (field (* fldinst "SYMBOL 107 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:lambda 1) (field (* fldinst "SYMBOL 108 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:mu 1) (field (* fldinst "SYMBOL 109 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:nu 1) (field (* fldinst "SYMBOL 110 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:omicron 1) (field (* fldinst "SYMBOL 111 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:pi 1) (field (* fldinst "SYMBOL 112 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:theta 1) (field (* fldinst "SYMBOL 113 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:rho 1) (field (* fldinst "SYMBOL 114 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:sigma 1) (field (* fldinst "SYMBOL 115 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:tau 1) (field (* fldinst "SYMBOL 116 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:upsilon 1) (field (* fldinst "SYMBOL 117 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:omega 1) (field (* fldinst "SYMBOL 119 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:xi 1) (field (* fldinst "SYMBOL 120 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:psi 1) (field (* fldinst "SYMBOL 121 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + ((:zeta 1) (field (* fldinst "SYMBOL 122 \\f \"Symbol\" \\s 10") (fldrslt :symbol :10-pt))) + + + ;Styles + ((+ :rtf-intro) :stylesheet) + (:stylesheet (stylesheet :styles)) + + (:normal-num 0) + (:normal s :normal-num) + ((+ :styles) (widctlpar :10-pt :english-uk snext :normal-num "Normal;")) + + (:body-text-num 1) + (:body-text s :body-text-num qj sa 120 widctlpar :10-pt :english-uk) + ((+ :styles) (:body-text sbasedon :normal-num snext :body-text-num "Body Text;")) + + (:section-heading-num 2) + (:section-heading s :section-heading-num sa 60 keep keepn nowidctlpar hyphpar 0 level 3 b :12-pt :english-uk) + ((+ :styles) (:section-heading sbasedon :subsection-heading-num snext :body-text-num "heading 3;")) + + (:subsection-heading-num 3) + (:subsection-heading s :subsection-heading-num sa 30 keep keepn nowidctlpar hyphpar 0 level 4 b :10-pt :english-uk) + ((+ :styles) (:subsection-heading sbasedon :normal-num snext :body-text-num "heading 4;")) + + (:grammar-num 10) + (:grammar s :grammar-num nowidctlpar hyphpar 0 :10-pt :no-language) + ((+ :styles) (:grammar sbasedon :normal-num snext :grammar-num "Grammar;")) + + (:grammar-header-num 11) + (:grammar-header s :grammar-header-num sb 60 keep keepn nowidctlpar hyphpar 0 b :10-pt :english-uk) + ((+ :styles) (:grammar-header sbasedon :normal-num snext :grammar-lhs-num "Grammar Header;")) + + (:grammar-lhs-num 12) + (:grammar-lhs s :grammar-lhs-num fi -1440 li 1800 sb 120 keep keepn nowidctlpar hyphpar 0 outlinelevel 4 :10-pt :no-language) + ((+ :styles) (:grammar-lhs sbasedon :grammar-num snext :grammar-rhs-num "Grammar LHS;")) + + (:grammar-lhs-last-num 13) + (:grammar-lhs-last s :grammar-lhs-last-num fi -1440 li 1800 sb 120 sa 120 keep nowidctlpar hyphpar 0 outlinelevel 4 :10-pt :no-language) + ((+ :styles) (:grammar-lhs-last sbasedon :grammar-num snext :grammar-lhs-num "Grammar LHS Last;")) + + (:grammar-rhs-num 14) + (:grammar-rhs s :grammar-rhs-num fi -1260 li 1800 keep keepn nowidctlpar tx 720 hyphpar 0 :10-pt :no-language) + ((+ :styles) (:grammar-rhs sbasedon :grammar-num snext :grammar-rhs-num "Grammar RHS;")) + + (:grammar-rhs-last-num 15) + (:grammar-rhs-last s :grammar-rhs-last-num fi -1260 li 1800 sa 120 keep nowidctlpar tx 720 hyphpar 0 :10-pt :no-language) + ((+ :styles) (:grammar-rhs-last sbasedon :grammar-rhs-num snext :grammar-lhs-num "Grammar RHS Last;")) + + (:grammar-argument-num 16) + (:grammar-argument s :grammar-argument-num fi -1440 li 1800 sb 120 sa 120 keep nowidctlpar hyphpar 0 outlinelevel 4 :10-pt :no-language) + ((+ :styles) (:grammar-argument sbasedon :grammar-num snext :grammar-lhs-num "Grammar Argument;")) + + (:semantics-num 20) + (:semantics s :semantics-num li 180 sb 60 sa 60 keep nowidctlpar hyphpar 0 :10-pt :no-language) + ((+ :styles) (:semantics sbasedon :normal-num snext :semantics-num "Semantics;")) + + (:semantics-next-num 21) + (:semantics-next s :semantics-next-num li 540 sa 60 keep nowidctlpar hyphpar 0 :10-pt :no-language) + ((+ :styles) (:semantics-next sbasedon :semantics-num snext :semantics-next-num "Semantics Next;")) + + (:default-paragraph-font-num 30) + (:default-paragraph-font cs :default-paragraph-font-num) + ((+ :styles) (* :default-paragraph-font additive "Default Paragraph Font;")) + + (:character-literal-num 31) + (:character-literal cs :character-literal-num b :courier :blue :no-language) + ((+ :styles) (* :character-literal additive sbasedon :default-paragraph-font-num "Character Literal;")) + + (:character-literal-control-num 32) + (:character-literal-control cs :character-literal-control-num b 0 :times :dark-blue) + ((+ :styles) (* :character-literal-control additive sbasedon :default-paragraph-font-num "Character Literal Control;")) + + (:terminal-num 33) + (:terminal cs :terminal-num b :palatino :teal :no-language) + ((+ :styles) (* :terminal additive sbasedon :default-paragraph-font-num "Terminal;")) + + (:terminal-keyword-num 34) + (:terminal-keyword cs :terminal-keyword-num b :courier :blue :no-language) + ((+ :styles) (* :terminal-keyword additive sbasedon :terminal-num "Terminal Keyword;")) + + (:nonterminal-num 35) + (:nonterminal cs :nonterminal-num i :palatino :dark-red :no-language) + ((+ :styles) (* :nonterminal additive sbasedon :default-paragraph-font-num "Nonterminal;")) + + (:nonterminal-attribute-num 36) + (:nonterminal-attribute cs :nonterminal-attribute-num i 0) + ((+ :styles) (* :nonterminal-attribute additive sbasedon :default-paragraph-font-num "Nonterminal Attribute;")) + + (:nonterminal-argument-num 37) + (:nonterminal-argument cs :nonterminal-argument-num) + ((+ :styles) (* :nonterminal-argument additive sbasedon :default-paragraph-font-num "Nonterminal Argument;")) + + (:semantic-keyword-num 40) + (:semantic-keyword cs :semantic-keyword-num b :times) + ((+ :styles) (* :semantic-keyword additive sbasedon :default-paragraph-font-num "Semantic Keyword;")) + + (:type-expression-num 41) + (:type-expression cs :type-expression-num :times :red :no-language) + ((+ :styles) (* :type-expression additive sbasedon :default-paragraph-font-num "Type Expression;")) + + (:type-name-num 42) + (:type-name cs :type-name-num scaps :times :red :no-language) + ((+ :styles) (* :type-name additive sbasedon :type-expression-num "Type Name;")) + + (:field-name-num 43) + (:field-name cs :field-name-num :helvetica :red :no-language) + ((+ :styles) (* :field-name additive sbasedon :type-expression-num "Field Name;")) + + (:global-variable-num 44) + (:global-variable cs :global-variable-num i :times :green :no-language) + ((+ :styles) (* :global-variable additive sbasedon :default-paragraph-font-num "Global Variable;")) + + (:local-variable-num 45) + (:local-variable cs :local-variable-num i :times :bright-green :no-language) + ((+ :styles) (* :local-variable additive sbasedon :default-paragraph-font-num "Local Variable;")) + + (:action-name-num 46) + (:action-name cs :action-name-num :zapf-chancery :violet :no-language) + ((+ :styles) (* :action-name additive sbasedon :default-paragraph-font-num "Action Name;")) + + + ;Document Formatting + ((+ :rtf-intro) :docfmt) + (:docfmt widowctrl + ftnbj ;footnotes at bottom of page + aenddoc ;endnotes at end of document + fet 0 ;footnotes only -- no endnotes + formshade ;shade form fields + viewkind 4 ;normal view mode + viewscale 125 ;125% view + pgbrdrhead ;page border surrounds header + pgbrdrfoot) ;page border surrounds footer + + + ;Section Formatting + + + ;Specials + (:invisible v) + ((:but-not 6) (b "except")) + (:subscript sub) + (:superscript super) + (:plain-subscript b 0 i 0 :subscript) + ((:action-begin 1) "[") + ((:action-end 1) "]") + ((:vector-begin 1) (b "[")) + ((:vector-end 1) (b "]")) + ((:empty-vector 2) (b "[]")) + ((:vector-append 2) :big-plus-10) + ((:tuple-begin 1) (b :left-triangle-bracket-10)) + ((:tuple-end 1) (b :right-triangle-bracket-10)) + ((:unit 4) (:global-variable "unit")) + ((:true 4) (:global-variable "true")) + ((:false 5) (:global-variable "false")) + )) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; SIMPLE LINE BREAKER + +(defparameter *limited-line-right-margin* 100) + +; Housekeeping dynamic variables +(defvar *current-limited-lines*) ;Items written so far via break-line to the innermost write-limited-lines +(defvar *current-limited-lines-non-empty*) ;True if something was written to *current-limited-lines* +(defvar *current-limited-position*) ;Number of characters written since the last newline to *current-limited-lines* + + +; Capture the text written by the emitter function to its single parameter +; (an output stream), dividing the text as specified by dynamically scoped calls +; to break-line. Return the text as a base-string. +(defun write-limited-lines (emitter) + (let ((limited-stream (make-string-output-stream :element-type 'base-character)) + (*current-limited-lines* (make-string-output-stream :element-type 'base-character)) + (*current-limited-lines-non-empty* nil) + (*current-limited-position* 0)) + (funcall emitter limited-stream) + (break-line limited-stream) + (get-output-stream-string *current-limited-lines*))) + + +; Capture the text written by the emitter body to stream-var, +; dividing the text as specified by dynamically scoped calls +; to break-line. Write the result to the stream-var stream. +(defmacro write-limited-block (stream-var &body emitter) + `(progn + (write-string + (write-limited-lines #'(lambda (,stream-var) ,@emitter)) + ,stream-var) + nil)) + + +; Indicate that this is a potential place for a line break in the stream provided +; by write-limited-lines. If subdivide is true, also indicate that line breaks can +; be inserted anywhere between this point and the last such point indicated by break-line +; (or the beginning of write-limited-lines, whichever came last). +(defun break-line (limited-stream &optional subdivide) + (let* ((new-chars (get-output-stream-string limited-stream)) + (length (length new-chars))) + (unless (zerop length) + (labels + ((subdivide-new-chars (start) + (let ((length-remaining (- length start)) + (room-on-line (- *limited-line-right-margin* *current-limited-position*))) + (if (>= room-on-line length-remaining) + (progn + (write-string new-chars *current-limited-lines* :start start) + (incf *current-limited-position* length-remaining)) + (let ((end (+ start room-on-line))) + (write-string new-chars *current-limited-lines* :start start :end end) + (write-char #\newline *current-limited-lines*) + (setq *current-limited-position* 0) + (subdivide-new-chars end)))))) + + (let ((position (+ *current-limited-position* length)) + (has-newlines (find #\newline new-chars))) + (cond + ((or has-newlines + (and (> position *limited-line-right-margin*) (not subdivide))) + (when *current-limited-lines-non-empty* + (write-char #\newline *current-limited-lines*)) + (write-string new-chars *current-limited-lines*) + ;Force a line break if break-line is called again and the current + ;new-chars contained a line break. + (setq *current-limited-position* + (if has-newlines + (1+ *limited-line-right-margin*) + length))) + ((<= position *limited-line-right-margin*) + (write-string new-chars *current-limited-lines*) + (setq *current-limited-position* position)) + ((>= *current-limited-position* *limited-line-right-margin*) + (write-char #\newline *current-limited-lines*) + (setq *current-limited-position* 0) + (subdivide-new-chars 0)) + (t (subdivide-new-chars 0))) + (setq *current-limited-lines-non-empty* t)))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; RTF READER + + +; Return true if char can be a part of an RTF control word. +(defun rtf-control-word-char? (char) + (and (char>= char #\a) (char<= char #\z))) + + +; Read RTF from the character stream and return it in list form. +; Each { ... } group is a sublist. +; Each RTF control symbol or word is represented by a lisp symbol. +; If an RTF control has a numeric argument, then its lisp symbol is followed +; by an integer equal to the argument's value. +; Newlines not escaped by backslashes are ignored. +(defun read-rtf (stream) + (labels + ((read (&optional (eof-error-p t)) + (read-char stream eof-error-p nil)) + + (read-group (nested) + (let ((char (read nested))) + (case char + ((nil) nil) + (#\} (if nested + nil + (error "Mismatched }"))) + (#\{ (cons + (read-group t) + (read-group nested))) + (#\\ (append + (read-control) + (read-group nested))) + (#\newline (read-group nested)) + (t (read-text nested (list char)))))) + + (read-text (nested chars) + (let ((char (read nested))) + (case char + ((nil) + (list (coerce (nreverse chars) 'string))) + ((#\{ #\} #\\) + (cons (coerce (nreverse chars) 'string) + (progn + (unread-char char stream) + (read-group nested)))) + (#\newline (read-text nested chars)) + (t (read-text nested (cons char chars)))))) + + (read-integer (value need-digit) + (let* ((char (read)) + (digit (digit-char-p char))) + (cond + (digit (read-integer (+ (* value 10) digit) nil)) + (need-digit (error "Empty number")) + ((eql char #\space) value) + (t (unread-char char stream) + value)))) + + (read-hex (n-digits) + (let ((value 0)) + (dotimes (n n-digits) + (let ((digit (digit-char-p (read) 16))) + (unless digit + (error "Bad hex digit")) + (setq value (+ (* value 16) digit)))) + value)) + + (read-control () + (let ((char (read))) + (if (rtf-control-word-char? char) + (let* ((control-string (read-control-word (list char))) + (control-symbol (intern (string-upcase control-string))) + (char (read))) + (case char + (#\space (list control-symbol)) + (#\- (list control-symbol (- (read-integer 0 t)))) + ((#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9) + (unread-char char stream) + (list control-symbol (read-integer 0 t))) + (t (unread-char char stream) + (list control-symbol)))) + (let* ((control-string (string char)) + (control-symbol (intern (string-upcase control-string)))) + (if (eq control-symbol '\') + (list control-symbol (read-hex 2)) + (list control-symbol)))))) + + (read-control-word (chars) + (let ((char (read))) + (if (rtf-control-word-char? char) + (read-control-word (cons char chars)) + (progn + (unread-char char stream) + (coerce (nreverse chars) 'string)))))) + + (read-group nil))) + + +; Read RTF from the text file with the given name (relative to the +; local directory) and return it in list form. +(defun read-rtf-from-local-file (filename) + (with-open-file (stream (merge-pathnames filename *semantic-engine-directory*) + :direction :input) + (read-rtf stream))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; RTF WRITER + + +(defconstant *rtf-special* '(#\\ #\{ #\})) + + +; Return the string with characters in *rtf-special* preceded by backslashes. +; If there are no such characters, the returned string may be eq to the input string. +(defun escape-rtf (string) + (let ((i (position-if #'(lambda (char) (member char *rtf-special*)) string))) + (if i + (let* ((string-length (length string)) + (result-string (make-array string-length :element-type 'base-character :adjustable t :fill-pointer i))) + (replace result-string string) + (do ((i i (1+ i))) + ((= i string-length)) + (let ((char (char string i))) + (when (member char *rtf-special*) + (vector-push-extend #\\ result-string)) + (vector-push-extend char result-string))) + result-string) + string))) + + +; Write RTF to the character stream. See read-rtf for a description +; of the layout of the rtf list. +(defun write-rtf (rtf &optional (stream t)) + (labels + ((write-group-contents (rtf stream) + (let ((first-rtf (first rtf)) + (rest-rtf (rest rtf))) + (cond + ((listp first-rtf) + (write-group first-rtf stream t)) + ((stringp first-rtf) + (write-string (escape-rtf first-rtf) stream) + (break-line stream t)) + ((symbolp first-rtf) + (write-char #\\ stream) + (write first-rtf :stream stream) + (cond + ((alpha-char-p (char (symbol-name first-rtf) 0)) + (when (integerp (first rest-rtf)) + (write (first rest-rtf) :stream stream) + (setq rest-rtf (rest rest-rtf))) + (let ((first-rest (first rest-rtf))) + (when (and (stringp first-rest) + (or (zerop (length first-rest)) + (let ((ch (char first-rest 0))) + (or (alphanumericp ch) + (eql ch #\space) + (eql ch #\-) + (eql ch #\+))))) + (write-char #\space stream)))) + ((eq first-rtf '\') + (unless (integerp (first rest-rtf)) + (error "Bad rtf: ~S" rtf)) + (format stream "~2,'0x" (first rest-rtf)) + (setq rest-rtf (rest rest-rtf))))) + (t (error "Bad rtf: ~S" rtf))) + (when rest-rtf + (break-line stream) + (write-group-contents rest-rtf stream)))) + + (write-group (rtf stream nested) + (write-limited-block stream + (when nested + (write-char #\{ stream)) + (when rtf + (write-group-contents rtf stream)) + (when nested + (write-char #\} stream))))) + + (with-standard-io-syntax + (let ((*print-readably* nil) + (*print-escape* nil) + (*print-case* :downcase)) + (write-group rtf stream nil))))) + + +; Write RTF to the text file with the given name (relative to the +; local directory). +(defun write-rtf-to-local-file (filename rtf) + (with-open-file (stream (merge-pathnames filename *semantic-engine-directory*) + :direction :output + :if-exists :supersede + #+mcl :external-format #+mcl "RTF " + #+mcl :mac-file-creator #+mcl "MSWD") + (write-rtf rtf stream))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; RTF STREAMS + +(defstruct (rtf-stream (:include markup-stream) + (:constructor allocate-rtf-stream (env head tail level logical-position)) + (:copier nil) + (:predicate rtf-stream?)) + (style nil :type symbol)) ;Current section or paragraph style or nil if none or emitting paragraph contents + + +(defmethod print-object ((rtf-stream rtf-stream) stream) + (print-unreadable-object (rtf-stream stream :identity t) + (write-string "rtf-stream" stream))) + + +; Make a new, empty, open rtf-stream with the given definitions for its markup-env. +(defun make-rtf-stream (markup-env level &optional logical-position) + (let ((head (list nil))) + (allocate-rtf-stream markup-env head head level logical-position))) + + +; Make a new, empty, open, top-level rtf-stream with the given definitions +; for its markup-env. +(defun make-top-level-rtf-stream (rtf-definitions) + (let ((head (list nil)) + (markup-env (make-markup-env))) + (markup-env-define-alist markup-env rtf-definitions) + (allocate-rtf-stream markup-env head head *markup-stream-top-level* nil))) + + +; Append a block to the end of the rtf-stream. The block may be inlined +; if nothing else follows it in the rtf-stream. +(defun rtf-stream-append-or-inline-block (rtf-stream block) + (assert-type block list) + (when block + (let ((pretail (markup-stream-tail rtf-stream))) + (markup-stream-append1 rtf-stream block) + (setf (markup-stream-pretail rtf-stream) pretail)))) + + +; Return the approximate width of the rtf item; return t if it is a line break. +; Also allow rtf groups as long as they do not contain line breaks. +(defmethod markup-group-width ((rtf-stream rtf-stream) item) + (if (consp item) + (reduce #'+ item :key #'(lambda (subitem) (markup-group-width rtf-stream subitem))) + (markup-width rtf-stream item))) + + +; Create a top-level rtf-stream and call emitter to emit its contents. +; emitter takes one argument -- an rtf-stream to which it should emit paragraphs. +; Return the top-level rtf-stream. +(defun depict-rtf-top-level (emitter) + (let* ((top-rtf-stream (make-top-level-rtf-stream *rtf-definitions*)) + (rtf-stream (make-rtf-stream (markup-stream-env top-rtf-stream) *markup-stream-paragraph-level*))) + (markup-stream-append1 rtf-stream ':rtf-intro) + (markup-stream-append1 rtf-stream ':reset-section) + (funcall emitter rtf-stream) + (markup-stream-append1 top-rtf-stream (markup-stream-unexpanded-output rtf-stream)) + top-rtf-stream)) + + +; Create a top-level rtf-stream and call emitter to emit its contents. +; emitter takes one argument -- an rtf-stream to which it should emit paragraphs. +; Write the resulting RTF to the text file with the given name (relative to the +; local directory). +(defun depict-rtf-to-local-file (filename emitter) + (let ((top-rtf-stream (depict-rtf-top-level emitter))) + (write-rtf-to-local-file filename (markup-stream-output top-rtf-stream)))) + + +; Return the markup accumulated in the markup-stream after expanding all of its macros. +; The markup-stream is closed after this function is called. +(defmethod markup-stream-output ((rtf-stream rtf-stream)) + (markup-env-expand (markup-stream-env rtf-stream) (markup-stream-unexpanded-output rtf-stream) nil)) + + +(defmethod depict-block-style-f ((rtf-stream rtf-stream) block-style emitter) + (declare (ignore block-style)) + (assert-true (= (markup-stream-level rtf-stream) *markup-stream-paragraph-level*)) + (funcall emitter rtf-stream)) + + +(defmethod depict-paragraph-f ((rtf-stream rtf-stream) paragraph-style emitter) + (assert-true (= (markup-stream-level rtf-stream) *markup-stream-paragraph-level*)) + (assert-true (and paragraph-style (symbolp paragraph-style))) + (unless (eq paragraph-style (rtf-stream-style rtf-stream)) + (markup-stream-append1 rtf-stream ':reset-paragraph) + (markup-stream-append1 rtf-stream paragraph-style)) + (setf (rtf-stream-style rtf-stream) nil) + (setf (markup-stream-level rtf-stream) *markup-stream-content-level*) + (setf (markup-stream-logical-position rtf-stream) (make-logical-position)) + (prog1 + (funcall emitter rtf-stream) + (setf (markup-stream-level rtf-stream) *markup-stream-paragraph-level*) + (setf (rtf-stream-style rtf-stream) paragraph-style) + (setf (markup-stream-logical-position rtf-stream) nil) + (markup-stream-append1 rtf-stream ':new-paragraph))) + + +(defmethod depict-char-style-f ((rtf-stream rtf-stream) char-style emitter) + (assert-true (>= (markup-stream-level rtf-stream) *markup-stream-content-level*)) + (assert-true (and char-style (symbolp char-style))) + (let ((inner-rtf-stream (make-rtf-stream (markup-stream-env rtf-stream) *markup-stream-content-level* (markup-stream-logical-position rtf-stream)))) + (markup-stream-append1 inner-rtf-stream char-style) + (prog1 + (funcall emitter inner-rtf-stream) + (rtf-stream-append-or-inline-block rtf-stream (markup-stream-unexpanded-output inner-rtf-stream))))) + + +#| +(setq r (read-rtf-from-local-file "SampleStyles.rtf")) +(write-rtf-to-local-file "Y.rtf" r) +|# diff --git a/mozilla/js2/semantics/Utilities.lisp b/mozilla/js2/semantics/Utilities.lisp new file mode 100644 index 00000000000..200a4f9c9a4 --- /dev/null +++ b/mozilla/js2/semantics/Utilities.lisp @@ -0,0 +1,507 @@ +;;; The contents of this file are subject to the Netscape Public License +;;; Version 1.0 (the "NPL"); you may not use this file except in +;;; compliance with the NPL. You may obtain a copy of the NPL at +;;; http://www.mozilla.org/NPL/ +;;; +;;; Software distributed under the NPL is distributed on an "AS IS" basis, +;;; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +;;; for the specific language governing rights and limitations under the +;;; NPL. +;;; +;;; The Initial Developer of this code under the NPL is Netscape +;;; Communications Corporation. Portions created by Netscape are +;;; Copyright (C) 1998 Netscape Communications Corporation. All Rights +;;; Reserved. + +;;; +;;; Handy lisp utilities +;;; +;;; Waldemar Horwat (waldemar@netscape.com) +;;; + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MCL FIXES + + +(setq *print-right-margin* 150) + +;;; Fix name-char and char-name. +#+mcl +(locally + (declare (optimize (speed 3) (safety 0) (debug 1))) + (eval-when (:compile-toplevel :load-toplevel :execute) + (setq *warn-if-redefine* nil) + (setq *warn-if-redefine-kernel* nil)) + + (defun char-name (c) + (dolist (e ccl::*name-char-alist*) + (declare (list e)) + (when (eq c (cdr e)) + (return-from char-name (car e)))) + (let ((code (char-code c))) + (declare (fixnum code)) + (cond ((< code #x100) + (unless (and (>= code 32) (<= code 216) (/= code 127)) + (format nil "x~2,'0X" code))) + (t (format nil "u~4,'0X" code))))) + + (defun name-char (name) + (if (characterp name) + name + (let* ((name (string name)) + (namelen (length name))) + (declare (fixnum namelen)) + (or (cdr (assoc name ccl::*name-char-alist* :test #'string-equal)) + (if (= namelen 1) + (char name 0) + (when (>= namelen 2) + (flet + ((number-char (name base lg-base) + (let ((n 0)) + (dotimes (i (length name) (code-char n)) + (let ((code (digit-char-p (char name i) base))) + (if code + (setq n (logior code (ash n lg-base))) + (return))))))) + (case (char name 0) + (#\^ + (when (= namelen 2) + (code-char (the fixnum (logxor (the fixnum (char-code (char-upcase (char name 1)))) #x40))))) + ((#\x #\X #\u #\U) + (number-char (subseq name 1) 16 4)) + ((#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7) + (number-char name 8 3)))))))))) + + (eval-when (:compile-toplevel :load-toplevel :execute) + (setq *warn-if-redefine* t) + (setq *warn-if-redefine-kernel* t))) + + + +;;; ------------------------------------------------------------------------------------------------------ +;;; READER SYNTAX + +; Define #?num to produce a character with code given by the hexadecimal number num. +; (This is a portable extension; the #\u syntax installed above does the same thing +; but is not portable.) +(set-dispatch-macro-character + #\# #\? + #'(lambda (stream subchar arg) + (declare (ignore subchar arg)) + (let ((*read-base* 16)) + (code-char (read stream t nil t))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; MACROS + +; (list*-bind (var1 var2 ... varn) expr body): +; evaluates expr to obtain a value v; +; binds var1, var2, ..., varn such that (list* var1 var2 ... varn) is equal to v; +; evaluates body with these bindings; +; returns the result values from the body. +(defmacro list*-bind ((var1 &rest vars) expr &body body) + (labels + ((gen-let*-bindings (var1 vars expr) + (if vars + (let ((expr-var (gensym "REST"))) + (list* + (list expr-var expr) + (list var1 (list 'car expr-var)) + (gen-let*-bindings (car vars) (cdr vars) (list 'cdr expr-var)))) + (list + (list var1 expr))))) + (list* 'let* (gen-let*-bindings var1 vars expr) body))) + +(set-pprint-dispatch '(cons (member list*-bind)) + (pprint-dispatch '(multiple-value-bind () ()))) + + +; (multiple-value-map-bind (var1 var2 ... varn) f (src1 src2 ... srcm) body) +; evaluates src1, src2, ..., srcm to obtain lists l1, l2, ..., lm; +; calls f on corresponding elements of lists l1, ..., lm; each such call should return n values v1 v2 ... vn; +; binds var1, var2, ..., varn such var1 is the list of all v1's, var2 is the list of all v2's, etc.; +; evaluates body with these bindings; +; returns the result values from the body. +(defmacro multiple-value-map-bind ((&rest vars) f (&rest srcs) &body body) + (let ((n (length vars)) + (m (length srcs)) + (fun (gensym "F")) + (ss nil) + (vs nil) + (accumulators nil)) + (dotimes (i n) + (push (gensym "V") vs) + (push (gensym "ACC") accumulators)) + (dotimes (i m) + (push (gensym "S") ss)) + `(let ((,fun ,f) + ,@(mapcar #'(lambda (acc) (list acc nil)) accumulators)) + (mapc #'(lambda ,ss + (multiple-value-bind ,vs (funcall ,fun ,@ss) + ,@(mapcar #'(lambda (accumulator v) (list 'push v accumulator)) + accumulators vs))) + ,@srcs) + (let ,(mapcar #'(lambda (var accumulator) (list var (list 'nreverse accumulator))) + vars accumulators) + ,@body)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; VALUE ASSERTS + +(defconstant *value-asserts* t) + +; Assert that (test value) returns non-nil. Return value. +(defmacro assert-value (value test &rest format-and-parameters) + (if *value-asserts* + (let ((v (gensym "VALUE"))) + `(let ((,v ,value)) + (unless (,test ,v) + ,(if format-and-parameters + `(error ,@format-and-parameters) + `(error "~S doesn't satisfy ~S" ',value ',test))) + ,v)) + value)) + + +; Assert that value is non-nil. Return value. +(defmacro assert-non-null (value &rest format-and-parameters) + `(assert-value ,value identity . + ,(or format-and-parameters + `("~S is null" ',value)))) + + +; Assert that value is non-nil. Return nil. +; Do not evaluate value in nondebug versions. +(defmacro assert-true (value &rest format-and-parameters) + (if *value-asserts* + `(unless ,value + ,(if format-and-parameters + `(error ,@format-and-parameters) + `(error "~S is false" ',value))) + nil)) + + +; Assert that expr returns n values. Return those values. +(defmacro assert-n-values (n expr) + (if *value-asserts* + (let ((v (gensym "VALUES"))) + `(let ((,v (multiple-value-list ,expr))) + (unless (= (length ,v) ,n) + (error "~S returns ~D values instead of ~D" ',expr (length ,v) ',n)) + (values-list ,v))) + expr)) + +; Assert that expr returns one value. Return that value. +(defmacro assert-one-value (expr) + `(assert-n-values 1 ,expr)) + +; Assert that expr returns two values. Return those values. +(defmacro assert-two-values (expr) + `(assert-n-values 2 ,expr)) + +; Assert that expr returns three values. Return those values. +(defmacro assert-three-values (expr) + `(assert-n-values 3 ,expr)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; STRUCTURED TYPES + +(defconstant *type-asserts* t) + +(defun tuple? (value structured-types) + (if (endp structured-types) + (null value) + (and (consp value) + (structured-type? (car value) (first structured-types)) + (tuple? (cdr value) (rest structured-types))))) + +(defun list-of? (value structured-type) + (or + (null value) + (and (consp value) + (structured-type? (car value) structured-type) + (list-of? (cdr value) structured-type)))) + + +; Return true if value has the given structured-type. +; A structured-type can be a Common Lisp type or one of the forms below: +; +; (cons t1 t2) is the type of pairs whose car has structured-type t1 and +; cdr has structured-type t2. +; +; (tuple t1 t2 ... tn) is the type of n-element lists whose first element +; has structured-type t1, second element has structured-type t2, ..., +; and last element has structured-type tn. +; +; (list t) is the type of lists all of whose elements have structured-type t. +; +(defun structured-type? (value structured-type) + (cond + ((consp structured-type) + (case (first structured-type) + (cons (and (consp value) + (structured-type? (car value) (second structured-type)) + (structured-type? (cdr value) (third structured-type)))) + (tuple (tuple? value (rest structured-type))) + (list (list-of? value (second structured-type))) + (t (typep value structured-type)))) + ((null structured-type) nil) + (t (typep value structured-type)))) + + +; Ensure that value has type given by typespec +; (which should not be quoted). Return the value. +(defmacro assert-type (value structured-type) + (if *type-asserts* + (let ((v (gensym "VALUE"))) + `(let ((,v ,value)) + (unless (structured-type? ,v ',structured-type) + (error "~S should have type ~S" ,v ',structured-type)) + ,v)) + value)) + +(deftype bool () '(member nil t)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; GENERAL UTILITIES + + +; f must be either a function, a symbol, or a list of the form (setf ). +; If f is a function or has a function binding, return that function; otherwise return nil. +(defun callable (f) + (cond + ((functionp f) f) + ((fboundp f) (fdefinition f)) + (t nil))) + + +; Return the first character of symbol's name or nil if s's name has zero length. +(defun first-symbol-char (symbol) + (let ((name (symbol-name symbol))) + (when (> (length name) 0) + (char name 0)))) + + +(defconstant *get2-nonce* (if (boundp '*get2-nonce*) (symbol-value '*get2-nonce*) (gensym))) + +; Perform a get except that return two values: +; The value returned from the get or nil if the property is not present +; t if the property is present or nil if not. +(defun get2 (symbol property) + (let ((value (get symbol property *get2-nonce*))) + (if (eq value *get2-nonce*) + (values nil nil) + (values value t)))) + + +; Return a list of all the keys in the hash table. +(defun hash-table-keys (hash-table) + (let ((keys nil)) + (maphash #'(lambda (key value) + (declare (ignore value)) + (push key keys)) + hash-table) + keys)) + + +; Return a list of all the keys in the hash table sorted by their string representations. +(defun sorted-hash-table-keys (hash-table) + (with-standard-io-syntax + (let ((*print-readably* nil) + (*print-escape* nil)) + (sort (hash-table-keys hash-table) #'string< :key #'write-to-string)))) + + +; Given an association list ((key1 . data1) (key2 . data2) ... (keyn datan)), +; produce another association list whose keys are sets of the keys of the original list, +; where the data elements of each such set are equal according to the given test function. +; The keys within each set are listed in the same order as in the original list. +; Set X comes before set Y if X contains a key earlier in the original list than any +; key in Y. +(defun collect-equivalences (alist &key (test #'eql)) + (if (endp alist) + nil + (let* ((element (car alist)) + (key (car element)) + (data (cdr element)) + (rest (cdr alist))) + (if (rassoc data rest :test test) + (let ((filtered-rest nil) + (additional-keys nil)) + (dolist (elt rest) + (if (funcall test data (cdr elt)) + (push (car elt) additional-keys) + (push elt filtered-rest))) + (acons (cons key (nreverse additional-keys)) data + (collect-equivalences (nreverse filtered-rest) :test test))) + (acons (list key) data (collect-equivalences rest :test test)))))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; BITMAPS + +; Treating integer m as a bitmap, call f on the number of each bit set in m. +(defun bitmap-each-bit (f m) + (assert-true (>= m 0)) + (dotimes (i (integer-length m)) + (when (logbitp i m) + (funcall f i)))) + + +; Treating integer m as a bitmap, return a sorted list of disjoint, nonadjacent ranges +; of bits set in m. Each range is a pair (x . y) and indicates that bits numbered x through +; y, inclusive, are set in m. If m is negative, the last range will be a pair (x . :infinity). +(defun bitmap-to-ranges (m) + (labels + ((bitmap-to-ranges-sub (m ranges) + (if (zerop m) + ranges + (let* ((hi (integer-length m)) + (m (- m (ash 1 hi))) + (lo (integer-length m)) + (m (+ m (ash 1 lo)))) + (bitmap-to-ranges-sub m (acons lo (1- hi) ranges)))))) + (if (minusp m) + (let* ((lo (integer-length m)) + (m (+ m (ash 1 lo)))) + (bitmap-to-ranges-sub m (list (cons lo :infinity)))) + (bitmap-to-ranges-sub m nil)))) + + +; Same as bitmap-to-ranges but abbreviate pairs (x . x) by x. +(defun bitmap-to-abbreviated-ranges (m) + (mapcar #'(lambda (range) + (if (eql (car range) (cdr range)) + (car range) + range)) + (bitmap-to-ranges m))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; PACKAGES + +; Call f on each external symbol defined in the package. +(defun each-package-external-symbol (package f) + (with-package-iterator (iter package :external) + (loop + (multiple-value-bind (present symbol) (iter) + (unless present + (return)) + (funcall f symbol))))) + + +; Return a list of all external symbols defined in the package. +(defun package-external-symbols (package) + (with-package-iterator (iter package :external) + (let ((list nil)) + (loop + (multiple-value-bind (present symbol) (iter) + (unless present + (return)) + (push symbol list))) + list))) + + +; Return a sorted list of all external symbols defined in the package. +(defun sorted-package-external-symbols (package) + (sort (package-external-symbols package) #'string<)) + + +; Call f on each internal symbol defined in the package. +(defun each-package-internal-symbol (package f) + (with-package-iterator (iter package :internal) + (loop + (multiple-value-bind (present symbol) (iter) + (unless present + (return)) + (funcall f symbol))))) + + +; Return a list of all internal symbols defined in the package. +(defun package-internal-symbols (package) + (with-package-iterator (iter package :internal) + (let ((list nil)) + (loop + (multiple-value-bind (present symbol) (iter) + (unless present + (return)) + (push symbol list))) + list))) + + +; Return a sorted list of all internal symbols defined in the package. +(defun sorted-package-internal-symbols (package) + (sort (package-internal-symbols package) #'string<)) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; SETS + +(defstruct (set (:constructor allocate-set (elts-hash))) + (elts-hash nil :type hash-table :read-only t)) + + +; Make and return a new set. +(defun make-set (&optional (test #'eql)) + (allocate-set (make-hash-table :test test))) + + +; Add values to the set, modifying the set in place. +; Return the set. +(defun set-add (set &rest values) + (let ((elements (set-elts-hash set))) + (dolist (value values) + (setf (gethash value elements) t))) + set) + + +; Return true if element is a member of the set. +(defun set-member (set element) + (gethash element (set-elts-hash set))) + + +; Return the set as a list. +(defun set-elements (set) + (let ((elements nil)) + (maphash #'(lambda (key value) + (declare (ignore value)) + (push key elements)) + (set-elts-hash set)) + elements)) + + +; Print the set +(defmethod print-object ((set set) stream) + (if *print-readably* + (call-next-method) + (format stream "~<{~;~@{~W ~:_~}~;}~:>" (set-elements set)))) + + +;;; ------------------------------------------------------------------------------------------------------ +;;; DEPTH-FIRST SEARCH + +; Return a depth-first-ordered list of the nodes in a directed graph. +; The graph may contain cycles, so a general depth-first search is used. +; start is the start node. +; successors is a function that takes a node and returns a list of that +; node's successors. +; test is a function that takes two nodes and returns true if they are +; the same node. test should be either #'eq, #'eql, or #'equal +; because it is used as a test function in a hash table. +(defun depth-first-search (test successors start) + (let ((visited-nodes (make-set test)) + (dfs-list nil)) + (labels + ((visit (node) + (set-add visited-nodes node) + (dolist (successor (funcall successors node)) + (unless (set-member visited-nodes successor) + (visit successor))) + (push node dfs-list))) + (visit start) + dfs-list))) diff --git a/mozilla/js2/semantics/styles.css b/mozilla/js2/semantics/styles.css new file mode 100644 index 00000000000..c5623e92436 --- /dev/null +++ b/mozilla/js2/semantics/styles.css @@ -0,0 +1,64 @@ +.title1 {font-family: "Times New Roman", Times, serif; font-size: 36pt; font-weight: bold; color: #000000; white-space: nowrap} + +.title2 {font-family: "Times New Roman", Times, serif; font-size: 18pt; font-weight: bold; color: #000000; white-space: nowrap} + +.top-title {color: #009900} + +.sub {font-size: 50%} + +.sub-num {font-size: smaller; font-style: normal} + +.syntax {margin-left: 0.5in} + +.issue {color: #FF0000} + + + +.grammar-rule {margin-left: 18pt; margin-top: 6pt; margin-bottom: 6pt} + +.grammar-lhs {} + +.grammar-rhs {margin-left: 9pt;} + +.grammar-argument {margin-left: 18pt; margin-top: 6pt; margin-bottom: 6pt} + +.semantics {margin-left: 9pt; margin-top: 3pt; margin-bottom: 3pt} + +.semantics-next {margin-left: 27pt; margin-bottom: 3pt} + + + +.symbol {font-family: "Symbol"} + +VAR {font-family: Georgia, Palatino, "Times New Roman", Times, serif; font-weight: normal; font-style: italic} + +CODE {font-family: "Courier New", Courier, mono; color: #0000FF} + +PRE {font-family: "Courier New", Courier, mono; color: #0000FF; margin-left: 0.5in} + +.control {font-family: "Times New Roman", Times, serif; font-weight: normal; color: #000099} + +.terminal {font-family: Georgia, Palatino, "Times New Roman", Times, serif; font-weight: bold; color: #009999} + +.terminal-keyword {font-weight: bold} + +.nonterminal {color: #009900} + +.nonterminal-attribute {font-style: normal} + +.nonterminal-argument {font-style: normal} + +.semantic-keyword {font-family: "Times New Roman", Times, serif; font-weight: bold} + +.type-expression {font-family: "Times New Roman", Times, serif; color: #CC0000} + +.type-name {font-family: "Times New Roman", Times, serif; font-variant: small-caps; color: #CC0000} + +.field-name {font-family: Arial, Helvetica, sans-serif; color: #FF0000} + +.global-variable {font-family: "Times New Roman", Times, serif; color: #006600} + +.local-variable {font-family: "Times New Roman", Times, serif; color: #009900} + +.action-name {font-family: "Zapf Chancery", "Comic Sans MS", Script, serif; color: #660066} +