ログイン 新規登録
言語:

WEKO3

  • トップ
  • ランキング
To
lat lon distance
To

Field does not validate



インデックスリンク

インデックスツリー

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

WEKO

One fine body…

WEKO

One fine body…

アイテム

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

マクロ処理の実装に適したパックラットパーサーコンビネータの設計と実装

https://ipsj.ixsq.nii.ac.jp/records/184909
https://ipsj.ixsq.nii.ac.jp/records/184909
e94c5d23-bd58-4729-b87a-0168373fae64
名前 / ファイル ライセンス アクション
IPSJ-TPRO1006004.pdf IPSJ-TPRO1006004.pdf (100.5 kB)
Copyright (c) 2017 by the Information Processing Society of Japan
オープンアクセス
Item type Trans(1)
公開日 2017-12-12
タイトル
タイトル マクロ処理の実装に適したパックラットパーサーコンビネータの設計と実装
タイトル
言語 en
タイトル Design and Implementation of Packrat Parser Combinator for Implementing Macro Processor
言語
言語 jpn
キーワード
主題Scheme Other
主題 [発表概要]
資源タイプ
資源タイプ識別子 http://purl.org/coar/resource_type/c_6501
資源タイプ journal article
著者所属
芝浦工業大学大学院理工学研究科
著者所属
芝浦工業大学大学院理工学研究科
著者所属(英)
en
Graduate School of Engineering and Science, Shibaura Institute of Technology
著者所属(英)
en
Graduate School of Engineering and Science, Shibaura Institute of Technology
著者名 今泉, 良紀

× 今泉, 良紀

今泉, 良紀

Search repository
篠埜, 功

× 篠埜, 功

篠埜, 功

Search repository
著者名(英) Yoshiki, Imaizumi

× Yoshiki, Imaizumi

en Yoshiki, Imaizumi

Search repository
Isao, Sasano

× Isao, Sasano

en Isao, Sasano

Search repository
論文抄録
内容記述タイプ Other
内容記述 パックラット構文解析ではLALR(1)よりも強力な形式文法であるParsing Expression Grammar(以下PEG)によって構文解析を行う.PEGによる文法規則には曖昧さがなく,プログラミング言語の構文の記述やその処理系の作成に際し非常に有用である.既存のPEGベースの構文解析器では直接文字列を入力として受け付けるが,字句解析と構文解析を分けたい場合にそのままでは使用に適さない.たとえば,字句ベースのマクロ処理系であるCプリプロセッサを実装する際,マクロ展開後のコードに再度マクロ展開の処理が行われうる.その結果,マクロ展開の過程で同じレクシムに対して字句解析を複数回実行する場合がある.これを避けるためにPEGベースの構文解析器を使用しないとすると,字句解析や構文解析用にPEG以外の形式文法を学んだりその処理系を導入したりする必要がある.そこで文字列だけでなく字句列などを入力できるパックラットパーサーコンビネータをC++で実装し,本発表では実装の詳細について報告する.この実装を用いて生成した構文解析器はchar型だけでなく任意の型を返す前方反復子(Forward Iterator)を入力として受け付ける.結果はtuple・variant・optional・expectedなどを組み合わせたデータ構造として得られ,意味規則によって自由に変換することが可能である.
論文抄録(英)
内容記述タイプ Other
内容記述 Packrat parsing is based on Parsing Expression Grammar (PEG), which is more expressive than LALR(1) and is not ambiguous. So it is useful on describing the syntax of a programming language and implementing the language. However, it is not suitable to use PEG-based parser generators when we separately implement lexical analysis and syntax analysis, since existing PEG-based parsers receive only a string. For example, since a C preprocessor, which is a token-based macro processor, may expand a code fragment that is obtained by expanding macros, a lexer may process same lexemes more than once in macro expansion. When we do not use PEG-based parser for avoiding unnecessary lexical analysis, we need to study and use another lexer and parser. In this presentation we report a packrat parser combinator, implemented in C++, that receives not only strings but also sequences of tokens. The parser described by the combinator can receive as its input a Forward Iterator that returns not only characters but also values of any type. The output of the parser is obtained as a data structure that consists of tuples, variants, optionals and expecteds. We can process the result by describing semantic actions.
書誌レコードID
収録物識別子タイプ NCID
収録物識別子 AA11464814
書誌情報 情報処理学会論文誌プログラミング(PRO)

巻 10, 号 6, p. 1-1, 発行日 2017-12-12
ISSN
収録物識別子タイプ ISSN
収録物識別子 1882-7802
出版者
言語 ja
出版者 情報処理学会
戻る
0
views
See details
Views

Versions

Ver.1 2025-01-20 03:08:16.303595
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