Fix PEG grammar and add action support.