Difference between revisions of "PEG Library"
(→Basic classes) |
|||
Line 2: | Line 2: | ||
==Basic classes== | ==Basic classes== | ||
+ | All the parsers inherit from PEG_ABSTRACT_PEG which defines the common functionalities. The parsers are the same as in the definition of Wikipedia with the additional classes like whitespace support. | ||
+ | |||
+ | The parsers are combined to a object hierarchy which defines the grammar. A string can then be parsed via the the feature <code>parser.parse_string ("Some source")</code> on the root object. | ||
==Internal DSL== | ==Internal DSL== | ||
==Building a domain model== | ==Building a domain model== |
Revision as of 14:19, 11 August 2009
This page describes the Parsing Expression Library implementation for Eiffel. Information about PEGs can be found here [1].
Basic classes
All the parsers inherit from PEG_ABSTRACT_PEG which defines the common functionalities. The parsers are the same as in the definition of Wikipedia with the additional classes like whitespace support.
The parsers are combined to a object hierarchy which defines the grammar. A string can then be parsed via the the feature parser.parse_string ("Some source")
on the root object.