Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'Unlexer' object has no attribute 'WHEN' #5

Closed
marcospassos opened this issue Jul 8, 2017 · 31 comments
Closed

AttributeError: 'Unlexer' object has no attribute 'WHEN' #5

marcospassos opened this issue Jul 8, 2017 · 31 comments

Comments

@marcospassos
Copy link

marcospassos commented Jul 8, 2017

We're facing the following error when generating our grammar:

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 47, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "/usr/local/lib/python3.6/site-packages/grammarinator/generate.py", line 21, in generate
    root = getattr(parser_cls(lexer_cls()), rule)()
  File "output/BaseCclUnparser.py", line 17, in domain
    current += self.lexer.WHEN()
AttributeError: 'TestUnlexer' object has no attribute 'WHEN'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/grammarinator-generate", line 11, in <module>
    sys.exit(execute())
  File "/usr/local/lib/python3.6/site-packages/grammarinator/generate.py", line 74, in execute
    pool.starmap(generate, [(lexer_cls, parser_cls, args.rule, transformers, args.out % i) for i in range(args.n)])
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 268, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 608, in get
    raise self._value
AttributeError: 'TestUnlexer' object has no attribute 'WHEN'

Parser:

parser grammar TestParser;

options {
    tokenVocab=TestLexer;
}

domain: WHEN ;

Lexer:

lexer grammar TestLexer;

WHEN: W H E N;

// Letters
A: [Aa];
B: [Bb];
C: [Cc];
D: [Dd];
E: [Ee];
F: [Ff];
G: [Gg];
H: [Hh];
I: [Ii];
J: [Jj];
K: [Kk];
L: [Ll];
M: [Mm];
N: [Nn];
O: [Oo];
P: [Pp];
Q: [Qq];
R: [Rr];
S: [Ss];
T: [Tt];
U: [Uu];
V: [Vv];
W: [Ww];
X: [Xx];
Y: [Yy];
Z: [Zz];
@renatahodovan
Copy link
Owner

@marcospassos Could you provide the way you've built the grammar and how the tests were generated? I've generated a fuzzer from the example you pasted and it seemed to work fine.

The commands I used:

grammarinator-process TestLexer.g TestParser.g -o test
grammarinator-generate -l test/TestUnlexer.py -p test/TestUnparser.py -r domain -n1

However, one thing is suspicious: your trace seems to use an unparser named BaseCclUnparser which is not the same as the example. So maybe something is missing from the repro grammar.

@marcospassos
Copy link
Author

marcospassos commented Jul 8, 2017

Ok, pretty weird. It looks like the error only happens if you execute the command out of the folder containing the grammars. Try it from the parent folder:

grammarinator-process grammar/TestLexer.g grammar/TestParser.g -o test

Now, I can generate it running the command inside the dir. However, now I'm getting another error:

