diff --git a/formulate/parser.py b/formulate/parser.py index dc92bb2..2c8a1d4 100644 --- a/formulate/parser.py +++ b/formulate/parser.py @@ -7,7 +7,7 @@ from collections import defaultdict import pyparsing -from pyparsing import Literal, Suppress, pyparsing_common, opAssoc, Word +from pyparsing import Literal, Suppress, pyparsing_common, opAssoc, Word, delimitedList from .expression import Expression, Variable, NamedConstant, UnnamedConstant, ExpressionComponent from .identifiers import order_of_operations @@ -268,7 +268,7 @@ class ParsingException(Exception): def create_parser(config, constants): EXPRESSION = pyparsing.Forward() - VARIABLE = Word(pyparsing.alphas+'_', pyparsing.alphanums+'_-') + VARIABLE = delimitedList(Word(pyparsing.alphas+'_', pyparsing.alphanums+'_-'), delim='.', combine=True) VARIABLE.setName('Variable') VARIABLE.setParseAction(add_logging(lambda string, location, result: Variable(result[0]))) diff --git a/formulate/version.py b/formulate/version.py index 2a4c4e5..6b0c618 100644 --- a/formulate/version.py +++ b/formulate/version.py @@ -11,6 +11,6 @@ ] -__version__ = '0.0.7' +__version__ = '0.0.8' version = __version__ version_info = __version__.split('.')