symbols: use arithmetic series total as a check on id uniqueness

Signed-off-by: Peter Williams <pwil3058@gmail.com>
symbols: convert SymbolTable from class to struct

Signed-off-by: Peter Williams <pwil3058@gmail.com>
grammar: use -= instead of remove() to delete elements from sets

Signed-off-by: Peter Williams <pwil3058@gmail.com>
precedence: simplify precedence and associativity implementation

Signed-off-by: Peter Williams <pwil3058@gmail.com>
semantics: tidy up the output semantic action code

Signed-off-by: Peter Williams <pwil3058@gmail.com>