ログイン 新規登録
言語:

WEKO3

  • トップ
  • ランキング


インデックスリンク

インデックスツリー

  • RootNode

メールアドレスを入力してください。

WEKO

One fine body…

WEKO

One fine body…

アイテム

  1. 論文誌(トランザクション)
  2. プログラミング(PRO)
  3. Vol.14
  4. No.1

Packrat Parsers Can Support Multiple Left-recursive Calls at the Same Position

https://ipsj.ixsq.nii.ac.jp/records/209338
https://ipsj.ixsq.nii.ac.jp/records/209338
f3e18a14-e4ef-45bc-895a-864297d08d83
名前 / ファイル ライセンス アクション
IPSJ-TPRO1401003.pdf IPSJ-TPRO1401003.pdf (1.7 MB)
Copyright (c) 2021 by the Information Processing Society of Japan
オープンアクセス
Item type Trans(1)
公開日 2021-01-27
タイトル
タイトル Packrat Parsers Can Support Multiple Left-recursive Calls at the Same Position
タイトル
言語 en
タイトル Packrat Parsers Can Support Multiple Left-recursive Calls at the Same Position
言語
言語 eng
キーワード
主題Scheme Other
主題 [通常論文] PEG, packrat parser, left recursion, memoization
資源タイプ
資源タイプ識別子 http://purl.org/coar/resource_type/c_6501
資源タイプ journal article
著者所属
Graduate School of Science and Technology Degree Programs in Systems and Information Engineering Master's Program in Computer Science, University of Tsukuba
著者所属
Department of Information Engineering, Faculty of Engineering, Information and Systems, University of Tsukuba
著者所属(英)
en
Graduate School of Science and Technology Degree Programs in Systems and Information Engineering Master's Program in Computer Science, University of Tsukuba
著者所属(英)
en
Department of Information Engineering, Faculty of Engineering, Information and Systems, University of Tsukuba
著者名 Masaki, Umeda

× Masaki, Umeda

Masaki, Umeda

Search repository
Atusi, Maeda

× Atusi, Maeda

Atusi, Maeda

Search repository
著者名(英) Masaki, Umeda

× Masaki, Umeda

en Masaki, Umeda

Search repository
Atusi, Maeda

× Atusi, Maeda

en Atusi, Maeda

Search repository
論文抄録
内容記述タイプ Other
内容記述 One of the common problems with the recursive descent parsing method is that when parsing with a left-recursive grammar, the parsing does not terminate because the same parsing function is recursively invoked indefinitely without consuming the input string. Packrat parsing, which is a variant of recursive descent parsing method that handles grammars described in parsing expression grammars (PEGs) by backtracking, is also affected by the above problem. Although naive backtracking parsers may exhibit an exponential execution time, packrat parsers achieve a linear time complexity (for grammars that are not left-recursive) by memoizing the result of each call to the parsing functions. Some methods have been proposed to solve the problem of left recursion in packrat parsers. In these methods, memoization tables in packrat parsers are modified to limit the depth of the recursive calls. By calling the same parsing function repeatedly while increasing the limit, the parsed range in the input string is expanded gradually. These methods have problems in that multiple occurences of left-recursive calls at the same input position cannot be handled correctly, and some of the grammars that does not include left recursion cannot be handled. In this research, we propose and implement a new packrat parser to address these problems. This packrat parser can handle multiple occurences of left-recursive calls at the same position in the input by giving priority to the most recently used rule when gradually increasing the parsed range of the recursion. In the evaluation of the proposed method, in addition to the grammars including left recursion manageable by the methods proposed in existing studies, we confirmed that our approach supports the grammars that cannot be handled by those existing methods.
------------------------------
This is a preprint of an article intended for publication Journal of
Information Processing(JIP). This preprint should not be cited. This
article should be cited as: Journal of Information Processing Vol.29(2021) (online)
------------------------------
論文抄録(英)
内容記述タイプ Other
内容記述 One of the common problems with the recursive descent parsing method is that when parsing with a left-recursive grammar, the parsing does not terminate because the same parsing function is recursively invoked indefinitely without consuming the input string. Packrat parsing, which is a variant of recursive descent parsing method that handles grammars described in parsing expression grammars (PEGs) by backtracking, is also affected by the above problem. Although naive backtracking parsers may exhibit an exponential execution time, packrat parsers achieve a linear time complexity (for grammars that are not left-recursive) by memoizing the result of each call to the parsing functions. Some methods have been proposed to solve the problem of left recursion in packrat parsers. In these methods, memoization tables in packrat parsers are modified to limit the depth of the recursive calls. By calling the same parsing function repeatedly while increasing the limit, the parsed range in the input string is expanded gradually. These methods have problems in that multiple occurences of left-recursive calls at the same input position cannot be handled correctly, and some of the grammars that does not include left recursion cannot be handled. In this research, we propose and implement a new packrat parser to address these problems. This packrat parser can handle multiple occurences of left-recursive calls at the same position in the input by giving priority to the most recently used rule when gradually increasing the parsed range of the recursion. In the evaluation of the proposed method, in addition to the grammars including left recursion manageable by the methods proposed in existing studies, we confirmed that our approach supports the grammars that cannot be handled by those existing methods.
------------------------------
This is a preprint of an article intended for publication Journal of
Information Processing(JIP). This preprint should not be cited. This
article should be cited as: Journal of Information Processing Vol.29(2021) (online)
------------------------------
書誌レコードID
収録物識別子タイプ NCID
収録物識別子 AA11464814
書誌情報 情報処理学会論文誌プログラミング(PRO)

巻 14, 号 1, 発行日 2021-01-27
ISSN
収録物識別子タイプ ISSN
収録物識別子 1882-7802
出版者
言語 ja
出版者 情報処理学会
戻る
0
views
See details
Views

Versions

Ver.1 2025-01-19 18:32:47.775310
Show All versions

Share

Mendeley Twitter Facebook Print Addthis

Cite as

エクスポート

OAI-PMH
  • OAI-PMH JPCOAR
  • OAI-PMH DublinCore
  • OAI-PMH DDI
Other Formats
  • JSON
  • BIBTEX

Confirm


Powered by WEKO3


Powered by WEKO3