Implementation of Tamias to Check Production Rules for Parsing Expression Grammar

Authors
Tetsuro Katayama1, *, Toshihiro Miyaji1, Yoshihiro Kita2, Hisaaki Yamaba1, Kentaro Aburada1, Naonobu Okazaki1
1Department of Computer Science and Systems Engineering, Faculty of Engineering, University of Miyazaki, 1-1 Gakuen-kibanadai-nishi, Miyazaki 889-2192, Japan
2School of Computer Science, Tokyo University of Technology, 1404-1 Katakuramachi, Hachioji City, Tokyo 192-0982, Japan
*Corresponding author. Email: [email protected]
Corresponding Author
Tetsuro Katayama
Received 15 October 2018, Accepted 22 November 2018, Available Online 11 September 2019.
DOI
https://doi.org/10.2991/jrnal.k.190828.011
Keywords
Syntax analysis; parser; parsing expression grammar; packrat parsing
Abstract
Parsing Expression Grammar (PEG) proposed by Ford has the higher expressive ability than traditional Backus–Naur form, but it also has problems such as prefix capture. “Prefix capture” is a problem of hiding the language to be accepted according to the order of choice. To support checking syntax files including such mistakes, this paper proposes Tamias: a production rules checker to support checking the PEG syntax files. Tamias has PEG interpreter which can check production rules of PEG. It can verify the behavior of production rules and measure the reach rate of choices.
Copyright
© 2019 The Authors. Published by ALife Robotics Corp. Ltd..
Open Access
This is an open access article distributed under the CC BY-NC 4.0 license (http://creativecommons.org/licenses/by-nc/4.0/).

Download article (PDF)