Does anyone have a good tool for drawing parse trees arising from a context-free grammar? There is this question, but it dealt specifically with finite automata instead of parse trees. I've been using graphviz, but it's kind of annoying to have to label each node individually etc.
You can use http://ironcreek.net/phpsyntaxtree/.
Example:
Input was:
[ROOT
[S
[S
[NP [PRP It]]
[VP [VBZ is]
[NP
[QP [RB nearly] [DT half] [JJ past] [CD five]]]]]
[, ,]
[S
[NP [PRP we]]
[VP [MD can] [RB not]
[VP [VB reach]
[NP [NN town]]
[PP [IN before]
[NP [NN dark]]]]]]
[, ,]
[S
[NP [PRP we]]
[VP [MD will]
[VP [VB miss]
[NP [NN dinner]]]]]
[. .]]]
Also works if the string has no line breaks, e.g.:
[S [NP [DT The] [NN man]] [VP [VBZ is] [VP [VBG running] [PP [IN on] [NP [DT the] [NN mountain]]]]] [. .]]