Git Product home page Git Product logo

fnparse's People

Contributors

john-poplett avatar js-choi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fnparse's Issues

(comment) in hound.clj

Just an FYI... I was attempting to run the examples and found that there is a large portion of code wrapped in "comment" in hound.clj -- toward the bottom.
Matt

fnparse recursive?

Hey, guys,

We're using fnparse in Drake, and we're running into some parsing performance and stack issues. Parsing a 15k line source of a very simple structure takes forever (minutes) and fails with stack overflow. I tried to profile it with YourKit Java Profiler, and I'm getting endless stack traces full of monads' m_bind_state_t and m_bind_maybe:

Screen Shot 2013-02-04 at 12 37 12 AM

The list of most expensive methods by self-time.

Screen Shot 2013-02-04 at 12 37 24 AM

It might be that we're doing something wrong defining grammar. Just in case you want to look at it, it's defined here and here.

We used the JSON parser example as a base, and we use a similar method for updating the current column/line numbers. One observation is that getting rid of column/line tracking reduces parsing time of ~500 line file from 4s to <2s or so. Just that simple change.

We're looking for any advice on how to bring parsing times under control, and also if there's a more efficient method for updating column/line than used in your example.

Thank you!

fnparse doesn't work with Clojure 1.3.0

My project that uses fnparse doesn't compile with Clojure 1.3.0 because fnparse depends on clojure-contrib.accumulators, which in turn depends on clojure.set, which doesn't seem to exist any more.

Consider function alternatives to macros

I just tried doing this:
(def specials-
"~`#$&*()|[]{};'"<>?!")

(def specials
  (apply p/alt (map p/lit specials-)))

But it didn't work, because p/alt is a macro. ("Can't take value of a macro")

For what it's worth, I basically modified your 'alt' macro and put it into my parser:
(defn altarg
[& subrules](monads/with-monad p/parser-m
%28fn [state#]
%28%28apply monads/m-plus subrules%29 state#%29%29))

(def specials-
   "~`#$&*()\\|[]{};'\"<>?!")

(def specials
  (apply altarg (map p/lit specials-)))

and all is well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.