摘要
讨论了LR(1)语法分析器的自动构造,可判定给定的文法是否为LR(1)文法。若是,则自动生成给定文法的LR(1)分析表,并对任一输入串进行分析,判断其是否为给定文法的句子。论文相关的软件除可用于编译原理课程教学演示外,还可用于实际编译程序的LR语法分析器的自动构造。
An automatic generation of LR(1) grammatical analyzer was proposed. It can verify whether an input grammar is the LR(1) grammar which can generate the LR(1) parsing table automatically. And it also can analyze any input string,then decide whether it's the input grammar's legal sentence.The software which this paper based on can be used not only in demonstrating for teaching, but also in automatic constructing of LR(1) grammatical analyzer which will be used in compiler.
出处
《鞍山科技大学学报》
2003年第2期90-92,共3页
Journal of Anshan University of Science and Technology