サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
Wikipedia
jparsec.codehaus.org
A Tutorial for NParsec Framework In this tutorial, we will use the classical example: calculator, to show how NParsec's declarative API can be used to create a parser. NParsec can be downloaded here. The tutorial will use C# 2.0 syntax (generics and anonymous delegates) since NParsec is built exclusively for C# 2.0 or higher. Our calculator should be able to: support calculation of decimal number
Jparsec is now ported to Ruby, with a way lighter syntax than Java. require 'rparsec' include RParsec class Calculator include Parsers include Functors def parser ops = OperatorTable.new. infixl(char(?+) >> Plus, 20). infixl(char(?-) >> Minus, 20). infixl(char(?*) >> Mul, 40). infixl(char(?/) >> Div, 40). prefix(char(?-) >> Neg, 60) expr = nil term = integer.map(&To_i) | char('(') >> lazy{expr} <<
What is jparsec? Jparsec is a recursive-desent parser combinator framework written for Java. It constructs parsers in native Java language only. Why yet another parser framework? Jparsec stands out for its combinator nature. It is no parser generator like YACC or ANTLR. No extra grammar file is required. Grammar is written in native Java /C# language, which also means you can utilize all the utili
このページを最初にブックマークしてみませんか?
『JParsec - Home』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く