#include <senf/Utils/Phoenix.hh>
-///////////////////////////////ih.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
namespace senf {
namespace console {
::phoenix::function<PositionOf> const positionOf;
- ///////////////////////////////////////////////////////////////////////////
+ //-/////////////////////////////////////////////////////////////////////////////////////////////
// Grammar
template <class ParseDispatcher>
struct CommandGrammar : boost_spirit::grammar<CommandGrammar<ParseDispatcher> >
{
- ///////////////////////////////////////////////////////////////////////////
+ //-/////////////////////////////////////////////////////////////////////////////////////////
// Start rules
enum { CommandParser, SkipParser, ArgumentsParser, PathParser };
- ///////////////////////////////////////////////////////////////////////////
+ //-/////////////////////////////////////////////////////////////////////////////////////////
// The parse context (variables needed while parsing)
typedef Token::TokenType TokenType;
Context & context;
- ///////////////////////////////////////////////////////////////////////////
+ //-/////////////////////////////////////////////////////////////////////////////////////////
// Configuration
bool incremental;
- ///////////////////////////////////////////////////////////////////////////
+ //-/////////////////////////////////////////////////////////////////////////////////////////
// Dispatching semantic actions
ParseDispatcher & dispatcher;
- //////////////////////////////////////////////////////////////////////////
+ //-/////////////////////////////////////////////////////////////////////////////////////////
// charachter sets
static boost_spirit::chset<> special_p;
static boost_spirit::chset<> word_p;
static boost_spirit::distinct_parser<> keyword_p;
- ///////////////////////////////////////////////////////////////////////////
+ //-/////////////////////////////////////////////////////////////////////////////////////////
// Errors
enum Errors {
QuoteExpected
};
- ///////////////////////////////////////////////////////////////////////////
+ //-/////////////////////////////////////////////////////////////////////////////////////////
CommandGrammar(ParseDispatcher & d, Context & c)
: context(c), incremental(false), dispatcher(d) {}
assertion<Errors> closing_paren_expected (ClosingParenExpected);
assertion<Errors> quote_expected (QuoteExpected);
- ///////////////////////////////////////////////////////////////////
+ //-/////////////////////////////////////////////////////////////////////////////////
// Spirit grammar
//
// Syntax summary:
= self.space_p | comment_p('#')
;
- ///////////////////////////////////////////////////////////////////
+ //-/////////////////////////////////////////////////////////////////////////////////
start_parsers(
command, // CommandParser
}}}
-///////////////////////////////ih.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
#endif
\f