教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 文库大全 > 资格考试 >

ECMAScript for XML Specification(Ecma-357)(5)

来源:网络收集 时间:2026-03-29
导读: The InputElementDiv symbol is used in those syntactic grammar contexts where a division (/), division-assignment (/=), less than (), less than or equals (=), left shift () or left shift-assignment (=

The InputElementDiv symbol is used in those syntactic grammar contexts where a division (/), division-assignment (/=), less than (<), less than or equals (<=), left shift (<<) or left shift-assignment (<<=) operator is permitted. The InputElementXMLTag is used in those syntactic contexts where the literal contents of an XML tag are permitted. The InputElementXMLContent is used in those syntactic contexts where the literal contents of an XML element are permitted. The InputElementRegExp symbol is used in all other syntactic grammar contexts.

The addition of the production InputElementRegExp :: XMLMarkup and extended use of the existing production InputElementRegExp :: Punctuator :: < allow the start of XML initialisers to be identified.

To better understand when these goal symbols apply, consider the following example:

order = <{x}>{item}</{x}>;

The input elements returned from the lexical grammar along with the goal symbol and productions used for this example are as follows:

- 8-

欧洲计算机制造商协会(ECMA)标准文档

Input Element order = < { x } > { item } </ { x } > ;

Syntax

E4X extends the InputElementRegExp goal symbol defined by ECMAScript with the following production:

InputElementRegExp :: XMLMarkup

E4X extends ECMAScript by adding the following goal symbols:

InputElementXMLTag ::

XMLTagCharacters XMLTagPunctuator XMLAttributeValue XMLWhitespace {

InputElementXMLContent :: XMLMarkup XMLText { < [ lookahead { ?, ! } ] </

Goal

InputElementRegExp InputElementDiv InputElementRegExp InputElementXMLTag InputElementRegExp InputElementDiv InputElementXMLTag

Productions Token::Identifer Punctuator Punctuator {

Token::Identifier Punctuator XMLTagPunctuator

InputElementXMLContent { InputElementRegExp InputElementDiv

Token::Identifier Punctuator

InputElementXMLContent </ InputElementXMLTag InputElementRegExp InputElementDiv InputElementXMLTag InputElementRegExp

{

Token::Identifier Punctuator XMLTagPunctuator Token::Punctuator

8.1 Context Keywords

E4X extends ECMAScript by adding a set of context keywords. Context keywords take on a specific meaning when

used in specified contexts where identifiers are not permitted by the syntactic grammar. However, they differ from ECMAScript Edition 3 keywords in that they may also be used as identifiers. E4X does not add any additional keywords to ECMAScript.

- 9-

…… 此处隐藏:305字,全部文档内容请下载后查看。喜欢就下载吧 ……
ECMAScript for XML Specification(Ecma-357)(5).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wenku/97867.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)