Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > 87f956008f5479527bcce97ec30dbca7 > files > 192

fityk-debug-0.8.6-3mdv2009.1.i586.rpm

// This file is part of fityk program. Copyright (C) Marcin Wojdyr
// Licence: GNU General Public License version 2
// $Id: cmd3.h 400 2008-03-03 14:51:40Z wojdyr $

#ifndef FITYK__CMD3__H__
#define FITYK__CMD3__H__

/// big grammars in Spirit take a lot of time and memory to compile
/// so they must be splitted into separate compilation units
/// that's the only reason why this file is not a part of datatrans.cpp
/// code here was originally part of datatrans.cpp (yes, .cpp)
///
/// this file is included only by datatrans*.cpp

#include "common.h"
#include <boost/spirit/core.hpp>


using namespace boost::spirit;

/// a part of command grammar
struct Cmd3Grammar : public grammar<Cmd3Grammar>
{
  template <typename ScannerT>
  struct definition
  {
    definition(Cmd3Grammar const& self);

    rule<ScannerT> in_data, optional_plus, 
                   set_arg, commands_arg, fit_arg, statement;  

    rule<ScannerT> const& start() const { return statement; }
  };
};

extern Cmd3Grammar cmd3G;


#endif