Package org.javacc.parser

Examples of org.javacc.parser.CodeGenerator


  /**
   * Test method for {@link org.javacc.parser.NfaState#DumpStatesForKind(java.io.PrintWriter)}.
   */
  public void testDumpStatesForKind() {
    CodeGenerator cg = new CodeGenerator();
    NfaState.DumpStatesForKind(cg);
    assertEquals("protected static final int[][][] statesForState = null;\n" +
                 "protected static final int[][] kindForState = null;\n" ,
            cg.getGeneratedCode().replaceAll("\r", ""));
  }
View Full Code Here


  /**
   * Test method for {@link org.javacc.parser.NfaState#DumpStatesForKind(java.io.PrintWriter)}.
   */
  public void testDumpStatesForKindInitialised() throws Exception {
    CodeGenerator cg = new CodeGenerator();
    setupState();
    NfaState.DumpStatesForKind(cg);
    assertEquals("protected static final int[][][] statesForState = {\n" +
        " {\n" +
        "   { 0 },\n" +
        "   { 1 },\n" +
        "   { 2 },\n" +
        "   { 3, 4, 7, 13, 22, 31, 33, 48, },\n" +
        "   { 3, 4, 7, 13, 22, 31, 33, 48, },\n" +
        "   { 5 },\n" +
        "   { 6 },\n" +
        "   { 3, 4, 7, 13, 22, 31, 33, 48, },\n" +
        "   { 8 },\n" +
        "   { 9 },\n" +
        "   { 10 },\n" +
        "   { 11 },\n" +
        "   { 12 },\n" +
        "   { 3, 4, 7, 13, 22, 31, 33, 48, },\n" +
        "   { 14 },\n" +
        "   { 15 },\n" +
        "   { 16 },\n" +
        "   { 17 },\n" +
        "   { 18 },\n" +
        "   { 19 },\n" +
        "   { 20 },\n" +
        "   { 21 },\n" +
        "   { 3, 4, 7, 13, 22, 31, 33, 48, },\n" +
        "   { 23 },\n" +
        "   { 24 },\n" +
        "   { 25 },\n" +
        "   { 26 },\n" +
        "   { 27 },\n" +
        "   { 28 },\n" +
        "   { 29 },\n" +
        "   { 30 },\n" +
        "   { 3, 4, 7, 13, 22, 31, 33, 48, },\n" +
        "   { 32 },\n" +
        "   { 3, 4, 7, 13, 22, 31, 33, 48, },\n" +
        "   { 34 },\n" +
        "   { 35 },\n" +
        "   { 36 },\n" +
        "   { 37 },\n" +
        "   { 38 },\n" +
        "   { 39 },\n" +
        "   { 40 },\n" +
        "   { 41 },\n" +
        "   { 42 },\n" +
        "   { 43 },\n" +
        "   { 44 },\n" +
        "   { 45 },\n" +
        "   { 46 },\n" +
        "   { 47 },\n" +
        "   { 3, 4, 7, 13, 22, 31, 33, 48, },\n" +
        "   { 49 },\n" +
        "   { 50 },\n" +
        "   { 51 },\n" +
        "   { 52 },\n" +
        "   { 53 },\n" +
        "   { 54 },\n" +
        "   { 55 },\n" +
        "   { 56 },\n" +
        "   { 57 },\n" +
        "   { 58 },\n" +
        "   { 59 },\n" +
        "   { 60 },\n" +
        "   { 61 },\n" +
        "   { 62 },\n" +
        "   { 63 },\n" +
        "   { 64 },\n" +
        " },\n" +
        " null,\n" +
        " {\n" +
        "   { 0, 2, },\n" +
        "   { 1 },\n" +
        "   { 0, 2, },\n" +
        " },\n" +
        " null,\n" +
        " null,\n" +
        "\n" +
        "};\n" +
        "protected static final int[][] kindForState = {\n" +
        "{ 20, 20, 20, 20, 80, 80, 80, 84, 84, 84, 84, 84, 84, 89,\n" +
        "  89, 89, 89, 89, 89, 89, 89, 89, 90, 90, 90, 90, 90, 90, 90,\n" +
        "  90, 90, 140, 140, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,\n" +
        "  84, 84, 84, 84, 84, 80, 80, 80, 84, 84, 84, 84, 84, 84, 84,\n" +
        "  84, 84, 84, 84, 84, 84},\n" +
        "null\n" +
        ",\n" +
        "{ 23, 23, 23},\n" +
        "null\n,\n" +
        "null\n\n" +
        "};\n",
            cg.getGeneratedCode().replaceAll("\r", ""));
  }
View Full Code Here

TOP

Related Classes of org.javacc.parser.CodeGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.