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

defs.cc

00001 /*
00002 *  Name:      defs.cc
00003 *  Author:    Rafael Jesus Alcantara Perez
00004 *  Summary:   AUTOMATON definitions
00005 *  Date:      $Date: 2003/04/14 00:18:35 $
00006 *  Revision:  $Revision: 1.1 $
00007 *
00008 *  Copyright (C) 1994-2002  Rafael Jesus Alcantara Perez <rafa@dedalo-ing.com>
00009 *
00010 *  This program is free software; you can redistribute it and/or modify
00011 *  it under the terms of the GNU General Public License as published by
00012 *  the Free Software Foundation; either version 2 of the License, or
00013 *  (at your option) any later version.
00014 *
00015 *  This program is distributed in the hope that it will be useful,
00016 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 *  GNU General Public License for more details.
00019 *
00020 *  You should have received a copy of the GNU General Public License
00021 *  along with this program; if not, write to the Free Software
00022 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00023 *  MA 02111-1307, USA.
00024 */
00025 
00026 #include <cstring>
00027 #include <mpcl/automaton/defs.hh>
00028 
00029 
00031 namespace mpcl
00032 {
00033 
00034   namespace automaton
00035   {
00036 
00037     //
00038     //  E X P O R T E D   V A R I A B L E S
00039     //
00040 
00041     //
00042     //  Tag definitions.
00043     //
00044 
00045     //
00046     //  <!-- ... -->
00047     //
00048     const char*   pkcCommentTagPattern = "[[:space:]]*<!--%t-->";
00049 
00050     //
00051     //  <!doctype dfaml [{system="value" | public="value"}]>
00052     //
00053     const char*   pkcDOCTYPE_TagPattern_1 = "[[:space:]]*<!doctype"
00054                                             "[[:space:]]+dfaml[[:space:]]*>";
00055     const char*   pkcDOCTYPE_TagPattern_2 = "[[:space:]]*<!doctype"
00056                                             "[[:space:]]+dfaml[[:space:]]+system[[:space:]]*>";
00057     const char*   pkcDOCTYPE_TagPattern_3 = "[[:space:]]*<!doctype"
00058                                             "[[:space:]]+dfaml[[:space:]]+system"
00059                                             "[[:space:]]+%q[[:space:]]*>";
00060     const char*   pkcDOCTYPE_TagPattern_4 = "[[:space:]]*<!doctype"
00061                                             "[[:space:]]+dfaml[[:space:]]+public"
00062                                             "[[:space:]]+%q[[:space:]]*>";
00063 
00064     //
00065     //  !doctype public versions.
00066     //
00067     const char*   pkcDOCTYPE_VERSION_1_0  = "-//mpcl//dtd dfaml 1.0//en";
00068     const char*   pkcDOCTYPE_VERSION_2_0  = "-//mpcl//dtd dfaml 2.0//en";
00069 
00070     //
00071     //  <dfaml name="value">...</dfaml>
00072     //
00073     const char*   pkcDFAML_TagPattern    = "[[:space:]]*<dfaml"
00074                                            "[[:space:]]+name[[:space:]]*="
00075                                            "[[:space:]]*%q"
00076                                            "[[:space:]]*>[[:blank:]]*\n?";
00077     const char*   pkcDFAML_EndTagPattern = "[[:space:]]*</dfaml[[:space:]]*>";
00078 
00079     //
00080     //  <desc>...</desc>
00081     //
00082     const char*   pkcDESC_ElementPattern = "[[:space:]]*<desc"
00083                                            "[[:space:]]*>[[:blank:]]*\n?"
00084                                            "%t[[:blank:]]*\n?</desc[[:space:]]*>";
00085 
00086     //
00087     //  <transtbl initial="value">...</transtbl>
00088     //
00089     const char*   pkcTRANSTBL_TagPattern    = "[[:space:]]*<transtbl"
00090                                               "[[:space:]]+initial[[:space:]]*="
00091                                               "[[:blank:]]*%q"
00092                                               "[[:space:]]*>[[:blank:]]*\n?";
00093     const char*   pkcTRANSTBL_EndTagPattern = "[[:space:]]*</transtbl[[:space:]]*>";
00094 
00095     //
00096     //  <state name="value">...</state>
00097     //
00098     const char*   pkcSTATE_TagPattern_1  = "[[:space:]]*<state[[:space:]]+"
00099                                            "name[[:space:]]*=[[:space:]]*%q"
00100                                            "[[:space:]]*>";
00101     const char*   pkcSTATE_TagPattern_2  = "[[:space:]]*<state[[:space:]]+"
00102                                            "name[[:space:]]*=[[:space:]]*%q[[:space:]]+"
00103                                            "type[[:space:]]*=[[:space:]]*%q"
00104                                            "[[:space:]]*>";
00105     const char*   pkcSTATE_TagPattern_3  = "[[:space:]]*<state[[:space:]]+"
00106                                            "type[[:space:]]*=[[:space:]]*%q[[:space:]]+"
00107                                            "name[[:space:]]*=[[:space:]]*%q"
00108                                            "[[:space:]]*>";
00109     const char*   pkcSTATE_EndTagPattern = "[[:space:]]*</state[[:space:]]*>";
00110 
00111 
00112     //
00113     //  <transit event="value" next="value">
00114     //
00115     const char*   pkcTRANSIT_ElementPattern_1 = "[[:space:]]*<transit"
00116                                                 "[[:space:]]+event[[:space:]]*=[[:space:]]*%q"
00117                                                 "[[:space:]]+next[[:space:]]*=[[:space:]]*%q"
00118                                                 "[[:space:]]*>[[:blank:]]*\n?";
00119     const char*   pkcTRANSIT_ElementPattern_2 = "[[:space:]]*<transit"
00120                                                 "[[:space:]]+next[[:space:]]*=[[:space:]]*%q"
00121                                                 "[[:space:]]+event[[:space:]]*=[[:space:]]*%q"
00122                                                 "[[:space:]]*>[[:blank:]]*\n?";
00123 
00124     //
00125     //  <actlist>...</actlist>
00126     //
00127     const char*   pkcACTLIST_TagPattern    = "[[:space:]]*<actlist"
00128                                              "[[:space:]]*>[[:blank:]]*\n?";
00129     const char*   pkcACTLIST_EndTagPattern = "[[:space:]]*</actlist[[:space:]]*>";
00130 
00131     //
00132     //  <action state="value" actions="value, value, value...">
00133     //
00134     const char*   pkcACTION_ElementPattern_1 = "[[:space:]]*<action"
00135                                                "[[:space:]]+state[[:space:]]*=[[:space:]]*%q"
00136                                                "[[:space:]]+actions[[:space:]]*=[[:space:]]*%q"
00137                                                "[[:space:]]*>[[:blank:]]*\n?";
00138     const char*   pkcACTION_ElementPattern_2 = "[[:space:]]*<action"
00139                                                "[[:space:]]+actions[[:space:]]*=[[:space:]]*%q"
00140                                                "[[:space:]]+state[[:space:]]*=[[:space:]]*%q"
00141                                                "[[:space:]]*>[[:blank:]]*\n?";
00142 
00143   }  // namespace automaton
00144   
00145 }  // namespace mpcl

Generated on Mon Oct 13 02:35:22 2003 for MPCL by doxygen1.2.18