Thread: Lexer / Parser

  1. #1
    Old Fashioned
    Join Date
    Nov 2016
    Posts
    137

    Lexer / Parser

    Does anyone know of good resources for writing a lexer and parser? I'm having difficulty locating a tutorial or course specific on the subject (In C). Are they even big enough subjects to warrant that or should I just sit down and play with some code for a while? I'm sorta on the outside when it comes to these tools right now and I have not yet taken a compiler course but I would assume a compiler course may touch on these subjects.

    Thanks for your recommendations.

  2. #2
    Registered User
    Join Date
    Jun 2015
    Posts
    1,643
    Do you have a specific grammar in mind?

    You could try recursive descent.

    You should also check out the bison parser and the flex lexer.

  3. #3
    Old Fashioned
    Join Date
    Nov 2016
    Posts
    137
    Yes, trying to write a JSON serializer. Thanks for the links!

  4. #4
    Registered User
    Join Date
    Jun 2015
    Posts
    1,643
    Quote Originally Posted by Asymptotic View Post
    trying to write a JSON serializer.
    That's a good choice since it's relatively simple. JSON
    I recall writing a quick-and-dirty JSON parser to dump torrent contents.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. need help with a lexer
    By DTSCode in forum C++ Programming
    Replies: 4
    Last Post: 09-13-2013, 06:32 AM
  2. Review my simple Lexer please..
    By manasij7479 in forum C++ Programming
    Replies: 4
    Last Post: 08-19-2011, 10:56 AM
  3. XML Parser
    By Hexxx in forum C++ Programming
    Replies: 1
    Last Post: 03-30-2006, 07:52 PM
  4. Help! Bad parser :/.
    By Blackroot in forum C++ Programming
    Replies: 13
    Last Post: 03-07-2006, 11:08 AM
  5. Parser Help
    By Barnzey in forum C++ Programming
    Replies: 10
    Last Post: 10-26-2005, 12:10 PM

Tags for this Thread