Skip to content

Releases: carocad/parcera

v0.4.4

21 Nov 12:24
8877dc3
Compare
Choose a tag to compare

FIXED 🐞

  • metadata namespaced keyword were parcera.antlr.java when they were intended to be parcera.core
  • end column value was calculated for the first character of the token not the last one.

v0.4.2

20 Nov 20:31
de2abd4
Compare
Choose a tag to compare

FIXED 🐞

  • target java 1.8 (same as clojure 1.10) instead of travis ci default one

v0.4.1

20 Nov 19:17
88e50fd
Compare
Choose a tag to compare

FIXED 🐞

  • missing generated java classes from antlr4

thanks to @borkdude for the report and clear insights :)

v0.4.0

19 Nov 22:24
3d33c54
Compare
Choose a tag to compare

BREAKING 💀

Parcera now uses Antlr4 as its parsing engine instead of Instaparse. 🚀

This drops the parsing time significantly. For comparison (on my machine) it took instaparse 3 seconds to parse clojure.core file (~8k loc), with antlr this drops to 100 milliseconds. Converting it to clojure persistent data structures adds some overhead but it is still way faster than instaparse in all cases that I tested.

Clojurescript support was dropped for the time being.

CHANGES

  • all - in keywords were changed to _ to allow compatibility with antlr4 allowed characters
    • :simple-keyword -> :simple_keyword
    • :macro-keyword -> :macro_keyword
    • :conditional-splicing -> :conditional_splicing
    • :namespaced-map -> :namespaced_map
    • :reader-macro -> :reader_macro
    • :metadata-entry -> :metadata_entry
    • :auto-resolve -> :auto_resolve
    • var-quote -> :var_quote
  • keywords now dont include the : or :: as part of their content and follow Clojure's name syntax
  • parcera/clojure function was renamed to parcera/ast for clarity on its purpose
    • ast returns a lazy sequence instead of the eager implementation from Instaparse
  • parcera now checks that maps, sets literals conform to Clojure syntax

v0.3.1

16 Oct 18:34
a9e71b4
Compare
Choose a tag to compare

FIXED 🐞

  • some invalid symbols were allowed
  • some valid keyword were parsed as keyword + symbol

v0.3.0

14 Oct 19:19
cce5f73
Compare
Choose a tag to compare

BREAKING 💀

This release makes parcera 3 times faster 🚀

Most of these changes related to the advices in Instaparse performance notes. Unfortunately this lead to some breaking changes to make it work 😞. Sorry for the inconvenience.

CHANGES

  • :simple-keyword
    • before [:simple-keyword "hello/world"]
    • now [:simple-keyword ":hello/world"]. Note the : at the beginning
  • :macro-keyword
    • before [:macro-keyword "hello"]
    • now [:macro-keyword "::hello"]. Note the :: at the beginning
  • :string
    • before [:string "hello world"]
    • now [:string "\"hello world\""]. Note that \" is part of the content
  • :regex
    • before [:regex "hello-world"]
    • now [:regex "#\"hello world\""]. Note that #\" is part of the content
  • :whitespace
    • before [:whitespace ""]
    • now [:whitespace " \n"]. Note that whitespace now cannot be empty
  • :function
    • before [:function [:list ... ]]
    • now [:function ... ]. Note that now the content of the function is directly associated with the function not with the enclosing list
  • :tag now only matches for literal and collections
  • :conditional and :conditional-splicing
    • before [:conditional [:list ... ]]
    • now [:conditional ... ]. Note that now the content of the conditional is directly associated with the macro not with the enclosing list
  • :character
    • before [:character "u1234"]
    • now [:character "\u1234"]. Note that \ is part of the content

REMOVED

  • character, symbol, simple-keyword, macro-keyword, number, string and regex are now defined outside of the grammar string as regexes. This is to increase reusability of those regexes.

  • map-namespace no longer exists

    • before [:map [:map-namespace [:simple-keyword "hello"]] [:map-content ....]]
    • now [:map ...]. Note the that the namespace is no longer part of map
  • comment rule was removed and included inside :whitespace.

    • before [:comment "hello world"]
    • now [:whitespace " ;hello world"]. Note the ; in the middle and the whitespace (if any)

ADDED

  • :namespaced-map grammar rule.
    • before [:map [:map-namespace [:simple-keyword "hello"]] [:map-content ... ]]
    • now [:namespaced-map [:simple-keyword ":hello"] [:map ... ]]. This way we re-use the map rule definition and focus on the namespace as a distinctive characteristic instead of an optional "attribute" of a map.

v0.2.1

13 Oct 21:28
0e1a978
Compare
Choose a tag to compare

CHANGED

  • parcera.slurp/slurp is now exposed directly with macros. See #16

v0.2.0

09 Oct 22:11
d2e812f
Compare
Choose a tag to compare

ADDED

  • Clojurescript support. Parcera now can be run inside Javascript environments :)

FIXED

  • symbol rules for special characters like ;,/^

v0.1.3

09 Oct 16:05
c149e1c
Compare
Choose a tag to compare

CHANGED

  • symbols regex now matches anything that is not forbidden instead of only allowed characters

v0.1.2

08 Oct 19:28
6072623
Compare
Choose a tag to compare

FIXED

  • allow unicode on symbols and keywords