PEG Library: Difference between revisions

From EiffelStudio: an EiffelSoftware project
Jump to navigation Jump to search
Sandrod (talk | contribs)
No edit summary
Sandrod (talk | contribs)
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 23: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.

Internal DSL

Building a domain model