タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

Pythonとparserに関するblueleのブックマーク (2)

  • pyparsing

    We are sorry, but the site you are looking for no longer exists Wikispaces was founded in 2005 and has since been used by educators, companies and individuals across the globe. Unfortunately, the time has come where we have had to make the difficult business decision to end the Wikispaces service. We first announced the site closure in January 2018, through a site-wide banner that appeared to all

  • inforno :: Python:re.ScannerでS式パーサ

    Rubyの StringScanner は個人的にかなり好きなモジュールで、Rubyでちょっとしたパーサなどを書くときに重宝しています。 一方、Pythonにはexperimentalながら re.Scanner というクラスがあります( >= 2.4 )。experimentalなのでマニュアルにはのっていませんが。この re.Scanner はかなりシンプルなんですが典型的な StringScanner の使い方の範疇では、こちらのほうがキレイに書けるような気がします。 re.Scanner の使い方 使い方は非常に簡単で (regex, action) のリストを渡してScannerオブジェクトを作成 action は(scanner, string_matched) => stringな関数、Noneを返せば結果は無視される。 scanメソッドでスキャン。結果が配列で返ってくる と

  • 1