grammarinator-generate -l test/TestUnlexer.py -p test/TestUnparser.py -r domain -n 100
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 47, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "/usr/local/lib/python3.6/site-packages/grammarinator/generate.py", line 21, in generate
    root = getattr(parser_cls(lexer_cls()), rule)()
  File "test/TestUnparser.py", line 22, in domain
    current += self.body()
  File "test/TestUnparser.py", line 32, in body
    current += self.eventExpressionList()
  File "test/TestUnparser.py", line 68, in eventExpressionList
    current += self.eventExpression()
  File "test/TestUnparser.py", line 89, in eventExpression
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 533, in simpleExpression
    current += self.postfixExpression()
  File "test/TestUnparser.py", line 565, in postfixExpression
    current += self.postfixUnaryExpression()
  File "test/TestUnparser.py", line 584, in postfixUnaryExpression
    current += self.postfixChain()
  File "test/TestUnparser.py", line 609, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 612, in postfixChain
    current += self.argumentList()
  File "test/TestUnparser.py", line 1926, in argumentList
    current += self.keywordArgument()
  File "test/TestUnparser.py", line 1937, in keywordArgument
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 262, in logicalAndExpression
    current += self.testExpression()
  File "test/TestUnparser.py", line 272, in testExpression
    current += self.testOperand()
  File "test/TestUnparser.py", line 267, in testOperand
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 290, in bitwiseOrExpression
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 290, in bitwiseOrExpression
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 290, in bitwiseOrExpression
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 288, in bitwiseOrExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 305, in bitwiseXorExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 324, in bitwiseAndExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 324, in bitwiseAndExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 322, in bitwiseAndExpression
    current += self.equalityExpression()
  File "test/TestUnparser.py", line 341, in equalityExpression
    current += self.relationalExpression()
  File "test/TestUnparser.py", line 364, in relationalExpression
    current += self.rangeExpression()
  File "test/TestUnparser.py", line 387, in rangeExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 413, in additiveExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 446, in multiplicativeExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 444, in multiplicativeExpression
    current += self.exponentialExpression()
  File "test/TestUnparser.py", line 465, in exponentialExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 995, in macroExpression
    current += self.miscMacro()
  File "test/TestUnparser.py", line 1122, in miscMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 989, in macroExpression
    current += self.dateMacro()
  File "test/TestUnparser.py", line 1018, in dateMacro
    current += self.operandNoDateModifier()
  File "test/TestUnparser.py", line 516, in operandNoDateModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 991, in macroExpression
    current += self.listMacro()
  File "test/TestUnparser.py", line 1073, in listMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1137, in stringMacro
    current += self.operandNoStringModifier()
  File "test/TestUnparser.py", line 506, in operandNoStringModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 991, in macroExpression
    current += self.listMacro()
  File "test/TestUnparser.py", line 1061, in listMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 991, in macroExpression
    current += self.listMacro()
  File "test/TestUnparser.py", line 1093, in listMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1132, in stringMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1154, in stringMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 533, in simpleExpression
    current += self.postfixExpression()
  File "test/TestUnparser.py", line 565, in postfixExpression
    current += self.postfixUnaryExpression()
  File "test/TestUnparser.py", line 584, in postfixUnaryExpression
    current += self.postfixChain()
  File "test/TestUnparser.py", line 609, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 604, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 612, in postfixChain
    current += self.argumentList()
  File "test/TestUnparser.py", line 1926, in argumentList
    current += self.keywordArgument()
  File "test/TestUnparser.py", line 1937, in keywordArgument
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 262, in logicalAndExpression
    current += self.testExpression()
  File "test/TestUnparser.py", line 272, in testExpression
    current += self.testOperand()
  File "test/TestUnparser.py", line 267, in testOperand
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 290, in bitwiseOrExpression
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 290, in bitwiseOrExpression
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 288, in bitwiseOrExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 305, in bitwiseXorExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 324, in bitwiseAndExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 324, in bitwiseAndExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 324, in bitwiseAndExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 322, in bitwiseAndExpression
    current += self.equalityExpression()
  File "test/TestUnparser.py", line 341, in equalityExpression
    current += self.relationalExpression()
  File "test/TestUnparser.py", line 364, in relationalExpression
    current += self.rangeExpression()
  File "test/TestUnparser.py", line 387, in rangeExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 415, in additiveExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 415, in additiveExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 413, in additiveExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 446, in multiplicativeExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 446, in multiplicativeExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 448, in multiplicativeExpression
    current += self.exponentialExpression()
  File "test/TestUnparser.py", line 465, in exponentialExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 478, in operandExpression
    current += self.modifier()
  File "test/TestUnparser.py", line 1299, in modifier
    current += self.collectionModifier()
  File "test/TestUnparser.py", line 1371, in collectionModifier
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1868, in closureBody
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1868, in closureBody
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1868, in closureBody
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 256, in logicalAndExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 262, in logicalAndExpression
    current += self.testExpression()
  File "test/TestUnparser.py", line 272, in testExpression
    current += self.testOperand()
  File "test/TestUnparser.py", line 267, in testOperand
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 290, in bitwiseOrExpression
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 288, in bitwiseOrExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 307, in bitwiseXorExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 307, in bitwiseXorExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 305, in bitwiseXorExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 322, in bitwiseAndExpression
    current += self.equalityExpression()
  File "test/TestUnparser.py", line 341, in equalityExpression
    current += self.relationalExpression()
  File "test/TestUnparser.py", line 364, in relationalExpression
    current += self.rangeExpression()
  File "test/TestUnparser.py", line 387, in rangeExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 415, in additiveExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 415, in additiveExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 415, in additiveExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 413, in additiveExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 444, in multiplicativeExpression
    current += self.exponentialExpression()
  File "test/TestUnparser.py", line 465, in exponentialExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 478, in operandExpression
    current += self.modifier()
  File "test/TestUnparser.py", line 1303, in modifier
    current += self.stringModifier()
  File "test/TestUnparser.py", line 1425, in stringModifier
    current += self.operandNoStringModifier()
  File "test/TestUnparser.py", line 506, in operandNoStringModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1154, in stringMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 995, in macroExpression
    current += self.miscMacro()
  File "test/TestUnparser.py", line 1122, in miscMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 533, in simpleExpression
    current += self.postfixExpression()
  File "test/TestUnparser.py", line 565, in postfixExpression
    current += self.postfixUnaryExpression()
  File "test/TestUnparser.py", line 584, in postfixUnaryExpression
    current += self.postfixChain()
  File "test/TestUnparser.py", line 604, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 604, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 600, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 609, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 609, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 616, in postfixChain
    current += self.primaryExpression()
  File "test/TestUnparser.py", line 661, in primaryExpression
    current += self.arrayExpression()
  File "test/TestUnparser.py", line 1806, in arrayExpression
    current += self.arrayElementList()
  File "test/TestUnparser.py", line 1813, in arrayElementList
    current += self.arrayElement()
  File "test/TestUnparser.py", line 1828, in arrayElement
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1868, in closureBody
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 234, in logicalOrExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 260, in logicalAndExpression
    current += self.quantifierExpression()
  File "test/TestUnparser.py", line 1498, in quantifierExpression
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 234, in logicalOrExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 234, in logicalOrExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 234, in logicalOrExpression
    current += self.logicalOrExpression()
  [Previous line repeated 2 more times]
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 260, in logicalAndExpression
    current += self.quantifierExpression()
  File "test/TestUnparser.py", line 1493, in quantifierExpression
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1159, in stringMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1145, in stringMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 499, in contextualOperandExpression
    current += self.contextualModifier()
  File "test/TestUnparser.py", line 975, in contextualModifier
    current += self.collectionModifier()
  File "test/TestUnparser.py", line 1371, in collectionModifier
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1868, in closureBody
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1870, in closureBody
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 234, in logicalOrExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 234, in logicalOrExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 262, in logicalAndExpression
    current += self.testExpression()
  File "test/TestUnparser.py", line 272, in testExpression
    current += self.testOperand()
  File "test/TestUnparser.py", line 267, in testOperand
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 288, in bitwiseOrExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 307, in bitwiseXorExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 305, in bitwiseXorExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 324, in bitwiseAndExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 322, in bitwiseAndExpression
    current += self.equalityExpression()
  File "test/TestUnparser.py", line 341, in equalityExpression
    current += self.relationalExpression()
  File "test/TestUnparser.py", line 364, in relationalExpression
    current += self.rangeExpression()
  File "test/TestUnparser.py", line 387, in rangeExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 415, in additiveExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 413, in additiveExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 444, in multiplicativeExpression
    current += self.exponentialExpression()
  File "test/TestUnparser.py", line 465, in exponentialExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 989, in macroExpression
    current += self.dateMacro()
  File "test/TestUnparser.py", line 1037, in dateMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 478, in operandExpression
    current += self.modifier()
  File "test/TestUnparser.py", line 1303, in modifier
    current += self.stringModifier()
  File "test/TestUnparser.py", line 1425, in stringModifier
    current += self.operandNoStringModifier()
  File "test/TestUnparser.py", line 506, in operandNoStringModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1137, in stringMacro
    current += self.operandNoStringModifier()
  File "test/TestUnparser.py", line 506, in operandNoStringModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 533, in simpleExpression
    current += self.postfixExpression()
  File "test/TestUnparser.py", line 565, in postfixExpression
    current += self.postfixUnaryExpression()
  File "test/TestUnparser.py", line 584, in postfixUnaryExpression
    current += self.postfixChain()
  File "test/TestUnparser.py", line 604, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 609, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 600, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 604, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 616, in postfixChain
    current += self.primaryExpression()
  File "test/TestUnparser.py", line 661, in primaryExpression
    current += self.arrayExpression()
  File "test/TestUnparser.py", line 1806, in arrayExpression
    current += self.arrayElementList()
  File "test/TestUnparser.py", line 1813, in arrayElementList
    current += self.arrayElement()
  File "test/TestUnparser.py", line 1830, in arrayElement
    current += self.spreadExpression()
  File "test/TestUnparser.py", line 1953, in spreadExpression
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 234, in logicalOrExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 234, in logicalOrExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 256, in logicalAndExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 260, in logicalAndExpression
    current += self.quantifierExpression()
  File "test/TestUnparser.py", line 1519, in quantifierExpression
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 260, in logicalAndExpression
    current += self.quantifierExpression()
  File "test/TestUnparser.py", line 1519, in quantifierExpression
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1870, in closureBody
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1870, in closureBody
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 256, in logicalAndExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 262, in logicalAndExpression
    current += self.testExpression()
  File "test/TestUnparser.py", line 272, in testExpression
    current += self.testOperand()
  File "test/TestUnparser.py", line 267, in testOperand
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 290, in bitwiseOrExpression
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 290, in bitwiseOrExpression
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 290, in bitwiseOrExpression
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 288, in bitwiseOrExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 307, in bitwiseXorExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 307, in bitwiseXorExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 307, in bitwiseXorExpression
    current += self.bitwiseXorExpression()
  [Previous line repeated 2 more times]
  File "test/TestUnparser.py", line 305, in bitwiseXorExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 324, in bitwiseAndExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 324, in bitwiseAndExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 322, in bitwiseAndExpression
    current += self.equalityExpression()
  File "test/TestUnparser.py", line 341, in equalityExpression
    current += self.relationalExpression()
  File "test/TestUnparser.py", line 364, in relationalExpression
    current += self.rangeExpression()
  File "test/TestUnparser.py", line 387, in rangeExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 413, in additiveExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 446, in multiplicativeExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 446, in multiplicativeExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 446, in multiplicativeExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 444, in multiplicativeExpression
    current += self.exponentialExpression()
  File "test/TestUnparser.py", line 465, in exponentialExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 991, in macroExpression
    current += self.listMacro()
  File "test/TestUnparser.py", line 1061, in listMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 995, in macroExpression
    current += self.miscMacro()
  File "test/TestUnparser.py", line 1122, in miscMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 991, in macroExpression
    current += self.listMacro()
  File "test/TestUnparser.py", line 1069, in listMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  [Previous line repeated 1 more times]
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 995, in macroExpression
    current += self.miscMacro()
  File "test/TestUnparser.py", line 1122, in miscMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 478, in operandExpression
    current += self.modifier()
  File "test/TestUnparser.py", line 1297, in modifier
    current += self.dateModifier()
  File "test/TestUnparser.py", line 1328, in dateModifier
    current += self.operandNoDateModifier()
  File "test/TestUnparser.py", line 516, in operandNoDateModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 499, in contextualOperandExpression
    current += self.contextualModifier()
  File "test/TestUnparser.py", line 977, in contextualModifier
    current += self.dateModifier()
  File "test/TestUnparser.py", line 1328, in dateModifier
    current += self.operandNoDateModifier()
  File "test/TestUnparser.py", line 516, in operandNoDateModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 991, in macroExpression
    current += self.listMacro()
  File "test/TestUnparser.py", line 1077, in listMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1132, in stringMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 478, in operandExpression
    current += self.modifier()
  File "test/TestUnparser.py", line 1299, in modifier
    current += self.collectionModifier()
  File "test/TestUnparser.py", line 1371, in collectionModifier
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 234, in logicalOrExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 256, in logicalAndExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 256, in logicalAndExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 256, in logicalAndExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 262, in logicalAndExpression
    current += self.testExpression()
  File "test/TestUnparser.py", line 272, in testExpression
    current += self.testOperand()
  File "test/TestUnparser.py", line 267, in testOperand
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 290, in bitwiseOrExpression
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 288, in bitwiseOrExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 305, in bitwiseXorExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 324, in bitwiseAndExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 322, in bitwiseAndExpression
    current += self.equalityExpression()
  File "test/TestUnparser.py", line 341, in equalityExpression
    current += self.relationalExpression()
  File "test/TestUnparser.py", line 364, in relationalExpression
    current += self.rangeExpression()
  File "test/TestUnparser.py", line 390, in rangeExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 413, in additiveExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 444, in multiplicativeExpression
    current += self.exponentialExpression()
  File "test/TestUnparser.py", line 465, in exponentialExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 989, in macroExpression
    current += self.dateMacro()
  File "test/TestUnparser.py", line 1039, in dateMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 499, in contextualOperandExpression
    current += self.contextualModifier()
  File "test/TestUnparser.py", line 973, in contextualModifier
    current += self.stringModifier()
  File "test/TestUnparser.py", line 1415, in stringModifier
    current += self.operandNoStringModifier()
  File "test/TestUnparser.py", line 506, in operandNoStringModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1154, in stringMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 533, in simpleExpression
    current += self.postfixExpression()
  File "test/TestUnparser.py", line 565, in postfixExpression
    current += self.postfixUnaryExpression()
  File "test/TestUnparser.py", line 584, in postfixUnaryExpression
    current += self.postfixChain()
  File "test/TestUnparser.py", line 604, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 609, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 609, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 600, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 600, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 609, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 612, in postfixChain
    current += self.argumentList()
  File "test/TestUnparser.py", line 1916, in argumentList
    current += self.expressionArgument()
  File "test/TestUnparser.py", line 1947, in expressionArgument
    current += self.spreadExpression()
  File "test/TestUnparser.py", line 1953, in spreadExpression
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 260, in logicalAndExpression
    current += self.quantifierExpression()
  File "test/TestUnparser.py", line 1498, in quantifierExpression
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1870, in closureBody
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 262, in logicalAndExpression
    current += self.testExpression()
  File "test/TestUnparser.py", line 272, in testExpression
    current += self.testOperand()
  File "test/TestUnparser.py", line 267, in testOperand
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 290, in bitwiseOrExpression
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 290, in bitwiseOrExpression
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 288, in bitwiseOrExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 305, in bitwiseXorExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 324, in bitwiseAndExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 324, in bitwiseAndExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 324, in bitwiseAndExpression
    current += self.bitwiseAndExpression()
  [Previous line repeated 2 more times]
  File "test/TestUnparser.py", line 322, in bitwiseAndExpression
    current += self.equalityExpression()
  File "test/TestUnparser.py", line 341, in equalityExpression
    current += self.relationalExpression()
  File "test/TestUnparser.py", line 364, in relationalExpression
    current += self.rangeExpression()
  File "test/TestUnparser.py", line 387, in rangeExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 413, in additiveExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 446, in multiplicativeExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 446, in multiplicativeExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 446, in multiplicativeExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 444, in multiplicativeExpression
    current += self.exponentialExpression()
  File "test/TestUnparser.py", line 465, in exponentialExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 991, in macroExpression
    current += self.listMacro()
  File "test/TestUnparser.py", line 1069, in listMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 995, in macroExpression
    current += self.miscMacro()
  File "test/TestUnparser.py", line 1122, in miscMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1132, in stringMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 533, in simpleExpression
    current += self.postfixExpression()
  File "test/TestUnparser.py", line 565, in postfixExpression
    current += self.postfixUnaryExpression()
  File "test/TestUnparser.py", line 584, in postfixUnaryExpression
    current += self.postfixChain()
  File "test/TestUnparser.py", line 609, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 616, in postfixChain
    current += self.primaryExpression()
  File "test/TestUnparser.py", line 659, in primaryExpression
    current += self.parenthesizedExpression()
  File "test/TestUnparser.py", line 671, in parenthesizedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1868, in closureBody
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 256, in logicalAndExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 262, in logicalAndExpression
    current += self.testExpression()
  File "test/TestUnparser.py", line 272, in testExpression
    current += self.testOperand()
  File "test/TestUnparser.py", line 267, in testOperand
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 288, in bitwiseOrExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 305, in bitwiseXorExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 324, in bitwiseAndExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 322, in bitwiseAndExpression
    current += self.equalityExpression()
  File "test/TestUnparser.py", line 341, in equalityExpression
    current += self.relationalExpression()
  File "test/TestUnparser.py", line 364, in relationalExpression
    current += self.rangeExpression()
  File "test/TestUnparser.py", line 387, in rangeExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 413, in additiveExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 446, in multiplicativeExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 446, in multiplicativeExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 444, in multiplicativeExpression
    current += self.exponentialExpression()
  File "test/TestUnparser.py", line 465, in exponentialExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 478, in operandExpression
    current += self.modifier()
  File "test/TestUnparser.py", line 1299, in modifier
    current += self.collectionModifier()
  File "test/TestUnparser.py", line 1371, in collectionModifier
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1868, in closureBody
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1870, in closureBody
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1870, in closureBody
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 260, in logicalAndExpression
    current += self.quantifierExpression()
  File "test/TestUnparser.py", line 1519, in quantifierExpression
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 234, in logicalOrExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 256, in logicalAndExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 256, in logicalAndExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 262, in logicalAndExpression
    current += self.testExpression()
  File "test/TestUnparser.py", line 272, in testExpression
    current += self.testOperand()
  File "test/TestUnparser.py", line 267, in testOperand
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 288, in bitwiseOrExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 307, in bitwiseXorExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 305, in bitwiseXorExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 322, in bitwiseAndExpression
    current += self.equalityExpression()
  File "test/TestUnparser.py", line 341, in equalityExpression
    current += self.relationalExpression()
  File "test/TestUnparser.py", line 364, in relationalExpression
    current += self.rangeExpression()
  File "test/TestUnparser.py", line 387, in rangeExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 413, in additiveExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 446, in multiplicativeExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 446, in multiplicativeExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 446, in multiplicativeExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 444, in multiplicativeExpression
    current += self.exponentialExpression()
  File "test/TestUnparser.py", line 465, in exponentialExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 995, in macroExpression
    current += self.miscMacro()
  File "test/TestUnparser.py", line 1122, in miscMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 478, in operandExpression
    current += self.modifier()
  File "test/TestUnparser.py", line 1303, in modifier
    current += self.stringModifier()
  File "test/TestUnparser.py", line 1415, in stringModifier
    current += self.operandNoStringModifier()
  File "test/TestUnparser.py", line 506, in operandNoStringModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 991, in macroExpression
    current += self.listMacro()
  File "test/TestUnparser.py", line 1093, in listMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1145, in stringMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 499, in contextualOperandExpression
    current += self.contextualModifier()
  File "test/TestUnparser.py", line 979, in contextualModifier
    current += self.numberModifier()
  File "test/TestUnparser.py", line 1384, in numberModifier
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  [Previous line repeated 1 more times]
  File "test/TestUnparser.py", line 499, in contextualOperandExpression
    current += self.contextualModifier()
  File "test/TestUnparser.py", line 979, in contextualModifier
    current += self.numberModifier()
  File "test/TestUnparser.py", line 1384, in numberModifier
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 989, in macroExpression
    current += self.dateMacro()
  File "test/TestUnparser.py", line 1006, in dateMacro
    current += self.operandNoDateModifier()
  File "test/TestUnparser.py", line 516, in operandNoDateModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 533, in simpleExpression
    current += self.postfixExpression()
  File "test/TestUnparser.py", line 565, in postfixExpression
    current += self.postfixUnaryExpression()
  File "test/TestUnparser.py", line 584, in postfixUnaryExpression
    current += self.postfixChain()
  File "test/TestUnparser.py", line 609, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 606, in postfixChain
    current += self.selector()
  File "test/TestUnparser.py", line 631, in selector
    current += self.prefixedSelector()
  File "test/TestUnparser.py", line 648, in prefixedSelector
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 234, in logicalOrExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 234, in logicalOrExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 234, in logicalOrExpression
    current += self.logicalOrExpression()
  [Previous line repeated 3 more times]
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 256, in logicalAndExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 256, in logicalAndExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 260, in logicalAndExpression
    current += self.quantifierExpression()
  File "test/TestUnparser.py", line 1519, in quantifierExpression
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1868, in closureBody
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 262, in logicalAndExpression
    current += self.testExpression()
  File "test/TestUnparser.py", line 272, in testExpression
    current += self.testOperand()
  File "test/TestUnparser.py", line 267, in testOperand
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 290, in bitwiseOrExpression
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 288, in bitwiseOrExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 305, in bitwiseXorExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 322, in bitwiseAndExpression
    current += self.equalityExpression()
  File "test/TestUnparser.py", line 341, in equalityExpression
    current += self.relationalExpression()
  File "test/TestUnparser.py", line 364, in relationalExpression
    current += self.rangeExpression()
  File "test/TestUnparser.py", line 387, in rangeExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 415, in additiveExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 415, in additiveExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 415, in additiveExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 413, in additiveExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 448, in multiplicativeExpression
    current += self.exponentialExpression()
  File "test/TestUnparser.py", line 465, in exponentialExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 991, in macroExpression
    current += self.listMacro()
  File "test/TestUnparser.py", line 1077, in listMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 989, in macroExpression
    current += self.dateMacro()
  File "test/TestUnparser.py", line 1006, in dateMacro
    current += self.operandNoDateModifier()
  File "test/TestUnparser.py", line 516, in operandNoDateModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 991, in macroExpression
    current += self.listMacro()
  File "test/TestUnparser.py", line 1061, in listMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 533, in simpleExpression
    current += self.postfixExpression()
  File "test/TestUnparser.py", line 565, in postfixExpression
    current += self.postfixUnaryExpression()
  File "test/TestUnparser.py", line 584, in postfixUnaryExpression
    current += self.postfixChain()
  File "test/TestUnparser.py", line 604, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 604, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 616, in postfixChain
    current += self.primaryExpression()
  File "test/TestUnparser.py", line 659, in primaryExpression
    current += self.parenthesizedExpression()
  File "test/TestUnparser.py", line 671, in parenthesizedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 260, in logicalAndExpression
    current += self.quantifierExpression()
  File "test/TestUnparser.py", line 1498, in quantifierExpression
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1868, in closureBody
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 256, in logicalAndExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 256, in logicalAndExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 256, in logicalAndExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 262, in logicalAndExpression
    current += self.testExpression()
  File "test/TestUnparser.py", line 272, in testExpression
    current += self.testOperand()
  File "test/TestUnparser.py", line 267, in testOperand
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 288, in bitwiseOrExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 305, in bitwiseXorExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 322, in bitwiseAndExpression
    current += self.equalityExpression()
  File "test/TestUnparser.py", line 341, in equalityExpression
    current += self.relationalExpression()
  File "test/TestUnparser.py", line 364, in relationalExpression
    current += self.rangeExpression()
  File "test/TestUnparser.py", line 387, in rangeExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 413, in additiveExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 444, in multiplicativeExpression
    current += self.exponentialExpression()
  File "test/TestUnparser.py", line 465, in exponentialExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 995, in macroExpression
    current += self.miscMacro()
  File "test/TestUnparser.py", line 1118, in miscMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 478, in operandExpression
    current += self.modifier()
  File "test/TestUnparser.py", line 1303, in modifier
    current += self.stringModifier()
  File "test/TestUnparser.py", line 1425, in stringModifier
    current += self.operandNoStringModifier()
  File "test/TestUnparser.py", line 506, in operandNoStringModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 995, in macroExpression
    current += self.miscMacro()
  File "test/TestUnparser.py", line 1122, in miscMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 995, in macroExpression
    current += self.miscMacro()
  File "test/TestUnparser.py", line 1118, in miscMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 995, in macroExpression
    current += self.miscMacro()
  File "test/TestUnparser.py", line 1122, in miscMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 991, in macroExpression
    current += self.listMacro()
  File "test/TestUnparser.py", line 1065, in listMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 533, in simpleExpression
    current += self.postfixExpression()
  File "test/TestUnparser.py", line 565, in postfixExpression
    current += self.postfixUnaryExpression()
  File "test/TestUnparser.py", line 584, in postfixUnaryExpression
    current += self.postfixChain()
  File "test/TestUnparser.py", line 606, in postfixChain
    current += self.selector()
  File "test/TestUnparser.py", line 631, in selector
    current += self.prefixedSelector()
  File "test/TestUnparser.py", line 648, in prefixedSelector
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 260, in logicalAndExpression
    current += self.quantifierExpression()
  File "test/TestUnparser.py", line 1519, in quantifierExpression
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1868, in closureBody
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1870, in closureBody
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 260, in logicalAndExpression
    current += self.quantifierExpression()
  File "test/TestUnparser.py", line 1509, in quantifierExpression
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 533, in simpleExpression
    current += self.postfixExpression()
  File "test/TestUnparser.py", line 565, in postfixExpression
    current += self.postfixUnaryExpression()
  File "test/TestUnparser.py", line 584, in postfixUnaryExpression
    current += self.postfixChain()
  File "test/TestUnparser.py", line 616, in postfixChain
    current += self.primaryExpression()
  File "test/TestUnparser.py", line 659, in primaryExpression
    current += self.parenthesizedExpression()
  File "test/TestUnparser.py", line 671, in parenthesizedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 190, in expression
    current += self.closureExpression()
  File "test/TestUnparser.py", line 1860, in closureExpression
    current += self.closureBody()
  File "test/TestUnparser.py", line 1870, in closureBody
    current += self.enclosedExpression()
  File "test/TestUnparser.py", line 678, in enclosedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 234, in logicalOrExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 262, in logicalAndExpression
    current += self.testExpression()
  File "test/TestUnparser.py", line 272, in testExpression
    current += self.testOperand()
  File "test/TestUnparser.py", line 267, in testOperand
    current += self.bitwiseOrExpression()
  File "test/TestUnparser.py", line 288, in bitwiseOrExpression
    current += self.bitwiseXorExpression()
  File "test/TestUnparser.py", line 305, in bitwiseXorExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 324, in bitwiseAndExpression
    current += self.bitwiseAndExpression()
  File "test/TestUnparser.py", line 322, in bitwiseAndExpression
    current += self.equalityExpression()
  File "test/TestUnparser.py", line 341, in equalityExpression
    current += self.relationalExpression()
  File "test/TestUnparser.py", line 364, in relationalExpression
    current += self.rangeExpression()
  File "test/TestUnparser.py", line 387, in rangeExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 415, in additiveExpression
    current += self.additiveExpression()
  File "test/TestUnparser.py", line 413, in additiveExpression
    current += self.multiplicativeExpression()
  File "test/TestUnparser.py", line 444, in multiplicativeExpression
    current += self.exponentialExpression()
  File "test/TestUnparser.py", line 468, in exponentialExpression
    current += self.exponentialExpression()
  File "test/TestUnparser.py", line 468, in exponentialExpression
    current += self.exponentialExpression()
  File "test/TestUnparser.py", line 465, in exponentialExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 478, in operandExpression
    current += self.modifier()
  File "test/TestUnparser.py", line 1303, in modifier
    current += self.stringModifier()
  File "test/TestUnparser.py", line 1403, in stringModifier
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1159, in stringMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 991, in macroExpression
    current += self.listMacro()
  File "test/TestUnparser.py", line 1069, in listMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1154, in stringMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 991, in macroExpression
    current += self.listMacro()
  File "test/TestUnparser.py", line 1077, in listMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 995, in macroExpression
    current += self.miscMacro()
  File "test/TestUnparser.py", line 1118, in miscMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 989, in macroExpression
    current += self.dateMacro()
  File "test/TestUnparser.py", line 1018, in dateMacro
    current += self.operandNoDateModifier()
  File "test/TestUnparser.py", line 516, in operandNoDateModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 499, in contextualOperandExpression
    current += self.contextualModifier()
  File "test/TestUnparser.py", line 973, in contextualModifier
    current += self.stringModifier()
  File "test/TestUnparser.py", line 1403, in stringModifier
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 478, in operandExpression
    current += self.modifier()
  File "test/TestUnparser.py", line 1303, in modifier
    current += self.stringModifier()
  File "test/TestUnparser.py", line 1415, in stringModifier
    current += self.operandNoStringModifier()
  File "test/TestUnparser.py", line 506, in operandNoStringModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 989, in macroExpression
    current += self.dateMacro()
  File "test/TestUnparser.py", line 1037, in dateMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1161, in stringMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 533, in simpleExpression
    current += self.postfixExpression()
  File "test/TestUnparser.py", line 565, in postfixExpression
    current += self.postfixUnaryExpression()
  File "test/TestUnparser.py", line 584, in postfixUnaryExpression
    current += self.postfixChain()
  File "test/TestUnparser.py", line 604, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 604, in postfixChain
    current += self.postfixChain()
  File "test/TestUnparser.py", line 616, in postfixChain
    current += self.primaryExpression()
  File "test/TestUnparser.py", line 659, in primaryExpression
    current += self.parenthesizedExpression()
  File "test/TestUnparser.py", line 671, in parenthesizedExpression
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 234, in logicalOrExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 260, in logicalAndExpression
    current += self.quantifierExpression()
  File "test/TestUnparser.py", line 1501, in quantifierExpression
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 995, in macroExpression
    current += self.miscMacro()
  File "test/TestUnparser.py", line 1122, in miscMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1154, in stringMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 533, in simpleExpression
    current += self.postfixExpression()
  File "test/TestUnparser.py", line 565, in postfixExpression
    current += self.postfixUnaryExpression()
  File "test/TestUnparser.py", line 584, in postfixUnaryExpression
    current += self.postfixChain()
  File "test/TestUnparser.py", line 606, in postfixChain
    current += self.selector()
  File "test/TestUnparser.py", line 624, in selector
    current += self.expression()
  File "test/TestUnparser.py", line 188, in expression
    current += self.postfixIfExpression()
  File "test/TestUnparser.py", line 195, in postfixIfExpression
    current += self.shorthandIfExpression()
  File "test/TestUnparser.py", line 208, in shorthandIfExpression
    current += self.logicalOrExpression()
  File "test/TestUnparser.py", line 238, in logicalOrExpression
    current += self.logicalAndExpression()
  File "test/TestUnparser.py", line 260, in logicalAndExpression
    current += self.quantifierExpression()
  File "test/TestUnparser.py", line 1501, in quantifierExpression
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 991, in macroExpression
    current += self.listMacro()
  File "test/TestUnparser.py", line 1073, in listMacro
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 498, in contextualOperandExpression
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 993, in macroExpression
    current += self.stringMacro()
  File "test/TestUnparser.py", line 1154, in stringMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 478, in operandExpression
    current += self.modifier()
  File "test/TestUnparser.py", line 1301, in modifier
    current += self.numberModifier()
  File "test/TestUnparser.py", line 1384, in numberModifier
    current += self.operandNoNumberModifier()
  File "test/TestUnparser.py", line 521, in operandNoNumberModifier
    current += self.contextualOperandExpression()
  File "test/TestUnparser.py", line 501, in contextualOperandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 488, in modifierOperand
    current += self.macroExpression()
  File "test/TestUnparser.py", line 995, in macroExpression
    current += self.miscMacro()
  File "test/TestUnparser.py", line 1118, in miscMacro
    current += self.operandExpression()
  File "test/TestUnparser.py", line 477, in operandExpression
    current += self.operandExpression()
  File "test/TestUnparser.py", line 480, in operandExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 539, in prefixUnaryExpression
    current += self.modifierOperand()
  File "test/TestUnparser.py", line 490, in modifierOperand
    current += self.simpleExpression()
  File "test/TestUnparser.py", line 529, in simpleExpression
    current += self.prefixUnaryExpression()
  File "test/TestUnparser.py", line 538, in prefixUnaryExpression
    current += self.prefixUnaryOperator()
  File "test/TestUnparser.py", line 551, in prefixUnaryOperator
    current += self.lexer.PLUS_SIGN()
  File "test/TestUnlexer.py", line 2202, in PLUS_SIGN
    current = self.create_node(UnlexerRule(name='PLUS_SIGN'))
  File "/usr/local/lib/python3.6/site-packages/grammarinator/runtime/tree.py", line 86, in __init__
    super(UnlexerRule, self).__init__(name=name)
