You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
# 構文解析にまつわる小話たち ---------------------- [#peg_study](https://twitter.com/search?q=%23peg_study&src=typd&vertical=default&f=tweets) === # About Me --------- ![κeenのアイコン](/images/icon.png) + κeen + [@blackenedgold](https://twitter.com/blackenedgold) + Github: [KeenS](https://github.com/KeenS) + サイバエージェントの新卒エンジニア + Lisp, ML, Shell Scriptあたりを書きます === # ウォームアップ === # 構文解析はバッドノウハウ -----------------------
この記事はJavaScript Advent Calender 2014の10日目の記事です。 altjs作りたいやろ 半年前にこんなLTをやった。未完成で放置するのは気持ち悪いので、この機会に完成させようと思った…んだけど、advent当日の時点でまだ完成してない。すまんな。ただ知見は多少溜まったので、基本的なaltjsの作り方と合わせて紹介しようと思う。 altjsってどうやって作んの? 方法は様々だけど、 文法をPEG(pegjs)で記述する ソースコードを、Parser APIで定義されるASTに変換するロジックを書く 変換されたASTを、escodegenでJavaScriptのコードにさらに変換する というのが今ならやりやすいと思う。結局ある構文をjsに変換するだけで、変換は既存のツールを使えるので、実はそんなに広い知識を要求せず、0から王道のコンパイラを作るみたいな壮大な話に
Documentation Projects Syntax Input Output Decode Export More Get Involved Credits License Hyperglot aims to speed up the way you create and develop programming languages or DSLs. You specify a PEG grammar using Spidermonkey AST primitives and you get a compiler back. Simple as that. To run a release of Hyperglot, you will need to have a node-webkit binary. Projects This is the view presented to y
ABNF, ANTLR 3, Bison, GOLD, JavaCC, Jison, PEG.js で定義した文法を図示するには次の web ページを利用すると良い。 http://bottlecaps.de/convert/ 利用例: javascript で四則演算数式を評価する例 で使った peg.js での計算式の文法定義 http://homepage2.nifty.com/youichi_kato/src/pegjs/expression/arithmetics.pegjs を図示したもの http://homepage2.nifty.com/youichi_kato/src/pegjs/expression/ebnf/aritmetics/index.html 参考: - http://stackoverflow.com/questions/8154790/visualize
Peggy.js - A simpler PEG in JavaScript Description Please visit http://clintjhill.github.com/Peggy.js/ for more information. API Functions (as described here: Parsing Expression Grammar) sequence [val, val] choice ["||", val, val] 0 or more ["*", val] 1 or more ["+", val] optional (0 or 1) ["?", val] and ["&", val] not ["!", val] var css = new Peggy({ "sheet": ["rules", "medias", "imports"], "rule
PanPG is a parser generator. Input is a parser expression grammar (PEG) and output is a parser written in JavaScript. Grammar Reuse PanPG uses plain PEG grammar files without embedded code. The same grammar file is equally usable by a compiler, a syntax highlighter running in real time in a text editor, a static analysis tool, etc. All of these will need to process the parsed representation in dif
:>>> DEPRECATION NOTE <<<: Although still one of the most popular Markdown parsing libraries for the JVM, pegdown has reached its end of life. The project is essentially unmaintained with tickets piling up and crucial bugs not being fixed. pegdown's parsing performance isn't great. In some cases of pathological input runtime can even become exponential, which means that the parser either appears t
Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news. Parslet is a new "simple parser framework" for Ruby built by Kaspar Schiess. It follows the PEG (parsing expression grammar) style of parsing and its primary goals are to be simple, testable, and to have extensive and powerful error reporting features (something that Kaspar states Treetop sorely lacks). If you've already u
パーサジェネレータを作る簡単さで言うと、 PEG <<<< LL(1) <<<< LALR(1) くらいな感じのイメージです。 http://twitter.com/kmizu/statuses/1183248403 なんて偉そうなこと書いたので、(パーザジェネレータじゃないけど)PEGパーザコンビネータを実際にJavaで書いてみた。文字クラスを除くPEGの機能のほぼフルセットをサポートするのを目標に書いたので、やや煩雑になっている。 package jp.gr.java_conf.mizu; import java.util.*; import static java.lang.String.format; public class PEGParserCombinators { public static final class Pair<A, B> { public final A _
Peggy: 新しい時代のパーザジェネレータ田中英行 tanaka.hideyuki@gmail.com 2011-12-16 @ Haskell忘年会 自己紹介田中英行 (@tanakh, http://tanakh.jp)(株)Preferred Infrastructure 勤務C++ 書いてますHaskell愛好家 (2004~)Learn You a Haskell for Great Good! 翻訳中来春予定C81関数型イカ娘本寄稿予定SS2篇 Peggy: 全く新しいパーザジェネレータPeggyとは?パーザジェネレータのモダンな実装新しい構文解析アルゴリズムシンプル・簡単・強力な記法Quasi-QuoterであるHaskellコードへのシームレスな組み込みStandalone なパーザとしても利用可能Quasi-Quoter生成機能Haskellコードのシームレスな生成Un
Other Pages ← My Blog ← Contact Me Other Software/Code by Me icalBuddy setWeblocThumb asprint trash ANSIEscapeHelper CalStoreHelper PEG Markdown Highlight Unmaintained SoftwareTagger LaunchList TagLists ImageFolderQLGenerator Hidden Settings PEG Markdown Highlight This is a syntax highlighter for the Markdown language, designed to be integrated into GUI text editor programs. It uses a recursive-de
Ce site a gagné le concours de référencement Qwanturank, organisé par le moteur de recherche QWANT, en 2020 ⇒ PAJUNE : référencement SEO & SEA ⇐ Introduction : le référencement internet (SEO) Chaque moteur de recherche du web utilise une formule de classement des sites dans ses résultats de recherches (SERP) qui est différente, ce qui explique pourquoi les résultats obtenus pour une même requête n
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
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く