Importing textproc/ruby-treetop 1.4.8.
authortaca <taca>
Sun, 12 Sep 2010 01:53:43 +0000 (01:53 +0000)
committertaca <taca>
Sun, 12 Sep 2010 01:53:43 +0000 (01:53 +0000)
commit6db1023923e2fb5a0b793bdfe9b2e871a6914f8e
tree79be61acc9ea3db022a74d6f61c49ad18e6caf87
parent9efb363fcff8041ee58290c5aca18433d3b60f10
Importing textproc/ruby-treetop 1.4.8.

Languages can be split into two components, their *syntax* and their
*semantics*. It's your understanding of English syntax that tells you
the stream of words "Sleep furiously green ideas colorless" is not a
valid sentence. Semantics is deeper. Even if we rearrange the above
sentence to be "Colorless green ideas sleep furiously", which is
syntactically correct, it remains nonsensical on a semantic
level. With Treetop, you'll be dealing with languages that are much
simpler than English, but these basic concepts apply. Your programs
will need to address both the syntax and the semantics of the
languages they interpret.

Treetop equips you with powerful tools for each of these two aspects
of interpreter writing. You'll describe the syntax of your language
with a *parsing expression grammar*. From this description, Treetop
will generate a Ruby parser that transforms streams of characters
written into your language into *abstract syntax trees* representing
their structure. You'll then describe the semantics of your language
in Ruby by defining methods on the syntax trees the parser generates.
textproc/ruby-treetop/DESCR [new file with mode: 0644]
textproc/ruby-treetop/Makefile [new file with mode: 0644]
textproc/ruby-treetop/PLIST [new file with mode: 0644]
textproc/ruby-treetop/distinfo [new file with mode: 0644]