Home | History | Annotate | Download | only in functional
      1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      3 <head>
      4 <meta http-equiv="content-type" content="text/html;charset=utf-8" />
      5 <title>t019lexer</title>
      6 
      7 <!-- ANTLR includes -->
      8 <script type="text/javascript" src="../../lib/antlr3-all.js"></script>
      9 <script type="text/javascript" src="t019lexer.js"></script>
     10 
     11 <!-- JsUnit include -->
     12 <script type="text/javascript" src="../jsunit/app/jsUnitCore.js"></script>
     13 
     14 <!-- Test Code -->
     15 <script type="text/javascript">
     16     function testValid() {
     17         var xinput = [
     18                 "import org.antlr.runtime.*;",
     19                 "",
     20                 "public class Main {",
     21                 "	public static void main(String[] args) throws Exception {",
     22                 "	    for (int i=0; i<args.length; i++) {",
     23                 "		CharStream input = new ANTLRFileStream(args[i]);",
     24                 "		FuzzyJava lex = new FuzzyJava(input);",
     25                 "		TokenStream tokens = new CommonTokenStream(lex);",
     26                 "		tokens.toString();",
     27                 "		//System.out.println(tokens);",
     28                 "	    }",
     29                 "	}",
     30                 "}"
     31             ].join("\n");
     32         var cstream = new org.antlr.runtime.ANTLRStringStream(xinput),
     33             lexer = new t019lexer(cstream),
     34             tstream = new org.antlr.runtime.CommonTokenStream(lexer);
     35         assertEquals(tstream.getTokens().length, 38);
     36     }
     37 </script>
     38 
     39 </head>
     40 <body>
     41     <h1>t019lexer</h1>
     42 </body>
     43 </html>
     44