タグ

Haskellとpackratに関するnfunatoのブックマーク (5)

  • Packrat Parserについて - Yet Another Ranha

    この記事は、私が全くPackrat Parserが分からなかったにも関わらず、 Packrat Parser generatorを書こうとするうちに、 何故かPackrat Parserの事が分かってしまった様な気がしたので書くエントリ。 参考ページは http://pdos.csail.mit.edu/~baford/packrat/icfp02/ 上記ページでは非常に簡潔にしかし十分にPackrat Parserについて書かれている。 しかも分かりやすく、私の様な馬鹿にさえ理解されてしまう。 そもそもPackrat Parserとは何なのか Packrat Parserはその名の通りparsingの技法である。 具体的にどういう事をしているのか、という事はFord先生のpaperでも触れられているが、 再帰下降パーザ(Recursive Descent Parsing)+Tabular

    Packrat Parserについて - Yet Another Ranha
  • Packrat Parsing: Simple, Powerful, Lazy, Linear Time

    Packrat Parsing: Simple, Powerful, Lazy, Linear Time Presented at International Conference on Functional Programming, October 4-6, 2002, Pittsburgh Abstract Packrat parsing is a novel technique for implementing parsers in a lazy functional programming language. A packrat parser provides the power and flexibility of top-down parsing with backtracking and unlimited lookahead, but nevertheless guaran

  • Packrat Parsing and Parsing Expression Grammars

    Introduction Parsing expression grammars (PEGs) are an alternative to context free grammars for formally specifying syntax, and packrat parsers are parsers for PEGs that operate in guaranteed linear time through the use of memoization. For a brief technical summary see the Wikipedia entry on PEGs. For more in-depth descriptions see the original PEG paper and packrat parsing paper, and related pape

  • Text.Parsers.Frisby

    Linear time composable parser for PEG grammars. frisby is a parser library that can parse arbitrary PEG grammars in linear time. Unlike other parsers of PEG grammars, frisby need not be supplied with all possible rules up front, allowing composition of smaller parsers. PEG parsers are never ambiguous and allow infinite lookahead with no backtracking penalty. Since PEG parsers can look ahead arbitr

  • Peggy - The Parser Generator for Haskell

    Peggyとは PeggyはHaskell向けのパーザジェネレータです。 シンプルで扱いやすく、表現力のある Parsing expression grammer (PEG) を採用し、効率のよいPackrat parserを生成出来ます。 Parsing Expression Grammer Peggy は文法としてParsing Expression Grammer (PEG)を採用しています。 PEGには次のような特徴があります。 CFG (LL(1), LR(1), LALR(1), etc…) にある shift/reduce 競合が存在しない シンプルで表現力がある 無制限の先読みが可能、パーザとスキャナを分離する必要がない 入力長に対して線形時間での解析 PeggyはさらにPEGを拡張しています。 sepBy拡張構文 強力なエラー検出とわかりやすいエラーメッセージの生成 左再

  • 1