RecursionError: maximum recursion depth exceeded while calling a Python object
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/grammarinator-generate", line 11, in <module>
    sys.exit(execute())
  File "/usr/local/lib/python3.6/site-packages/grammarinator/generate.py", line 74, in execute
    pool.starmap(generate, [(lexer_cls, parser_cls, args.rule, transformers, args.out % i) for i in range(args.n)])
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 268, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 608, in get
    raise self._value
RecursionError: maximum recursion depth exceeded while calling a Python object

@renatahodovan
Copy link
Owner

@marcospassos This is because your grammar is recursive and there is no recursion limit set. You can define it with the -d command line flag. Probably this should also be more emphasised in the documentation.

@marcospassos
Copy link
Author

marcospassos commented Jul 8, 2017

But it's not even documented in the command line signature. What does this flag do exactly?

grammarinator-generate [-h] -p FILE -l FILE -r NAME
                              [-t LIST [LIST ...]] [-j NUM] [-o FILE] [-n NUM]
                              [-v]

About the problem related to the working dir, is it the expected behavior?

@marcospassos
Copy link
Author

marcospassos commented Jul 8, 2017

Looks like this flag does not exist in the version that I'm using:

rammarinator-generate -l test/TestUnlexer.py -p test/TestUnparser.py -r domain -n 100 -d 10
usage: grammarinator-generate [-h] -p FILE -l FILE -r NAME
                              [-t LIST [LIST ...]] [-j NUM] [-o FILE] [-n NUM]
                              [-v]
