source: GTP/trunk/Lib/Vis/Preprocessing/src/mixkit/MxCmdParser.h @ 1097

Revision 1097, 1015 bytes checked in by mattausch, 18 years ago (diff)
Line 
1#ifndef MXCMDPARSER_INCLUDED // -*- C++ -*-
2#define MXCMDPARSER_INCLUDED
3#if !defined(__GNUC__)
4#  pragma once
5#endif
6
7/************************************************************************
8
9  MxCmdParser
10
11  Copyright (C) 1998 Michael Garland.  See "COPYING.txt" for details.
12 
13  $Id: MxCmdParser.h,v 1.1 2002/09/24 16:53:54 wimmer Exp $
14
15 ************************************************************************/
16
17#include "MxDynBlock.h"
18#include "MxAsp.h"
19
20typedef MxDynBlock<char *> MxCmdPhrase;
21
22class MxCmd
23{
24public:
25    char *op;
26    MxDynBlock<MxCmdPhrase> phrases;
27
28    MxCmd(int N) : phrases(N) { op=NULL; }
29};
30
31class MxCmdParser
32{
33private:
34    MxCmd cmd;
35    MxAspStore store;
36
37public:
38    bool will_ignore_unknown;
39
40public:
41    MxCmdParser();
42
43    MxAspStore *asp_store() { return &store; }
44
45    void parse_line(char *, void *closure=NULL);
46
47    virtual bool execute_command(const MxCmd& cmd, void *closure=NULL);
48};
49
50// MXCMDPARSER_INCLUDED
51#endif
Note: See TracBrowser for help on using the repository browser.