针对目前已有的上下文相关图文法的描述规范过于复杂或不太直观,提出了一个新的上下文相关图文法的形式框架:上下文属性化的图文法CAGG.该文法将产生式的上下文信息刻画成相关结点的上下文属性来解决嵌入问题.而且进一步分析了合流的CAGG产生式集合的基本特征,并基于此设计了合流产生式集合的判定算法,从而为构造高效的语法分析算法奠定了基础.通过与已有上下文相关图文法的对比分析可知,CAGG图文法的形式更为简洁和直观,因而更适于且更易于应用到可视化语言描述领域.
Since the specifications of most of the existing context-sensitive graph grammars tend to be either too intricate or not intuitive, a novel context-sensitive graph grammar formalism, called context-attributed graph grammar(CAGG), is proposed. In order to resolve the embedding problem, context information of a graph production in the CAGG is represented in the form of context attributes of the nodes involved. Moreover, several properties of a set of confluent CAGG productions are characterized, and then an algorithm based on them is developed to decide whether or not a set of productions is confluent, which provides the foundation for the design of efficient parsing algorithms. It can also be shown through the comparison of CAGG with several typical context-sensitive graph grammars that CAGG is more succinct and, at the same time, more intuitive than the others, making it more suitably and effortlessly applicable to the specification of visual languages.