grammarinator-generate: error: unrecognized arguments: -d 10

@marcospassos
Copy link
Author

Ok, I found it on master (the version installed using pip is not in sync).

@renatahodovan
Copy link
Owner

@marcospassos Seems that we are using different versions. The support for recursion limit was added in 85ca911. The grammarinator-generate --version should show grammarinator-generate 17.5r.
The -d argument appears in the help message of grammariantor-generate:
-d NUM, --max-depth NUM maximum recursion depth during generation (default: inf).
My guess is that something was messed up around versions when you installed grammarinator from pip and then reinstalled from source.

@renatahodovan
Copy link
Owner

@marcospassos Yes, pip is only updated when a new version is released. Between two releases the new features are only available in the master.

@marcospassos
Copy link
Author

marcospassos commented Jul 8, 2017

I'm having a bad time trying to make it work with our grammar. I've reinstalled everything from scratch, but the latest version (master) throws new errors now:

grammarinator-process TestLexer.g4 TestParser.g4 -o test                                    
Traceback (most recent call last):
  File "/usr/local/bin/grammarinator-process", line 11, in <module>
    load_entry_point('grammarinator==17.5.post0', 'console_scripts', 'grammarinator-process')()
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 618, in execute
    FuzzerFactory(args.out, args.antlr).generate_fuzzer(args.grammars, actions=args.actions, pep8=args.pep8)
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 553, in generate_fuzzer
    for name, src in fuzzer_generator.generate(lexer_root, parser_root):
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 247, in generate
    lexer_ids, parser_ids = self.generate_grammar(root)
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 346, in generate_grammar
    self.parser_body += self.generate_single(rule, None, parser_ids)
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 367, in generate_single
    rule_code += self.generate_single(rule_block, rule_name, new_alt_ids)
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 504, in generate_single
    return ''.join([self.generate_single(child, parent_id, new_alt_ids) for child in node.children])
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 504, in <listcomp>
    return ''.join([self.generate_single(child, parent_id, new_alt_ids) for child in node.children])
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 382, in generate_single
    return self.generate_single(children[0], parent_id, new_alt_ids)
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 504, in generate_single
    return ''.join([self.generate_single(child, parent_id, new_alt_ids) for child in node.children])
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 504, in <listcomp>
    return ''.join([self.generate_single(child, parent_id, new_alt_ids) for child in node.children])
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 414, in generate_single
    return ''.join([self.generate_single(child, parent_id, new_alt_ids) for child in children])
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 414, in <listcomp>
    return ''.join([self.generate_single(child, parent_id, new_alt_ids) for child in children])
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 434, in generate_single
    return self.generate_single(node.children[0], parent_id, new_alt_ids)
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 490, in generate_single
    return ''.join([self.generate_single(child, parent_id, new_alt_ids) for child in node.children])
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 490, in <listcomp>
    return ''.join([self.generate_single(child, parent_id, new_alt_ids) for child in node.children])
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 494, in generate_single
    self.graph.add_edge(frm=parent_id, to=str(node.TOKEN_REF()))
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 64, in add_edge
    assert to in self.vertices, '{to} not in vertices.'.format(to=to)
AssertionError: EOF not in vertices.

@marcospassos
Copy link
Author

The same errors do not occur in the version installed using pip.

@renatahodovan
Copy link
Owner

@marcospassos This is a bug indeed. Thanks! I will fix it. The problem is that EOF is a builtin ANTLR token that should have been handled specially when calculating the distances.

@marcospassos
Copy link
Author

marcospassos commented Jul 8, 2017

@renatahodovan thanks! Looking forward try a version that works with our grammar!

About the problem related to the working dir, is it the expected behavior?

As a side note, it's important to allow generating tests on CI servers.

@renatahodovan
Copy link
Owner

@marcospassos If I'm right, then 2554246 has fixed the EOF issue and your example should work after updating to the latest master.

@marcospassos
Copy link
Author

Not yet =(

Traceback (most recent call last):
  File "/usr/local/bin/grammarinator-process", line 11, in <module>
    load_entry_point('grammarinator==17.5.post0', 'console_scripts', 'grammarinator-process')()
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 619, in execute
    FuzzerFactory(args.out, args.antlr).generate_fuzzer(args.grammars, actions=args.actions, pep8=args.pep8)
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 554, in generate_fuzzer
    for name, src in fuzzer_generator.generate(lexer_root, parser_root):
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 251, in generate
    self.generate_depths(all_lexer_ids, all_parser_ids)
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 510, in generate_depths
    min_depths = self.graph.calc_min_depths()
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/process.py", line 86, in calc_min_depths
    assert all(min_depths[node.id] < float('inf') for node in self.vertices[ident].out_neighbours), '{ident} has an alternative that isn\'t reachable.'.format(ident=ident)
AssertionError: alt_15 has an alternative that isn't reachable.

@renatahodovan
Copy link
Owner

@marcospassos The other question about the working dir. I tried to run the example from different directories, but could not reproduce it. So could you rephrase it please, 'cos I'm not sure I understand the problem.

@renatahodovan
Copy link
Owner

Hm... The assertion is weird. Could you give a repro about the failing grammar?

@marcospassos
Copy link
Author

marcospassos commented Jul 8, 2017

I'm afraid not. The message is very unclear about the reason it's failing (the grammar has 1000+ lines). On the other hand, I can't publish the grammar because it's a proprietary language. Is there anything else I can do to help you?

@renatahodovan
Copy link
Owner

The assert means that the grammar has an alternation with an alternative that has an infinite depth. This could be because of an undefined rule reference or an infinite recursion, for example. One thing you can try is to put a print into the process.py:357 printing the value of the rule_name variable. This way you will know which rule has the problematic alternation and maybe can you create a short repro case without publishing the whole proprietary grammar.

@marcospassos
Copy link
Author

marcospassos commented Jul 8, 2017

Hm... it does not make sense. The last rule it prints is IDENTIFIER, that consists only of a list of keywords that are also identifiers:

identifier
    : IDENTIFIER_NAME
    | A | B | C | D | E | F | G | H | I | J | K | L | M
    | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
    ...
;

I can't reach any conclusion about that. This grammar works pretty well in Java, so I don't think it is a problem in the grammar definition (any invalid reference would not compile). Besides this, this issue does not occur in the version available through pip. Is it possible to track the changes since that version?

@renatahodovan
Copy link
Owner

The issue is related to the recursion limit feature which is not part of the pip version, this is why that version works.
I didn't try to refer that the grammar is wrong, just trying to figure out what's going on.
Just to make sure, the printed IDENTIFIER is the same as the lower-case identifier in the pasted rule?

@marcospassos
Copy link
Author

My fault, it is in lower case:

image

@renatahodovan
Copy link
Owner

Alright. The issue means, that the minimum distance from the 16. alternative of the identifier rule is infinite. From the example above it's probably a token reference to a letter definition. My last guess is that this definition is lost somewhere in the import chain. So it would be useful if you could describe how the letters are available from the grammar containing the identifier rule (I mean whether it's immediately in the lexer or it's imported somehow)?

@renatahodovan
Copy link
Owner

Okay, I've may found a reproduction case. I try to come up with a solution and will see if that solves your issue too.

@marcospassos
Copy link
Author

@renatahodovan I don't think the problem is in the identifier rule because I just removed all other rules, leaving only identifier, and it worked. I've also double checked all alternatives in identifier and all refs exist.

@marcospassos
Copy link
Author

Okay, I've may found a reproduction case. I try to come up with a solution and will see if that solves your issue too.

\o/

@renatahodovan
Copy link
Owner

@marcospassos I think (or hope) that the issue has been eliminated on the current master. Please verify if it solves your problem too. And don't hesitate to send a report if you find further bugs.

@marcospassos
Copy link
Author

@renatahodovan it worked, thanks!

However, I still cannot generate the tests:

grammarinator-generate -l test/TestUnlexer.py -p test/TestUnparser.py -r domain -d 1 -n 1 -o output/tests/test_%d.ccl
domain cannot be generated within the given depth (min needed: 5).
grammarinator-generate -l test/TestUnlexer.py -p test/TestUnparser.py -r domain -d 5 -n 1 -o output/tests/test_%d.ccl
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 47, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/generate.py", line 30, in generate
    root = getattr(parser, rule)(max_depth=max_depth)
  File "test/TestUnparser.py", line 22, in domain
    current += self.variableDeclarationList(max_depth=max_depth - 1)
  File "test/TestUnparser.py", line 46, in variableDeclarationList
    current += self.variableDeclaration(max_depth=max_depth - 1)
  File "test/TestUnparser.py", line 53, in variableDeclaration
    current += self.variableDeclarator(max_depth=max_depth - 1)
  File "test/TestUnparser.py", line 65, in variableDeclarator
    current += self.expression(max_depth=max_depth - 1)
  File "test/TestUnparser.py", line 190, in expression
    current += self.postfixIfExpression(max_depth=max_depth - 1)
  File "test/TestUnparser.py", line 197, in postfixIfExpression
    current += self.shorthandIfExpression(max_depth=max_depth - 1)
  File "test/TestUnparser.py", line 210, in shorthandIfExpression
    current += self.logicalOrExpression(max_depth=max_depth - 1)
  File "test/TestUnparser.py", line 236, in logicalOrExpression
    current += self.logicalOrExpression(max_depth=max_depth - 1)
  File "test/TestUnparser.py", line 236, in logicalOrExpression
    current += self.logicalOrExpression(max_depth=max_depth - 1)
  File "test/TestUnparser.py", line 236, in logicalOrExpression
    current += self.logicalOrExpression(max_depth=max_depth - 1)
  [Previous line repeated 961 more times]
  File "test/TestUnparser.py", line 232, in logicalOrExpression
    current = self.create_node(UnparserRule(name='logicalOrExpression'))
RecursionError: maximum recursion depth exceeded
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/grammarinator-generate", line 11, in <module>
    load_entry_point('grammarinator==17.5.post0', 'console_scripts', 'grammarinator-generate')()
  File "/usr/local/lib/python3.6/site-packages/grammarinator-17.5.post0-py3.6.egg/grammarinator/generate.py", line 89, in execute
    pool.starmap(generate, [(lexer_cls, parser_cls, args.rule, args.max_depth, transformers, args.out % i) for i in range(args.n)])
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 268, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 608, in get
    raise self._value
RecursionError: maximum recursion depth exceeded

Any guess?

@renatahodovan
Copy link
Owner

Seems that logicalOrExpression calls itself in an infinite recursion. Could you please show how that single rule looks like?

@marcospassos
Copy link
Author

hi @renatahodovan!

Sure, although it does not recurse infinitely:

logicalOrExpression
    : logicalOrExpression logicalOrOperator logicalAndExpression
    | logicalAndExpression
;

logicalAndOperator
    : DOUBLE_AND
    | AND
;

logicalAndExpression
    : logicalAndExpression logicalAndOperator logicalAndExpression
    | quantifierExpression
    | testExpression
;
...

@renatahodovan
Copy link
Owner

@marcospassos I've found a possible reason of the failure. Please try the latest master whether it solves your issue. Otherwise, please open another bug entry, since this one is getting overloaded :)

@marcospassos
Copy link
Author

@renatahodovan still no success. I've opened the issue #6 to discuss the new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants