Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

8. Extending the Template Toolkit > Changing the Language

Changing the Language

The grammar for the Template Toolkit language is generated using a YACC-like parser generator written in Perl called Parse::Yapp (http://search.cpan.org/dist/Parse-Yapp/). Parse::Yapp is not distributed with or required by the Template Toolkit, but you will need it if you want to regenerate the grammar. Yapp is identical to YACC in all the important ways; for a good general introduction to YACC, see lex & yacc, Second Edition, by John R. Levine, Tony Mason, and Doug Brown (O’Reilly), which gives a good introduction to the principles of an LALR parser and how to define grammars in YACC. See also the Parse::Yapp documentation and the comments in Template::Parser for more information. For an in-depth study of parser and compiler theory, consult Compilers: Principles, Techniques and Tools (a.k.a., the “Dragon Book”) by Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman (Addison Wesley).


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint