frak.git
10 years agoSet development version
Joel Holdbrooks [Sat, 22 Mar 2014 18:50:12 +0000 (11:50 -0700)]
Set development version

10 years agoVersion bump to 0.1.6
Joel Holdbrooks [Sat, 22 Mar 2014 18:49:38 +0000 (11:49 -0700)]
Version bump to 0.1.6

10 years agoMerge branch 'public-escape-chars'
guns [Fri, 21 Feb 2014 12:26:38 +0000 (06:26 -0600)]
Merge branch 'public-escape-chars'

* public-escape-chars:
  Add -E/--escape-chars cli option
  Migrate to tools.cli
  Allow user to specify own escape-chars

10 years agoAdd -E/--escape-chars cli option
guns [Wed, 19 Feb 2014 04:47:08 +0000 (22:47 -0600)]
Add -E/--escape-chars cli option

10 years agoMigrate to tools.cli
guns [Wed, 19 Feb 2014 03:23:33 +0000 (21:23 -0600)]
Migrate to tools.cli

optparse-clj was merged into tools.cli for v0.3.0.

cljs.tools.cli does not build with current deps, so we update both
lein-cljsbuild and add an explicit CLJS dep (as recommended by
lein-cljsbuild).

Note that this new version of CLJS does not have cljs.core/format.

10 years agoAllow user to specify own escape-chars
guns [Wed, 19 Feb 2014 00:34:08 +0000 (18:34 -0600)]
Allow user to specify own escape-chars

The current set of metacharacters that are escaped when rendering are
based on Java's Pattern implementation, which for the purposes of this
library, is basically PCRE.

However, different regular expression implementations sometimes have
different pattern metacharacters. Vim's very-magic mode, for instance,
reserves all [^a-zA-Z0-9_] ASCII characters, while POSIX basic regular
expressions¹ do not use (, ), ?, +, or | (these must be preceeded by a
backslash to attain their now familiar meaning).

This patch adds the :escape-chars option to pattern and string-pattern
to allow the user to specify this set of metacharacters. The value of
:escape-chars may also be a key in the (public) metacharacters map.

The actual implementation is done through a dynamic var, following the
precedent of *capture*.

¹ Note that we must also allow the user to control the characters used
  for capturing/non-capturing groups, alternation, optional matching,
  etc, in order to make frak work for POSIX BREs

10 years agoSet development version
Joel Holdbrooks [Mon, 10 Feb 2014 15:41:28 +0000 (07:41 -0800)]
Set development version

10 years agoVersion bump to 0.1.5
Joel Holdbrooks [Mon, 10 Feb 2014 15:41:08 +0000 (07:41 -0800)]
Version bump to 0.1.5

10 years agoMerge branch 'master' of github.com:noprompt/frak
Joel Holdbrooks [Mon, 10 Feb 2014 15:37:06 +0000 (07:37 -0800)]
Merge branch 'master' of github.com:noprompt/frak

10 years agoSet development version
Joel Holdbrooks [Mon, 10 Feb 2014 15:35:54 +0000 (07:35 -0800)]
Set development version

10 years agoVersion bump to 0.1.4
Joel Holdbrooks [Mon, 10 Feb 2014 15:34:14 +0000 (07:34 -0800)]
Version bump to 0.1.4

10 years agoMerge pull request #12 from guns/missing-escape
Joel Holdbrooks [Mon, 10 Feb 2014 15:18:21 +0000 (07:18 -0800)]
Merge pull request #12 from guns/missing-escape

Add missing escape

10 years agoAdd missing call to escape
guns [Mon, 10 Feb 2014 02:06:55 +0000 (20:06 -0600)]
Add missing call to escape

Before this, (string-pattern "foo?") erroneously returned "foo??".

10 years agoAccess opts with `get`, as the map may be nil
guns [Sun, 9 Feb 2014 23:57:30 +0000 (17:57 -0600)]
Access opts with `get`, as the map may be nil

For instance, this form from the test results in a NPE:

    (string-pattern ["bat" "bar" "baz"] nil)

11 years agoFix typos, weird grammar
Joel Holdbrooks [Sun, 8 Sep 2013 01:19:40 +0000 (18:19 -0700)]
Fix typos, weird grammar

11 years agoVersion bump to 0.1.3
Joel Holdbrooks [Sun, 25 Aug 2013 18:01:32 +0000 (11:01 -0700)]
Version bump to 0.1.3

11 years agoExport string-pattern as stringPattern for JS compatibility
Joel Holdbrooks [Fri, 23 Aug 2013 19:24:49 +0000 (12:24 -0700)]
Export string-pattern as stringPattern for JS compatibility

11 years agoRefactor and finish rendering process, add new tests
Joel Holdbrooks [Thu, 22 Aug 2013 07:39:02 +0000 (00:39 -0700)]
Refactor and finish rendering process, add new tests

