1*16467b97STreehugger Robot<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2*16467b97STreehugger Robot<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3*16467b97STreehugger Robot<head> 4*16467b97STreehugger Robot<meta http-equiv="content-type" content="text/html;charset=utf-8" /> 5*16467b97STreehugger Robot<title>t034tokenLabelPropertyRef</title> 6*16467b97STreehugger Robot 7*16467b97STreehugger Robot<!-- ANTLR includes --> 8*16467b97STreehugger Robot<script type="text/javascript" src="../../lib/antlr3-all.js"></script> 9*16467b97STreehugger Robot<script type="text/javascript" src="t034tokenLabelPropertyRefLexer.js"></script> 10*16467b97STreehugger Robot<script type="text/javascript" src="t034tokenLabelPropertyRefParser.js"></script> 11*16467b97STreehugger Robot 12*16467b97STreehugger Robot 13*16467b97STreehugger Robot<!-- JsUnit include --> 14*16467b97STreehugger Robot<script type="text/javascript" src="../jsunit/app/jsUnitCore.js"></script> 15*16467b97STreehugger Robot 16*16467b97STreehugger Robot<!-- Test Code --> 17*16467b97STreehugger Robot<script type="text/javascript"> 18*16467b97STreehugger Robot var TLexer = function() { 19*16467b97STreehugger Robot TLexer.superclass.constructor.apply(this, arguments); 20*16467b97STreehugger Robot }; 21*16467b97STreehugger Robot org.antlr.lang.extend(TLexer, t034tokenLabelPropertyRefLexer, { 22*16467b97STreehugger Robot recover: function(re) { 23*16467b97STreehugger Robot /* don't recover, just crash */ 24*16467b97STreehugger Robot throw re; 25*16467b97STreehugger Robot } 26*16467b97STreehugger Robot }); 27*16467b97STreehugger Robot 28*16467b97STreehugger Robot var TParser = function() { 29*16467b97STreehugger Robot TParser.superclass.constructor.apply(this, arguments); 30*16467b97STreehugger Robot }; 31*16467b97STreehugger Robot org.antlr.lang.extend(TParser, t034tokenLabelPropertyRefParser, { 32*16467b97STreehugger Robot recover: function(re) { 33*16467b97STreehugger Robot /* don't recover, just crash */ 34*16467b97STreehugger Robot throw re; 35*16467b97STreehugger Robot } 36*16467b97STreehugger Robot }); 37*16467b97STreehugger Robot 38*16467b97STreehugger Robot 39*16467b97STreehugger Robot function testValid1() { 40*16467b97STreehugger Robot var cstream = new org.antlr.runtime.ANTLRStringStream(" a"), 41*16467b97STreehugger Robot lexer = new TLexer(cstream), 42*16467b97STreehugger Robot tstream = new org.antlr.runtime.CommonTokenStream(lexer), 43*16467b97STreehugger Robot parser = new TParser(tstream); 44*16467b97STreehugger Robot 45*16467b97STreehugger Robot var events = parser.a(); 46*16467b97STreehugger Robot assertArrayEquals(["a",4,1,3,0,1], xlog); 47*16467b97STreehugger Robot } 48*16467b97STreehugger Robot</script> 49*16467b97STreehugger Robot 50*16467b97STreehugger Robot</head> 51*16467b97STreehugger Robot<body> 52*16467b97STreehugger Robot <h1>t034tokenLabelPropertyRef</h1> 53*16467b97STreehugger Robot</body> 54*16467b97STreehugger Robot</html> 55