Refactored lua.p4d
Add top comment for some grammar