<commit_before>grammar Type;

CT : [A-Z][a-z]+ ;
VT : [a-z]+ ;
WS : [ \t\r\n]+ -> skip ;

type : functionType | compoundType; // function type
functionType : compoundType ('->' type)+ ;
compoundType : concreteType | tupleType | listType | parenType ;

tupleType : '(' type (',' type)+ ')' ; // tuple type, k>=2
listType : '[' type ']' ;              // list type
parenType : '(' type ')' ;             // parenthesised constructor

concreteType : constantType | variableType ;

constantType : CT ;
variableType : VT ;<commit_msg>Change antler grammar to support new type API<commit_after>grammar Type;

CT : [A-Z][a-z]+ ;
VT : [a-z]+ ;
WS : [ \t\r\n]+ -> skip ;

type : functionType | compoundType ; // function type
functionType : compoundType '->' type ;
compoundType : constantType | variableType | tupleType | listType | parenType ;

tupleType : '(' type (',' type)+ ')' ; // tuple type, k>=2
listType : '[' type ']' ;              // list type
parenType : '(' type ')' ;             // type with parentheses

constantType : CT ;
variableType : VT ;
{'fraction_non_alphanumeric': 0.1737891737891738, 'fraction_numerical': 0.001899335232668566, 'mean_word_length': 2.9773584905660377, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6272169', 'n_tokens_mistral': 341, 'n_tokens_neox': 337, 'n_words': 92}