dionyziz@erdos ~/llama (validtypes) % python3
Python 3.4.1 (default, May 19 2014, 13:10:29)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from compiler import parse
>>> p = parse.Parser(start="type")
>>> p.parse("int ref ref")
<stdin>: 1:1: error: Syntax error on token INT int
ASTNode:Program with attributes:
* copy_pos = '(non-scalar of type method)'
* lexpos = 'None'
* lineno = 'None'
* list = '[]'
>>> p = parse.Parser(start="type", optimize=False)
>>> p = parse.Parser(start="type", optimize=False, debug=False)
>>> p.parse("int ref ref")
ASTNode:Ref with attributes:
* copy_pos = '(non-scalar of type method)'
* lexpos = '1'
* lineno = '1'
* type = 'ASTNode:Ref with attributes:
* copy_pos = '(non-scalar of type method)'
* lexpos = '1'
* lineno = '1'
* type = 'ASTNode:Int with attributes:
* copy_pos = '(non-scalar of type method)'
* lexpos = '1'
* lineno = '1'
* name = 'int'''
>>>