• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>t025lexerRulePropertyRef</title>
6
7<!-- ANTLR includes -->
8<script type="text/javascript" src="../../lib/antlr3-all.js"></script>
9<script type="text/javascript" src="t025lexerRulePropertyRef.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 testValid1() {
17        var stream = new org.antlr.runtime.ANTLRStringStream("foobar _Ab98 \n A12sdf"),
18            lexer = new t025lexerRulePropertyRef(stream),
19            token;
20
21        while (true) {
22            token = lexer.nextToken();
23            if (token.getType()===org.antlr.runtime.Token.EOF) {
24                break;
25            }
26        }
27
28        assertEquals(lexer.properties.length, 3);
29
30        var p1 = [
31            "foobar",
32            lexer.IDENTIFIER,
33            1,
34            0,
35            -1,
36            org.antlr.runtime.Token.DEFAULT_CHANNEL,
37            0,
38            5
39        ];
40        assertArrayEquals(lexer.properties[0], p1);
41
42        var p2 = [
43            "_Ab98",
44            lexer.IDENTIFIER,
45            1,
46            7,
47            -1,
48            org.antlr.runtime.Token.DEFAULT_CHANNEL,
49            7,
50            11
51        ];
52        assertArrayEquals(lexer.properties[1], p2);
53
54        var p3 = [
55            "A12sdf",
56            lexer.IDENTIFIER,
57            2,
58            1,
59            -1,
60            org.antlr.runtime.Token.DEFAULT_CHANNEL,
61            15,
62            20
63        ];
64        assertArrayEquals(lexer.properties[2], p3);
65    }
66</script>
67
68</head>
69<body>
70    <h1>t025lexerRulePropertyRef</h1>
71</body>
72</html>
73