hopefully this commit will not break other things....
[senf.git] / Console / Parse.ih
index f676f10..9a62aa7 100644 (file)
@@ -44,6 +44,9 @@ namespace detail {
 
 #ifndef DOXYGEN
 
+    ///////////////////////////////////////////////////////////////////////////
+    // append_a
+
     struct append_action
     {
         template <class T, class Value>
@@ -58,16 +61,15 @@ namespace detail {
     template <class T>
     inline boost::spirit::ref_value_actor<T, append_action> 
     append_a(T & ref)
-    {
-        return boost::spirit::ref_value_actor<T, append_action>(ref);
-    }
+    { return boost::spirit::ref_value_actor<T, append_action>(ref); }
     
     template <class T, class Value>
     inline boost::spirit::ref_const_ref_actor<T, Value, append_action> 
     append_a(T & ref, Value const & value)
-    {
-        return boost::spirit::ref_const_ref_actor<T, Value, append_action>(ref, value);
-    }
+    { return boost::spirit::ref_const_ref_actor<T, Value, append_action>(ref, value); }
+
+    ///////////////////////////////////////////////////////////////////////////
+    // Grammar
 
     template <class ParseDispatcher>
     struct CommandGrammar : boost::spirit::grammar<CommandGrammar<ParseDispatcher> >
@@ -138,7 +140,8 @@ namespace detail {
                 special_p ("/(){};"),
 
                 // Characters which are returned as punctuation tokens
-                punctuation_p (",="),
+                // (only allowed within '()')
+                punctuation_p (",=/{};"),
 
                 // Whitespace characters
                 space_p (" \t\n\r"),
@@ -165,7 +168,7 @@ namespace detail {
                 // Syntax summary:
                 // This is EBNF with some minor tweaks to accommodate C++ syntax
                 //
-                //   * and +    precede their argument
+                //   * and +    like EBNF but they precede their argument
                 //   >>         is followed by
                 //   !          optional
                 //   a % b      match any number of a's separated by b
@@ -190,7 +193,7 @@ namespace detail {
                 //
                 // Aligned to the right at column 50 are semantic actions.
                 //
-                // For clarity, I have used 'ch_p' explicitly throughout even though it is auxiliary
+                // For clarity, I have used 'ch_p' explicitly throughout even though it is optional
                 // in most cases.
                 //
                 // More info is in the Boost.Spirit documentation
@@ -351,6 +354,8 @@ namespace detail {
         };
     };
 
+
+
 #endif
 
 }}}