Simplified postfix-expressions and use-exclude-include

This commit is contained in:
waldemar%netscape.com 2000-12-21 00:04:52 +00:00
Родитель a3e9d4ceeb
Коммит f11df45168
2 изменённых файлов: 78 добавлений и 118 удалений

Просмотреть файл

@ -52,7 +52,6 @@
(production :primary-expression (:object-literal) primary-expression-object-literal)
(production :primary-expression (:function-expression) primary-expression-function-expression)
(production :primary-expression (:super-expression) primary-expression-super-expression)
;(production :primary-expression (eval :parenthesized-expression) primary-expression-eval)
(production :parenthesized-expression (\( (:assignment-expression allow-in) \)) parenthesized-expression-assignment-expression)
@ -103,61 +102,44 @@
(production :postfix-expression (:short-new-expression) postfix-expression-short-new-expression)
(production :attribute-expression (:simple-qualified-identifier) attribute-expression-simple-qualified-identifier)
(production :attribute-expression (:attribute-expression :dot-operator) attribute-expression-dot-operator)
(production :attribute-expression (:attribute-expression :brackets) attribute-expression-brackets)
(production :attribute-expression (:attribute-expression :member-operator) attribute-expression-member-operator)
(production :attribute-expression (:attribute-expression :arguments) attribute-expression-call)
(production :full-postfix-expression (:const-dot-expression) full-postfix-expression-const-dot-expression)
(production :full-postfix-expression (:full-postfix-subexpression) full-postfix-expression-full-postfix-subexpression)
(production :full-postfix-subexpression (:primary-expression) full-postfix-subexpression-primary-expression)
(production :full-postfix-subexpression (:expression-qualified-identifier) full-postfix-subexpression-expression-qualified-identifier)
(production :full-postfix-subexpression (:full-new-expression) full-postfix-subexpression-full-new-expression)
(production :full-postfix-subexpression (:full-postfix-subexpression :dot-operator) full-postfix-subexpression-dot-operator)
(production :full-postfix-subexpression (:full-postfix-expression :brackets) full-postfix-subexpression-brackets)
(production :full-postfix-subexpression (:full-postfix-expression :arguments) full-postfix-subexpression-call)
(production :full-postfix-subexpression (:postfix-expression :no-line-break ++) full-postfix-subexpression-increment)
(production :full-postfix-subexpression (:postfix-expression :no-line-break --) full-postfix-subexpression-decrement)
(production :full-postfix-expression (:primary-expression) full-postfix-expression-primary-expression)
(production :full-postfix-expression (:expression-qualified-identifier) full-postfix-expression-expression-qualified-identifier)
(production :full-postfix-expression (:full-new-expression) full-postfix-expression-full-new-expression)
(production :full-postfix-expression (:full-postfix-expression :member-operator) full-postfix-expression-member-operator)
(production :full-postfix-expression (:full-postfix-expression :arguments) full-postfix-expression-call)
(production :full-postfix-expression (:postfix-expression :no-line-break ++) full-postfix-expression-increment)
(production :full-postfix-expression (:postfix-expression :no-line-break --) full-postfix-expression-decrement)
(? js2
(production :full-postfix-subexpression (:postfix-expression @ :qualified-identifier) full-postfix-subexpression-coerce)
(production :full-postfix-subexpression (:postfix-expression @ :parenthesized-expression) full-postfix-subexpression-indirect-coerce))
(production :full-postfix-expression (:postfix-expression @ :qualified-identifier) full-postfix-expression-coerce)
(production :full-postfix-expression (:postfix-expression @ :parenthesized-expression) full-postfix-expression-indirect-coerce))
(production :full-new-expression (new :bracket-expression :arguments) full-new-expression-new)
(production :full-new-expression (new :full-new-subexpression :arguments) full-new-expression-new)
(production :full-new-subexpression (:primary-expression) full-new-subexpression-primary-expression)
(production :full-new-subexpression (:qualified-identifier) full-new-subexpression-qualified-identifier)
(production :full-new-subexpression (:full-new-expression) full-new-subexpression-full-new-expression)
(production :full-new-subexpression (:full-new-subexpression :member-operator) full-new-subexpression-member-operator)
(production :short-new-expression (new :short-new-subexpression) short-new-expression-new)
(production :short-new-expression (const new :short-new-subexpression) short-new-expression-const-new)
(production :short-new-subexpression (:bracket-expression) short-new-subexpression-new-full)
(production :short-new-subexpression (:full-new-subexpression) short-new-subexpression-new-full)
(production :short-new-subexpression (:short-new-expression) short-new-subexpression-new-short)
(production :bracket-expression (:const-expression) bracket-expression-const-expression)
(production :bracket-expression (:bracket-subexpression) bracket-expression-bracket-subexpression)
(production :member-operator (\. :qualified-identifier) member-operator-qualified-identifier)
(production :member-operator (\. class) member-operator-class)
(production :member-operator (:brackets) member-operator-brackets)
(production :bracket-subexpression (:bracket-expression :brackets) bracket-subexpression-brackets)
(production :bracket-subexpression (:bracket-subexpression :dot-operator) bracket-subexpression-dot-operator)
(production :brackets ([ ]) brackets-none)
(production :brackets ([ (:list-expression allow-in) ]) brackets-unnamed)
(production :brackets ([ :named-argument-list ]) brackets-named)
(production :const-expression (:dot-expression) const-expression-dot-expression)
(production :const-expression (:const-dot-expression) const-expression-const-dot-expression)
(production :const-dot-expression (const :dot-expression) const-dot-expression-dot-expression)
(production :dot-expression (:primary-expression) dot-expression-primary-expression)
(production :dot-expression (:qualified-identifier) dot-expression-qualified-identifier)
(production :dot-expression (:full-new-expression) dot-expression-full-new-expression)
(production :dot-expression (:dot-expression :dot-operator) dot-expression-dot-operator)
(production :dot-operator (\. :qualified-identifier) dot-operator-qualified-identifier)
(production :dot-operator (\. class) dot-operator-class)
(production :brackets ([ :argument-list ]) brackets-argument-list)
(production :arguments (\( :argument-list \)) arguments-argument-list)
(production :argument-list () argument-list-none)
(production :argument-list ((:list-expression allow-in)) argument-list-unnamed)
(production :argument-list (:named-argument-list) argument-list-named)
(production :arguments (\( \)) arguments-none)
(production :arguments (:parenthesized-list-expression) arguments-unnamed)
(production :arguments (\( :named-argument-list \)) arguments-named)
(production :named-argument-list (:literal-field) named-argument-list-one)
(production :named-argument-list ((:list-expression allow-in) \, :literal-field) named-argument-list-unnamed)
@ -166,6 +148,7 @@
(%subsection "Unary Operators")
(production :unary-expression (:postfix-expression) unary-expression-postfix)
(production :unary-expression (const :postfix-expression) unary-expression-const)
(production :unary-expression (delete :postfix-expression) unary-expression-delete)
(production :unary-expression (void :unary-expression) unary-expression-void)
(production :unary-expression (typeof :unary-expression) unary-expression-typeof)
@ -293,6 +276,7 @@
(production (:statement :omega) ((:annotated-definition :omega)) statement-annotated-definition)
(production (:statement :omega) (:empty-statement) statement-empty-statement)
(production (:statement :omega) (:expression-statement (:semicolon :omega)) statement-expression-statement)
;(production (:statement :omega) (:super-constructor-statement (:semicolon :omega)) statement-super-constructor-statement)
(production (:statement :omega) (:annotated-block) statement-annotated-block)
(production (:statement :omega) ((:labeled-statement :omega)) statement-labeled-statement)
(production (:statement :omega) ((:if-statement :omega)) statement-if-statement)
@ -327,6 +311,10 @@
(production :expression-statement ((:- function { const) (:list-expression allow-in)) expression-statement-list-expression)
;(%subsection "Super Constructor Statement")
;(production :super-constructor-statement (super :arguments) super-constructor-statement-super-arguments)
(%subsection "Block")
(production :annotated-block (:attributes :block) annotated-block-attributes-and-block)
@ -429,16 +417,17 @@
(production :nonassignment-expression-list (:nonassignment-expression-list \, (:non-assignment-expression allow-in)) nonassignment-expression-list-more)
(production :use-includes-excludes () use-includes-excludes-none)
(production :use-includes-excludes (exclude :use-name-list) use-includes-excludes-exclude-list)
(production :use-includes-excludes (include :use-name-list) use-includes-excludes-include-list)
(production :use-includes-excludes (exclude :use-name-patterns) use-includes-excludes-exclude-list)
(production :use-includes-excludes (include :use-name-patterns) use-includes-excludes-include-list)
(production :use-name-list (:use-name-pattern) use-name-list-one)
(production :use-name-list (:use-name-list \, :use-name-pattern) use-name-list-more)
(production :use-name-patterns (:use-name-pattern) use-name-patterns-one)
(production :use-name-patterns (:use-name-patterns \, :use-name-pattern) use-name-patterns-more)
(production :use-name-pattern (:use-name) use-name-pattern-use-name)
(production :use-name-pattern (:qualified-wildcard-pattern) use-name-pattern-qualified-wildcard-pattern)
(production :use-name-pattern (:use-name-prefix \. :qualified-wildcard-pattern) use-name-pattern-dot-qualified-wildcard-pattern)
(production :use-name-pattern (:full-postfix-expression \. :qualified-wildcard-pattern) use-name-pattern-dot-qualified-wildcard-pattern)
(production :use-name-pattern (:attribute-expression \. :qualified-wildcard-pattern) use-name-pattern-dot-qualified-wildcard-pattern2)
(production :qualified-wildcard-pattern (:qualified-identifier) qualified-wildcard-pattern-qualified-identifier)
(production :qualified-wildcard-pattern (:wildcard-pattern) qualified-wildcard-pattern-wildcard-pattern)
(production :qualified-wildcard-pattern (:qualifier \:\: :wildcard-pattern) qualified-wildcard-pattern-qualifier)
(production :qualified-wildcard-pattern (:parenthesized-expression \:\: :wildcard-pattern) qualified-wildcard-pattern-expression-qualifier)
@ -446,15 +435,6 @@
(production :wildcard-pattern (*) wildcard-pattern-all)
(production :wildcard-pattern ($regular-expression) wildcard-pattern-regular-expression)
(production :use-name (:qualified-identifier) use-name-qualified-identifier)
(production :use-name (:use-name-prefix \. :qualified-identifier) use-name-dot-operator)
(production :use-name-prefix (:use-name) use-name-prefix-use-name)
(production :use-name-prefix (:primary-expression) use-name-prefix-primary-expression)
(production :use-name-prefix (:use-name-prefix \. class) use-name-prefix-dot-class)
(production :use-name-prefix (:use-name-prefix :brackets) use-name-prefix-brackets)
(production :use-name-prefix (:use-name-prefix :arguments) use-name-prefix-call)
(? js2
(%subsection "Include Statement")

Просмотреть файл

@ -52,7 +52,6 @@
(production :primary-expression (:object-literal) primary-expression-object-literal)
(production :primary-expression (:function-expression) primary-expression-function-expression)
(production :primary-expression (:super-expression) primary-expression-super-expression)
;(production :primary-expression (eval :parenthesized-expression) primary-expression-eval)
(production :parenthesized-expression (\( (:assignment-expression allow-in) \)) parenthesized-expression-assignment-expression)
@ -103,61 +102,44 @@
(production :postfix-expression (:short-new-expression) postfix-expression-short-new-expression)
(production :attribute-expression (:simple-qualified-identifier) attribute-expression-simple-qualified-identifier)
(production :attribute-expression (:attribute-expression :dot-operator) attribute-expression-dot-operator)
(production :attribute-expression (:attribute-expression :brackets) attribute-expression-brackets)
(production :attribute-expression (:attribute-expression :member-operator) attribute-expression-member-operator)
(production :attribute-expression (:attribute-expression :arguments) attribute-expression-call)
(production :full-postfix-expression (:const-dot-expression) full-postfix-expression-const-dot-expression)
(production :full-postfix-expression (:full-postfix-subexpression) full-postfix-expression-full-postfix-subexpression)
(production :full-postfix-subexpression (:primary-expression) full-postfix-subexpression-primary-expression)
(production :full-postfix-subexpression (:expression-qualified-identifier) full-postfix-subexpression-expression-qualified-identifier)
(production :full-postfix-subexpression (:full-new-expression) full-postfix-subexpression-full-new-expression)
(production :full-postfix-subexpression (:full-postfix-subexpression :dot-operator) full-postfix-subexpression-dot-operator)
(production :full-postfix-subexpression (:full-postfix-expression :brackets) full-postfix-subexpression-brackets)
(production :full-postfix-subexpression (:full-postfix-expression :arguments) full-postfix-subexpression-call)
(production :full-postfix-subexpression (:postfix-expression :no-line-break ++) full-postfix-subexpression-increment)
(production :full-postfix-subexpression (:postfix-expression :no-line-break --) full-postfix-subexpression-decrement)
(production :full-postfix-expression (:primary-expression) full-postfix-expression-primary-expression)
(production :full-postfix-expression (:expression-qualified-identifier) full-postfix-expression-expression-qualified-identifier)
(production :full-postfix-expression (:full-new-expression) full-postfix-expression-full-new-expression)
(production :full-postfix-expression (:full-postfix-expression :member-operator) full-postfix-expression-member-operator)
(production :full-postfix-expression (:full-postfix-expression :arguments) full-postfix-expression-call)
(production :full-postfix-expression (:postfix-expression :no-line-break ++) full-postfix-expression-increment)
(production :full-postfix-expression (:postfix-expression :no-line-break --) full-postfix-expression-decrement)
(? js2
(production :full-postfix-subexpression (:postfix-expression @ :qualified-identifier) full-postfix-subexpression-coerce)
(production :full-postfix-subexpression (:postfix-expression @ :parenthesized-expression) full-postfix-subexpression-indirect-coerce))
(production :full-postfix-expression (:postfix-expression @ :qualified-identifier) full-postfix-expression-coerce)
(production :full-postfix-expression (:postfix-expression @ :parenthesized-expression) full-postfix-expression-indirect-coerce))
(production :full-new-expression (new :bracket-expression :arguments) full-new-expression-new)
(production :full-new-expression (new :full-new-subexpression :arguments) full-new-expression-new)
(production :full-new-subexpression (:primary-expression) full-new-subexpression-primary-expression)
(production :full-new-subexpression (:qualified-identifier) full-new-subexpression-qualified-identifier)
(production :full-new-subexpression (:full-new-expression) full-new-subexpression-full-new-expression)
(production :full-new-subexpression (:full-new-subexpression :member-operator) full-new-subexpression-member-operator)
(production :short-new-expression (new :short-new-subexpression) short-new-expression-new)
(production :short-new-expression (const new :short-new-subexpression) short-new-expression-const-new)
(production :short-new-subexpression (:bracket-expression) short-new-subexpression-new-full)
(production :short-new-subexpression (:full-new-subexpression) short-new-subexpression-new-full)
(production :short-new-subexpression (:short-new-expression) short-new-subexpression-new-short)
(production :bracket-expression (:const-expression) bracket-expression-const-expression)
(production :bracket-expression (:bracket-subexpression) bracket-expression-bracket-subexpression)
(production :member-operator (\. :qualified-identifier) member-operator-qualified-identifier)
(production :member-operator (\. class) member-operator-class)
(production :member-operator (:brackets) member-operator-brackets)
(production :bracket-subexpression (:bracket-expression :brackets) bracket-subexpression-brackets)
(production :bracket-subexpression (:bracket-subexpression :dot-operator) bracket-subexpression-dot-operator)
(production :brackets ([ ]) brackets-none)
(production :brackets ([ (:list-expression allow-in) ]) brackets-unnamed)
(production :brackets ([ :named-argument-list ]) brackets-named)
(production :const-expression (:dot-expression) const-expression-dot-expression)
(production :const-expression (:const-dot-expression) const-expression-const-dot-expression)
(production :const-dot-expression (const :dot-expression) const-dot-expression-dot-expression)
(production :dot-expression (:primary-expression) dot-expression-primary-expression)
(production :dot-expression (:qualified-identifier) dot-expression-qualified-identifier)
(production :dot-expression (:full-new-expression) dot-expression-full-new-expression)
(production :dot-expression (:dot-expression :dot-operator) dot-expression-dot-operator)
(production :dot-operator (\. :qualified-identifier) dot-operator-qualified-identifier)
(production :dot-operator (\. class) dot-operator-class)
(production :brackets ([ :argument-list ]) brackets-argument-list)
(production :arguments (\( :argument-list \)) arguments-argument-list)
(production :argument-list () argument-list-none)
(production :argument-list ((:list-expression allow-in)) argument-list-unnamed)
(production :argument-list (:named-argument-list) argument-list-named)
(production :arguments (\( \)) arguments-none)
(production :arguments (:parenthesized-list-expression) arguments-unnamed)
(production :arguments (\( :named-argument-list \)) arguments-named)
(production :named-argument-list (:literal-field) named-argument-list-one)
(production :named-argument-list ((:list-expression allow-in) \, :literal-field) named-argument-list-unnamed)
@ -166,6 +148,7 @@
(%subsection "Unary Operators")
(production :unary-expression (:postfix-expression) unary-expression-postfix)
(production :unary-expression (const :postfix-expression) unary-expression-const)
(production :unary-expression (delete :postfix-expression) unary-expression-delete)
(production :unary-expression (void :unary-expression) unary-expression-void)
(production :unary-expression (typeof :unary-expression) unary-expression-typeof)
@ -293,6 +276,7 @@
(production (:statement :omega) ((:annotated-definition :omega)) statement-annotated-definition)
(production (:statement :omega) (:empty-statement) statement-empty-statement)
(production (:statement :omega) (:expression-statement (:semicolon :omega)) statement-expression-statement)
;(production (:statement :omega) (:super-constructor-statement (:semicolon :omega)) statement-super-constructor-statement)
(production (:statement :omega) (:annotated-block) statement-annotated-block)
(production (:statement :omega) ((:labeled-statement :omega)) statement-labeled-statement)
(production (:statement :omega) ((:if-statement :omega)) statement-if-statement)
@ -327,6 +311,10 @@
(production :expression-statement ((:- function { const) (:list-expression allow-in)) expression-statement-list-expression)
;(%subsection "Super Constructor Statement")
;(production :super-constructor-statement (super :arguments) super-constructor-statement-super-arguments)
(%subsection "Block")
(production :annotated-block (:attributes :block) annotated-block-attributes-and-block)
@ -429,16 +417,17 @@
(production :nonassignment-expression-list (:nonassignment-expression-list \, (:non-assignment-expression allow-in)) nonassignment-expression-list-more)
(production :use-includes-excludes () use-includes-excludes-none)
(production :use-includes-excludes (exclude :use-name-list) use-includes-excludes-exclude-list)
(production :use-includes-excludes (include :use-name-list) use-includes-excludes-include-list)
(production :use-includes-excludes (exclude :use-name-patterns) use-includes-excludes-exclude-list)
(production :use-includes-excludes (include :use-name-patterns) use-includes-excludes-include-list)
(production :use-name-list (:use-name-pattern) use-name-list-one)
(production :use-name-list (:use-name-list \, :use-name-pattern) use-name-list-more)
(production :use-name-patterns (:use-name-pattern) use-name-patterns-one)
(production :use-name-patterns (:use-name-patterns \, :use-name-pattern) use-name-patterns-more)
(production :use-name-pattern (:use-name) use-name-pattern-use-name)
(production :use-name-pattern (:qualified-wildcard-pattern) use-name-pattern-qualified-wildcard-pattern)
(production :use-name-pattern (:use-name-prefix \. :qualified-wildcard-pattern) use-name-pattern-dot-qualified-wildcard-pattern)
(production :use-name-pattern (:full-postfix-expression \. :qualified-wildcard-pattern) use-name-pattern-dot-qualified-wildcard-pattern)
(production :use-name-pattern (:attribute-expression \. :qualified-wildcard-pattern) use-name-pattern-dot-qualified-wildcard-pattern2)
(production :qualified-wildcard-pattern (:qualified-identifier) qualified-wildcard-pattern-qualified-identifier)
(production :qualified-wildcard-pattern (:wildcard-pattern) qualified-wildcard-pattern-wildcard-pattern)
(production :qualified-wildcard-pattern (:qualifier \:\: :wildcard-pattern) qualified-wildcard-pattern-qualifier)
(production :qualified-wildcard-pattern (:parenthesized-expression \:\: :wildcard-pattern) qualified-wildcard-pattern-expression-qualifier)
@ -446,15 +435,6 @@
(production :wildcard-pattern (*) wildcard-pattern-all)
(production :wildcard-pattern ($regular-expression) wildcard-pattern-regular-expression)
(production :use-name (:qualified-identifier) use-name-qualified-identifier)
(production :use-name (:use-name-prefix \. :qualified-identifier) use-name-dot-operator)
(production :use-name-prefix (:use-name) use-name-prefix-use-name)
(production :use-name-prefix (:primary-expression) use-name-prefix-primary-expression)
(production :use-name-prefix (:use-name-prefix \. class) use-name-prefix-dot-class)
(production :use-name-prefix (:use-name-prefix :brackets) use-name-prefix-brackets)
(production :use-name-prefix (:use-name-prefix :arguments) use-name-prefix-call)
(? js2
(%subsection "Include Statement")