Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If this is purely for your own education regarding parsing, I would suggest tacking a much smaller / easier field than HTML , CSS and JS parsing as HTML and JS both represent some really quite nasty parsing problems which even the most experienced parser writer would feel nervous tackling.</p> <p>A language based off Scheme or Basic would probably be my first pick. (A personal favourite is building a parser / interpreter as I go through <a href="http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-10.html" rel="nofollow">http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-10.html</a> )</p> <p>(Also picking up a copy of something like Modern Complier Design probably wouldn't hurt: <a href="http://rads.stackoverflow.com/amzn/click/0471976970" rel="nofollow">http://www.amazon.com/Modern-Compiler-Design-D-Grune/dp/0471976970</a> )</p> <p>If it has to be web related in order to keep your interest, I'd take a stab at doing your parser for one of the smaller web related languages such as sass ( <a href="http://sass-lang.com" rel="nofollow">http://sass-lang.com</a> )</p> <p>On the other hand, if this is something work related where you really need to parse those specific things, I'd suggest skipping the effort of writing your own parser entirely and hook into something like the Razor or Chromium libraries. </p> <p>And to directly answer at least the second half of your question: I would recommend always splitting the various phases of parsing / interpreting out as far as possible from each other.</p> <p>Each problem is difficult enough on it's own without trying to be "too smart" and attempting to combine functionality into a single sweep.</p> <p>Where ever possible I'd suggest keeping things as high level, abstract and "clean" as possible... thus construct a tree of nodes specifically for lexical parsing and another for syntactical parsing... and in the case of combined languages as HTML, CSS and JS, a different AST and parsing code for each. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload