Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.

1 package org.antlr.works.syntax.element;2 3 importorg.antlr.works.ate.syntax.misc.ATEToken;4 /*5 6 [The "BSD licence"]7 Copyright (c) 2005 Jean Bovet8 All rights reserved.9 10 Redistribution and use in source and binary forms, with or without11 modification, are permitted provided that the following conditions12 are met:13 14 1. Redistributions of source code must retain the above copyright15 notice, this list of conditions and the following disclaimer.16 2. Redistributions in binary form must reproduce the above copyright17 notice, this list of conditions and the following disclaimer in the18 documentation and/or other materials provided with the distribution.19 3. The name of the author may not be used to endorse or promote products20 derived from this software without specific prior written permission.21 22 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR23 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES24 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.25 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,26 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT27 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,28 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY29 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT30 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF31 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.32 33 */34 35 publicclass ElementGroup {36 37 publicString name;38 publicint ruleIndex = -1;39 publicboolean openGroup = false;40 publicATEToken token;41 42 public ElementGroup(String name, int ruleIndex, ATEToken token) {43 this.name = name;44 this.ruleIndex = ruleIndex;45 this.token = token;46 this.openGroup = true;47 }48 49 public ElementGroup(int ruleIndex, ATEToken token) {50 this.ruleIndex = ruleIndex;51 this.token = token;52 this.openGroup = false;53 }54 55 publicString toString() {56 return"Group "+name+", open ="+openGroup+", ruleIndex = "+ruleIndex;57 }58 59 }60