J4 ›› 2009, Vol. 27 ›› Issue (01): 85-.

• 论文 • 上一篇    下一篇

基于多线程LL(1)分析表自动生成的并行算法

闫 昭,刘 磊   

  1. 吉林大学 计算机学院,长春 130012
  • 出版日期:2009-01-20 发布日期:2009-07-02
  • 通讯作者: 闫昭(1972— ),女,山西五台人,吉林大学讲师,主要从事软件自动化研究 E-mail:yanzhao@jlu.edu.cn
  • 作者简介:闫昭(1972— ),女,山西五台人|吉林大学讲师|主要从事软件自动化研究|(Tel)86-13009118677(E-mail)yanzhao@jlu.edu.cn;刘磊(1960— )|男|长春人|吉林大学教授|博士生导师,主要从事软件自动化研究|(Tel)86-13086867820(E-mail)liulei@jlu.edu.cn
  • 基金资助:

    吉林大学创新基金资助项目(450011022220)

Design of Parallel Algorithm on Autogeneration of LL(1) Analytical Table

YAN Zhao,LIU Lei   

  1. College of Computer Science and Technology, Jilin University,Changchun 130012,China
  • Online:2009-01-20 Published:2009-07-02

摘要:

为解决编译系统工作中由于文法非终结符数量庞大造成的生成LL(1)分析表速度缓慢的问题,描述了多处理机环境下的LL(1)分析表自动生成的一种并行处理方法,并讨论了LL(1)分析表生成的并行算法的设计思想和实现策略。在采用LL(1)方法实现自顶向下语法分析的并行编译中,LL(1)分析表的生成一直处于关键地位,由于文法中的终结符和非终结符个数很多,分析表的构造成为提高语法分析速度的瓶颈问题,因此考虑采用LL(1)分析表的并行生成。算法采用多线程的工作模式,并借助于线程间的通讯机制实现,此并行处理方法对编译的并行处理和提高效率有理论和现实意义。

关键词: 文法, LL(1)语法分析, 并行算法, 并行编译

Abstract:

This article describes a parallel process method to  autogenerate LL(1) analytical table on multiprocessor computers, and it also discusses the designing and executing tactics in this parallel algorithm in order to improve the efficiency of compiler. With the help of mechanism of thread intercommunication, LL(1) analytical  table is autogenerated on multithread mode.

Key words: grammar, LL(1)syntax analysis, parallel algorithm, parallel compiling

中图分类号: 

  • TP311