Module md.grammar

Class InteractiveTest

  • All Implemented Interfaces:
    Runnable

    public class InteractiveTest
    extends Object
    implements Runnable
    Interactive tester for markdown grammar

    To start a test session, enter this command line:

     java -jar md-grammar-[version]-jar-with-dependencies.jar
     
    The interactive tester evaluates expressions that you enter. It waits until the end of input to start evaluation. To end input, type Ctrl-D on Linux or Ctrl-Z on Windows. If an expression does not conform to the grammar, the tester will report "mismatched input".
    Author:
    Don Mendelson
    • Constructor Detail

      • InteractiveTest

        public InteractiveTest​(String[] args)
                        throws Exception
        Instantiates the ANTLR4 test rig with parameters
        Parameters:
        args - arguments to TestRig
        Throws:
        Exception - if parameters are invalid
    • Method Detail

      • main

        public static void main​(String[] args)
                         throws Exception
        Runs an interactive test of the DSL
        Parameters:
        args - command line arguments
        • -f filename of file to parse - defaults to stdin
        • -g grammar name - defaults to io.fixprotocol.md.antlr
        • -r start rule name - defaults to document
        Throws:
        Exception - if arguments are invalid
      • run

        public void run()
        Specified by:
        run in interface Runnable