高级检索

    Fortran语言语法分析程序和词法分析程序自动生成的尝试

    The Experiment on The Automatic Generation of Parser of Fortran Language

    • 摘要: 传统Fortran语言的编译程序一直沿用手工方式编制,本文旨在介绍利用Unix的实用工具Yacc,Lex来实现KJ8920大型计算机的向量Fortran语言的语法分析程序KJFOR的一些经验。KJFOR的文法规则全部描述了1的语法现象而没有任何规约/规约冲突或移入/规约冲突,KJFOR具有很强的超前搜索能力,它能准确地指出错误位置。

       

      Abstract: Traditional Fortran compiler has been manual. This paper discusses the experience of developing KJFOR. the parser and lexical analyzer of the vector Fortran language which will be performed on KJ8920 computer. surported by Unix utilities Yacc and Lex. There is neither reduce /reduce nor shift/reduce conflict in the BNF describing the grammar of the vector Fortran language. KJFOR is powerful in looking-ahead to recognize the reserved words. KJFOR can point out exactly the error location in source.

       

    /

    返回文章
    返回