aboutsummaryrefslogtreecommitdiff
path: root/runtime/JavaScript/tests/functional/t032subrulePredict.html
blob: c0c292d774d0e9eee44b2f9fea81ade02b46462c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>t032subrulePredict</title>

<!-- ANTLR includes -->
<script type="text/javascript" src="../../lib/antlr3-all.js"></script>
<script type="text/javascript" src="t032subrulePredictLexer.js"></script>
<script type="text/javascript" src="t032subrulePredictParser.js"></script>


<!-- JsUnit include -->
<script type="text/javascript" src="../jsunit/app/jsUnitCore.js"></script>

<!-- Test Code -->
<script type="text/javascript">
    var TParser = function() {
        this.cond = true;
        TParser.superclass.constructor.apply(this, arguments);
    }
    org.antlr.lang.extend(TParser, t032subrulePredictParser, {
        emitErrorMessage: function() { /* don't report errors */ },
        recover: function(re) {
            /* don't recover, just crash */
            throw re;
        }
    });


    function testValid1() {
        var cstream = new org.antlr.runtime.ANTLRStringStream("BEGIN A END"),
            lexer = new t032subrulePredictLexer(cstream),
            tstream = new org.antlr.runtime.CommonTokenStream(lexer),
            parser = new TParser(tstream);

        parser.a();
    }

    /* @todo DFA doesn't catch EOF transition correctly.  Looks like an analysis
     * bug in the ANTLR Tool.
    function [remove]testValid2() {
        var cstream = new org.antlr.runtime.ANTLRStringStream(" A"),
            lexer = new t032subrulePredictLexer(cstream),
            tstream = new org.antlr.runtime.CommonTokenStream(lexer),
            parser = new TParser(tstream);

        parser.b();
    }
    */
</script>

</head>
<body>
    <h1>t032subrulePredict</h1>
</body>
</html>