Someone who attempts to specify exact and precise rules for the direction of every circumstance of behaviour.
One who is skilled in, or given to, casuistry.
A person who resolves cases of conscience or moral duty.
A person who makes an excessive or tedious show of their knowledge, especially regarding rules of vocabulary and grammar.
A person who is overly concerned with formal rules and trivial points of learning.
Pedantic.