Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

/magnus/back_end/AProducts/include/AmalgamatedProductParser.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: AmalgamatedProductParser.h,v 1.4 1997/03/18 22:50:26 bormotov Exp $
00003  */
00004 
00005 // Copyright (C) 1995 The New York Group Theory Cooperative
00006 // See magnus/doc/COPYRIGHT for the full notice.
00007 
00008 // Contents: Definition of class AmalgamatedProductParser
00009 //
00010 // Principal Author: Dmitry Pechkin
00011 //
00012 // Status: in progress
00013 //
00014 // Revision History:
00015 //
00016 
00017 #ifndef _AMALG_PRODUCT_PARSER_H_
00018 #define _AMALG_PRODUCT_PARSER_H_
00019 
00020 
00021 #include "PresentationParser.h"
00022 #include "APofFreeGroups.h"
00023 #include "APwithOneRelator.h"
00024 
00025 // The grammar for an Amalgamated Product of Free Groups(see the Word grammar):
00026 //
00027 // <AmalgamatedProductOfFreeGroups> ::= '<' <free group> '*' <free group>
00028 //         ('|' | ';' | ':') (<word> '=' <word>)* '>'
00029 //
00030 // <APwithOneRelator> ::= '<' <free group> '*' <free group>
00031 //         ('|' | ';' | ':') (<word> '=' <word>)? '>'
00032 
00033 
00034 //---------------------------------------------------------------------------//
00035 //-------------------- AmalgamatedProductParser -----------------------------//
00036 //---------------------------------------------------------------------------//
00037 
00038 class AmalgamatedProductParser : protected PresentationParser
00039 {
00040 public:
00041 
00042   /////////////////////////////////////////////////////////////////////////
00043   //                                                                     //
00044   // Constructors:                                                       //
00045   //                                                                     //
00046   /////////////////////////////////////////////////////////////////////////
00047 
00048   AmalgamatedProductParser(istream &istr) : PresentationParser(istr) { }
00049   // Initialize the parser with the istream from which to read.
00050 
00051   // Destructor supplied by compiler.
00052 
00053   /////////////////////////////////////////////////////////////////////////
00054   //                                                                     //
00055   // Parsing Methods:                                                    //
00056   //                                                                     //
00057   /////////////////////////////////////////////////////////////////////////
00058 
00059   VectorOf<Word> parseAPRelator(const VectorOf<Chars>& names, Chars& errMesg);
00060 
00061   VectorOf<Word> parseAPRelatorList(const VectorOf<Chars>& names,
00062                                     Chars& errMesg, int axRelators);
00063   
00064   void parseFactorsAndRelations(FreeGroup& f1, FreeGroup& f2,
00065                                 VectorOf<Word>& gens1, VectorOf<Word>& gens1,
00066                                 int maxRelators, Chars& errMesg);
00067   
00068   AmalgProductOfFreeGroupsRep* parseAPofFreeGroups( Chars& errMesg );
00069   
00070   APwithOneRelatorRep* parseAPwithOneRelator( Chars& errMesg );
00071 
00072 };
00073 
00074 #endif

Generated at Tue Jun 19 09:49:33 2001 for Magnus Classes by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001