I'm writing an assembler for a microprocessor I'm creating using lex/yacc.
I'd like to implement labels in my assembler code, and I thought a good way to do this would be to have a dictionary of labels in the form {name:line#}. I could then check when inserting a label, if it's already defined, its an error.
So how can I use a dictionary structure in lex/yacc?