A Typed, Algebraic Approach to Parsing

被引:12
|
作者
Krishnaswami, Neelakantan R. [1 ]
Yallop, Jeremy [1 ]
机构
[1] Univ Cambridge, Cambridge, England
关键词
parsing; context-free languages; type theory; Kleene algebra;
D O I
10.1145/3314221.3314625
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
In this paper, we recall the definition of the context-free expressions (or mu-regular expressions), an algebraic presentation of the context-free languages. Then, we define a core type system for the context-free expressions which gives a compositional criterion for identifying those context-free expressions which can be parsed unambiguously by predictive algorithms in the style of recursive descent or LL(1). Next, we show how these typed grammar expressions can be used to derive a parser combinator library which both guarantees linear-time parsing with no backtracking and single-token lookahead, and which respects the natural denotational semantics of context-free expressions. Finally, we show how to exploit the type information to write a staged version of this library, which produces dramatic increases in performance, even outperforming code generated by the standard parser generator tool ocamlyacc.
引用
收藏
页码:379 / 393
页数:15
相关论文
共 50 条
  • [41] AN ITERATIVE PARSING APPROACH FOR CONTOUR FRAGMENTS
    Huang, Xiao
    Liu, Yuehu
    Su, Yuanqi
    [J]. 2013 IEEE INTERNATIONAL CONFERENCE ON MULTIMEDIA AND EXPO (ICME 2013), 2013,
  • [42] A NEW APPROACH TO EARLEYS PARSING ALGORITHM
    ARETZ, FEJK
    [J]. SCIENCE OF COMPUTER PROGRAMMING, 1989, 12 (02) : 105 - 121
  • [43] A modular cascaded approach to complete parsing
    Husain, Samar
    Gadde, Phani
    Ambati, Bharat
    Sharma, Dipti Misra
    Sangal, Rajeev
    [J]. 2009 INTERNATIONAL CONFERENCE ON ASIAN LANGUAGE PROCESSING, 2009, : 141 - 146
  • [44] A Hybrid Approach to Parsing Natural Languages
    Jaf, Sardar
    Ramsay, Allan
    [J]. HUMAN LANGUAGE TECHNOLOGY: CHALLENGES FOR COMPUTER SCIENCE AND LINGUISTICS, 2016, 9561 : 136 - 145
  • [45] APPROACH TO NATURAL LANGUAGE PARSING.
    Park, Jack
    [J]. The Journal of Forth application and research, 1986, 4 (01): : 67 - 84
  • [46] A structural SVM approach for reference parsing
    Zhang, Xiaoli
    Zou, Jie
    Le, Daniel X.
    Thoma, George R.
    [J]. BMC BIOINFORMATICS, 2011, 12
  • [47] A Typed Iteration Approach for Spoken Language Understanding
    Pang, Yali
    Yu, Peilin
    Zhang, Zhichang
    [J]. ELECTRONICS, 2022, 11 (17)
  • [48] A PARSING AUTOMATA APPROACH TO LR THEORY
    HEILBRUNNER, S
    [J]. THEORETICAL COMPUTER SCIENCE, 1981, 15 (02) : 117 - 157
  • [49] A new approach to incremental LR parsing
    Li, WX
    [J]. JOURNAL OF PROGRAMMING LANGUAGES, 1997, 5 (01): : 173 - 188
  • [50] Topology of plane algebraic curves: the algebraic approach
    Degtyarev, Alex
    [J]. TOPOLOGY OF ALGEBRAIC VARIETIES AND SINGULARITIES, 2011, 538 : 137 - 161