2

Do you know some good resources on writing text-parsers, for stuff like json,INI,...?

Comments
  • 3
    What language? Usually there are libraries
  • 1
    Do you want to write it from the bottom up?
  • 0
    I don't think there's a definitive list of resources. Start with the spec and learn to optimize as you go
  • 3
    Most parsers are basically stream decoding state machines with handlers tied to certain transitions.
  • 3
    Parsers are a programmer's best friend.

    As a corollary: you cannot really call yourself a programmer if you don't know how to write one.

    Besides, they're fun!
  • 0
    @enron456
    Golang.
    There are more than enough libraries , but they all are using a reflection-based approach for accessing data.
    I'm more of a fan of dom-like interfaces for this.
  • 0
    @Lor-inc I'm sure he understood every word of that

    As for OP, great resource is this:

    http://lisperator.net/pltut/

    Read the whole thing from start to finish, it will give you a good understanding of how parsers work in general
  • 1
    @AlgoRythm If he knows what a state machine is (which he might) then the rest is obvious.
  • 1
    @Lor-inc I thought it was a little silly to assume he did, given his inability to google things
Add Comment