<commit_before>%{

package parser

import (
        "github.com/elpinal/coco3/extra/ast"
        "github.com/elpinal/coco3/extra/token"
)

%}

%union {
        token   token.Token
        command *ast.Command
        exprs   []ast.Expr
        expr    ast.Expr
        list    ast.List
}

%type <command> top command
%type <exprs> exprs
%type <expr> expr
%type <list> string_list sep_by_commas

%token <token> ILLEGAL

%token <token> IDENT STRING LBRACK RBRACK NUM COLON COMMA '!'
%token <token> DEF
%token <token> '='
%token <token> FN

%%<commit_msg>Specify type for def<commit_after>%{

package parser

import (
        "github.com/elpinal/coco3/extra/ast"
        "github.com/elpinal/coco3/extra/token"
)

%}

%union {
        token   token.Token
        command *ast.Command
        exprs   []ast.Expr
        expr    ast.Expr
        list    ast.List
        def     ast.Def
}

%type <command> top command
%type <exprs> exprs
%type <expr> expr
%type <list> string_list sep_by_commas
%type <def> def

%token <token> ILLEGAL

%token <token> IDENT STRING LBRACK RBRACK NUM COLON COMMA '!'
%token <token> DEF
%token <token> '='
%token <token> FN

%%
{'fraction_non_alphanumeric': 0.12337098175499565, 'fraction_numerical': 0.0034752389226759338, 'mean_word_length': 2.6455696202531644, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, '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': '3670900', 'n_tokens_mistral': 433, 'n_tokens_neox': 424, 'n_words': 110}