I'm programming a Pascal compiler and already have working grammar. Now I want to start with semantic analysis but actually don't understand how it works in bison. Somehow I wrote a piece of working code by trying every option and I'm wondering what is the difference between @1 and $1.
uint_values_split_by_comma:
UINT {
pas::ic_label label = ctx->tab->new_label();
ctx->tab->add_label_entry(@1, $1, label);
}
| uint_values_split_by_comma COMMA UINT {}
;
Also saw bison documentation, still don't get it.