From: Martin Mares Date: Fri, 24 Jun 2011 18:04:22 +0000 (+0200) Subject: Fixed a couple of typos in the documentation X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fpython;p=moe.git Fixed a couple of typos in the documentation --- diff --git a/t/doc/config.rst b/t/doc/config.rst index a07ec96..4eb1260 100644 --- a/t/doc/config.rst +++ b/t/doc/config.rst @@ -106,12 +106,12 @@ Substituted variable names must be given by their full names. :: # Defines LOG.TEST.LOGFILE } LOG.TEST { VERBOSE = "Y" } - # The subtree name may contain several level names + # The subtree name may contain multi-level names Conditionals ^^^^^^^^^^^^ -Any block of operations may be guarded by a condition. The conditions may be nested and +Any block of operations may be guarded by a condition. The conditions may be nested and they consist of expressions containing ``and``, ``or``, ``not`` and variable/string (in)equalities. The strings may contain substitutions. @@ -123,7 +123,7 @@ The syntax is the following:: LANG = "C" } -The curly brackets delimiting the bloc, as well as the brackets in the boolena expression, +The curly brackets delimiting the block, as well as the parentheses in the boolean expression, are mandatory. ``else`` is not supported. ``if VAR=="FOO" {...}`` is equivalent to ``if "{VAR}"=="FOO" {...}``. diff --git a/t/moe/config.py b/t/moe/config.py index 7d8c28f..8aac6c0 100644 --- a/t/moe/config.py +++ b/t/moe/config.py @@ -3,7 +3,7 @@ Module for managing and evaluation of Moe configuration variables. .. todo:: (OPT) Cleanup of unused undefined variables. .. todo:: (OPT) Better variable name checking (no name '.'-structural prefix of another) -.. todo:: (OPT) Implemet "subtree" listing. +.. todo:: (OPT) Implement "subtree" listing. """ import types, itertools, re, bisect diff --git a/t/moe/config_parser.py b/t/moe/config_parser.py index ad10b02..a6aac79 100644 --- a/t/moe/config_parser.py +++ b/t/moe/config_parser.py @@ -2,7 +2,7 @@ r""" Simple Moe configuration file syntax parser. Generally, whitespace and comments are alowed everywhere except in variable names and inside expressions, -``\\n`` ends a ``COMMENT``. +``\n`` ends a ``COMMENT``. ``FILE``, ``BLOCK``, ``STATEMENT``, ``OPERATION``, ``SUBTREE``, ``CONDITION``, ``FORMULA``, ``AND``, ``OR`` and ``NOT`` ignore any preceding whitespace. @@ -35,7 +35,7 @@ The configuration syntax is the following:: ECHAR = re('([^\{}]|\\|\{|\}|\\n)*') VARNAME = re('[a-zA-Z0-9-_]+(\.[a-zA-Z0-9-_]+)*') -.. todo:: should whitespace (incl. '\n') be allowed (almost) everywhere? +.. todo:: should whitespace (incl. '\\n') be allowed (almost) everywhere? can comment be anywhere whitespace can? .. note:: ';' or '\\n' is currently required even after CONDITION and SUBTREE block .. note:: Formula can contain additional/unnecessary parentheses