Skip to content

wibisono/gnip-rule-validator-clj

Repository files navigation

Build Status

Clojure Instaparse partial early version port of Fastparse version from Jeroen.

Main rule definition is in gnip-rule.bnf file.

Sample output using Instaparse/visualize (based on Rhizome):

Visualizing

Image above is produced from REPL

lein repl
user=> (use 'gnip-rule-validator.core) (use 'instaparse.core) (in-ns 'gnip-rule-validator.core)

gnip-rule-validator.core=> (insta/visualize (gnip-parser "(\"powertrack -operators\" OR (-\"streaming code\"~4 foo OR bar)) -contains:help has:links url_contains:github") :output-file "gnip-rule.png")

gnip-rule-validator.core=> (insta/visualize (gnip-parser "(\"powertrack -operators\" OR (-\"streaming code\"~4 foo OR bar)) -contains:help has:links url_contains:github"))

Testing

TDD Spec suit is using Specl

lein spec

About

Clojure instaparse port of Jeroen's gnip rule validator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published