[silvano@rivoira ~]$ mjavaScanner Reading "mjava.flex" Constructing NFA : 419 states in NFA Converting NFA to DFA : .................................................................................................................................................................................. 184 states before minimization, 159 states in minimized DFA Old file "Scanner.java" saved as "Scanner.java~" Writing code to "Scanner.java" line: 1 col: 1 match: --public-- action [89] { return symbol(PUBLIC); } #18 line: 1 col: 7 match: -- -- action [152] { /* ignore */ } line: 1 col: 8 match: --class-- action [82] { return symbol(CLASS); } #19 line: 1 col: 13 match: -- -- action [152] { /* ignore */ } line: 1 col: 14 match: --String-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 1 col: 20 match: --{-- action [107] { return symbol(LBRACE); } #12 line: 1 col: 21 match: -- -- action [152] { /* ignore */ } line: 2 col: 1 match: --}-- action [108] { return symbol(RBRACE); } #13 line: 2 col: 2 match: -- -- action [152] { /* ignore */ } line: 3 col: 1 match: -- -- action [152] { /* ignore */ } line: 4 col: 1 match: --public-- action [89] { return symbol(PUBLIC); } #18 line: 4 col: 7 match: -- -- action [152] { /* ignore */ } line: 4 col: 8 match: --class-- action [82] { return symbol(CLASS); } #19 line: 4 col: 13 match: -- -- action [152] { /* ignore */ } line: 4 col: 14 match: --Int-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 4 col: 17 match: --{-- action [107] { return symbol(LBRACE); } #12 line: 4 col: 18 match: -- -- action [152] { /* ignore */ } line: 5 col: 1 match: -- -- action [152] { /* ignore */ } line: 6 col: 1 match: -- -- action [152] { /* ignore */ } line: 6 col: 2 match: -- -- action [152] { /* ignore */ } line: 6 col: 3 match: -- -- action [152] { /* ignore */ } line: 6 col: 4 match: -- -- action [152] { /* ignore */ } line: 6 col: 5 match: --int-- action [86] { return symbol(INT); } #3 line: 6 col: 8 match: -- -- action [152] { /* ignore */ } line: 6 col: 9 match: --n-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 6 col: 10 match: --;-- action [111] { return symbol(SEMICOLON); } #9 line: 6 col: 11 match: -- -- action [152] { /* ignore */ } line: 7 col: 1 match: -- -- action [152] { /* ignore */ } line: 8 col: 1 match: -- -- action [152] { /* ignore */ } line: 8 col: 2 match: -- -- action [152] { /* ignore */ } line: 8 col: 3 match: -- -- action [152] { /* ignore */ } line: 8 col: 4 match: -- -- action [152] { /* ignore */ } line: 8 col: 5 match: --public-- action [89] { return symbol(PUBLIC); } #18 line: 8 col: 11 match: -- -- action [152] { /* ignore */ } line: 8 col: 12 match: --Int-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 8 col: 15 match: --(-- action [105] { return symbol(LPAREN); } #15 line: 8 col: 16 match: --int-- action [86] { return symbol(INT); } #3 line: 8 col: 19 match: -- -- action [152] { /* ignore */ } line: 8 col: 20 match: --i-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 8 col: 21 match: --)-- action [106] { return symbol(RPAREN); } #16 line: 8 col: 22 match: --{-- action [107] { return symbol(LBRACE); } #12 line: 8 col: 23 match: -- -- action [152] { /* ignore */ } line: 9 col: 1 match: -- -- action [152] { /* ignore */ } line: 9 col: 2 match: --n-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 9 col: 3 match: -- -- action [152] { /* ignore */ } line: 9 col: 4 match: --=-- action [116] { return symbol(EQ); } #14 line: 9 col: 5 match: -- -- action [152] { /* ignore */ } line: 9 col: 6 match: --i-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 9 col: 7 match: --;-- action [111] { return symbol(SEMICOLON); } #9 line: 9 col: 8 match: -- -- action [152] { /* ignore */ } line: 10 col: 1 match: -- -- action [152] { /* ignore */ } line: 10 col: 2 match: -- -- action [152] { /* ignore */ } line: 10 col: 3 match: -- -- action [152] { /* ignore */ } line: 10 col: 4 match: -- -- action [152] { /* ignore */ } line: 10 col: 5 match: --}-- action [108] { return symbol(RBRACE); } #13 line: 10 col: 6 match: -- -- action [152] { /* ignore */ } line: 11 col: 1 match: -- -- action [152] { /* ignore */ } line: 12 col: 1 match: -- -- action [152] { /* ignore */ } line: 12 col: 2 match: -- -- action [152] { /* ignore */ } line: 12 col: 3 match: -- -- action [152] { /* ignore */ } line: 12 col: 4 match: -- -- action [152] { /* ignore */ } line: 12 col: 5 match: --public-- action [89] { return symbol(PUBLIC); } #18 line: 12 col: 11 match: -- -- action [152] { /* ignore */ } line: 12 col: 12 match: --int-- action [86] { return symbol(INT); } #3 line: 12 col: 15 match: -- -- action [152] { /* ignore */ } line: 12 col: 16 match: --f-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 12 col: 17 match: --(-- action [105] { return symbol(LPAREN); } #15 line: 12 col: 18 match: --)-- action [106] { return symbol(RPAREN); } #16 line: 12 col: 19 match: -- -- action [152] { /* ignore */ } line: 12 col: 20 match: --{-- action [107] { return symbol(LBRACE); } #12 line: 12 col: 21 match: -- -- action [152] { /* ignore */ } line: 13 col: 1 match: -- -- action [152] { /* ignore */ } line: 13 col: 2 match: --return-- action [91] { return symbol(RETURN); } #28 line: 13 col: 8 match: -- -- action [152] { /* ignore */ } line: 13 col: 9 match: --fact-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 13 col: 13 match: --(-- action [105] { return symbol(LPAREN); } #15 line: 13 col: 14 match: --n-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 13 col: 15 match: --)-- action [106] { return symbol(RPAREN); } #16 line: 13 col: 16 match: --;-- action [111] { return symbol(SEMICOLON); } #9 line: 13 col: 17 match: -- -- action [152] { /* ignore */ } line: 14 col: 1 match: -- -- action [152] { /* ignore */ } line: 14 col: 2 match: -- -- action [152] { /* ignore */ } line: 14 col: 3 match: -- -- action [152] { /* ignore */ } line: 14 col: 4 match: -- -- action [152] { /* ignore */ } line: 14 col: 5 match: --}-- action [108] { return symbol(RBRACE); } #13 line: 14 col: 6 match: -- -- action [152] { /* ignore */ } line: 15 col: 1 match: -- -- action [152] { /* ignore */ } line: 16 col: 1 match: -- -- action [152] { /* ignore */ } line: 16 col: 2 match: -- -- action [152] { /* ignore */ } line: 16 col: 3 match: -- -- action [152] { /* ignore */ } line: 16 col: 4 match: -- -- action [152] { /* ignore */ } line: 16 col: 5 match: --int-- action [86] { return symbol(INT); } #3 line: 16 col: 8 match: -- -- action [152] { /* ignore */ } line: 16 col: 9 match: --fact-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 16 col: 13 match: --(-- action [105] { return symbol(LPAREN); } #15 line: 16 col: 14 match: --int-- action [86] { return symbol(INT); } #3 line: 16 col: 17 match: -- -- action [152] { /* ignore */ } line: 16 col: 18 match: --n-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 16 col: 19 match: --)-- action [106] { return symbol(RPAREN); } #16 line: 16 col: 20 match: -- -- action [152] { /* ignore */ } line: 16 col: 21 match: --{-- action [107] { return symbol(LBRACE); } #12 line: 16 col: 22 match: -- -- action [152] { /* ignore */ } line: 17 col: 1 match: -- -- action [152] { /* ignore */ } line: 17 col: 2 match: --return-- action [91] { return symbol(RETURN); } #28 line: 17 col: 8 match: -- -- action [152] { /* ignore */ } line: 17 col: 9 match: --n-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 17 col: 10 match: -- -- action [152] { /* ignore */ } line: 17 col: 11 match: -->-- action [117] { return symbol(GT); } #36 line: 17 col: 12 match: -- -- action [152] { /* ignore */ } line: 17 col: 13 match: --2-- action [143] { return symbol(INTEGER_LITERAL, new Integer(yytext())); } #45 line: 17 col: 14 match: -- -- action [152] { /* ignore */ } line: 17 col: 15 match: --?-- action [120] { return symbol(QUESTION); } #43 line: 17 col: 16 match: -- -- action [152] { /* ignore */ } line: 17 col: 17 match: --n-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 17 col: 18 match: -- -- action [152] { /* ignore */ } line: 17 col: 19 match: --*-- action [131] { return symbol(MULT); } #10 line: 17 col: 20 match: -- -- action [152] { /* ignore */ } line: 17 col: 21 match: --fact-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 17 col: 25 match: --(-- action [105] { return symbol(LPAREN); } #15 line: 17 col: 26 match: --n-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 17 col: 27 match: -- -- action [152] { /* ignore */ } line: 17 col: 28 match: ----- action [130] { return symbol(MINUS); } #31 line: 17 col: 29 match: --1-- action [143] { return symbol(INTEGER_LITERAL, new Integer(yytext())); } #45 line: 17 col: 30 match: --)-- action [106] { return symbol(RPAREN); } #16 line: 17 col: 31 match: -- -- action [152] { /* ignore */ } line: 17 col: 32 match: --:-- action [121] { return symbol(COLON); } #17 line: 17 col: 33 match: -- -- action [152] { /* ignore */ } line: 17 col: 34 match: --n-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 17 col: 35 match: --;-- action [111] { return symbol(SEMICOLON); } #9 line: 17 col: 36 match: -- -- action [152] { /* ignore */ } line: 18 col: 1 match: -- -- action [152] { /* ignore */ } line: 18 col: 2 match: -- -- action [152] { /* ignore */ } line: 18 col: 3 match: -- -- action [152] { /* ignore */ } line: 18 col: 4 match: -- -- action [152] { /* ignore */ } line: 18 col: 5 match: --}-- action [108] { return symbol(RBRACE); } #13 line: 18 col: 6 match: -- -- action [152] { /* ignore */ } line: 19 col: 1 match: -- -- action [152] { /* ignore */ } line: 20 col: 1 match: --}-- action [108] { return symbol(RBRACE); } #13 line: 20 col: 2 match: -- -- action [152] { /* ignore */ } line: 21 col: 1 match: -- -- action [152] { /* ignore */ } line: 22 col: 1 match: --public-- action [89] { return symbol(PUBLIC); } #18 line: 22 col: 7 match: -- -- action [152] { /* ignore */ } line: 22 col: 8 match: --class-- action [82] { return symbol(CLASS); } #19 line: 22 col: 13 match: -- -- action [152] { /* ignore */ } line: 22 col: 14 match: --Test-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 22 col: 18 match: --{-- action [107] { return symbol(LBRACE); } #12 line: 22 col: 19 match: -- -- action [152] { /* ignore */ } line: 23 col: 1 match: -- -- action [152] { /* ignore */ } line: 23 col: 2 match: -- -- action [152] { /* ignore */ } line: 23 col: 3 match: -- -- action [152] { /* ignore */ } line: 23 col: 4 match: -- -- action [152] { /* ignore */ } line: 23 col: 5 match: --public-- action [89] { return symbol(PUBLIC); } #18 line: 23 col: 11 match: -- -- action [152] { /* ignore */ } line: 23 col: 12 match: --void-- action [92] { return symbol(VOID); } #21 line: 23 col: 16 match: -- -- action [152] { /* ignore */ } line: 23 col: 17 match: --main-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 23 col: 21 match: --(-- action [105] { return symbol(LPAREN); } #15 line: 23 col: 22 match: --)-- action [106] { return symbol(RPAREN); } #16 line: 23 col: 23 match: --{-- action [107] { return symbol(LBRACE); } #12 line: 23 col: 24 match: -- -- action [152] { /* ignore */ } line: 24 col: 1 match: -- -- action [152] { /* ignore */ } line: 24 col: 2 match: --int-- action [86] { return symbol(INT); } #3 line: 24 col: 5 match: -- -- action [152] { /* ignore */ } line: 24 col: 6 match: --n-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 24 col: 7 match: --,-- action [112] { return symbol(COMMA); } #11 line: 24 col: 8 match: -- -- action [152] { /* ignore */ } line: 24 col: 9 match: --f-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 24 col: 10 match: --;-- action [111] { return symbol(SEMICOLON); } #9 line: 24 col: 11 match: -- -- action [152] { /* ignore */ } line: 25 col: 1 match: -- -- action [152] { /* ignore */ } line: 25 col: 2 match: --Int-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 25 col: 5 match: -- -- action [152] { /* ignore */ } line: 25 col: 6 match: --t-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 25 col: 7 match: --;-- action [111] { return symbol(SEMICOLON); } #9 line: 25 col: 8 match: -- -- action [152] { /* ignore */ } line: 26 col: 1 match: -- -- action [152] { /* ignore */ } line: 26 col: 2 match: --n-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 26 col: 3 match: -- -- action [152] { /* ignore */ } line: 26 col: 4 match: --=-- action [116] { return symbol(EQ); } #14 line: 26 col: 5 match: -- -- action [152] { /* ignore */ } line: 26 col: 6 match: --0-- action [143] { return symbol(INTEGER_LITERAL, new Integer(yytext())); } #45 line: 26 col: 7 match: --;-- action [111] { return symbol(SEMICOLON); } #9 line: 26 col: 8 match: -- -- action [152] { /* ignore */ } line: 27 col: 1 match: -- -- action [152] { /* ignore */ } line: 27 col: 2 match: --while-- action [93] { return symbol(WHILE); } #27 line: 27 col: 7 match: --(-- action [105] { return symbol(LPAREN); } #15 line: 27 col: 8 match: --n-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 27 col: 9 match: -- -- action [152] { /* ignore */ } line: 27 col: 10 match: --<-- action [118] { return symbol(LT); } #35 line: 27 col: 11 match: -- -- action [152] { /* ignore */ } line: 27 col: 12 match: --1-- action [143] { return symbol(INTEGER_LITERAL, new Integer(yytext())); } #45 line: 27 col: 13 match: -- -- action [152] { /* ignore */ } line: 27 col: 14 match: --||-- action [128] { return symbol(OROR); } #42 line: 27 col: 16 match: -- -- action [152] { /* ignore */ } line: 27 col: 17 match: --n-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 27 col: 18 match: -- -- action [152] { /* ignore */ } line: 27 col: 19 match: -->-- action [117] { return symbol(GT); } #36 line: 27 col: 20 match: -- -- action [152] { /* ignore */ } line: 27 col: 21 match: --16-- action [143] { return symbol(INTEGER_LITERAL, new Integer(yytext())); } #45 line: 27 col: 23 match: --)-- action [106] { return symbol(RPAREN); } #16 line: 27 col: 24 match: -- -- action [152] { /* ignore */ } line: 27 col: 25 match: --{-- action [107] { return symbol(LBRACE); } #12 line: 27 col: 26 match: -- -- action [152] { /* ignore */ } line: 27 col: 27 match: --printf-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 27 col: 33 match: -- -- action [152] { /* ignore */ } line: 27 col: 34 match: --(-- action [105] { return symbol(LPAREN); } #15 line: 27 col: 35 match: --"-- action [136] { yybegin(STRING); string.setLength(0); } line: 27 col: 36 match: --Enter an integer greater than 0 and less than 17: -- action [161] { string.append( yytext() ); } line: 27 col: 86 match: --"-- action [159] { yybegin(YYINITIAL); return symbol(STRING_LITERAL, string.toString()); } #49 line: 27 col: 87 match: --)-- action [106] { return symbol(RPAREN); } #16 line: 27 col: 88 match: --;-- action [111] { return symbol(SEMICOLON); } #9 line: 27 col: 89 match: -- -- action [152] { /* ignore */ } line: 27 col: 90 match: -- -- action [152] { /* ignore */ } line: 28 col: 1 match: -- -- action [152] { /* ignore */ } line: 28 col: 2 match: -- -- action [152] { /* ignore */ } line: 28 col: 3 match: -- -- action [152] { /* ignore */ } line: 28 col: 4 match: -- -- action [152] { /* ignore */ } line: 28 col: 5 match: -- -- action [152] { /* ignore */ } line: 28 col: 6 match: -- -- action [152] { /* ignore */ } line: 28 col: 7 match: -- -- action [152] { /* ignore */ } line: 28 col: 8 match: -- -- action [152] { /* ignore */ } line: 28 col: 9 match: -- -- action [152] { /* ignore */ } line: 28 col: 10 match: -- -- action [152] { /* ignore */ } line: 28 col: 11 match: --scanf-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 28 col: 16 match: -- -- action [152] { /* ignore */ } line: 28 col: 17 match: --(-- action [105] { return symbol(LPAREN); } #15 line: 28 col: 18 match: --"-- action [136] { yybegin(STRING); string.setLength(0); } line: 28 col: 19 match: --%d-- action [161] { string.append( yytext() ); } line: 28 col: 21 match: --"-- action [159] { yybegin(YYINITIAL); return symbol(STRING_LITERAL, string.toString()); } #49 line: 28 col: 22 match: --,-- action [112] { return symbol(COMMA); } #11 line: 28 col: 23 match: -- -- action [152] { /* ignore */ } line: 28 col: 24 match: --&-- action [127] { return symbol(AT); } #24 line: 28 col: 25 match: --n-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 28 col: 26 match: --)-- action [106] { return symbol(RPAREN); } #16 line: 28 col: 27 match: --;-- action [111] { return symbol(SEMICOLON); } #9 line: 28 col: 28 match: -- -- action [152] { /* ignore */ } line: 29 col: 1 match: -- -- action [152] { /* ignore */ } line: 29 col: 2 match: --}-- action [108] { return symbol(RBRACE); } #13 line: 29 col: 3 match: -- -- action [152] { /* ignore */ } line: 30 col: 1 match: -- -- action [152] { /* ignore */ } line: 30 col: 2 match: --t-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 30 col: 3 match: -- -- action [152] { /* ignore */ } line: 30 col: 4 match: --=-- action [116] { return symbol(EQ); } #14 line: 30 col: 5 match: -- -- action [152] { /* ignore */ } line: 30 col: 6 match: --new-- action [87] { return symbol(NEW); } #29 line: 30 col: 9 match: -- -- action [152] { /* ignore */ } line: 30 col: 10 match: --Int-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 30 col: 13 match: --(-- action [105] { return symbol(LPAREN); } #15 line: 30 col: 14 match: --n-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 30 col: 15 match: --)-- action [106] { return symbol(RPAREN); } #16 line: 30 col: 16 match: --;-- action [111] { return symbol(SEMICOLON); } #9 line: 30 col: 17 match: -- -- action [152] { /* ignore */ } line: 31 col: 1 match: -- -- action [152] { /* ignore */ } line: 31 col: 2 match: --f-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 31 col: 3 match: -- -- action [152] { /* ignore */ } line: 31 col: 4 match: --=-- action [116] { return symbol(EQ); } #14 line: 31 col: 5 match: -- -- action [152] { /* ignore */ } line: 31 col: 6 match: --t-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 31 col: 7 match: --.-- action [113] { return symbol(DOT); } #8 line: 31 col: 8 match: --f-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 31 col: 9 match: --(-- action [105] { return symbol(LPAREN); } #15 line: 31 col: 10 match: --)-- action [106] { return symbol(RPAREN); } #16 line: 31 col: 11 match: --;-- action [111] { return symbol(SEMICOLON); } #9 line: 31 col: 12 match: -- -- action [152] { /* ignore */ } line: 31 col: 13 match: -- -- action [152] { /* ignore */ } line: 32 col: 1 match: -- -- action [152] { /* ignore */ } line: 32 col: 2 match: --printf-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 32 col: 8 match: --(-- action [105] { return symbol(LPAREN); } #15 line: 32 col: 9 match: --"-- action [136] { yybegin(STRING); string.setLength(0); } line: 32 col: 10 match: --factorial(%d)= %d-- action [161] { string.append( yytext() ); } line: 32 col: 27 match: --\n-- action [166] { string.append( '\n' ); } line: 32 col: 29 match: --"-- action [159] { yybegin(YYINITIAL); return symbol(STRING_LITERAL, string.toString()); } #49 line: 32 col: 30 match: --,-- action [112] { return symbol(COMMA); } #11 line: 32 col: 31 match: -- -- action [152] { /* ignore */ } line: 32 col: 32 match: --n-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 32 col: 33 match: --,-- action [112] { return symbol(COMMA); } #11 line: 32 col: 34 match: -- -- action [152] { /* ignore */ } line: 32 col: 35 match: --f-- action [155] { return symbol(IDENTIFIER, yytext()); } #50 line: 32 col: 36 match: --)-- action [106] { return symbol(RPAREN); } #16 line: 32 col: 37 match: --;-- action [111] { return symbol(SEMICOLON); } #9 line: 32 col: 38 match: -- -- action [152] { /* ignore */ } line: 33 col: 1 match: -- -- action [152] { /* ignore */ } line: 33 col: 2 match: -- -- action [152] { /* ignore */ } line: 33 col: 3 match: -- -- action [152] { /* ignore */ } line: 33 col: 4 match: -- -- action [152] { /* ignore */ } line: 33 col: 5 match: --}-- action [108] { return symbol(RBRACE); } #13 line: 33 col: 6 match: -- -- action [152] { /* ignore */ } line: 33 col: 7 match: -- -- action [152] { /* ignore */ } line: 34 col: 1 match: --}-- action [108] { return symbol(RBRACE); } #13 line: 34 col: 2 match: -- -- action [152] { /* ignore */ } line: 35 col: 1 match: <> action [200] { return symbol(EOF); } #0 [silvano@rivoira ~]$