def expression(symbolAction, nextState):
    #expression ::=  | pathitem pathtail
    #pathitem ::= | "("  pathlist  ")" 
    #             | "["  propertylist  "]" 
    #             | "{"  formulacontent  "}" 
    #             | boolean
    #             | literal
    #             | numericliteral
    #             | quickvariable
    #             | symbol
    if not isinstance(nextState,tuple):
        nextState = (nextState,)
    nextState = nextState + ('pathtail',)
    return [
        #pathlist
        (r'\(', Punctuation, nextState + ('list',)),
        #properylist
        (r'\[', Punctuation, nextState + ('propertyList',)),
        #formulacontent
        (r'\{', Punctuation, nextState + ('root',)),
        #boolean
        (r'@false|@true', Keyword.Constant, nextState),
        #literal
        (r'("""[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*""")|("[^"\\]*(?:\\.[^"\\]*)*")', String, nextState + ('dtlang',)),
        #numericliteral ::= double|integer|rational
        (r'[-+]?[0-9]+(\.[0-9]+)?([eE][-+]?[0-9]+)', Number.Float, nextState),
        (r'[-+]?[0-9]+', Number.Integer, nextState),
        (r'[-+]?[0-9]+/[0-9]+', Number, nextState),
        #quickvariable
        (_quickvariable, Name.Variable, nextState),
        #symbol
        (_symbol, symbolAction, nextState),
    ]