Add attribute grammar for AST construction