I am searching for c grammar and found this link https://www.lysator.liu.se/c/ANSI-C-grammar-y.html#cast-expression the issue is there is grammar for c and lex code but i don't see any semantics like addition ,multiplication implemented i know that yacc is used for only syntax check but we can also write semantics in it where are the semantics implemented are they implemented in other tool.
I am trying to implement a small compiler where do i write semantics ,is it good to write them in yacc using functions.