// This is the yacc input for creating the parser for HCL. %{ package hcl %} %union { num int obj map[string]interface{} str string } %type object %token NUMBER %token IDENTIFIER EQUAL SEMICOLON STRING %token LEFTBRACE RIGHTBRACE %% top: object { hclResult = $1 } object: IDENTIFIER EQUAL STRING { $$ = map[string]interface{}{$1: $3} } %%