`re-group` no longer joins strings as pipe (or) delimited values.
`re-or-group` is a new function which essentially does what `re-group`
used to do. This cleans up some edge cases where it's favorable to use
a  regular group.

Post filtering has been added to the expression rendering process to
remove unecessary grouping wherever possible. This is done using
`clojure.string/replace` and it's a hackish, but works.

11 years agoMerge pull request #7 from guns/optparse-clj
Joel Holdbrooks [Wed, 21 Aug 2013 00:44:26 +0000 (17:44 -0700)]
Merge pull request #7 from guns/optparse-clj

Use optparse-clj for nice CLI options processing

11 years agoUse optparse-clj for nice CLI options processing
guns [Wed, 21 Aug 2013 00:02:25 +0000 (19:02 -0500)]
Use optparse-clj for nice CLI options processing

Allows GNU style options clumping:

        $ bin/frak -ec foo bar baz
        ^(ba[rz]|foo)$

And nice failure messages:

        $ bin/frak foo bar baz --evil
        Failed to parse `--evil`: Invalid option

11 years agoAdd cljx hooks
Joel Holdbrooks [Tue, 20 Aug 2013 07:51:01 +0000 (00:51 -0700)]
Add cljx hooks

11 years agoChange browser target
Joel Holdbrooks [Tue, 20 Aug 2013 07:50:44 +0000 (00:50 -0700)]
Change browser target

11 years agoDrop "Next" section from README
Joel Holdbrooks [Tue, 20 Aug 2013 07:29:10 +0000 (00:29 -0700)]
Drop "Next" section from README

11 years agoMinor test refactoring
Joel Holdbrooks [Tue, 20 Aug 2013 07:24:15 +0000 (00:24 -0700)]
Minor test refactoring

11 years agoUse cljx, change cljsbuild names
Joel Holdbrooks [Tue, 20 Aug 2013 07:23:59 +0000 (00:23 -0700)]
Use cljx, change cljsbuild names

11 years agoRewrite trie construction and rendering, closes #3
Joel Holdbrooks [Mon, 19 Aug 2013 10:56:08 +0000 (03:56 -0700)]
Rewrite trie construction and rendering, closes #3

11 years agoSet :init-ns to frak
Joel Holdbrooks [Mon, 19 Aug 2013 10:54:57 +0000 (03:54 -0700)]
Set :init-ns to frak

11 years agoConvert pattern to string before printing
Joel Holdbrooks [Sat, 17 Aug 2013 22:27:21 +0000 (15:27 -0700)]
Convert pattern to string before printing

11 years agoExit after running -main
Joel Holdbrooks [Sat, 17 Aug 2013 22:26:29 +0000 (15:26 -0700)]
Exit after running -main

11 years agoUse the default user ns for `lein repl`
Joel Holdbrooks [Sat, 17 Aug 2013 22:18:01 +0000 (15:18 -0700)]
Use the default user ns for `lein repl`

11 years agoMove src/frak/cli.clj -> src/clj/frak/cli.clj
Joel Holdbrooks [Sat, 17 Aug 2013 21:57:15 +0000 (14:57 -0700)]
Move src/frak/cli.clj -> src/clj/frak/cli.clj

11 years agoDon't use `char?`
Joel Holdbrooks [Sat, 17 Aug 2013 16:55:32 +0000 (09:55 -0700)]
Don't use `char?`

11 years agoUpdate tests
Joel Holdbrooks [Thu, 15 Aug 2013 22:48:06 +0000 (15:48 -0700)]
Update tests

11 years agoRefactor escape
Joel Holdbrooks [Thu, 15 Aug 2013 21:53:30 +0000 (14:53 -0700)]
Refactor escape

11 years agoDon't use meta to keep track of terminals and visitors
Joel Holdbrooks [Thu, 15 Aug 2013 21:22:26 +0000 (14:22 -0700)]
Don't use meta to keep track of terminals and visitors

Using meta is a nice idea but it's slow and will complicate branch
comparision in the future.

11 years agoDrop precondition, automatically convert inputs to string
Joel Holdbrooks [Thu, 15 Aug 2013 21:20:44 +0000 (14:20 -0700)]
Drop precondition, automatically convert inputs to string

11 years agoChange escape-chars? to escape-chars, alias escape-chars? to escape-chars
Joel Holdbrooks [Thu, 15 Aug 2013 21:19:51 +0000 (14:19 -0700)]
Change escape-chars? to escape-chars, alias escape-chars? to escape-chars

11 years agoUse console.log instead of println
Joel Holdbrooks [Wed, 14 Aug 2013 21:15:53 +0000 (14:15 -0700)]
Use console.log instead of println

11 years agoPrint summary to STDERR instead of STDOUT
Joel Holdbrooks [Wed, 14 Aug 2013 21:15:43 +0000 (14:15 -0700)]
Print summary to STDERR instead of STDOUT

11 years agoAdd externs file, compile prod in advanced mode
Joel Holdbrooks [Wed, 14 Aug 2013 17:46:37 +0000 (10:46 -0700)]
Add externs file, compile prod in advanced mode

