Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 834 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 834 Bytes

testabnf

testabnf is a very simple bash script that allows to define test cases to check an ABNF grammer very easily. The script is a wrapper for the parse2 library that generates and executes a parser against an ABNF file.

Requirements:

Usage:

testabnf.sh aparse.jar file.abnf test-file
  • file.abnf : contains the ABNF grammar used to parse the test strings
  • test-file : a text file that contains the test strings line by line with a prefixed sign indicating if the test should succeed or fail, e.g.:

+ a string that should be parsed successfully by aparse
- a string that should NOT be parsed successfully by aparse
# + a string that is ignored because it is commented-out