事实上,这正是宿主语言模式要做的事。
但是有一点它没有定义,就是根元素,这留给了宿主语言去解决。
One thing it doesn't define, however, is a root element — that is left to a host language to address.
但是这种融合是双赢的:宿主语言同时也可以对Lua进行扩充。
But the reciprocal is true as well: the host language can simultaneously extend Lua.
验证程序的这一部分仍在开发之中,但清单5说明了如何定义宿主语言。
This portion of the validator is still under development, but Listing 5 shows how the host language is defined.
由于Lua与宿主语言的关系非常密切,因此lua脚本可以对宿主语言的功能进行扩充。
As has been intimated, Lua scripts can extend the host language's own capabilities.
为此,验证程序使用了高度模块化的RELAXNG模式,将其集成到非常宽容的宿主语言中。
To deal with this, the validator USES a highly modularized RELAX ng schema for XForms, which is integrated into a highly permissive host language.
除了语法简单并且具有功能强大的表结构之外,Lua的强大功能使其可以与宿主语言混合使用。
Beyond Lua's simple syntax and powerful table structure, Lua's real power is evident when mixing it with a host language.
最常见的两种宿主语言是XHTML和SVG,但在原则上,几乎任何XML词汇表都可以使用。
The two most common host languages are XHTML and SVG, but in principle almost any XML vocabulary could be used.
显然,这没有很大的区别,但是每个语句变得更接近浅白的英语句子,而且在宿主语言中删除了通常冗余的技术代码。
Obviously, this is not a big difference, but each statement becomes closer to real plain English sentences, and removes the usual boiler-plate technical code of the host language.
XSLT 2.0将其作为默认的排序uri,XPath 2.0的其他宿主语言可以使用不同的默认排序uri。
XSLT 2.0 USES that as its default collation URI; other host languages for XPath 2.0 might use a different default collation URI.
江西水文数据库系统选用VAX - 11信息管理系统及宿主语言FORTRAN建立的水文信息管理系统。
Jiangxi hydrologic Database system (JHDBS) is a large hydrologic information management system using VAX-11 information management system software and host language FORTRAN.
从语言设计的角度来看,外部领域特定语言能够提供最大程度的灵活性,因为内部领域特定语言语言必须遵循宿主语言的解析和语言语义。
From the language design perspective, an external DSL provides the greatest flexibility, since internal DSLs must respect the parsing and language semantics of the host language.
从语言设计的角度来看,外部领域特定语言能够提供最大程度的灵活性,因为内部领域特定语言语言必须遵循宿主语言的解析和语言语义。
From the language design perspective, an external DSL provides the greatest flexibility, since internal DSLs must respect the parsing and language semantics of the host language.
应用推荐