Archon::X3D::VRML::Parser Struct Reference

An LR parser for the VRML syntax. More...

Collaboration diagram for Archon::X3D::VRML::Parser:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Parser ()

Public Attributes

auto_ptr< Lexer::Actor< Context > > lexerActor
auto_ptr< Lexer::EnginelexerEngine
auto_ptr< LrParserBase::Actor<
Context > > 
parserActor
auto_ptr< Printerprinter
auto_ptr< SlrParserlrParser

Classes

struct  Context
struct  Printer

Detailed Description

An LR parser for the VRML syntax.

Parsing VRML with an LR parser imposes a problem. The problem is the the type and structure of field values cannot be deduced by the syntax alone. That is, the canonical grammer is not context free. An example would be that when reading the input "0 0 0" it could be a vector with three components, or it couild be a zero size image. Consequently the grammar cannot help us build up the structure of the field valus.

One might be attempted to solve the problem with lexical tie-ins, and this would indeed be an attractive strategy, but such an attempt will fail due to the fact that there is no seperating token beween the field name that determines the type and the actual value. A seperating token is needed because the parser keeps a look-ahead token and thus has read the first token of the value when it performs the action associated with the field name.

Instead the grammar for field valus is reduced to a sequence of possible value components. It is then up to the semantical system to assemble the components into the proper structured values.

Definition at line 60 of file parse_vrml.C.


The documentation for this struct was generated from the following file:
Generated on Sun Jul 30 23:03:50 2006 for Archon by  doxygen 1.4.4