11 years agoBegin work on command line version (cljs)
Joel Holdbrooks [Wed, 14 Aug 2013 01:20:57 +0000 (18:20 -0700)]
Begin work on command line version (cljs)

11 years agoMerge pull request #4 from BlaineSch/feature/cli
Joel Holdbrooks [Sat, 17 Aug 2013 21:49:20 +0000 (14:49 -0700)]
Merge pull request #4 from BlaineSch/feature/cli

Support command line usage with lein

11 years agoAllow for command line usage.
Blaine Schmeisser [Sat, 17 Aug 2013 16:22:54 +0000 (11:22 -0500)]
Allow for command line usage.

~~~ bash
-> lein run arg1 arg2
"arg[12]"
-> lein run colour color
"colo(?:ur|r)"
~~~

11 years agoSmall note regarding generated dictionary pattern
Joel Holdbrooks [Mon, 12 Aug 2013 18:36:51 +0000 (11:36 -0700)]
Small note regarding generated dictionary pattern

11 years agoSmall correction to README
Joel Holdbrooks [Thu, 8 Aug 2013 08:31:44 +0000 (01:31 -0700)]
Small correction to README

11 years agoVersion bump to v0.1.2
Joel Holdbrooks [Wed, 7 Aug 2013 06:38:39 +0000 (23:38 -0700)]
Version bump to v0.1.2

11 years agoMerge branch 'master' of https://github.com/noprompt/frak
Joel Holdbrooks [Wed, 7 Aug 2013 06:29:32 +0000 (23:29 -0700)]
Merge branch 'master' of https://github.com/noprompt/frak

11 years agoUse character sets at the end of groups when possible
Joel Holdbrooks [Wed, 7 Aug 2013 06:28:36 +0000 (23:28 -0700)]
Use character sets at the end of groups when possible

11 years agoWhitespace cleanup
Joel Holdbrooks [Thu, 1 Aug 2013 23:57:28 +0000 (16:57 -0700)]
Whitespace cleanup

11 years agoAdd missing code to naive-pattern in benchmark
Joel Holdbrooks [Thu, 1 Aug 2013 23:56:05 +0000 (16:56 -0700)]
Add missing code to naive-pattern in benchmark

11 years agoMerge branch 'master' of https://github.com/noprompt/frak
Joel Holdbrooks [Thu, 1 Aug 2013 23:52:09 +0000 (16:52 -0700)]
Merge branch 'master' of https://github.com/noprompt/frak

11 years agoAdd benchmarks to README
Joel Holdbrooks [Thu, 1 Aug 2013 23:51:55 +0000 (16:51 -0700)]
Add benchmarks to README

11 years agoAdd criterium as dev dependency
Joel Holdbrooks [Thu, 1 Aug 2013 23:51:35 +0000 (16:51 -0700)]
Add criterium as dev dependency

11 years agoClean up redundant language
Joel Holdbrooks [Tue, 30 Jul 2013 17:38:20 +0000 (10:38 -0700)]
Clean up redundant language

11 years agoCorrect spelling in ns doc
Joel Holdbrooks [Tue, 30 Jul 2013 17:35:55 +0000 (10:35 -0700)]
Correct spelling in ns doc

11 years agoAdd more information to README
Joel Holdbrooks [Tue, 30 Jul 2013 17:35:43 +0000 (10:35 -0700)]
Add more information to README

11 years agoAdd new section to README
Joel Holdbrooks [Mon, 29 Jul 2013 21:45:21 +0000 (14:45 -0700)]
Add new section to README

11 years agoSmall correction to README
Joel Holdbrooks [Mon, 29 Jul 2013 21:42:47 +0000 (14:42 -0700)]
Small correction to README

11 years agov0.1.1
Joel Holdbrooks [Mon, 29 Jul 2013 21:40:24 +0000 (14:40 -0700)]
v0.1.1

11 years agoClean up and refactor
Joel Holdbrooks [Mon, 29 Jul 2013 21:39:07 +0000 (14:39 -0700)]
Clean up and refactor

11 years agoFix bug where empty strings could break tries
Joel Holdbrooks [Mon, 29 Jul 2013 21:38:56 +0000 (14:38 -0700)]
Fix bug where empty strings could break tries

11 years agov0.1.0
Joel Holdbrooks [Mon, 29 Jul 2013 21:10:57 +0000 (14:10 -0700)]
v0.1.0

11 years agoAdd example with terminal branches
Joel Holdbrooks [Mon, 29 Jul 2013 20:08:10 +0000 (13:08 -0700)]
Add example with terminal branches

11 years agoUpdate README
Joel Holdbrooks [Mon, 29 Jul 2013 20:00:01 +0000 (13:00 -0700)]
Update README

11 years agoInitial commit
Joel Holdbrooks [Mon, 29 Jul 2013 17:40:27 +0000 (10:40 -0700)]
Initial commit