1.1 --- a/o.n.antlr.editor/build.xml Mon Jan 14 15:49:47 2013 +0100
1.2 +++ b/o.n.antlr.editor/build.xml Tue Jan 15 10:42:04 2013 +0100
1.3 @@ -7,8 +7,6 @@
1.4 <fail unless="antlr.jar">You must set antlr.jar property pointing to the antlr-x.x-complete.jar</fail>
1.5
1.6 <java classname="org.antlr.Tool" fork="true" failonerror="true">
1.7 - <!-- use -debug option so the generated parser allows to register an DebugEventListener and hence allow to build a parse tree -->
1.8 - <arg value="-debug"/>
1.9 <arg value="-verbose"/>
1.10 <arg value="-o"/>
1.11 <arg path="src/org/netbeans/modules/antlr/editor/gen"/>
1.12 @@ -17,20 +15,7 @@
1.13 <pathelement path="${classpath}"/>
1.14 <pathelement location="${antlr.jar}"/>
1.15 </classpath>
1.16 - </java>
1.17 -
1.18 - <java classname="org.antlr.Tool" fork="true" failonerror="true">
1.19 - <!-- use -debug option so the generated parser allows to register an DebugEventListener and hence allow to build a parse tree -->
1.20 - <arg value="-debug"/>
1.21 - <arg value="-verbose"/>
1.22 - <arg value="-o"/>
1.23 - <arg path="src/org/netbeans/modules/antlr/editor/gen"/>
1.24 - <arg path="src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g"/>
1.25 - <classpath>
1.26 - <pathelement path="${classpath}"/>
1.27 - <pathelement location="${antlr.jar}"/>
1.28 - </classpath>
1.29 - </java>
1.30 + </java>
1.31 </target>
1.32
1.33 </project>
2.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g Mon Jan 14 15:49:47 2013 +0100
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,275 +0,0 @@
2.4 -/*
2.5 - [The "BSD licence"]
2.6 - Copyright (c) 2005-2007 Terence Parr
2.7 - All rights reserved.
2.8 -
2.9 - Redistribution and use in source and binary forms, with or without
2.10 - modification, are permitted provided that the following conditions
2.11 - are met:
2.12 - 1. Redistributions of source code must retain the above copyright
2.13 - notice, this list of conditions and the following disclaimer.
2.14 - 2. Redistributions in binary form must reproduce the above copyright
2.15 - notice, this list of conditions and the following disclaimer in the
2.16 - documentation and/or other materials provided with the distribution.
2.17 - 3. The name of the author may not be used to endorse or promote products
2.18 - derived from this software without specific prior written permission.
2.19 -
2.20 - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
2.21 - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2.22 - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2.23 - IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2.24 - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2.25 - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2.26 - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2.27 - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2.28 - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2.29 - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2.30 -*/
2.31 -
2.32 -/** ANTLR v3 tree grammar to walk trees created by ANTLRv3.g */
2.33 -tree grammar ANTLRv3Tree;
2.34 -
2.35 -options {
2.36 - tokenVocab = ANTLRv3;
2.37 - ASTLabelType = CommonTree;
2.38 -}
2.39 -
2.40 -@header {
2.41 -package org.netbeans.modules.antlr.editor.gen;
2.42 -}
2.43 -
2.44 -grammarDef
2.45 - : ^( grammarType ID DOC_COMMENT? optionsSpec? tokensSpec? attrScope* action* rule+ )
2.46 - ;
2.47 -
2.48 -grammarType
2.49 - : LEXER_GRAMMAR
2.50 - | PARSER_GRAMMAR
2.51 - | TREE_GRAMMAR
2.52 - | COMBINED_GRAMMAR
2.53 - ;
2.54 -
2.55 -tokensSpec
2.56 - : ^(TOKENS tokenSpec+)
2.57 - ;
2.58 -
2.59 -tokenSpec
2.60 - : ^('=' TOKEN_REF STRING_LITERAL)
2.61 - | ^('=' TOKEN_REF CHAR_LITERAL)
2.62 - | TOKEN_REF
2.63 - ;
2.64 -
2.65 -attrScope
2.66 - : ^('scope' ID ACTION)
2.67 - ;
2.68 -
2.69 -action
2.70 - : ^('@' ID ID ACTION)
2.71 - | ^('@' ID ACTION)
2.72 - ;
2.73 -
2.74 -optionsSpec
2.75 - : ^(OPTIONS option+)
2.76 - ;
2.77 -
2.78 -option
2.79 - : ^('=' ID optionValue)
2.80 - ;
2.81 -
2.82 -optionValue
2.83 - : ID
2.84 - | STRING_LITERAL
2.85 - | CHAR_LITERAL
2.86 - | INT
2.87 - ;
2.88 -
2.89 -rule
2.90 - : ^( RULE ID modifier? (^(ARG ARG_ACTION))? (^(RET ARG_ACTION))?
2.91 - optionsSpec? ruleScopeSpec? ruleAction*
2.92 - altList
2.93 - exceptionGroup? EOR
2.94 - )
2.95 - ;
2.96 -
2.97 -modifier
2.98 - : 'protected'|'public'|'private'|'fragment'
2.99 - ;
2.100 -
2.101 -/** Match stuff like @init {int i;} */
2.102 -ruleAction
2.103 - : ^('@' ID ACTION)
2.104 - ;
2.105 -
2.106 -throwsSpec
2.107 - : ^('throws' ID+)
2.108 - ;
2.109 -
2.110 -ruleScopeSpec
2.111 - : ^('scope' ACTION)
2.112 - | ^('scope' ACTION ID+)
2.113 - | ^('scope' ID+)
2.114 - ;
2.115 -
2.116 -block
2.117 - : ^( BLOCK optionsSpec? (alternative rewrite)+ EOB )
2.118 - ;
2.119 -
2.120 -altList
2.121 - : ^( BLOCK (alternative rewrite)+ EOB )
2.122 - ;
2.123 -
2.124 -alternative
2.125 - : ^(ALT element+ EOA)
2.126 - | ^(ALT EPSILON EOA)
2.127 - ;
2.128 -
2.129 -exceptionGroup
2.130 - : exceptionHandler+ finallyClause?
2.131 - | finallyClause
2.132 - ;
2.133 -
2.134 -exceptionHandler
2.135 - : ^('catch' ARG_ACTION ACTION)
2.136 - ;
2.137 -
2.138 -finallyClause
2.139 - : ^('finally' ACTION)
2.140 - ;
2.141 -
2.142 -element
2.143 - : elementNoOptionSpec
2.144 - ;
2.145 -
2.146 -elementNoOptionSpec
2.147 - : ^(('='|'+=') ID block)
2.148 - | ^(('='|'+=') ID atom)
2.149 - | atom
2.150 - | ebnf
2.151 - | ACTION
2.152 - | SEMPRED
2.153 - | GATED_SEMPRED
2.154 - | treeSpec
2.155 - ;
2.156 -
2.157 -atom: ^(('^'|'!') atom)
2.158 - | range
2.159 - | notSet
2.160 - | ^(RULE_REF ARG_ACTION)
2.161 - | RULE_REF
2.162 - | terminal
2.163 - ;
2.164 -
2.165 -notSet
2.166 - : ^('~' notTerminal)
2.167 - | ^('~' block)
2.168 - ;
2.169 -
2.170 -treeSpec
2.171 - : ^(TREE_BEGIN element+)
2.172 - ;
2.173 -
2.174 -/** Matches ENBF blocks (and token sets via block rule) */
2.175 -ebnf
2.176 - : ^(SYNPRED block)
2.177 - | SYN_SEMPRED
2.178 - | ^(ebnfSuffix block)
2.179 - | block
2.180 - ;
2.181 -
2.182 -range
2.183 - : ^(CHAR_RANGE CHAR_LITERAL CHAR_LITERAL)
2.184 - ;
2.185 -
2.186 -terminal
2.187 - : CHAR_LITERAL
2.188 - | TOKEN_REF
2.189 - | STRING_LITERAL
2.190 - | ^(TOKEN_REF ARG_ACTION)
2.191 - | '.'
2.192 - ;
2.193 -
2.194 -notTerminal
2.195 - : CHAR_LITERAL
2.196 - | TOKEN_REF
2.197 - | STRING_LITERAL
2.198 - ;
2.199 -
2.200 -ebnfSuffix
2.201 - : OPTIONAL
2.202 - | CLOSURE
2.203 - | POSITIVE_CLOSURE
2.204 - ;
2.205 -
2.206 -// R E W R I T E S Y N T A X
2.207 -
2.208 -rewrite
2.209 - : (^('->' SEMPRED rewrite_alternative))* ^('->' rewrite_alternative)
2.210 - |
2.211 - ;
2.212 -
2.213 -rewrite_alternative
2.214 - : rewrite_template
2.215 - | rewrite_tree_alternative
2.216 - | ^(ALT EPSILON EOA)
2.217 - ;
2.218 -
2.219 -rewrite_tree_block
2.220 - : ^(BLOCK rewrite_tree_alternative EOB)
2.221 - ;
2.222 -
2.223 -rewrite_tree_alternative
2.224 - : ^(ALT rewrite_tree_element+ EOA)
2.225 - ;
2.226 -
2.227 -rewrite_tree_element
2.228 - : rewrite_tree_atom
2.229 - | rewrite_tree
2.230 - | rewrite_tree_block
2.231 - | rewrite_tree_ebnf
2.232 - ;
2.233 -
2.234 -rewrite_tree_atom
2.235 - : CHAR_LITERAL
2.236 - | TOKEN_REF
2.237 - | ^(TOKEN_REF ARG_ACTION) // for imaginary nodes
2.238 - | RULE_REF
2.239 - | STRING_LITERAL
2.240 - | LABEL
2.241 - | ACTION
2.242 - ;
2.243 -
2.244 -rewrite_tree_ebnf
2.245 - : ^(ebnfSuffix rewrite_tree_block)
2.246 - ;
2.247 -
2.248 -rewrite_tree
2.249 - : ^(TREE_BEGIN rewrite_tree_atom rewrite_tree_element* )
2.250 - ;
2.251 -
2.252 -rewrite_template
2.253 - : ^( TEMPLATE ID rewrite_template_args
2.254 - (DOUBLE_QUOTE_STRING_LITERAL | DOUBLE_ANGLE_STRING_LITERAL)
2.255 - )
2.256 - | rewrite_template_ref
2.257 - | rewrite_indirect_template_head
2.258 - | ACTION
2.259 - ;
2.260 -
2.261 -/** foo(a={...}, ...) */
2.262 -rewrite_template_ref
2.263 - : ^(TEMPLATE ID rewrite_template_args)
2.264 - ;
2.265 -
2.266 -/** ({expr})(a={...}, ...) */
2.267 -rewrite_indirect_template_head
2.268 - : ^(TEMPLATE ACTION rewrite_template_args)
2.269 - ;
2.270 -
2.271 -rewrite_template_args
2.272 - : ^(ARGLIST rewrite_template_arg+)
2.273 - | ARGLIST
2.274 - ;
2.275 -
2.276 -rewrite_template_arg
2.277 - : ^(ARG ID ACTION)
2.278 - ;
3.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/AbstractParseTreeNode.java Mon Jan 14 15:49:47 2013 +0100
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,122 +0,0 @@
3.4 -/*
3.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3.6 - *
3.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
3.8 - *
3.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
3.10 - * Other names may be trademarks of their respective owners.
3.11 - *
3.12 - * The contents of this file are subject to the terms of either the GNU
3.13 - * General Public License Version 2 only ("GPL") or the Common
3.14 - * Development and Distribution License("CDDL") (collectively, the
3.15 - * "License"). You may not use this file except in compliance with the
3.16 - * License. You can obtain a copy of the License at
3.17 - * http://www.netbeans.org/cddl-gplv2.html
3.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
3.19 - * specific language governing permissions and limitations under the
3.20 - * License. When distributing the software, include this License Header
3.21 - * Notice in each file and include the License file at
3.22 - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
3.23 - * particular file as subject to the "Classpath" exception as provided
3.24 - * by Oracle in the GPL Version 2 section of the License file that
3.25 - * accompanied this code. If applicable, add the following below the
3.26 - * License Header, with the fields enclosed by brackets [] replaced by
3.27 - * your own identifying information:
3.28 - * "Portions Copyrighted [year] [name of copyright owner]"
3.29 - *
3.30 - * If you wish your version of this file to be governed by only the CDDL
3.31 - * or only the GPL Version 2, indicate your decision by adding
3.32 - * "[Contributor] elects to include this software in this distribution
3.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
3.34 - * single choice of license, a recipient has the option to distribute
3.35 - * your version of this file under either the CDDL, the GPL Version 2 or
3.36 - * to extend the choice of license to its licensees as provided above.
3.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
3.38 - * Version 2 license, then the option applies only if the new code is
3.39 - * made subject to such option by the copyright holder.
3.40 - *
3.41 - * Contributor(s):
3.42 - *
3.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
3.44 - */
3.45 -package org.netbeans.modules.antlr.editor;
3.46 -
3.47 -import java.util.Collections;
3.48 -import java.util.List;
3.49 -import org.antlr.runtime.tree.ParseTree;
3.50 -import org.antlr.runtime.tree.Tree;
3.51 -
3.52 -/**
3.53 - *
3.54 - * @author marekfukala
3.55 - */
3.56 -public abstract class AbstractParseTreeNode extends ParseTree implements Node {
3.57 -
3.58 - Tree parent;
3.59 -
3.60 - private CharSequence source;
3.61 -
3.62 - public AbstractParseTreeNode(CharSequence source) {
3.63 - super(null);
3.64 - this.source = source;
3.65 - }
3.66 -
3.67 - protected CharSequence getSource() {
3.68 - return source;
3.69 - }
3.70 -
3.71 - @Override
3.72 - public CharSequence image() {
3.73 - return getSource().subSequence(from(), to());
3.74 - }
3.75 -
3.76 - public boolean deleteChild(AbstractParseTreeNode node) {
3.77 - if (children == null) {
3.78 - return false;
3.79 - }
3.80 - int childIndex = children.indexOf(node);
3.81 - if (childIndex == -1) {
3.82 - return false; //no such node
3.83 - }
3.84 -
3.85 - return super.deleteChild(childIndex) != null;
3.86 - }
3.87 -
3.88 - /** BaseTree doesn't track parent pointers. */
3.89 - @Override
3.90 - public Tree getParent() {
3.91 - return parent;
3.92 - }
3.93 -
3.94 - @Override
3.95 - public void setParent(Tree t) {
3.96 - this.parent = t;
3.97 - }
3.98 -
3.99 - @Override
3.100 - @SuppressWarnings(value="unchecked") //antlr 3.3 does not use generics
3.101 - public List<Node> children() {
3.102 - List ch = getChildren();
3.103 - return ch == null
3.104 - ? Collections.<Node>emptyList()
3.105 - : ch;
3.106 - }
3.107 -
3.108 - @Override
3.109 - public Node parent() {
3.110 - return (Node)getParent();
3.111 - }
3.112 -
3.113 - @Override
3.114 - public String toString() {
3.115 - return new StringBuilder()
3.116 - .append(type())
3.117 - .append('(')
3.118 - .append(from())
3.119 - .append('-')
3.120 - .append(to())
3.121 - .append(')')
3.122 - .toString();
3.123 - }
3.124 -
3.125 -}
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/AntlrElementHandle.java Tue Jan 15 10:42:04 2013 +0100
4.3 @@ -0,0 +1,109 @@
4.4 +/*
4.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4.6 + *
4.7 + * Copyright 2010 Oracle and/or its affiliates. All rights reserved.
4.8 + *
4.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
4.10 + * Other names may be trademarks of their respective owners.
4.11 + *
4.12 + * The contents of this file are subject to the terms of either the GNU
4.13 + * General Public License Version 2 only ("GPL") or the Common
4.14 + * Development and Distribution License("CDDL") (collectively, the
4.15 + * "License"). You may not use this file except in compliance with the
4.16 + * License. You can obtain a copy of the License at
4.17 + * http://www.netbeans.org/cddl-gplv2.html
4.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
4.19 + * specific language governing permissions and limitations under the
4.20 + * License. When distributing the software, include this License Header
4.21 + * Notice in each file and include the License file at
4.22 + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
4.23 + * particular file as subject to the "Classpath" exception as provided
4.24 + * by Oracle in the GPL Version 2 section of the License file that
4.25 + * accompanied this code. If applicable, add the following below the
4.26 + * License Header, with the fields enclosed by brackets [] replaced by
4.27 + * your own identifying information:
4.28 + * "Portions Copyrighted [year] [name of copyright owner]"
4.29 + *
4.30 + * If you wish your version of this file to be governed by only the CDDL
4.31 + * or only the GPL Version 2, indicate your decision by adding
4.32 + * "[Contributor] elects to include this software in this distribution
4.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
4.34 + * single choice of license, a recipient has the option to distribute
4.35 + * your version of this file under either the CDDL, the GPL Version 2 or
4.36 + * to extend the choice of license to its licensees as provided above.
4.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
4.38 + * Version 2 license, then the option applies only if the new code is
4.39 + * made subject to such option by the copyright holder.
4.40 + *
4.41 + * Contributor(s):
4.42 + *
4.43 + * Portions Copyrighted 2008 Sun Microsystems, Inc.
4.44 + */
4.45 +package org.netbeans.modules.antlr.editor;
4.46 +
4.47 +import java.util.Collections;
4.48 +import java.util.Set;
4.49 +import org.netbeans.modules.csl.api.ElementHandle;
4.50 +import org.netbeans.modules.csl.api.ElementKind;
4.51 +import org.netbeans.modules.csl.api.Modifier;
4.52 +import org.netbeans.modules.csl.api.OffsetRange;
4.53 +import org.netbeans.modules.csl.spi.ParserResult;
4.54 +import org.openide.filesystems.FileObject;
4.55 +
4.56 +/**
4.57 + *
4.58 + * @author mfukala@netbeans.org
4.59 + */
4.60 +public class AntlrElementHandle implements ElementHandle {
4.61 +
4.62 + private FileObject file;
4.63 + private CharSequence name;
4.64 + private OffsetRange range;
4.65 +
4.66 + public AntlrElementHandle(FileObject file, CharSequence name, OffsetRange range) {
4.67 + this.file = file;
4.68 + this.name = name;
4.69 + this.range = range;
4.70 + }
4.71 +
4.72 + @Override
4.73 + public String getName() {
4.74 + return name.toString();
4.75 + }
4.76 +
4.77 + @Override
4.78 + public FileObject getFileObject() {
4.79 + return file;
4.80 + }
4.81 +
4.82 + @Override
4.83 + public String getMimeType() {
4.84 + return "text/antlr";
4.85 + }
4.86 +
4.87 + @Override
4.88 + public String getIn() {
4.89 + return null;
4.90 + }
4.91 +
4.92 + @Override
4.93 + public ElementKind getKind() {
4.94 + return ElementKind.RULE;
4.95 + }
4.96 +
4.97 + @Override
4.98 + public Set<Modifier> getModifiers() {
4.99 + return Collections.emptySet();
4.100 + }
4.101 +
4.102 + @Override
4.103 + public boolean signatureEquals(ElementHandle handle) {
4.104 + return false;
4.105 + }
4.106 +
4.107 + @Override
4.108 + public OffsetRange getOffsetRange(ParserResult result) {
4.109 + return range; //XXX this is bad - fix!!!
4.110 + }
4.111 +
4.112 +}
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/AntlrStructureItem.java Tue Jan 15 10:42:04 2013 +0100
5.3 @@ -0,0 +1,149 @@
5.4 +/*
5.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
5.6 + *
5.7 + * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
5.8 + *
5.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
5.10 + * Other names may be trademarks of their respective owners.
5.11 + *
5.12 + * The contents of this file are subject to the terms of either the GNU
5.13 + * General Public License Version 2 only ("GPL") or the Common
5.14 + * Development and Distribution License("CDDL") (collectively, the
5.15 + * "License"). You may not use this file except in compliance with the
5.16 + * License. You can obtain a copy of the License at
5.17 + * http://www.netbeans.org/cddl-gplv2.html
5.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
5.19 + * specific language governing permissions and limitations under the
5.20 + * License. When distributing the software, include this License Header
5.21 + * Notice in each file and include the License file at
5.22 + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
5.23 + * particular file as subject to the "Classpath" exception as provided
5.24 + * by Oracle in the GPL Version 2 section of the License file that
5.25 + * accompanied this code. If applicable, add the following below the
5.26 + * License Header, with the fields enclosed by brackets [] replaced by
5.27 + * your own identifying information:
5.28 + * "Portions Copyrighted [year] [name of copyright owner]"
5.29 + *
5.30 + * If you wish your version of this file to be governed by only the CDDL
5.31 + * or only the GPL Version 2, indicate your decision by adding
5.32 + * "[Contributor] elects to include this software in this distribution
5.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
5.34 + * single choice of license, a recipient has the option to distribute
5.35 + * your version of this file under either the CDDL, the GPL Version 2 or
5.36 + * to extend the choice of license to its licensees as provided above.
5.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
5.38 + * Version 2 license, then the option applies only if the new code is
5.39 + * made subject to such option by the copyright holder.
5.40 + *
5.41 + * Contributor(s):
5.42 + *
5.43 + * Portions Copyrighted 2011 Sun Microsystems, Inc.
5.44 + */
5.45 +package org.netbeans.modules.antlr.editor;
5.46 +
5.47 +import java.util.Collections;
5.48 +import java.util.List;
5.49 +import java.util.Set;
5.50 +import javax.swing.ImageIcon;
5.51 +import org.netbeans.modules.csl.api.ElementHandle;
5.52 +import org.netbeans.modules.csl.api.ElementKind;
5.53 +import org.netbeans.modules.csl.api.HtmlFormatter;
5.54 +import org.netbeans.modules.csl.api.Modifier;
5.55 +import org.netbeans.modules.csl.api.OffsetRange;
5.56 +import org.netbeans.modules.csl.api.StructureItem;
5.57 +import org.openide.filesystems.FileObject;
5.58 +
5.59 +/**
5.60 + *
5.61 + * @author mfukala@netbeans.org
5.62 + */
5.63 +public class AntlrStructureItem implements StructureItem {
5.64 + private FileObject file;
5.65 + private CharSequence name;
5.66 + private OffsetRange range;
5.67 +
5.68 + AntlrStructureItem(FileObject file, CharSequence name, OffsetRange range) {
5.69 + this.file = file;
5.70 + this.name = name;
5.71 + this.range = range;
5.72 + }
5.73 +
5.74 + @Override
5.75 + public String getName() {
5.76 + return name.toString();
5.77 + }
5.78 +
5.79 + @Override
5.80 + public String getSortText() {
5.81 + return getName();
5.82 + }
5.83 +
5.84 + @Override
5.85 + public String getHtml(HtmlFormatter formatter) {
5.86 + return getName();
5.87 + }
5.88 +
5.89 + @Override
5.90 + public ElementHandle getElementHandle() {
5.91 + return new AntlrElementHandle(file, name, range);
5.92 + }
5.93 +
5.94 + @Override
5.95 + public ElementKind getKind() {
5.96 + return ElementKind.RULE;
5.97 + }
5.98 +
5.99 + @Override
5.100 + public Set<Modifier> getModifiers() {
5.101 + return Collections.emptySet();
5.102 + }
5.103 +
5.104 + @Override
5.105 + public boolean isLeaf() {
5.106 + return true;
5.107 + }
5.108 +
5.109 + @Override
5.110 + public List<? extends StructureItem> getNestedItems() {
5.111 + return Collections.emptyList();
5.112 + }
5.113 +
5.114 + @Override
5.115 + public long getPosition() {
5.116 + return range.getStart();
5.117 + }
5.118 +
5.119 + @Override
5.120 + public long getEndPosition() {
5.121 + return range.getEnd();
5.122 + }
5.123 +
5.124 + @Override
5.125 + public ImageIcon getCustomIcon() {
5.126 + return null;
5.127 + }
5.128 +
5.129 + @Override
5.130 + public int hashCode() {
5.131 + int hash = 7;
5.132 + hash = 29 * hash + (this.name != null ? this.name.hashCode() : 0);
5.133 + return hash;
5.134 + }
5.135 +
5.136 + @Override
5.137 + public boolean equals(Object obj) {
5.138 + if (obj == null) {
5.139 + return false;
5.140 + }
5.141 + if (getClass() != obj.getClass()) {
5.142 + return false;
5.143 + }
5.144 + final AntlrStructureItem other = (AntlrStructureItem) obj;
5.145 + if (this.name != other.name && (this.name == null || !this.name.equals(other.name))) {
5.146 + return false;
5.147 + }
5.148 + return true;
5.149 + }
5.150 +
5.151 +
5.152 +}
6.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/AntlrStructureScanner.java Mon Jan 14 15:49:47 2013 +0100
6.2 +++ b/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/AntlrStructureScanner.java Tue Jan 15 10:42:04 2013 +0100
6.3 @@ -41,13 +41,21 @@
6.4 */
6.5 package org.netbeans.modules.antlr.editor;
6.6
6.7 +import java.util.ArrayList;
6.8 import java.util.Collections;
6.9 import java.util.List;
6.10 import java.util.Map;
6.11 +import org.antlr.runtime.CommonToken;
6.12 +import org.antlr.runtime.tree.CommonTree;
6.13 +import org.antlr.runtime.tree.Tree;
6.14 +import org.antlr.runtime.tree.TreeVisitor;
6.15 +import org.antlr.runtime.tree.TreeVisitorAction;
6.16 +import org.netbeans.modules.antlr.editor.gen.ANTLRv3Parser;
6.17 import org.netbeans.modules.csl.api.OffsetRange;
6.18 import org.netbeans.modules.csl.api.StructureItem;
6.19 import org.netbeans.modules.csl.api.StructureScanner;
6.20 import org.netbeans.modules.csl.spi.ParserResult;
6.21 +import org.openide.filesystems.FileObject;
6.22
6.23 /**
6.24 *
6.25 @@ -57,11 +65,35 @@
6.26
6.27 @Override
6.28 public List<? extends StructureItem> scan(ParserResult info) {
6.29 - NbAntlrParserResult result = (NbAntlrParserResult)info;
6.30 -
6.31 -
6.32 -
6.33 - return Collections.emptyList();
6.34 + NbAntlrParserResult result = (NbAntlrParserResult) info;
6.35 + final FileObject file = info.getSnapshot().getSource().getFileObject();
6.36 + final List<StructureItem> items = new ArrayList<StructureItem>();
6.37 + TreeVisitor visitor = new TreeVisitor();
6.38 + visitor.visit(result.getParseTree(), new TreeVisitorAction() {
6.39 + @Override
6.40 + public Object pre(Object o) {
6.41 + CommonTree t = (CommonTree) o;
6.42 + switch(t.getType()) {
6.43 + case ANTLRv3Parser.RULE:
6.44 + //get next ID rule
6.45 + CommonTree id = (CommonTree) t.getChild(0);
6.46 + assert id.getType() == ANTLRv3Parser.ID;
6.47 +
6.48 + CommonToken ct = (CommonToken)id.getToken();
6.49 + items.add(new AntlrStructureItem(file, ct.getText(), new OffsetRange(ct.getStartIndex(), ct.getStopIndex() + 1)));
6.50 + break;
6.51 + }
6.52 + return t;
6.53 + }
6.54 +
6.55 + @Override
6.56 + public Object post(Object o) {
6.57 + CommonTree t = (CommonTree) o;
6.58 + return t;
6.59 + }
6.60 + });
6.61 +
6.62 + return items;
6.63 }
6.64
6.65 @Override
7.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/CommonTokenUtil.java Mon Jan 14 15:49:47 2013 +0100
7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
7.3 @@ -1,72 +0,0 @@
7.4 -/*
7.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
7.6 - *
7.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
7.8 - *
7.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7.10 - * Other names may be trademarks of their respective owners.
7.11 - *
7.12 - * The contents of this file are subject to the terms of either the GNU
7.13 - * General Public License Version 2 only ("GPL") or the Common
7.14 - * Development and Distribution License("CDDL") (collectively, the
7.15 - * "License"). You may not use this file except in compliance with the
7.16 - * License. You can obtain a copy of the License at
7.17 - * http://www.netbeans.org/cddl-gplv2.html
7.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
7.19 - * specific language governing permissions and limitations under the
7.20 - * License. When distributing the software, include this License Header
7.21 - * Notice in each file and include the License file at
7.22 - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
7.23 - * particular file as subject to the "Classpath" exception as provided
7.24 - * by Oracle in the GPL Version 2 section of the License file that
7.25 - * accompanied this code. If applicable, add the following below the
7.26 - * License Header, with the fields enclosed by brackets [] replaced by
7.27 - * your own identifying information:
7.28 - * "Portions Copyrighted [year] [name of copyright owner]"
7.29 - *
7.30 - * If you wish your version of this file to be governed by only the CDDL
7.31 - * or only the GPL Version 2, indicate your decision by adding
7.32 - * "[Contributor] elects to include this software in this distribution
7.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
7.34 - * single choice of license, a recipient has the option to distribute
7.35 - * your version of this file under either the CDDL, the GPL Version 2 or
7.36 - * to extend the choice of license to its licensees as provided above.
7.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
7.38 - * Version 2 license, then the option applies only if the new code is
7.39 - * made subject to such option by the copyright holder.
7.40 - *
7.41 - * Contributor(s):
7.42 - *
7.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
7.44 - */
7.45 -package org.netbeans.modules.antlr.editor;
7.46 -
7.47 -import org.antlr.runtime.CommonToken;
7.48 -
7.49 -/**
7.50 - *
7.51 - * @author marekfukala
7.52 - */
7.53 -public class CommonTokenUtil {
7.54 -
7.55 - /**
7.56 - * Returns a pointer to the start and end of the token image in the
7.57 - * underlaying stream. The token.getStopIndex() points to the last character
7.58 - * of the token which is a bit confusing.
7.59 - *
7.60 - * Use this method to get CommonToken's boundaries instead of using the
7.61 - * getStart/StopIndex methods.
7.62 - *
7.63 - * @return two members array - arr[0] is the start offset, arr[1] is the end
7.64 - * offset
7.65 - */
7.66 - public static int[] getCommonTokenOffsetRange(CommonToken token) {
7.67 - if (token.getType() == CommonToken.EOF) {
7.68 - //"eof token" points at the end offset of the source, with zero length
7.69 - return new int[]{token.getStartIndex(), token.getStopIndex()};
7.70 - } else {
7.71 - return new int[]{token.getStartIndex(), token.getStopIndex() + 1};
7.72 - }
7.73 -
7.74 - }
7.75 -}
8.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/NbAntlrParser.java Mon Jan 14 15:49:47 2013 +0100
8.2 +++ b/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/NbAntlrParser.java Tue Jan 15 10:42:04 2013 +0100
8.3 @@ -41,21 +41,15 @@
8.4 */
8.5 package org.netbeans.modules.antlr.editor;
8.6
8.7 -import java.io.PrintWriter;
8.8 import java.util.Collection;
8.9 import javax.swing.event.ChangeListener;
8.10 import org.antlr.runtime.ANTLRStringStream;
8.11 -import org.antlr.runtime.CharStream;
8.12 import org.antlr.runtime.CommonTokenStream;
8.13 import org.antlr.runtime.RecognitionException;
8.14 -import org.antlr.runtime.debug.ParseTreeBuilder;
8.15 import org.antlr.runtime.tree.CommonTree;
8.16 -import org.antlr.runtime.tree.CommonTreeNodeStream;
8.17 -import org.antlr.runtime.tree.Tree;
8.18 import org.netbeans.api.editor.mimelookup.MimeRegistration;
8.19 import org.netbeans.modules.antlr.editor.gen.ANTLRv3Lexer;
8.20 import org.netbeans.modules.antlr.editor.gen.ANTLRv3Parser;
8.21 -import org.netbeans.modules.antlr.editor.gen.ANTLRv3Tree;
8.22 import org.netbeans.modules.csl.spi.ParserResult;
8.23 import org.netbeans.modules.parsing.api.Snapshot;
8.24 import org.netbeans.modules.parsing.api.Task;
8.25 @@ -79,59 +73,17 @@
8.26 CharSequence input = snapshot.getText();
8.27
8.28 try {
8.29 - ANTLRv3Lexer lex = new ANTLRv3Lexer(new ANTLRStringStream(input.toString()) {
8.30 - @Override
8.31 - public int LA(int i) {
8.32 - if (i == 0) {
8.33 - return 0; // undefined
8.34 - }
8.35 - if (i < 0) {
8.36 - i++; // e.g., translate LA(-1) to use offset 0
8.37 - }
8.38 -
8.39 - if ((p + i - 1) >= n) {
8.40 -
8.41 - return CharStream.EOF;
8.42 - }
8.43 - return Character.toUpperCase(data[p + i - 1]);
8.44 - }
8.45 - });
8.46 -
8.47 + ANTLRv3Lexer lex = new ANTLRv3Lexer(new ANTLRStringStream(input.toString()));
8.48 CommonTokenStream tokens = new CommonTokenStream(lex);
8.49 - NbParseTreeBuilder builder = new NbParseTreeBuilder(snapshot.getText());
8.50 - ANTLRv3Parser g = new ANTLRv3Parser(tokens, builder);
8.51 - g.grammarDef(); //parse
8.52 -
8.53 - return new NbAntlrParserResult(snapshot, builder.getTree());
8.54 + ANTLRv3Parser parser = new ANTLRv3Parser(tokens, null);
8.55 + CommonTree tree = (CommonTree) parser.grammarDef().getTree();
8.56 + return new NbAntlrParserResult(snapshot, tree);
8.57 } catch (RecognitionException ex) {
8.58 throw new ParseException(String.format("Error parsing %s snapshot.", snapshot), ex); //NOI18N
8.59 }
8.60 }
8.61 -//
8.62 -// public static void dumpTree(Tree node) {
8.63 -// PrintWriter pw = new PrintWriter(System.out);
8.64 -// dumpTree(node, pw);
8.65 -// pw.flush();
8.66 -// }
8.67 -//
8.68 -// public static void dumpTree(Tree node, PrintWriter pw) {
8.69 -// dump(node, 0, pw);
8.70 -//
8.71 -// }
8.72 -//
8.73 -// private static int x = 0;
8.74 -//
8.75 -// private static void dump(Tree tree, int level, PrintWriter pw) {
8.76 -// for (int i = 0; i < level; i++) {
8.77 -// pw.print(" ");
8.78 -// }
8.79 -// pw.print(x++ + tree.toString());
8.80 -// pw.println();
8.81 -// for (int i = 0; i < tree.getChildCount(); i++) {
8.82 -// Tree child = tree.getChild(i);
8.83 -// dump(child, level + 1, pw);
8.84 -// }
8.85 -// }
8.86 +
8.87 +
8.88
8.89 @Override
8.90 public void parse(Snapshot snapshot, Task task, SourceModificationEvent event) throws ParseException {
9.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/NbAntlrParserResult.java Mon Jan 14 15:49:47 2013 +0100
9.2 +++ b/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/NbAntlrParserResult.java Tue Jan 15 10:42:04 2013 +0100
9.3 @@ -43,7 +43,6 @@
9.4
9.5 import java.util.Collections;
9.6 import java.util.List;
9.7 -import java.util.Map;
9.8 import org.antlr.runtime.tree.CommonTree;
9.9 import org.netbeans.modules.csl.api.Error;
9.10 import org.netbeans.modules.csl.spi.ParserResult;
9.11 @@ -57,9 +56,9 @@
9.12
9.13 public static boolean IN_UNIT_TESTS = false;
9.14
9.15 - private Node parseTree;
9.16 + private CommonTree parseTree;
9.17
9.18 - public NbAntlrParserResult(Snapshot snapshot, Node parseTree /*, List<ProblemDescription> diagnostics*/) {
9.19 + public NbAntlrParserResult(Snapshot snapshot, CommonTree parseTree /*, List<ProblemDescription> diagnostics*/) {
9.20 super(snapshot);
9.21 assert parseTree != null;
9.22 this.parseTree = parseTree;
9.23 @@ -70,15 +69,11 @@
9.24 protected void invalidate() {
9.25 //as CSL features uses the parser result out of the parsing task,
9.26 //the invalidation needs to be disabled until fixed.
9.27 -
9.28 -// if(IN_UNIT_TESTS) {
9.29 -// return ; //some simplification - do not invalidate the result in unit tests
9.30 -// }
9.31 -// parseTree = null;
9.32 -// diagnostics = null;
9.33 + // parseTree = null;
9.34 + // diagnostics = null;
9.35 }
9.36
9.37 - public Node getParseTree() {
9.38 + public CommonTree getParseTree() {
9.39 if(parseTree == null) {
9.40 throw new IllegalStateException("Already invalidated parser result, you are likely trying to use it outside of the parsing task runnable!"); //NOI18N
9.41 }
10.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/NbParseTreeBuilder.java Mon Jan 14 15:49:47 2013 +0100
10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
10.3 @@ -1,447 +0,0 @@
10.4 -/*
10.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
10.6 - *
10.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
10.8 - *
10.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
10.10 - * Other names may be trademarks of their respective owners.
10.11 - *
10.12 - * The contents of this file are subject to the terms of either the GNU
10.13 - * General Public License Version 2 only ("GPL") or the Common
10.14 - * Development and Distribution License("CDDL") (collectively, the
10.15 - * "License"). You may not use this file except in compliance with the
10.16 - * License. You can obtain a copy of the License at
10.17 - * http://www.netbeans.org/cddl-gplv2.html
10.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
10.19 - * specific language governing permissions and limitations under the
10.20 - * License. When distributing the software, include this License Header
10.21 - * Notice in each file and include the License file at
10.22 - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
10.23 - * particular file as subject to the "Classpath" exception as provided
10.24 - * by Oracle in the GPL Version 2 section of the License file that
10.25 - * accompanied this code. If applicable, add the following below the
10.26 - * License Header, with the fields enclosed by brackets [] replaced by
10.27 - * your own identifying information:
10.28 - * "Portions Copyrighted [year] [name of copyright owner]"
10.29 - *
10.30 - * If you wish your version of this file to be governed by only the CDDL
10.31 - * or only the GPL Version 2, indicate your decision by adding
10.32 - * "[Contributor] elects to include this software in this distribution
10.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
10.34 - * single choice of license, a recipient has the option to distribute
10.35 - * your version of this file under either the CDDL, the GPL Version 2 or
10.36 - * to extend the choice of license to its licensees as provided above.
10.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
10.38 - * Version 2 license, then the option applies only if the new code is
10.39 - * made subject to such option by the copyright holder.
10.40 - *
10.41 - * Contributor(s):
10.42 - *
10.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
10.44 - */
10.45 -package org.netbeans.modules.antlr.editor;
10.46 -
10.47 -import java.util.Collection;
10.48 -import java.util.List;
10.49 -import java.util.Map;
10.50 -import org.antlr.runtime.CommonToken;
10.51 -import org.antlr.runtime.RecognitionException;
10.52 -import org.antlr.runtime.Token;
10.53 -import org.antlr.runtime.debug.BlankDebugEventListener;
10.54 -
10.55 -import java.util.Stack;
10.56 -import java.util.ArrayList;
10.57 -import java.util.Arrays;
10.58 -import java.util.HashMap;
10.59 -import java.util.LinkedHashSet;
10.60 -import org.antlr.runtime.NoViableAltException;
10.61 -import org.netbeans.modules.antlr.editor.gen.ANTLRv3Lexer;
10.62 -import org.openide.util.NbBundle;
10.63 -
10.64 -/**
10.65 - * A patched version of ANLR's ParseTreeBuilder
10.66 - *
10.67 - * @author mfukala@netbeans.org
10.68 - */
10.69 -public class NbParseTreeBuilder extends BlankDebugEventListener {
10.70 -
10.71 - List<CommonToken> hiddenTokens = new ArrayList<CommonToken>();
10.72 - private int backtracking = 0;
10.73 - private CommonToken lastConsumedToken;
10.74 - private CharSequence source;
10.75 - static boolean debug_tokens = false; //testing
10.76 - private boolean resync;
10.77 - private CommonToken unexpectedToken;
10.78 - Stack<RuleNode> callStack = new Stack<RuleNode>();
10.79 -
10.80 - public NbParseTreeBuilder(CharSequence source) {
10.81 - this.source = source;
10.82 - callStack.push(new RootNode(source));
10.83 - }
10.84 -
10.85 - public AbstractParseTreeNode getTree() {
10.86 - return callStack.elementAt(0);
10.87 - }
10.88 -
10.89 - /** Backtracking or cyclic DFA, don't want to add nodes to tree */
10.90 - @Override
10.91 - public void enterDecision(int d, boolean couldBacktrack) {
10.92 - backtracking++;
10.93 - }
10.94 -
10.95 - @Override
10.96 - public void exitDecision(int i) {
10.97 - backtracking--;
10.98 - }
10.99 -
10.100 - private boolean isIgnoredRule(String ruleName) {
10.101 -// return Arrays.binarySearch(IGNORED_RULES, ruleName) >= 0;
10.102 - return false;
10.103 - }
10.104 -
10.105 - @Override
10.106 - public void enterRule(String filename, String ruleName) {
10.107 - if (backtracking > 0) {
10.108 - return;
10.109 - }
10.110 - System.out.println("entering " + ruleName);
10.111 -
10.112 - if (isIgnoredRule(ruleName)) {
10.113 - return;
10.114 - }
10.115 -
10.116 - AbstractParseTreeNode parentRuleNode = callStack.peek();
10.117 - RuleNode ruleNode = new RuleNode(NodeType.valueOf(ruleName), source);
10.118 - addNodeChild(parentRuleNode, ruleNode);
10.119 - callStack.push(ruleNode);
10.120 - }
10.121 -
10.122 - @Override
10.123 - public void exitRule(String filename, String ruleName) {
10.124 - if (backtracking > 0) {
10.125 - return;
10.126 - }
10.127 - System.out.println("exiting " + ruleName);
10.128 -
10.129 - if (isIgnoredRule(ruleName)) {
10.130 - return;
10.131 - }
10.132 -
10.133 - RuleNode ruleNode = callStack.pop();
10.134 - if (ruleNode.getChildCount() > 0) {
10.135 - //set the rule end offset
10.136 - if (lastConsumedToken != null) {
10.137 - ruleNode.setLastToken(lastConsumedToken);
10.138 - }
10.139 - }
10.140 -
10.141 -
10.142 - }
10.143 -
10.144 - @Override
10.145 - public void beginResync() {
10.146 - super.beginResync();
10.147 - resync = true;
10.148 - }
10.149 -
10.150 - @Override
10.151 - public void endResync() {
10.152 - super.endResync();
10.153 - resync = false;
10.154 - }
10.155 -
10.156 - @Override
10.157 - public void consumeToken(Token token) {
10.158 - if (backtracking > 0 || resync) {
10.159 - return;
10.160 - }
10.161 -
10.162 - if (debug_tokens) {
10.163 - CommonToken ct = (CommonToken) token;
10.164 - int[] ctr = CommonTokenUtil.getCommonTokenOffsetRange(ct);
10.165 - System.out.println(token + "(" + ctr[0] + "-" + ctr[1] + ")");
10.166 - }
10.167 -
10.168 - //ignore the closing EOF token, we do not want it
10.169 - //it the parse tree
10.170 - if (token.getType() == ANTLRv3Lexer.EOF) {
10.171 - return;
10.172 - }
10.173 -
10.174 - //also ignore error tokens - they are added as children of ErrorNode-s in the recognitionException(...) method
10.175 - if (token.getType() == Token.INVALID_TOKEN_TYPE) {
10.176 - return;
10.177 - }
10.178 -
10.179 - lastConsumedToken = (CommonToken) token;
10.180 -
10.181 - RuleNode ruleNode = callStack.peek();
10.182 - TokenNode elementNode = new TokenNode(source, (CommonToken) token);
10.183 - elementNode.hiddenTokens = this.hiddenTokens;
10.184 - hiddenTokens.clear();
10.185 - ruleNode.addChild(elementNode);
10.186 -
10.187 - updateFirstTokens(ruleNode, lastConsumedToken);
10.188 - }
10.189 -
10.190 - //set first token for all RuleNode-s in the stack without the first token set
10.191 - private void updateFirstTokens(RuleNode ruleNode, CommonToken token) {
10.192 - while (true) {
10.193 -
10.194 - if (ruleNode.from() != -1) {
10.195 - break;
10.196 - }
10.197 - ruleNode.setFirstToken(token);
10.198 - ruleNode = (RuleNode) ruleNode.getParent();
10.199 - if (ruleNode == null) {
10.200 - break;
10.201 - }
10.202 - }
10.203 - }
10.204 -
10.205 - @Override
10.206 - public void consumeHiddenToken(Token token) {
10.207 - if (backtracking > 0 || resync) {
10.208 - return;
10.209 - }
10.210 -
10.211 - if (debug_tokens) {
10.212 - CommonToken ct = (CommonToken) token;
10.213 - int[] ctr = CommonTokenUtil.getCommonTokenOffsetRange(ct);
10.214 - System.out.println(token + "(" + ctr[0] + "-" + ctr[1] + ")");
10.215 - }
10.216 -
10.217 - hiddenTokens.add((CommonToken) token);
10.218 - }
10.219 -
10.220 -// @Override
10.221 -// public void recognitionException(RecognitionException e) {
10.222 -// if (backtracking > 0) {
10.223 -// return;
10.224 -// }
10.225 -//
10.226 -// RuleNode ruleNode = callStack.peek();
10.227 -//
10.228 -// String message;
10.229 -// int from, to;
10.230 -//
10.231 -// assert e.token != null;
10.232 -//
10.233 -// //invalid token found int the stream
10.234 -// unexpectedToken = (CommonToken) e.token;
10.235 -// int unexpectedTokenCode = e.getUnexpectedType();
10.236 -// CssTokenId unexpectedTokenId = CssTokenId.forTokenTypeCode(unexpectedTokenCode);
10.237 -//
10.238 -// assert unexpectedTokenId != null : "No CssTokenId for " + unexpectedToken;
10.239 -//
10.240 -// //special handling for EOF token - it has lenght == 1 !
10.241 -// if(unexpectedTokenId == CssTokenId.EOF) {
10.242 -// from = to = CommonTokenUtil.getCommonTokenOffsetRange(unexpectedToken)[0];
10.243 -// } else {
10.244 -// //normal tokens
10.245 -// from = CommonTokenUtil.getCommonTokenOffsetRange(unexpectedToken)[0];
10.246 -// to = CommonTokenUtil.getCommonTokenOffsetRange(unexpectedToken)[1];
10.247 -// }
10.248 -//
10.249 -// if (unexpectedTokenId == CssTokenId.EOF) {
10.250 -// message = NbBundle.getMessage(NbParseTreeBuilder.class, "MSG_Error_Premature_EOF");
10.251 -// } else {
10.252 -// message = NbBundle.getMessage(NbParseTreeBuilder.class, "MSG_Error_Unexpected_Token", unexpectedTokenId.name());
10.253 -// }
10.254 -//
10.255 -// //create a ParsingProblem
10.256 -// ProblemDescription problemDescription = new ProblemDescription(
10.257 -// from,
10.258 -// to,
10.259 -// message,
10.260 -// ProblemDescription.Keys.PARSING.name(),
10.261 -// ProblemDescription.Type.ERROR);
10.262 -//
10.263 -// problems.add(problemDescription);
10.264 -//
10.265 -// //create an error node and add it to the parse tree
10.266 -// ErrorNode errorNode = new ErrorNode(from, to, problemDescription, source);
10.267 -//
10.268 -// //add the unexpected token as a child of the error node
10.269 -// TokenNode tokenNode = new TokenNode(source, unexpectedToken);
10.270 -// addNodeChild(errorNode, tokenNode);
10.271 -//
10.272 -// if(e instanceof NoViableAltException) {
10.273 -// //error during predicate - the unexpected token may or may not be
10.274 -// //reported later as an error. To handle this,
10.275 -// //store the error node and the ruleNode where the error node should be added
10.276 -// noViableAltNodes.put(unexpectedToken, new Pair<Node>(ruleNode, errorNode));
10.277 -// errorNodes.push(errorNode);
10.278 -// } else {
10.279 -// //possibly remove the unexpectedToken from the noViableAltNodes map
10.280 -//
10.281 -// //NOTICE:
10.282 -// //Uncomment the following line if you want the parse tree not to produce
10.283 -// //multiple error nodes for the same token. If the line is active, there
10.284 -// //wont be error nodes for semantic predicates if the unexpected token
10.285 -// //is matched by another error rule later.
10.286 -//// noViableAltNodes.remove(unexpectedToken);
10.287 -//
10.288 -// addNodeChild(ruleNode, errorNode);
10.289 -// errorNodes.push(errorNode);
10.290 -//
10.291 -// //create and artificial error token so the rules on stack can properly set their ranges
10.292 -// lastConsumedToken = new CommonToken(Token.INVALID_TOKEN_TYPE);
10.293 -// lastConsumedToken.setStartIndex(from);
10.294 -// lastConsumedToken.setStopIndex(to - 1); // ... ( -1 => last *char* index )
10.295 -// }
10.296 -//
10.297 -//
10.298 -// }
10.299 -
10.300 -// @Override
10.301 -// public void terminate() {
10.302 -// super.terminate();
10.303 -//
10.304 -// //process unreported errors from NoViableAltException
10.305 -// for(Pair<Node> pair : noViableAltNodes.values()) {
10.306 -// RuleNode ruleNode = (RuleNode)pair.n1;
10.307 -// ErrorNode errorNode = (ErrorNode)pair.n2;
10.308 -//
10.309 -// ruleNode.addChild(errorNode);
10.310 -// errorNode.setParent(ruleNode);
10.311 -// }
10.312 -//
10.313 -// //Finally after the parsing is done fix the error nodes and their predecessors.
10.314 -// //This fixes the problem with rules where RecognitionException happened
10.315 -// //but the errorneous or missing token has been matched in somewhere further
10.316 -// for (ErrorNode en : errorNodes) {
10.317 -// synchronizeAncestorsBoundaries(en);
10.318 -// }
10.319 -//
10.320 -// //clean parse tree from empty rule nodes
10.321 -// //empty rule node == rule node without a single _token node_ child
10.322 -// for(RuleNode node : leafRuleNodes) {
10.323 -// removeLeafRuleNodes(node);
10.324 -// }
10.325 -//
10.326 -// }
10.327 -//
10.328 -// //removes all empty rule nodes in the tree path from the given node to the parse tree root
10.329 -// private void removeLeafRuleNodes(RuleNode node) {
10.330 -// for(;;) {
10.331 -// if(node.children().isEmpty()) {
10.332 -// RuleNode parent = (RuleNode)node.parent();
10.333 -// if(parent == null) {
10.334 -// return ;
10.335 -// }
10.336 -// parent.deleteChild(node);
10.337 -// node = parent;
10.338 -// } else {
10.339 -// break;
10.340 -// }
10.341 -// }
10.342 -// }
10.343 -//
10.344 -// private void synchronizeAncestorsBoundaries(RuleNode en) {
10.345 -// RuleNode n = en;
10.346 -// for (;;) {
10.347 -// if (n == null) {
10.348 -// break;
10.349 -// }
10.350 -//
10.351 -// //adjust the parent nodes ranges to the errorNode
10.352 -// if (n.from() == -1 || n.from() > en.from()) {
10.353 -// n.from = en.from();
10.354 -// }
10.355 -// if(n.to() == -1 || n.to() < en.to()) {
10.356 -// n.to = en.to();
10.357 -// }
10.358 -//
10.359 -// n = (RuleNode) n.parent();
10.360 -// }
10.361 -// }
10.362 -//
10.363 -// public Collection<ProblemDescription> getProblems() {
10.364 -// return problems;
10.365 -// }
10.366 -//
10.367 -// //note: it would be possible to handle this all in consumeToken since it is called from the
10.368 -// //BaseRecognizer.consumeUntil(...) { input.consume(); } but for the better usability
10.369 -// //it is done this way. So the beginResyn/endResync doesn't have to be used.
10.370 -// //the NbParseTreeBuilder.consumeToken() method ignores tokens with ERROR type so they
10.371 -// //won't be duplicated in the parse tree
10.372 -//
10.373 -// //creates a "recovery" node with all the skipped tokens as children
10.374 -// void consumeSkippedTokens(List<Token> tokens) {
10.375 -// if(tokens.isEmpty()) {
10.376 -// return ;
10.377 -// }
10.378 -//
10.379 -// CommonToken first = (CommonToken)tokens.get(0);
10.380 -// CommonToken last = (CommonToken)tokens.get(tokens.size() - 1);
10.381 -//
10.382 -//
10.383 -//
10.384 -// //if there's just one recovered token and the token is the same as the unexpectedToken just skip the
10.385 -// //recovery node creation, the parse tree for the errorneous piece of code is already complete
10.386 -// boolean ignoreFirstToken = unexpectedToken == first;
10.387 -// if(ignoreFirstToken && tokens.size() == 1) {
10.388 -// return ;
10.389 -// }
10.390 -//
10.391 -// //do not add the first token as children of the recovery node if it has been already
10.392 -// //added as a child of the error node created for the RecognitionException
10.393 -// if(ignoreFirstToken) {
10.394 -// first = (CommonToken)tokens.get(1); //use second
10.395 -// }
10.396 -//
10.397 -// //find last error which triggered this recovery and add the skipped tokens to it
10.398 -//// ErrorNode errorNode = errorNodes.peek();
10.399 -//// RuleNode peek = callStack.peek();
10.400 -//// if(!(peek instanceof ErrorNode)) {
10.401 -//
10.402 -// RuleNode peek = errorNodes.peek();
10.403 -//
10.404 -// RuleNode node = new RuleNode(NodeType.recovery, source);
10.405 -// peek.addChild(node);
10.406 -// node.setParent(peek);
10.407 -// peek = node;
10.408 -//
10.409 -//// }
10.410 -//
10.411 -//
10.412 -// //set first and last token
10.413 -// peek.setFirstToken(first);
10.414 -// peek.setLastToken(last);
10.415 -//
10.416 -// synchronizeAncestorsBoundaries(peek);
10.417 -//
10.418 -// //set range
10.419 -// peek.from = CommonTokenUtil.getCommonTokenOffsetRange(first)[0];
10.420 -// peek.to = CommonTokenUtil.getCommonTokenOffsetRange(last)[1];
10.421 -//
10.422 -// //set the error tokens as children of the error node
10.423 -// for(int i = (ignoreFirstToken ? 1 : 0); i < tokens.size(); i++) {
10.424 -// CommonToken token = (CommonToken)tokens.get(i);
10.425 -// TokenNode tokenNode = new TokenNode(source, token);
10.426 -// addNodeChild(peek, tokenNode);
10.427 -// }
10.428 -//
10.429 -// //create and artificial error token so the rules on stack can properly set their ranges
10.430 -// lastConsumedToken = new CommonToken(Token.INVALID_TOKEN_TYPE);
10.431 -// lastConsumedToken.setStartIndex(first.getStartIndex());
10.432 -// lastConsumedToken.setStopIndex(last.getStopIndex());
10.433 -//
10.434 -// }
10.435 -//
10.436 -//
10.437 - private void addNodeChild(AbstractParseTreeNode parent, AbstractParseTreeNode child) {
10.438 - parent.addChild(child);
10.439 - child.setParent(parent);
10.440 - }
10.441 -//
10.442 -// private static class Pair<T> {
10.443 -// T n1, n2;
10.444 -// public Pair(T n1, T n2) {
10.445 -// this.n1 = n1;
10.446 -// this.n2 = n2;
10.447 -// }
10.448 -// }
10.449 -//
10.450 -}
11.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/Node.java Mon Jan 14 15:49:47 2013 +0100
11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
11.3 @@ -1,68 +0,0 @@
11.4 -/*
11.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
11.6 - *
11.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
11.8 - *
11.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
11.10 - * Other names may be trademarks of their respective owners.
11.11 - *
11.12 - * The contents of this file are subject to the terms of either the GNU
11.13 - * General Public License Version 2 only ("GPL") or the Common
11.14 - * Development and Distribution License("CDDL") (collectively, the
11.15 - * "License"). You may not use this file except in compliance with the
11.16 - * License. You can obtain a copy of the License at
11.17 - * http://www.netbeans.org/cddl-gplv2.html
11.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
11.19 - * specific language governing permissions and limitations under the
11.20 - * License. When distributing the software, include this License Header
11.21 - * Notice in each file and include the License file at
11.22 - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
11.23 - * particular file as subject to the "Classpath" exception as provided
11.24 - * by Oracle in the GPL Version 2 section of the License file that
11.25 - * accompanied this code. If applicable, add the following below the
11.26 - * License Header, with the fields enclosed by brackets [] replaced by
11.27 - * your own identifying information:
11.28 - * "Portions Copyrighted [year] [name of copyright owner]"
11.29 - *
11.30 - * If you wish your version of this file to be governed by only the CDDL
11.31 - * or only the GPL Version 2, indicate your decision by adding
11.32 - * "[Contributor] elects to include this software in this distribution
11.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
11.34 - * single choice of license, a recipient has the option to distribute
11.35 - * your version of this file under either the CDDL, the GPL Version 2 or
11.36 - * to extend the choice of license to its licensees as provided above.
11.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
11.38 - * Version 2 license, then the option applies only if the new code is
11.39 - * made subject to such option by the copyright holder.
11.40 - *
11.41 - * Contributor(s):
11.42 - *
11.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
11.44 - */
11.45 -package org.netbeans.modules.antlr.editor;
11.46 -
11.47 -import java.util.List;
11.48 -import java.util.Map;
11.49 -
11.50 -/**
11.51 - * Node of the css source parse tree.
11.52 - *
11.53 - * @author marekfukala
11.54 - */
11.55 -public interface Node {
11.56 -
11.57 - public int from();
11.58 -
11.59 - public int to();
11.60 -
11.61 - public String name();
11.62 -
11.63 - public NodeType type();
11.64 -
11.65 - public List<Node> children();
11.66 -
11.67 - public Node parent();
11.68 -
11.69 - public CharSequence image();
11.70 -
11.71 -}
12.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/NodeType.java Mon Jan 14 15:49:47 2013 +0100
12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
12.3 @@ -1,68 +0,0 @@
12.4 -/*
12.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
12.6 - *
12.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
12.8 - *
12.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
12.10 - * Other names may be trademarks of their respective owners.
12.11 - *
12.12 - * The contents of this file are subject to the terms of either the GNU
12.13 - * General Public License Version 2 only (GPL) or the Common
12.14 - * Development and Distribution License(CDDL) (collectively, the
12.15 - * License). You may not use this file except in compliance with the
12.16 - * License. You can obtain a copy of the License at
12.17 - * http://www.netbeans.org/cddl-gplv2.html
12.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
12.19 - * specific language governing permissions and limitations under the
12.20 - * License. When distributing the software, include this License Header
12.21 - * Notice in each file and include the License file at
12.22 - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
12.23 - * particular file as subject to the Classpath exception as provided
12.24 - * by Oracle in the GPL Version 2 section of the License file that
12.25 - * accompanied this code. If applicable, add the following below the
12.26 - * License Header, with the fields enclosed by brackets [] replaced by
12.27 - * your own identifying information:
12.28 - * Portions Copyrighted [year] [name of copyright owner]
12.29 - *
12.30 - * If you wish your version of this file to be governed by only the CDDL
12.31 - * or only the GPL Version 2, indicate your decision by adding
12.32 - * "[Contributor] elects to include this software in this distribution
12.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
12.34 - * single choice of license, a recipient has the option to distribute
12.35 - * your version of this file under either the CDDL, the GPL Version 2 or
12.36 - * to extend the choice of license to its licensees as provided above.
12.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
12.38 - * Version 2 license, then the option applies only if the new code is
12.39 - * made subject to such option by the copyright holder.
12.40 - *
12.41 - * Contributor(s):
12.42 - *
12.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
12.44 - */
12.45 -package org.netbeans.modules.antlr.editor;
12.46 -
12.47 -/**
12.48 - * Node types for all the CSS3 ANTLR grammar elements.
12.49 - *
12.50 - * This enum must keep in sync with the ANTLR grammar set of rules!!!
12.51 - *
12.52 - * @author mfukala@netbeans.org
12.53 - */
12.54 -public enum NodeType {
12.55 -
12.56 - root,
12.57 - token,
12.58 -
12.59 - invalidRule, ebnf, finallyClause, notSet, option, attrScope,
12.60 - element, tokensSpec, treeSpec, ruleScopeSpec, tokenSpec,
12.61 - rewrite_tree_ebnf, optionsSpec, rewrite_template_ref, throwsSpec,
12.62 - exceptionGroup, ebnfSuffix, rewrite_alternative, rewrite_tree,
12.63 - synpred1_ANTLRv3, elementNoOptionSpec, block, rule, rewrite_template,
12.64 - rewrite_tree_alternative, terminal, rewrite_tree_block, range,
12.65 - rewrite_tree_atom, altList, rewrite_template_arg, rewrite,
12.66 - action, rewrite_tree_element, ruleAction, grammarDef, synpred2_ANTLRv3,
12.67 - actionScopeName, id, rewrite_template_args, notTerminal,
12.68 - optionValue, alternative, atom, rewrite_indirect_template_head,
12.69 - exceptionHandler
12.70 -
12.71 -}
13.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/NodeUtil.java Mon Jan 14 15:49:47 2013 +0100
13.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
13.3 @@ -1,330 +0,0 @@
13.4 -/*
13.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
13.6 - *
13.7 - * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
13.8 - *
13.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
13.10 - * Other names may be trademarks of their respective owners.
13.11 - *
13.12 - * The contents of this file are subject to the terms of either the GNU
13.13 - * General Public License Version 2 only ("GPL") or the Common
13.14 - * Development and Distribution License("CDDL") (collectively, the
13.15 - * "License"). You may not use this file except in compliance with the
13.16 - * License. You can obtain a copy of the License at
13.17 - * http://www.netbeans.org/cddl-gplv2.html
13.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13.19 - * specific language governing permissions and limitations under the
13.20 - * License. When distributing the software, include this License Header
13.21 - * Notice in each file and include the License file at
13.22 - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
13.23 - * particular file as subject to the "Classpath" exception as provided
13.24 - * by Oracle in the GPL Version 2 section of the License file that
13.25 - * accompanied this code. If applicable, add the following below the
13.26 - * License Header, with the fields enclosed by brackets [] replaced by
13.27 - * your own identifying information:
13.28 - * "Portions Copyrighted [year] [name of copyright owner]"
13.29 - *
13.30 - * If you wish your version of this file to be governed by only the CDDL
13.31 - * or only the GPL Version 2, indicate your decision by adding
13.32 - * "[Contributor] elects to include this software in this distribution
13.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
13.34 - * single choice of license, a recipient has the option to distribute
13.35 - * your version of this file under either the CDDL, the GPL Version 2 or
13.36 - * to extend the choice of license to its licensees as provided above.
13.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
13.38 - * Version 2 license, then the option applies only if the new code is
13.39 - * made subject to such option by the copyright holder.
13.40 - *
13.41 - * Contributor(s):
13.42 - *
13.43 - * Portions Copyrighted 2008 Sun Microsystems, Inc.
13.44 - */
13.45 -package org.netbeans.modules.antlr.editor;
13.46 -
13.47 -import java.io.PrintWriter;
13.48 -import java.util.ArrayList;
13.49 -import java.util.EnumSet;
13.50 -import java.util.List;
13.51 -import java.util.Locale;
13.52 -import java.util.StringTokenizer;
13.53 -import java.util.concurrent.atomic.AtomicBoolean;
13.54 -import java.util.concurrent.atomic.AtomicReference;
13.55 -
13.56 -/**
13.57 - * Utility methods to work with the css source parse trees.
13.58 - *
13.59 - * @author mfukala@netbeans.org
13.60 - */
13.61 -public final class NodeUtil {
13.62 -
13.63 - private static final String INDENT = " ";//NOI18N
13.64 -
13.65 - private NodeUtil() {
13.66 - }
13.67 -
13.68 - public static int[] getTrimmedNodeRange(Node node) {
13.69 - CharSequence text = node.image();
13.70 - int from_diff;
13.71 - int to_diff;
13.72 - for (from_diff = 0; from_diff < text.length(); from_diff++) {
13.73 - if (!Character.isWhitespace(text.charAt(from_diff))) {
13.74 - break;
13.75 - }
13.76 - }
13.77 -
13.78 - for (to_diff = 0; to_diff < text.length() - from_diff; to_diff++) {
13.79 - if (!Character.isWhitespace(text.charAt(text.length() - 1 - to_diff))) {
13.80 - break;
13.81 - }
13.82 - }
13.83 -
13.84 - return new int[]{node.from() + from_diff, node.to() - to_diff};
13.85 - }
13.86 -
13.87 - public static Node findNonTokenNodeAtOffset(Node node, int offset) {
13.88 - Node found = findNodeAtOffset(node, offset);
13.89 - return found instanceof TokenNode
13.90 - ? found.parent()
13.91 - : found;
13.92 -
13.93 - }
13.94 -
13.95 - public static Node findNodeAtOffset(Node node, int astOffset) {
13.96 - int so = node.from();
13.97 - int eo = node.to();
13.98 -
13.99 -
13.100 - if (astOffset < so || astOffset > eo) {
13.101 - //we are out of the scope - may happen just with the first client call
13.102 - return null;
13.103 - }
13.104 -
13.105 - if (astOffset >= so && astOffset <= eo && node.children().isEmpty()) {
13.106 - //if the node matches and has no children we found it
13.107 - return node;
13.108 - }
13.109 -
13.110 - for (Node child : node.children()) {
13.111 -
13.112 - int ch_so = child.from();
13.113 - int ch_eo = child.to();
13.114 - if (astOffset >= ch_so && astOffset <= ch_eo) {
13.115 - //the child is or contains the searched node
13.116 - return findNodeAtOffset(child, astOffset);
13.117 - }
13.118 -
13.119 - }
13.120 -
13.121 - return node;
13.122 - }
13.123 -
13.124 - /** @return first child of the node with the specified kind. */
13.125 - public static Node getChildByType(Node node, NodeType type) {
13.126 - Node[] children = getChildrenByType(node, type);
13.127 - return children.length == 0 ? null : children[0];
13.128 - }
13.129 -
13.130 - /**
13.131 - *
13.132 - * @param node
13.133 - * @param tokenId
13.134 - * @return
13.135 - */
13.136 - public static Node getChildTokenNode(Node node, AntlrTokenId tokenId) {
13.137 - Node[] children = getChildrenByType(node, NodeType.token);
13.138 - for (Node n : children) {
13.139 - TokenNode tn = (TokenNode) n;
13.140 - if (tn.getTokenId() == tokenId) {
13.141 - return n;
13.142 - }
13.143 - }
13.144 - return null;
13.145 - }
13.146 -
13.147 - public static AntlrTokenId getTokenNodeTokenId(Node node) {
13.148 - //strange, possibly better expose TokenNode!
13.149 - if (node.type() != NodeType.token) {
13.150 - throw new IllegalArgumentException(
13.151 - String.format("The argument must by of NodeType.token type. The actual type is %s", node.type()));
13.152 - }
13.153 - return ((TokenNode) node).getTokenId();
13.154 - }
13.155 -
13.156 - public static Node getAncestorByType(Node node, final NodeType type) {
13.157 - AtomicReference<Node> found = new AtomicReference<Node>();
13.158 - NodeVisitor visitor = new NodeVisitor<AtomicReference<Node>>(found) {
13.159 -
13.160 - @Override
13.161 - public boolean visit(Node node) {
13.162 - if (node.type() == type) {
13.163 - getResult().set(node);
13.164 - return true;
13.165 - }
13.166 - return false;
13.167 - }
13.168 - };
13.169 - visitor.visitAncestors(node);
13.170 - return found.get();
13.171 - }
13.172 -
13.173 - public static List<Node> getChildrenRecursivelyByType(Node root, final NodeType... type) {
13.174 - final EnumSet<NodeType> nodeTypes = EnumSet.of(type[0], type);
13.175 - List<Node> found = new ArrayList<Node>();
13.176 - NodeVisitor<List<Node>> visitor = new NodeVisitor<List<Node>>(found) {
13.177 -
13.178 - @Override
13.179 - public boolean visit(Node node) {
13.180 - if(nodeTypes.contains(node.type())) {
13.181 - getResult().add(node);
13.182 - }
13.183 - return false;
13.184 - }
13.185 - };
13.186 -
13.187 - visitor.visitChildren(root);
13.188 - return visitor.getResult();
13.189 - }
13.190 -
13.191 - /** @return list of children of the node with the specified kind. */
13.192 - public static Node[] getChildrenByType(Node node, NodeType type) {
13.193 - ArrayList<Node> list = new ArrayList<Node>(node.children().size() / 4);
13.194 - for (Node child : node.children()) {
13.195 - if (child.type() == type) {
13.196 - list.add(child);
13.197 - }
13.198 - }
13.199 - return list.toArray(new Node[]{});
13.200 - }
13.201 -
13.202 - /** @return A sibling node before or after the given node. */
13.203 - public static Node getSibling(Node node, boolean before) {
13.204 - Node parent = node.parent();
13.205 - if (parent == null) {
13.206 - return null;
13.207 - }
13.208 - Node sibling = null;
13.209 - for (int i = 0; i < parent.children().size(); i++) {
13.210 - List<Node> children = parent.children();
13.211 - Node child = children.get(i);
13.212 - if (child == node) {
13.213 - //we found myself
13.214 - if (before) {
13.215 - if (i == 0) {
13.216 - //we are first node, no sibling before
13.217 - return null;
13.218 - } else {
13.219 - return children.get(i - 1);
13.220 - }
13.221 - } else {
13.222 - //after
13.223 - if (i == children.size() - 1) {
13.224 - //we are last node, no sibling after
13.225 - return null;
13.226 - } else {
13.227 - return children.get(i + 1);
13.228 - }
13.229 - }
13.230 - }
13.231 - }
13.232 - return sibling;
13.233 - }
13.234 -
13.235 - public static Node query(Node base, String path) {
13.236 - return query(base, path, false);
13.237 - }
13.238 -
13.239 - /** find an Node according to the given tree path
13.240 - * example of path: declaration/property|1/color -- find a second color property (index from zero)
13.241 - */
13.242 - public static Node query(Node base, String path, boolean caseInsensitive) {
13.243 - StringTokenizer st = new StringTokenizer(path, "/");
13.244 - Node found = base;
13.245 - while (st.hasMoreTokens()) {
13.246 - String token = st.nextToken();
13.247 - int indexDelim = token.indexOf('|');
13.248 -
13.249 - String nodeName = indexDelim >= 0 ? token.substring(0, indexDelim) : token;
13.250 - if (caseInsensitive) {
13.251 - nodeName = nodeName.toLowerCase(Locale.ENGLISH);
13.252 - }
13.253 - String sindex = indexDelim >= 0 ? token.substring(indexDelim + 1, token.length()) : "0";
13.254 - int index = Integer.parseInt(sindex);
13.255 -
13.256 - int count = 0;
13.257 - Node foundLocal = null;
13.258 - for (Node child : found.children()) {
13.259 - String childName = child.name();
13.260 - if ((caseInsensitive ? childName = childName.toLowerCase(Locale.ENGLISH) : childName).equals(nodeName) && count++ == index) {
13.261 - foundLocal = child;
13.262 - break;
13.263 - }
13.264 - }
13.265 - if (foundLocal != null) {
13.266 - found = foundLocal;
13.267 -
13.268 - if (!st.hasMoreTokens()) {
13.269 - //last token, we may return
13.270 - assert found.name().equals(nodeName);
13.271 - return found;
13.272 - }
13.273 -
13.274 - } else {
13.275 - System.err.println(String.format("NodeUtil.query: Could find child '%s' in the node '%s'!", nodeName, found.name()));
13.276 - return null; //no found
13.277 - }
13.278 - }
13.279 -
13.280 - return null;
13.281 - }
13.282 -
13.283 - public static void dumpTree(Node node) {
13.284 - PrintWriter pw = new PrintWriter(System.out);
13.285 - dumpTree(node, pw);
13.286 - pw.flush();
13.287 - }
13.288 -
13.289 - public static void dumpTree(Node node, PrintWriter pw) {
13.290 - dump(node, 0, pw);
13.291 -
13.292 - }
13.293 -
13.294 - private static void dump(Node tree, int level, PrintWriter pw) {
13.295 - for (int i = 0; i < level; i++) {
13.296 - pw.print(INDENT);
13.297 - }
13.298 - pw.print(tree.toString());
13.299 - pw.println();
13.300 - for (Node c : tree.children()) {
13.301 - dump(c, level + 1, pw);
13.302 - }
13.303 - }
13.304 -
13.305 -
13.306 - public static boolean isOfType(Node node, NodeType... types) {
13.307 - for(NodeType type : types) {
13.308 - if(node.type() == type) {
13.309 - return true;
13.310 - }
13.311 - }
13.312 - return false;
13.313 - }
13.314 -
13.315 -// public static boolean containsError(Node node) {
13.316 -// AtomicBoolean error = new AtomicBoolean(false);
13.317 -// NodeVisitor<AtomicBoolean> visitor = new NodeVisitor<AtomicBoolean>(error) {
13.318 -//
13.319 -// @Override
13.320 -// public boolean visit(Node node) {
13.321 -// if(node.type() == NodeType.error) {
13.322 -// getResult().set(true);
13.323 -// return true;
13.324 -// }
13.325 -// return false;
13.326 -// }
13.327 -// };
13.328 -//
13.329 -// visitor.visitChildren(node);
13.330 -//
13.331 -// return visitor.getResult().get();
13.332 -// }
13.333 -}
14.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/NodeVisitor.java Mon Jan 14 15:49:47 2013 +0100
14.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
14.3 @@ -1,142 +0,0 @@
14.4 -/*
14.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
14.6 - *
14.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
14.8 - *
14.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
14.10 - * Other names may be trademarks of their respective owners.
14.11 - *
14.12 - * The contents of this file are subject to the terms of either the GNU
14.13 - * General Public License Version 2 only ("GPL") or the Common
14.14 - * Development and Distribution License("CDDL") (collectively, the
14.15 - * "License"). You may not use this file except in compliance with the
14.16 - * License. You can obtain a copy of the License at
14.17 - * http://www.netbeans.org/cddl-gplv2.html
14.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
14.19 - * specific language governing permissions and limitations under the
14.20 - * License. When distributing the software, include this License Header
14.21 - * Notice in each file and include the License file at
14.22 - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
14.23 - * particular file as subject to the "Classpath" exception as provided
14.24 - * by Oracle in the GPL Version 2 section of the License file that
14.25 - * accompanied this code. If applicable, add the following below the
14.26 - * License Header, with the fields enclosed by brackets [] replaced by
14.27 - * your own identifying information:
14.28 - * "Portions Copyrighted [year] [name of copyright owner]"
14.29 - *
14.30 - * If you wish your version of this file to be governed by only the CDDL
14.31 - * or only the GPL Version 2, indicate your decision by adding
14.32 - * "[Contributor] elects to include this software in this distribution
14.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
14.34 - * single choice of license, a recipient has the option to distribute
14.35 - * your version of this file under either the CDDL, the GPL Version 2 or
14.36 - * to extend the choice of license to its licensees as provided above.
14.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
14.38 - * Version 2 license, then the option applies only if the new code is
14.39 - * made subject to such option by the copyright holder.
14.40 - *
14.41 - * Contributor(s):
14.42 - *
14.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
14.44 - */
14.45 -package org.netbeans.modules.antlr.editor;
14.46 -
14.47 -import java.util.Collection;
14.48 -import java.util.List;
14.49 -
14.50 -/**
14.51 - * Allows to visit the css source parse trees.
14.52 - *
14.53 - * @author marekfukala
14.54 - */
14.55 -public abstract class NodeVisitor<T> {
14.56 -
14.57 - private T result;
14.58 - private boolean cancelled = false;
14.59 -
14.60 -
14.61 - public NodeVisitor(T result) {
14.62 - this.result = result;
14.63 - }
14.64 -
14.65 - public NodeVisitor() {
14.66 - this(null);
14.67 - }
14.68 -
14.69 - /**
14.70 - * Performs the given node visit.
14.71 - * @param node
14.72 - * @return true if the visiting process should be interrupted
14.73 - */
14.74 - public abstract boolean visit(Node node);
14.75 -
14.76 - public T getResult() {
14.77 - return result;
14.78 - }
14.79 -
14.80 - /**
14.81 - * Implementors may use this flag to possibly stop the visit(...) method
14.82 - * execution. The nodes recursive visiting is canceled automatically once
14.83 - * cancel() method is called.
14.84 - *
14.85 - * @return true if the visitor should stop performing the code.
14.86 - */
14.87 - protected boolean isCancelled() {
14.88 - return cancelled;
14.89 - }
14.90 -
14.91 - public void cancel() {
14.92 - cancelled = true;
14.93 - }
14.94 -
14.95 - public void visitAncestors(Node node) {
14.96 - Node parent = node.parent();
14.97 - if (parent != null) {
14.98 - if(isCancelled()) {
14.99 - return ;
14.100 - }
14.101 - if(visit(parent)) {
14.102 - return; //visiting stopped by the visitor
14.103 - }
14.104 - visitAncestors(parent);
14.105 - }
14.106 - }
14.107 -
14.108 - public Node visitChildren(Node node) {
14.109 - List<Node> children = node.children();
14.110 - if (children != null) {
14.111 - for (Node child : children) {
14.112 - if(isCancelled()) {
14.113 - return null;
14.114 - }
14.115 - if(visit(child)) {
14.116 - return child; //visiting stopped by the visitor
14.117 - }
14.118 - //recursion
14.119 - Node breakNode = visitChildren(child);
14.120 - if(breakNode != null) {
14.121 - return breakNode;
14.122 - }
14.123 - }
14.124 - }
14.125 - return null;
14.126 - }
14.127 -
14.128 - public static <TE> void visitChildren(Node node, Collection<NodeVisitor<TE>> visitors) {
14.129 - List<Node> children = node.children();
14.130 - if (children != null) {
14.131 - for (Node child : children) {
14.132 - for(NodeVisitor v : visitors) {
14.133 - if(v.isCancelled()) {
14.134 - continue; //skip the cancelled visitors
14.135 - }
14.136 - v.visit(child);
14.137 - }
14.138 - //recursion
14.139 - visitChildren(child, visitors);
14.140 - }
14.141 - }
14.142 - }
14.143 -
14.144 -
14.145 -}
15.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ProblemDescription.java Mon Jan 14 15:49:47 2013 +0100
15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
15.3 @@ -1,137 +0,0 @@
15.4 -/*
15.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
15.6 - *
15.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
15.8 - *
15.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
15.10 - * Other names may be trademarks of their respective owners.
15.11 - *
15.12 - * The contents of this file are subject to the terms of either the GNU
15.13 - * General Public License Version 2 only ("GPL") or the Common
15.14 - * Development and Distribution License("CDDL") (collectively, the
15.15 - * "License"). You may not use this file except in compliance with the
15.16 - * License. You can obtain a copy of the License at
15.17 - * http://www.netbeans.org/cddl-gplv2.html
15.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15.19 - * specific language governing permissions and limitations under the
15.20 - * License. When distributing the software, include this License Header
15.21 - * Notice in each file and include the License file at
15.22 - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
15.23 - * particular file as subject to the "Classpath" exception as provided
15.24 - * by Oracle in the GPL Version 2 section of the License file that
15.25 - * accompanied this code. If applicable, add the following below the
15.26 - * License Header, with the fields enclosed by brackets [] replaced by
15.27 - * your own identifying information:
15.28 - * "Portions Copyrighted [year] [name of copyright owner]"
15.29 - *
15.30 - * If you wish your version of this file to be governed by only the CDDL
15.31 - * or only the GPL Version 2, indicate your decision by adding
15.32 - * "[Contributor] elects to include this software in this distribution
15.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
15.34 - * single choice of license, a recipient has the option to distribute
15.35 - * your version of this file under either the CDDL, the GPL Version 2 or
15.36 - * to extend the choice of license to its licensees as provided above.
15.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
15.38 - * Version 2 license, then the option applies only if the new code is
15.39 - * made subject to such option by the copyright holder.
15.40 - *
15.41 - * Contributor(s):
15.42 - *
15.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
15.44 - */
15.45 -package org.netbeans.modules.antlr.editor;
15.46 -
15.47 -/**
15.48 - * Representation of an error in css source.
15.49 - *
15.50 - * @author marekfukala
15.51 - */
15.52 -public final class ProblemDescription {
15.53 -
15.54 - public enum Type {
15.55 - INFO, WARNING, ERROR, FATAL;
15.56 - }
15.57 -
15.58 - public enum Keys {
15.59 - LEXING, PARSING, AST;
15.60 - }
15.61 -
15.62 - private final int from, to;
15.63 - private final String description;
15.64 - private final String key;
15.65 - private Type type;
15.66 -
15.67 - public ProblemDescription(int from, int to, String description, String key, Type type) {
15.68 - this.from = from;
15.69 - this.to = to;
15.70 - this.description = description;
15.71 - this.key = key;
15.72 - this.type = type;
15.73 - }
15.74 -
15.75 - public String getDescription() {
15.76 - return description;
15.77 - }
15.78 -
15.79 - public int getFrom() {
15.80 - return from;
15.81 - }
15.82 -
15.83 - public String getKey() {
15.84 - return key;
15.85 - }
15.86 -
15.87 - public int getTo() {
15.88 - return to;
15.89 - }
15.90 -
15.91 - public Type getType() {
15.92 - return type;
15.93 - }
15.94 -
15.95 - @Override
15.96 - public String toString() {
15.97 - return "ProblemDescription{" + "from=" + from + ", to=" + to + ", description=" + description + ", key=" + key + ", type=" + type + '}';
15.98 - }
15.99 -
15.100 - @Override
15.101 - public boolean equals(Object obj) {
15.102 - if (obj == null) {
15.103 - return false;
15.104 - }
15.105 - if (getClass() != obj.getClass()) {
15.106 - return false;
15.107 - }
15.108 - final ProblemDescription other = (ProblemDescription) obj;
15.109 - if (this.from != other.from) {
15.110 - return false;
15.111 - }
15.112 - if (this.to != other.to) {
15.113 - return false;
15.114 - }
15.115 - if ((this.description == null) ? (other.description != null) : !this.description.equals(other.description)) {
15.116 - return false;
15.117 - }
15.118 - if ((this.key == null) ? (other.key != null) : !this.key.equals(other.key)) {
15.119 - return false;
15.120 - }
15.121 - if (this.type != other.type) {
15.122 - return false;
15.123 - }
15.124 - return true;
15.125 - }
15.126 -
15.127 - @Override
15.128 - public int hashCode() {
15.129 - int hash = 5;
15.130 - hash = 19 * hash + this.from;
15.131 - hash = 19 * hash + this.to;
15.132 - hash = 19 * hash + (this.description != null ? this.description.hashCode() : 0);
15.133 - hash = 19 * hash + (this.key != null ? this.key.hashCode() : 0);
15.134 - hash = 19 * hash + (this.type != null ? this.type.hashCode() : 0);
15.135 - return hash;
15.136 - }
15.137 -
15.138 -
15.139 -
15.140 -}
16.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/RootNode.java Mon Jan 14 15:49:47 2013 +0100
16.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
16.3 @@ -1,65 +0,0 @@
16.4 -/*
16.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
16.6 - *
16.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
16.8 - *
16.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
16.10 - * Other names may be trademarks of their respective owners.
16.11 - *
16.12 - * The contents of this file are subject to the terms of either the GNU
16.13 - * General Public License Version 2 only ("GPL") or the Common
16.14 - * Development and Distribution License("CDDL") (collectively, the
16.15 - * "License"). You may not use this file except in compliance with the
16.16 - * License. You can obtain a copy of the License at
16.17 - * http://www.netbeans.org/cddl-gplv2.html
16.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16.19 - * specific language governing permissions and limitations under the
16.20 - * License. When distributing the software, include this License Header
16.21 - * Notice in each file and include the License file at
16.22 - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
16.23 - * particular file as subject to the "Classpath" exception as provided
16.24 - * by Oracle in the GPL Version 2 section of the License file that
16.25 - * accompanied this code. If applicable, add the following below the
16.26 - * License Header, with the fields enclosed by brackets [] replaced by
16.27 - * your own identifying information:
16.28 - * "Portions Copyrighted [year] [name of copyright owner]"
16.29 - *
16.30 - * If you wish your version of this file to be governed by only the CDDL
16.31 - * or only the GPL Version 2, indicate your decision by adding
16.32 - * "[Contributor] elects to include this software in this distribution
16.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
16.34 - * single choice of license, a recipient has the option to distribute
16.35 - * your version of this file under either the CDDL, the GPL Version 2 or
16.36 - * to extend the choice of license to its licensees as provided above.
16.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
16.38 - * Version 2 license, then the option applies only if the new code is
16.39 - * made subject to such option by the copyright holder.
16.40 - *
16.41 - * Contributor(s):
16.42 - *
16.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
16.44 - */
16.45 -package org.netbeans.modules.antlr.editor;
16.46 -
16.47 -
16.48 -/**
16.49 - *
16.50 - * @author marekfukala
16.51 - */
16.52 -public class RootNode extends RuleNode {
16.53 -
16.54 - public RootNode(CharSequence source) {
16.55 - super(NodeType.root, source);
16.56 - }
16.57 -
16.58 - @Override
16.59 - public int from() {
16.60 - return 0;
16.61 - }
16.62 -
16.63 - @Override
16.64 - public int to() {
16.65 - return getSource().length();
16.66 - }
16.67 -
16.68 -}
17.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/RuleNode.java Mon Jan 14 15:49:47 2013 +0100
17.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
17.3 @@ -1,91 +0,0 @@
17.4 -/*
17.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
17.6 - *
17.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
17.8 - *
17.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
17.10 - * Other names may be trademarks of their respective owners.
17.11 - *
17.12 - * The contents of this file are subject to the terms of either the GNU
17.13 - * General Public License Version 2 only ("GPL") or the Common
17.14 - * Development and Distribution License("CDDL") (collectively, the
17.15 - * "License"). You may not use this file except in compliance with the
17.16 - * License. You can obtain a copy of the License at
17.17 - * http://www.netbeans.org/cddl-gplv2.html
17.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
17.19 - * specific language governing permissions and limitations under the
17.20 - * License. When distributing the software, include this License Header
17.21 - * Notice in each file and include the License file at
17.22 - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
17.23 - * particular file as subject to the "Classpath" exception as provided
17.24 - * by Oracle in the GPL Version 2 section of the License file that
17.25 - * accompanied this code. If applicable, add the following below the
17.26 - * License Header, with the fields enclosed by brackets [] replaced by
17.27 - * your own identifying information:
17.28 - * "Portions Copyrighted [year] [name of copyright owner]"
17.29 - *
17.30 - * If you wish your version of this file to be governed by only the CDDL
17.31 - * or only the GPL Version 2, indicate your decision by adding
17.32 - * "[Contributor] elects to include this software in this distribution
17.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
17.34 - * single choice of license, a recipient has the option to distribute
17.35 - * your version of this file under either the CDDL, the GPL Version 2 or
17.36 - * to extend the choice of license to its licensees as provided above.
17.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
17.38 - * Version 2 license, then the option applies only if the new code is
17.39 - * made subject to such option by the copyright holder.
17.40 - *
17.41 - * Contributor(s):
17.42 - *
17.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
17.44 - */
17.45 -package org.netbeans.modules.antlr.editor;
17.46 -
17.47 -import org.antlr.runtime.CommonToken;
17.48 -
17.49 -/**
17.50 - *
17.51 - * @author marekfukala
17.52 - */
17.53 -public class RuleNode extends AbstractParseTreeNode {
17.54 -
17.55 - private NodeType rule;
17.56 - int from = -1, to = -1;
17.57 -
17.58 - RuleNode(NodeType rule, CharSequence source) {
17.59 - super(source);
17.60 - this.rule = rule;
17.61 - }
17.62 -
17.63 - //used by NbParseTreeBuilder
17.64 - void setFirstToken(CommonToken token) {
17.65 - assert token != null : "Attempting to set null first token in rule " + name();
17.66 - this.from = CommonTokenUtil.getCommonTokenOffsetRange(token)[0];
17.67 - }
17.68 -
17.69 - void setLastToken(CommonToken token) {
17.70 - assert token != null : "Attempting to set null last token in rule " + name();
17.71 - this.to = CommonTokenUtil.getCommonTokenOffsetRange(token)[1];
17.72 - }
17.73 -
17.74 - @Override
17.75 - public int from() {
17.76 - return from;
17.77 - }
17.78 -
17.79 - @Override
17.80 - public int to() {
17.81 - return to;
17.82 - }
17.83 -
17.84 - @Override
17.85 - public NodeType type() {
17.86 - return rule;
17.87 - }
17.88 -
17.89 - @Override
17.90 - public String name() {
17.91 - return type().name();
17.92 - }
17.93 -
17.94 -}
18.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/TokenNode.java Mon Jan 14 15:49:47 2013 +0100
18.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
18.3 @@ -1,109 +0,0 @@
18.4 -/*
18.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
18.6 - *
18.7 - * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
18.8 - *
18.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
18.10 - * Other names may be trademarks of their respective owners.
18.11 - *
18.12 - * The contents of this file are subject to the terms of either the GNU
18.13 - * General Public License Version 2 only ("GPL") or the Common
18.14 - * Development and Distribution License("CDDL") (collectively, the
18.15 - * "License"). You may not use this file except in compliance with the
18.16 - * License. You can obtain a copy of the License at
18.17 - * http://www.netbeans.org/cddl-gplv2.html
18.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
18.19 - * specific language governing permissions and limitations under the
18.20 - * License. When distributing the software, include this License Header
18.21 - * Notice in each file and include the License file at
18.22 - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
18.23 - * particular file as subject to the "Classpath" exception as provided
18.24 - * by Oracle in the GPL Version 2 section of the License file that
18.25 - * accompanied this code. If applicable, add the following below the
18.26 - * License Header, with the fields enclosed by brackets [] replaced by
18.27 - * your own identifying information:
18.28 - * "Portions Copyrighted [year] [name of copyright owner]"
18.29 - *
18.30 - * If you wish your version of this file to be governed by only the CDDL
18.31 - * or only the GPL Version 2, indicate your decision by adding
18.32 - * "[Contributor] elects to include this software in this distribution
18.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
18.34 - * single choice of license, a recipient has the option to distribute
18.35 - * your version of this file under either the CDDL, the GPL Version 2 or
18.36 - * to extend the choice of license to its licensees as provided above.
18.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
18.38 - * Version 2 license, then the option applies only if the new code is
18.39 - * made subject to such option by the copyright holder.
18.40 - *
18.41 - * Contributor(s):
18.42 - *
18.43 - * Portions Copyrighted 2011 Sun Microsystems, Inc.
18.44 - */
18.45 -package org.netbeans.modules.antlr.editor;
18.46 -
18.47 -import org.antlr.runtime.CommonToken;
18.48 -
18.49 -/**
18.50 - *
18.51 - * @author marekfukala
18.52 - */
18.53 -public class TokenNode extends AbstractParseTreeNode {
18.54 -
18.55 - private final int from, to;
18.56 - private AntlrTokenId tokenId;
18.57 -
18.58 - public TokenNode(CharSequence source, CommonToken token) {
18.59 - super(source);
18.60 - int[] range = CommonTokenUtil.getCommonTokenOffsetRange(token);
18.61 - from = range[0];
18.62 - to = range[1];
18.63 - tokenId = AntlrTokenId.forTokenTypeCode(token.getType());
18.64 - }
18.65 -
18.66 - @Override
18.67 - public String name() {
18.68 - return image().toString();
18.69 - }
18.70 -
18.71 - @Override
18.72 - public NodeType type() {
18.73 - return NodeType.token;
18.74 - }
18.75 -
18.76 - /**
18.77 - * Gets the kind of the token encapsulated by this TokenNode. Please notice
18.78 - * that it's not possible to get the token itself since the parser source
18.79 - * is not a stream of the netbeans tokens, but tokens generated by the antlr lexer.
18.80 - */
18.81 - public AntlrTokenId getTokenId() {
18.82 - return tokenId;
18.83 - }
18.84 -
18.85 - @Override
18.86 - public int from() {
18.87 - return from;
18.88 - }
18.89 -
18.90 - @Override
18.91 - public int to() {
18.92 - return to;
18.93 - }
18.94 -
18.95 - @Override
18.96 - public String toString() {
18.97 - return new StringBuilder(super.toString())
18.98 - .append(' ')
18.99 - .append('\'')
18.100 - .append(escapeNL(image()))
18.101 - .append('\'')
18.102 - .append(' ')
18.103 - .append('[')
18.104 - .append(getTokenId())
18.105 - .append(']')
18.106 - .toString();
18.107 - }
18.108 -
18.109 - private CharSequence escapeNL(CharSequence text) {
18.110 - return text.toString().replaceAll("\n", "\\\\n");
18.111 - }
18.112 -}
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
19.2 +++ b/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/Utils.java Tue Jan 15 10:42:04 2013 +0100
19.3 @@ -0,0 +1,108 @@
19.4 +/*
19.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
19.6 + *
19.7 + * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
19.8 + *
19.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
19.10 + * Other names may be trademarks of their respective owners.
19.11 + *
19.12 + * The contents of this file are subject to the terms of either the GNU
19.13 + * General Public License Version 2 only ("GPL") or the Common
19.14 + * Development and Distribution License("CDDL") (collectively, the
19.15 + * "License"). You may not use this file except in compliance with the
19.16 + * License. You can obtain a copy of the License at
19.17 + * http://www.netbeans.org/cddl-gplv2.html
19.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
19.19 + * specific language governing permissions and limitations under the
19.20 + * License. When distributing the software, include this License Header
19.21 + * Notice in each file and include the License file at
19.22 + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
19.23 + * particular file as subject to the "Classpath" exception as provided
19.24 + * by Oracle in the GPL Version 2 section of the License file that
19.25 + * accompanied this code. If applicable, add the following below the
19.26 + * License Header, with the fields enclosed by brackets [] replaced by
19.27 + * your own identifying information:
19.28 + * "Portions Copyrighted [year] [name of copyright owner]"
19.29 + *
19.30 + * If you wish your version of this file to be governed by only the CDDL
19.31 + * or only the GPL Version 2, indicate your decision by adding
19.32 + * "[Contributor] elects to include this software in this distribution
19.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
19.34 + * single choice of license, a recipient has the option to distribute
19.35 + * your version of this file under either the CDDL, the GPL Version 2 or
19.36 + * to extend the choice of license to its licensees as provided above.
19.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
19.38 + * Version 2 license, then the option applies only if the new code is
19.39 + * made subject to such option by the copyright holder.
19.40 + *
19.41 + * Contributor(s):
19.42 + *
19.43 + * Portions Copyrighted 2013 Sun Microsystems, Inc.
19.44 + */
19.45 +package org.netbeans.modules.antlr.editor;
19.46 +
19.47 +import java.io.PrintWriter;
19.48 +import org.antlr.runtime.CommonToken;
19.49 +import org.antlr.runtime.tree.Tree;
19.50 +import org.netbeans.modules.antlr.editor.gen.ANTLRv3Parser;
19.51 +
19.52 +/**
19.53 + *
19.54 + * @author marekfukala
19.55 + */
19.56 +public class Utils {
19.57 +
19.58 + /**
19.59 + * Returns a pointer to the start and end of the token image in the
19.60 + * underlaying stream. The token.getStopIndex() points to the last character
19.61 + * of the token which is a bit confusing.
19.62 + *
19.63 + * Use this method to get CommonToken's boundaries instead of using the
19.64 + * getStart/StopIndex methods.
19.65 + *
19.66 + * @return two members array - arr[0] is the start offset, arr[1] is the end
19.67 + * offset
19.68 + */
19.69 + public static int[] getCommonTokenOffsetRange(CommonToken token) {
19.70 + if (token.getType() == CommonToken.EOF) {
19.71 + //"eof token" points at the end offset of the source, with zero length
19.72 + return new int[]{token.getStartIndex(), token.getStopIndex()};
19.73 + } else {
19.74 + return new int[]{token.getStartIndex(), token.getStopIndex() + 1};
19.75 + }
19.76 +
19.77 + }
19.78 +
19.79 + public static void dumpTree(Tree node) {
19.80 + PrintWriter pw = new PrintWriter(System.out);
19.81 + dumpTree(node, pw);
19.82 + pw.flush();
19.83 + }
19.84 +
19.85 + public static void dumpTree(Tree node, PrintWriter pw) {
19.86 + dump(node, 0, pw);
19.87 +
19.88 + }
19.89 +
19.90 + private static void dump(Tree tree, int level, PrintWriter pw) {
19.91 + for (int i = 0; i < level; i++) {
19.92 + pw.print(" ");
19.93 + }
19.94 + pw.print(tree2String(tree));
19.95 + pw.println();
19.96 + for (int i = 0; i < tree.getChildCount(); i++) {
19.97 + Tree child = tree.getChild(i);
19.98 + dump(child, level + 1, pw);
19.99 + }
19.100 + }
19.101 +
19.102 + public static String tree2String(Tree t) {
19.103 + return String.format("type = %s, line = %s, fi = %s, ti = %s, text = %s",
19.104 + ANTLRv3Parser.tokenNames[t.getType()],
19.105 + t.getLine(),
19.106 + t.getTokenStartIndex(),
19.107 + t.getTokenStopIndex(),
19.108 + t.getText());
19.109 + }
19.110 +
19.111 +}
20.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/gen/ANTLRv3Lexer.java Mon Jan 14 15:49:47 2013 +0100
20.2 +++ b/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/gen/ANTLRv3Lexer.java Tue Jan 15 10:42:04 2013 +0100
20.3 @@ -1,4 +1,4 @@
20.4 -// $ANTLR 3.3 Nov 30, 2010 12:50:56 /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g 2013-01-14 14:05:31
20.5 +// $ANTLR 3.3 Nov 30, 2010 12:50:56 /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g 2013-01-15 09:43:04
20.6
20.7 package org.netbeans.modules.antlr.editor.gen;
20.8
21.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/gen/ANTLRv3Parser.java Mon Jan 14 15:49:47 2013 +0100
21.2 +++ b/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/gen/ANTLRv3Parser.java Tue Jan 15 10:42:04 2013 +0100
21.3 @@ -1,4 +1,4 @@
21.4 -// $ANTLR 3.3 Nov 30, 2010 12:50:56 /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g 2013-01-14 14:05:30
21.5 +// $ANTLR 3.3 Nov 30, 2010 12:50:56 /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g 2013-01-15 09:43:03
21.6
21.7 package org.netbeans.modules.antlr.editor.gen;
21.8
21.9 @@ -9,13 +9,11 @@
21.10 import java.util.ArrayList;
21.11 import java.util.Map;
21.12 import java.util.HashMap;
21.13 -import org.antlr.runtime.debug.*;
21.14 -import java.io.IOException;
21.15
21.16 import org.antlr.runtime.tree.*;
21.17
21.18 /** ANTLR v3 grammar written in ANTLR v3 with AST construction */
21.19 -public class ANTLRv3Parser extends DebugParser {
21.20 +public class ANTLRv3Parser extends Parser {
21.21 public static final String[] tokenNames = new String[] {
21.22 "<invalid>", "<EOR>", "<DOWN>", "<UP>", "DOC_COMMENT", "PARSER", "LEXER", "RULE", "BLOCK", "OPTIONAL", "CLOSURE", "POSITIVE_CLOSURE", "SYNPRED", "RANGE", "CHAR_RANGE", "EPSILON", "ALT", "EOR", "EOB", "EOA", "ID", "ARG", "ARGLIST", "RET", "LEXER_GRAMMAR", "PARSER_GRAMMAR", "TREE_GRAMMAR", "COMBINED_GRAMMAR", "INITACTION", "LABEL", "TEMPLATE", "SCOPE", "SEMPRED", "GATED_SEMPRED", "SYN_SEMPRED", "BACKTRACK_SEMPRED", "FRAGMENT", "TREE_BEGIN", "ROOT", "BANG", "REWRITE", "TOKENS", "TOKEN_REF", "STRING_LITERAL", "CHAR_LITERAL", "ACTION", "OPTIONS", "INT", "ARG_ACTION", "RULE_REF", "DOUBLE_QUOTE_STRING_LITERAL", "DOUBLE_ANGLE_STRING_LITERAL", "SRC", "SL_COMMENT", "ML_COMMENT", "LITERAL_CHAR", "ESC", "XDIGIT", "NESTED_ARG_ACTION", "ACTION_STRING_LITERAL", "ACTION_CHAR_LITERAL", "NESTED_ACTION", "ACTION_ESC", "WS_LOOP", "WS", "'lexer'", "'parser'", "'tree'", "'grammar'", "';'", "'}'", "'='", "'@'", "'::'", "'*'", "'protected'", "'public'", "'private'", "'returns'", "':'", "'throws'", "','", "'('", "'|'", "')'", "'catch'", "'finally'", "'+='", "'=>'", "'~'", "'?'", "'+'", "'.'", "'$'"
21.23 };
21.24 @@ -114,79 +112,24 @@
21.25 // delegates
21.26 // delegators
21.27
21.28 - public static final String[] ruleNames = new String[] {
21.29 - "invalidRule", "ebnf", "finallyClause", "notSet", "option", "attrScope",
21.30 - "element", "tokensSpec", "treeSpec", "ruleScopeSpec", "tokenSpec",
21.31 - "rewrite_tree_ebnf", "optionsSpec", "rewrite_template_ref", "throwsSpec",
21.32 - "exceptionGroup", "ebnfSuffix", "rewrite_alternative", "rewrite_tree",
21.33 - "synpred1_ANTLRv3", "elementNoOptionSpec", "block", "rule", "rewrite_template",
21.34 - "rewrite_tree_alternative", "terminal", "rewrite_tree_block", "range",
21.35 - "rewrite_tree_atom", "altList", "rewrite_template_arg", "rewrite",
21.36 - "action", "rewrite_tree_element", "ruleAction", "grammarDef", "synpred2_ANTLRv3",
21.37 - "actionScopeName", "id", "rewrite_template_args", "notTerminal",
21.38 - "optionValue", "alternative", "atom", "rewrite_indirect_template_head",
21.39 - "exceptionHandler"
21.40 - };
21.41 - public static final boolean[] decisionCanBacktrack = new boolean[] {
21.42 - false, // invalid decision
21.43 - false, false, false, false, false, false, false, false, false, false,
21.44 - false, false, false, false, false, false, false, false, false,
21.45 - false, false, false, false, false, false, false, false, false,
21.46 - false, false, false, false, false, false, false, false, false,
21.47 - false, false, false, false, false, false, false, false, false,
21.48 - false, false, false, false, false, false, false, false, false,
21.49 - false, false, false, false, false, false, false, false, true,
21.50 - false, false, false, false, false, false, false, false, false,
21.51 - false, false
21.52 - };
21.53 -
21.54 -
21.55 - public int ruleLevel = 0;
21.56 - public int getRuleLevel() { return ruleLevel; }
21.57 - public void incRuleLevel() { ruleLevel++; }
21.58 - public void decRuleLevel() { ruleLevel--; }
21.59 +
21.60 public ANTLRv3Parser(TokenStream input) {
21.61 - this(input, DebugEventSocketProxy.DEFAULT_DEBUGGER_PORT, new RecognizerSharedState());
21.62 - }
21.63 - public ANTLRv3Parser(TokenStream input, int port, RecognizerSharedState state) {
21.64 + this(input, new RecognizerSharedState());
21.65 + }
21.66 + public ANTLRv3Parser(TokenStream input, RecognizerSharedState state) {
21.67 super(input, state);
21.68 - DebugEventSocketProxy proxy =
21.69 - new DebugEventSocketProxy(this,port,adaptor);
21.70 - setDebugListener(proxy);
21.71 - setTokenStream(new DebugTokenStream(input,proxy));
21.72 - try {
21.73 - proxy.handshake();
21.74 - }
21.75 - catch (IOException ioe) {
21.76 - reportError(ioe);
21.77 - }
21.78 - TreeAdaptor adap = new CommonTreeAdaptor();
21.79 - setTreeAdaptor(adap);
21.80 - proxy.setTreeAdaptor(adap);
21.81 - }
21.82 - public ANTLRv3Parser(TokenStream input, DebugEventListener dbg) {
21.83 - super(input, dbg);
21.84 -
21.85 -
21.86 - TreeAdaptor adap = new CommonTreeAdaptor();
21.87 - setTreeAdaptor(adap);
21.88 -
21.89 - }
21.90 - protected boolean evalPredicate(boolean result, String predicate) {
21.91 - dbg.semanticPredicate(result, predicate);
21.92 - return result;
21.93 - }
21.94 -
21.95 - protected DebugTreeAdaptor adaptor;
21.96 +
21.97 + }
21.98 +
21.99 + protected TreeAdaptor adaptor = new CommonTreeAdaptor();
21.100 +
21.101 public void setTreeAdaptor(TreeAdaptor adaptor) {
21.102 - this.adaptor = new DebugTreeAdaptor(dbg,adaptor);
21.103 -
21.104 + this.adaptor = adaptor;
21.105 }
21.106 public TreeAdaptor getTreeAdaptor() {
21.107 return adaptor;
21.108 }
21.109
21.110 -
21.111 public String[] getTokenNames() { return ANTLRv3Parser.tokenNames; }
21.112 public String getGrammarFileName() { return "/Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g"; }
21.113
21.114 @@ -247,37 +190,21 @@
21.115 RewriteRuleSubtreeStream stream_rule=new RewriteRuleSubtreeStream(adaptor,"rule rule");
21.116 RewriteRuleSubtreeStream stream_action=new RewriteRuleSubtreeStream(adaptor,"rule action");
21.117 RewriteRuleSubtreeStream stream_optionsSpec=new RewriteRuleSubtreeStream(adaptor,"rule optionsSpec");
21.118 - try { dbg.enterRule(getGrammarFileName(), "grammarDef");
21.119 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.120 - incRuleLevel();
21.121 - dbg.location(89, 1);
21.122 -
21.123 try {
21.124 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:90:5: ( ( DOC_COMMENT )? ( 'lexer' | 'parser' | 'tree' | ) g= 'grammar' id ';' ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ EOF -> ^( id ( DOC_COMMENT )? ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ ) )
21.125 - dbg.enterAlt(1);
21.126 -
21.127 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:90:9: ( DOC_COMMENT )? ( 'lexer' | 'parser' | 'tree' | ) g= 'grammar' id ';' ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ EOF
21.128 {
21.129 - dbg.location(90,9);
21.130 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:90:9: ( DOC_COMMENT )?
21.131 int alt1=2;
21.132 - try { dbg.enterSubRule(1);
21.133 - try { dbg.enterDecision(1, decisionCanBacktrack[1]);
21.134 -
21.135 int LA1_0 = input.LA(1);
21.136
21.137 if ( (LA1_0==DOC_COMMENT) ) {
21.138 alt1=1;
21.139 }
21.140 - } finally {dbg.exitDecision(1);}
21.141 -
21.142 switch (alt1) {
21.143 case 1 :
21.144 - dbg.enterAlt(1);
21.145 -
21.146 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:90:9: DOC_COMMENT
21.147 {
21.148 - dbg.location(90,9);
21.149 DOC_COMMENT1=(Token)match(input,DOC_COMMENT,FOLLOW_DOC_COMMENT_in_grammarDef343); if (state.failed) return retval;
21.150 if ( state.backtracking==0 ) stream_DOC_COMMENT.add(DOC_COMMENT1);
21.151
21.152 @@ -286,14 +213,9 @@
21.153 break;
21.154
21.155 }
21.156 - } finally {dbg.exitSubRule(1);}
21.157 -
21.158 - dbg.location(91,6);
21.159 +
21.160 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:91:6: ( 'lexer' | 'parser' | 'tree' | )
21.161 int alt2=4;
21.162 - try { dbg.enterSubRule(2);
21.163 - try { dbg.enterDecision(2, decisionCanBacktrack[2]);
21.164 -
21.165 switch ( input.LA(1) ) {
21.166 case 65:
21.167 {
21.168 @@ -320,23 +242,16 @@
21.169 NoViableAltException nvae =
21.170 new NoViableAltException("", 2, 0, input);
21.171
21.172 - dbg.recognitionException(nvae);
21.173 throw nvae;
21.174 }
21.175
21.176 - } finally {dbg.exitDecision(2);}
21.177 -
21.178 switch (alt2) {
21.179 case 1 :
21.180 - dbg.enterAlt(1);
21.181 -
21.182 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:91:8: 'lexer'
21.183 {
21.184 - dbg.location(91,8);
21.185 string_literal2=(Token)match(input,65,FOLLOW_65_in_grammarDef353); if (state.failed) return retval;
21.186 if ( state.backtracking==0 ) stream_65.add(string_literal2);
21.187
21.188 - dbg.location(91,17);
21.189 if ( state.backtracking==0 ) {
21.190 gtype=LEXER_GRAMMAR;
21.191 }
21.192 @@ -344,15 +259,11 @@
21.193 }
21.194 break;
21.195 case 2 :
21.196 - dbg.enterAlt(2);
21.197 -
21.198 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:92:10: 'parser'
21.199 {
21.200 - dbg.location(92,10);
21.201 string_literal3=(Token)match(input,66,FOLLOW_66_in_grammarDef371); if (state.failed) return retval;
21.202 if ( state.backtracking==0 ) stream_66.add(string_literal3);
21.203
21.204 - dbg.location(92,19);
21.205 if ( state.backtracking==0 ) {
21.206 gtype=PARSER_GRAMMAR;
21.207 }
21.208 @@ -360,15 +271,11 @@
21.209 }
21.210 break;
21.211 case 3 :
21.212 - dbg.enterAlt(3);
21.213 -
21.214 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:93:10: 'tree'
21.215 {
21.216 - dbg.location(93,10);
21.217 string_literal4=(Token)match(input,67,FOLLOW_67_in_grammarDef387); if (state.failed) return retval;
21.218 if ( state.backtracking==0 ) stream_67.add(string_literal4);
21.219
21.220 - dbg.location(93,19);
21.221 if ( state.backtracking==0 ) {
21.222 gtype=TREE_GRAMMAR;
21.223 }
21.224 @@ -376,11 +283,8 @@
21.225 }
21.226 break;
21.227 case 4 :
21.228 - dbg.enterAlt(4);
21.229 -
21.230 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:94:14:
21.231 {
21.232 - dbg.location(94,14);
21.233 if ( state.backtracking==0 ) {
21.234 gtype=COMBINED_GRAMMAR;
21.235 }
21.236 @@ -389,43 +293,30 @@
21.237 break;
21.238
21.239 }
21.240 - } finally {dbg.exitSubRule(2);}
21.241 -
21.242 - dbg.location(96,7);
21.243 +
21.244 g=(Token)match(input,68,FOLLOW_68_in_grammarDef428); if (state.failed) return retval;
21.245 if ( state.backtracking==0 ) stream_68.add(g);
21.246
21.247 - dbg.location(96,18);
21.248 pushFollow(FOLLOW_id_in_grammarDef430);
21.249 id5=id();
21.250
21.251 state._fsp--;
21.252 if (state.failed) return retval;
21.253 if ( state.backtracking==0 ) stream_id.add(id5.getTree());
21.254 - dbg.location(96,21);
21.255 char_literal6=(Token)match(input,69,FOLLOW_69_in_grammarDef432); if (state.failed) return retval;
21.256 if ( state.backtracking==0 ) stream_69.add(char_literal6);
21.257
21.258 - dbg.location(96,25);
21.259 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:96:25: ( optionsSpec )?
21.260 int alt3=2;
21.261 - try { dbg.enterSubRule(3);
21.262 - try { dbg.enterDecision(3, decisionCanBacktrack[3]);
21.263 -
21.264 int LA3_0 = input.LA(1);
21.265
21.266 if ( (LA3_0==OPTIONS) ) {
21.267 alt3=1;
21.268 }
21.269 - } finally {dbg.exitDecision(3);}
21.270 -
21.271 switch (alt3) {
21.272 case 1 :
21.273 - dbg.enterAlt(1);
21.274 -
21.275 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:96:25: optionsSpec
21.276 {
21.277 - dbg.location(96,25);
21.278 pushFollow(FOLLOW_optionsSpec_in_grammarDef434);
21.279 optionsSpec7=optionsSpec();
21.280
21.281 @@ -437,28 +328,18 @@
21.282 break;
21.283
21.284 }
21.285 - } finally {dbg.exitSubRule(3);}
21.286 -
21.287 - dbg.location(96,38);
21.288 +
21.289 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:96:38: ( tokensSpec )?
21.290 int alt4=2;
21.291 - try { dbg.enterSubRule(4);
21.292 - try { dbg.enterDecision(4, decisionCanBacktrack[4]);
21.293 -
21.294 int LA4_0 = input.LA(1);
21.295
21.296 if ( (LA4_0==TOKENS) ) {
21.297 alt4=1;
21.298 }
21.299 - } finally {dbg.exitDecision(4);}
21.300 -
21.301 switch (alt4) {
21.302 case 1 :
21.303 - dbg.enterAlt(1);
21.304 -
21.305 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:96:38: tokensSpec
21.306 {
21.307 - dbg.location(96,38);
21.308 pushFollow(FOLLOW_tokensSpec_in_grammarDef437);
21.309 tokensSpec8=tokensSpec();
21.310
21.311 @@ -470,17 +351,11 @@
21.312 break;
21.313
21.314 }
21.315 - } finally {dbg.exitSubRule(4);}
21.316 -
21.317 - dbg.location(96,50);
21.318 +
21.319 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:96:50: ( attrScope )*
21.320 - try { dbg.enterSubRule(5);
21.321 -
21.322 loop5:
21.323 do {
21.324 int alt5=2;
21.325 - try { dbg.enterDecision(5, decisionCanBacktrack[5]);
21.326 -
21.327 int LA5_0 = input.LA(1);
21.328
21.329 if ( (LA5_0==SCOPE) ) {
21.330 @@ -488,15 +363,10 @@
21.331 }
21.332
21.333
21.334 - } finally {dbg.exitDecision(5);}
21.335 -
21.336 switch (alt5) {
21.337 case 1 :
21.338 - dbg.enterAlt(1);
21.339 -
21.340 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:96:50: attrScope
21.341 {
21.342 - dbg.location(96,50);
21.343 pushFollow(FOLLOW_attrScope_in_grammarDef440);
21.344 attrScope9=attrScope();
21.345
21.346 @@ -511,17 +381,11 @@
21.347 break loop5;
21.348 }
21.349 } while (true);
21.350 - } finally {dbg.exitSubRule(5);}
21.351 -
21.352 - dbg.location(96,61);
21.353 +
21.354 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:96:61: ( action )*
21.355 - try { dbg.enterSubRule(6);
21.356 -
21.357 loop6:
21.358 do {
21.359 int alt6=2;
21.360 - try { dbg.enterDecision(6, decisionCanBacktrack[6]);
21.361 -
21.362 int LA6_0 = input.LA(1);
21.363
21.364 if ( (LA6_0==72) ) {
21.365 @@ -529,15 +393,10 @@
21.366 }
21.367
21.368
21.369 - } finally {dbg.exitDecision(6);}
21.370 -
21.371 switch (alt6) {
21.372 case 1 :
21.373 - dbg.enterAlt(1);
21.374 -
21.375 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:96:61: action
21.376 {
21.377 - dbg.location(96,61);
21.378 pushFollow(FOLLOW_action_in_grammarDef443);
21.379 action10=action();
21.380
21.381 @@ -552,18 +411,12 @@
21.382 break loop6;
21.383 }
21.384 } while (true);
21.385 - } finally {dbg.exitSubRule(6);}
21.386 -
21.387 - dbg.location(97,6);
21.388 +
21.389 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:97:6: ( rule )+
21.390 int cnt7=0;
21.391 - try { dbg.enterSubRule(7);
21.392 -
21.393 loop7:
21.394 do {
21.395 int alt7=2;
21.396 - try { dbg.enterDecision(7, decisionCanBacktrack[7]);
21.397 -
21.398 int LA7_0 = input.LA(1);
21.399
21.400 if ( (LA7_0==DOC_COMMENT||LA7_0==FRAGMENT||LA7_0==TOKEN_REF||LA7_0==RULE_REF||(LA7_0>=75 && LA7_0<=77)) ) {
21.401 @@ -571,15 +424,10 @@
21.402 }
21.403
21.404
21.405 - } finally {dbg.exitDecision(7);}
21.406 -
21.407 switch (alt7) {
21.408 case 1 :
21.409 - dbg.enterAlt(1);
21.410 -
21.411 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:97:6: rule
21.412 {
21.413 - dbg.location(97,6);
21.414 pushFollow(FOLLOW_rule_in_grammarDef451);
21.415 rule11=rule();
21.416
21.417 @@ -595,22 +443,18 @@
21.418 if (state.backtracking>0) {state.failed=true; return retval;}
21.419 EarlyExitException eee =
21.420 new EarlyExitException(7, input);
21.421 - dbg.recognitionException(eee);
21.422 -
21.423 throw eee;
21.424 }
21.425 cnt7++;
21.426 } while (true);
21.427 - } finally {dbg.exitSubRule(7);}
21.428 -
21.429 - dbg.location(98,6);
21.430 +
21.431 EOF12=(Token)match(input,EOF,FOLLOW_EOF_in_grammarDef459); if (state.failed) return retval;
21.432 if ( state.backtracking==0 ) stream_EOF.add(EOF12);
21.433
21.434
21.435
21.436 // AST REWRITE
21.437 - // elements: optionsSpec, action, tokensSpec, attrScope, id, rule, DOC_COMMENT
21.438 + // elements: attrScope, action, rule, optionsSpec, DOC_COMMENT, tokensSpec, id
21.439 // token labels:
21.440 // rule labels: retval
21.441 // token list labels:
21.442 @@ -623,61 +467,46 @@
21.443 root_0 = (CommonTree)adaptor.nil();
21.444 // 99:6: -> ^( id ( DOC_COMMENT )? ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ )
21.445 {
21.446 - dbg.location(99,9);
21.447 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:99:9: ^( id ( DOC_COMMENT )? ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ )
21.448 {
21.449 CommonTree root_1 = (CommonTree)adaptor.nil();
21.450 - dbg.location(99,12);
21.451 root_1 = (CommonTree)adaptor.becomeRoot(adaptor.create(gtype,g), root_1);
21.452
21.453 - dbg.location(100,9);
21.454 adaptor.addChild(root_1, stream_id.nextTree());
21.455 - dbg.location(100,12);
21.456 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:100:12: ( DOC_COMMENT )?
21.457 if ( stream_DOC_COMMENT.hasNext() ) {
21.458 - dbg.location(100,12);
21.459 adaptor.addChild(root_1, stream_DOC_COMMENT.nextNode());
21.460
21.461 }
21.462 stream_DOC_COMMENT.reset();
21.463 - dbg.location(100,25);
21.464 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:100:25: ( optionsSpec )?
21.465 if ( stream_optionsSpec.hasNext() ) {
21.466 - dbg.location(100,25);
21.467 adaptor.addChild(root_1, stream_optionsSpec.nextTree());
21.468
21.469 }
21.470 stream_optionsSpec.reset();
21.471 - dbg.location(100,38);
21.472 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:100:38: ( tokensSpec )?
21.473 if ( stream_tokensSpec.hasNext() ) {
21.474 - dbg.location(100,38);
21.475 adaptor.addChild(root_1, stream_tokensSpec.nextTree());
21.476
21.477 }
21.478 stream_tokensSpec.reset();
21.479 - dbg.location(100,50);
21.480 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:100:50: ( attrScope )*
21.481 while ( stream_attrScope.hasNext() ) {
21.482 - dbg.location(100,50);
21.483 adaptor.addChild(root_1, stream_attrScope.nextTree());
21.484
21.485 }
21.486 stream_attrScope.reset();
21.487 - dbg.location(100,61);
21.488 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:100:61: ( action )*
21.489 while ( stream_action.hasNext() ) {
21.490 - dbg.location(100,61);
21.491 adaptor.addChild(root_1, stream_action.nextTree());
21.492
21.493 }
21.494 stream_action.reset();
21.495 - dbg.location(100,69);
21.496 if ( !(stream_rule.hasNext()) ) {
21.497 throw new RewriteEarlyExitException();
21.498 }
21.499 while ( stream_rule.hasNext() ) {
21.500 - dbg.location(100,69);
21.501 adaptor.addChild(root_1, stream_rule.nextTree());
21.502
21.503 }
21.504 @@ -707,15 +536,6 @@
21.505 }
21.506 finally {
21.507 }
21.508 - dbg.location(102, 5);
21.509 -
21.510 - }
21.511 - finally {
21.512 - dbg.exitRule(getGrammarFileName(), "grammarDef");
21.513 - decRuleLevel();
21.514 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.515 - }
21.516 -
21.517 return retval;
21.518 }
21.519 // $ANTLR end "grammarDef"
21.520 @@ -743,31 +563,18 @@
21.521 RewriteRuleTokenStream stream_TOKENS=new RewriteRuleTokenStream(adaptor,"token TOKENS");
21.522 RewriteRuleTokenStream stream_70=new RewriteRuleTokenStream(adaptor,"token 70");
21.523 RewriteRuleSubtreeStream stream_tokenSpec=new RewriteRuleSubtreeStream(adaptor,"rule tokenSpec");
21.524 - try { dbg.enterRule(getGrammarFileName(), "tokensSpec");
21.525 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.526 - incRuleLevel();
21.527 - dbg.location(104, 1);
21.528 -
21.529 try {
21.530 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:105:2: ( TOKENS ( tokenSpec )+ '}' -> ^( TOKENS ( tokenSpec )+ ) )
21.531 - dbg.enterAlt(1);
21.532 -
21.533 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:105:4: TOKENS ( tokenSpec )+ '}'
21.534 {
21.535 - dbg.location(105,4);
21.536 TOKENS13=(Token)match(input,TOKENS,FOLLOW_TOKENS_in_tokensSpec520); if (state.failed) return retval;
21.537 if ( state.backtracking==0 ) stream_TOKENS.add(TOKENS13);
21.538
21.539 - dbg.location(105,11);
21.540 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:105:11: ( tokenSpec )+
21.541 int cnt8=0;
21.542 - try { dbg.enterSubRule(8);
21.543 -
21.544 loop8:
21.545 do {
21.546 int alt8=2;
21.547 - try { dbg.enterDecision(8, decisionCanBacktrack[8]);
21.548 -
21.549 int LA8_0 = input.LA(1);
21.550
21.551 if ( (LA8_0==TOKEN_REF) ) {
21.552 @@ -775,15 +582,10 @@
21.553 }
21.554
21.555
21.556 - } finally {dbg.exitDecision(8);}
21.557 -
21.558 switch (alt8) {
21.559 case 1 :
21.560 - dbg.enterAlt(1);
21.561 -
21.562 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:105:11: tokenSpec
21.563 {
21.564 - dbg.location(105,11);
21.565 pushFollow(FOLLOW_tokenSpec_in_tokensSpec522);
21.566 tokenSpec14=tokenSpec();
21.567
21.568 @@ -799,15 +601,11 @@
21.569 if (state.backtracking>0) {state.failed=true; return retval;}
21.570 EarlyExitException eee =
21.571 new EarlyExitException(8, input);
21.572 - dbg.recognitionException(eee);
21.573 -
21.574 throw eee;
21.575 }
21.576 cnt8++;
21.577 } while (true);
21.578 - } finally {dbg.exitSubRule(8);}
21.579 -
21.580 - dbg.location(105,22);
21.581 +
21.582 char_literal15=(Token)match(input,70,FOLLOW_70_in_tokensSpec525); if (state.failed) return retval;
21.583 if ( state.backtracking==0 ) stream_70.add(char_literal15);
21.584
21.585 @@ -827,19 +625,15 @@
21.586 root_0 = (CommonTree)adaptor.nil();
21.587 // 105:26: -> ^( TOKENS ( tokenSpec )+ )
21.588 {
21.589 - dbg.location(105,29);
21.590 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:105:29: ^( TOKENS ( tokenSpec )+ )
21.591 {
21.592 CommonTree root_1 = (CommonTree)adaptor.nil();
21.593 - dbg.location(105,31);
21.594 root_1 = (CommonTree)adaptor.becomeRoot(stream_TOKENS.nextNode(), root_1);
21.595
21.596 - dbg.location(105,38);
21.597 if ( !(stream_tokenSpec.hasNext()) ) {
21.598 throw new RewriteEarlyExitException();
21.599 }
21.600 while ( stream_tokenSpec.hasNext() ) {
21.601 - dbg.location(105,38);
21.602 adaptor.addChild(root_1, stream_tokenSpec.nextTree());
21.603
21.604 }
21.605 @@ -869,15 +663,6 @@
21.606 }
21.607 finally {
21.608 }
21.609 - dbg.location(106, 2);
21.610 -
21.611 - }
21.612 - finally {
21.613 - dbg.exitRule(getGrammarFileName(), "tokensSpec");
21.614 - decRuleLevel();
21.615 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.616 - }
21.617 -
21.618 return retval;
21.619 }
21.620 // $ANTLR end "tokensSpec"
21.621 @@ -910,27 +695,15 @@
21.622 RewriteRuleTokenStream stream_71=new RewriteRuleTokenStream(adaptor,"token 71");
21.623 RewriteRuleTokenStream stream_TOKEN_REF=new RewriteRuleTokenStream(adaptor,"token TOKEN_REF");
21.624
21.625 - try { dbg.enterRule(getGrammarFileName(), "tokenSpec");
21.626 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.627 - incRuleLevel();
21.628 - dbg.location(108, 1);
21.629 -
21.630 try {
21.631 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:109:2: ( TOKEN_REF ( '=' (lit= STRING_LITERAL | lit= CHAR_LITERAL ) -> ^( '=' TOKEN_REF $lit) | -> TOKEN_REF ) ';' )
21.632 - dbg.enterAlt(1);
21.633 -
21.634 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:109:4: TOKEN_REF ( '=' (lit= STRING_LITERAL | lit= CHAR_LITERAL ) -> ^( '=' TOKEN_REF $lit) | -> TOKEN_REF ) ';'
21.635 {
21.636 - dbg.location(109,4);
21.637 TOKEN_REF16=(Token)match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_tokenSpec545); if (state.failed) return retval;
21.638 if ( state.backtracking==0 ) stream_TOKEN_REF.add(TOKEN_REF16);
21.639
21.640 - dbg.location(110,3);
21.641 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:110:3: ( '=' (lit= STRING_LITERAL | lit= CHAR_LITERAL ) -> ^( '=' TOKEN_REF $lit) | -> TOKEN_REF )
21.642 int alt10=2;
21.643 - try { dbg.enterSubRule(10);
21.644 - try { dbg.enterDecision(10, decisionCanBacktrack[10]);
21.645 -
21.646 int LA10_0 = input.LA(1);
21.647
21.648 if ( (LA10_0==71) ) {
21.649 @@ -944,27 +717,17 @@
21.650 NoViableAltException nvae =
21.651 new NoViableAltException("", 10, 0, input);
21.652
21.653 - dbg.recognitionException(nvae);
21.654 throw nvae;
21.655 }
21.656 - } finally {dbg.exitDecision(10);}
21.657 -
21.658 switch (alt10) {
21.659 case 1 :
21.660 - dbg.enterAlt(1);
21.661 -
21.662 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:110:5: '=' (lit= STRING_LITERAL | lit= CHAR_LITERAL )
21.663 {
21.664 - dbg.location(110,5);
21.665 char_literal17=(Token)match(input,71,FOLLOW_71_in_tokenSpec551); if (state.failed) return retval;
21.666 if ( state.backtracking==0 ) stream_71.add(char_literal17);
21.667
21.668 - dbg.location(110,9);
21.669 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:110:9: (lit= STRING_LITERAL | lit= CHAR_LITERAL )
21.670 int alt9=2;
21.671 - try { dbg.enterSubRule(9);
21.672 - try { dbg.enterDecision(9, decisionCanBacktrack[9]);
21.673 -
21.674 int LA9_0 = input.LA(1);
21.675
21.676 if ( (LA9_0==STRING_LITERAL) ) {
21.677 @@ -978,18 +741,12 @@
21.678 NoViableAltException nvae =
21.679 new NoViableAltException("", 9, 0, input);
21.680
21.681 - dbg.recognitionException(nvae);
21.682 throw nvae;
21.683 }
21.684 - } finally {dbg.exitDecision(9);}
21.685 -
21.686 switch (alt9) {
21.687 case 1 :
21.688 - dbg.enterAlt(1);
21.689 -
21.690 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:110:10: lit= STRING_LITERAL
21.691 {
21.692 - dbg.location(110,13);
21.693 lit=(Token)match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_tokenSpec556); if (state.failed) return retval;
21.694 if ( state.backtracking==0 ) stream_STRING_LITERAL.add(lit);
21.695
21.696 @@ -997,11 +754,8 @@
21.697 }
21.698 break;
21.699 case 2 :
21.700 - dbg.enterAlt(2);
21.701 -
21.702 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:110:29: lit= CHAR_LITERAL
21.703 {
21.704 - dbg.location(110,32);
21.705 lit=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_tokenSpec560); if (state.failed) return retval;
21.706 if ( state.backtracking==0 ) stream_CHAR_LITERAL.add(lit);
21.707
21.708 @@ -1010,12 +764,11 @@
21.709 break;
21.710
21.711 }
21.712 - } finally {dbg.exitSubRule(9);}
21.713
21.714
21.715
21.716 // AST REWRITE
21.717 - // elements: TOKEN_REF, lit, 71
21.718 + // elements: 71, TOKEN_REF, lit
21.719 // token labels: lit
21.720 // rule labels: retval
21.721 // token list labels:
21.722 @@ -1029,16 +782,12 @@
21.723 root_0 = (CommonTree)adaptor.nil();
21.724 // 110:47: -> ^( '=' TOKEN_REF $lit)
21.725 {
21.726 - dbg.location(110,50);
21.727 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:110:50: ^( '=' TOKEN_REF $lit)
21.728 {
21.729 CommonTree root_1 = (CommonTree)adaptor.nil();
21.730 - dbg.location(110,52);
21.731 root_1 = (CommonTree)adaptor.becomeRoot(stream_71.nextNode(), root_1);
21.732
21.733 - dbg.location(110,56);
21.734 adaptor.addChild(root_1, stream_TOKEN_REF.nextNode());
21.735 - dbg.location(110,66);
21.736 adaptor.addChild(root_1, stream_lit.nextNode());
21.737
21.738 adaptor.addChild(root_0, root_1);
21.739 @@ -1050,8 +799,6 @@
21.740 }
21.741 break;
21.742 case 2 :
21.743 - dbg.enterAlt(2);
21.744 -
21.745 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:111:16:
21.746 {
21.747
21.748 @@ -1069,7 +816,6 @@
21.749 root_0 = (CommonTree)adaptor.nil();
21.750 // 111:16: -> TOKEN_REF
21.751 {
21.752 - dbg.location(111,19);
21.753 adaptor.addChild(root_0, stream_TOKEN_REF.nextNode());
21.754
21.755 }
21.756 @@ -1079,9 +825,7 @@
21.757 break;
21.758
21.759 }
21.760 - } finally {dbg.exitSubRule(10);}
21.761 -
21.762 - dbg.location(113,3);
21.763 +
21.764 char_literal18=(Token)match(input,69,FOLLOW_69_in_tokenSpec599); if (state.failed) return retval;
21.765 if ( state.backtracking==0 ) stream_69.add(char_literal18);
21.766
21.767 @@ -1104,15 +848,6 @@
21.768 }
21.769 finally {
21.770 }
21.771 - dbg.location(114, 2);
21.772 -
21.773 - }
21.774 - finally {
21.775 - dbg.exitRule(getGrammarFileName(), "tokenSpec");
21.776 - decRuleLevel();
21.777 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.778 - }
21.779 -
21.780 return retval;
21.781 }
21.782 // $ANTLR end "tokenSpec"
21.783 @@ -1140,36 +875,26 @@
21.784 RewriteRuleTokenStream stream_SCOPE=new RewriteRuleTokenStream(adaptor,"token SCOPE");
21.785 RewriteRuleTokenStream stream_ACTION=new RewriteRuleTokenStream(adaptor,"token ACTION");
21.786 RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,"rule id");
21.787 - try { dbg.enterRule(getGrammarFileName(), "attrScope");
21.788 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.789 - incRuleLevel();
21.790 - dbg.location(116, 1);
21.791 -
21.792 try {
21.793 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:117:2: ( 'scope' id ACTION -> ^( 'scope' id ACTION ) )
21.794 - dbg.enterAlt(1);
21.795 -
21.796 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:117:4: 'scope' id ACTION
21.797 {
21.798 - dbg.location(117,4);
21.799 string_literal19=(Token)match(input,SCOPE,FOLLOW_SCOPE_in_attrScope610); if (state.failed) return retval;
21.800 if ( state.backtracking==0 ) stream_SCOPE.add(string_literal19);
21.801
21.802 - dbg.location(117,12);
21.803 pushFollow(FOLLOW_id_in_attrScope612);
21.804 id20=id();
21.805
21.806 state._fsp--;
21.807 if (state.failed) return retval;
21.808 if ( state.backtracking==0 ) stream_id.add(id20.getTree());
21.809 - dbg.location(117,15);
21.810 ACTION21=(Token)match(input,ACTION,FOLLOW_ACTION_in_attrScope614); if (state.failed) return retval;
21.811 if ( state.backtracking==0 ) stream_ACTION.add(ACTION21);
21.812
21.813
21.814
21.815 // AST REWRITE
21.816 - // elements: id, ACTION, SCOPE
21.817 + // elements: id, SCOPE, ACTION
21.818 // token labels:
21.819 // rule labels: retval
21.820 // token list labels:
21.821 @@ -1182,16 +907,12 @@
21.822 root_0 = (CommonTree)adaptor.nil();
21.823 // 117:22: -> ^( 'scope' id ACTION )
21.824 {
21.825 - dbg.location(117,25);
21.826 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:117:25: ^( 'scope' id ACTION )
21.827 {
21.828 CommonTree root_1 = (CommonTree)adaptor.nil();
21.829 - dbg.location(117,27);
21.830 root_1 = (CommonTree)adaptor.becomeRoot(stream_SCOPE.nextNode(), root_1);
21.831
21.832 - dbg.location(117,35);
21.833 adaptor.addChild(root_1, stream_id.nextTree());
21.834 - dbg.location(117,38);
21.835 adaptor.addChild(root_1, stream_ACTION.nextNode());
21.836
21.837 adaptor.addChild(root_0, root_1);
21.838 @@ -1218,15 +939,6 @@
21.839 }
21.840 finally {
21.841 }
21.842 - dbg.location(118, 2);
21.843 -
21.844 - }
21.845 - finally {
21.846 - dbg.exitRule(getGrammarFileName(), "attrScope");
21.847 - decRuleLevel();
21.848 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.849 - }
21.850 -
21.851 return retval;
21.852 }
21.853 // $ANTLR end "attrScope"
21.854 @@ -1260,27 +972,15 @@
21.855 RewriteRuleTokenStream stream_73=new RewriteRuleTokenStream(adaptor,"token 73");
21.856 RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,"rule id");
21.857 RewriteRuleSubtreeStream stream_actionScopeName=new RewriteRuleSubtreeStream(adaptor,"rule actionScopeName");
21.858 - try { dbg.enterRule(getGrammarFileName(), "action");
21.859 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.860 - incRuleLevel();
21.861 - dbg.location(120, 1);
21.862 -
21.863 try {
21.864 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:122:2: ( '@' ( actionScopeName '::' )? id ACTION -> ^( '@' ( actionScopeName )? id ACTION ) )
21.865 - dbg.enterAlt(1);
21.866 -
21.867 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:122:4: '@' ( actionScopeName '::' )? id ACTION
21.868 {
21.869 - dbg.location(122,4);
21.870 char_literal22=(Token)match(input,72,FOLLOW_72_in_action637); if (state.failed) return retval;
21.871 if ( state.backtracking==0 ) stream_72.add(char_literal22);
21.872
21.873 - dbg.location(122,8);
21.874 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:122:8: ( actionScopeName '::' )?
21.875 int alt11=2;
21.876 - try { dbg.enterSubRule(11);
21.877 - try { dbg.enterDecision(11, decisionCanBacktrack[11]);
21.878 -
21.879 switch ( input.LA(1) ) {
21.880 case TOKEN_REF:
21.881 {
21.882 @@ -1308,22 +1008,16 @@
21.883 break;
21.884 }
21.885
21.886 - } finally {dbg.exitDecision(11);}
21.887 -
21.888 switch (alt11) {
21.889 case 1 :
21.890 - dbg.enterAlt(1);
21.891 -
21.892 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:122:9: actionScopeName '::'
21.893 {
21.894 - dbg.location(122,9);
21.895 pushFollow(FOLLOW_actionScopeName_in_action640);
21.896 actionScopeName23=actionScopeName();
21.897
21.898 state._fsp--;
21.899 if (state.failed) return retval;
21.900 if ( state.backtracking==0 ) stream_actionScopeName.add(actionScopeName23.getTree());
21.901 - dbg.location(122,25);
21.902 string_literal24=(Token)match(input,73,FOLLOW_73_in_action642); if (state.failed) return retval;
21.903 if ( state.backtracking==0 ) stream_73.add(string_literal24);
21.904
21.905 @@ -1332,23 +1026,20 @@
21.906 break;
21.907
21.908 }
21.909 - } finally {dbg.exitSubRule(11);}
21.910 -
21.911 - dbg.location(122,32);
21.912 +
21.913 pushFollow(FOLLOW_id_in_action646);
21.914 id25=id();
21.915
21.916 state._fsp--;
21.917 if (state.failed) return retval;
21.918 if ( state.backtracking==0 ) stream_id.add(id25.getTree());
21.919 - dbg.location(122,35);
21.920 ACTION26=(Token)match(input,ACTION,FOLLOW_ACTION_in_action648); if (state.failed) return retval;
21.921 if ( state.backtracking==0 ) stream_ACTION.add(ACTION26);
21.922
21.923
21.924
21.925 // AST REWRITE
21.926 - // elements: 72, ACTION, id, actionScopeName
21.927 + // elements: id, actionScopeName, ACTION, 72
21.928 // token labels:
21.929 // rule labels: retval
21.930 // token list labels:
21.931 @@ -1361,24 +1052,18 @@
21.932 root_0 = (CommonTree)adaptor.nil();
21.933 // 122:42: -> ^( '@' ( actionScopeName )? id ACTION )
21.934 {
21.935 - dbg.location(122,45);
21.936 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:122:45: ^( '@' ( actionScopeName )? id ACTION )
21.937 {
21.938 CommonTree root_1 = (CommonTree)adaptor.nil();
21.939 - dbg.location(122,47);
21.940 root_1 = (CommonTree)adaptor.becomeRoot(stream_72.nextNode(), root_1);
21.941
21.942 - dbg.location(122,51);
21.943 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:122:51: ( actionScopeName )?
21.944 if ( stream_actionScopeName.hasNext() ) {
21.945 - dbg.location(122,51);
21.946 adaptor.addChild(root_1, stream_actionScopeName.nextTree());
21.947
21.948 }
21.949 stream_actionScopeName.reset();
21.950 - dbg.location(122,68);
21.951 adaptor.addChild(root_1, stream_id.nextTree());
21.952 - dbg.location(122,71);
21.953 adaptor.addChild(root_1, stream_ACTION.nextNode());
21.954
21.955 adaptor.addChild(root_0, root_1);
21.956 @@ -1405,15 +1090,6 @@
21.957 }
21.958 finally {
21.959 }
21.960 - dbg.location(123, 2);
21.961 -
21.962 - }
21.963 - finally {
21.964 - dbg.exitRule(getGrammarFileName(), "action");
21.965 - decRuleLevel();
21.966 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.967 - }
21.968 -
21.969 return retval;
21.970 }
21.971 // $ANTLR end "action"
21.972 @@ -1441,16 +1117,9 @@
21.973 RewriteRuleTokenStream stream_66=new RewriteRuleTokenStream(adaptor,"token 66");
21.974 RewriteRuleTokenStream stream_65=new RewriteRuleTokenStream(adaptor,"token 65");
21.975
21.976 - try { dbg.enterRule(getGrammarFileName(), "actionScopeName");
21.977 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.978 - incRuleLevel();
21.979 - dbg.location(125, 1);
21.980 -
21.981 try {
21.982 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:129:2: ( id | l= 'lexer' -> ID[$l] | p= 'parser' -> ID[$p] )
21.983 int alt12=3;
21.984 - try { dbg.enterDecision(12, decisionCanBacktrack[12]);
21.985 -
21.986 switch ( input.LA(1) ) {
21.987 case TOKEN_REF:
21.988 case RULE_REF:
21.989 @@ -1473,21 +1142,15 @@
21.990 NoViableAltException nvae =
21.991 new NoViableAltException("", 12, 0, input);
21.992
21.993 - dbg.recognitionException(nvae);
21.994 throw nvae;
21.995 }
21.996
21.997 - } finally {dbg.exitDecision(12);}
21.998 -
21.999 switch (alt12) {
21.1000 case 1 :
21.1001 - dbg.enterAlt(1);
21.1002 -
21.1003 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:129:4: id
21.1004 {
21.1005 root_0 = (CommonTree)adaptor.nil();
21.1006
21.1007 - dbg.location(129,4);
21.1008 pushFollow(FOLLOW_id_in_actionScopeName674);
21.1009 id27=id();
21.1010
21.1011 @@ -1498,11 +1161,8 @@
21.1012 }
21.1013 break;
21.1014 case 2 :
21.1015 - dbg.enterAlt(2);
21.1016 -
21.1017 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:130:4: l= 'lexer'
21.1018 {
21.1019 - dbg.location(130,5);
21.1020 l=(Token)match(input,65,FOLLOW_65_in_actionScopeName681); if (state.failed) return retval;
21.1021 if ( state.backtracking==0 ) stream_65.add(l);
21.1022
21.1023 @@ -1522,7 +1182,6 @@
21.1024 root_0 = (CommonTree)adaptor.nil();
21.1025 // 130:14: -> ID[$l]
21.1026 {
21.1027 - dbg.location(130,17);
21.1028 adaptor.addChild(root_0, (CommonTree)adaptor.create(ID, l));
21.1029
21.1030 }
21.1031 @@ -1531,11 +1190,8 @@
21.1032 }
21.1033 break;
21.1034 case 3 :
21.1035 - dbg.enterAlt(3);
21.1036 -
21.1037 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:131:9: p= 'parser'
21.1038 {
21.1039 - dbg.location(131,10);
21.1040 p=(Token)match(input,66,FOLLOW_66_in_actionScopeName698); if (state.failed) return retval;
21.1041 if ( state.backtracking==0 ) stream_66.add(p);
21.1042
21.1043 @@ -1555,7 +1211,6 @@
21.1044 root_0 = (CommonTree)adaptor.nil();
21.1045 // 131:20: -> ID[$p]
21.1046 {
21.1047 - dbg.location(131,23);
21.1048 adaptor.addChild(root_0, (CommonTree)adaptor.create(ID, p));
21.1049
21.1050 }
21.1051 @@ -1581,15 +1236,6 @@
21.1052 }
21.1053 finally {
21.1054 }
21.1055 - dbg.location(132, 2);
21.1056 -
21.1057 - }
21.1058 - finally {
21.1059 - dbg.exitRule(getGrammarFileName(), "actionScopeName");
21.1060 - decRuleLevel();
21.1061 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.1062 - }
21.1063 -
21.1064 return retval;
21.1065 }
21.1066 // $ANTLR end "actionScopeName"
21.1067 @@ -1620,31 +1266,18 @@
21.1068 RewriteRuleTokenStream stream_70=new RewriteRuleTokenStream(adaptor,"token 70");
21.1069 RewriteRuleTokenStream stream_OPTIONS=new RewriteRuleTokenStream(adaptor,"token OPTIONS");
21.1070 RewriteRuleSubtreeStream stream_option=new RewriteRuleSubtreeStream(adaptor,"rule option");
21.1071 - try { dbg.enterRule(getGrammarFileName(), "optionsSpec");
21.1072 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.1073 - incRuleLevel();
21.1074 - dbg.location(134, 1);
21.1075 -
21.1076 try {
21.1077 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:135:2: ( OPTIONS ( option ';' )+ '}' -> ^( OPTIONS ( option )+ ) )
21.1078 - dbg.enterAlt(1);
21.1079 -
21.1080 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:135:4: OPTIONS ( option ';' )+ '}'
21.1081 {
21.1082 - dbg.location(135,4);
21.1083 OPTIONS28=(Token)match(input,OPTIONS,FOLLOW_OPTIONS_in_optionsSpec714); if (state.failed) return retval;
21.1084 if ( state.backtracking==0 ) stream_OPTIONS.add(OPTIONS28);
21.1085
21.1086 - dbg.location(135,12);
21.1087 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:135:12: ( option ';' )+
21.1088 int cnt13=0;
21.1089 - try { dbg.enterSubRule(13);
21.1090 -
21.1091 loop13:
21.1092 do {
21.1093 int alt13=2;
21.1094 - try { dbg.enterDecision(13, decisionCanBacktrack[13]);
21.1095 -
21.1096 int LA13_0 = input.LA(1);
21.1097
21.1098 if ( (LA13_0==TOKEN_REF||LA13_0==RULE_REF) ) {
21.1099 @@ -1652,22 +1285,16 @@
21.1100 }
21.1101
21.1102
21.1103 - } finally {dbg.exitDecision(13);}
21.1104 -
21.1105 switch (alt13) {
21.1106 case 1 :
21.1107 - dbg.enterAlt(1);
21.1108 -
21.1109 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:135:13: option ';'
21.1110 {
21.1111 - dbg.location(135,13);
21.1112 pushFollow(FOLLOW_option_in_optionsSpec717);
21.1113 option29=option();
21.1114
21.1115 state._fsp--;
21.1116 if (state.failed) return retval;
21.1117 if ( state.backtracking==0 ) stream_option.add(option29.getTree());
21.1118 - dbg.location(135,20);
21.1119 char_literal30=(Token)match(input,69,FOLLOW_69_in_optionsSpec719); if (state.failed) return retval;
21.1120 if ( state.backtracking==0 ) stream_69.add(char_literal30);
21.1121
21.1122 @@ -1680,22 +1307,18 @@
21.1123 if (state.backtracking>0) {state.failed=true; return retval;}
21.1124 EarlyExitException eee =
21.1125 new EarlyExitException(13, input);
21.1126 - dbg.recognitionException(eee);
21.1127 -
21.1128 throw eee;
21.1129 }
21.1130 cnt13++;
21.1131 } while (true);
21.1132 - } finally {dbg.exitSubRule(13);}
21.1133 -
21.1134 - dbg.location(135,26);
21.1135 +
21.1136 char_literal31=(Token)match(input,70,FOLLOW_70_in_optionsSpec723); if (state.failed) return retval;
21.1137 if ( state.backtracking==0 ) stream_70.add(char_literal31);
21.1138
21.1139
21.1140
21.1141 // AST REWRITE
21.1142 - // elements: option, OPTIONS
21.1143 + // elements: OPTIONS, option
21.1144 // token labels:
21.1145 // rule labels: retval
21.1146 // token list labels:
21.1147 @@ -1708,19 +1331,15 @@
21.1148 root_0 = (CommonTree)adaptor.nil();
21.1149 // 135:30: -> ^( OPTIONS ( option )+ )
21.1150 {
21.1151 - dbg.location(135,33);
21.1152 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:135:33: ^( OPTIONS ( option )+ )
21.1153 {
21.1154 CommonTree root_1 = (CommonTree)adaptor.nil();
21.1155 - dbg.location(135,35);
21.1156 root_1 = (CommonTree)adaptor.becomeRoot(stream_OPTIONS.nextNode(), root_1);
21.1157
21.1158 - dbg.location(135,43);
21.1159 if ( !(stream_option.hasNext()) ) {
21.1160 throw new RewriteEarlyExitException();
21.1161 }
21.1162 while ( stream_option.hasNext() ) {
21.1163 - dbg.location(135,43);
21.1164 adaptor.addChild(root_1, stream_option.nextTree());
21.1165
21.1166 }
21.1167 @@ -1750,15 +1369,6 @@
21.1168 }
21.1169 finally {
21.1170 }
21.1171 - dbg.location(136, 2);
21.1172 -
21.1173 - }
21.1174 - finally {
21.1175 - dbg.exitRule(getGrammarFileName(), "optionsSpec");
21.1176 - decRuleLevel();
21.1177 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.1178 - }
21.1179 -
21.1180 return retval;
21.1181 }
21.1182 // $ANTLR end "optionsSpec"
21.1183 @@ -1786,29 +1396,19 @@
21.1184 RewriteRuleTokenStream stream_71=new RewriteRuleTokenStream(adaptor,"token 71");
21.1185 RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,"rule id");
21.1186 RewriteRuleSubtreeStream stream_optionValue=new RewriteRuleSubtreeStream(adaptor,"rule optionValue");
21.1187 - try { dbg.enterRule(getGrammarFileName(), "option");
21.1188 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.1189 - incRuleLevel();
21.1190 - dbg.location(138, 1);
21.1191 -
21.1192 try {
21.1193 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:139:5: ( id '=' optionValue -> ^( '=' id optionValue ) )
21.1194 - dbg.enterAlt(1);
21.1195 -
21.1196 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:139:9: id '=' optionValue
21.1197 {
21.1198 - dbg.location(139,9);
21.1199 pushFollow(FOLLOW_id_in_option748);
21.1200 id32=id();
21.1201
21.1202 state._fsp--;
21.1203 if (state.failed) return retval;
21.1204 if ( state.backtracking==0 ) stream_id.add(id32.getTree());
21.1205 - dbg.location(139,12);
21.1206 char_literal33=(Token)match(input,71,FOLLOW_71_in_option750); if (state.failed) return retval;
21.1207 if ( state.backtracking==0 ) stream_71.add(char_literal33);
21.1208
21.1209 - dbg.location(139,16);
21.1210 pushFollow(FOLLOW_optionValue_in_option752);
21.1211 optionValue34=optionValue();
21.1212
21.1213 @@ -1818,7 +1418,7 @@
21.1214
21.1215
21.1216 // AST REWRITE
21.1217 - // elements: id, optionValue, 71
21.1218 + // elements: optionValue, id, 71
21.1219 // token labels:
21.1220 // rule labels: retval
21.1221 // token list labels:
21.1222 @@ -1831,16 +1431,12 @@
21.1223 root_0 = (CommonTree)adaptor.nil();
21.1224 // 139:28: -> ^( '=' id optionValue )
21.1225 {
21.1226 - dbg.location(139,31);
21.1227 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:139:31: ^( '=' id optionValue )
21.1228 {
21.1229 CommonTree root_1 = (CommonTree)adaptor.nil();
21.1230 - dbg.location(139,33);
21.1231 root_1 = (CommonTree)adaptor.becomeRoot(stream_71.nextNode(), root_1);
21.1232
21.1233 - dbg.location(139,37);
21.1234 adaptor.addChild(root_1, stream_id.nextTree());
21.1235 - dbg.location(139,40);
21.1236 adaptor.addChild(root_1, stream_optionValue.nextTree());
21.1237
21.1238 adaptor.addChild(root_0, root_1);
21.1239 @@ -1867,15 +1463,6 @@
21.1240 }
21.1241 finally {
21.1242 }
21.1243 - dbg.location(140, 3);
21.1244 -
21.1245 - }
21.1246 - finally {
21.1247 - dbg.exitRule(getGrammarFileName(), "option");
21.1248 - decRuleLevel();
21.1249 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.1250 - }
21.1251 -
21.1252 return retval;
21.1253 }
21.1254 // $ANTLR end "option"
21.1255 @@ -1906,16 +1493,9 @@
21.1256 CommonTree INT38_tree=null;
21.1257 RewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,"token 74");
21.1258
21.1259 - try { dbg.enterRule(getGrammarFileName(), "optionValue");
21.1260 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.1261 - incRuleLevel();
21.1262 - dbg.location(142, 1);
21.1263 -
21.1264 try {
21.1265 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:143:5: ( id | STRING_LITERAL | CHAR_LITERAL | INT | s= '*' -> STRING_LITERAL[$s] )
21.1266 int alt14=5;
21.1267 - try { dbg.enterDecision(14, decisionCanBacktrack[14]);
21.1268 -
21.1269 switch ( input.LA(1) ) {
21.1270 case TOKEN_REF:
21.1271 case RULE_REF:
21.1272 @@ -1948,21 +1528,15 @@
21.1273 NoViableAltException nvae =
21.1274 new NoViableAltException("", 14, 0, input);
21.1275
21.1276 - dbg.recognitionException(nvae);
21.1277 throw nvae;
21.1278 }
21.1279
21.1280 - } finally {dbg.exitDecision(14);}
21.1281 -
21.1282 switch (alt14) {
21.1283 case 1 :
21.1284 - dbg.enterAlt(1);
21.1285 -
21.1286 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:143:9: id
21.1287 {
21.1288 root_0 = (CommonTree)adaptor.nil();
21.1289
21.1290 - dbg.location(143,9);
21.1291 pushFollow(FOLLOW_id_in_optionValue781);
21.1292 id35=id();
21.1293
21.1294 @@ -1973,13 +1547,10 @@
21.1295 }
21.1296 break;
21.1297 case 2 :
21.1298 - dbg.enterAlt(2);
21.1299 -
21.1300 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:144:9: STRING_LITERAL
21.1301 {
21.1302 root_0 = (CommonTree)adaptor.nil();
21.1303
21.1304 - dbg.location(144,9);
21.1305 STRING_LITERAL36=(Token)match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_optionValue791); if (state.failed) return retval;
21.1306 if ( state.backtracking==0 ) {
21.1307 STRING_LITERAL36_tree = (CommonTree)adaptor.create(STRING_LITERAL36);
21.1308 @@ -1989,13 +1560,10 @@
21.1309 }
21.1310 break;
21.1311 case 3 :
21.1312 - dbg.enterAlt(3);
21.1313 -
21.1314 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:145:9: CHAR_LITERAL
21.1315 {
21.1316 root_0 = (CommonTree)adaptor.nil();
21.1317
21.1318 - dbg.location(145,9);
21.1319 CHAR_LITERAL37=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_optionValue801); if (state.failed) return retval;
21.1320 if ( state.backtracking==0 ) {
21.1321 CHAR_LITERAL37_tree = (CommonTree)adaptor.create(CHAR_LITERAL37);
21.1322 @@ -2005,13 +1573,10 @@
21.1323 }
21.1324 break;
21.1325 case 4 :
21.1326 - dbg.enterAlt(4);
21.1327 -
21.1328 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:146:9: INT
21.1329 {
21.1330 root_0 = (CommonTree)adaptor.nil();
21.1331
21.1332 - dbg.location(146,9);
21.1333 INT38=(Token)match(input,INT,FOLLOW_INT_in_optionValue811); if (state.failed) return retval;
21.1334 if ( state.backtracking==0 ) {
21.1335 INT38_tree = (CommonTree)adaptor.create(INT38);
21.1336 @@ -2021,11 +1586,8 @@
21.1337 }
21.1338 break;
21.1339 case 5 :
21.1340 - dbg.enterAlt(5);
21.1341 -
21.1342 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:147:7: s= '*'
21.1343 {
21.1344 - dbg.location(147,8);
21.1345 s=(Token)match(input,74,FOLLOW_74_in_optionValue821); if (state.failed) return retval;
21.1346 if ( state.backtracking==0 ) stream_74.add(s);
21.1347
21.1348 @@ -2045,7 +1607,6 @@
21.1349 root_0 = (CommonTree)adaptor.nil();
21.1350 // 147:13: -> STRING_LITERAL[$s]
21.1351 {
21.1352 - dbg.location(147,16);
21.1353 adaptor.addChild(root_0, (CommonTree)adaptor.create(STRING_LITERAL, s));
21.1354
21.1355 }
21.1356 @@ -2071,15 +1632,6 @@
21.1357 }
21.1358 finally {
21.1359 }
21.1360 - dbg.location(148, 5);
21.1361 -
21.1362 - }
21.1363 - finally {
21.1364 - dbg.exitRule(getGrammarFileName(), "optionValue");
21.1365 - decRuleLevel();
21.1366 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.1367 - }
21.1368 -
21.1369 return retval;
21.1370 }
21.1371 // $ANTLR end "optionValue"
21.1372 @@ -2159,37 +1711,21 @@
21.1373 RewriteRuleSubtreeStream stream_optionsSpec=new RewriteRuleSubtreeStream(adaptor,"rule optionsSpec");
21.1374 RewriteRuleSubtreeStream stream_altList=new RewriteRuleSubtreeStream(adaptor,"rule altList");
21.1375 RewriteRuleSubtreeStream stream_ruleAction=new RewriteRuleSubtreeStream(adaptor,"rule ruleAction");
21.1376 - try { dbg.enterRule(getGrammarFileName(), "rule");
21.1377 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.1378 - incRuleLevel();
21.1379 - dbg.location(150, 1);
21.1380 -
21.1381 try {
21.1382 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:154:2: ( ( DOC_COMMENT )? (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? id ( '!' )? (arg= ARG_ACTION )? ( 'returns' rt= ARG_ACTION )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* ':' altList ';' ( exceptionGroup )? -> ^( RULE id ( ^( ARG $arg) )? ( ^( RET $rt) )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR[\"EOR\"] ) )
21.1383 - dbg.enterAlt(1);
21.1384 -
21.1385 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:154:4: ( DOC_COMMENT )? (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? id ( '!' )? (arg= ARG_ACTION )? ( 'returns' rt= ARG_ACTION )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* ':' altList ';' ( exceptionGroup )?
21.1386 {
21.1387 - dbg.location(154,4);
21.1388 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:154:4: ( DOC_COMMENT )?
21.1389 int alt15=2;
21.1390 - try { dbg.enterSubRule(15);
21.1391 - try { dbg.enterDecision(15, decisionCanBacktrack[15]);
21.1392 -
21.1393 int LA15_0 = input.LA(1);
21.1394
21.1395 if ( (LA15_0==DOC_COMMENT) ) {
21.1396 alt15=1;
21.1397 }
21.1398 - } finally {dbg.exitDecision(15);}
21.1399 -
21.1400 switch (alt15) {
21.1401 case 1 :
21.1402 - dbg.enterAlt(1);
21.1403 -
21.1404 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:154:4: DOC_COMMENT
21.1405 {
21.1406 - dbg.location(154,4);
21.1407 DOC_COMMENT39=(Token)match(input,DOC_COMMENT,FOLLOW_DOC_COMMENT_in_rule846); if (state.failed) return retval;
21.1408 if ( state.backtracking==0 ) stream_DOC_COMMENT.add(DOC_COMMENT39);
21.1409
21.1410 @@ -2198,33 +1734,20 @@
21.1411 break;
21.1412
21.1413 }
21.1414 - } finally {dbg.exitSubRule(15);}
21.1415 -
21.1416 - dbg.location(155,3);
21.1417 +
21.1418 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:155:3: (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )?
21.1419 int alt17=2;
21.1420 - try { dbg.enterSubRule(17);
21.1421 - try { dbg.enterDecision(17, decisionCanBacktrack[17]);
21.1422 -
21.1423 int LA17_0 = input.LA(1);
21.1424
21.1425 if ( (LA17_0==FRAGMENT||(LA17_0>=75 && LA17_0<=77)) ) {
21.1426 alt17=1;
21.1427 }
21.1428 - } finally {dbg.exitDecision(17);}
21.1429 -
21.1430 switch (alt17) {
21.1431 case 1 :
21.1432 - dbg.enterAlt(1);
21.1433 -
21.1434 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:155:5: modifier= ( 'protected' | 'public' | 'private' | 'fragment' )
21.1435 {
21.1436 - dbg.location(155,13);
21.1437 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:155:14: ( 'protected' | 'public' | 'private' | 'fragment' )
21.1438 int alt16=4;
21.1439 - try { dbg.enterSubRule(16);
21.1440 - try { dbg.enterDecision(16, decisionCanBacktrack[16]);
21.1441 -
21.1442 switch ( input.LA(1) ) {
21.1443 case 75:
21.1444 {
21.1445 @@ -2251,19 +1774,13 @@
21.1446 NoViableAltException nvae =
21.1447 new NoViableAltException("", 16, 0, input);
21.1448
21.1449 - dbg.recognitionException(nvae);
21.1450 throw nvae;
21.1451 }
21.1452
21.1453 - } finally {dbg.exitDecision(16);}
21.1454 -
21.1455 switch (alt16) {
21.1456 case 1 :
21.1457 - dbg.enterAlt(1);
21.1458 -
21.1459 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:155:15: 'protected'
21.1460 {
21.1461 - dbg.location(155,15);
21.1462 string_literal40=(Token)match(input,75,FOLLOW_75_in_rule856); if (state.failed) return retval;
21.1463 if ( state.backtracking==0 ) stream_75.add(string_literal40);
21.1464
21.1465 @@ -2271,11 +1788,8 @@
21.1466 }
21.1467 break;
21.1468 case 2 :
21.1469 - dbg.enterAlt(2);
21.1470 -
21.1471 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:155:27: 'public'
21.1472 {
21.1473 - dbg.location(155,27);
21.1474 string_literal41=(Token)match(input,76,FOLLOW_76_in_rule858); if (state.failed) return retval;
21.1475 if ( state.backtracking==0 ) stream_76.add(string_literal41);
21.1476
21.1477 @@ -2283,11 +1797,8 @@
21.1478 }
21.1479 break;
21.1480 case 3 :
21.1481 - dbg.enterAlt(3);
21.1482 -
21.1483 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:155:36: 'private'
21.1484 {
21.1485 - dbg.location(155,36);
21.1486 string_literal42=(Token)match(input,77,FOLLOW_77_in_rule860); if (state.failed) return retval;
21.1487 if ( state.backtracking==0 ) stream_77.add(string_literal42);
21.1488
21.1489 @@ -2295,11 +1806,8 @@
21.1490 }
21.1491 break;
21.1492 case 4 :
21.1493 - dbg.enterAlt(4);
21.1494 -
21.1495 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:155:46: 'fragment'
21.1496 {
21.1497 - dbg.location(155,46);
21.1498 string_literal43=(Token)match(input,FRAGMENT,FOLLOW_FRAGMENT_in_rule862); if (state.failed) return retval;
21.1499 if ( state.backtracking==0 ) stream_FRAGMENT.add(string_literal43);
21.1500
21.1501 @@ -2308,46 +1816,33 @@
21.1502 break;
21.1503
21.1504 }
21.1505 - } finally {dbg.exitSubRule(16);}
21.1506
21.1507
21.1508 }
21.1509 break;
21.1510
21.1511 }
21.1512 - } finally {dbg.exitSubRule(17);}
21.1513 -
21.1514 - dbg.location(156,3);
21.1515 +
21.1516 pushFollow(FOLLOW_id_in_rule870);
21.1517 id44=id();
21.1518
21.1519 state._fsp--;
21.1520 if (state.failed) return retval;
21.1521 if ( state.backtracking==0 ) stream_id.add(id44.getTree());
21.1522 - dbg.location(156,6);
21.1523 if ( state.backtracking==0 ) {
21.1524 ((rule_scope)rule_stack.peek()).name = (id44!=null?input.toString(id44.start,id44.stop):null);
21.1525 }
21.1526 - dbg.location(157,3);
21.1527 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:157:3: ( '!' )?
21.1528 int alt18=2;
21.1529 - try { dbg.enterSubRule(18);
21.1530 - try { dbg.enterDecision(18, decisionCanBacktrack[18]);
21.1531 -
21.1532 int LA18_0 = input.LA(1);
21.1533
21.1534 if ( (LA18_0==BANG) ) {
21.1535 alt18=1;
21.1536 }
21.1537 - } finally {dbg.exitDecision(18);}
21.1538 -
21.1539 switch (alt18) {
21.1540 case 1 :
21.1541 - dbg.enterAlt(1);
21.1542 -
21.1543 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:157:3: '!'
21.1544 {
21.1545 - dbg.location(157,3);
21.1546 char_literal45=(Token)match(input,BANG,FOLLOW_BANG_in_rule876); if (state.failed) return retval;
21.1547 if ( state.backtracking==0 ) stream_BANG.add(char_literal45);
21.1548
21.1549 @@ -2356,28 +1851,18 @@
21.1550 break;
21.1551
21.1552 }
21.1553 - } finally {dbg.exitSubRule(18);}
21.1554 -
21.1555 - dbg.location(158,3);
21.1556 +
21.1557 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:158:3: (arg= ARG_ACTION )?
21.1558 int alt19=2;
21.1559 - try { dbg.enterSubRule(19);
21.1560 - try { dbg.enterDecision(19, decisionCanBacktrack[19]);
21.1561 -
21.1562 int LA19_0 = input.LA(1);
21.1563
21.1564 if ( (LA19_0==ARG_ACTION) ) {
21.1565 alt19=1;
21.1566 }
21.1567 - } finally {dbg.exitDecision(19);}
21.1568 -
21.1569 switch (alt19) {
21.1570 case 1 :
21.1571 - dbg.enterAlt(1);
21.1572 -
21.1573 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:158:5: arg= ARG_ACTION
21.1574 {
21.1575 - dbg.location(158,8);
21.1576 arg=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rule885); if (state.failed) return retval;
21.1577 if ( state.backtracking==0 ) stream_ARG_ACTION.add(arg);
21.1578
21.1579 @@ -2386,32 +1871,21 @@
21.1580 break;
21.1581
21.1582 }
21.1583 - } finally {dbg.exitSubRule(19);}
21.1584 -
21.1585 - dbg.location(159,3);
21.1586 +
21.1587 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:159:3: ( 'returns' rt= ARG_ACTION )?
21.1588 int alt20=2;
21.1589 - try { dbg.enterSubRule(20);
21.1590 - try { dbg.enterDecision(20, decisionCanBacktrack[20]);
21.1591 -
21.1592 int LA20_0 = input.LA(1);
21.1593
21.1594 if ( (LA20_0==78) ) {
21.1595 alt20=1;
21.1596 }
21.1597 - } finally {dbg.exitDecision(20);}
21.1598 -
21.1599 switch (alt20) {
21.1600 case 1 :
21.1601 - dbg.enterAlt(1);
21.1602 -
21.1603 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:159:5: 'returns' rt= ARG_ACTION
21.1604 {
21.1605 - dbg.location(159,5);
21.1606 string_literal46=(Token)match(input,78,FOLLOW_78_in_rule894); if (state.failed) return retval;
21.1607 if ( state.backtracking==0 ) stream_78.add(string_literal46);
21.1608
21.1609 - dbg.location(159,17);
21.1610 rt=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rule898); if (state.failed) return retval;
21.1611 if ( state.backtracking==0 ) stream_ARG_ACTION.add(rt);
21.1612
21.1613 @@ -2420,28 +1894,18 @@
21.1614 break;
21.1615
21.1616 }
21.1617 - } finally {dbg.exitSubRule(20);}
21.1618 -
21.1619 - dbg.location(160,3);
21.1620 +
21.1621 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:160:3: ( throwsSpec )?
21.1622 int alt21=2;
21.1623 - try { dbg.enterSubRule(21);
21.1624 - try { dbg.enterDecision(21, decisionCanBacktrack[21]);
21.1625 -
21.1626 int LA21_0 = input.LA(1);
21.1627
21.1628 if ( (LA21_0==80) ) {
21.1629 alt21=1;
21.1630 }
21.1631 - } finally {dbg.exitDecision(21);}
21.1632 -
21.1633 switch (alt21) {
21.1634 case 1 :
21.1635 - dbg.enterAlt(1);
21.1636 -
21.1637 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:160:3: throwsSpec
21.1638 {
21.1639 - dbg.location(160,3);
21.1640 pushFollow(FOLLOW_throwsSpec_in_rule906);
21.1641 throwsSpec47=throwsSpec();
21.1642
21.1643 @@ -2453,28 +1917,18 @@
21.1644 break;
21.1645
21.1646 }
21.1647 - } finally {dbg.exitSubRule(21);}
21.1648 -
21.1649 - dbg.location(160,15);
21.1650 +
21.1651 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:160:15: ( optionsSpec )?
21.1652 int alt22=2;
21.1653 - try { dbg.enterSubRule(22);
21.1654 - try { dbg.enterDecision(22, decisionCanBacktrack[22]);
21.1655 -
21.1656 int LA22_0 = input.LA(1);
21.1657
21.1658 if ( (LA22_0==OPTIONS) ) {
21.1659 alt22=1;
21.1660 }
21.1661 - } finally {dbg.exitDecision(22);}
21.1662 -
21.1663 switch (alt22) {
21.1664 case 1 :
21.1665 - dbg.enterAlt(1);
21.1666 -
21.1667 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:160:15: optionsSpec
21.1668 {
21.1669 - dbg.location(160,15);
21.1670 pushFollow(FOLLOW_optionsSpec_in_rule909);
21.1671 optionsSpec48=optionsSpec();
21.1672
21.1673 @@ -2486,28 +1940,18 @@
21.1674 break;
21.1675
21.1676 }
21.1677 - } finally {dbg.exitSubRule(22);}
21.1678 -
21.1679 - dbg.location(160,28);
21.1680 +
21.1681 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:160:28: ( ruleScopeSpec )?
21.1682 int alt23=2;
21.1683 - try { dbg.enterSubRule(23);
21.1684 - try { dbg.enterDecision(23, decisionCanBacktrack[23]);
21.1685 -
21.1686 int LA23_0 = input.LA(1);
21.1687
21.1688 if ( (LA23_0==SCOPE) ) {
21.1689 alt23=1;
21.1690 }
21.1691 - } finally {dbg.exitDecision(23);}
21.1692 -
21.1693 switch (alt23) {
21.1694 case 1 :
21.1695 - dbg.enterAlt(1);
21.1696 -
21.1697 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:160:28: ruleScopeSpec
21.1698 {
21.1699 - dbg.location(160,28);
21.1700 pushFollow(FOLLOW_ruleScopeSpec_in_rule912);
21.1701 ruleScopeSpec49=ruleScopeSpec();
21.1702
21.1703 @@ -2519,17 +1963,11 @@
21.1704 break;
21.1705
21.1706 }
21.1707 - } finally {dbg.exitSubRule(23);}
21.1708 -
21.1709 - dbg.location(160,43);
21.1710 +
21.1711 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:160:43: ( ruleAction )*
21.1712 - try { dbg.enterSubRule(24);
21.1713 -
21.1714 loop24:
21.1715 do {
21.1716 int alt24=2;
21.1717 - try { dbg.enterDecision(24, decisionCanBacktrack[24]);
21.1718 -
21.1719 int LA24_0 = input.LA(1);
21.1720
21.1721 if ( (LA24_0==72) ) {
21.1722 @@ -2537,15 +1975,10 @@
21.1723 }
21.1724
21.1725
21.1726 - } finally {dbg.exitDecision(24);}
21.1727 -
21.1728 switch (alt24) {
21.1729 case 1 :
21.1730 - dbg.enterAlt(1);
21.1731 -
21.1732 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:160:43: ruleAction
21.1733 {
21.1734 - dbg.location(160,43);
21.1735 pushFollow(FOLLOW_ruleAction_in_rule915);
21.1736 ruleAction50=ruleAction();
21.1737
21.1738 @@ -2560,43 +1993,30 @@
21.1739 break loop24;
21.1740 }
21.1741 } while (true);
21.1742 - } finally {dbg.exitSubRule(24);}
21.1743 -
21.1744 - dbg.location(161,3);
21.1745 +
21.1746 char_literal51=(Token)match(input,79,FOLLOW_79_in_rule920); if (state.failed) return retval;
21.1747 if ( state.backtracking==0 ) stream_79.add(char_literal51);
21.1748
21.1749 - dbg.location(161,7);
21.1750 pushFollow(FOLLOW_altList_in_rule922);
21.1751 altList52=altList();
21.1752
21.1753 state._fsp--;
21.1754 if (state.failed) return retval;
21.1755 if ( state.backtracking==0 ) stream_altList.add(altList52.getTree());
21.1756 - dbg.location(161,15);
21.1757 char_literal53=(Token)match(input,69,FOLLOW_69_in_rule924); if (state.failed) return retval;
21.1758 if ( state.backtracking==0 ) stream_69.add(char_literal53);
21.1759
21.1760 - dbg.location(162,3);
21.1761 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:162:3: ( exceptionGroup )?
21.1762 int alt25=2;
21.1763 - try { dbg.enterSubRule(25);
21.1764 - try { dbg.enterDecision(25, decisionCanBacktrack[25]);
21.1765 -
21.1766 int LA25_0 = input.LA(1);
21.1767
21.1768 if ( ((LA25_0>=85 && LA25_0<=86)) ) {
21.1769 alt25=1;
21.1770 }
21.1771 - } finally {dbg.exitDecision(25);}
21.1772 -
21.1773 switch (alt25) {
21.1774 case 1 :
21.1775 - dbg.enterAlt(1);
21.1776 -
21.1777 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:162:3: exceptionGroup
21.1778 {
21.1779 - dbg.location(162,3);
21.1780 pushFollow(FOLLOW_exceptionGroup_in_rule928);
21.1781 exceptionGroup54=exceptionGroup();
21.1782
21.1783 @@ -2608,12 +2028,11 @@
21.1784 break;
21.1785
21.1786 }
21.1787 - } finally {dbg.exitSubRule(25);}
21.1788
21.1789
21.1790
21.1791 // AST REWRITE
21.1792 - // elements: ruleScopeSpec, arg, altList, exceptionGroup, ruleAction, rt, id, optionsSpec
21.1793 + // elements: altList, optionsSpec, id, exceptionGroup, arg, ruleScopeSpec, rt, ruleAction
21.1794 // token labels: arg, rt
21.1795 // rule labels: retval
21.1796 // token list labels:
21.1797 @@ -2628,28 +2047,20 @@
21.1798 root_0 = (CommonTree)adaptor.nil();
21.1799 // 163:6: -> ^( RULE id ( ^( ARG $arg) )? ( ^( RET $rt) )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR[\"EOR\"] )
21.1800 {
21.1801 - dbg.location(163,9);
21.1802 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:163:9: ^( RULE id ( ^( ARG $arg) )? ( ^( RET $rt) )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR[\"EOR\"] )
21.1803 {
21.1804 CommonTree root_1 = (CommonTree)adaptor.nil();
21.1805 - dbg.location(163,12);
21.1806 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(RULE, "RULE"), root_1);
21.1807
21.1808 - dbg.location(163,17);
21.1809 adaptor.addChild(root_1, stream_id.nextTree());
21.1810 - dbg.location(163,20);
21.1811 adaptor.addChild(root_1, modifier!=null?adaptor.create(modifier):null);
21.1812 - dbg.location(163,67);
21.1813 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:163:67: ( ^( ARG $arg) )?
21.1814 if ( stream_arg.hasNext() ) {
21.1815 - dbg.location(163,67);
21.1816 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:163:67: ^( ARG $arg)
21.1817 {
21.1818 CommonTree root_2 = (CommonTree)adaptor.nil();
21.1819 - dbg.location(163,69);
21.1820 root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ARG, "ARG"), root_2);
21.1821
21.1822 - dbg.location(163,73);
21.1823 adaptor.addChild(root_2, stream_arg.nextNode());
21.1824
21.1825 adaptor.addChild(root_1, root_2);
21.1826 @@ -2657,17 +2068,13 @@
21.1827
21.1828 }
21.1829 stream_arg.reset();
21.1830 - dbg.location(163,80);
21.1831 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:163:80: ( ^( RET $rt) )?
21.1832 if ( stream_rt.hasNext() ) {
21.1833 - dbg.location(163,80);
21.1834 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:163:80: ^( RET $rt)
21.1835 {
21.1836 CommonTree root_2 = (CommonTree)adaptor.nil();
21.1837 - dbg.location(163,82);
21.1838 root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(RET, "RET"), root_2);
21.1839
21.1840 - dbg.location(163,86);
21.1841 adaptor.addChild(root_2, stream_rt.nextNode());
21.1842
21.1843 adaptor.addChild(root_1, root_2);
21.1844 @@ -2675,41 +2082,31 @@
21.1845
21.1846 }
21.1847 stream_rt.reset();
21.1848 - dbg.location(164,9);
21.1849 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:164:9: ( optionsSpec )?
21.1850 if ( stream_optionsSpec.hasNext() ) {
21.1851 - dbg.location(164,9);
21.1852 adaptor.addChild(root_1, stream_optionsSpec.nextTree());
21.1853
21.1854 }
21.1855 stream_optionsSpec.reset();
21.1856 - dbg.location(164,22);
21.1857 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:164:22: ( ruleScopeSpec )?
21.1858 if ( stream_ruleScopeSpec.hasNext() ) {
21.1859 - dbg.location(164,22);
21.1860 adaptor.addChild(root_1, stream_ruleScopeSpec.nextTree());
21.1861
21.1862 }
21.1863 stream_ruleScopeSpec.reset();
21.1864 - dbg.location(164,37);
21.1865 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:164:37: ( ruleAction )*
21.1866 while ( stream_ruleAction.hasNext() ) {
21.1867 - dbg.location(164,37);
21.1868 adaptor.addChild(root_1, stream_ruleAction.nextTree());
21.1869
21.1870 }
21.1871 stream_ruleAction.reset();
21.1872 - dbg.location(165,9);
21.1873 adaptor.addChild(root_1, stream_altList.nextTree());
21.1874 - dbg.location(166,9);
21.1875 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:166:9: ( exceptionGroup )?
21.1876 if ( stream_exceptionGroup.hasNext() ) {
21.1877 - dbg.location(166,9);
21.1878 adaptor.addChild(root_1, stream_exceptionGroup.nextTree());
21.1879
21.1880 }
21.1881 stream_exceptionGroup.reset();
21.1882 - dbg.location(167,9);
21.1883 adaptor.addChild(root_1, (CommonTree)adaptor.create(EOR, "EOR"));
21.1884
21.1885 adaptor.addChild(root_0, root_1);
21.1886 @@ -2737,15 +2134,6 @@
21.1887 finally {
21.1888 rule_stack.pop();
21.1889 }
21.1890 - dbg.location(169, 2);
21.1891 -
21.1892 - }
21.1893 - finally {
21.1894 - dbg.exitRule(getGrammarFileName(), "rule");
21.1895 - decRuleLevel();
21.1896 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.1897 - }
21.1898 -
21.1899 return retval;
21.1900 }
21.1901 // $ANTLR end "rule"
21.1902 @@ -2773,36 +2161,26 @@
21.1903 RewriteRuleTokenStream stream_72=new RewriteRuleTokenStream(adaptor,"token 72");
21.1904 RewriteRuleTokenStream stream_ACTION=new RewriteRuleTokenStream(adaptor,"token ACTION");
21.1905 RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,"rule id");
21.1906 - try { dbg.enterRule(getGrammarFileName(), "ruleAction");
21.1907 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.1908 - incRuleLevel();
21.1909 - dbg.location(171, 1);
21.1910 -
21.1911 try {
21.1912 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:173:2: ( '@' id ACTION -> ^( '@' id ACTION ) )
21.1913 - dbg.enterAlt(1);
21.1914 -
21.1915 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:173:4: '@' id ACTION
21.1916 {
21.1917 - dbg.location(173,4);
21.1918 char_literal55=(Token)match(input,72,FOLLOW_72_in_ruleAction1030); if (state.failed) return retval;
21.1919 if ( state.backtracking==0 ) stream_72.add(char_literal55);
21.1920
21.1921 - dbg.location(173,8);
21.1922 pushFollow(FOLLOW_id_in_ruleAction1032);
21.1923 id56=id();
21.1924
21.1925 state._fsp--;
21.1926 if (state.failed) return retval;
21.1927 if ( state.backtracking==0 ) stream_id.add(id56.getTree());
21.1928 - dbg.location(173,11);
21.1929 ACTION57=(Token)match(input,ACTION,FOLLOW_ACTION_in_ruleAction1034); if (state.failed) return retval;
21.1930 if ( state.backtracking==0 ) stream_ACTION.add(ACTION57);
21.1931
21.1932
21.1933
21.1934 // AST REWRITE
21.1935 - // elements: ACTION, id, 72
21.1936 + // elements: id, 72, ACTION
21.1937 // token labels:
21.1938 // rule labels: retval
21.1939 // token list labels:
21.1940 @@ -2815,16 +2193,12 @@
21.1941 root_0 = (CommonTree)adaptor.nil();
21.1942 // 173:18: -> ^( '@' id ACTION )
21.1943 {
21.1944 - dbg.location(173,21);
21.1945 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:173:21: ^( '@' id ACTION )
21.1946 {
21.1947 CommonTree root_1 = (CommonTree)adaptor.nil();
21.1948 - dbg.location(173,23);
21.1949 root_1 = (CommonTree)adaptor.becomeRoot(stream_72.nextNode(), root_1);
21.1950
21.1951 - dbg.location(173,27);
21.1952 adaptor.addChild(root_1, stream_id.nextTree());
21.1953 - dbg.location(173,30);
21.1954 adaptor.addChild(root_1, stream_ACTION.nextNode());
21.1955
21.1956 adaptor.addChild(root_0, root_1);
21.1957 @@ -2851,15 +2225,6 @@
21.1958 }
21.1959 finally {
21.1960 }
21.1961 - dbg.location(174, 2);
21.1962 -
21.1963 - }
21.1964 - finally {
21.1965 - dbg.exitRule(getGrammarFileName(), "ruleAction");
21.1966 - decRuleLevel();
21.1967 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.1968 - }
21.1969 -
21.1970 return retval;
21.1971 }
21.1972 // $ANTLR end "ruleAction"
21.1973 @@ -2889,37 +2254,23 @@
21.1974 RewriteRuleTokenStream stream_80=new RewriteRuleTokenStream(adaptor,"token 80");
21.1975 RewriteRuleTokenStream stream_81=new RewriteRuleTokenStream(adaptor,"token 81");
21.1976 RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,"rule id");
21.1977 - try { dbg.enterRule(getGrammarFileName(), "throwsSpec");
21.1978 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.1979 - incRuleLevel();
21.1980 - dbg.location(176, 1);
21.1981 -
21.1982 try {
21.1983 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:177:2: ( 'throws' id ( ',' id )* -> ^( 'throws' ( id )+ ) )
21.1984 - dbg.enterAlt(1);
21.1985 -
21.1986 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:177:4: 'throws' id ( ',' id )*
21.1987 {
21.1988 - dbg.location(177,4);
21.1989 string_literal58=(Token)match(input,80,FOLLOW_80_in_throwsSpec1055); if (state.failed) return retval;
21.1990 if ( state.backtracking==0 ) stream_80.add(string_literal58);
21.1991
21.1992 - dbg.location(177,13);
21.1993 pushFollow(FOLLOW_id_in_throwsSpec1057);
21.1994 id59=id();
21.1995
21.1996 state._fsp--;
21.1997 if (state.failed) return retval;
21.1998 if ( state.backtracking==0 ) stream_id.add(id59.getTree());
21.1999 - dbg.location(177,16);
21.2000 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:177:16: ( ',' id )*
21.2001 - try { dbg.enterSubRule(26);
21.2002 -
21.2003 loop26:
21.2004 do {
21.2005 int alt26=2;
21.2006 - try { dbg.enterDecision(26, decisionCanBacktrack[26]);
21.2007 -
21.2008 int LA26_0 = input.LA(1);
21.2009
21.2010 if ( (LA26_0==81) ) {
21.2011 @@ -2927,19 +2278,13 @@
21.2012 }
21.2013
21.2014
21.2015 - } finally {dbg.exitDecision(26);}
21.2016 -
21.2017 switch (alt26) {
21.2018 case 1 :
21.2019 - dbg.enterAlt(1);
21.2020 -
21.2021 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:177:18: ',' id
21.2022 {
21.2023 - dbg.location(177,18);
21.2024 char_literal60=(Token)match(input,81,FOLLOW_81_in_throwsSpec1061); if (state.failed) return retval;
21.2025 if ( state.backtracking==0 ) stream_81.add(char_literal60);
21.2026
21.2027 - dbg.location(177,22);
21.2028 pushFollow(FOLLOW_id_in_throwsSpec1063);
21.2029 id61=id();
21.2030
21.2031 @@ -2954,7 +2299,6 @@
21.2032 break loop26;
21.2033 }
21.2034 } while (true);
21.2035 - } finally {dbg.exitSubRule(26);}
21.2036
21.2037
21.2038
21.2039 @@ -2972,19 +2316,15 @@
21.2040 root_0 = (CommonTree)adaptor.nil();
21.2041 // 177:28: -> ^( 'throws' ( id )+ )
21.2042 {
21.2043 - dbg.location(177,31);
21.2044 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:177:31: ^( 'throws' ( id )+ )
21.2045 {
21.2046 CommonTree root_1 = (CommonTree)adaptor.nil();
21.2047 - dbg.location(177,33);
21.2048 root_1 = (CommonTree)adaptor.becomeRoot(stream_80.nextNode(), root_1);
21.2049
21.2050 - dbg.location(177,42);
21.2051 if ( !(stream_id.hasNext()) ) {
21.2052 throw new RewriteEarlyExitException();
21.2053 }
21.2054 while ( stream_id.hasNext() ) {
21.2055 - dbg.location(177,42);
21.2056 adaptor.addChild(root_1, stream_id.nextTree());
21.2057
21.2058 }
21.2059 @@ -3014,15 +2354,6 @@
21.2060 }
21.2061 finally {
21.2062 }
21.2063 - dbg.location(178, 2);
21.2064 -
21.2065 - }
21.2066 - finally {
21.2067 - dbg.exitRule(getGrammarFileName(), "throwsSpec");
21.2068 - decRuleLevel();
21.2069 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.2070 - }
21.2071 -
21.2072 return retval;
21.2073 }
21.2074 // $ANTLR end "throwsSpec"
21.2075 @@ -3074,16 +2405,9 @@
21.2076 RewriteRuleTokenStream stream_81=new RewriteRuleTokenStream(adaptor,"token 81");
21.2077 RewriteRuleTokenStream stream_ACTION=new RewriteRuleTokenStream(adaptor,"token ACTION");
21.2078 RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,"rule id");
21.2079 - try { dbg.enterRule(getGrammarFileName(), "ruleScopeSpec");
21.2080 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.2081 - incRuleLevel();
21.2082 - dbg.location(180, 1);
21.2083 -
21.2084 try {
21.2085 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:181:2: ( 'scope' ACTION -> ^( 'scope' ACTION ) | 'scope' id ( ',' id )* ';' -> ^( 'scope' ( id )+ ) | 'scope' ACTION 'scope' id ( ',' id )* ';' -> ^( 'scope' ACTION ( id )+ ) )
21.2086 int alt29=3;
21.2087 - try { dbg.enterDecision(29, decisionCanBacktrack[29]);
21.2088 -
21.2089 int LA29_0 = input.LA(1);
21.2090
21.2091 if ( (LA29_0==SCOPE) ) {
21.2092 @@ -3103,7 +2427,6 @@
21.2093 NoViableAltException nvae =
21.2094 new NoViableAltException("", 29, 2, input);
21.2095
21.2096 - dbg.recognitionException(nvae);
21.2097 throw nvae;
21.2098 }
21.2099 }
21.2100 @@ -3115,7 +2438,6 @@
21.2101 NoViableAltException nvae =
21.2102 new NoViableAltException("", 29, 1, input);
21.2103
21.2104 - dbg.recognitionException(nvae);
21.2105 throw nvae;
21.2106 }
21.2107 }
21.2108 @@ -3124,29 +2446,22 @@
21.2109 NoViableAltException nvae =
21.2110 new NoViableAltException("", 29, 0, input);
21.2111
21.2112 - dbg.recognitionException(nvae);
21.2113 throw nvae;
21.2114 }
21.2115 - } finally {dbg.exitDecision(29);}
21.2116 -
21.2117 switch (alt29) {
21.2118 case 1 :
21.2119 - dbg.enterAlt(1);
21.2120 -
21.2121 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:181:4: 'scope' ACTION
21.2122 {
21.2123 - dbg.location(181,4);
21.2124 string_literal62=(Token)match(input,SCOPE,FOLLOW_SCOPE_in_ruleScopeSpec1086); if (state.failed) return retval;
21.2125 if ( state.backtracking==0 ) stream_SCOPE.add(string_literal62);
21.2126
21.2127 - dbg.location(181,12);
21.2128 ACTION63=(Token)match(input,ACTION,FOLLOW_ACTION_in_ruleScopeSpec1088); if (state.failed) return retval;
21.2129 if ( state.backtracking==0 ) stream_ACTION.add(ACTION63);
21.2130
21.2131
21.2132
21.2133 // AST REWRITE
21.2134 - // elements: SCOPE, ACTION
21.2135 + // elements: ACTION, SCOPE
21.2136 // token labels:
21.2137 // rule labels: retval
21.2138 // token list labels:
21.2139 @@ -3159,14 +2474,11 @@
21.2140 root_0 = (CommonTree)adaptor.nil();
21.2141 // 181:19: -> ^( 'scope' ACTION )
21.2142 {
21.2143 - dbg.location(181,22);
21.2144 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:181:22: ^( 'scope' ACTION )
21.2145 {
21.2146 CommonTree root_1 = (CommonTree)adaptor.nil();
21.2147 - dbg.location(181,24);
21.2148 root_1 = (CommonTree)adaptor.becomeRoot(stream_SCOPE.nextNode(), root_1);
21.2149
21.2150 - dbg.location(181,32);
21.2151 adaptor.addChild(root_1, stream_ACTION.nextNode());
21.2152
21.2153 adaptor.addChild(root_0, root_1);
21.2154 @@ -3178,30 +2490,21 @@
21.2155 }
21.2156 break;
21.2157 case 2 :
21.2158 - dbg.enterAlt(2);
21.2159 -
21.2160 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:182:4: 'scope' id ( ',' id )* ';'
21.2161 {
21.2162 - dbg.location(182,4);
21.2163 string_literal64=(Token)match(input,SCOPE,FOLLOW_SCOPE_in_ruleScopeSpec1101); if (state.failed) return retval;
21.2164 if ( state.backtracking==0 ) stream_SCOPE.add(string_literal64);
21.2165
21.2166 - dbg.location(182,12);
21.2167 pushFollow(FOLLOW_id_in_ruleScopeSpec1103);
21.2168 id65=id();
21.2169
21.2170 state._fsp--;
21.2171 if (state.failed) return retval;
21.2172 if ( state.backtracking==0 ) stream_id.add(id65.getTree());
21.2173 - dbg.location(182,15);
21.2174 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:182:15: ( ',' id )*
21.2175 - try { dbg.enterSubRule(27);
21.2176 -
21.2177 loop27:
21.2178 do {
21.2179 int alt27=2;
21.2180 - try { dbg.enterDecision(27, decisionCanBacktrack[27]);
21.2181 -
21.2182 int LA27_0 = input.LA(1);
21.2183
21.2184 if ( (LA27_0==81) ) {
21.2185 @@ -3209,19 +2512,13 @@
21.2186 }
21.2187
21.2188
21.2189 - } finally {dbg.exitDecision(27);}
21.2190 -
21.2191 switch (alt27) {
21.2192 case 1 :
21.2193 - dbg.enterAlt(1);
21.2194 -
21.2195 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:182:16: ',' id
21.2196 {
21.2197 - dbg.location(182,16);
21.2198 char_literal66=(Token)match(input,81,FOLLOW_81_in_ruleScopeSpec1106); if (state.failed) return retval;
21.2199 if ( state.backtracking==0 ) stream_81.add(char_literal66);
21.2200
21.2201 - dbg.location(182,20);
21.2202 pushFollow(FOLLOW_id_in_ruleScopeSpec1108);
21.2203 id67=id();
21.2204
21.2205 @@ -3236,16 +2533,14 @@
21.2206 break loop27;
21.2207 }
21.2208 } while (true);
21.2209 - } finally {dbg.exitSubRule(27);}
21.2210 -
21.2211 - dbg.location(182,25);
21.2212 +
21.2213 char_literal68=(Token)match(input,69,FOLLOW_69_in_ruleScopeSpec1112); if (state.failed) return retval;
21.2214 if ( state.backtracking==0 ) stream_69.add(char_literal68);
21.2215
21.2216
21.2217
21.2218 // AST REWRITE
21.2219 - // elements: id, SCOPE
21.2220 + // elements: SCOPE, id
21.2221 // token labels:
21.2222 // rule labels: retval
21.2223 // token list labels:
21.2224 @@ -3258,19 +2553,15 @@
21.2225 root_0 = (CommonTree)adaptor.nil();
21.2226 // 182:29: -> ^( 'scope' ( id )+ )
21.2227 {
21.2228 - dbg.location(182,32);
21.2229 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:182:32: ^( 'scope' ( id )+ )
21.2230 {
21.2231 CommonTree root_1 = (CommonTree)adaptor.nil();
21.2232 - dbg.location(182,34);
21.2233 root_1 = (CommonTree)adaptor.becomeRoot(stream_SCOPE.nextNode(), root_1);
21.2234
21.2235 - dbg.location(182,42);
21.2236 if ( !(stream_id.hasNext()) ) {
21.2237 throw new RewriteEarlyExitException();
21.2238 }
21.2239 while ( stream_id.hasNext() ) {
21.2240 - dbg.location(182,42);
21.2241 adaptor.addChild(root_1, stream_id.nextTree());
21.2242
21.2243 }
21.2244 @@ -3285,38 +2576,27 @@
21.2245 }
21.2246 break;
21.2247 case 3 :
21.2248 - dbg.enterAlt(3);
21.2249 -
21.2250 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:183:4: 'scope' ACTION 'scope' id ( ',' id )* ';'
21.2251 {
21.2252 - dbg.location(183,4);
21.2253 string_literal69=(Token)match(input,SCOPE,FOLLOW_SCOPE_in_ruleScopeSpec1126); if (state.failed) return retval;
21.2254 if ( state.backtracking==0 ) stream_SCOPE.add(string_literal69);
21.2255
21.2256 - dbg.location(183,12);
21.2257 ACTION70=(Token)match(input,ACTION,FOLLOW_ACTION_in_ruleScopeSpec1128); if (state.failed) return retval;
21.2258 if ( state.backtracking==0 ) stream_ACTION.add(ACTION70);
21.2259
21.2260 - dbg.location(184,3);
21.2261 string_literal71=(Token)match(input,SCOPE,FOLLOW_SCOPE_in_ruleScopeSpec1132); if (state.failed) return retval;
21.2262 if ( state.backtracking==0 ) stream_SCOPE.add(string_literal71);
21.2263
21.2264 - dbg.location(184,11);
21.2265 pushFollow(FOLLOW_id_in_ruleScopeSpec1134);
21.2266 id72=id();
21.2267
21.2268 state._fsp--;
21.2269 if (state.failed) return retval;
21.2270 if ( state.backtracking==0 ) stream_id.add(id72.getTree());
21.2271 - dbg.location(184,14);
21.2272 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:184:14: ( ',' id )*
21.2273 - try { dbg.enterSubRule(28);
21.2274 -
21.2275 loop28:
21.2276 do {
21.2277 int alt28=2;
21.2278 - try { dbg.enterDecision(28, decisionCanBacktrack[28]);
21.2279 -
21.2280 int LA28_0 = input.LA(1);
21.2281
21.2282 if ( (LA28_0==81) ) {
21.2283 @@ -3324,19 +2604,13 @@
21.2284 }
21.2285
21.2286
21.2287 - } finally {dbg.exitDecision(28);}
21.2288 -
21.2289 switch (alt28) {
21.2290 case 1 :
21.2291 - dbg.enterAlt(1);
21.2292 -
21.2293 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:184:15: ',' id
21.2294 {
21.2295 - dbg.location(184,15);
21.2296 char_literal73=(Token)match(input,81,FOLLOW_81_in_ruleScopeSpec1137); if (state.failed) return retval;
21.2297 if ( state.backtracking==0 ) stream_81.add(char_literal73);
21.2298
21.2299 - dbg.location(184,19);
21.2300 pushFollow(FOLLOW_id_in_ruleScopeSpec1139);
21.2301 id74=id();
21.2302
21.2303 @@ -3351,16 +2625,14 @@
21.2304 break loop28;
21.2305 }
21.2306 } while (true);
21.2307 - } finally {dbg.exitSubRule(28);}
21.2308 -
21.2309 - dbg.location(184,24);
21.2310 +
21.2311 char_literal75=(Token)match(input,69,FOLLOW_69_in_ruleScopeSpec1143); if (state.failed) return retval;
21.2312 if ( state.backtracking==0 ) stream_69.add(char_literal75);
21.2313
21.2314
21.2315
21.2316 // AST REWRITE
21.2317 - // elements: id, ACTION, SCOPE
21.2318 + // elements: SCOPE, ACTION, id
21.2319 // token labels:
21.2320 // rule labels: retval
21.2321 // token list labels:
21.2322 @@ -3373,21 +2645,16 @@
21.2323 root_0 = (CommonTree)adaptor.nil();
21.2324 // 185:3: -> ^( 'scope' ACTION ( id )+ )
21.2325 {
21.2326 - dbg.location(185,6);
21.2327 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:185:6: ^( 'scope' ACTION ( id )+ )
21.2328 {
21.2329 CommonTree root_1 = (CommonTree)adaptor.nil();
21.2330 - dbg.location(185,8);
21.2331 root_1 = (CommonTree)adaptor.becomeRoot(stream_SCOPE.nextNode(), root_1);
21.2332
21.2333 - dbg.location(185,16);
21.2334 adaptor.addChild(root_1, stream_ACTION.nextNode());
21.2335 - dbg.location(185,23);
21.2336 if ( !(stream_id.hasNext()) ) {
21.2337 throw new RewriteEarlyExitException();
21.2338 }
21.2339 while ( stream_id.hasNext() ) {
21.2340 - dbg.location(185,23);
21.2341 adaptor.addChild(root_1, stream_id.nextTree());
21.2342
21.2343 }
21.2344 @@ -3419,15 +2686,6 @@
21.2345 }
21.2346 finally {
21.2347 }
21.2348 - dbg.location(186, 2);
21.2349 -
21.2350 - }
21.2351 - finally {
21.2352 - dbg.exitRule(getGrammarFileName(), "ruleScopeSpec");
21.2353 - decRuleLevel();
21.2354 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.2355 - }
21.2356 -
21.2357 return retval;
21.2358 }
21.2359 // $ANTLR end "ruleScopeSpec"
21.2360 @@ -3471,60 +2729,35 @@
21.2361 RewriteRuleSubtreeStream stream_rewrite=new RewriteRuleSubtreeStream(adaptor,"rule rewrite");
21.2362 RewriteRuleSubtreeStream stream_alternative=new RewriteRuleSubtreeStream(adaptor,"rule alternative");
21.2363 RewriteRuleSubtreeStream stream_optionsSpec=new RewriteRuleSubtreeStream(adaptor,"rule optionsSpec");
21.2364 - try { dbg.enterRule(getGrammarFileName(), "block");
21.2365 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.2366 - incRuleLevel();
21.2367 - dbg.location(188, 1);
21.2368 -
21.2369 try {
21.2370 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:189:5: (lp= '(' ( (opts= optionsSpec )? ':' )? a1= alternative rewrite ( '|' a2= alternative rewrite )* rp= ')' -> ^( BLOCK[$lp,\"BLOCK\"] ( optionsSpec )? ( alternative ( rewrite )? )+ EOB[$rp,\"EOB\"] ) )
21.2371 - dbg.enterAlt(1);
21.2372 -
21.2373 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:189:9: lp= '(' ( (opts= optionsSpec )? ':' )? a1= alternative rewrite ( '|' a2= alternative rewrite )* rp= ')'
21.2374 {
21.2375 - dbg.location(189,11);
21.2376 lp=(Token)match(input,82,FOLLOW_82_in_block1175); if (state.failed) return retval;
21.2377 if ( state.backtracking==0 ) stream_82.add(lp);
21.2378
21.2379 - dbg.location(190,3);
21.2380 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:190:3: ( (opts= optionsSpec )? ':' )?
21.2381 int alt31=2;
21.2382 - try { dbg.enterSubRule(31);
21.2383 - try { dbg.enterDecision(31, decisionCanBacktrack[31]);
21.2384 -
21.2385 int LA31_0 = input.LA(1);
21.2386
21.2387 if ( (LA31_0==OPTIONS||LA31_0==79) ) {
21.2388 alt31=1;
21.2389 }
21.2390 - } finally {dbg.exitDecision(31);}
21.2391 -
21.2392 switch (alt31) {
21.2393 case 1 :
21.2394 - dbg.enterAlt(1);
21.2395 -
21.2396 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:190:5: (opts= optionsSpec )? ':'
21.2397 {
21.2398 - dbg.location(190,5);
21.2399 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:190:5: (opts= optionsSpec )?
21.2400 int alt30=2;
21.2401 - try { dbg.enterSubRule(30);
21.2402 - try { dbg.enterDecision(30, decisionCanBacktrack[30]);
21.2403 -
21.2404 int LA30_0 = input.LA(1);
21.2405
21.2406 if ( (LA30_0==OPTIONS) ) {
21.2407 alt30=1;
21.2408 }
21.2409 - } finally {dbg.exitDecision(30);}
21.2410 -
21.2411 switch (alt30) {
21.2412 case 1 :
21.2413 - dbg.enterAlt(1);
21.2414 -
21.2415 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:190:6: opts= optionsSpec
21.2416 {
21.2417 - dbg.location(190,10);
21.2418 pushFollow(FOLLOW_optionsSpec_in_block1184);
21.2419 opts=optionsSpec();
21.2420
21.2421 @@ -3536,9 +2769,7 @@
21.2422 break;
21.2423
21.2424 }
21.2425 - } finally {dbg.exitSubRule(30);}
21.2426 -
21.2427 - dbg.location(190,25);
21.2428 +
21.2429 char_literal76=(Token)match(input,79,FOLLOW_79_in_block1188); if (state.failed) return retval;
21.2430 if ( state.backtracking==0 ) stream_79.add(char_literal76);
21.2431
21.2432 @@ -3547,31 +2778,23 @@
21.2433 break;
21.2434
21.2435 }
21.2436 - } finally {dbg.exitSubRule(31);}
21.2437 -
21.2438 - dbg.location(191,5);
21.2439 +
21.2440 pushFollow(FOLLOW_alternative_in_block1197);
21.2441 a1=alternative();
21.2442
21.2443 state._fsp--;
21.2444 if (state.failed) return retval;
21.2445 if ( state.backtracking==0 ) stream_alternative.add(a1.getTree());
21.2446 - dbg.location(191,18);
21.2447 pushFollow(FOLLOW_rewrite_in_block1199);
21.2448 rewrite77=rewrite();
21.2449
21.2450 state._fsp--;
21.2451 if (state.failed) return retval;
21.2452 if ( state.backtracking==0 ) stream_rewrite.add(rewrite77.getTree());
21.2453 - dbg.location(191,26);
21.2454 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:191:26: ( '|' a2= alternative rewrite )*
21.2455 - try { dbg.enterSubRule(32);
21.2456 -
21.2457 loop32:
21.2458 do {
21.2459 int alt32=2;
21.2460 - try { dbg.enterDecision(32, decisionCanBacktrack[32]);
21.2461 -
21.2462 int LA32_0 = input.LA(1);
21.2463
21.2464 if ( (LA32_0==83) ) {
21.2465 @@ -3579,26 +2802,19 @@
21.2466 }
21.2467
21.2468
21.2469 - } finally {dbg.exitDecision(32);}
21.2470 -
21.2471 switch (alt32) {
21.2472 case 1 :
21.2473 - dbg.enterAlt(1);
21.2474 -
21.2475 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:191:28: '|' a2= alternative rewrite
21.2476 {
21.2477 - dbg.location(191,28);
21.2478 char_literal78=(Token)match(input,83,FOLLOW_83_in_block1203); if (state.failed) return retval;
21.2479 if ( state.backtracking==0 ) stream_83.add(char_literal78);
21.2480
21.2481 - dbg.location(191,34);
21.2482 pushFollow(FOLLOW_alternative_in_block1207);
21.2483 a2=alternative();
21.2484
21.2485 state._fsp--;
21.2486 if (state.failed) return retval;
21.2487 if ( state.backtracking==0 ) stream_alternative.add(a2.getTree());
21.2488 - dbg.location(191,47);
21.2489 pushFollow(FOLLOW_rewrite_in_block1209);
21.2490 rewrite79=rewrite();
21.2491
21.2492 @@ -3613,16 +2829,14 @@
21.2493 break loop32;
21.2494 }
21.2495 } while (true);
21.2496 - } finally {dbg.exitSubRule(32);}
21.2497 -
21.2498 - dbg.location(192,11);
21.2499 +
21.2500 rp=(Token)match(input,84,FOLLOW_84_in_block1224); if (state.failed) return retval;
21.2501 if ( state.backtracking==0 ) stream_84.add(rp);
21.2502
21.2503
21.2504
21.2505 // AST REWRITE
21.2506 - // elements: optionsSpec, alternative, rewrite
21.2507 + // elements: rewrite, alternative, optionsSpec
21.2508 // token labels:
21.2509 // rule labels: retval
21.2510 // token list labels:
21.2511 @@ -3635,32 +2849,24 @@
21.2512 root_0 = (CommonTree)adaptor.nil();
21.2513 // 193:9: -> ^( BLOCK[$lp,\"BLOCK\"] ( optionsSpec )? ( alternative ( rewrite )? )+ EOB[$rp,\"EOB\"] )
21.2514 {
21.2515 - dbg.location(193,12);
21.2516 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:193:12: ^( BLOCK[$lp,\"BLOCK\"] ( optionsSpec )? ( alternative ( rewrite )? )+ EOB[$rp,\"EOB\"] )
21.2517 {
21.2518 CommonTree root_1 = (CommonTree)adaptor.nil();
21.2519 - dbg.location(193,15);
21.2520 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(BLOCK, lp, "BLOCK"), root_1);
21.2521
21.2522 - dbg.location(193,34);
21.2523 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:193:34: ( optionsSpec )?
21.2524 if ( stream_optionsSpec.hasNext() ) {
21.2525 - dbg.location(193,34);
21.2526 adaptor.addChild(root_1, stream_optionsSpec.nextTree());
21.2527
21.2528 }
21.2529 stream_optionsSpec.reset();
21.2530 - dbg.location(193,47);
21.2531 if ( !(stream_alternative.hasNext()) ) {
21.2532 throw new RewriteEarlyExitException();
21.2533 }
21.2534 while ( stream_alternative.hasNext() ) {
21.2535 - dbg.location(193,48);
21.2536 adaptor.addChild(root_1, stream_alternative.nextTree());
21.2537 - dbg.location(193,60);
21.2538 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:193:60: ( rewrite )?
21.2539 if ( stream_rewrite.hasNext() ) {
21.2540 - dbg.location(193,60);
21.2541 adaptor.addChild(root_1, stream_rewrite.nextTree());
21.2542
21.2543 }
21.2544 @@ -3668,7 +2874,6 @@
21.2545
21.2546 }
21.2547 stream_alternative.reset();
21.2548 - dbg.location(193,71);
21.2549 adaptor.addChild(root_1, (CommonTree)adaptor.create(EOB, rp, "EOB"));
21.2550
21.2551 adaptor.addChild(root_0, root_1);
21.2552 @@ -3695,15 +2900,6 @@
21.2553 }
21.2554 finally {
21.2555 }
21.2556 - dbg.location(194, 5);
21.2557 -
21.2558 - }
21.2559 - finally {
21.2560 - dbg.exitRule(getGrammarFileName(), "block");
21.2561 - decRuleLevel();
21.2562 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.2563 - }
21.2564 -
21.2565 return retval;
21.2566 }
21.2567 // $ANTLR end "block"
21.2568 @@ -3741,40 +2937,26 @@
21.2569 // it's really BLOCK[firstToken,"BLOCK"]; set line/col to previous ( or : token.
21.2570 CommonTree blkRoot = (CommonTree)adaptor.create(BLOCK,input.LT(-1),"BLOCK");
21.2571
21.2572 - try { dbg.enterRule(getGrammarFileName(), "altList");
21.2573 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.2574 - incRuleLevel();
21.2575 - dbg.location(196, 1);
21.2576 -
21.2577 try {
21.2578 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:203:5: (a1= alternative rewrite ( '|' a2= alternative rewrite )* -> ^( ( alternative ( rewrite )? )+ EOB[\"EOB\"] ) )
21.2579 - dbg.enterAlt(1);
21.2580 -
21.2581 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:203:9: a1= alternative rewrite ( '|' a2= alternative rewrite )*
21.2582 {
21.2583 - dbg.location(203,11);
21.2584 pushFollow(FOLLOW_alternative_in_altList1281);
21.2585 a1=alternative();
21.2586
21.2587 state._fsp--;
21.2588 if (state.failed) return retval;
21.2589 if ( state.backtracking==0 ) stream_alternative.add(a1.getTree());
21.2590 - dbg.location(203,24);
21.2591 pushFollow(FOLLOW_rewrite_in_altList1283);
21.2592 rewrite80=rewrite();
21.2593
21.2594 state._fsp--;
21.2595 if (state.failed) return retval;
21.2596 if ( state.backtracking==0 ) stream_rewrite.add(rewrite80.getTree());
21.2597 - dbg.location(203,32);
21.2598 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:203:32: ( '|' a2= alternative rewrite )*
21.2599 - try { dbg.enterSubRule(33);
21.2600 -
21.2601 loop33:
21.2602 do {
21.2603 int alt33=2;
21.2604 - try { dbg.enterDecision(33, decisionCanBacktrack[33]);
21.2605 -
21.2606 int LA33_0 = input.LA(1);
21.2607
21.2608 if ( (LA33_0==83) ) {
21.2609 @@ -3782,26 +2964,19 @@
21.2610 }
21.2611
21.2612
21.2613 - } finally {dbg.exitDecision(33);}
21.2614 -
21.2615 switch (alt33) {
21.2616 case 1 :
21.2617 - dbg.enterAlt(1);
21.2618 -
21.2619 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:203:34: '|' a2= alternative rewrite
21.2620 {
21.2621 - dbg.location(203,34);
21.2622 char_literal81=(Token)match(input,83,FOLLOW_83_in_altList1287); if (state.failed) return retval;
21.2623 if ( state.backtracking==0 ) stream_83.add(char_literal81);
21.2624
21.2625 - dbg.location(203,40);
21.2626 pushFollow(FOLLOW_alternative_in_altList1291);
21.2627 a2=alternative();
21.2628
21.2629 state._fsp--;
21.2630 if (state.failed) return retval;
21.2631 if ( state.backtracking==0 ) stream_alternative.add(a2.getTree());
21.2632 - dbg.location(203,53);
21.2633 pushFollow(FOLLOW_rewrite_in_altList1293);
21.2634 rewrite82=rewrite();
21.2635
21.2636 @@ -3816,12 +2991,11 @@
21.2637 break loop33;
21.2638 }
21.2639 } while (true);
21.2640 - } finally {dbg.exitSubRule(33);}
21.2641
21.2642
21.2643
21.2644 // AST REWRITE
21.2645 - // elements: alternative, rewrite
21.2646 + // elements: rewrite, alternative
21.2647 // token labels:
21.2648 // rule labels: retval
21.2649 // token list labels:
21.2650 @@ -3834,24 +3008,18 @@
21.2651 root_0 = (CommonTree)adaptor.nil();
21.2652 // 204:3: -> ^( ( alternative ( rewrite )? )+ EOB[\"EOB\"] )
21.2653 {
21.2654 - dbg.location(204,6);
21.2655 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:204:6: ^( ( alternative ( rewrite )? )+ EOB[\"EOB\"] )
21.2656 {
21.2657 CommonTree root_1 = (CommonTree)adaptor.nil();
21.2658 - dbg.location(204,9);
21.2659 root_1 = (CommonTree)adaptor.becomeRoot(blkRoot, root_1);
21.2660
21.2661 - dbg.location(204,19);
21.2662 if ( !(stream_alternative.hasNext()) ) {
21.2663 throw new RewriteEarlyExitException();
21.2664 }
21.2665 while ( stream_alternative.hasNext() ) {
21.2666 - dbg.location(204,20);
21.2667 adaptor.addChild(root_1, stream_alternative.nextTree());
21.2668 - dbg.location(204,32);
21.2669 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:204:32: ( rewrite )?
21.2670 if ( stream_rewrite.hasNext() ) {
21.2671 - dbg.location(204,32);
21.2672 adaptor.addChild(root_1, stream_rewrite.nextTree());
21.2673
21.2674 }
21.2675 @@ -3859,7 +3027,6 @@
21.2676
21.2677 }
21.2678 stream_alternative.reset();
21.2679 - dbg.location(204,43);
21.2680 adaptor.addChild(root_1, (CommonTree)adaptor.create(EOB, "EOB"));
21.2681
21.2682 adaptor.addChild(root_0, root_1);
21.2683 @@ -3886,15 +3053,6 @@
21.2684 }
21.2685 finally {
21.2686 }
21.2687 - dbg.location(205, 5);
21.2688 -
21.2689 - }
21.2690 - finally {
21.2691 - dbg.exitRule(getGrammarFileName(), "altList");
21.2692 - decRuleLevel();
21.2693 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.2694 - }
21.2695 -
21.2696 return retval;
21.2697 }
21.2698 // $ANTLR end "altList"
21.2699 @@ -3920,16 +3078,9 @@
21.2700 Token firstToken = input.LT(1);
21.2701 Token prevToken = input.LT(-1); // either : or | I think
21.2702
21.2703 - try { dbg.enterRule(getGrammarFileName(), "alternative");
21.2704 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.2705 - incRuleLevel();
21.2706 - dbg.location(207, 1);
21.2707 -
21.2708 try {
21.2709 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:212:5: ( ( element )+ -> ^( ALT[firstToken,\"ALT\"] ( element )+ EOA[\"EOA\"] ) | -> ^( ALT[prevToken,\"ALT\"] EPSILON[prevToken,\"EPSILON\"] EOA[\"EOA\"] ) )
21.2710 int alt35=2;
21.2711 - try { dbg.enterDecision(35, decisionCanBacktrack[35]);
21.2712 -
21.2713 int LA35_0 = input.LA(1);
21.2714
21.2715 if ( (LA35_0==SEMPRED||LA35_0==TREE_BEGIN||(LA35_0>=TOKEN_REF && LA35_0<=ACTION)||LA35_0==RULE_REF||LA35_0==82||LA35_0==89||LA35_0==92) ) {
21.2716 @@ -3943,27 +3094,17 @@
21.2717 NoViableAltException nvae =
21.2718 new NoViableAltException("", 35, 0, input);
21.2719
21.2720 - dbg.recognitionException(nvae);
21.2721 throw nvae;
21.2722 }
21.2723 - } finally {dbg.exitDecision(35);}
21.2724 -
21.2725 switch (alt35) {
21.2726 case 1 :
21.2727 - dbg.enterAlt(1);
21.2728 -
21.2729 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:212:9: ( element )+
21.2730 {
21.2731 - dbg.location(212,9);
21.2732 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:212:9: ( element )+
21.2733 int cnt34=0;
21.2734 - try { dbg.enterSubRule(34);
21.2735 -
21.2736 loop34:
21.2737 do {
21.2738 int alt34=2;
21.2739 - try { dbg.enterDecision(34, decisionCanBacktrack[34]);
21.2740 -
21.2741 int LA34_0 = input.LA(1);
21.2742
21.2743 if ( (LA34_0==SEMPRED||LA34_0==TREE_BEGIN||(LA34_0>=TOKEN_REF && LA34_0<=ACTION)||LA34_0==RULE_REF||LA34_0==82||LA34_0==89||LA34_0==92) ) {
21.2744 @@ -3971,15 +3112,10 @@
21.2745 }
21.2746
21.2747
21.2748 - } finally {dbg.exitDecision(34);}
21.2749 -
21.2750 switch (alt34) {
21.2751 case 1 :
21.2752 - dbg.enterAlt(1);
21.2753 -
21.2754 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:212:9: element
21.2755 {
21.2756 - dbg.location(212,9);
21.2757 pushFollow(FOLLOW_element_in_alternative1341);
21.2758 element83=element();
21.2759
21.2760 @@ -3995,13 +3131,10 @@
21.2761 if (state.backtracking>0) {state.failed=true; return retval;}
21.2762 EarlyExitException eee =
21.2763 new EarlyExitException(34, input);
21.2764 - dbg.recognitionException(eee);
21.2765 -
21.2766 throw eee;
21.2767 }
21.2768 cnt34++;
21.2769 } while (true);
21.2770 - } finally {dbg.exitSubRule(34);}
21.2771
21.2772
21.2773
21.2774 @@ -4019,24 +3152,19 @@
21.2775 root_0 = (CommonTree)adaptor.nil();
21.2776 // 212:18: -> ^( ALT[firstToken,\"ALT\"] ( element )+ EOA[\"EOA\"] )
21.2777 {
21.2778 - dbg.location(212,21);
21.2779 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:212:21: ^( ALT[firstToken,\"ALT\"] ( element )+ EOA[\"EOA\"] )
21.2780 {
21.2781 CommonTree root_1 = (CommonTree)adaptor.nil();
21.2782 - dbg.location(212,23);
21.2783 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ALT, firstToken, "ALT"), root_1);
21.2784
21.2785 - dbg.location(212,45);
21.2786 if ( !(stream_element.hasNext()) ) {
21.2787 throw new RewriteEarlyExitException();
21.2788 }
21.2789 while ( stream_element.hasNext() ) {
21.2790 - dbg.location(212,45);
21.2791 adaptor.addChild(root_1, stream_element.nextTree());
21.2792
21.2793 }
21.2794 stream_element.reset();
21.2795 - dbg.location(212,54);
21.2796 adaptor.addChild(root_1, (CommonTree)adaptor.create(EOA, "EOA"));
21.2797
21.2798 adaptor.addChild(root_0, root_1);
21.2799 @@ -4048,8 +3176,6 @@
21.2800 }
21.2801 break;
21.2802 case 2 :
21.2803 - dbg.enterAlt(2);
21.2804 -
21.2805 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:213:9:
21.2806 {
21.2807
21.2808 @@ -4067,16 +3193,12 @@
21.2809 root_0 = (CommonTree)adaptor.nil();
21.2810 // 213:9: -> ^( ALT[prevToken,\"ALT\"] EPSILON[prevToken,\"EPSILON\"] EOA[\"EOA\"] )
21.2811 {
21.2812 - dbg.location(213,12);
21.2813 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:213:12: ^( ALT[prevToken,\"ALT\"] EPSILON[prevToken,\"EPSILON\"] EOA[\"EOA\"] )
21.2814 {
21.2815 CommonTree root_1 = (CommonTree)adaptor.nil();
21.2816 - dbg.location(213,14);
21.2817 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ALT, prevToken, "ALT"), root_1);
21.2818
21.2819 - dbg.location(213,35);
21.2820 adaptor.addChild(root_1, (CommonTree)adaptor.create(EPSILON, prevToken, "EPSILON"));
21.2821 - dbg.location(213,64);
21.2822 adaptor.addChild(root_1, (CommonTree)adaptor.create(EOA, "EOA"));
21.2823
21.2824 adaptor.addChild(root_0, root_1);
21.2825 @@ -4105,15 +3227,6 @@
21.2826 }
21.2827 finally {
21.2828 }
21.2829 - dbg.location(214, 5);
21.2830 -
21.2831 - }
21.2832 - finally {
21.2833 - dbg.exitRule(getGrammarFileName(), "alternative");
21.2834 - decRuleLevel();
21.2835 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.2836 - }
21.2837 -
21.2838 return retval;
21.2839 }
21.2840 // $ANTLR end "alternative"
21.2841 @@ -4139,16 +3252,9 @@
21.2842
21.2843
21.2844
21.2845 - try { dbg.enterRule(getGrammarFileName(), "exceptionGroup");
21.2846 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.2847 - incRuleLevel();
21.2848 - dbg.location(216, 1);
21.2849 -
21.2850 try {
21.2851 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:217:2: ( ( exceptionHandler )+ ( finallyClause )? | finallyClause )
21.2852 int alt38=2;
21.2853 - try { dbg.enterDecision(38, decisionCanBacktrack[38]);
21.2854 -
21.2855 int LA38_0 = input.LA(1);
21.2856
21.2857 if ( (LA38_0==85) ) {
21.2858 @@ -4162,29 +3268,19 @@
21.2859 NoViableAltException nvae =
21.2860 new NoViableAltException("", 38, 0, input);
21.2861
21.2862 - dbg.recognitionException(nvae);
21.2863 throw nvae;
21.2864 }
21.2865 - } finally {dbg.exitDecision(38);}
21.2866 -
21.2867 switch (alt38) {
21.2868 case 1 :
21.2869 - dbg.enterAlt(1);
21.2870 -
21.2871 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:217:4: ( exceptionHandler )+ ( finallyClause )?
21.2872 {
21.2873 root_0 = (CommonTree)adaptor.nil();
21.2874
21.2875 - dbg.location(217,4);
21.2876 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:217:4: ( exceptionHandler )+
21.2877 int cnt36=0;
21.2878 - try { dbg.enterSubRule(36);
21.2879 -
21.2880 loop36:
21.2881 do {
21.2882 int alt36=2;
21.2883 - try { dbg.enterDecision(36, decisionCanBacktrack[36]);
21.2884 -
21.2885 int LA36_0 = input.LA(1);
21.2886
21.2887 if ( (LA36_0==85) ) {
21.2888 @@ -4192,15 +3288,10 @@
21.2889 }
21.2890
21.2891
21.2892 - } finally {dbg.exitDecision(36);}
21.2893 -
21.2894 switch (alt36) {
21.2895 case 1 :
21.2896 - dbg.enterAlt(1);
21.2897 -
21.2898 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:217:6: exceptionHandler
21.2899 {
21.2900 - dbg.location(217,6);
21.2901 pushFollow(FOLLOW_exceptionHandler_in_exceptionGroup1392);
21.2902 exceptionHandler84=exceptionHandler();
21.2903
21.2904 @@ -4216,34 +3307,22 @@
21.2905 if (state.backtracking>0) {state.failed=true; return retval;}
21.2906 EarlyExitException eee =
21.2907 new EarlyExitException(36, input);
21.2908 - dbg.recognitionException(eee);
21.2909 -
21.2910 throw eee;
21.2911 }
21.2912 cnt36++;
21.2913 } while (true);
21.2914 - } finally {dbg.exitSubRule(36);}
21.2915 -
21.2916 - dbg.location(217,26);
21.2917 +
21.2918 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:217:26: ( finallyClause )?
21.2919 int alt37=2;
21.2920 - try { dbg.enterSubRule(37);
21.2921 - try { dbg.enterDecision(37, decisionCanBacktrack[37]);
21.2922 -
21.2923 int LA37_0 = input.LA(1);
21.2924
21.2925 if ( (LA37_0==86) ) {
21.2926 alt37=1;
21.2927 }
21.2928 - } finally {dbg.exitDecision(37);}
21.2929 -
21.2930 switch (alt37) {
21.2931 case 1 :
21.2932 - dbg.enterAlt(1);
21.2933 -
21.2934 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:217:28: finallyClause
21.2935 {
21.2936 - dbg.location(217,28);
21.2937 pushFollow(FOLLOW_finallyClause_in_exceptionGroup1399);
21.2938 finallyClause85=finallyClause();
21.2939
21.2940 @@ -4255,19 +3334,15 @@
21.2941 break;
21.2942
21.2943 }
21.2944 - } finally {dbg.exitSubRule(37);}
21.2945
21.2946
21.2947 }
21.2948 break;
21.2949 case 2 :
21.2950 - dbg.enterAlt(2);
21.2951 -
21.2952 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:218:4: finallyClause
21.2953 {
21.2954 root_0 = (CommonTree)adaptor.nil();
21.2955
21.2956 - dbg.location(218,4);
21.2957 pushFollow(FOLLOW_finallyClause_in_exceptionGroup1407);
21.2958 finallyClause86=finallyClause();
21.2959
21.2960 @@ -4295,15 +3370,6 @@
21.2961 }
21.2962 finally {
21.2963 }
21.2964 - dbg.location(219, 5);
21.2965 -
21.2966 - }
21.2967 - finally {
21.2968 - dbg.exitRule(getGrammarFileName(), "exceptionGroup");
21.2969 - decRuleLevel();
21.2970 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.2971 - }
21.2972 -
21.2973 return retval;
21.2974 }
21.2975 // $ANTLR end "exceptionGroup"
21.2976 @@ -4332,33 +3398,23 @@
21.2977 RewriteRuleTokenStream stream_ARG_ACTION=new RewriteRuleTokenStream(adaptor,"token ARG_ACTION");
21.2978 RewriteRuleTokenStream stream_85=new RewriteRuleTokenStream(adaptor,"token 85");
21.2979
21.2980 - try { dbg.enterRule(getGrammarFileName(), "exceptionHandler");
21.2981 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.2982 - incRuleLevel();
21.2983 - dbg.location(221, 1);
21.2984 -
21.2985 try {
21.2986 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:222:5: ( 'catch' ARG_ACTION ACTION -> ^( 'catch' ARG_ACTION ACTION ) )
21.2987 - dbg.enterAlt(1);
21.2988 -
21.2989 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:222:10: 'catch' ARG_ACTION ACTION
21.2990 {
21.2991 - dbg.location(222,10);
21.2992 string_literal87=(Token)match(input,85,FOLLOW_85_in_exceptionHandler1427); if (state.failed) return retval;
21.2993 if ( state.backtracking==0 ) stream_85.add(string_literal87);
21.2994
21.2995 - dbg.location(222,18);
21.2996 ARG_ACTION88=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_exceptionHandler1429); if (state.failed) return retval;
21.2997 if ( state.backtracking==0 ) stream_ARG_ACTION.add(ARG_ACTION88);
21.2998
21.2999 - dbg.location(222,29);
21.3000 ACTION89=(Token)match(input,ACTION,FOLLOW_ACTION_in_exceptionHandler1431); if (state.failed) return retval;
21.3001 if ( state.backtracking==0 ) stream_ACTION.add(ACTION89);
21.3002
21.3003
21.3004
21.3005 // AST REWRITE
21.3006 - // elements: ARG_ACTION, 85, ACTION
21.3007 + // elements: ACTION, ARG_ACTION, 85
21.3008 // token labels:
21.3009 // rule labels: retval
21.3010 // token list labels:
21.3011 @@ -4371,16 +3427,12 @@
21.3012 root_0 = (CommonTree)adaptor.nil();
21.3013 // 222:36: -> ^( 'catch' ARG_ACTION ACTION )
21.3014 {
21.3015 - dbg.location(222,39);
21.3016 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:222:39: ^( 'catch' ARG_ACTION ACTION )
21.3017 {
21.3018 CommonTree root_1 = (CommonTree)adaptor.nil();
21.3019 - dbg.location(222,41);
21.3020 root_1 = (CommonTree)adaptor.becomeRoot(stream_85.nextNode(), root_1);
21.3021
21.3022 - dbg.location(222,49);
21.3023 adaptor.addChild(root_1, stream_ARG_ACTION.nextNode());
21.3024 - dbg.location(222,60);
21.3025 adaptor.addChild(root_1, stream_ACTION.nextNode());
21.3026
21.3027 adaptor.addChild(root_0, root_1);
21.3028 @@ -4407,15 +3459,6 @@
21.3029 }
21.3030 finally {
21.3031 }
21.3032 - dbg.location(223, 5);
21.3033 -
21.3034 - }
21.3035 - finally {
21.3036 - dbg.exitRule(getGrammarFileName(), "exceptionHandler");
21.3037 - decRuleLevel();
21.3038 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.3039 - }
21.3040 -
21.3041 return retval;
21.3042 }
21.3043 // $ANTLR end "exceptionHandler"
21.3044 @@ -4441,22 +3484,13 @@
21.3045 RewriteRuleTokenStream stream_ACTION=new RewriteRuleTokenStream(adaptor,"token ACTION");
21.3046 RewriteRuleTokenStream stream_86=new RewriteRuleTokenStream(adaptor,"token 86");
21.3047
21.3048 - try { dbg.enterRule(getGrammarFileName(), "finallyClause");
21.3049 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.3050 - incRuleLevel();
21.3051 - dbg.location(225, 1);
21.3052 -
21.3053 try {
21.3054 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:226:5: ( 'finally' ACTION -> ^( 'finally' ACTION ) )
21.3055 - dbg.enterAlt(1);
21.3056 -
21.3057 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:226:10: 'finally' ACTION
21.3058 {
21.3059 - dbg.location(226,10);
21.3060 string_literal90=(Token)match(input,86,FOLLOW_86_in_finallyClause1461); if (state.failed) return retval;
21.3061 if ( state.backtracking==0 ) stream_86.add(string_literal90);
21.3062
21.3063 - dbg.location(226,20);
21.3064 ACTION91=(Token)match(input,ACTION,FOLLOW_ACTION_in_finallyClause1463); if (state.failed) return retval;
21.3065 if ( state.backtracking==0 ) stream_ACTION.add(ACTION91);
21.3066
21.3067 @@ -4476,14 +3510,11 @@
21.3068 root_0 = (CommonTree)adaptor.nil();
21.3069 // 226:27: -> ^( 'finally' ACTION )
21.3070 {
21.3071 - dbg.location(226,30);
21.3072 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:226:30: ^( 'finally' ACTION )
21.3073 {
21.3074 CommonTree root_1 = (CommonTree)adaptor.nil();
21.3075 - dbg.location(226,32);
21.3076 root_1 = (CommonTree)adaptor.becomeRoot(stream_86.nextNode(), root_1);
21.3077
21.3078 - dbg.location(226,42);
21.3079 adaptor.addChild(root_1, stream_ACTION.nextNode());
21.3080
21.3081 adaptor.addChild(root_0, root_1);
21.3082 @@ -4510,15 +3541,6 @@
21.3083 }
21.3084 finally {
21.3085 }
21.3086 - dbg.location(227, 5);
21.3087 -
21.3088 - }
21.3089 - finally {
21.3090 - dbg.exitRule(getGrammarFileName(), "finallyClause");
21.3091 - decRuleLevel();
21.3092 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.3093 - }
21.3094 -
21.3095 return retval;
21.3096 }
21.3097 // $ANTLR end "finallyClause"
21.3098 @@ -4540,20 +3562,12 @@
21.3099
21.3100
21.3101
21.3102 - try { dbg.enterRule(getGrammarFileName(), "element");
21.3103 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.3104 - incRuleLevel();
21.3105 - dbg.location(229, 1);
21.3106 -
21.3107 try {
21.3108 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:230:2: ( elementNoOptionSpec )
21.3109 - dbg.enterAlt(1);
21.3110 -
21.3111 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:230:4: elementNoOptionSpec
21.3112 {
21.3113 root_0 = (CommonTree)adaptor.nil();
21.3114
21.3115 - dbg.location(230,4);
21.3116 pushFollow(FOLLOW_elementNoOptionSpec_in_element1485);
21.3117 elementNoOptionSpec92=elementNoOptionSpec();
21.3118
21.3119 @@ -4579,15 +3593,6 @@
21.3120 }
21.3121 finally {
21.3122 }
21.3123 - dbg.location(231, 2);
21.3124 -
21.3125 - }
21.3126 - finally {
21.3127 - dbg.exitRule(getGrammarFileName(), "element");
21.3128 - decRuleLevel();
21.3129 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.3130 - }
21.3131 -
21.3132 return retval;
21.3133 }
21.3134 // $ANTLR end "element"
21.3135 @@ -4645,45 +3650,22 @@
21.3136 RewriteRuleSubtreeStream stream_ebnfSuffix=new RewriteRuleSubtreeStream(adaptor,"rule ebnfSuffix");
21.3137 RewriteRuleSubtreeStream stream_block=new RewriteRuleSubtreeStream(adaptor,"rule block");
21.3138 RewriteRuleSubtreeStream stream_treeSpec=new RewriteRuleSubtreeStream(adaptor,"rule treeSpec");
21.3139 - try { dbg.enterRule(getGrammarFileName(), "elementNoOptionSpec");
21.3140 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.3141 - incRuleLevel();
21.3142 - dbg.location(233, 1);
21.3143 -
21.3144 try {
21.3145 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:234:2: ( id (labelOp= '=' | labelOp= '+=' ) atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] ^( $labelOp id atom ) EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> ^( $labelOp id atom ) ) | id (labelOp= '=' | labelOp= '+=' ) block ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] ^( $labelOp id block ) EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> ^( $labelOp id block ) ) | atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] atom EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> atom ) | ebnf | ACTION | SEMPRED ( '=>' -> GATED_SEMPRED | -> SEMPRED ) | treeSpec ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] treeSpec EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> treeSpec ) )
21.3146 int alt46=7;
21.3147 - try { dbg.enterDecision(46, decisionCanBacktrack[46]);
21.3148 -
21.3149 - try {
21.3150 - isCyclicDecision = true;
21.3151 - alt46 = dfa46.predict(input);
21.3152 - }
21.3153 - catch (NoViableAltException nvae) {
21.3154 - dbg.recognitionException(nvae);
21.3155 - throw nvae;
21.3156 - }
21.3157 - } finally {dbg.exitDecision(46);}
21.3158 -
21.3159 + alt46 = dfa46.predict(input);
21.3160 switch (alt46) {
21.3161 case 1 :
21.3162 - dbg.enterAlt(1);
21.3163 -
21.3164 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:234:4: id (labelOp= '=' | labelOp= '+=' ) atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] ^( $labelOp id atom ) EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> ^( $labelOp id atom ) )
21.3165 {
21.3166 - dbg.location(234,4);
21.3167 pushFollow(FOLLOW_id_in_elementNoOptionSpec1496);
21.3168 id93=id();
21.3169
21.3170 state._fsp--;
21.3171 if (state.failed) return retval;
21.3172 if ( state.backtracking==0 ) stream_id.add(id93.getTree());
21.3173 - dbg.location(234,7);
21.3174 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:234:7: (labelOp= '=' | labelOp= '+=' )
21.3175 int alt39=2;
21.3176 - try { dbg.enterSubRule(39);
21.3177 - try { dbg.enterDecision(39, decisionCanBacktrack[39]);
21.3178 -
21.3179 int LA39_0 = input.LA(1);
21.3180
21.3181 if ( (LA39_0==71) ) {
21.3182 @@ -4697,18 +3679,12 @@
21.3183 NoViableAltException nvae =
21.3184 new NoViableAltException("", 39, 0, input);
21.3185
21.3186 - dbg.recognitionException(nvae);
21.3187 throw nvae;
21.3188 }
21.3189 - } finally {dbg.exitDecision(39);}
21.3190 -
21.3191 switch (alt39) {
21.3192 case 1 :
21.3193 - dbg.enterAlt(1);
21.3194 -
21.3195 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:234:8: labelOp= '='
21.3196 {
21.3197 - dbg.location(234,15);
21.3198 labelOp=(Token)match(input,71,FOLLOW_71_in_elementNoOptionSpec1501); if (state.failed) return retval;
21.3199 if ( state.backtracking==0 ) stream_71.add(labelOp);
21.3200
21.3201 @@ -4716,11 +3692,8 @@
21.3202 }
21.3203 break;
21.3204 case 2 :
21.3205 - dbg.enterAlt(2);
21.3206 -
21.3207 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:234:20: labelOp= '+='
21.3208 {
21.3209 - dbg.location(234,27);
21.3210 labelOp=(Token)match(input,87,FOLLOW_87_in_elementNoOptionSpec1505); if (state.failed) return retval;
21.3211 if ( state.backtracking==0 ) stream_87.add(labelOp);
21.3212
21.3213 @@ -4729,21 +3702,15 @@
21.3214 break;
21.3215
21.3216 }
21.3217 - } finally {dbg.exitSubRule(39);}
21.3218 -
21.3219 - dbg.location(234,34);
21.3220 +
21.3221 pushFollow(FOLLOW_atom_in_elementNoOptionSpec1508);
21.3222 atom94=atom();
21.3223
21.3224 state._fsp--;
21.3225 if (state.failed) return retval;
21.3226 if ( state.backtracking==0 ) stream_atom.add(atom94.getTree());
21.3227 - dbg.location(235,3);
21.3228 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:235:3: ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] ^( $labelOp id atom ) EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> ^( $labelOp id atom ) )
21.3229 int alt40=2;
21.3230 - try { dbg.enterSubRule(40);
21.3231 - try { dbg.enterDecision(40, decisionCanBacktrack[40]);
21.3232 -
21.3233 int LA40_0 = input.LA(1);
21.3234
21.3235 if ( (LA40_0==74||(LA40_0>=90 && LA40_0<=91)) ) {
21.3236 @@ -4757,18 +3724,12 @@
21.3237 NoViableAltException nvae =
21.3238 new NoViableAltException("", 40, 0, input);
21.3239
21.3240 - dbg.recognitionException(nvae);
21.3241 throw nvae;
21.3242 }
21.3243 - } finally {dbg.exitDecision(40);}
21.3244 -
21.3245 switch (alt40) {
21.3246 case 1 :
21.3247 - dbg.enterAlt(1);
21.3248 -
21.3249 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:235:5: ebnfSuffix
21.3250 {
21.3251 - dbg.location(235,5);
21.3252 pushFollow(FOLLOW_ebnfSuffix_in_elementNoOptionSpec1514);
21.3253 ebnfSuffix95=ebnfSuffix();
21.3254
21.3255 @@ -4778,7 +3739,7 @@
21.3256
21.3257
21.3258 // AST REWRITE
21.3259 - // elements: atom, labelOp, id, ebnfSuffix
21.3260 + // elements: ebnfSuffix, labelOp, atom, id
21.3261 // token labels: labelOp
21.3262 // rule labels: retval
21.3263 // token list labels:
21.3264 @@ -4792,47 +3753,35 @@
21.3265 root_0 = (CommonTree)adaptor.nil();
21.3266 // 235:16: -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] ^( $labelOp id atom ) EOA[\"EOA\"] ) EOB[\"EOB\"] ) )
21.3267 {
21.3268 - dbg.location(235,19);
21.3269 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:235:19: ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] ^( $labelOp id atom ) EOA[\"EOA\"] ) EOB[\"EOB\"] ) )
21.3270 {
21.3271 CommonTree root_1 = (CommonTree)adaptor.nil();
21.3272 - dbg.location(235,22);
21.3273 root_1 = (CommonTree)adaptor.becomeRoot(stream_ebnfSuffix.nextNode(), root_1);
21.3274
21.3275 - dbg.location(235,33);
21.3276 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:235:33: ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] ^( $labelOp id atom ) EOA[\"EOA\"] ) EOB[\"EOB\"] )
21.3277 {
21.3278 CommonTree root_2 = (CommonTree)adaptor.nil();
21.3279 - dbg.location(235,35);
21.3280 root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(BLOCK, "BLOCK"), root_2);
21.3281
21.3282 - dbg.location(235,50);
21.3283 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:235:50: ^( ALT[\"ALT\"] ^( $labelOp id atom ) EOA[\"EOA\"] )
21.3284 {
21.3285 CommonTree root_3 = (CommonTree)adaptor.nil();
21.3286 - dbg.location(235,52);
21.3287 root_3 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ALT, "ALT"), root_3);
21.3288
21.3289 - dbg.location(235,63);
21.3290 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:235:63: ^( $labelOp id atom )
21.3291 {
21.3292 CommonTree root_4 = (CommonTree)adaptor.nil();
21.3293 - dbg.location(235,65);
21.3294 root_4 = (CommonTree)adaptor.becomeRoot(stream_labelOp.nextNode(), root_4);
21.3295
21.3296 - dbg.location(235,74);
21.3297 adaptor.addChild(root_4, stream_id.nextTree());
21.3298 - dbg.location(235,77);
21.3299 adaptor.addChild(root_4, stream_atom.nextTree());
21.3300
21.3301 adaptor.addChild(root_3, root_4);
21.3302 }
21.3303 - dbg.location(235,83);
21.3304 adaptor.addChild(root_3, (CommonTree)adaptor.create(EOA, "EOA"));
21.3305
21.3306 adaptor.addChild(root_2, root_3);
21.3307 }
21.3308 - dbg.location(235,95);
21.3309 adaptor.addChild(root_2, (CommonTree)adaptor.create(EOB, "EOB"));
21.3310
21.3311 adaptor.addChild(root_1, root_2);
21.3312 @@ -4847,13 +3796,11 @@
21.3313 }
21.3314 break;
21.3315 case 2 :
21.3316 - dbg.enterAlt(2);
21.3317 -
21.3318 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:236:8:
21.3319 {
21.3320
21.3321 // AST REWRITE
21.3322 - // elements: id, atom, labelOp
21.3323 + // elements: id, labelOp, atom
21.3324 // token labels: labelOp
21.3325 // rule labels: retval
21.3326 // token list labels:
21.3327 @@ -4867,16 +3814,12 @@
21.3328 root_0 = (CommonTree)adaptor.nil();
21.3329 // 236:8: -> ^( $labelOp id atom )
21.3330 {
21.3331 - dbg.location(236,11);
21.3332 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:236:11: ^( $labelOp id atom )
21.3333 {
21.3334 CommonTree root_1 = (CommonTree)adaptor.nil();
21.3335 - dbg.location(236,13);
21.3336 root_1 = (CommonTree)adaptor.becomeRoot(stream_labelOp.nextNode(), root_1);
21.3337
21.3338 - dbg.location(236,22);
21.3339 adaptor.addChild(root_1, stream_id.nextTree());
21.3340 - dbg.location(236,25);
21.3341 adaptor.addChild(root_1, stream_atom.nextTree());
21.3342
21.3343 adaptor.addChild(root_0, root_1);
21.3344 @@ -4889,29 +3832,21 @@
21.3345 break;
21.3346
21.3347 }
21.3348 - } finally {dbg.exitSubRule(40);}
21.3349
21.3350
21.3351 }
21.3352 break;
21.3353 case 2 :
21.3354 - dbg.enterAlt(2);
21.3355 -
21.3356 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:238:4: id (labelOp= '=' | labelOp= '+=' ) block ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] ^( $labelOp id block ) EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> ^( $labelOp id block ) )
21.3357 {
21.3358 - dbg.location(238,4);
21.3359 pushFollow(FOLLOW_id_in_elementNoOptionSpec1573);
21.3360 id96=id();
21.3361
21.3362 state._fsp--;
21.3363 if (state.failed) return retval;
21.3364 if ( state.backtracking==0 ) stream_id.add(id96.getTree());
21.3365 - dbg.location(238,7);
21.3366 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:238:7: (labelOp= '=' | labelOp= '+=' )
21.3367 int alt41=2;
21.3368 - try { dbg.enterSubRule(41);
21.3369 - try { dbg.enterDecision(41, decisionCanBacktrack[41]);
21.3370 -
21.3371 int LA41_0 = input.LA(1);
21.3372
21.3373 if ( (LA41_0==71) ) {
21.3374 @@ -4925,18 +3860,12 @@
21.3375 NoViableAltException nvae =
21.3376 new NoViableAltException("", 41, 0, input);
21.3377
21.3378 - dbg.recognitionException(nvae);
21.3379 throw nvae;
21.3380 }
21.3381 - } finally {dbg.exitDecision(41);}
21.3382 -
21.3383 switch (alt41) {
21.3384 case 1 :
21.3385 - dbg.enterAlt(1);
21.3386 -
21.3387 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:238:8: labelOp= '='
21.3388 {
21.3389 - dbg.location(238,15);
21.3390 labelOp=(Token)match(input,71,FOLLOW_71_in_elementNoOptionSpec1578); if (state.failed) return retval;
21.3391 if ( state.backtracking==0 ) stream_71.add(labelOp);
21.3392
21.3393 @@ -4944,11 +3873,8 @@
21.3394 }
21.3395 break;
21.3396 case 2 :
21.3397 - dbg.enterAlt(2);
21.3398 -
21.3399 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:238:20: labelOp= '+='
21.3400 {
21.3401 - dbg.location(238,27);
21.3402 labelOp=(Token)match(input,87,FOLLOW_87_in_elementNoOptionSpec1582); if (state.failed) return retval;
21.3403 if ( state.backtracking==0 ) stream_87.add(labelOp);
21.3404
21.3405 @@ -4957,21 +3883,15 @@
21.3406 break;
21.3407
21.3408 }
21.3409 - } finally {dbg.exitSubRule(41);}
21.3410 -
21.3411 - dbg.location(238,34);
21.3412 +
21.3413 pushFollow(FOLLOW_block_in_elementNoOptionSpec1585);
21.3414 block97=block();
21.3415
21.3416 state._fsp--;
21.3417 if (state.failed) return retval;
21.3418 if ( state.backtracking==0 ) stream_block.add(block97.getTree());
21.3419 - dbg.location(239,3);
21.3420 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:239:3: ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] ^( $labelOp id block ) EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> ^( $labelOp id block ) )
21.3421 int alt42=2;
21.3422 - try { dbg.enterSubRule(42);
21.3423 - try { dbg.enterDecision(42, decisionCanBacktrack[42]);
21.3424 -
21.3425 int LA42_0 = input.LA(1);
21.3426
21.3427 if ( (LA42_0==74||(LA42_0>=90 && LA42_0<=91)) ) {
21.3428 @@ -4985,18 +3905,12 @@
21.3429 NoViableAltException nvae =
21.3430 new NoViableAltException("", 42, 0, input);
21.3431
21.3432 - dbg.recognitionException(nvae);
21.3433 throw nvae;
21.3434 }
21.3435 - } finally {dbg.exitDecision(42);}
21.3436 -
21.3437 switch (alt42) {
21.3438 case 1 :
21.3439 - dbg.enterAlt(1);
21.3440 -
21.3441 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:239:5: ebnfSuffix
21.3442 {
21.3443 - dbg.location(239,5);
21.3444 pushFollow(FOLLOW_ebnfSuffix_in_elementNoOptionSpec1591);
21.3445 ebnfSuffix98=ebnfSuffix();
21.3446
21.3447 @@ -5006,7 +3920,7 @@
21.3448
21.3449
21.3450 // AST REWRITE
21.3451 - // elements: id, ebnfSuffix, block, labelOp
21.3452 + // elements: ebnfSuffix, id, labelOp, block
21.3453 // token labels: labelOp
21.3454 // rule labels: retval
21.3455 // token list labels:
21.3456 @@ -5020,47 +3934,35 @@
21.3457 root_0 = (CommonTree)adaptor.nil();
21.3458 // 239:16: -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] ^( $labelOp id block ) EOA[\"EOA\"] ) EOB[\"EOB\"] ) )
21.3459 {
21.3460 - dbg.location(239,19);
21.3461 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:239:19: ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] ^( $labelOp id block ) EOA[\"EOA\"] ) EOB[\"EOB\"] ) )
21.3462 {
21.3463 CommonTree root_1 = (CommonTree)adaptor.nil();
21.3464 - dbg.location(239,22);
21.3465 root_1 = (CommonTree)adaptor.becomeRoot(stream_ebnfSuffix.nextNode(), root_1);
21.3466
21.3467 - dbg.location(239,33);
21.3468 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:239:33: ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] ^( $labelOp id block ) EOA[\"EOA\"] ) EOB[\"EOB\"] )
21.3469 {
21.3470 CommonTree root_2 = (CommonTree)adaptor.nil();
21.3471 - dbg.location(239,35);
21.3472 root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(BLOCK, "BLOCK"), root_2);
21.3473
21.3474 - dbg.location(239,50);
21.3475 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:239:50: ^( ALT[\"ALT\"] ^( $labelOp id block ) EOA[\"EOA\"] )
21.3476 {
21.3477 CommonTree root_3 = (CommonTree)adaptor.nil();
21.3478 - dbg.location(239,52);
21.3479 root_3 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ALT, "ALT"), root_3);
21.3480
21.3481 - dbg.location(239,63);
21.3482 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:239:63: ^( $labelOp id block )
21.3483 {
21.3484 CommonTree root_4 = (CommonTree)adaptor.nil();
21.3485 - dbg.location(239,65);
21.3486 root_4 = (CommonTree)adaptor.becomeRoot(stream_labelOp.nextNode(), root_4);
21.3487
21.3488 - dbg.location(239,74);
21.3489 adaptor.addChild(root_4, stream_id.nextTree());
21.3490 - dbg.location(239,77);
21.3491 adaptor.addChild(root_4, stream_block.nextTree());
21.3492
21.3493 adaptor.addChild(root_3, root_4);
21.3494 }
21.3495 - dbg.location(239,84);
21.3496 adaptor.addChild(root_3, (CommonTree)adaptor.create(EOA, "EOA"));
21.3497
21.3498 adaptor.addChild(root_2, root_3);
21.3499 }
21.3500 - dbg.location(239,96);
21.3501 adaptor.addChild(root_2, (CommonTree)adaptor.create(EOB, "EOB"));
21.3502
21.3503 adaptor.addChild(root_1, root_2);
21.3504 @@ -5075,13 +3977,11 @@
21.3505 }
21.3506 break;
21.3507 case 2 :
21.3508 - dbg.enterAlt(2);
21.3509 -
21.3510 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:240:8:
21.3511 {
21.3512
21.3513 // AST REWRITE
21.3514 - // elements: id, block, labelOp
21.3515 + // elements: labelOp, id, block
21.3516 // token labels: labelOp
21.3517 // rule labels: retval
21.3518 // token list labels:
21.3519 @@ -5095,16 +3995,12 @@
21.3520 root_0 = (CommonTree)adaptor.nil();
21.3521 // 240:8: -> ^( $labelOp id block )
21.3522 {
21.3523 - dbg.location(240,11);
21.3524 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:240:11: ^( $labelOp id block )
21.3525 {
21.3526 CommonTree root_1 = (CommonTree)adaptor.nil();
21.3527 - dbg.location(240,13);
21.3528 root_1 = (CommonTree)adaptor.becomeRoot(stream_labelOp.nextNode(), root_1);
21.3529
21.3530 - dbg.location(240,22);
21.3531 adaptor.addChild(root_1, stream_id.nextTree());
21.3532 - dbg.location(240,25);
21.3533 adaptor.addChild(root_1, stream_block.nextTree());
21.3534
21.3535 adaptor.addChild(root_0, root_1);
21.3536 @@ -5117,29 +4013,21 @@
21.3537 break;
21.3538
21.3539 }
21.3540 - } finally {dbg.exitSubRule(42);}
21.3541
21.3542
21.3543 }
21.3544 break;
21.3545 case 3 :
21.3546 - dbg.enterAlt(3);
21.3547 -
21.3548 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:242:4: atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] atom EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> atom )
21.3549 {
21.3550 - dbg.location(242,4);
21.3551 pushFollow(FOLLOW_atom_in_elementNoOptionSpec1650);
21.3552 atom99=atom();
21.3553
21.3554 state._fsp--;
21.3555 if (state.failed) return retval;
21.3556 if ( state.backtracking==0 ) stream_atom.add(atom99.getTree());
21.3557 - dbg.location(243,3);
21.3558 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:243:3: ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] atom EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> atom )
21.3559 int alt43=2;
21.3560 - try { dbg.enterSubRule(43);
21.3561 - try { dbg.enterDecision(43, decisionCanBacktrack[43]);
21.3562 -
21.3563 int LA43_0 = input.LA(1);
21.3564
21.3565 if ( (LA43_0==74||(LA43_0>=90 && LA43_0<=91)) ) {
21.3566 @@ -5153,18 +4041,12 @@
21.3567 NoViableAltException nvae =
21.3568 new NoViableAltException("", 43, 0, input);
21.3569
21.3570 - dbg.recognitionException(nvae);
21.3571 throw nvae;
21.3572 }
21.3573 - } finally {dbg.exitDecision(43);}
21.3574 -
21.3575 switch (alt43) {
21.3576 case 1 :
21.3577 - dbg.enterAlt(1);
21.3578 -
21.3579 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:243:5: ebnfSuffix
21.3580 {
21.3581 - dbg.location(243,5);
21.3582 pushFollow(FOLLOW_ebnfSuffix_in_elementNoOptionSpec1656);
21.3583 ebnfSuffix100=ebnfSuffix();
21.3584
21.3585 @@ -5187,35 +4069,26 @@
21.3586 root_0 = (CommonTree)adaptor.nil();
21.3587 // 243:16: -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] atom EOA[\"EOA\"] ) EOB[\"EOB\"] ) )
21.3588 {
21.3589 - dbg.location(243,19);
21.3590 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:243:19: ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] atom EOA[\"EOA\"] ) EOB[\"EOB\"] ) )
21.3591 {
21.3592 CommonTree root_1 = (CommonTree)adaptor.nil();
21.3593 - dbg.location(243,22);
21.3594 root_1 = (CommonTree)adaptor.becomeRoot(stream_ebnfSuffix.nextNode(), root_1);
21.3595
21.3596 - dbg.location(243,33);
21.3597 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:243:33: ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] atom EOA[\"EOA\"] ) EOB[\"EOB\"] )
21.3598 {
21.3599 CommonTree root_2 = (CommonTree)adaptor.nil();
21.3600 - dbg.location(243,35);
21.3601 root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(BLOCK, "BLOCK"), root_2);
21.3602
21.3603 - dbg.location(243,50);
21.3604 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:243:50: ^( ALT[\"ALT\"] atom EOA[\"EOA\"] )
21.3605 {
21.3606 CommonTree root_3 = (CommonTree)adaptor.nil();
21.3607 - dbg.location(243,52);
21.3608 root_3 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ALT, "ALT"), root_3);
21.3609
21.3610 - dbg.location(243,63);
21.3611 adaptor.addChild(root_3, stream_atom.nextTree());
21.3612 - dbg.location(243,68);
21.3613 adaptor.addChild(root_3, (CommonTree)adaptor.create(EOA, "EOA"));
21.3614
21.3615 adaptor.addChild(root_2, root_3);
21.3616 }
21.3617 - dbg.location(243,80);
21.3618 adaptor.addChild(root_2, (CommonTree)adaptor.create(EOB, "EOB"));
21.3619
21.3620 adaptor.addChild(root_1, root_2);
21.3621 @@ -5230,8 +4103,6 @@
21.3622 }
21.3623 break;
21.3624 case 2 :
21.3625 - dbg.enterAlt(2);
21.3626 -
21.3627 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:244:8:
21.3628 {
21.3629
21.3630 @@ -5249,7 +4120,6 @@
21.3631 root_0 = (CommonTree)adaptor.nil();
21.3632 // 244:8: -> atom
21.3633 {
21.3634 - dbg.location(244,11);
21.3635 adaptor.addChild(root_0, stream_atom.nextTree());
21.3636
21.3637 }
21.3638 @@ -5259,19 +4129,15 @@
21.3639 break;
21.3640
21.3641 }
21.3642 - } finally {dbg.exitSubRule(43);}
21.3643
21.3644
21.3645 }
21.3646 break;
21.3647 case 4 :
21.3648 - dbg.enterAlt(4);
21.3649 -
21.3650 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:246:4: ebnf
21.3651 {
21.3652 root_0 = (CommonTree)adaptor.nil();
21.3653
21.3654 - dbg.location(246,4);
21.3655 pushFollow(FOLLOW_ebnf_in_elementNoOptionSpec1702);
21.3656 ebnf101=ebnf();
21.3657
21.3658 @@ -5282,13 +4148,10 @@
21.3659 }
21.3660 break;
21.3661 case 5 :
21.3662 - dbg.enterAlt(5);
21.3663 -
21.3664 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:247:6: ACTION
21.3665 {
21.3666 root_0 = (CommonTree)adaptor.nil();
21.3667
21.3668 - dbg.location(247,6);
21.3669 ACTION102=(Token)match(input,ACTION,FOLLOW_ACTION_in_elementNoOptionSpec1709); if (state.failed) return retval;
21.3670 if ( state.backtracking==0 ) {
21.3671 ACTION102_tree = (CommonTree)adaptor.create(ACTION102);
21.3672 @@ -5298,20 +4161,13 @@
21.3673 }
21.3674 break;
21.3675 case 6 :
21.3676 - dbg.enterAlt(6);
21.3677 -
21.3678 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:248:6: SEMPRED ( '=>' -> GATED_SEMPRED | -> SEMPRED )
21.3679 {
21.3680 - dbg.location(248,6);
21.3681 SEMPRED103=(Token)match(input,SEMPRED,FOLLOW_SEMPRED_in_elementNoOptionSpec1716); if (state.failed) return retval;
21.3682 if ( state.backtracking==0 ) stream_SEMPRED.add(SEMPRED103);
21.3683
21.3684 - dbg.location(248,14);
21.3685 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:248:14: ( '=>' -> GATED_SEMPRED | -> SEMPRED )
21.3686 int alt44=2;
21.3687 - try { dbg.enterSubRule(44);
21.3688 - try { dbg.enterDecision(44, decisionCanBacktrack[44]);
21.3689 -
21.3690 int LA44_0 = input.LA(1);
21.3691
21.3692 if ( (LA44_0==88) ) {
21.3693 @@ -5325,18 +4181,12 @@
21.3694 NoViableAltException nvae =
21.3695 new NoViableAltException("", 44, 0, input);
21.3696
21.3697 - dbg.recognitionException(nvae);
21.3698 throw nvae;
21.3699 }
21.3700 - } finally {dbg.exitDecision(44);}
21.3701 -
21.3702 switch (alt44) {
21.3703 case 1 :
21.3704 - dbg.enterAlt(1);
21.3705 -
21.3706 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:248:16: '=>'
21.3707 {
21.3708 - dbg.location(248,16);
21.3709 string_literal104=(Token)match(input,88,FOLLOW_88_in_elementNoOptionSpec1720); if (state.failed) return retval;
21.3710 if ( state.backtracking==0 ) stream_88.add(string_literal104);
21.3711
21.3712 @@ -5356,7 +4206,6 @@
21.3713 root_0 = (CommonTree)adaptor.nil();
21.3714 // 248:21: -> GATED_SEMPRED
21.3715 {
21.3716 - dbg.location(248,24);
21.3717 adaptor.addChild(root_0, (CommonTree)adaptor.create(GATED_SEMPRED, "GATED_SEMPRED"));
21.3718
21.3719 }
21.3720 @@ -5365,8 +4214,6 @@
21.3721 }
21.3722 break;
21.3723 case 2 :
21.3724 - dbg.enterAlt(2);
21.3725 -
21.3726 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:248:40:
21.3727 {
21.3728
21.3729 @@ -5384,7 +4231,6 @@
21.3730 root_0 = (CommonTree)adaptor.nil();
21.3731 // 248:40: -> SEMPRED
21.3732 {
21.3733 - dbg.location(248,43);
21.3734 adaptor.addChild(root_0, stream_SEMPRED.nextNode());
21.3735
21.3736 }
21.3737 @@ -5394,29 +4240,21 @@
21.3738 break;
21.3739
21.3740 }
21.3741 - } finally {dbg.exitSubRule(44);}
21.3742
21.3743
21.3744 }
21.3745 break;
21.3746 case 7 :
21.3747 - dbg.enterAlt(7);
21.3748 -
21.3749 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:249:6: treeSpec ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] treeSpec EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> treeSpec )
21.3750 {
21.3751 - dbg.location(249,6);
21.3752 pushFollow(FOLLOW_treeSpec_in_elementNoOptionSpec1739);
21.3753 treeSpec105=treeSpec();
21.3754
21.3755 state._fsp--;
21.3756 if (state.failed) return retval;
21.3757 if ( state.backtracking==0 ) stream_treeSpec.add(treeSpec105.getTree());
21.3758 - dbg.location(250,3);
21.3759 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:250:3: ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] treeSpec EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> treeSpec )
21.3760 int alt45=2;
21.3761 - try { dbg.enterSubRule(45);
21.3762 - try { dbg.enterDecision(45, decisionCanBacktrack[45]);
21.3763 -
21.3764 int LA45_0 = input.LA(1);
21.3765
21.3766 if ( (LA45_0==74||(LA45_0>=90 && LA45_0<=91)) ) {
21.3767 @@ -5430,18 +4268,12 @@
21.3768 NoViableAltException nvae =
21.3769 new NoViableAltException("", 45, 0, input);
21.3770
21.3771 - dbg.recognitionException(nvae);
21.3772 throw nvae;
21.3773 }
21.3774 - } finally {dbg.exitDecision(45);}
21.3775 -
21.3776 switch (alt45) {
21.3777 case 1 :
21.3778 - dbg.enterAlt(1);
21.3779 -
21.3780 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:250:5: ebnfSuffix
21.3781 {
21.3782 - dbg.location(250,5);
21.3783 pushFollow(FOLLOW_ebnfSuffix_in_elementNoOptionSpec1745);
21.3784 ebnfSuffix106=ebnfSuffix();
21.3785
21.3786 @@ -5464,35 +4296,26 @@
21.3787 root_0 = (CommonTree)adaptor.nil();
21.3788 // 250:16: -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] treeSpec EOA[\"EOA\"] ) EOB[\"EOB\"] ) )
21.3789 {
21.3790 - dbg.location(250,19);
21.3791 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:250:19: ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] treeSpec EOA[\"EOA\"] ) EOB[\"EOB\"] ) )
21.3792 {
21.3793 CommonTree root_1 = (CommonTree)adaptor.nil();
21.3794 - dbg.location(250,22);
21.3795 root_1 = (CommonTree)adaptor.becomeRoot(stream_ebnfSuffix.nextNode(), root_1);
21.3796
21.3797 - dbg.location(250,33);
21.3798 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:250:33: ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] treeSpec EOA[\"EOA\"] ) EOB[\"EOB\"] )
21.3799 {
21.3800 CommonTree root_2 = (CommonTree)adaptor.nil();
21.3801 - dbg.location(250,35);
21.3802 root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(BLOCK, "BLOCK"), root_2);
21.3803
21.3804 - dbg.location(250,50);
21.3805 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:250:50: ^( ALT[\"ALT\"] treeSpec EOA[\"EOA\"] )
21.3806 {
21.3807 CommonTree root_3 = (CommonTree)adaptor.nil();
21.3808 - dbg.location(250,52);
21.3809 root_3 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ALT, "ALT"), root_3);
21.3810
21.3811 - dbg.location(250,63);
21.3812 adaptor.addChild(root_3, stream_treeSpec.nextTree());
21.3813 - dbg.location(250,72);
21.3814 adaptor.addChild(root_3, (CommonTree)adaptor.create(EOA, "EOA"));
21.3815
21.3816 adaptor.addChild(root_2, root_3);
21.3817 }
21.3818 - dbg.location(250,84);
21.3819 adaptor.addChild(root_2, (CommonTree)adaptor.create(EOB, "EOB"));
21.3820
21.3821 adaptor.addChild(root_1, root_2);
21.3822 @@ -5507,8 +4330,6 @@
21.3823 }
21.3824 break;
21.3825 case 2 :
21.3826 - dbg.enterAlt(2);
21.3827 -
21.3828 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:251:8:
21.3829 {
21.3830
21.3831 @@ -5526,7 +4347,6 @@
21.3832 root_0 = (CommonTree)adaptor.nil();
21.3833 // 251:8: -> treeSpec
21.3834 {
21.3835 - dbg.location(251,11);
21.3836 adaptor.addChild(root_0, stream_treeSpec.nextTree());
21.3837
21.3838 }
21.3839 @@ -5536,7 +4356,6 @@
21.3840 break;
21.3841
21.3842 }
21.3843 - } finally {dbg.exitSubRule(45);}
21.3844
21.3845
21.3846 }
21.3847 @@ -5559,15 +4378,6 @@
21.3848 }
21.3849 finally {
21.3850 }
21.3851 - dbg.location(253, 2);
21.3852 -
21.3853 - }
21.3854 - finally {
21.3855 - dbg.exitRule(getGrammarFileName(), "elementNoOptionSpec");
21.3856 - decRuleLevel();
21.3857 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.3858 - }
21.3859 -
21.3860 return retval;
21.3861 }
21.3862 // $ANTLR end "elementNoOptionSpec"
21.3863 @@ -5604,16 +4414,9 @@
21.3864 RewriteRuleTokenStream stream_ARG_ACTION=new RewriteRuleTokenStream(adaptor,"token ARG_ACTION");
21.3865 RewriteRuleSubtreeStream stream_range=new RewriteRuleSubtreeStream(adaptor,"rule range");
21.3866 RewriteRuleSubtreeStream stream_notSet=new RewriteRuleSubtreeStream(adaptor,"rule notSet");
21.3867 - try { dbg.enterRule(getGrammarFileName(), "atom");
21.3868 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.3869 - incRuleLevel();
21.3870 - dbg.location(255, 1);
21.3871 -
21.3872 try {
21.3873 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:255:5: ( range ( (op= '^' | op= '!' ) -> ^( $op range ) | -> range ) | terminal | notSet ( (op= '^' | op= '!' ) -> ^( $op notSet ) | -> notSet ) | RULE_REF (arg= ARG_ACTION )? ( (op= '^' | op= '!' ) )? -> {$arg!=null&&op!=null}? ^( $op RULE_REF $arg) -> {$arg!=null}? ^( RULE_REF $arg) -> {$op!=null}? ^( $op RULE_REF ) -> RULE_REF )
21.3874 int alt54=4;
21.3875 - try { dbg.enterDecision(54, decisionCanBacktrack[54]);
21.3876 -
21.3877 switch ( input.LA(1) ) {
21.3878 case CHAR_LITERAL:
21.3879 {
21.3880 @@ -5630,7 +4433,6 @@
21.3881 NoViableAltException nvae =
21.3882 new NoViableAltException("", 54, 1, input);
21.3883
21.3884 - dbg.recognitionException(nvae);
21.3885 throw nvae;
21.3886 }
21.3887 }
21.3888 @@ -5657,31 +4459,21 @@
21.3889 NoViableAltException nvae =
21.3890 new NoViableAltException("", 54, 0, input);
21.3891
21.3892 - dbg.recognitionException(nvae);
21.3893 throw nvae;
21.3894 }
21.3895
21.3896 - } finally {dbg.exitDecision(54);}
21.3897 -
21.3898 switch (alt54) {
21.3899 case 1 :
21.3900 - dbg.enterAlt(1);
21.3901 -
21.3902 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:255:9: range ( (op= '^' | op= '!' ) -> ^( $op range ) | -> range )
21.3903 {
21.3904 - dbg.location(255,9);
21.3905 pushFollow(FOLLOW_range_in_atom1797);
21.3906 range107=range();
21.3907
21.3908 state._fsp--;
21.3909 if (state.failed) return retval;
21.3910 if ( state.backtracking==0 ) stream_range.add(range107.getTree());
21.3911 - dbg.location(255,15);
21.3912 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:255:15: ( (op= '^' | op= '!' ) -> ^( $op range ) | -> range )
21.3913 int alt48=2;
21.3914 - try { dbg.enterSubRule(48);
21.3915 - try { dbg.enterDecision(48, decisionCanBacktrack[48]);
21.3916 -
21.3917 int LA48_0 = input.LA(1);
21.3918
21.3919 if ( ((LA48_0>=ROOT && LA48_0<=BANG)) ) {
21.3920 @@ -5695,23 +4487,14 @@
21.3921 NoViableAltException nvae =
21.3922 new NoViableAltException("", 48, 0, input);
21.3923
21.3924 - dbg.recognitionException(nvae);
21.3925 throw nvae;
21.3926 }
21.3927 - } finally {dbg.exitDecision(48);}
21.3928 -
21.3929 switch (alt48) {
21.3930 case 1 :
21.3931 - dbg.enterAlt(1);
21.3932 -
21.3933 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:255:17: (op= '^' | op= '!' )
21.3934 {
21.3935 - dbg.location(255,17);
21.3936 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:255:17: (op= '^' | op= '!' )
21.3937 int alt47=2;
21.3938 - try { dbg.enterSubRule(47);
21.3939 - try { dbg.enterDecision(47, decisionCanBacktrack[47]);
21.3940 -
21.3941 int LA47_0 = input.LA(1);
21.3942
21.3943 if ( (LA47_0==ROOT) ) {
21.3944 @@ -5725,18 +4508,12 @@
21.3945 NoViableAltException nvae =
21.3946 new NoViableAltException("", 47, 0, input);
21.3947
21.3948 - dbg.recognitionException(nvae);
21.3949 throw nvae;
21.3950 }
21.3951 - } finally {dbg.exitDecision(47);}
21.3952 -
21.3953 switch (alt47) {
21.3954 case 1 :
21.3955 - dbg.enterAlt(1);
21.3956 -
21.3957 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:255:18: op= '^'
21.3958 {
21.3959 - dbg.location(255,20);
21.3960 op=(Token)match(input,ROOT,FOLLOW_ROOT_in_atom1804); if (state.failed) return retval;
21.3961 if ( state.backtracking==0 ) stream_ROOT.add(op);
21.3962
21.3963 @@ -5744,11 +4521,8 @@
21.3964 }
21.3965 break;
21.3966 case 2 :
21.3967 - dbg.enterAlt(2);
21.3968 -
21.3969 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:255:25: op= '!'
21.3970 {
21.3971 - dbg.location(255,27);
21.3972 op=(Token)match(input,BANG,FOLLOW_BANG_in_atom1808); if (state.failed) return retval;
21.3973 if ( state.backtracking==0 ) stream_BANG.add(op);
21.3974
21.3975 @@ -5757,12 +4531,11 @@
21.3976 break;
21.3977
21.3978 }
21.3979 - } finally {dbg.exitSubRule(47);}
21.3980
21.3981
21.3982
21.3983 // AST REWRITE
21.3984 - // elements: op, range
21.3985 + // elements: range, op
21.3986 // token labels: op
21.3987 // rule labels: retval
21.3988 // token list labels:
21.3989 @@ -5776,14 +4549,11 @@
21.3990 root_0 = (CommonTree)adaptor.nil();
21.3991 // 255:33: -> ^( $op range )
21.3992 {
21.3993 - dbg.location(255,36);
21.3994 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:255:36: ^( $op range )
21.3995 {
21.3996 CommonTree root_1 = (CommonTree)adaptor.nil();
21.3997 - dbg.location(255,38);
21.3998 root_1 = (CommonTree)adaptor.becomeRoot(stream_op.nextNode(), root_1);
21.3999
21.4000 - dbg.location(255,42);
21.4001 adaptor.addChild(root_1, stream_range.nextTree());
21.4002
21.4003 adaptor.addChild(root_0, root_1);
21.4004 @@ -5795,8 +4565,6 @@
21.4005 }
21.4006 break;
21.4007 case 2 :
21.4008 - dbg.enterAlt(2);
21.4009 -
21.4010 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:255:51:
21.4011 {
21.4012
21.4013 @@ -5814,7 +4582,6 @@
21.4014 root_0 = (CommonTree)adaptor.nil();
21.4015 // 255:51: -> range
21.4016 {
21.4017 - dbg.location(255,54);
21.4018 adaptor.addChild(root_0, stream_range.nextTree());
21.4019
21.4020 }
21.4021 @@ -5824,19 +4591,15 @@
21.4022 break;
21.4023
21.4024 }
21.4025 - } finally {dbg.exitSubRule(48);}
21.4026
21.4027
21.4028 }
21.4029 break;
21.4030 case 2 :
21.4031 - dbg.enterAlt(2);
21.4032 -
21.4033 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:256:9: terminal
21.4034 {
21.4035 root_0 = (CommonTree)adaptor.nil();
21.4036
21.4037 - dbg.location(256,9);
21.4038 pushFollow(FOLLOW_terminal_in_atom1836);
21.4039 terminal108=terminal();
21.4040
21.4041 @@ -5847,23 +4610,16 @@
21.4042 }
21.4043 break;
21.4044 case 3 :
21.4045 - dbg.enterAlt(3);
21.4046 -
21.4047 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:257:7: notSet ( (op= '^' | op= '!' ) -> ^( $op notSet ) | -> notSet )
21.4048 {
21.4049 - dbg.location(257,7);
21.4050 pushFollow(FOLLOW_notSet_in_atom1844);
21.4051 notSet109=notSet();
21.4052
21.4053 state._fsp--;
21.4054 if (state.failed) return retval;
21.4055 if ( state.backtracking==0 ) stream_notSet.add(notSet109.getTree());
21.4056 - dbg.location(257,14);
21.4057 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:257:14: ( (op= '^' | op= '!' ) -> ^( $op notSet ) | -> notSet )
21.4058 int alt50=2;
21.4059 - try { dbg.enterSubRule(50);
21.4060 - try { dbg.enterDecision(50, decisionCanBacktrack[50]);
21.4061 -
21.4062 int LA50_0 = input.LA(1);
21.4063
21.4064 if ( ((LA50_0>=ROOT && LA50_0<=BANG)) ) {
21.4065 @@ -5877,23 +4633,14 @@
21.4066 NoViableAltException nvae =
21.4067 new NoViableAltException("", 50, 0, input);
21.4068
21.4069 - dbg.recognitionException(nvae);
21.4070 throw nvae;
21.4071 }
21.4072 - } finally {dbg.exitDecision(50);}
21.4073 -
21.4074 switch (alt50) {
21.4075 case 1 :
21.4076 - dbg.enterAlt(1);
21.4077 -
21.4078 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:257:16: (op= '^' | op= '!' )
21.4079 {
21.4080 - dbg.location(257,16);
21.4081 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:257:16: (op= '^' | op= '!' )
21.4082 int alt49=2;
21.4083 - try { dbg.enterSubRule(49);
21.4084 - try { dbg.enterDecision(49, decisionCanBacktrack[49]);
21.4085 -
21.4086 int LA49_0 = input.LA(1);
21.4087
21.4088 if ( (LA49_0==ROOT) ) {
21.4089 @@ -5907,18 +4654,12 @@
21.4090 NoViableAltException nvae =
21.4091 new NoViableAltException("", 49, 0, input);
21.4092
21.4093 - dbg.recognitionException(nvae);
21.4094 throw nvae;
21.4095 }
21.4096 - } finally {dbg.exitDecision(49);}
21.4097 -
21.4098 switch (alt49) {
21.4099 case 1 :
21.4100 - dbg.enterAlt(1);
21.4101 -
21.4102 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:257:17: op= '^'
21.4103 {
21.4104 - dbg.location(257,19);
21.4105 op=(Token)match(input,ROOT,FOLLOW_ROOT_in_atom1851); if (state.failed) return retval;
21.4106 if ( state.backtracking==0 ) stream_ROOT.add(op);
21.4107
21.4108 @@ -5926,11 +4667,8 @@
21.4109 }
21.4110 break;
21.4111 case 2 :
21.4112 - dbg.enterAlt(2);
21.4113 -
21.4114 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:257:24: op= '!'
21.4115 {
21.4116 - dbg.location(257,26);
21.4117 op=(Token)match(input,BANG,FOLLOW_BANG_in_atom1855); if (state.failed) return retval;
21.4118 if ( state.backtracking==0 ) stream_BANG.add(op);
21.4119
21.4120 @@ -5939,7 +4677,6 @@
21.4121 break;
21.4122
21.4123 }
21.4124 - } finally {dbg.exitSubRule(49);}
21.4125
21.4126
21.4127
21.4128 @@ -5958,14 +4695,11 @@
21.4129 root_0 = (CommonTree)adaptor.nil();
21.4130 // 257:32: -> ^( $op notSet )
21.4131 {
21.4132 - dbg.location(257,35);
21.4133 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:257:35: ^( $op notSet )
21.4134 {
21.4135 CommonTree root_1 = (CommonTree)adaptor.nil();
21.4136 - dbg.location(257,37);
21.4137 root_1 = (CommonTree)adaptor.becomeRoot(stream_op.nextNode(), root_1);
21.4138
21.4139 - dbg.location(257,41);
21.4140 adaptor.addChild(root_1, stream_notSet.nextTree());
21.4141
21.4142 adaptor.addChild(root_0, root_1);
21.4143 @@ -5977,8 +4711,6 @@
21.4144 }
21.4145 break;
21.4146 case 2 :
21.4147 - dbg.enterAlt(2);
21.4148 -
21.4149 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:257:51:
21.4150 {
21.4151
21.4152 @@ -5996,7 +4728,6 @@
21.4153 root_0 = (CommonTree)adaptor.nil();
21.4154 // 257:51: -> notSet
21.4155 {
21.4156 - dbg.location(257,54);
21.4157 adaptor.addChild(root_0, stream_notSet.nextTree());
21.4158
21.4159 }
21.4160 @@ -6006,40 +4737,27 @@
21.4161 break;
21.4162
21.4163 }
21.4164 - } finally {dbg.exitSubRule(50);}
21.4165
21.4166
21.4167 }
21.4168 break;
21.4169 case 4 :
21.4170 - dbg.enterAlt(4);
21.4171 -
21.4172 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:258:9: RULE_REF (arg= ARG_ACTION )? ( (op= '^' | op= '!' ) )?
21.4173 {
21.4174 - dbg.location(258,9);
21.4175 RULE_REF110=(Token)match(input,RULE_REF,FOLLOW_RULE_REF_in_atom1883); if (state.failed) return retval;
21.4176 if ( state.backtracking==0 ) stream_RULE_REF.add(RULE_REF110);
21.4177
21.4178 - dbg.location(258,18);
21.4179 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:258:18: (arg= ARG_ACTION )?
21.4180 int alt51=2;
21.4181 - try { dbg.enterSubRule(51);
21.4182 - try { dbg.enterDecision(51, decisionCanBacktrack[51]);
21.4183 -
21.4184 int LA51_0 = input.LA(1);
21.4185
21.4186 if ( (LA51_0==ARG_ACTION) ) {
21.4187 alt51=1;
21.4188 }
21.4189 - } finally {dbg.exitDecision(51);}
21.4190 -
21.4191 switch (alt51) {
21.4192 case 1 :
21.4193 - dbg.enterAlt(1);
21.4194 -
21.4195 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:258:20: arg= ARG_ACTION
21.4196 {
21.4197 - dbg.location(258,23);
21.4198 arg=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_atom1889); if (state.failed) return retval;
21.4199 if ( state.backtracking==0 ) stream_ARG_ACTION.add(arg);
21.4200
21.4201 @@ -6048,33 +4766,20 @@
21.4202 break;
21.4203
21.4204 }
21.4205 - } finally {dbg.exitSubRule(51);}
21.4206 -
21.4207 - dbg.location(258,38);
21.4208 +
21.4209 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:258:38: ( (op= '^' | op= '!' ) )?
21.4210 int alt53=2;
21.4211 - try { dbg.enterSubRule(53);
21.4212 - try { dbg.enterDecision(53, decisionCanBacktrack[53]);
21.4213 -
21.4214 int LA53_0 = input.LA(1);
21.4215
21.4216 if ( ((LA53_0>=ROOT && LA53_0<=BANG)) ) {
21.4217 alt53=1;
21.4218 }
21.4219 - } finally {dbg.exitDecision(53);}
21.4220 -
21.4221 switch (alt53) {
21.4222 case 1 :
21.4223 - dbg.enterAlt(1);
21.4224 -
21.4225 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:258:40: (op= '^' | op= '!' )
21.4226 {
21.4227 - dbg.location(258,40);
21.4228 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:258:40: (op= '^' | op= '!' )
21.4229 int alt52=2;
21.4230 - try { dbg.enterSubRule(52);
21.4231 - try { dbg.enterDecision(52, decisionCanBacktrack[52]);
21.4232 -
21.4233 int LA52_0 = input.LA(1);
21.4234
21.4235 if ( (LA52_0==ROOT) ) {
21.4236 @@ -6088,18 +4793,12 @@
21.4237 NoViableAltException nvae =
21.4238 new NoViableAltException("", 52, 0, input);
21.4239
21.4240 - dbg.recognitionException(nvae);
21.4241 throw nvae;
21.4242 }
21.4243 - } finally {dbg.exitDecision(52);}
21.4244 -
21.4245 switch (alt52) {
21.4246 case 1 :
21.4247 - dbg.enterAlt(1);
21.4248 -
21.4249 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:258:41: op= '^'
21.4250 {
21.4251 - dbg.location(258,43);
21.4252 op=(Token)match(input,ROOT,FOLLOW_ROOT_in_atom1899); if (state.failed) return retval;
21.4253 if ( state.backtracking==0 ) stream_ROOT.add(op);
21.4254
21.4255 @@ -6107,11 +4806,8 @@
21.4256 }
21.4257 break;
21.4258 case 2 :
21.4259 - dbg.enterAlt(2);
21.4260 -
21.4261 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:258:48: op= '!'
21.4262 {
21.4263 - dbg.location(258,50);
21.4264 op=(Token)match(input,BANG,FOLLOW_BANG_in_atom1903); if (state.failed) return retval;
21.4265 if ( state.backtracking==0 ) stream_BANG.add(op);
21.4266
21.4267 @@ -6120,19 +4816,17 @@
21.4268 break;
21.4269
21.4270 }
21.4271 - } finally {dbg.exitSubRule(52);}
21.4272
21.4273
21.4274 }
21.4275 break;
21.4276
21.4277 }
21.4278 - } finally {dbg.exitSubRule(53);}
21.4279
21.4280
21.4281
21.4282 // AST REWRITE
21.4283 - // elements: RULE_REF, op, arg, RULE_REF, arg, op, RULE_REF, RULE_REF
21.4284 + // elements: RULE_REF, RULE_REF, op, op, arg, arg, RULE_REF, RULE_REF
21.4285 // token labels: arg, op
21.4286 // rule labels: retval
21.4287 // token list labels:
21.4288 @@ -6147,16 +4841,12 @@
21.4289 root_0 = (CommonTree)adaptor.nil();
21.4290 // 259:6: -> {$arg!=null&&op!=null}? ^( $op RULE_REF $arg)
21.4291 if (arg!=null&&op!=null) {
21.4292 - dbg.location(259,33);
21.4293 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:259:33: ^( $op RULE_REF $arg)
21.4294 {
21.4295 CommonTree root_1 = (CommonTree)adaptor.nil();
21.4296 - dbg.location(259,35);
21.4297 root_1 = (CommonTree)adaptor.becomeRoot(stream_op.nextNode(), root_1);
21.4298
21.4299 - dbg.location(259,39);
21.4300 adaptor.addChild(root_1, stream_RULE_REF.nextNode());
21.4301 - dbg.location(259,48);
21.4302 adaptor.addChild(root_1, stream_arg.nextNode());
21.4303
21.4304 adaptor.addChild(root_0, root_1);
21.4305 @@ -6165,14 +4855,11 @@
21.4306 }
21.4307 else // 260:6: -> {$arg!=null}? ^( RULE_REF $arg)
21.4308 if (arg!=null) {
21.4309 - dbg.location(260,25);
21.4310 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:260:25: ^( RULE_REF $arg)
21.4311 {
21.4312 CommonTree root_1 = (CommonTree)adaptor.nil();
21.4313 - dbg.location(260,27);
21.4314 root_1 = (CommonTree)adaptor.becomeRoot(stream_RULE_REF.nextNode(), root_1);
21.4315
21.4316 - dbg.location(260,36);
21.4317 adaptor.addChild(root_1, stream_arg.nextNode());
21.4318
21.4319 adaptor.addChild(root_0, root_1);
21.4320 @@ -6181,14 +4868,11 @@
21.4321 }
21.4322 else // 261:6: -> {$op!=null}? ^( $op RULE_REF )
21.4323 if (op!=null) {
21.4324 - dbg.location(261,25);
21.4325 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:261:25: ^( $op RULE_REF )
21.4326 {
21.4327 CommonTree root_1 = (CommonTree)adaptor.nil();
21.4328 - dbg.location(261,27);
21.4329 root_1 = (CommonTree)adaptor.becomeRoot(stream_op.nextNode(), root_1);
21.4330
21.4331 - dbg.location(261,31);
21.4332 adaptor.addChild(root_1, stream_RULE_REF.nextNode());
21.4333
21.4334 adaptor.addChild(root_0, root_1);
21.4335 @@ -6197,7 +4881,6 @@
21.4336 }
21.4337 else // 262:6: -> RULE_REF
21.4338 {
21.4339 - dbg.location(262,9);
21.4340 adaptor.addChild(root_0, stream_RULE_REF.nextNode());
21.4341
21.4342 }
21.4343 @@ -6223,15 +4906,6 @@
21.4344 }
21.4345 finally {
21.4346 }
21.4347 - dbg.location(263, 5);
21.4348 -
21.4349 - }
21.4350 - finally {
21.4351 - dbg.exitRule(getGrammarFileName(), "atom");
21.4352 - decRuleLevel();
21.4353 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.4354 - }
21.4355 -
21.4356 return retval;
21.4357 }
21.4358 // $ANTLR end "atom"
21.4359 @@ -6259,27 +4933,15 @@
21.4360 RewriteRuleTokenStream stream_89=new RewriteRuleTokenStream(adaptor,"token 89");
21.4361 RewriteRuleSubtreeStream stream_notTerminal=new RewriteRuleSubtreeStream(adaptor,"rule notTerminal");
21.4362 RewriteRuleSubtreeStream stream_block=new RewriteRuleSubtreeStream(adaptor,"rule block");
21.4363 - try { dbg.enterRule(getGrammarFileName(), "notSet");
21.4364 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.4365 - incRuleLevel();
21.4366 - dbg.location(265, 1);
21.4367 -
21.4368 try {
21.4369 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:266:2: ( '~' ( notTerminal -> ^( '~' notTerminal ) | block -> ^( '~' block ) ) )
21.4370 - dbg.enterAlt(1);
21.4371 -
21.4372 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:266:4: '~' ( notTerminal -> ^( '~' notTerminal ) | block -> ^( '~' block ) )
21.4373 {
21.4374 - dbg.location(266,4);
21.4375 char_literal111=(Token)match(input,89,FOLLOW_89_in_notSet1986); if (state.failed) return retval;
21.4376 if ( state.backtracking==0 ) stream_89.add(char_literal111);
21.4377
21.4378 - dbg.location(267,3);
21.4379 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:267:3: ( notTerminal -> ^( '~' notTerminal ) | block -> ^( '~' block ) )
21.4380 int alt55=2;
21.4381 - try { dbg.enterSubRule(55);
21.4382 - try { dbg.enterDecision(55, decisionCanBacktrack[55]);
21.4383 -
21.4384 int LA55_0 = input.LA(1);
21.4385
21.4386 if ( ((LA55_0>=TOKEN_REF && LA55_0<=CHAR_LITERAL)) ) {
21.4387 @@ -6293,18 +4955,12 @@
21.4388 NoViableAltException nvae =
21.4389 new NoViableAltException("", 55, 0, input);
21.4390
21.4391 - dbg.recognitionException(nvae);
21.4392 throw nvae;
21.4393 }
21.4394 - } finally {dbg.exitDecision(55);}
21.4395 -
21.4396 switch (alt55) {
21.4397 case 1 :
21.4398 - dbg.enterAlt(1);
21.4399 -
21.4400 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:267:5: notTerminal
21.4401 {
21.4402 - dbg.location(267,5);
21.4403 pushFollow(FOLLOW_notTerminal_in_notSet1992);
21.4404 notTerminal112=notTerminal();
21.4405
21.4406 @@ -6327,14 +4983,11 @@
21.4407 root_0 = (CommonTree)adaptor.nil();
21.4408 // 267:17: -> ^( '~' notTerminal )
21.4409 {
21.4410 - dbg.location(267,20);
21.4411 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:267:20: ^( '~' notTerminal )
21.4412 {
21.4413 CommonTree root_1 = (CommonTree)adaptor.nil();
21.4414 - dbg.location(267,22);
21.4415 root_1 = (CommonTree)adaptor.becomeRoot(stream_89.nextNode(), root_1);
21.4416
21.4417 - dbg.location(267,26);
21.4418 adaptor.addChild(root_1, stream_notTerminal.nextTree());
21.4419
21.4420 adaptor.addChild(root_0, root_1);
21.4421 @@ -6346,11 +4999,8 @@
21.4422 }
21.4423 break;
21.4424 case 2 :
21.4425 - dbg.enterAlt(2);
21.4426 -
21.4427 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:268:5: block
21.4428 {
21.4429 - dbg.location(268,5);
21.4430 pushFollow(FOLLOW_block_in_notSet2006);
21.4431 block113=block();
21.4432
21.4433 @@ -6360,7 +5010,7 @@
21.4434
21.4435
21.4436 // AST REWRITE
21.4437 - // elements: 89, block
21.4438 + // elements: block, 89
21.4439 // token labels:
21.4440 // rule labels: retval
21.4441 // token list labels:
21.4442 @@ -6373,14 +5023,11 @@
21.4443 root_0 = (CommonTree)adaptor.nil();
21.4444 // 268:12: -> ^( '~' block )
21.4445 {
21.4446 - dbg.location(268,15);
21.4447 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:268:15: ^( '~' block )
21.4448 {
21.4449 CommonTree root_1 = (CommonTree)adaptor.nil();
21.4450 - dbg.location(268,17);
21.4451 root_1 = (CommonTree)adaptor.becomeRoot(stream_89.nextNode(), root_1);
21.4452
21.4453 - dbg.location(268,21);
21.4454 adaptor.addChild(root_1, stream_block.nextTree());
21.4455
21.4456 adaptor.addChild(root_0, root_1);
21.4457 @@ -6393,7 +5040,6 @@
21.4458 break;
21.4459
21.4460 }
21.4461 - } finally {dbg.exitSubRule(55);}
21.4462
21.4463
21.4464 }
21.4465 @@ -6414,15 +5060,6 @@
21.4466 }
21.4467 finally {
21.4468 }
21.4469 - dbg.location(270, 2);
21.4470 -
21.4471 - }
21.4472 - finally {
21.4473 - dbg.exitRule(getGrammarFileName(), "notSet");
21.4474 - decRuleLevel();
21.4475 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.4476 - }
21.4477 -
21.4478 return retval;
21.4479 }
21.4480 // $ANTLR end "notSet"
21.4481 @@ -6452,38 +5089,24 @@
21.4482 RewriteRuleTokenStream stream_TREE_BEGIN=new RewriteRuleTokenStream(adaptor,"token TREE_BEGIN");
21.4483 RewriteRuleTokenStream stream_84=new RewriteRuleTokenStream(adaptor,"token 84");
21.4484 RewriteRuleSubtreeStream stream_element=new RewriteRuleSubtreeStream(adaptor,"rule element");
21.4485 - try { dbg.enterRule(getGrammarFileName(), "treeSpec");
21.4486 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.4487 - incRuleLevel();
21.4488 - dbg.location(272, 1);
21.4489 -
21.4490 try {
21.4491 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:273:2: ( '^(' element ( element )+ ')' -> ^( TREE_BEGIN ( element )+ ) )
21.4492 - dbg.enterAlt(1);
21.4493 -
21.4494 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:273:4: '^(' element ( element )+ ')'
21.4495 {
21.4496 - dbg.location(273,4);
21.4497 string_literal114=(Token)match(input,TREE_BEGIN,FOLLOW_TREE_BEGIN_in_treeSpec2030); if (state.failed) return retval;
21.4498 if ( state.backtracking==0 ) stream_TREE_BEGIN.add(string_literal114);
21.4499
21.4500 - dbg.location(273,9);
21.4501 pushFollow(FOLLOW_element_in_treeSpec2032);
21.4502 element115=element();
21.4503
21.4504 state._fsp--;
21.4505 if (state.failed) return retval;
21.4506 if ( state.backtracking==0 ) stream_element.add(element115.getTree());
21.4507 - dbg.location(273,17);
21.4508 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:273:17: ( element )+
21.4509 int cnt56=0;
21.4510 - try { dbg.enterSubRule(56);
21.4511 -
21.4512 loop56:
21.4513 do {
21.4514 int alt56=2;
21.4515 - try { dbg.enterDecision(56, decisionCanBacktrack[56]);
21.4516 -
21.4517 int LA56_0 = input.LA(1);
21.4518
21.4519 if ( (LA56_0==SEMPRED||LA56_0==TREE_BEGIN||(LA56_0>=TOKEN_REF && LA56_0<=ACTION)||LA56_0==RULE_REF||LA56_0==82||LA56_0==89||LA56_0==92) ) {
21.4520 @@ -6491,15 +5114,10 @@
21.4521 }
21.4522
21.4523
21.4524 - } finally {dbg.exitDecision(56);}
21.4525 -
21.4526 switch (alt56) {
21.4527 case 1 :
21.4528 - dbg.enterAlt(1);
21.4529 -
21.4530 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:273:19: element
21.4531 {
21.4532 - dbg.location(273,19);
21.4533 pushFollow(FOLLOW_element_in_treeSpec2036);
21.4534 element116=element();
21.4535
21.4536 @@ -6515,15 +5133,11 @@
21.4537 if (state.backtracking>0) {state.failed=true; return retval;}
21.4538 EarlyExitException eee =
21.4539 new EarlyExitException(56, input);
21.4540 - dbg.recognitionException(eee);
21.4541 -
21.4542 throw eee;
21.4543 }
21.4544 cnt56++;
21.4545 } while (true);
21.4546 - } finally {dbg.exitSubRule(56);}
21.4547 -
21.4548 - dbg.location(273,30);
21.4549 +
21.4550 char_literal117=(Token)match(input,84,FOLLOW_84_in_treeSpec2041); if (state.failed) return retval;
21.4551 if ( state.backtracking==0 ) stream_84.add(char_literal117);
21.4552
21.4553 @@ -6543,19 +5157,15 @@
21.4554 root_0 = (CommonTree)adaptor.nil();
21.4555 // 273:34: -> ^( TREE_BEGIN ( element )+ )
21.4556 {
21.4557 - dbg.location(273,37);
21.4558 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:273:37: ^( TREE_BEGIN ( element )+ )
21.4559 {
21.4560 CommonTree root_1 = (CommonTree)adaptor.nil();
21.4561 - dbg.location(273,39);
21.4562 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TREE_BEGIN, "TREE_BEGIN"), root_1);
21.4563
21.4564 - dbg.location(273,50);
21.4565 if ( !(stream_element.hasNext()) ) {
21.4566 throw new RewriteEarlyExitException();
21.4567 }
21.4568 while ( stream_element.hasNext() ) {
21.4569 - dbg.location(273,50);
21.4570 adaptor.addChild(root_1, stream_element.nextTree());
21.4571
21.4572 }
21.4573 @@ -6585,15 +5195,6 @@
21.4574 }
21.4575 finally {
21.4576 }
21.4577 - dbg.location(274, 2);
21.4578 -
21.4579 - }
21.4580 - finally {
21.4581 - dbg.exitRule(getGrammarFileName(), "treeSpec");
21.4582 - decRuleLevel();
21.4583 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.4584 - }
21.4585 -
21.4586 return retval;
21.4587 }
21.4588 // $ANTLR end "treeSpec"
21.4589 @@ -6626,30 +5227,18 @@
21.4590
21.4591 Token firstToken = input.LT(1);
21.4592
21.4593 - try { dbg.enterRule(getGrammarFileName(), "ebnf");
21.4594 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.4595 - incRuleLevel();
21.4596 - dbg.location(276, 1);
21.4597 -
21.4598 try {
21.4599 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:285:2: ( block (op= '?' -> ^( OPTIONAL[op] block ) | op= '*' -> ^( CLOSURE[op] block ) | op= '+' -> ^( POSITIVE_CLOSURE[op] block ) | '=>' -> {gtype==COMBINED_GRAMMAR &&\n\t\t\t\t\t Character.isUpperCase($rule::name.charAt(0))}? ^( SYNPRED[\"=>\"] block ) -> SYN_SEMPRED | -> block ) )
21.4600 - dbg.enterAlt(1);
21.4601 -
21.4602 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:285:4: block (op= '?' -> ^( OPTIONAL[op] block ) | op= '*' -> ^( CLOSURE[op] block ) | op= '+' -> ^( POSITIVE_CLOSURE[op] block ) | '=>' -> {gtype==COMBINED_GRAMMAR &&\n\t\t\t\t\t Character.isUpperCase($rule::name.charAt(0))}? ^( SYNPRED[\"=>\"] block ) -> SYN_SEMPRED | -> block )
21.4603 {
21.4604 - dbg.location(285,4);
21.4605 pushFollow(FOLLOW_block_in_ebnf2073);
21.4606 block118=block();
21.4607
21.4608 state._fsp--;
21.4609 if (state.failed) return retval;
21.4610 if ( state.backtracking==0 ) stream_block.add(block118.getTree());
21.4611 - dbg.location(286,3);
21.4612 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:286:3: (op= '?' -> ^( OPTIONAL[op] block ) | op= '*' -> ^( CLOSURE[op] block ) | op= '+' -> ^( POSITIVE_CLOSURE[op] block ) | '=>' -> {gtype==COMBINED_GRAMMAR &&\n\t\t\t\t\t Character.isUpperCase($rule::name.charAt(0))}? ^( SYNPRED[\"=>\"] block ) -> SYN_SEMPRED | -> block )
21.4613 int alt57=5;
21.4614 - try { dbg.enterSubRule(57);
21.4615 - try { dbg.enterDecision(57, decisionCanBacktrack[57]);
21.4616 -
21.4617 switch ( input.LA(1) ) {
21.4618 case 90:
21.4619 {
21.4620 @@ -6694,19 +5283,13 @@
21.4621 NoViableAltException nvae =
21.4622 new NoViableAltException("", 57, 0, input);
21.4623
21.4624 - dbg.recognitionException(nvae);
21.4625 throw nvae;
21.4626 }
21.4627
21.4628 - } finally {dbg.exitDecision(57);}
21.4629 -
21.4630 switch (alt57) {
21.4631 case 1 :
21.4632 - dbg.enterAlt(1);
21.4633 -
21.4634 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:286:5: op= '?'
21.4635 {
21.4636 - dbg.location(286,7);
21.4637 op=(Token)match(input,90,FOLLOW_90_in_ebnf2081); if (state.failed) return retval;
21.4638 if ( state.backtracking==0 ) stream_90.add(op);
21.4639
21.4640 @@ -6726,14 +5309,11 @@
21.4641 root_0 = (CommonTree)adaptor.nil();
21.4642 // 286:12: -> ^( OPTIONAL[op] block )
21.4643 {
21.4644 - dbg.location(286,15);
21.4645 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:286:15: ^( OPTIONAL[op] block )
21.4646 {
21.4647 CommonTree root_1 = (CommonTree)adaptor.nil();
21.4648 - dbg.location(286,17);
21.4649 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(OPTIONAL, op), root_1);
21.4650
21.4651 - dbg.location(286,30);
21.4652 adaptor.addChild(root_1, stream_block.nextTree());
21.4653
21.4654 adaptor.addChild(root_0, root_1);
21.4655 @@ -6745,11 +5325,8 @@
21.4656 }
21.4657 break;
21.4658 case 2 :
21.4659 - dbg.enterAlt(2);
21.4660 -
21.4661 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:287:5: op= '*'
21.4662 {
21.4663 - dbg.location(287,7);
21.4664 op=(Token)match(input,74,FOLLOW_74_in_ebnf2098); if (state.failed) return retval;
21.4665 if ( state.backtracking==0 ) stream_74.add(op);
21.4666
21.4667 @@ -6769,14 +5346,11 @@
21.4668 root_0 = (CommonTree)adaptor.nil();
21.4669 // 287:12: -> ^( CLOSURE[op] block )
21.4670 {
21.4671 - dbg.location(287,15);
21.4672 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:287:15: ^( CLOSURE[op] block )
21.4673 {
21.4674 CommonTree root_1 = (CommonTree)adaptor.nil();
21.4675 - dbg.location(287,17);
21.4676 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(CLOSURE, op), root_1);
21.4677
21.4678 - dbg.location(287,29);
21.4679 adaptor.addChild(root_1, stream_block.nextTree());
21.4680
21.4681 adaptor.addChild(root_0, root_1);
21.4682 @@ -6788,11 +5362,8 @@
21.4683 }
21.4684 break;
21.4685 case 3 :
21.4686 - dbg.enterAlt(3);
21.4687 -
21.4688 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:288:5: op= '+'
21.4689 {
21.4690 - dbg.location(288,7);
21.4691 op=(Token)match(input,91,FOLLOW_91_in_ebnf2115); if (state.failed) return retval;
21.4692 if ( state.backtracking==0 ) stream_91.add(op);
21.4693
21.4694 @@ -6812,14 +5383,11 @@
21.4695 root_0 = (CommonTree)adaptor.nil();
21.4696 // 288:12: -> ^( POSITIVE_CLOSURE[op] block )
21.4697 {
21.4698 - dbg.location(288,15);
21.4699 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:288:15: ^( POSITIVE_CLOSURE[op] block )
21.4700 {
21.4701 CommonTree root_1 = (CommonTree)adaptor.nil();
21.4702 - dbg.location(288,17);
21.4703 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(POSITIVE_CLOSURE, op), root_1);
21.4704
21.4705 - dbg.location(288,38);
21.4706 adaptor.addChild(root_1, stream_block.nextTree());
21.4707
21.4708 adaptor.addChild(root_0, root_1);
21.4709 @@ -6831,11 +5399,8 @@
21.4710 }
21.4711 break;
21.4712 case 4 :
21.4713 - dbg.enterAlt(4);
21.4714 -
21.4715 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:289:7: '=>'
21.4716 {
21.4717 - dbg.location(289,7);
21.4718 string_literal119=(Token)match(input,88,FOLLOW_88_in_ebnf2132); if (state.failed) return retval;
21.4719 if ( state.backtracking==0 ) stream_88.add(string_literal119);
21.4720
21.4721 @@ -6856,14 +5421,11 @@
21.4722 // 290:6: -> {gtype==COMBINED_GRAMMAR &&\n\t\t\t\t\t Character.isUpperCase($rule::name.charAt(0))}? ^( SYNPRED[\"=>\"] block )
21.4723 if (gtype==COMBINED_GRAMMAR &&
21.4724 Character.isUpperCase(((rule_scope)rule_stack.peek()).name.charAt(0))) {
21.4725 - dbg.location(293,9);
21.4726 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:293:9: ^( SYNPRED[\"=>\"] block )
21.4727 {
21.4728 CommonTree root_1 = (CommonTree)adaptor.nil();
21.4729 - dbg.location(293,11);
21.4730 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(SYNPRED, "=>"), root_1);
21.4731
21.4732 - dbg.location(293,25);
21.4733 adaptor.addChild(root_1, stream_block.nextTree());
21.4734
21.4735 adaptor.addChild(root_0, root_1);
21.4736 @@ -6872,7 +5434,6 @@
21.4737 }
21.4738 else // 295:6: -> SYN_SEMPRED
21.4739 {
21.4740 - dbg.location(295,9);
21.4741 adaptor.addChild(root_0, (CommonTree)adaptor.create(SYN_SEMPRED, "SYN_SEMPRED"));
21.4742
21.4743 }
21.4744 @@ -6881,8 +5442,6 @@
21.4745 }
21.4746 break;
21.4747 case 5 :
21.4748 - dbg.enterAlt(5);
21.4749 -
21.4750 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:296:13:
21.4751 {
21.4752
21.4753 @@ -6900,7 +5459,6 @@
21.4754 root_0 = (CommonTree)adaptor.nil();
21.4755 // 296:13: -> block
21.4756 {
21.4757 - dbg.location(296,16);
21.4758 adaptor.addChild(root_0, stream_block.nextTree());
21.4759
21.4760 }
21.4761 @@ -6910,7 +5468,6 @@
21.4762 break;
21.4763
21.4764 }
21.4765 - } finally {dbg.exitSubRule(57);}
21.4766
21.4767
21.4768 }
21.4769 @@ -6937,15 +5494,6 @@
21.4770 }
21.4771 finally {
21.4772 }
21.4773 - dbg.location(298, 2);
21.4774 -
21.4775 - }
21.4776 - finally {
21.4777 - dbg.exitRule(getGrammarFileName(), "ebnf");
21.4778 - decRuleLevel();
21.4779 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.4780 - }
21.4781 -
21.4782 return retval;
21.4783 }
21.4784 // $ANTLR end "ebnf"
21.4785 @@ -6973,26 +5521,16 @@
21.4786 RewriteRuleTokenStream stream_RANGE=new RewriteRuleTokenStream(adaptor,"token RANGE");
21.4787 RewriteRuleTokenStream stream_CHAR_LITERAL=new RewriteRuleTokenStream(adaptor,"token CHAR_LITERAL");
21.4788
21.4789 - try { dbg.enterRule(getGrammarFileName(), "range");
21.4790 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.4791 - incRuleLevel();
21.4792 - dbg.location(300, 1);
21.4793 -
21.4794 try {
21.4795 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:301:2: (c1= CHAR_LITERAL RANGE c2= CHAR_LITERAL -> ^( CHAR_RANGE[$c1,\"..\"] $c1 $c2) )
21.4796 - dbg.enterAlt(1);
21.4797 -
21.4798 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:301:4: c1= CHAR_LITERAL RANGE c2= CHAR_LITERAL
21.4799 {
21.4800 - dbg.location(301,6);
21.4801 c1=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_range2215); if (state.failed) return retval;
21.4802 if ( state.backtracking==0 ) stream_CHAR_LITERAL.add(c1);
21.4803
21.4804 - dbg.location(301,20);
21.4805 RANGE120=(Token)match(input,RANGE,FOLLOW_RANGE_in_range2217); if (state.failed) return retval;
21.4806 if ( state.backtracking==0 ) stream_RANGE.add(RANGE120);
21.4807
21.4808 - dbg.location(301,28);
21.4809 c2=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_range2221); if (state.failed) return retval;
21.4810 if ( state.backtracking==0 ) stream_CHAR_LITERAL.add(c2);
21.4811
21.4812 @@ -7014,16 +5552,12 @@
21.4813 root_0 = (CommonTree)adaptor.nil();
21.4814 // 301:42: -> ^( CHAR_RANGE[$c1,\"..\"] $c1 $c2)
21.4815 {
21.4816 - dbg.location(301,45);
21.4817 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:301:45: ^( CHAR_RANGE[$c1,\"..\"] $c1 $c2)
21.4818 {
21.4819 CommonTree root_1 = (CommonTree)adaptor.nil();
21.4820 - dbg.location(301,47);
21.4821 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(CHAR_RANGE, c1, ".."), root_1);
21.4822
21.4823 - dbg.location(301,68);
21.4824 adaptor.addChild(root_1, stream_c1.nextNode());
21.4825 - dbg.location(301,72);
21.4826 adaptor.addChild(root_1, stream_c2.nextNode());
21.4827
21.4828 adaptor.addChild(root_0, root_1);
21.4829 @@ -7050,15 +5584,6 @@
21.4830 }
21.4831 finally {
21.4832 }
21.4833 - dbg.location(302, 2);
21.4834 -
21.4835 - }
21.4836 - finally {
21.4837 - dbg.exitRule(getGrammarFileName(), "range");
21.4838 - decRuleLevel();
21.4839 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.4840 - }
21.4841 -
21.4842 return retval;
21.4843 }
21.4844 // $ANTLR end "range"
21.4845 @@ -7099,23 +5624,12 @@
21.4846 RewriteRuleTokenStream stream_TOKEN_REF=new RewriteRuleTokenStream(adaptor,"token TOKEN_REF");
21.4847 RewriteRuleTokenStream stream_ARG_ACTION=new RewriteRuleTokenStream(adaptor,"token ARG_ACTION");
21.4848
21.4849 - try { dbg.enterRule(getGrammarFileName(), "terminal");
21.4850 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.4851 - incRuleLevel();
21.4852 - dbg.location(304, 1);
21.4853 -
21.4854 try {
21.4855 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:305:5: ( ( CHAR_LITERAL -> CHAR_LITERAL | TOKEN_REF ( ARG_ACTION -> ^( TOKEN_REF ARG_ACTION ) | -> TOKEN_REF ) | STRING_LITERAL -> STRING_LITERAL | '.' -> '.' ) ( '^' -> ^( '^' $terminal) | '!' -> ^( '!' $terminal) )? )
21.4856 - dbg.enterAlt(1);
21.4857 -
21.4858 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:305:9: ( CHAR_LITERAL -> CHAR_LITERAL | TOKEN_REF ( ARG_ACTION -> ^( TOKEN_REF ARG_ACTION ) | -> TOKEN_REF ) | STRING_LITERAL -> STRING_LITERAL | '.' -> '.' ) ( '^' -> ^( '^' $terminal) | '!' -> ^( '!' $terminal) )?
21.4859 {
21.4860 - dbg.location(305,9);
21.4861 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:305:9: ( CHAR_LITERAL -> CHAR_LITERAL | TOKEN_REF ( ARG_ACTION -> ^( TOKEN_REF ARG_ACTION ) | -> TOKEN_REF ) | STRING_LITERAL -> STRING_LITERAL | '.' -> '.' )
21.4862 int alt59=4;
21.4863 - try { dbg.enterSubRule(59);
21.4864 - try { dbg.enterDecision(59, decisionCanBacktrack[59]);
21.4865 -
21.4866 switch ( input.LA(1) ) {
21.4867 case CHAR_LITERAL:
21.4868 {
21.4869 @@ -7142,19 +5656,13 @@
21.4870 NoViableAltException nvae =
21.4871 new NoViableAltException("", 59, 0, input);
21.4872
21.4873 - dbg.recognitionException(nvae);
21.4874 throw nvae;
21.4875 }
21.4876
21.4877 - } finally {dbg.exitDecision(59);}
21.4878 -
21.4879 switch (alt59) {
21.4880 case 1 :
21.4881 - dbg.enterAlt(1);
21.4882 -
21.4883 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:305:11: CHAR_LITERAL
21.4884 {
21.4885 - dbg.location(305,11);
21.4886 CHAR_LITERAL121=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_terminal2252); if (state.failed) return retval;
21.4887 if ( state.backtracking==0 ) stream_CHAR_LITERAL.add(CHAR_LITERAL121);
21.4888
21.4889 @@ -7174,7 +5682,6 @@
21.4890 root_0 = (CommonTree)adaptor.nil();
21.4891 // 305:27: -> CHAR_LITERAL
21.4892 {
21.4893 - dbg.location(305,30);
21.4894 adaptor.addChild(root_0, stream_CHAR_LITERAL.nextNode());
21.4895
21.4896 }
21.4897 @@ -7183,20 +5690,13 @@
21.4898 }
21.4899 break;
21.4900 case 2 :
21.4901 - dbg.enterAlt(2);
21.4902 -
21.4903 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:307:7: TOKEN_REF ( ARG_ACTION -> ^( TOKEN_REF ARG_ACTION ) | -> TOKEN_REF )
21.4904 {
21.4905 - dbg.location(307,7);
21.4906 TOKEN_REF122=(Token)match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_terminal2274); if (state.failed) return retval;
21.4907 if ( state.backtracking==0 ) stream_TOKEN_REF.add(TOKEN_REF122);
21.4908
21.4909 - dbg.location(308,4);
21.4910 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:308:4: ( ARG_ACTION -> ^( TOKEN_REF ARG_ACTION ) | -> TOKEN_REF )
21.4911 int alt58=2;
21.4912 - try { dbg.enterSubRule(58);
21.4913 - try { dbg.enterDecision(58, decisionCanBacktrack[58]);
21.4914 -
21.4915 int LA58_0 = input.LA(1);
21.4916
21.4917 if ( (LA58_0==ARG_ACTION) ) {
21.4918 @@ -7210,18 +5710,12 @@
21.4919 NoViableAltException nvae =
21.4920 new NoViableAltException("", 58, 0, input);
21.4921
21.4922 - dbg.recognitionException(nvae);
21.4923 throw nvae;
21.4924 }
21.4925 - } finally {dbg.exitDecision(58);}
21.4926 -
21.4927 switch (alt58) {
21.4928 case 1 :
21.4929 - dbg.enterAlt(1);
21.4930 -
21.4931 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:308:6: ARG_ACTION
21.4932 {
21.4933 - dbg.location(308,6);
21.4934 ARG_ACTION123=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_terminal2281); if (state.failed) return retval;
21.4935 if ( state.backtracking==0 ) stream_ARG_ACTION.add(ARG_ACTION123);
21.4936
21.4937 @@ -7241,14 +5735,11 @@
21.4938 root_0 = (CommonTree)adaptor.nil();
21.4939 // 308:20: -> ^( TOKEN_REF ARG_ACTION )
21.4940 {
21.4941 - dbg.location(308,23);
21.4942 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:308:23: ^( TOKEN_REF ARG_ACTION )
21.4943 {
21.4944 CommonTree root_1 = (CommonTree)adaptor.nil();
21.4945 - dbg.location(308,25);
21.4946 root_1 = (CommonTree)adaptor.becomeRoot(stream_TOKEN_REF.nextNode(), root_1);
21.4947
21.4948 - dbg.location(308,35);
21.4949 adaptor.addChild(root_1, stream_ARG_ACTION.nextNode());
21.4950
21.4951 adaptor.addChild(root_0, root_1);
21.4952 @@ -7260,8 +5751,6 @@
21.4953 }
21.4954 break;
21.4955 case 2 :
21.4956 - dbg.enterAlt(2);
21.4957 -
21.4958 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:309:12:
21.4959 {
21.4960
21.4961 @@ -7279,7 +5768,6 @@
21.4962 root_0 = (CommonTree)adaptor.nil();
21.4963 // 309:12: -> TOKEN_REF
21.4964 {
21.4965 - dbg.location(309,15);
21.4966 adaptor.addChild(root_0, stream_TOKEN_REF.nextNode());
21.4967
21.4968 }
21.4969 @@ -7289,17 +5777,13 @@
21.4970 break;
21.4971
21.4972 }
21.4973 - } finally {dbg.exitSubRule(58);}
21.4974
21.4975
21.4976 }
21.4977 break;
21.4978 case 3 :
21.4979 - dbg.enterAlt(3);
21.4980 -
21.4981 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:311:7: STRING_LITERAL
21.4982 {
21.4983 - dbg.location(311,7);
21.4984 STRING_LITERAL124=(Token)match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_terminal2320); if (state.failed) return retval;
21.4985 if ( state.backtracking==0 ) stream_STRING_LITERAL.add(STRING_LITERAL124);
21.4986
21.4987 @@ -7319,7 +5803,6 @@
21.4988 root_0 = (CommonTree)adaptor.nil();
21.4989 // 311:25: -> STRING_LITERAL
21.4990 {
21.4991 - dbg.location(311,28);
21.4992 adaptor.addChild(root_0, stream_STRING_LITERAL.nextNode());
21.4993
21.4994 }
21.4995 @@ -7328,11 +5811,8 @@
21.4996 }
21.4997 break;
21.4998 case 4 :
21.4999 - dbg.enterAlt(4);
21.5000 -
21.5001 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:312:7: '.'
21.5002 {
21.5003 - dbg.location(312,7);
21.5004 char_literal125=(Token)match(input,92,FOLLOW_92_in_terminal2335); if (state.failed) return retval;
21.5005 if ( state.backtracking==0 ) stream_92.add(char_literal125);
21.5006
21.5007 @@ -7352,7 +5832,6 @@
21.5008 root_0 = (CommonTree)adaptor.nil();
21.5009 // 312:17: -> '.'
21.5010 {
21.5011 - dbg.location(312,20);
21.5012 adaptor.addChild(root_0, stream_92.nextNode());
21.5013
21.5014 }
21.5015 @@ -7362,14 +5841,9 @@
21.5016 break;
21.5017
21.5018 }
21.5019 - } finally {dbg.exitSubRule(59);}
21.5020 -
21.5021 - dbg.location(314,3);
21.5022 +
21.5023 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:314:3: ( '^' -> ^( '^' $terminal) | '!' -> ^( '!' $terminal) )?
21.5024 int alt60=3;
21.5025 - try { dbg.enterSubRule(60);
21.5026 - try { dbg.enterDecision(60, decisionCanBacktrack[60]);
21.5027 -
21.5028 int LA60_0 = input.LA(1);
21.5029
21.5030 if ( (LA60_0==ROOT) ) {
21.5031 @@ -7378,15 +5852,10 @@
21.5032 else if ( (LA60_0==BANG) ) {
21.5033 alt60=2;
21.5034 }
21.5035 - } finally {dbg.exitDecision(60);}
21.5036 -
21.5037 switch (alt60) {
21.5038 case 1 :
21.5039 - dbg.enterAlt(1);
21.5040 -
21.5041 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:314:5: '^'
21.5042 {
21.5043 - dbg.location(314,5);
21.5044 char_literal126=(Token)match(input,ROOT,FOLLOW_ROOT_in_terminal2356); if (state.failed) return retval;
21.5045 if ( state.backtracking==0 ) stream_ROOT.add(char_literal126);
21.5046
21.5047 @@ -7406,14 +5875,11 @@
21.5048 root_0 = (CommonTree)adaptor.nil();
21.5049 // 314:15: -> ^( '^' $terminal)
21.5050 {
21.5051 - dbg.location(314,18);
21.5052 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:314:18: ^( '^' $terminal)
21.5053 {
21.5054 CommonTree root_1 = (CommonTree)adaptor.nil();
21.5055 - dbg.location(314,20);
21.5056 root_1 = (CommonTree)adaptor.becomeRoot(stream_ROOT.nextNode(), root_1);
21.5057
21.5058 - dbg.location(314,24);
21.5059 adaptor.addChild(root_1, stream_retval.nextTree());
21.5060
21.5061 adaptor.addChild(root_0, root_1);
21.5062 @@ -7425,11 +5891,8 @@
21.5063 }
21.5064 break;
21.5065 case 2 :
21.5066 - dbg.enterAlt(2);
21.5067 -
21.5068 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:315:5: '!'
21.5069 {
21.5070 - dbg.location(315,5);
21.5071 char_literal127=(Token)match(input,BANG,FOLLOW_BANG_in_terminal2377); if (state.failed) return retval;
21.5072 if ( state.backtracking==0 ) stream_BANG.add(char_literal127);
21.5073
21.5074 @@ -7449,14 +5912,11 @@
21.5075 root_0 = (CommonTree)adaptor.nil();
21.5076 // 315:15: -> ^( '!' $terminal)
21.5077 {
21.5078 - dbg.location(315,18);
21.5079 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:315:18: ^( '!' $terminal)
21.5080 {
21.5081 CommonTree root_1 = (CommonTree)adaptor.nil();
21.5082 - dbg.location(315,20);
21.5083 root_1 = (CommonTree)adaptor.becomeRoot(stream_BANG.nextNode(), root_1);
21.5084
21.5085 - dbg.location(315,24);
21.5086 adaptor.addChild(root_1, stream_retval.nextTree());
21.5087
21.5088 adaptor.addChild(root_0, root_1);
21.5089 @@ -7469,7 +5929,6 @@
21.5090 break;
21.5091
21.5092 }
21.5093 - } finally {dbg.exitSubRule(60);}
21.5094
21.5095
21.5096 }
21.5097 @@ -7490,15 +5949,6 @@
21.5098 }
21.5099 finally {
21.5100 }
21.5101 - dbg.location(317, 2);
21.5102 -
21.5103 - }
21.5104 - finally {
21.5105 - dbg.exitRule(getGrammarFileName(), "terminal");
21.5106 - decRuleLevel();
21.5107 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.5108 - }
21.5109 -
21.5110 return retval;
21.5111 }
21.5112 // $ANTLR end "terminal"
21.5113 @@ -7520,20 +5970,12 @@
21.5114
21.5115 CommonTree set128_tree=null;
21.5116
21.5117 - try { dbg.enterRule(getGrammarFileName(), "notTerminal");
21.5118 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.5119 - incRuleLevel();
21.5120 - dbg.location(319, 1);
21.5121 -
21.5122 try {
21.5123 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:320:2: ( CHAR_LITERAL | TOKEN_REF | STRING_LITERAL )
21.5124 - dbg.enterAlt(1);
21.5125 -
21.5126 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:
21.5127 {
21.5128 root_0 = (CommonTree)adaptor.nil();
21.5129
21.5130 - dbg.location(320,2);
21.5131 set128=(Token)input.LT(1);
21.5132 if ( (input.LA(1)>=TOKEN_REF && input.LA(1)<=CHAR_LITERAL) ) {
21.5133 input.consume();
21.5134 @@ -7543,7 +5985,6 @@
21.5135 else {
21.5136 if (state.backtracking>0) {state.failed=true; return retval;}
21.5137 MismatchedSetException mse = new MismatchedSetException(null,input);
21.5138 - dbg.recognitionException(mse);
21.5139 throw mse;
21.5140 }
21.5141
21.5142 @@ -7566,15 +6007,6 @@
21.5143 }
21.5144 finally {
21.5145 }
21.5146 - dbg.location(323, 2);
21.5147 -
21.5148 - }
21.5149 - finally {
21.5150 - dbg.exitRule(getGrammarFileName(), "notTerminal");
21.5151 - decRuleLevel();
21.5152 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.5153 - }
21.5154 -
21.5155 return retval;
21.5156 }
21.5157 // $ANTLR end "notTerminal"
21.5158 @@ -7606,16 +6038,9 @@
21.5159
21.5160 Token op = input.LT(1);
21.5161
21.5162 - try { dbg.enterRule(getGrammarFileName(), "ebnfSuffix");
21.5163 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.5164 - incRuleLevel();
21.5165 - dbg.location(325, 1);
21.5166 -
21.5167 try {
21.5168 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:329:2: ( '?' -> OPTIONAL[op] | '*' -> CLOSURE[op] | '+' -> POSITIVE_CLOSURE[op] )
21.5169 int alt61=3;
21.5170 - try { dbg.enterDecision(61, decisionCanBacktrack[61]);
21.5171 -
21.5172 switch ( input.LA(1) ) {
21.5173 case 90:
21.5174 {
21.5175 @@ -7637,19 +6062,13 @@
21.5176 NoViableAltException nvae =
21.5177 new NoViableAltException("", 61, 0, input);
21.5178
21.5179 - dbg.recognitionException(nvae);
21.5180 throw nvae;
21.5181 }
21.5182
21.5183 - } finally {dbg.exitDecision(61);}
21.5184 -
21.5185 switch (alt61) {
21.5186 case 1 :
21.5187 - dbg.enterAlt(1);
21.5188 -
21.5189 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:329:4: '?'
21.5190 {
21.5191 - dbg.location(329,4);
21.5192 char_literal129=(Token)match(input,90,FOLLOW_90_in_ebnfSuffix2437); if (state.failed) return retval;
21.5193 if ( state.backtracking==0 ) stream_90.add(char_literal129);
21.5194
21.5195 @@ -7669,7 +6088,6 @@
21.5196 root_0 = (CommonTree)adaptor.nil();
21.5197 // 329:8: -> OPTIONAL[op]
21.5198 {
21.5199 - dbg.location(329,11);
21.5200 adaptor.addChild(root_0, (CommonTree)adaptor.create(OPTIONAL, op));
21.5201
21.5202 }
21.5203 @@ -7678,11 +6096,8 @@
21.5204 }
21.5205 break;
21.5206 case 2 :
21.5207 - dbg.enterAlt(2);
21.5208 -
21.5209 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:330:6: '*'
21.5210 {
21.5211 - dbg.location(330,6);
21.5212 char_literal130=(Token)match(input,74,FOLLOW_74_in_ebnfSuffix2449); if (state.failed) return retval;
21.5213 if ( state.backtracking==0 ) stream_74.add(char_literal130);
21.5214
21.5215 @@ -7702,7 +6117,6 @@
21.5216 root_0 = (CommonTree)adaptor.nil();
21.5217 // 330:10: -> CLOSURE[op]
21.5218 {
21.5219 - dbg.location(330,13);
21.5220 adaptor.addChild(root_0, (CommonTree)adaptor.create(CLOSURE, op));
21.5221
21.5222 }
21.5223 @@ -7711,11 +6125,8 @@
21.5224 }
21.5225 break;
21.5226 case 3 :
21.5227 - dbg.enterAlt(3);
21.5228 -
21.5229 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:331:7: '+'
21.5230 {
21.5231 - dbg.location(331,7);
21.5232 char_literal131=(Token)match(input,91,FOLLOW_91_in_ebnfSuffix2462); if (state.failed) return retval;
21.5233 if ( state.backtracking==0 ) stream_91.add(char_literal131);
21.5234
21.5235 @@ -7735,7 +6146,6 @@
21.5236 root_0 = (CommonTree)adaptor.nil();
21.5237 // 331:11: -> POSITIVE_CLOSURE[op]
21.5238 {
21.5239 - dbg.location(331,14);
21.5240 adaptor.addChild(root_0, (CommonTree)adaptor.create(POSITIVE_CLOSURE, op));
21.5241
21.5242 }
21.5243 @@ -7761,15 +6171,6 @@
21.5244 }
21.5245 finally {
21.5246 }
21.5247 - dbg.location(332, 2);
21.5248 -
21.5249 - }
21.5250 - finally {
21.5251 - dbg.exitRule(getGrammarFileName(), "ebnfSuffix");
21.5252 - decRuleLevel();
21.5253 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.5254 - }
21.5255 -
21.5256 return retval;
21.5257 }
21.5258 // $ANTLR end "ebnfSuffix"
21.5259 @@ -7805,16 +6206,9 @@
21.5260
21.5261 Token firstToken = input.LT(1);
21.5262
21.5263 - try { dbg.enterRule(getGrammarFileName(), "rewrite");
21.5264 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.5265 - incRuleLevel();
21.5266 - dbg.location(338, 1);
21.5267 -
21.5268 try {
21.5269 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:342:2: ( (rew+= '->' preds+= SEMPRED predicated+= rewrite_alternative )* rew2= '->' last= rewrite_alternative -> ( ^( $rew $preds $predicated) )* ^( $rew2 $last) | )
21.5270 int alt63=2;
21.5271 - try { dbg.enterDecision(63, decisionCanBacktrack[63]);
21.5272 -
21.5273 int LA63_0 = input.LA(1);
21.5274
21.5275 if ( (LA63_0==REWRITE) ) {
21.5276 @@ -7828,26 +6222,16 @@
21.5277 NoViableAltException nvae =
21.5278 new NoViableAltException("", 63, 0, input);
21.5279
21.5280 - dbg.recognitionException(nvae);
21.5281 throw nvae;
21.5282 }
21.5283 - } finally {dbg.exitDecision(63);}
21.5284 -
21.5285 switch (alt63) {
21.5286 case 1 :
21.5287 - dbg.enterAlt(1);
21.5288 -
21.5289 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:342:4: (rew+= '->' preds+= SEMPRED predicated+= rewrite_alternative )* rew2= '->' last= rewrite_alternative
21.5290 {
21.5291 - dbg.location(342,4);
21.5292 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:342:4: (rew+= '->' preds+= SEMPRED predicated+= rewrite_alternative )*
21.5293 - try { dbg.enterSubRule(62);
21.5294 -
21.5295 loop62:
21.5296 do {
21.5297 int alt62=2;
21.5298 - try { dbg.enterDecision(62, decisionCanBacktrack[62]);
21.5299 -
21.5300 int LA62_0 = input.LA(1);
21.5301
21.5302 if ( (LA62_0==REWRITE) ) {
21.5303 @@ -7861,29 +6245,22 @@
21.5304 }
21.5305
21.5306
21.5307 - } finally {dbg.exitDecision(62);}
21.5308 -
21.5309 switch (alt62) {
21.5310 case 1 :
21.5311 - dbg.enterAlt(1);
21.5312 -
21.5313 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:342:5: rew+= '->' preds+= SEMPRED predicated+= rewrite_alternative
21.5314 {
21.5315 - dbg.location(342,8);
21.5316 rew=(Token)match(input,REWRITE,FOLLOW_REWRITE_in_rewrite2491); if (state.failed) return retval;
21.5317 if ( state.backtracking==0 ) stream_REWRITE.add(rew);
21.5318
21.5319 if (list_rew==null) list_rew=new ArrayList();
21.5320 list_rew.add(rew);
21.5321
21.5322 - dbg.location(342,20);
21.5323 preds=(Token)match(input,SEMPRED,FOLLOW_SEMPRED_in_rewrite2495); if (state.failed) return retval;
21.5324 if ( state.backtracking==0 ) stream_SEMPRED.add(preds);
21.5325
21.5326 if (list_preds==null) list_preds=new ArrayList();
21.5327 list_preds.add(preds);
21.5328
21.5329 - dbg.location(342,40);
21.5330 pushFollow(FOLLOW_rewrite_alternative_in_rewrite2499);
21.5331 predicated=rewrite_alternative();
21.5332
21.5333 @@ -7901,13 +6278,10 @@
21.5334 break loop62;
21.5335 }
21.5336 } while (true);
21.5337 - } finally {dbg.exitSubRule(62);}
21.5338 -
21.5339 - dbg.location(343,7);
21.5340 +
21.5341 rew2=(Token)match(input,REWRITE,FOLLOW_REWRITE_in_rewrite2507); if (state.failed) return retval;
21.5342 if ( state.backtracking==0 ) stream_REWRITE.add(rew2);
21.5343
21.5344 - dbg.location(343,17);
21.5345 pushFollow(FOLLOW_rewrite_alternative_in_rewrite2511);
21.5346 last=rewrite_alternative();
21.5347
21.5348 @@ -7917,7 +6291,7 @@
21.5349
21.5350
21.5351 // AST REWRITE
21.5352 - // elements: predicated, preds, last, rew, rew2
21.5353 + // elements: rew, last, preds, rew2, predicated
21.5354 // token labels: rew2
21.5355 // rule labels: retval, last
21.5356 // token list labels: rew, preds
21.5357 @@ -7934,36 +6308,28 @@
21.5358 root_0 = (CommonTree)adaptor.nil();
21.5359 // 344:9: -> ( ^( $rew $preds $predicated) )* ^( $rew2 $last)
21.5360 {
21.5361 - dbg.location(344,12);
21.5362 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:344:12: ( ^( $rew $preds $predicated) )*
21.5363 - while ( stream_predicated.hasNext()||stream_preds.hasNext()||stream_rew.hasNext() ) {
21.5364 - dbg.location(344,12);
21.5365 + while ( stream_rew.hasNext()||stream_preds.hasNext()||stream_predicated.hasNext() ) {
21.5366 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:344:12: ^( $rew $preds $predicated)
21.5367 {
21.5368 CommonTree root_1 = (CommonTree)adaptor.nil();
21.5369 - dbg.location(344,14);
21.5370 root_1 = (CommonTree)adaptor.becomeRoot(stream_rew.nextNode(), root_1);
21.5371
21.5372 - dbg.location(344,19);
21.5373 adaptor.addChild(root_1, stream_preds.nextNode());
21.5374 - dbg.location(344,26);
21.5375 adaptor.addChild(root_1, stream_predicated.nextTree());
21.5376
21.5377 adaptor.addChild(root_0, root_1);
21.5378 }
21.5379
21.5380 }
21.5381 + stream_rew.reset();
21.5382 + stream_preds.reset();
21.5383 stream_predicated.reset();
21.5384 - stream_preds.reset();
21.5385 - stream_rew.reset();
21.5386 - dbg.location(344,40);
21.5387 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:344:40: ^( $rew2 $last)
21.5388 {
21.5389 CommonTree root_1 = (CommonTree)adaptor.nil();
21.5390 - dbg.location(344,42);
21.5391 root_1 = (CommonTree)adaptor.becomeRoot(stream_rew2.nextNode(), root_1);
21.5392
21.5393 - dbg.location(344,48);
21.5394 adaptor.addChild(root_1, stream_last.nextTree());
21.5395
21.5396 adaptor.addChild(root_0, root_1);
21.5397 @@ -7975,8 +6341,6 @@
21.5398 }
21.5399 break;
21.5400 case 2 :
21.5401 - dbg.enterAlt(2);
21.5402 -
21.5403 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:346:2:
21.5404 {
21.5405 root_0 = (CommonTree)adaptor.nil();
21.5406 @@ -8001,15 +6365,6 @@
21.5407 }
21.5408 finally {
21.5409 }
21.5410 - dbg.location(346, 2);
21.5411 -
21.5412 - }
21.5413 - finally {
21.5414 - dbg.exitRule(getGrammarFileName(), "rewrite");
21.5415 - decRuleLevel();
21.5416 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.5417 - }
21.5418 -
21.5419 return retval;
21.5420 }
21.5421 // $ANTLR end "rewrite"
21.5422 @@ -8033,35 +6388,16 @@
21.5423
21.5424
21.5425
21.5426 - try { dbg.enterRule(getGrammarFileName(), "rewrite_alternative");
21.5427 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.5428 - incRuleLevel();
21.5429 - dbg.location(348, 1);
21.5430 -
21.5431 try {
21.5432 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:350:2: ( rewrite_template | rewrite_tree_alternative | -> ^( ALT[\"ALT\"] EPSILON[\"EPSILON\"] EOA[\"EOA\"] ) )
21.5433 int alt64=3;
21.5434 - try { dbg.enterDecision(64, decisionCanBacktrack[64]);
21.5435 -
21.5436 - try {
21.5437 - isCyclicDecision = true;
21.5438 - alt64 = dfa64.predict(input);
21.5439 - }
21.5440 - catch (NoViableAltException nvae) {
21.5441 - dbg.recognitionException(nvae);
21.5442 - throw nvae;
21.5443 - }
21.5444 - } finally {dbg.exitDecision(64);}
21.5445 -
21.5446 + alt64 = dfa64.predict(input);
21.5447 switch (alt64) {
21.5448 case 1 :
21.5449 - dbg.enterAlt(1);
21.5450 -
21.5451 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:350:4: rewrite_template
21.5452 {
21.5453 root_0 = (CommonTree)adaptor.nil();
21.5454
21.5455 - dbg.location(350,4);
21.5456 pushFollow(FOLLOW_rewrite_template_in_rewrite_alternative2562);
21.5457 rewrite_template132=rewrite_template();
21.5458
21.5459 @@ -8072,13 +6408,10 @@
21.5460 }
21.5461 break;
21.5462 case 2 :
21.5463 - dbg.enterAlt(2);
21.5464 -
21.5465 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:351:4: rewrite_tree_alternative
21.5466 {
21.5467 root_0 = (CommonTree)adaptor.nil();
21.5468
21.5469 - dbg.location(351,4);
21.5470 pushFollow(FOLLOW_rewrite_tree_alternative_in_rewrite_alternative2567);
21.5471 rewrite_tree_alternative133=rewrite_tree_alternative();
21.5472
21.5473 @@ -8089,8 +6422,6 @@
21.5474 }
21.5475 break;
21.5476 case 3 :
21.5477 - dbg.enterAlt(3);
21.5478 -
21.5479 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:352:29:
21.5480 {
21.5481
21.5482 @@ -8108,16 +6439,12 @@
21.5483 root_0 = (CommonTree)adaptor.nil();
21.5484 // 352:29: -> ^( ALT[\"ALT\"] EPSILON[\"EPSILON\"] EOA[\"EOA\"] )
21.5485 {
21.5486 - dbg.location(352,32);
21.5487 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:352:32: ^( ALT[\"ALT\"] EPSILON[\"EPSILON\"] EOA[\"EOA\"] )
21.5488 {
21.5489 CommonTree root_1 = (CommonTree)adaptor.nil();
21.5490 - dbg.location(352,34);
21.5491 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ALT, "ALT"), root_1);
21.5492
21.5493 - dbg.location(352,45);
21.5494 adaptor.addChild(root_1, (CommonTree)adaptor.create(EPSILON, "EPSILON"));
21.5495 - dbg.location(352,64);
21.5496 adaptor.addChild(root_1, (CommonTree)adaptor.create(EOA, "EOA"));
21.5497
21.5498 adaptor.addChild(root_0, root_1);
21.5499 @@ -8146,15 +6473,6 @@
21.5500 }
21.5501 finally {
21.5502 }
21.5503 - dbg.location(353, 2);
21.5504 -
21.5505 - }
21.5506 - finally {
21.5507 - dbg.exitRule(getGrammarFileName(), "rewrite_alternative");
21.5508 - decRuleLevel();
21.5509 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.5510 - }
21.5511 -
21.5512 return retval;
21.5513 }
21.5514 // $ANTLR end "rewrite_alternative"
21.5515 @@ -8182,29 +6500,19 @@
21.5516 RewriteRuleTokenStream stream_82=new RewriteRuleTokenStream(adaptor,"token 82");
21.5517 RewriteRuleTokenStream stream_84=new RewriteRuleTokenStream(adaptor,"token 84");
21.5518 RewriteRuleSubtreeStream stream_rewrite_tree_alternative=new RewriteRuleSubtreeStream(adaptor,"rule rewrite_tree_alternative");
21.5519 - try { dbg.enterRule(getGrammarFileName(), "rewrite_tree_block");
21.5520 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.5521 - incRuleLevel();
21.5522 - dbg.location(355, 1);
21.5523 -
21.5524 try {
21.5525 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:356:5: (lp= '(' rewrite_tree_alternative ')' -> ^( BLOCK[$lp,\"BLOCK\"] rewrite_tree_alternative EOB[$lp,\"EOB\"] ) )
21.5526 - dbg.enterAlt(1);
21.5527 -
21.5528 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:356:9: lp= '(' rewrite_tree_alternative ')'
21.5529 {
21.5530 - dbg.location(356,11);
21.5531 lp=(Token)match(input,82,FOLLOW_82_in_rewrite_tree_block2609); if (state.failed) return retval;
21.5532 if ( state.backtracking==0 ) stream_82.add(lp);
21.5533
21.5534 - dbg.location(356,16);
21.5535 pushFollow(FOLLOW_rewrite_tree_alternative_in_rewrite_tree_block2611);
21.5536 rewrite_tree_alternative134=rewrite_tree_alternative();
21.5537
21.5538 state._fsp--;
21.5539 if (state.failed) return retval;
21.5540 if ( state.backtracking==0 ) stream_rewrite_tree_alternative.add(rewrite_tree_alternative134.getTree());
21.5541 - dbg.location(356,41);
21.5542 char_literal135=(Token)match(input,84,FOLLOW_84_in_rewrite_tree_block2613); if (state.failed) return retval;
21.5543 if ( state.backtracking==0 ) stream_84.add(char_literal135);
21.5544
21.5545 @@ -8224,16 +6532,12 @@
21.5546 root_0 = (CommonTree)adaptor.nil();
21.5547 // 357:6: -> ^( BLOCK[$lp,\"BLOCK\"] rewrite_tree_alternative EOB[$lp,\"EOB\"] )
21.5548 {
21.5549 - dbg.location(357,9);
21.5550 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:357:9: ^( BLOCK[$lp,\"BLOCK\"] rewrite_tree_alternative EOB[$lp,\"EOB\"] )
21.5551 {
21.5552 CommonTree root_1 = (CommonTree)adaptor.nil();
21.5553 - dbg.location(357,11);
21.5554 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(BLOCK, lp, "BLOCK"), root_1);
21.5555
21.5556 - dbg.location(357,30);
21.5557 adaptor.addChild(root_1, stream_rewrite_tree_alternative.nextTree());
21.5558 - dbg.location(357,55);
21.5559 adaptor.addChild(root_1, (CommonTree)adaptor.create(EOB, lp, "EOB"));
21.5560
21.5561 adaptor.addChild(root_0, root_1);
21.5562 @@ -8260,15 +6564,6 @@
21.5563 }
21.5564 finally {
21.5565 }
21.5566 - dbg.location(358, 5);
21.5567 -
21.5568 - }
21.5569 - finally {
21.5570 - dbg.exitRule(getGrammarFileName(), "rewrite_tree_block");
21.5571 - decRuleLevel();
21.5572 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.5573 - }
21.5574 -
21.5575 return retval;
21.5576 }
21.5577 // $ANTLR end "rewrite_tree_block"
21.5578 @@ -8290,27 +6585,15 @@
21.5579
21.5580
21.5581 RewriteRuleSubtreeStream stream_rewrite_tree_element=new RewriteRuleSubtreeStream(adaptor,"rule rewrite_tree_element");
21.5582 - try { dbg.enterRule(getGrammarFileName(), "rewrite_tree_alternative");
21.5583 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.5584 - incRuleLevel();
21.5585 - dbg.location(360, 1);
21.5586 -
21.5587 try {
21.5588 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:361:5: ( ( rewrite_tree_element )+ -> ^( ALT[\"ALT\"] ( rewrite_tree_element )+ EOA[\"EOA\"] ) )
21.5589 - dbg.enterAlt(1);
21.5590 -
21.5591 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:361:7: ( rewrite_tree_element )+
21.5592 {
21.5593 - dbg.location(361,7);
21.5594 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:361:7: ( rewrite_tree_element )+
21.5595 int cnt65=0;
21.5596 - try { dbg.enterSubRule(65);
21.5597 -
21.5598 loop65:
21.5599 do {
21.5600 int alt65=2;
21.5601 - try { dbg.enterDecision(65, decisionCanBacktrack[65]);
21.5602 -
21.5603 int LA65_0 = input.LA(1);
21.5604
21.5605 if ( (LA65_0==TREE_BEGIN||(LA65_0>=TOKEN_REF && LA65_0<=ACTION)||LA65_0==RULE_REF||LA65_0==82||LA65_0==93) ) {
21.5606 @@ -8318,15 +6601,10 @@
21.5607 }
21.5608
21.5609
21.5610 - } finally {dbg.exitDecision(65);}
21.5611 -
21.5612 switch (alt65) {
21.5613 case 1 :
21.5614 - dbg.enterAlt(1);
21.5615 -
21.5616 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:361:7: rewrite_tree_element
21.5617 {
21.5618 - dbg.location(361,7);
21.5619 pushFollow(FOLLOW_rewrite_tree_element_in_rewrite_tree_alternative2647);
21.5620 rewrite_tree_element136=rewrite_tree_element();
21.5621
21.5622 @@ -8342,13 +6620,10 @@
21.5623 if (state.backtracking>0) {state.failed=true; return retval;}
21.5624 EarlyExitException eee =
21.5625 new EarlyExitException(65, input);
21.5626 - dbg.recognitionException(eee);
21.5627 -
21.5628 throw eee;
21.5629 }
21.5630 cnt65++;
21.5631 } while (true);
21.5632 - } finally {dbg.exitSubRule(65);}
21.5633
21.5634
21.5635
21.5636 @@ -8366,24 +6641,19 @@
21.5637 root_0 = (CommonTree)adaptor.nil();
21.5638 // 361:29: -> ^( ALT[\"ALT\"] ( rewrite_tree_element )+ EOA[\"EOA\"] )
21.5639 {
21.5640 - dbg.location(361,32);
21.5641 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:361:32: ^( ALT[\"ALT\"] ( rewrite_tree_element )+ EOA[\"EOA\"] )
21.5642 {
21.5643 CommonTree root_1 = (CommonTree)adaptor.nil();
21.5644 - dbg.location(361,34);
21.5645 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ALT, "ALT"), root_1);
21.5646
21.5647 - dbg.location(361,45);
21.5648 if ( !(stream_rewrite_tree_element.hasNext()) ) {
21.5649 throw new RewriteEarlyExitException();
21.5650 }
21.5651 while ( stream_rewrite_tree_element.hasNext() ) {
21.5652 - dbg.location(361,45);
21.5653 adaptor.addChild(root_1, stream_rewrite_tree_element.nextTree());
21.5654
21.5655 }
21.5656 stream_rewrite_tree_element.reset();
21.5657 - dbg.location(361,67);
21.5658 adaptor.addChild(root_1, (CommonTree)adaptor.create(EOA, "EOA"));
21.5659
21.5660 adaptor.addChild(root_0, root_1);
21.5661 @@ -8410,15 +6680,6 @@
21.5662 }
21.5663 finally {
21.5664 }
21.5665 - dbg.location(362, 5);
21.5666 -
21.5667 - }
21.5668 - finally {
21.5669 - dbg.exitRule(getGrammarFileName(), "rewrite_tree_alternative");
21.5670 - decRuleLevel();
21.5671 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.5672 - }
21.5673 -
21.5674 return retval;
21.5675 }
21.5676 // $ANTLR end "rewrite_tree_alternative"
21.5677 @@ -8452,35 +6713,16 @@
21.5678 RewriteRuleSubtreeStream stream_rewrite_tree=new RewriteRuleSubtreeStream(adaptor,"rule rewrite_tree");
21.5679 RewriteRuleSubtreeStream stream_ebnfSuffix=new RewriteRuleSubtreeStream(adaptor,"rule ebnfSuffix");
21.5680 RewriteRuleSubtreeStream stream_rewrite_tree_atom=new RewriteRuleSubtreeStream(adaptor,"rule rewrite_tree_atom");
21.5681 - try { dbg.enterRule(getGrammarFileName(), "rewrite_tree_element");
21.5682 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.5683 - incRuleLevel();
21.5684 - dbg.location(364, 1);
21.5685 -
21.5686 try {
21.5687 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:365:2: ( rewrite_tree_atom | rewrite_tree_atom ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] rewrite_tree_atom EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | rewrite_tree ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] rewrite_tree EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> rewrite_tree ) | rewrite_tree_ebnf )
21.5688 int alt67=4;
21.5689 - try { dbg.enterDecision(67, decisionCanBacktrack[67]);
21.5690 -
21.5691 - try {
21.5692 - isCyclicDecision = true;
21.5693 - alt67 = dfa67.predict(input);
21.5694 - }
21.5695 - catch (NoViableAltException nvae) {
21.5696 - dbg.recognitionException(nvae);
21.5697 - throw nvae;
21.5698 - }
21.5699 - } finally {dbg.exitDecision(67);}
21.5700 -
21.5701 + alt67 = dfa67.predict(input);
21.5702 switch (alt67) {
21.5703 case 1 :
21.5704 - dbg.enterAlt(1);
21.5705 -
21.5706 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:365:4: rewrite_tree_atom
21.5707 {
21.5708 root_0 = (CommonTree)adaptor.nil();
21.5709
21.5710 - dbg.location(365,4);
21.5711 pushFollow(FOLLOW_rewrite_tree_atom_in_rewrite_tree_element2675);
21.5712 rewrite_tree_atom137=rewrite_tree_atom();
21.5713
21.5714 @@ -8491,18 +6733,14 @@
21.5715 }
21.5716 break;
21.5717 case 2 :
21.5718 - dbg.enterAlt(2);
21.5719 -
21.5720 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:366:4: rewrite_tree_atom ebnfSuffix
21.5721 {
21.5722 - dbg.location(366,4);
21.5723 pushFollow(FOLLOW_rewrite_tree_atom_in_rewrite_tree_element2680);
21.5724 rewrite_tree_atom138=rewrite_tree_atom();
21.5725
21.5726 state._fsp--;
21.5727 if (state.failed) return retval;
21.5728 if ( state.backtracking==0 ) stream_rewrite_tree_atom.add(rewrite_tree_atom138.getTree());
21.5729 - dbg.location(366,22);
21.5730 pushFollow(FOLLOW_ebnfSuffix_in_rewrite_tree_element2682);
21.5731 ebnfSuffix139=ebnfSuffix();
21.5732
21.5733 @@ -8512,7 +6750,7 @@
21.5734
21.5735
21.5736 // AST REWRITE
21.5737 - // elements: rewrite_tree_atom, ebnfSuffix
21.5738 + // elements: ebnfSuffix, rewrite_tree_atom
21.5739 // token labels:
21.5740 // rule labels: retval
21.5741 // token list labels:
21.5742 @@ -8525,35 +6763,26 @@
21.5743 root_0 = (CommonTree)adaptor.nil();
21.5744 // 367:3: -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] rewrite_tree_atom EOA[\"EOA\"] ) EOB[\"EOB\"] ) )
21.5745 {
21.5746 - dbg.location(367,6);
21.5747 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:367:6: ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] rewrite_tree_atom EOA[\"EOA\"] ) EOB[\"EOB\"] ) )
21.5748 {
21.5749 CommonTree root_1 = (CommonTree)adaptor.nil();
21.5750 - dbg.location(367,9);
21.5751 root_1 = (CommonTree)adaptor.becomeRoot(stream_ebnfSuffix.nextNode(), root_1);
21.5752
21.5753 - dbg.location(367,20);
21.5754 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:367:20: ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] rewrite_tree_atom EOA[\"EOA\"] ) EOB[\"EOB\"] )
21.5755 {
21.5756 CommonTree root_2 = (CommonTree)adaptor.nil();
21.5757 - dbg.location(367,22);
21.5758 root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(BLOCK, "BLOCK"), root_2);
21.5759
21.5760 - dbg.location(367,37);
21.5761 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:367:37: ^( ALT[\"ALT\"] rewrite_tree_atom EOA[\"EOA\"] )
21.5762 {
21.5763 CommonTree root_3 = (CommonTree)adaptor.nil();
21.5764 - dbg.location(367,39);
21.5765 root_3 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ALT, "ALT"), root_3);
21.5766
21.5767 - dbg.location(367,50);
21.5768 adaptor.addChild(root_3, stream_rewrite_tree_atom.nextTree());
21.5769 - dbg.location(367,68);
21.5770 adaptor.addChild(root_3, (CommonTree)adaptor.create(EOA, "EOA"));
21.5771
21.5772 adaptor.addChild(root_2, root_3);
21.5773 }
21.5774 - dbg.location(367,80);
21.5775 adaptor.addChild(root_2, (CommonTree)adaptor.create(EOB, "EOB"));
21.5776
21.5777 adaptor.addChild(root_1, root_2);
21.5778 @@ -8568,23 +6797,16 @@
21.5779 }
21.5780 break;
21.5781 case 3 :
21.5782 - dbg.enterAlt(3);
21.5783 -
21.5784 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:368:6: rewrite_tree ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] rewrite_tree EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> rewrite_tree )
21.5785 {
21.5786 - dbg.location(368,6);
21.5787 pushFollow(FOLLOW_rewrite_tree_in_rewrite_tree_element2716);
21.5788 rewrite_tree140=rewrite_tree();
21.5789
21.5790 state._fsp--;
21.5791 if (state.failed) return retval;
21.5792 if ( state.backtracking==0 ) stream_rewrite_tree.add(rewrite_tree140.getTree());
21.5793 - dbg.location(369,3);
21.5794 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:369:3: ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] rewrite_tree EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> rewrite_tree )
21.5795 int alt66=2;
21.5796 - try { dbg.enterSubRule(66);
21.5797 - try { dbg.enterDecision(66, decisionCanBacktrack[66]);
21.5798 -
21.5799 int LA66_0 = input.LA(1);
21.5800
21.5801 if ( (LA66_0==74||(LA66_0>=90 && LA66_0<=91)) ) {
21.5802 @@ -8598,18 +6820,12 @@
21.5803 NoViableAltException nvae =
21.5804 new NoViableAltException("", 66, 0, input);
21.5805
21.5806 - dbg.recognitionException(nvae);
21.5807 throw nvae;
21.5808 }
21.5809 - } finally {dbg.exitDecision(66);}
21.5810 -
21.5811 switch (alt66) {
21.5812 case 1 :
21.5813 - dbg.enterAlt(1);
21.5814 -
21.5815 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:369:5: ebnfSuffix
21.5816 {
21.5817 - dbg.location(369,5);
21.5818 pushFollow(FOLLOW_ebnfSuffix_in_rewrite_tree_element2722);
21.5819 ebnfSuffix141=ebnfSuffix();
21.5820
21.5821 @@ -8619,7 +6835,7 @@
21.5822
21.5823
21.5824 // AST REWRITE
21.5825 - // elements: ebnfSuffix, rewrite_tree
21.5826 + // elements: rewrite_tree, ebnfSuffix
21.5827 // token labels:
21.5828 // rule labels: retval
21.5829 // token list labels:
21.5830 @@ -8632,35 +6848,26 @@
21.5831 root_0 = (CommonTree)adaptor.nil();
21.5832 // 370:4: -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] rewrite_tree EOA[\"EOA\"] ) EOB[\"EOB\"] ) )
21.5833 {
21.5834 - dbg.location(370,7);
21.5835 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:370:7: ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] rewrite_tree EOA[\"EOA\"] ) EOB[\"EOB\"] ) )
21.5836 {
21.5837 CommonTree root_1 = (CommonTree)adaptor.nil();
21.5838 - dbg.location(370,9);
21.5839 root_1 = (CommonTree)adaptor.becomeRoot(stream_ebnfSuffix.nextNode(), root_1);
21.5840
21.5841 - dbg.location(370,20);
21.5842 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:370:20: ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] rewrite_tree EOA[\"EOA\"] ) EOB[\"EOB\"] )
21.5843 {
21.5844 CommonTree root_2 = (CommonTree)adaptor.nil();
21.5845 - dbg.location(370,22);
21.5846 root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(BLOCK, "BLOCK"), root_2);
21.5847
21.5848 - dbg.location(370,37);
21.5849 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:370:37: ^( ALT[\"ALT\"] rewrite_tree EOA[\"EOA\"] )
21.5850 {
21.5851 CommonTree root_3 = (CommonTree)adaptor.nil();
21.5852 - dbg.location(370,39);
21.5853 root_3 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ALT, "ALT"), root_3);
21.5854
21.5855 - dbg.location(370,50);
21.5856 adaptor.addChild(root_3, stream_rewrite_tree.nextTree());
21.5857 - dbg.location(370,63);
21.5858 adaptor.addChild(root_3, (CommonTree)adaptor.create(EOA, "EOA"));
21.5859
21.5860 adaptor.addChild(root_2, root_3);
21.5861 }
21.5862 - dbg.location(370,75);
21.5863 adaptor.addChild(root_2, (CommonTree)adaptor.create(EOB, "EOB"));
21.5864
21.5865 adaptor.addChild(root_1, root_2);
21.5866 @@ -8675,8 +6882,6 @@
21.5867 }
21.5868 break;
21.5869 case 2 :
21.5870 - dbg.enterAlt(2);
21.5871 -
21.5872 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:371:5:
21.5873 {
21.5874
21.5875 @@ -8694,7 +6899,6 @@
21.5876 root_0 = (CommonTree)adaptor.nil();
21.5877 // 371:5: -> rewrite_tree
21.5878 {
21.5879 - dbg.location(371,8);
21.5880 adaptor.addChild(root_0, stream_rewrite_tree.nextTree());
21.5881
21.5882 }
21.5883 @@ -8704,19 +6908,15 @@
21.5884 break;
21.5885
21.5886 }
21.5887 - } finally {dbg.exitSubRule(66);}
21.5888
21.5889
21.5890 }
21.5891 break;
21.5892 case 4 :
21.5893 - dbg.enterAlt(4);
21.5894 -
21.5895 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:373:6: rewrite_tree_ebnf
21.5896 {
21.5897 root_0 = (CommonTree)adaptor.nil();
21.5898
21.5899 - dbg.location(373,6);
21.5900 pushFollow(FOLLOW_rewrite_tree_ebnf_in_rewrite_tree_element2768);
21.5901 rewrite_tree_ebnf142=rewrite_tree_ebnf();
21.5902
21.5903 @@ -8744,15 +6944,6 @@
21.5904 }
21.5905 finally {
21.5906 }
21.5907 - dbg.location(374, 2);
21.5908 -
21.5909 - }
21.5910 - finally {
21.5911 - dbg.exitRule(getGrammarFileName(), "rewrite_tree_element");
21.5912 - decRuleLevel();
21.5913 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.5914 - }
21.5915 -
21.5916 return retval;
21.5917 }
21.5918 // $ANTLR end "rewrite_tree_element"
21.5919 @@ -8791,16 +6982,9 @@
21.5920 RewriteRuleTokenStream stream_TOKEN_REF=new RewriteRuleTokenStream(adaptor,"token TOKEN_REF");
21.5921 RewriteRuleTokenStream stream_ARG_ACTION=new RewriteRuleTokenStream(adaptor,"token ARG_ACTION");
21.5922 RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,"rule id");
21.5923 - try { dbg.enterRule(getGrammarFileName(), "rewrite_tree_atom");
21.5924 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.5925 - incRuleLevel();
21.5926 - dbg.location(376, 1);
21.5927 -
21.5928 try {
21.5929 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:377:5: ( CHAR_LITERAL | TOKEN_REF ( ARG_ACTION )? -> ^( TOKEN_REF ( ARG_ACTION )? ) | RULE_REF | STRING_LITERAL | d= '$' id -> LABEL[$d,$id.text] | ACTION )
21.5930 int alt69=6;
21.5931 - try { dbg.enterDecision(69, decisionCanBacktrack[69]);
21.5932 -
21.5933 switch ( input.LA(1) ) {
21.5934 case CHAR_LITERAL:
21.5935 {
21.5936 @@ -8837,21 +7021,15 @@
21.5937 NoViableAltException nvae =
21.5938 new NoViableAltException("", 69, 0, input);
21.5939
21.5940 - dbg.recognitionException(nvae);
21.5941 throw nvae;
21.5942 }
21.5943
21.5944 - } finally {dbg.exitDecision(69);}
21.5945 -
21.5946 switch (alt69) {
21.5947 case 1 :
21.5948 - dbg.enterAlt(1);
21.5949 -
21.5950 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:377:9: CHAR_LITERAL
21.5951 {
21.5952 root_0 = (CommonTree)adaptor.nil();
21.5953
21.5954 - dbg.location(377,9);
21.5955 CHAR_LITERAL143=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_rewrite_tree_atom2784); if (state.failed) return retval;
21.5956 if ( state.backtracking==0 ) {
21.5957 CHAR_LITERAL143_tree = (CommonTree)adaptor.create(CHAR_LITERAL143);
21.5958 @@ -8861,34 +7039,22 @@
21.5959 }
21.5960 break;
21.5961 case 2 :
21.5962 - dbg.enterAlt(2);
21.5963 -
21.5964 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:378:6: TOKEN_REF ( ARG_ACTION )?
21.5965 {
21.5966 - dbg.location(378,6);
21.5967 TOKEN_REF144=(Token)match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_rewrite_tree_atom2791); if (state.failed) return retval;
21.5968 if ( state.backtracking==0 ) stream_TOKEN_REF.add(TOKEN_REF144);
21.5969
21.5970 - dbg.location(378,16);
21.5971 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:378:16: ( ARG_ACTION )?
21.5972 int alt68=2;
21.5973 - try { dbg.enterSubRule(68);
21.5974 - try { dbg.enterDecision(68, decisionCanBacktrack[68]);
21.5975 -
21.5976 int LA68_0 = input.LA(1);
21.5977
21.5978 if ( (LA68_0==ARG_ACTION) ) {
21.5979 alt68=1;
21.5980 }
21.5981 - } finally {dbg.exitDecision(68);}
21.5982 -
21.5983 switch (alt68) {
21.5984 case 1 :
21.5985 - dbg.enterAlt(1);
21.5986 -
21.5987 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:378:16: ARG_ACTION
21.5988 {
21.5989 - dbg.location(378,16);
21.5990 ARG_ACTION145=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rewrite_tree_atom2793); if (state.failed) return retval;
21.5991 if ( state.backtracking==0 ) stream_ARG_ACTION.add(ARG_ACTION145);
21.5992
21.5993 @@ -8897,12 +7063,11 @@
21.5994 break;
21.5995
21.5996 }
21.5997 - } finally {dbg.exitSubRule(68);}
21.5998
21.5999
21.6000
21.6001 // AST REWRITE
21.6002 - // elements: ARG_ACTION, TOKEN_REF
21.6003 + // elements: TOKEN_REF, ARG_ACTION
21.6004 // token labels:
21.6005 // rule labels: retval
21.6006 // token list labels:
21.6007 @@ -8915,17 +7080,13 @@
21.6008 root_0 = (CommonTree)adaptor.nil();
21.6009 // 378:28: -> ^( TOKEN_REF ( ARG_ACTION )? )
21.6010 {
21.6011 - dbg.location(378,31);
21.6012 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:378:31: ^( TOKEN_REF ( ARG_ACTION )? )
21.6013 {
21.6014 CommonTree root_1 = (CommonTree)adaptor.nil();
21.6015 - dbg.location(378,33);
21.6016 root_1 = (CommonTree)adaptor.becomeRoot(stream_TOKEN_REF.nextNode(), root_1);
21.6017
21.6018 - dbg.location(378,43);
21.6019 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:378:43: ( ARG_ACTION )?
21.6020 if ( stream_ARG_ACTION.hasNext() ) {
21.6021 - dbg.location(378,43);
21.6022 adaptor.addChild(root_1, stream_ARG_ACTION.nextNode());
21.6023
21.6024 }
21.6025 @@ -8940,13 +7101,10 @@
21.6026 }
21.6027 break;
21.6028 case 3 :
21.6029 - dbg.enterAlt(3);
21.6030 -
21.6031 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:379:9: RULE_REF
21.6032 {
21.6033 root_0 = (CommonTree)adaptor.nil();
21.6034
21.6035 - dbg.location(379,9);
21.6036 RULE_REF146=(Token)match(input,RULE_REF,FOLLOW_RULE_REF_in_rewrite_tree_atom2814); if (state.failed) return retval;
21.6037 if ( state.backtracking==0 ) {
21.6038 RULE_REF146_tree = (CommonTree)adaptor.create(RULE_REF146);
21.6039 @@ -8956,13 +7114,10 @@
21.6040 }
21.6041 break;
21.6042 case 4 :
21.6043 - dbg.enterAlt(4);
21.6044 -
21.6045 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:380:6: STRING_LITERAL
21.6046 {
21.6047 root_0 = (CommonTree)adaptor.nil();
21.6048
21.6049 - dbg.location(380,6);
21.6050 STRING_LITERAL147=(Token)match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_rewrite_tree_atom2821); if (state.failed) return retval;
21.6051 if ( state.backtracking==0 ) {
21.6052 STRING_LITERAL147_tree = (CommonTree)adaptor.create(STRING_LITERAL147);
21.6053 @@ -8972,15 +7127,11 @@
21.6054 }
21.6055 break;
21.6056 case 5 :
21.6057 - dbg.enterAlt(5);
21.6058 -
21.6059 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:381:6: d= '$' id
21.6060 {
21.6061 - dbg.location(381,7);
21.6062 d=(Token)match(input,93,FOLLOW_93_in_rewrite_tree_atom2830); if (state.failed) return retval;
21.6063 if ( state.backtracking==0 ) stream_93.add(d);
21.6064
21.6065 - dbg.location(381,12);
21.6066 pushFollow(FOLLOW_id_in_rewrite_tree_atom2832);
21.6067 id148=id();
21.6068
21.6069 @@ -9003,7 +7154,6 @@
21.6070 root_0 = (CommonTree)adaptor.nil();
21.6071 // 381:15: -> LABEL[$d,$id.text]
21.6072 {
21.6073 - dbg.location(381,18);
21.6074 adaptor.addChild(root_0, (CommonTree)adaptor.create(LABEL, d, (id148!=null?input.toString(id148.start,id148.stop):null)));
21.6075
21.6076 }
21.6077 @@ -9012,13 +7162,10 @@
21.6078 }
21.6079 break;
21.6080 case 6 :
21.6081 - dbg.enterAlt(6);
21.6082 -
21.6083 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:382:4: ACTION
21.6084 {
21.6085 root_0 = (CommonTree)adaptor.nil();
21.6086
21.6087 - dbg.location(382,4);
21.6088 ACTION149=(Token)match(input,ACTION,FOLLOW_ACTION_in_rewrite_tree_atom2843); if (state.failed) return retval;
21.6089 if ( state.backtracking==0 ) {
21.6090 ACTION149_tree = (CommonTree)adaptor.create(ACTION149);
21.6091 @@ -9045,15 +7192,6 @@
21.6092 }
21.6093 finally {
21.6094 }
21.6095 - dbg.location(383, 2);
21.6096 -
21.6097 - }
21.6098 - finally {
21.6099 - dbg.exitRule(getGrammarFileName(), "rewrite_tree_atom");
21.6100 - decRuleLevel();
21.6101 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.6102 - }
21.6103 -
21.6104 return retval;
21.6105 }
21.6106 // $ANTLR end "rewrite_tree_atom"
21.6107 @@ -9081,25 +7219,16 @@
21.6108
21.6109 Token firstToken = input.LT(1);
21.6110
21.6111 - try { dbg.enterRule(getGrammarFileName(), "rewrite_tree_ebnf");
21.6112 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.6113 - incRuleLevel();
21.6114 - dbg.location(385, 1);
21.6115 -
21.6116 try {
21.6117 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:393:2: ( rewrite_tree_block ebnfSuffix -> ^( ebnfSuffix rewrite_tree_block ) )
21.6118 - dbg.enterAlt(1);
21.6119 -
21.6120 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:393:4: rewrite_tree_block ebnfSuffix
21.6121 {
21.6122 - dbg.location(393,4);
21.6123 pushFollow(FOLLOW_rewrite_tree_block_in_rewrite_tree_ebnf2864);
21.6124 rewrite_tree_block150=rewrite_tree_block();
21.6125
21.6126 state._fsp--;
21.6127 if (state.failed) return retval;
21.6128 if ( state.backtracking==0 ) stream_rewrite_tree_block.add(rewrite_tree_block150.getTree());
21.6129 - dbg.location(393,23);
21.6130 pushFollow(FOLLOW_ebnfSuffix_in_rewrite_tree_ebnf2866);
21.6131 ebnfSuffix151=ebnfSuffix();
21.6132
21.6133 @@ -9122,14 +7251,11 @@
21.6134 root_0 = (CommonTree)adaptor.nil();
21.6135 // 393:34: -> ^( ebnfSuffix rewrite_tree_block )
21.6136 {
21.6137 - dbg.location(393,37);
21.6138 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:393:37: ^( ebnfSuffix rewrite_tree_block )
21.6139 {
21.6140 CommonTree root_1 = (CommonTree)adaptor.nil();
21.6141 - dbg.location(393,39);
21.6142 root_1 = (CommonTree)adaptor.becomeRoot(stream_ebnfSuffix.nextNode(), root_1);
21.6143
21.6144 - dbg.location(393,50);
21.6145 adaptor.addChild(root_1, stream_rewrite_tree_block.nextTree());
21.6146
21.6147 adaptor.addChild(root_0, root_1);
21.6148 @@ -9162,15 +7288,6 @@
21.6149 }
21.6150 finally {
21.6151 }
21.6152 - dbg.location(394, 2);
21.6153 -
21.6154 - }
21.6155 - finally {
21.6156 - dbg.exitRule(getGrammarFileName(), "rewrite_tree_ebnf");
21.6157 - decRuleLevel();
21.6158 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.6159 - }
21.6160 -
21.6161 return retval;
21.6162 }
21.6163 // $ANTLR end "rewrite_tree_ebnf"
21.6164 @@ -9201,37 +7318,23 @@
21.6165 RewriteRuleTokenStream stream_84=new RewriteRuleTokenStream(adaptor,"token 84");
21.6166 RewriteRuleSubtreeStream stream_rewrite_tree_element=new RewriteRuleSubtreeStream(adaptor,"rule rewrite_tree_element");
21.6167 RewriteRuleSubtreeStream stream_rewrite_tree_atom=new RewriteRuleSubtreeStream(adaptor,"rule rewrite_tree_atom");
21.6168 - try { dbg.enterRule(getGrammarFileName(), "rewrite_tree");
21.6169 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.6170 - incRuleLevel();
21.6171 - dbg.location(396, 1);
21.6172 -
21.6173 try {
21.6174 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:397:2: ( '^(' rewrite_tree_atom ( rewrite_tree_element )* ')' -> ^( TREE_BEGIN rewrite_tree_atom ( rewrite_tree_element )* ) )
21.6175 - dbg.enterAlt(1);
21.6176 -
21.6177 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:397:4: '^(' rewrite_tree_atom ( rewrite_tree_element )* ')'
21.6178 {
21.6179 - dbg.location(397,4);
21.6180 string_literal152=(Token)match(input,TREE_BEGIN,FOLLOW_TREE_BEGIN_in_rewrite_tree2886); if (state.failed) return retval;
21.6181 if ( state.backtracking==0 ) stream_TREE_BEGIN.add(string_literal152);
21.6182
21.6183 - dbg.location(397,9);
21.6184 pushFollow(FOLLOW_rewrite_tree_atom_in_rewrite_tree2888);
21.6185 rewrite_tree_atom153=rewrite_tree_atom();
21.6186
21.6187 state._fsp--;
21.6188 if (state.failed) return retval;
21.6189 if ( state.backtracking==0 ) stream_rewrite_tree_atom.add(rewrite_tree_atom153.getTree());
21.6190 - dbg.location(397,27);
21.6191 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:397:27: ( rewrite_tree_element )*
21.6192 - try { dbg.enterSubRule(70);
21.6193 -
21.6194 loop70:
21.6195 do {
21.6196 int alt70=2;
21.6197 - try { dbg.enterDecision(70, decisionCanBacktrack[70]);
21.6198 -
21.6199 int LA70_0 = input.LA(1);
21.6200
21.6201 if ( (LA70_0==TREE_BEGIN||(LA70_0>=TOKEN_REF && LA70_0<=ACTION)||LA70_0==RULE_REF||LA70_0==82||LA70_0==93) ) {
21.6202 @@ -9239,15 +7342,10 @@
21.6203 }
21.6204
21.6205
21.6206 - } finally {dbg.exitDecision(70);}
21.6207 -
21.6208 switch (alt70) {
21.6209 case 1 :
21.6210 - dbg.enterAlt(1);
21.6211 -
21.6212 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:397:27: rewrite_tree_element
21.6213 {
21.6214 - dbg.location(397,27);
21.6215 pushFollow(FOLLOW_rewrite_tree_element_in_rewrite_tree2890);
21.6216 rewrite_tree_element154=rewrite_tree_element();
21.6217
21.6218 @@ -9262,9 +7360,7 @@
21.6219 break loop70;
21.6220 }
21.6221 } while (true);
21.6222 - } finally {dbg.exitSubRule(70);}
21.6223 -
21.6224 - dbg.location(397,49);
21.6225 +
21.6226 char_literal155=(Token)match(input,84,FOLLOW_84_in_rewrite_tree2893); if (state.failed) return retval;
21.6227 if ( state.backtracking==0 ) stream_84.add(char_literal155);
21.6228
21.6229 @@ -9284,19 +7380,14 @@
21.6230 root_0 = (CommonTree)adaptor.nil();
21.6231 // 398:3: -> ^( TREE_BEGIN rewrite_tree_atom ( rewrite_tree_element )* )
21.6232 {
21.6233 - dbg.location(398,6);
21.6234 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:398:6: ^( TREE_BEGIN rewrite_tree_atom ( rewrite_tree_element )* )
21.6235 {
21.6236 CommonTree root_1 = (CommonTree)adaptor.nil();
21.6237 - dbg.location(398,8);
21.6238 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TREE_BEGIN, "TREE_BEGIN"), root_1);
21.6239
21.6240 - dbg.location(398,19);
21.6241 adaptor.addChild(root_1, stream_rewrite_tree_atom.nextTree());
21.6242 - dbg.location(398,37);
21.6243 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:398:37: ( rewrite_tree_element )*
21.6244 while ( stream_rewrite_tree_element.hasNext() ) {
21.6245 - dbg.location(398,37);
21.6246 adaptor.addChild(root_1, stream_rewrite_tree_element.nextTree());
21.6247
21.6248 }
21.6249 @@ -9326,15 +7417,6 @@
21.6250 }
21.6251 finally {
21.6252 }
21.6253 - dbg.location(399, 2);
21.6254 -
21.6255 - }
21.6256 - finally {
21.6257 - dbg.exitRule(getGrammarFileName(), "rewrite_tree");
21.6258 - decRuleLevel();
21.6259 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.6260 - }
21.6261 -
21.6262 return retval;
21.6263 }
21.6264 // $ANTLR end "rewrite_tree"
21.6265 @@ -9375,60 +7457,34 @@
21.6266 RewriteRuleTokenStream stream_84=new RewriteRuleTokenStream(adaptor,"token 84");
21.6267 RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,"rule id");
21.6268 RewriteRuleSubtreeStream stream_rewrite_template_args=new RewriteRuleSubtreeStream(adaptor,"rule rewrite_template_args");
21.6269 - try { dbg.enterRule(getGrammarFileName(), "rewrite_template");
21.6270 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.6271 - incRuleLevel();
21.6272 - dbg.location(401, 1);
21.6273 -
21.6274 try {
21.6275 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:413:2: ( id lp= '(' rewrite_template_args ')' (str= DOUBLE_QUOTE_STRING_LITERAL | str= DOUBLE_ANGLE_STRING_LITERAL ) -> ^( TEMPLATE[$lp,\"TEMPLATE\"] id rewrite_template_args $str) | rewrite_template_ref | rewrite_indirect_template_head | ACTION )
21.6276 int alt72=4;
21.6277 - try { dbg.enterDecision(72, decisionCanBacktrack[72]);
21.6278 -
21.6279 - try {
21.6280 - isCyclicDecision = true;
21.6281 - alt72 = dfa72.predict(input);
21.6282 - }
21.6283 - catch (NoViableAltException nvae) {
21.6284 - dbg.recognitionException(nvae);
21.6285 - throw nvae;
21.6286 - }
21.6287 - } finally {dbg.exitDecision(72);}
21.6288 -
21.6289 + alt72 = dfa72.predict(input);
21.6290 switch (alt72) {
21.6291 case 1 :
21.6292 - dbg.enterAlt(1);
21.6293 -
21.6294 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:414:3: id lp= '(' rewrite_template_args ')' (str= DOUBLE_QUOTE_STRING_LITERAL | str= DOUBLE_ANGLE_STRING_LITERAL )
21.6295 {
21.6296 - dbg.location(414,3);
21.6297 pushFollow(FOLLOW_id_in_rewrite_template2925);
21.6298 id156=id();
21.6299
21.6300 state._fsp--;
21.6301 if (state.failed) return retval;
21.6302 if ( state.backtracking==0 ) stream_id.add(id156.getTree());
21.6303 - dbg.location(414,8);
21.6304 lp=(Token)match(input,82,FOLLOW_82_in_rewrite_template2929); if (state.failed) return retval;
21.6305 if ( state.backtracking==0 ) stream_82.add(lp);
21.6306
21.6307 - dbg.location(414,13);
21.6308 pushFollow(FOLLOW_rewrite_template_args_in_rewrite_template2931);
21.6309 rewrite_template_args157=rewrite_template_args();
21.6310
21.6311 state._fsp--;
21.6312 if (state.failed) return retval;
21.6313 if ( state.backtracking==0 ) stream_rewrite_template_args.add(rewrite_template_args157.getTree());
21.6314 - dbg.location(414,35);
21.6315 char_literal158=(Token)match(input,84,FOLLOW_84_in_rewrite_template2933); if (state.failed) return retval;
21.6316 if ( state.backtracking==0 ) stream_84.add(char_literal158);
21.6317
21.6318 - dbg.location(415,3);
21.6319 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:415:3: (str= DOUBLE_QUOTE_STRING_LITERAL | str= DOUBLE_ANGLE_STRING_LITERAL )
21.6320 int alt71=2;
21.6321 - try { dbg.enterSubRule(71);
21.6322 - try { dbg.enterDecision(71, decisionCanBacktrack[71]);
21.6323 -
21.6324 int LA71_0 = input.LA(1);
21.6325
21.6326 if ( (LA71_0==DOUBLE_QUOTE_STRING_LITERAL) ) {
21.6327 @@ -9442,18 +7498,12 @@
21.6328 NoViableAltException nvae =
21.6329 new NoViableAltException("", 71, 0, input);
21.6330
21.6331 - dbg.recognitionException(nvae);
21.6332 throw nvae;
21.6333 }
21.6334 - } finally {dbg.exitDecision(71);}
21.6335 -
21.6336 switch (alt71) {
21.6337 case 1 :
21.6338 - dbg.enterAlt(1);
21.6339 -
21.6340 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:415:5: str= DOUBLE_QUOTE_STRING_LITERAL
21.6341 {
21.6342 - dbg.location(415,8);
21.6343 str=(Token)match(input,DOUBLE_QUOTE_STRING_LITERAL,FOLLOW_DOUBLE_QUOTE_STRING_LITERAL_in_rewrite_template2941); if (state.failed) return retval;
21.6344 if ( state.backtracking==0 ) stream_DOUBLE_QUOTE_STRING_LITERAL.add(str);
21.6345
21.6346 @@ -9461,11 +7511,8 @@
21.6347 }
21.6348 break;
21.6349 case 2 :
21.6350 - dbg.enterAlt(2);
21.6351 -
21.6352 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:415:39: str= DOUBLE_ANGLE_STRING_LITERAL
21.6353 {
21.6354 - dbg.location(415,42);
21.6355 str=(Token)match(input,DOUBLE_ANGLE_STRING_LITERAL,FOLLOW_DOUBLE_ANGLE_STRING_LITERAL_in_rewrite_template2947); if (state.failed) return retval;
21.6356 if ( state.backtracking==0 ) stream_DOUBLE_ANGLE_STRING_LITERAL.add(str);
21.6357
21.6358 @@ -9474,12 +7521,11 @@
21.6359 break;
21.6360
21.6361 }
21.6362 - } finally {dbg.exitSubRule(71);}
21.6363
21.6364
21.6365
21.6366 // AST REWRITE
21.6367 - // elements: rewrite_template_args, str, id
21.6368 + // elements: id, str, rewrite_template_args
21.6369 // token labels: str
21.6370 // rule labels: retval
21.6371 // token list labels:
21.6372 @@ -9493,18 +7539,13 @@
21.6373 root_0 = (CommonTree)adaptor.nil();
21.6374 // 416:3: -> ^( TEMPLATE[$lp,\"TEMPLATE\"] id rewrite_template_args $str)
21.6375 {
21.6376 - dbg.location(416,6);
21.6377 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:416:6: ^( TEMPLATE[$lp,\"TEMPLATE\"] id rewrite_template_args $str)
21.6378 {
21.6379 CommonTree root_1 = (CommonTree)adaptor.nil();
21.6380 - dbg.location(416,8);
21.6381 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TEMPLATE, lp, "TEMPLATE"), root_1);
21.6382
21.6383 - dbg.location(416,33);
21.6384 adaptor.addChild(root_1, stream_id.nextTree());
21.6385 - dbg.location(416,36);
21.6386 adaptor.addChild(root_1, stream_rewrite_template_args.nextTree());
21.6387 - dbg.location(416,58);
21.6388 adaptor.addChild(root_1, stream_str.nextNode());
21.6389
21.6390 adaptor.addChild(root_0, root_1);
21.6391 @@ -9516,13 +7557,10 @@
21.6392 }
21.6393 break;
21.6394 case 2 :
21.6395 - dbg.enterAlt(2);
21.6396 -
21.6397 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:419:3: rewrite_template_ref
21.6398 {
21.6399 root_0 = (CommonTree)adaptor.nil();
21.6400
21.6401 - dbg.location(419,3);
21.6402 pushFollow(FOLLOW_rewrite_template_ref_in_rewrite_template2974);
21.6403 rewrite_template_ref159=rewrite_template_ref();
21.6404
21.6405 @@ -9533,13 +7571,10 @@
21.6406 }
21.6407 break;
21.6408 case 3 :
21.6409 - dbg.enterAlt(3);
21.6410 -
21.6411 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:422:3: rewrite_indirect_template_head
21.6412 {
21.6413 root_0 = (CommonTree)adaptor.nil();
21.6414
21.6415 - dbg.location(422,3);
21.6416 pushFollow(FOLLOW_rewrite_indirect_template_head_in_rewrite_template2983);
21.6417 rewrite_indirect_template_head160=rewrite_indirect_template_head();
21.6418
21.6419 @@ -9550,13 +7585,10 @@
21.6420 }
21.6421 break;
21.6422 case 4 :
21.6423 - dbg.enterAlt(4);
21.6424 -
21.6425 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:425:3: ACTION
21.6426 {
21.6427 root_0 = (CommonTree)adaptor.nil();
21.6428
21.6429 - dbg.location(425,3);
21.6430 ACTION161=(Token)match(input,ACTION,FOLLOW_ACTION_in_rewrite_template2992); if (state.failed) return retval;
21.6431 if ( state.backtracking==0 ) {
21.6432 ACTION161_tree = (CommonTree)adaptor.create(ACTION161);
21.6433 @@ -9583,15 +7615,6 @@
21.6434 }
21.6435 finally {
21.6436 }
21.6437 - dbg.location(426, 2);
21.6438 -
21.6439 - }
21.6440 - finally {
21.6441 - dbg.exitRule(getGrammarFileName(), "rewrite_template");
21.6442 - decRuleLevel();
21.6443 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.6444 - }
21.6445 -
21.6446 return retval;
21.6447 }
21.6448 // $ANTLR end "rewrite_template"
21.6449 @@ -9622,43 +7645,32 @@
21.6450 RewriteRuleTokenStream stream_84=new RewriteRuleTokenStream(adaptor,"token 84");
21.6451 RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,"rule id");
21.6452 RewriteRuleSubtreeStream stream_rewrite_template_args=new RewriteRuleSubtreeStream(adaptor,"rule rewrite_template_args");
21.6453 - try { dbg.enterRule(getGrammarFileName(), "rewrite_template_ref");
21.6454 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.6455 - incRuleLevel();
21.6456 - dbg.location(428, 1);
21.6457 -
21.6458 try {
21.6459 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:430:2: ( id lp= '(' rewrite_template_args ')' -> ^( TEMPLATE[$lp,\"TEMPLATE\"] id rewrite_template_args ) )
21.6460 - dbg.enterAlt(1);
21.6461 -
21.6462 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:430:4: id lp= '(' rewrite_template_args ')'
21.6463 {
21.6464 - dbg.location(430,4);
21.6465 pushFollow(FOLLOW_id_in_rewrite_template_ref3005);
21.6466 id162=id();
21.6467
21.6468 state._fsp--;
21.6469 if (state.failed) return retval;
21.6470 if ( state.backtracking==0 ) stream_id.add(id162.getTree());
21.6471 - dbg.location(430,9);
21.6472 lp=(Token)match(input,82,FOLLOW_82_in_rewrite_template_ref3009); if (state.failed) return retval;
21.6473 if ( state.backtracking==0 ) stream_82.add(lp);
21.6474
21.6475 - dbg.location(430,14);
21.6476 pushFollow(FOLLOW_rewrite_template_args_in_rewrite_template_ref3011);
21.6477 rewrite_template_args163=rewrite_template_args();
21.6478
21.6479 state._fsp--;
21.6480 if (state.failed) return retval;
21.6481 if ( state.backtracking==0 ) stream_rewrite_template_args.add(rewrite_template_args163.getTree());
21.6482 - dbg.location(430,36);
21.6483 char_literal164=(Token)match(input,84,FOLLOW_84_in_rewrite_template_ref3013); if (state.failed) return retval;
21.6484 if ( state.backtracking==0 ) stream_84.add(char_literal164);
21.6485
21.6486
21.6487
21.6488 // AST REWRITE
21.6489 - // elements: id, rewrite_template_args
21.6490 + // elements: rewrite_template_args, id
21.6491 // token labels:
21.6492 // rule labels: retval
21.6493 // token list labels:
21.6494 @@ -9671,16 +7683,12 @@
21.6495 root_0 = (CommonTree)adaptor.nil();
21.6496 // 431:3: -> ^( TEMPLATE[$lp,\"TEMPLATE\"] id rewrite_template_args )
21.6497 {
21.6498 - dbg.location(431,6);
21.6499 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:431:6: ^( TEMPLATE[$lp,\"TEMPLATE\"] id rewrite_template_args )
21.6500 {
21.6501 CommonTree root_1 = (CommonTree)adaptor.nil();
21.6502 - dbg.location(431,8);
21.6503 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TEMPLATE, lp, "TEMPLATE"), root_1);
21.6504
21.6505 - dbg.location(431,33);
21.6506 adaptor.addChild(root_1, stream_id.nextTree());
21.6507 - dbg.location(431,36);
21.6508 adaptor.addChild(root_1, stream_rewrite_template_args.nextTree());
21.6509
21.6510 adaptor.addChild(root_0, root_1);
21.6511 @@ -9707,15 +7715,6 @@
21.6512 }
21.6513 finally {
21.6514 }
21.6515 - dbg.location(432, 2);
21.6516 -
21.6517 - }
21.6518 - finally {
21.6519 - dbg.exitRule(getGrammarFileName(), "rewrite_template_ref");
21.6520 - decRuleLevel();
21.6521 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.6522 - }
21.6523 -
21.6524 return retval;
21.6525 }
21.6526 // $ANTLR end "rewrite_template_ref"
21.6527 @@ -9750,48 +7749,35 @@
21.6528 RewriteRuleTokenStream stream_ACTION=new RewriteRuleTokenStream(adaptor,"token ACTION");
21.6529 RewriteRuleTokenStream stream_84=new RewriteRuleTokenStream(adaptor,"token 84");
21.6530 RewriteRuleSubtreeStream stream_rewrite_template_args=new RewriteRuleSubtreeStream(adaptor,"rule rewrite_template_args");
21.6531 - try { dbg.enterRule(getGrammarFileName(), "rewrite_indirect_template_head");
21.6532 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.6533 - incRuleLevel();
21.6534 - dbg.location(434, 1);
21.6535 -
21.6536 try {
21.6537 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:436:2: (lp= '(' ACTION ')' '(' rewrite_template_args ')' -> ^( TEMPLATE[$lp,\"TEMPLATE\"] ACTION rewrite_template_args ) )
21.6538 - dbg.enterAlt(1);
21.6539 -
21.6540 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:436:4: lp= '(' ACTION ')' '(' rewrite_template_args ')'
21.6541 {
21.6542 - dbg.location(436,6);
21.6543 lp=(Token)match(input,82,FOLLOW_82_in_rewrite_indirect_template_head3041); if (state.failed) return retval;
21.6544 if ( state.backtracking==0 ) stream_82.add(lp);
21.6545
21.6546 - dbg.location(436,11);
21.6547 ACTION165=(Token)match(input,ACTION,FOLLOW_ACTION_in_rewrite_indirect_template_head3043); if (state.failed) return retval;
21.6548 if ( state.backtracking==0 ) stream_ACTION.add(ACTION165);
21.6549
21.6550 - dbg.location(436,18);
21.6551 char_literal166=(Token)match(input,84,FOLLOW_84_in_rewrite_indirect_template_head3045); if (state.failed) return retval;
21.6552 if ( state.backtracking==0 ) stream_84.add(char_literal166);
21.6553
21.6554 - dbg.location(436,22);
21.6555 char_literal167=(Token)match(input,82,FOLLOW_82_in_rewrite_indirect_template_head3047); if (state.failed) return retval;
21.6556 if ( state.backtracking==0 ) stream_82.add(char_literal167);
21.6557
21.6558 - dbg.location(436,26);
21.6559 pushFollow(FOLLOW_rewrite_template_args_in_rewrite_indirect_template_head3049);
21.6560 rewrite_template_args168=rewrite_template_args();
21.6561
21.6562 state._fsp--;
21.6563 if (state.failed) return retval;
21.6564 if ( state.backtracking==0 ) stream_rewrite_template_args.add(rewrite_template_args168.getTree());
21.6565 - dbg.location(436,48);
21.6566 char_literal169=(Token)match(input,84,FOLLOW_84_in_rewrite_indirect_template_head3051); if (state.failed) return retval;
21.6567 if ( state.backtracking==0 ) stream_84.add(char_literal169);
21.6568
21.6569
21.6570
21.6571 // AST REWRITE
21.6572 - // elements: rewrite_template_args, ACTION
21.6573 + // elements: ACTION, rewrite_template_args
21.6574 // token labels:
21.6575 // rule labels: retval
21.6576 // token list labels:
21.6577 @@ -9804,16 +7790,12 @@
21.6578 root_0 = (CommonTree)adaptor.nil();
21.6579 // 437:3: -> ^( TEMPLATE[$lp,\"TEMPLATE\"] ACTION rewrite_template_args )
21.6580 {
21.6581 - dbg.location(437,6);
21.6582 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:437:6: ^( TEMPLATE[$lp,\"TEMPLATE\"] ACTION rewrite_template_args )
21.6583 {
21.6584 CommonTree root_1 = (CommonTree)adaptor.nil();
21.6585 - dbg.location(437,8);
21.6586 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TEMPLATE, lp, "TEMPLATE"), root_1);
21.6587
21.6588 - dbg.location(437,33);
21.6589 adaptor.addChild(root_1, stream_ACTION.nextNode());
21.6590 - dbg.location(437,40);
21.6591 adaptor.addChild(root_1, stream_rewrite_template_args.nextTree());
21.6592
21.6593 adaptor.addChild(root_0, root_1);
21.6594 @@ -9840,15 +7822,6 @@
21.6595 }
21.6596 finally {
21.6597 }
21.6598 - dbg.location(438, 2);
21.6599 -
21.6600 - }
21.6601 - finally {
21.6602 - dbg.exitRule(getGrammarFileName(), "rewrite_indirect_template_head");
21.6603 - decRuleLevel();
21.6604 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.6605 - }
21.6606 -
21.6607 return retval;
21.6608 }
21.6609 // $ANTLR end "rewrite_indirect_template_head"
21.6610 @@ -9875,16 +7848,9 @@
21.6611 CommonTree char_literal171_tree=null;
21.6612 RewriteRuleTokenStream stream_81=new RewriteRuleTokenStream(adaptor,"token 81");
21.6613 RewriteRuleSubtreeStream stream_rewrite_template_arg=new RewriteRuleSubtreeStream(adaptor,"rule rewrite_template_arg");
21.6614 - try { dbg.enterRule(getGrammarFileName(), "rewrite_template_args");
21.6615 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.6616 - incRuleLevel();
21.6617 - dbg.location(440, 1);
21.6618 -
21.6619 try {
21.6620 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:441:2: ( rewrite_template_arg ( ',' rewrite_template_arg )* -> ^( ARGLIST ( rewrite_template_arg )+ ) | -> ARGLIST )
21.6621 int alt74=2;
21.6622 - try { dbg.enterDecision(74, decisionCanBacktrack[74]);
21.6623 -
21.6624 int LA74_0 = input.LA(1);
21.6625
21.6626 if ( (LA74_0==TOKEN_REF||LA74_0==RULE_REF) ) {
21.6627 @@ -9898,33 +7864,22 @@
21.6628 NoViableAltException nvae =
21.6629 new NoViableAltException("", 74, 0, input);
21.6630
21.6631 - dbg.recognitionException(nvae);
21.6632 throw nvae;
21.6633 }
21.6634 - } finally {dbg.exitDecision(74);}
21.6635 -
21.6636 switch (alt74) {
21.6637 case 1 :
21.6638 - dbg.enterAlt(1);
21.6639 -
21.6640 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:441:4: rewrite_template_arg ( ',' rewrite_template_arg )*
21.6641 {
21.6642 - dbg.location(441,4);
21.6643 pushFollow(FOLLOW_rewrite_template_arg_in_rewrite_template_args3075);
21.6644 rewrite_template_arg170=rewrite_template_arg();
21.6645
21.6646 state._fsp--;
21.6647 if (state.failed) return retval;
21.6648 if ( state.backtracking==0 ) stream_rewrite_template_arg.add(rewrite_template_arg170.getTree());
21.6649 - dbg.location(441,25);
21.6650 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:441:25: ( ',' rewrite_template_arg )*
21.6651 - try { dbg.enterSubRule(73);
21.6652 -
21.6653 loop73:
21.6654 do {
21.6655 int alt73=2;
21.6656 - try { dbg.enterDecision(73, decisionCanBacktrack[73]);
21.6657 -
21.6658 int LA73_0 = input.LA(1);
21.6659
21.6660 if ( (LA73_0==81) ) {
21.6661 @@ -9932,19 +7887,13 @@
21.6662 }
21.6663
21.6664
21.6665 - } finally {dbg.exitDecision(73);}
21.6666 -
21.6667 switch (alt73) {
21.6668 case 1 :
21.6669 - dbg.enterAlt(1);
21.6670 -
21.6671 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:441:26: ',' rewrite_template_arg
21.6672 {
21.6673 - dbg.location(441,26);
21.6674 char_literal171=(Token)match(input,81,FOLLOW_81_in_rewrite_template_args3078); if (state.failed) return retval;
21.6675 if ( state.backtracking==0 ) stream_81.add(char_literal171);
21.6676
21.6677 - dbg.location(441,30);
21.6678 pushFollow(FOLLOW_rewrite_template_arg_in_rewrite_template_args3080);
21.6679 rewrite_template_arg172=rewrite_template_arg();
21.6680
21.6681 @@ -9959,7 +7908,6 @@
21.6682 break loop73;
21.6683 }
21.6684 } while (true);
21.6685 - } finally {dbg.exitSubRule(73);}
21.6686
21.6687
21.6688
21.6689 @@ -9977,19 +7925,15 @@
21.6690 root_0 = (CommonTree)adaptor.nil();
21.6691 // 442:3: -> ^( ARGLIST ( rewrite_template_arg )+ )
21.6692 {
21.6693 - dbg.location(442,6);
21.6694 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:442:6: ^( ARGLIST ( rewrite_template_arg )+ )
21.6695 {
21.6696 CommonTree root_1 = (CommonTree)adaptor.nil();
21.6697 - dbg.location(442,8);
21.6698 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ARGLIST, "ARGLIST"), root_1);
21.6699
21.6700 - dbg.location(442,16);
21.6701 if ( !(stream_rewrite_template_arg.hasNext()) ) {
21.6702 throw new RewriteEarlyExitException();
21.6703 }
21.6704 while ( stream_rewrite_template_arg.hasNext() ) {
21.6705 - dbg.location(442,16);
21.6706 adaptor.addChild(root_1, stream_rewrite_template_arg.nextTree());
21.6707
21.6708 }
21.6709 @@ -10004,8 +7948,6 @@
21.6710 }
21.6711 break;
21.6712 case 2 :
21.6713 - dbg.enterAlt(2);
21.6714 -
21.6715 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:443:4:
21.6716 {
21.6717
21.6718 @@ -10023,7 +7965,6 @@
21.6719 root_0 = (CommonTree)adaptor.nil();
21.6720 // 443:4: -> ARGLIST
21.6721 {
21.6722 - dbg.location(443,7);
21.6723 adaptor.addChild(root_0, (CommonTree)adaptor.create(ARGLIST, "ARGLIST"));
21.6724
21.6725 }
21.6726 @@ -10049,15 +7990,6 @@
21.6727 }
21.6728 finally {
21.6729 }
21.6730 - dbg.location(444, 2);
21.6731 -
21.6732 - }
21.6733 - finally {
21.6734 - dbg.exitRule(getGrammarFileName(), "rewrite_template_args");
21.6735 - decRuleLevel();
21.6736 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.6737 - }
21.6738 -
21.6739 return retval;
21.6740 }
21.6741 // $ANTLR end "rewrite_template_args"
21.6742 @@ -10085,36 +8017,26 @@
21.6743 RewriteRuleTokenStream stream_71=new RewriteRuleTokenStream(adaptor,"token 71");
21.6744 RewriteRuleTokenStream stream_ACTION=new RewriteRuleTokenStream(adaptor,"token ACTION");
21.6745 RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,"rule id");
21.6746 - try { dbg.enterRule(getGrammarFileName(), "rewrite_template_arg");
21.6747 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.6748 - incRuleLevel();
21.6749 - dbg.location(446, 1);
21.6750 -
21.6751 try {
21.6752 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:447:2: ( id '=' ACTION -> ^( ARG[$id.start] id ACTION ) )
21.6753 - dbg.enterAlt(1);
21.6754 -
21.6755 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:447:6: id '=' ACTION
21.6756 {
21.6757 - dbg.location(447,6);
21.6758 pushFollow(FOLLOW_id_in_rewrite_template_arg3113);
21.6759 id173=id();
21.6760
21.6761 state._fsp--;
21.6762 if (state.failed) return retval;
21.6763 if ( state.backtracking==0 ) stream_id.add(id173.getTree());
21.6764 - dbg.location(447,9);
21.6765 char_literal174=(Token)match(input,71,FOLLOW_71_in_rewrite_template_arg3115); if (state.failed) return retval;
21.6766 if ( state.backtracking==0 ) stream_71.add(char_literal174);
21.6767
21.6768 - dbg.location(447,13);
21.6769 ACTION175=(Token)match(input,ACTION,FOLLOW_ACTION_in_rewrite_template_arg3117); if (state.failed) return retval;
21.6770 if ( state.backtracking==0 ) stream_ACTION.add(ACTION175);
21.6771
21.6772
21.6773
21.6774 // AST REWRITE
21.6775 - // elements: id, ACTION
21.6776 + // elements: ACTION, id
21.6777 // token labels:
21.6778 // rule labels: retval
21.6779 // token list labels:
21.6780 @@ -10127,16 +8049,12 @@
21.6781 root_0 = (CommonTree)adaptor.nil();
21.6782 // 447:20: -> ^( ARG[$id.start] id ACTION )
21.6783 {
21.6784 - dbg.location(447,23);
21.6785 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:447:23: ^( ARG[$id.start] id ACTION )
21.6786 {
21.6787 CommonTree root_1 = (CommonTree)adaptor.nil();
21.6788 - dbg.location(447,25);
21.6789 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(ARG, (id173!=null?((Token)id173.start):null)), root_1);
21.6790
21.6791 - dbg.location(447,40);
21.6792 adaptor.addChild(root_1, stream_id.nextTree());
21.6793 - dbg.location(447,43);
21.6794 adaptor.addChild(root_1, stream_ACTION.nextNode());
21.6795
21.6796 adaptor.addChild(root_0, root_1);
21.6797 @@ -10163,15 +8081,6 @@
21.6798 }
21.6799 finally {
21.6800 }
21.6801 - dbg.location(448, 2);
21.6802 -
21.6803 - }
21.6804 - finally {
21.6805 - dbg.exitRule(getGrammarFileName(), "rewrite_template_arg");
21.6806 - decRuleLevel();
21.6807 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.6808 - }
21.6809 -
21.6810 return retval;
21.6811 }
21.6812 // $ANTLR end "rewrite_template_arg"
21.6813 @@ -10197,16 +8106,9 @@
21.6814 RewriteRuleTokenStream stream_RULE_REF=new RewriteRuleTokenStream(adaptor,"token RULE_REF");
21.6815 RewriteRuleTokenStream stream_TOKEN_REF=new RewriteRuleTokenStream(adaptor,"token TOKEN_REF");
21.6816
21.6817 - try { dbg.enterRule(getGrammarFileName(), "id");
21.6818 - if ( getRuleLevel()==0 ) {dbg.commence();}
21.6819 - incRuleLevel();
21.6820 - dbg.location(450, 1);
21.6821 -
21.6822 try {
21.6823 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:450:4: ( TOKEN_REF -> ID[$TOKEN_REF] | RULE_REF -> ID[$RULE_REF] )
21.6824 int alt75=2;
21.6825 - try { dbg.enterDecision(75, decisionCanBacktrack[75]);
21.6826 -
21.6827 int LA75_0 = input.LA(1);
21.6828
21.6829 if ( (LA75_0==TOKEN_REF) ) {
21.6830 @@ -10220,18 +8122,12 @@
21.6831 NoViableAltException nvae =
21.6832 new NoViableAltException("", 75, 0, input);
21.6833
21.6834 - dbg.recognitionException(nvae);
21.6835 throw nvae;
21.6836 }
21.6837 - } finally {dbg.exitDecision(75);}
21.6838 -
21.6839 switch (alt75) {
21.6840 case 1 :
21.6841 - dbg.enterAlt(1);
21.6842 -
21.6843 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:450:6: TOKEN_REF
21.6844 {
21.6845 - dbg.location(450,6);
21.6846 TOKEN_REF176=(Token)match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_id3138); if (state.failed) return retval;
21.6847 if ( state.backtracking==0 ) stream_TOKEN_REF.add(TOKEN_REF176);
21.6848
21.6849 @@ -10251,7 +8147,6 @@
21.6850 root_0 = (CommonTree)adaptor.nil();
21.6851 // 450:16: -> ID[$TOKEN_REF]
21.6852 {
21.6853 - dbg.location(450,19);
21.6854 adaptor.addChild(root_0, (CommonTree)adaptor.create(ID, TOKEN_REF176));
21.6855
21.6856 }
21.6857 @@ -10260,11 +8155,8 @@
21.6858 }
21.6859 break;
21.6860 case 2 :
21.6861 - dbg.enterAlt(2);
21.6862 -
21.6863 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:451:4: RULE_REF
21.6864 {
21.6865 - dbg.location(451,4);
21.6866 RULE_REF177=(Token)match(input,RULE_REF,FOLLOW_RULE_REF_in_id3148); if (state.failed) return retval;
21.6867 if ( state.backtracking==0 ) stream_RULE_REF.add(RULE_REF177);
21.6868
21.6869 @@ -10284,7 +8176,6 @@
21.6870 root_0 = (CommonTree)adaptor.nil();
21.6871 // 451:14: -> ID[$RULE_REF]
21.6872 {
21.6873 - dbg.location(451,17);
21.6874 adaptor.addChild(root_0, (CommonTree)adaptor.create(ID, RULE_REF177));
21.6875
21.6876 }
21.6877 @@ -10310,15 +8201,6 @@
21.6878 }
21.6879 finally {
21.6880 }
21.6881 - dbg.location(452, 2);
21.6882 -
21.6883 - }
21.6884 - finally {
21.6885 - dbg.exitRule(getGrammarFileName(), "id");
21.6886 - decRuleLevel();
21.6887 - if ( getRuleLevel()==0 ) {dbg.terminate();}
21.6888 - }
21.6889 -
21.6890 return retval;
21.6891 }
21.6892 // $ANTLR end "id"
21.6893 @@ -10326,11 +8208,8 @@
21.6894 // $ANTLR start synpred1_ANTLRv3
21.6895 public final void synpred1_ANTLRv3_fragment() throws RecognitionException {
21.6896 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:350:4: ( rewrite_template )
21.6897 - dbg.enterAlt(1);
21.6898 -
21.6899 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:350:4: rewrite_template
21.6900 {
21.6901 - dbg.location(350,4);
21.6902 pushFollow(FOLLOW_rewrite_template_in_synpred1_ANTLRv32562);
21.6903 rewrite_template();
21.6904
21.6905 @@ -10344,11 +8223,8 @@
21.6906 // $ANTLR start synpred2_ANTLRv3
21.6907 public final void synpred2_ANTLRv3_fragment() throws RecognitionException {
21.6908 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:351:4: ( rewrite_tree_alternative )
21.6909 - dbg.enterAlt(1);
21.6910 -
21.6911 // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3.g:351:4: rewrite_tree_alternative
21.6912 {
21.6913 - dbg.location(351,4);
21.6914 pushFollow(FOLLOW_rewrite_tree_alternative_in_synpred2_ANTLRv32567);
21.6915 rewrite_tree_alternative();
21.6916
21.6917 @@ -10363,7 +8239,6 @@
21.6918
21.6919 public final boolean synpred2_ANTLRv3() {
21.6920 state.backtracking++;
21.6921 - dbg.beginBacktrack(state.backtracking);
21.6922 int start = input.mark();
21.6923 try {
21.6924 synpred2_ANTLRv3_fragment(); // can never throw exception
21.6925 @@ -10372,14 +8247,12 @@
21.6926 }
21.6927 boolean success = !state.failed;
21.6928 input.rewind(start);
21.6929 - dbg.endBacktrack(state.backtracking, success);
21.6930 state.backtracking--;
21.6931 state.failed=false;
21.6932 return success;
21.6933 }
21.6934 public final boolean synpred1_ANTLRv3() {
21.6935 state.backtracking++;
21.6936 - dbg.beginBacktrack(state.backtracking);
21.6937 int start = input.mark();
21.6938 try {
21.6939 synpred1_ANTLRv3_fragment(); // can never throw exception
21.6940 @@ -10388,7 +8261,6 @@
21.6941 }
21.6942 boolean success = !state.failed;
21.6943 input.rewind(start);
21.6944 - dbg.endBacktrack(state.backtracking, success);
21.6945 state.backtracking--;
21.6946 state.failed=false;
21.6947 return success;
21.6948 @@ -10461,9 +8333,6 @@
21.6949 public String getDescription() {
21.6950 return "233:1: elementNoOptionSpec : ( id (labelOp= '=' | labelOp= '+=' ) atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] ^( $labelOp id atom ) EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> ^( $labelOp id atom ) ) | id (labelOp= '=' | labelOp= '+=' ) block ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] ^( $labelOp id block ) EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> ^( $labelOp id block ) ) | atom ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] atom EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> atom ) | ebnf | ACTION | SEMPRED ( '=>' -> GATED_SEMPRED | -> SEMPRED ) | treeSpec ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] treeSpec EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> treeSpec ) );";
21.6951 }
21.6952 - public void error(NoViableAltException nvae) {
21.6953 - dbg.recognitionException(nvae);
21.6954 - }
21.6955 }
21.6956 static final String DFA64_eotS =
21.6957 "\15\uffff";
21.6958 @@ -10532,9 +8401,6 @@
21.6959 public String getDescription() {
21.6960 return "348:1: rewrite_alternative options {backtrack=true; } : ( rewrite_template | rewrite_tree_alternative | -> ^( ALT[\"ALT\"] EPSILON[\"EPSILON\"] EOA[\"EOA\"] ) );";
21.6961 }
21.6962 - public void error(NoViableAltException nvae) {
21.6963 - dbg.recognitionException(nvae);
21.6964 - }
21.6965 public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
21.6966 TokenStream input = (TokenStream)_input;
21.6967 int _s = s;
21.6968 @@ -10632,9 +8498,6 @@
21.6969 public String getDescription() {
21.6970 return "364:1: rewrite_tree_element : ( rewrite_tree_atom | rewrite_tree_atom ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] rewrite_tree_atom EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | rewrite_tree ( ebnfSuffix -> ^( ebnfSuffix ^( BLOCK[\"BLOCK\"] ^( ALT[\"ALT\"] rewrite_tree EOA[\"EOA\"] ) EOB[\"EOB\"] ) ) | -> rewrite_tree ) | rewrite_tree_ebnf );";
21.6971 }
21.6972 - public void error(NoViableAltException nvae) {
21.6973 - dbg.recognitionException(nvae);
21.6974 - }
21.6975 }
21.6976 static final String DFA72_eotS =
21.6977 "\22\uffff";
21.6978 @@ -10703,9 +8566,6 @@
21.6979 public String getDescription() {
21.6980 return "401:1: rewrite_template : ( id lp= '(' rewrite_template_args ')' (str= DOUBLE_QUOTE_STRING_LITERAL | str= DOUBLE_ANGLE_STRING_LITERAL ) -> ^( TEMPLATE[$lp,\"TEMPLATE\"] id rewrite_template_args $str) | rewrite_template_ref | rewrite_indirect_template_head | ACTION );";
21.6981 }
21.6982 - public void error(NoViableAltException nvae) {
21.6983 - dbg.recognitionException(nvae);
21.6984 - }
21.6985 }
21.6986
21.6987
22.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/gen/ANTLRv3Tree.java Mon Jan 14 15:49:47 2013 +0100
22.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
22.3 @@ -1,5081 +0,0 @@
22.4 -// $ANTLR 3.3 Nov 30, 2010 12:50:56 /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g 2013-01-14 14:05:33
22.5 -
22.6 -package org.netbeans.modules.antlr.editor.gen;
22.7 -
22.8 -
22.9 -import org.antlr.runtime.*;
22.10 -import org.antlr.runtime.tree.*;import java.util.Stack;
22.11 -import java.util.List;
22.12 -import java.util.ArrayList;
22.13 -
22.14 -import org.antlr.runtime.debug.*;
22.15 -import java.io.IOException;
22.16 -/** ANTLR v3 tree grammar to walk trees created by ANTLRv3.g */
22.17 -public class ANTLRv3Tree extends DebugTreeParser {
22.18 - public static final String[] tokenNames = new String[] {
22.19 - "<invalid>", "<EOR>", "<DOWN>", "<UP>", "DOC_COMMENT", "PARSER", "LEXER", "RULE", "BLOCK", "OPTIONAL", "CLOSURE", "POSITIVE_CLOSURE", "SYNPRED", "RANGE", "CHAR_RANGE", "EPSILON", "ALT", "EOR", "EOB", "EOA", "ID", "ARG", "ARGLIST", "RET", "LEXER_GRAMMAR", "PARSER_GRAMMAR", "TREE_GRAMMAR", "COMBINED_GRAMMAR", "INITACTION", "LABEL", "TEMPLATE", "SCOPE", "SEMPRED", "GATED_SEMPRED", "SYN_SEMPRED", "BACKTRACK_SEMPRED", "FRAGMENT", "TREE_BEGIN", "ROOT", "BANG", "REWRITE", "TOKENS", "TOKEN_REF", "STRING_LITERAL", "CHAR_LITERAL", "ACTION", "OPTIONS", "INT", "ARG_ACTION", "RULE_REF", "DOUBLE_QUOTE_STRING_LITERAL", "DOUBLE_ANGLE_STRING_LITERAL", "SRC", "SL_COMMENT", "ML_COMMENT", "LITERAL_CHAR", "ESC", "XDIGIT", "NESTED_ARG_ACTION", "ACTION_STRING_LITERAL", "ACTION_CHAR_LITERAL", "NESTED_ACTION", "ACTION_ESC", "WS_LOOP", "WS", "'lexer'", "'parser'", "'tree'", "'grammar'", "';'", "'}'", "'='", "'@'", "'::'", "'*'", "'protected'", "'public'", "'private'", "'returns'", "':'", "'throws'", "','", "'('", "'|'", "')'", "'catch'", "'finally'", "'+='", "'=>'", "'~'", "'?'", "'+'", "'.'", "'$'"
22.20 - };
22.21 - public static final int EOF=-1;
22.22 - public static final int T__65=65;
22.23 - public static final int T__66=66;
22.24 - public static final int T__67=67;
22.25 - public static final int T__68=68;
22.26 - public static final int T__69=69;
22.27 - public static final int T__70=70;
22.28 - public static final int T__71=71;
22.29 - public static final int T__72=72;
22.30 - public static final int T__73=73;
22.31 - public static final int T__74=74;
22.32 - public static final int T__75=75;
22.33 - public static final int T__76=76;
22.34 - public static final int T__77=77;
22.35 - public static final int T__78=78;
22.36 - public static final int T__79=79;
22.37 - public static final int T__80=80;
22.38 - public static final int T__81=81;
22.39 - public static final int T__82=82;
22.40 - public static final int T__83=83;
22.41 - public static final int T__84=84;
22.42 - public static final int T__85=85;
22.43 - public static final int T__86=86;
22.44 - public static final int T__87=87;
22.45 - public static final int T__88=88;
22.46 - public static final int T__89=89;
22.47 - public static final int T__90=90;
22.48 - public static final int T__91=91;
22.49 - public static final int T__92=92;
22.50 - public static final int T__93=93;
22.51 - public static final int DOC_COMMENT=4;
22.52 - public static final int PARSER=5;
22.53 - public static final int LEXER=6;
22.54 - public static final int RULE=7;
22.55 - public static final int BLOCK=8;
22.56 - public static final int OPTIONAL=9;
22.57 - public static final int CLOSURE=10;
22.58 - public static final int POSITIVE_CLOSURE=11;
22.59 - public static final int SYNPRED=12;
22.60 - public static final int RANGE=13;
22.61 - public static final int CHAR_RANGE=14;
22.62 - public static final int EPSILON=15;
22.63 - public static final int ALT=16;
22.64 - public static final int EOR=17;
22.65 - public static final int EOB=18;
22.66 - public static final int EOA=19;
22.67 - public static final int ID=20;
22.68 - public static final int ARG=21;
22.69 - public static final int ARGLIST=22;
22.70 - public static final int RET=23;
22.71 - public static final int LEXER_GRAMMAR=24;
22.72 - public static final int PARSER_GRAMMAR=25;
22.73 - public static final int TREE_GRAMMAR=26;
22.74 - public static final int COMBINED_GRAMMAR=27;
22.75 - public static final int INITACTION=28;
22.76 - public static final int LABEL=29;
22.77 - public static final int TEMPLATE=30;
22.78 - public static final int SCOPE=31;
22.79 - public static final int SEMPRED=32;
22.80 - public static final int GATED_SEMPRED=33;
22.81 - public static final int SYN_SEMPRED=34;
22.82 - public static final int BACKTRACK_SEMPRED=35;
22.83 - public static final int FRAGMENT=36;
22.84 - public static final int TREE_BEGIN=37;
22.85 - public static final int ROOT=38;
22.86 - public static final int BANG=39;
22.87 - public static final int REWRITE=40;
22.88 - public static final int TOKENS=41;
22.89 - public static final int TOKEN_REF=42;
22.90 - public static final int STRING_LITERAL=43;
22.91 - public static final int CHAR_LITERAL=44;
22.92 - public static final int ACTION=45;
22.93 - public static final int OPTIONS=46;
22.94 - public static final int INT=47;
22.95 - public static final int ARG_ACTION=48;
22.96 - public static final int RULE_REF=49;
22.97 - public static final int DOUBLE_QUOTE_STRING_LITERAL=50;
22.98 - public static final int DOUBLE_ANGLE_STRING_LITERAL=51;
22.99 - public static final int SRC=52;
22.100 - public static final int SL_COMMENT=53;
22.101 - public static final int ML_COMMENT=54;
22.102 - public static final int LITERAL_CHAR=55;
22.103 - public static final int ESC=56;
22.104 - public static final int XDIGIT=57;
22.105 - public static final int NESTED_ARG_ACTION=58;
22.106 - public static final int ACTION_STRING_LITERAL=59;
22.107 - public static final int ACTION_CHAR_LITERAL=60;
22.108 - public static final int NESTED_ACTION=61;
22.109 - public static final int ACTION_ESC=62;
22.110 - public static final int WS_LOOP=63;
22.111 - public static final int WS=64;
22.112 -
22.113 - // delegates
22.114 - // delegators
22.115 -
22.116 - public static final String[] ruleNames = new String[] {
22.117 - "invalidRule", "rewrite_tree_ebnf", "modifier", "rewrite_indirect_template_head",
22.118 - "grammarType", "rewrite_tree_element", "terminal", "ruleAction",
22.119 - "elementNoOptionSpec", "rewrite_template_args", "tokensSpec", "option",
22.120 - "atom", "altList", "action", "rewrite_tree_block", "optionValue",
22.121 - "rewrite_tree_alternative", "attrScope", "tokenSpec", "rewrite_template",
22.122 - "rewrite_tree", "rewrite", "exceptionGroup", "block", "notTerminal",
22.123 - "exceptionHandler", "notSet", "rewrite_tree_atom", "rewrite_alternative",
22.124 - "ebnfSuffix", "range", "ebnf", "throwsSpec", "optionsSpec", "grammarDef",
22.125 - "alternative", "rewrite_template_ref", "treeSpec", "finallyClause",
22.126 - "element", "ruleScopeSpec", "rewrite_template_arg", "rule"
22.127 - };
22.128 - public static final boolean[] decisionCanBacktrack = new boolean[] {
22.129 - false, // invalid decision
22.130 - false, false, false, false, false, false, false, false, false, false,
22.131 - false, false, false, false, false, false, false, false, false,
22.132 - false, false, false, false, false, false, false, false, false,
22.133 - false, false, false, false, false, false, false, false, false,
22.134 - false, false, false, false, false, false, false, false
22.135 - };
22.136 -
22.137 -
22.138 - public int ruleLevel = 0;
22.139 - public int getRuleLevel() { return ruleLevel; }
22.140 - public void incRuleLevel() { ruleLevel++; }
22.141 - public void decRuleLevel() { ruleLevel--; }
22.142 - public ANTLRv3Tree(TreeNodeStream input) {
22.143 - this(input, DebugEventSocketProxy.DEFAULT_DEBUGGER_PORT, new RecognizerSharedState());
22.144 - }
22.145 - public ANTLRv3Tree(TreeNodeStream input, int port, RecognizerSharedState state) {
22.146 - super(input, state);
22.147 - DebugEventSocketProxy proxy =
22.148 - new DebugEventSocketProxy(this, port, input.getTreeAdaptor());
22.149 - setDebugListener(proxy);
22.150 - try {
22.151 - proxy.handshake();
22.152 - }
22.153 - catch (IOException ioe) {
22.154 - reportError(ioe);
22.155 - }
22.156 - }
22.157 - public ANTLRv3Tree(TreeNodeStream input, DebugEventListener dbg) {
22.158 - super(input, dbg, new RecognizerSharedState());
22.159 -
22.160 - }
22.161 - protected boolean evalPredicate(boolean result, String predicate) {
22.162 - dbg.semanticPredicate(result, predicate);
22.163 - return result;
22.164 - }
22.165 -
22.166 -
22.167 - public String[] getTokenNames() { return ANTLRv3Tree.tokenNames; }
22.168 - public String getGrammarFileName() { return "/Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g"; }
22.169 -
22.170 -
22.171 -
22.172 - // $ANTLR start "grammarDef"
22.173 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:41:1: grammarDef : ^( grammarType ID ( DOC_COMMENT )? ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ ) ;
22.174 - public final void grammarDef() throws RecognitionException {
22.175 - try { dbg.enterRule(getGrammarFileName(), "grammarDef");
22.176 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.177 - incRuleLevel();
22.178 - dbg.location(41, 1);
22.179 -
22.180 - try {
22.181 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:42:5: ( ^( grammarType ID ( DOC_COMMENT )? ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ ) )
22.182 - dbg.enterAlt(1);
22.183 -
22.184 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:42:9: ^( grammarType ID ( DOC_COMMENT )? ( optionsSpec )? ( tokensSpec )? ( attrScope )* ( action )* ( rule )+ )
22.185 - {
22.186 - dbg.location(42,9);
22.187 - dbg.location(42,12);
22.188 - pushFollow(FOLLOW_grammarType_in_grammarDef52);
22.189 - grammarType();
22.190 -
22.191 - state._fsp--;
22.192 -
22.193 -
22.194 - match(input, Token.DOWN, null);
22.195 - dbg.location(42,24);
22.196 - match(input,ID,FOLLOW_ID_in_grammarDef54);
22.197 - dbg.location(42,27);
22.198 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:42:27: ( DOC_COMMENT )?
22.199 - int alt1=2;
22.200 - try { dbg.enterSubRule(1);
22.201 - try { dbg.enterDecision(1, decisionCanBacktrack[1]);
22.202 -
22.203 - int LA1_0 = input.LA(1);
22.204 -
22.205 - if ( (LA1_0==DOC_COMMENT) ) {
22.206 - alt1=1;
22.207 - }
22.208 - } finally {dbg.exitDecision(1);}
22.209 -
22.210 - switch (alt1) {
22.211 - case 1 :
22.212 - dbg.enterAlt(1);
22.213 -
22.214 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:42:27: DOC_COMMENT
22.215 - {
22.216 - dbg.location(42,27);
22.217 - match(input,DOC_COMMENT,FOLLOW_DOC_COMMENT_in_grammarDef56);
22.218 -
22.219 - }
22.220 - break;
22.221 -
22.222 - }
22.223 - } finally {dbg.exitSubRule(1);}
22.224 -
22.225 - dbg.location(42,40);
22.226 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:42:40: ( optionsSpec )?
22.227 - int alt2=2;
22.228 - try { dbg.enterSubRule(2);
22.229 - try { dbg.enterDecision(2, decisionCanBacktrack[2]);
22.230 -
22.231 - int LA2_0 = input.LA(1);
22.232 -
22.233 - if ( (LA2_0==OPTIONS) ) {
22.234 - alt2=1;
22.235 - }
22.236 - } finally {dbg.exitDecision(2);}
22.237 -
22.238 - switch (alt2) {
22.239 - case 1 :
22.240 - dbg.enterAlt(1);
22.241 -
22.242 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:42:40: optionsSpec
22.243 - {
22.244 - dbg.location(42,40);
22.245 - pushFollow(FOLLOW_optionsSpec_in_grammarDef59);
22.246 - optionsSpec();
22.247 -
22.248 - state._fsp--;
22.249 -
22.250 -
22.251 - }
22.252 - break;
22.253 -
22.254 - }
22.255 - } finally {dbg.exitSubRule(2);}
22.256 -
22.257 - dbg.location(42,53);
22.258 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:42:53: ( tokensSpec )?
22.259 - int alt3=2;
22.260 - try { dbg.enterSubRule(3);
22.261 - try { dbg.enterDecision(3, decisionCanBacktrack[3]);
22.262 -
22.263 - int LA3_0 = input.LA(1);
22.264 -
22.265 - if ( (LA3_0==TOKENS) ) {
22.266 - alt3=1;
22.267 - }
22.268 - } finally {dbg.exitDecision(3);}
22.269 -
22.270 - switch (alt3) {
22.271 - case 1 :
22.272 - dbg.enterAlt(1);
22.273 -
22.274 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:42:53: tokensSpec
22.275 - {
22.276 - dbg.location(42,53);
22.277 - pushFollow(FOLLOW_tokensSpec_in_grammarDef62);
22.278 - tokensSpec();
22.279 -
22.280 - state._fsp--;
22.281 -
22.282 -
22.283 - }
22.284 - break;
22.285 -
22.286 - }
22.287 - } finally {dbg.exitSubRule(3);}
22.288 -
22.289 - dbg.location(42,65);
22.290 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:42:65: ( attrScope )*
22.291 - try { dbg.enterSubRule(4);
22.292 -
22.293 - loop4:
22.294 - do {
22.295 - int alt4=2;
22.296 - try { dbg.enterDecision(4, decisionCanBacktrack[4]);
22.297 -
22.298 - int LA4_0 = input.LA(1);
22.299 -
22.300 - if ( (LA4_0==SCOPE) ) {
22.301 - alt4=1;
22.302 - }
22.303 -
22.304 -
22.305 - } finally {dbg.exitDecision(4);}
22.306 -
22.307 - switch (alt4) {
22.308 - case 1 :
22.309 - dbg.enterAlt(1);
22.310 -
22.311 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:42:65: attrScope
22.312 - {
22.313 - dbg.location(42,65);
22.314 - pushFollow(FOLLOW_attrScope_in_grammarDef65);
22.315 - attrScope();
22.316 -
22.317 - state._fsp--;
22.318 -
22.319 -
22.320 - }
22.321 - break;
22.322 -
22.323 - default :
22.324 - break loop4;
22.325 - }
22.326 - } while (true);
22.327 - } finally {dbg.exitSubRule(4);}
22.328 -
22.329 - dbg.location(42,76);
22.330 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:42:76: ( action )*
22.331 - try { dbg.enterSubRule(5);
22.332 -
22.333 - loop5:
22.334 - do {
22.335 - int alt5=2;
22.336 - try { dbg.enterDecision(5, decisionCanBacktrack[5]);
22.337 -
22.338 - int LA5_0 = input.LA(1);
22.339 -
22.340 - if ( (LA5_0==72) ) {
22.341 - alt5=1;
22.342 - }
22.343 -
22.344 -
22.345 - } finally {dbg.exitDecision(5);}
22.346 -
22.347 - switch (alt5) {
22.348 - case 1 :
22.349 - dbg.enterAlt(1);
22.350 -
22.351 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:42:76: action
22.352 - {
22.353 - dbg.location(42,76);
22.354 - pushFollow(FOLLOW_action_in_grammarDef68);
22.355 - action();
22.356 -
22.357 - state._fsp--;
22.358 -
22.359 -
22.360 - }
22.361 - break;
22.362 -
22.363 - default :
22.364 - break loop5;
22.365 - }
22.366 - } while (true);
22.367 - } finally {dbg.exitSubRule(5);}
22.368 -
22.369 - dbg.location(42,84);
22.370 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:42:84: ( rule )+
22.371 - int cnt6=0;
22.372 - try { dbg.enterSubRule(6);
22.373 -
22.374 - loop6:
22.375 - do {
22.376 - int alt6=2;
22.377 - try { dbg.enterDecision(6, decisionCanBacktrack[6]);
22.378 -
22.379 - int LA6_0 = input.LA(1);
22.380 -
22.381 - if ( (LA6_0==RULE) ) {
22.382 - alt6=1;
22.383 - }
22.384 -
22.385 -
22.386 - } finally {dbg.exitDecision(6);}
22.387 -
22.388 - switch (alt6) {
22.389 - case 1 :
22.390 - dbg.enterAlt(1);
22.391 -
22.392 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:42:84: rule
22.393 - {
22.394 - dbg.location(42,84);
22.395 - pushFollow(FOLLOW_rule_in_grammarDef71);
22.396 - rule();
22.397 -
22.398 - state._fsp--;
22.399 -
22.400 -
22.401 - }
22.402 - break;
22.403 -
22.404 - default :
22.405 - if ( cnt6 >= 1 ) break loop6;
22.406 - EarlyExitException eee =
22.407 - new EarlyExitException(6, input);
22.408 - dbg.recognitionException(eee);
22.409 -
22.410 - throw eee;
22.411 - }
22.412 - cnt6++;
22.413 - } while (true);
22.414 - } finally {dbg.exitSubRule(6);}
22.415 -
22.416 -
22.417 - match(input, Token.UP, null);
22.418 -
22.419 - }
22.420 -
22.421 - }
22.422 - catch (RecognitionException re) {
22.423 - reportError(re);
22.424 - recover(input,re);
22.425 - }
22.426 - finally {
22.427 - }
22.428 - dbg.location(43, 5);
22.429 -
22.430 - }
22.431 - finally {
22.432 - dbg.exitRule(getGrammarFileName(), "grammarDef");
22.433 - decRuleLevel();
22.434 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.435 - }
22.436 -
22.437 - return ;
22.438 - }
22.439 - // $ANTLR end "grammarDef"
22.440 -
22.441 -
22.442 - // $ANTLR start "grammarType"
22.443 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:45:1: grammarType : ( LEXER_GRAMMAR | PARSER_GRAMMAR | TREE_GRAMMAR | COMBINED_GRAMMAR );
22.444 - public final void grammarType() throws RecognitionException {
22.445 - try { dbg.enterRule(getGrammarFileName(), "grammarType");
22.446 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.447 - incRuleLevel();
22.448 - dbg.location(45, 1);
22.449 -
22.450 - try {
22.451 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:46:2: ( LEXER_GRAMMAR | PARSER_GRAMMAR | TREE_GRAMMAR | COMBINED_GRAMMAR )
22.452 - dbg.enterAlt(1);
22.453 -
22.454 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:
22.455 - {
22.456 - dbg.location(46,2);
22.457 - if ( (input.LA(1)>=LEXER_GRAMMAR && input.LA(1)<=COMBINED_GRAMMAR) ) {
22.458 - input.consume();
22.459 - state.errorRecovery=false;
22.460 - }
22.461 - else {
22.462 - MismatchedSetException mse = new MismatchedSetException(null,input);
22.463 - dbg.recognitionException(mse);
22.464 - throw mse;
22.465 - }
22.466 -
22.467 -
22.468 - }
22.469 -
22.470 - }
22.471 - catch (RecognitionException re) {
22.472 - reportError(re);
22.473 - recover(input,re);
22.474 - }
22.475 - finally {
22.476 - }
22.477 - dbg.location(50, 5);
22.478 -
22.479 - }
22.480 - finally {
22.481 - dbg.exitRule(getGrammarFileName(), "grammarType");
22.482 - decRuleLevel();
22.483 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.484 - }
22.485 -
22.486 - return ;
22.487 - }
22.488 - // $ANTLR end "grammarType"
22.489 -
22.490 -
22.491 - // $ANTLR start "tokensSpec"
22.492 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:52:1: tokensSpec : ^( TOKENS ( tokenSpec )+ ) ;
22.493 - public final void tokensSpec() throws RecognitionException {
22.494 - try { dbg.enterRule(getGrammarFileName(), "tokensSpec");
22.495 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.496 - incRuleLevel();
22.497 - dbg.location(52, 1);
22.498 -
22.499 - try {
22.500 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:53:2: ( ^( TOKENS ( tokenSpec )+ ) )
22.501 - dbg.enterAlt(1);
22.502 -
22.503 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:53:4: ^( TOKENS ( tokenSpec )+ )
22.504 - {
22.505 - dbg.location(53,4);
22.506 - dbg.location(53,6);
22.507 - match(input,TOKENS,FOLLOW_TOKENS_in_tokensSpec127);
22.508 -
22.509 - match(input, Token.DOWN, null);
22.510 - dbg.location(53,13);
22.511 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:53:13: ( tokenSpec )+
22.512 - int cnt7=0;
22.513 - try { dbg.enterSubRule(7);
22.514 -
22.515 - loop7:
22.516 - do {
22.517 - int alt7=2;
22.518 - try { dbg.enterDecision(7, decisionCanBacktrack[7]);
22.519 -
22.520 - int LA7_0 = input.LA(1);
22.521 -
22.522 - if ( (LA7_0==TOKEN_REF||LA7_0==71) ) {
22.523 - alt7=1;
22.524 - }
22.525 -
22.526 -
22.527 - } finally {dbg.exitDecision(7);}
22.528 -
22.529 - switch (alt7) {
22.530 - case 1 :
22.531 - dbg.enterAlt(1);
22.532 -
22.533 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:53:13: tokenSpec
22.534 - {
22.535 - dbg.location(53,13);
22.536 - pushFollow(FOLLOW_tokenSpec_in_tokensSpec129);
22.537 - tokenSpec();
22.538 -
22.539 - state._fsp--;
22.540 -
22.541 -
22.542 - }
22.543 - break;
22.544 -
22.545 - default :
22.546 - if ( cnt7 >= 1 ) break loop7;
22.547 - EarlyExitException eee =
22.548 - new EarlyExitException(7, input);
22.549 - dbg.recognitionException(eee);
22.550 -
22.551 - throw eee;
22.552 - }
22.553 - cnt7++;
22.554 - } while (true);
22.555 - } finally {dbg.exitSubRule(7);}
22.556 -
22.557 -
22.558 - match(input, Token.UP, null);
22.559 -
22.560 - }
22.561 -
22.562 - }
22.563 - catch (RecognitionException re) {
22.564 - reportError(re);
22.565 - recover(input,re);
22.566 - }
22.567 - finally {
22.568 - }
22.569 - dbg.location(54, 2);
22.570 -
22.571 - }
22.572 - finally {
22.573 - dbg.exitRule(getGrammarFileName(), "tokensSpec");
22.574 - decRuleLevel();
22.575 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.576 - }
22.577 -
22.578 - return ;
22.579 - }
22.580 - // $ANTLR end "tokensSpec"
22.581 -
22.582 -
22.583 - // $ANTLR start "tokenSpec"
22.584 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:56:1: tokenSpec : ( ^( '=' TOKEN_REF STRING_LITERAL ) | ^( '=' TOKEN_REF CHAR_LITERAL ) | TOKEN_REF );
22.585 - public final void tokenSpec() throws RecognitionException {
22.586 - try { dbg.enterRule(getGrammarFileName(), "tokenSpec");
22.587 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.588 - incRuleLevel();
22.589 - dbg.location(56, 1);
22.590 -
22.591 - try {
22.592 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:57:2: ( ^( '=' TOKEN_REF STRING_LITERAL ) | ^( '=' TOKEN_REF CHAR_LITERAL ) | TOKEN_REF )
22.593 - int alt8=3;
22.594 - try { dbg.enterDecision(8, decisionCanBacktrack[8]);
22.595 -
22.596 - int LA8_0 = input.LA(1);
22.597 -
22.598 - if ( (LA8_0==71) ) {
22.599 - int LA8_1 = input.LA(2);
22.600 -
22.601 - if ( (LA8_1==DOWN) ) {
22.602 - int LA8_3 = input.LA(3);
22.603 -
22.604 - if ( (LA8_3==TOKEN_REF) ) {
22.605 - int LA8_4 = input.LA(4);
22.606 -
22.607 - if ( (LA8_4==STRING_LITERAL) ) {
22.608 - alt8=1;
22.609 - }
22.610 - else if ( (LA8_4==CHAR_LITERAL) ) {
22.611 - alt8=2;
22.612 - }
22.613 - else {
22.614 - NoViableAltException nvae =
22.615 - new NoViableAltException("", 8, 4, input);
22.616 -
22.617 - dbg.recognitionException(nvae);
22.618 - throw nvae;
22.619 - }
22.620 - }
22.621 - else {
22.622 - NoViableAltException nvae =
22.623 - new NoViableAltException("", 8, 3, input);
22.624 -
22.625 - dbg.recognitionException(nvae);
22.626 - throw nvae;
22.627 - }
22.628 - }
22.629 - else {
22.630 - NoViableAltException nvae =
22.631 - new NoViableAltException("", 8, 1, input);
22.632 -
22.633 - dbg.recognitionException(nvae);
22.634 - throw nvae;
22.635 - }
22.636 - }
22.637 - else if ( (LA8_0==TOKEN_REF) ) {
22.638 - alt8=3;
22.639 - }
22.640 - else {
22.641 - NoViableAltException nvae =
22.642 - new NoViableAltException("", 8, 0, input);
22.643 -
22.644 - dbg.recognitionException(nvae);
22.645 - throw nvae;
22.646 - }
22.647 - } finally {dbg.exitDecision(8);}
22.648 -
22.649 - switch (alt8) {
22.650 - case 1 :
22.651 - dbg.enterAlt(1);
22.652 -
22.653 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:57:4: ^( '=' TOKEN_REF STRING_LITERAL )
22.654 - {
22.655 - dbg.location(57,4);
22.656 - dbg.location(57,6);
22.657 - match(input,71,FOLLOW_71_in_tokenSpec143);
22.658 -
22.659 - match(input, Token.DOWN, null);
22.660 - dbg.location(57,10);
22.661 - match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_tokenSpec145);
22.662 - dbg.location(57,20);
22.663 - match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_tokenSpec147);
22.664 -
22.665 - match(input, Token.UP, null);
22.666 -
22.667 - }
22.668 - break;
22.669 - case 2 :
22.670 - dbg.enterAlt(2);
22.671 -
22.672 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:58:4: ^( '=' TOKEN_REF CHAR_LITERAL )
22.673 - {
22.674 - dbg.location(58,4);
22.675 - dbg.location(58,6);
22.676 - match(input,71,FOLLOW_71_in_tokenSpec154);
22.677 -
22.678 - match(input, Token.DOWN, null);
22.679 - dbg.location(58,10);
22.680 - match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_tokenSpec156);
22.681 - dbg.location(58,20);
22.682 - match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_tokenSpec158);
22.683 -
22.684 - match(input, Token.UP, null);
22.685 -
22.686 - }
22.687 - break;
22.688 - case 3 :
22.689 - dbg.enterAlt(3);
22.690 -
22.691 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:59:4: TOKEN_REF
22.692 - {
22.693 - dbg.location(59,4);
22.694 - match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_tokenSpec164);
22.695 -
22.696 - }
22.697 - break;
22.698 -
22.699 - }
22.700 - }
22.701 - catch (RecognitionException re) {
22.702 - reportError(re);
22.703 - recover(input,re);
22.704 - }
22.705 - finally {
22.706 - }
22.707 - dbg.location(60, 2);
22.708 -
22.709 - }
22.710 - finally {
22.711 - dbg.exitRule(getGrammarFileName(), "tokenSpec");
22.712 - decRuleLevel();
22.713 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.714 - }
22.715 -
22.716 - return ;
22.717 - }
22.718 - // $ANTLR end "tokenSpec"
22.719 -
22.720 -
22.721 - // $ANTLR start "attrScope"
22.722 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:62:1: attrScope : ^( 'scope' ID ACTION ) ;
22.723 - public final void attrScope() throws RecognitionException {
22.724 - try { dbg.enterRule(getGrammarFileName(), "attrScope");
22.725 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.726 - incRuleLevel();
22.727 - dbg.location(62, 1);
22.728 -
22.729 - try {
22.730 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:63:2: ( ^( 'scope' ID ACTION ) )
22.731 - dbg.enterAlt(1);
22.732 -
22.733 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:63:4: ^( 'scope' ID ACTION )
22.734 - {
22.735 - dbg.location(63,4);
22.736 - dbg.location(63,6);
22.737 - match(input,SCOPE,FOLLOW_SCOPE_in_attrScope176);
22.738 -
22.739 - match(input, Token.DOWN, null);
22.740 - dbg.location(63,14);
22.741 - match(input,ID,FOLLOW_ID_in_attrScope178);
22.742 - dbg.location(63,17);
22.743 - match(input,ACTION,FOLLOW_ACTION_in_attrScope180);
22.744 -
22.745 - match(input, Token.UP, null);
22.746 -
22.747 - }
22.748 -
22.749 - }
22.750 - catch (RecognitionException re) {
22.751 - reportError(re);
22.752 - recover(input,re);
22.753 - }
22.754 - finally {
22.755 - }
22.756 - dbg.location(64, 2);
22.757 -
22.758 - }
22.759 - finally {
22.760 - dbg.exitRule(getGrammarFileName(), "attrScope");
22.761 - decRuleLevel();
22.762 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.763 - }
22.764 -
22.765 - return ;
22.766 - }
22.767 - // $ANTLR end "attrScope"
22.768 -
22.769 -
22.770 - // $ANTLR start "action"
22.771 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:66:1: action : ( ^( '@' ID ID ACTION ) | ^( '@' ID ACTION ) );
22.772 - public final void action() throws RecognitionException {
22.773 - try { dbg.enterRule(getGrammarFileName(), "action");
22.774 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.775 - incRuleLevel();
22.776 - dbg.location(66, 1);
22.777 -
22.778 - try {
22.779 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:67:2: ( ^( '@' ID ID ACTION ) | ^( '@' ID ACTION ) )
22.780 - int alt9=2;
22.781 - try { dbg.enterDecision(9, decisionCanBacktrack[9]);
22.782 -
22.783 - int LA9_0 = input.LA(1);
22.784 -
22.785 - if ( (LA9_0==72) ) {
22.786 - int LA9_1 = input.LA(2);
22.787 -
22.788 - if ( (LA9_1==DOWN) ) {
22.789 - int LA9_2 = input.LA(3);
22.790 -
22.791 - if ( (LA9_2==ID) ) {
22.792 - int LA9_3 = input.LA(4);
22.793 -
22.794 - if ( (LA9_3==ID) ) {
22.795 - alt9=1;
22.796 - }
22.797 - else if ( (LA9_3==ACTION) ) {
22.798 - alt9=2;
22.799 - }
22.800 - else {
22.801 - NoViableAltException nvae =
22.802 - new NoViableAltException("", 9, 3, input);
22.803 -
22.804 - dbg.recognitionException(nvae);
22.805 - throw nvae;
22.806 - }
22.807 - }
22.808 - else {
22.809 - NoViableAltException nvae =
22.810 - new NoViableAltException("", 9, 2, input);
22.811 -
22.812 - dbg.recognitionException(nvae);
22.813 - throw nvae;
22.814 - }
22.815 - }
22.816 - else {
22.817 - NoViableAltException nvae =
22.818 - new NoViableAltException("", 9, 1, input);
22.819 -
22.820 - dbg.recognitionException(nvae);
22.821 - throw nvae;
22.822 - }
22.823 - }
22.824 - else {
22.825 - NoViableAltException nvae =
22.826 - new NoViableAltException("", 9, 0, input);
22.827 -
22.828 - dbg.recognitionException(nvae);
22.829 - throw nvae;
22.830 - }
22.831 - } finally {dbg.exitDecision(9);}
22.832 -
22.833 - switch (alt9) {
22.834 - case 1 :
22.835 - dbg.enterAlt(1);
22.836 -
22.837 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:67:4: ^( '@' ID ID ACTION )
22.838 - {
22.839 - dbg.location(67,4);
22.840 - dbg.location(67,6);
22.841 - match(input,72,FOLLOW_72_in_action193);
22.842 -
22.843 - match(input, Token.DOWN, null);
22.844 - dbg.location(67,10);
22.845 - match(input,ID,FOLLOW_ID_in_action195);
22.846 - dbg.location(67,13);
22.847 - match(input,ID,FOLLOW_ID_in_action197);
22.848 - dbg.location(67,16);
22.849 - match(input,ACTION,FOLLOW_ACTION_in_action199);
22.850 -
22.851 - match(input, Token.UP, null);
22.852 -
22.853 - }
22.854 - break;
22.855 - case 2 :
22.856 - dbg.enterAlt(2);
22.857 -
22.858 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:68:4: ^( '@' ID ACTION )
22.859 - {
22.860 - dbg.location(68,4);
22.861 - dbg.location(68,6);
22.862 - match(input,72,FOLLOW_72_in_action206);
22.863 -
22.864 - match(input, Token.DOWN, null);
22.865 - dbg.location(68,10);
22.866 - match(input,ID,FOLLOW_ID_in_action208);
22.867 - dbg.location(68,13);
22.868 - match(input,ACTION,FOLLOW_ACTION_in_action210);
22.869 -
22.870 - match(input, Token.UP, null);
22.871 -
22.872 - }
22.873 - break;
22.874 -
22.875 - }
22.876 - }
22.877 - catch (RecognitionException re) {
22.878 - reportError(re);
22.879 - recover(input,re);
22.880 - }
22.881 - finally {
22.882 - }
22.883 - dbg.location(69, 2);
22.884 -
22.885 - }
22.886 - finally {
22.887 - dbg.exitRule(getGrammarFileName(), "action");
22.888 - decRuleLevel();
22.889 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.890 - }
22.891 -
22.892 - return ;
22.893 - }
22.894 - // $ANTLR end "action"
22.895 -
22.896 -
22.897 - // $ANTLR start "optionsSpec"
22.898 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:71:1: optionsSpec : ^( OPTIONS ( option )+ ) ;
22.899 - public final void optionsSpec() throws RecognitionException {
22.900 - try { dbg.enterRule(getGrammarFileName(), "optionsSpec");
22.901 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.902 - incRuleLevel();
22.903 - dbg.location(71, 1);
22.904 -
22.905 - try {
22.906 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:72:2: ( ^( OPTIONS ( option )+ ) )
22.907 - dbg.enterAlt(1);
22.908 -
22.909 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:72:4: ^( OPTIONS ( option )+ )
22.910 - {
22.911 - dbg.location(72,4);
22.912 - dbg.location(72,6);
22.913 - match(input,OPTIONS,FOLLOW_OPTIONS_in_optionsSpec223);
22.914 -
22.915 - match(input, Token.DOWN, null);
22.916 - dbg.location(72,14);
22.917 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:72:14: ( option )+
22.918 - int cnt10=0;
22.919 - try { dbg.enterSubRule(10);
22.920 -
22.921 - loop10:
22.922 - do {
22.923 - int alt10=2;
22.924 - try { dbg.enterDecision(10, decisionCanBacktrack[10]);
22.925 -
22.926 - int LA10_0 = input.LA(1);
22.927 -
22.928 - if ( (LA10_0==71) ) {
22.929 - alt10=1;
22.930 - }
22.931 -
22.932 -
22.933 - } finally {dbg.exitDecision(10);}
22.934 -
22.935 - switch (alt10) {
22.936 - case 1 :
22.937 - dbg.enterAlt(1);
22.938 -
22.939 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:72:14: option
22.940 - {
22.941 - dbg.location(72,14);
22.942 - pushFollow(FOLLOW_option_in_optionsSpec225);
22.943 - option();
22.944 -
22.945 - state._fsp--;
22.946 -
22.947 -
22.948 - }
22.949 - break;
22.950 -
22.951 - default :
22.952 - if ( cnt10 >= 1 ) break loop10;
22.953 - EarlyExitException eee =
22.954 - new EarlyExitException(10, input);
22.955 - dbg.recognitionException(eee);
22.956 -
22.957 - throw eee;
22.958 - }
22.959 - cnt10++;
22.960 - } while (true);
22.961 - } finally {dbg.exitSubRule(10);}
22.962 -
22.963 -
22.964 - match(input, Token.UP, null);
22.965 -
22.966 - }
22.967 -
22.968 - }
22.969 - catch (RecognitionException re) {
22.970 - reportError(re);
22.971 - recover(input,re);
22.972 - }
22.973 - finally {
22.974 - }
22.975 - dbg.location(73, 2);
22.976 -
22.977 - }
22.978 - finally {
22.979 - dbg.exitRule(getGrammarFileName(), "optionsSpec");
22.980 - decRuleLevel();
22.981 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.982 - }
22.983 -
22.984 - return ;
22.985 - }
22.986 - // $ANTLR end "optionsSpec"
22.987 -
22.988 -
22.989 - // $ANTLR start "option"
22.990 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:75:1: option : ^( '=' ID optionValue ) ;
22.991 - public final void option() throws RecognitionException {
22.992 - try { dbg.enterRule(getGrammarFileName(), "option");
22.993 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.994 - incRuleLevel();
22.995 - dbg.location(75, 1);
22.996 -
22.997 - try {
22.998 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:76:5: ( ^( '=' ID optionValue ) )
22.999 - dbg.enterAlt(1);
22.1000 -
22.1001 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:76:9: ^( '=' ID optionValue )
22.1002 - {
22.1003 - dbg.location(76,9);
22.1004 - dbg.location(76,11);
22.1005 - match(input,71,FOLLOW_71_in_option244);
22.1006 -
22.1007 - match(input, Token.DOWN, null);
22.1008 - dbg.location(76,15);
22.1009 - match(input,ID,FOLLOW_ID_in_option246);
22.1010 - dbg.location(76,18);
22.1011 - pushFollow(FOLLOW_optionValue_in_option248);
22.1012 - optionValue();
22.1013 -
22.1014 - state._fsp--;
22.1015 -
22.1016 -
22.1017 - match(input, Token.UP, null);
22.1018 -
22.1019 - }
22.1020 -
22.1021 - }
22.1022 - catch (RecognitionException re) {
22.1023 - reportError(re);
22.1024 - recover(input,re);
22.1025 - }
22.1026 - finally {
22.1027 - }
22.1028 - dbg.location(77, 3);
22.1029 -
22.1030 - }
22.1031 - finally {
22.1032 - dbg.exitRule(getGrammarFileName(), "option");
22.1033 - decRuleLevel();
22.1034 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.1035 - }
22.1036 -
22.1037 - return ;
22.1038 - }
22.1039 - // $ANTLR end "option"
22.1040 -
22.1041 -
22.1042 - // $ANTLR start "optionValue"
22.1043 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:79:1: optionValue : ( ID | STRING_LITERAL | CHAR_LITERAL | INT );
22.1044 - public final void optionValue() throws RecognitionException {
22.1045 - try { dbg.enterRule(getGrammarFileName(), "optionValue");
22.1046 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.1047 - incRuleLevel();
22.1048 - dbg.location(79, 1);
22.1049 -
22.1050 - try {
22.1051 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:80:5: ( ID | STRING_LITERAL | CHAR_LITERAL | INT )
22.1052 - dbg.enterAlt(1);
22.1053 -
22.1054 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:
22.1055 - {
22.1056 - dbg.location(80,5);
22.1057 - if ( input.LA(1)==ID||(input.LA(1)>=STRING_LITERAL && input.LA(1)<=CHAR_LITERAL)||input.LA(1)==INT ) {
22.1058 - input.consume();
22.1059 - state.errorRecovery=false;
22.1060 - }
22.1061 - else {
22.1062 - MismatchedSetException mse = new MismatchedSetException(null,input);
22.1063 - dbg.recognitionException(mse);
22.1064 - throw mse;
22.1065 - }
22.1066 -
22.1067 -
22.1068 - }
22.1069 -
22.1070 - }
22.1071 - catch (RecognitionException re) {
22.1072 - reportError(re);
22.1073 - recover(input,re);
22.1074 - }
22.1075 - finally {
22.1076 - }
22.1077 - dbg.location(84, 5);
22.1078 -
22.1079 - }
22.1080 - finally {
22.1081 - dbg.exitRule(getGrammarFileName(), "optionValue");
22.1082 - decRuleLevel();
22.1083 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.1084 - }
22.1085 -
22.1086 - return ;
22.1087 - }
22.1088 - // $ANTLR end "optionValue"
22.1089 -
22.1090 -
22.1091 - // $ANTLR start "rule"
22.1092 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:86:1: rule : ^( RULE ID ( modifier )? ( ^( ARG ARG_ACTION ) )? ( ^( RET ARG_ACTION ) )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR ) ;
22.1093 - public final void rule() throws RecognitionException {
22.1094 - try { dbg.enterRule(getGrammarFileName(), "rule");
22.1095 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.1096 - incRuleLevel();
22.1097 - dbg.location(86, 1);
22.1098 -
22.1099 - try {
22.1100 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:87:2: ( ^( RULE ID ( modifier )? ( ^( ARG ARG_ACTION ) )? ( ^( RET ARG_ACTION ) )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR ) )
22.1101 - dbg.enterAlt(1);
22.1102 -
22.1103 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:87:4: ^( RULE ID ( modifier )? ( ^( ARG ARG_ACTION ) )? ( ^( RET ARG_ACTION ) )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR )
22.1104 - {
22.1105 - dbg.location(87,4);
22.1106 - dbg.location(87,7);
22.1107 - match(input,RULE,FOLLOW_RULE_in_rule314);
22.1108 -
22.1109 - match(input, Token.DOWN, null);
22.1110 - dbg.location(87,12);
22.1111 - match(input,ID,FOLLOW_ID_in_rule316);
22.1112 - dbg.location(87,15);
22.1113 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:87:15: ( modifier )?
22.1114 - int alt11=2;
22.1115 - try { dbg.enterSubRule(11);
22.1116 - try { dbg.enterDecision(11, decisionCanBacktrack[11]);
22.1117 -
22.1118 - int LA11_0 = input.LA(1);
22.1119 -
22.1120 - if ( (LA11_0==FRAGMENT||(LA11_0>=75 && LA11_0<=77)) ) {
22.1121 - alt11=1;
22.1122 - }
22.1123 - } finally {dbg.exitDecision(11);}
22.1124 -
22.1125 - switch (alt11) {
22.1126 - case 1 :
22.1127 - dbg.enterAlt(1);
22.1128 -
22.1129 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:87:15: modifier
22.1130 - {
22.1131 - dbg.location(87,15);
22.1132 - pushFollow(FOLLOW_modifier_in_rule318);
22.1133 - modifier();
22.1134 -
22.1135 - state._fsp--;
22.1136 -
22.1137 -
22.1138 - }
22.1139 - break;
22.1140 -
22.1141 - }
22.1142 - } finally {dbg.exitSubRule(11);}
22.1143 -
22.1144 - dbg.location(87,25);
22.1145 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:87:25: ( ^( ARG ARG_ACTION ) )?
22.1146 - int alt12=2;
22.1147 - try { dbg.enterSubRule(12);
22.1148 - try { dbg.enterDecision(12, decisionCanBacktrack[12]);
22.1149 -
22.1150 - int LA12_0 = input.LA(1);
22.1151 -
22.1152 - if ( (LA12_0==ARG) ) {
22.1153 - alt12=1;
22.1154 - }
22.1155 - } finally {dbg.exitDecision(12);}
22.1156 -
22.1157 - switch (alt12) {
22.1158 - case 1 :
22.1159 - dbg.enterAlt(1);
22.1160 -
22.1161 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:87:26: ^( ARG ARG_ACTION )
22.1162 - {
22.1163 - dbg.location(87,26);
22.1164 - dbg.location(87,28);
22.1165 - match(input,ARG,FOLLOW_ARG_in_rule323);
22.1166 -
22.1167 - match(input, Token.DOWN, null);
22.1168 - dbg.location(87,32);
22.1169 - match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rule325);
22.1170 -
22.1171 - match(input, Token.UP, null);
22.1172 -
22.1173 - }
22.1174 - break;
22.1175 -
22.1176 - }
22.1177 - } finally {dbg.exitSubRule(12);}
22.1178 -
22.1179 - dbg.location(87,46);
22.1180 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:87:46: ( ^( RET ARG_ACTION ) )?
22.1181 - int alt13=2;
22.1182 - try { dbg.enterSubRule(13);
22.1183 - try { dbg.enterDecision(13, decisionCanBacktrack[13]);
22.1184 -
22.1185 - int LA13_0 = input.LA(1);
22.1186 -
22.1187 - if ( (LA13_0==RET) ) {
22.1188 - alt13=1;
22.1189 - }
22.1190 - } finally {dbg.exitDecision(13);}
22.1191 -
22.1192 - switch (alt13) {
22.1193 - case 1 :
22.1194 - dbg.enterAlt(1);
22.1195 -
22.1196 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:87:47: ^( RET ARG_ACTION )
22.1197 - {
22.1198 - dbg.location(87,47);
22.1199 - dbg.location(87,49);
22.1200 - match(input,RET,FOLLOW_RET_in_rule332);
22.1201 -
22.1202 - match(input, Token.DOWN, null);
22.1203 - dbg.location(87,53);
22.1204 - match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rule334);
22.1205 -
22.1206 - match(input, Token.UP, null);
22.1207 -
22.1208 - }
22.1209 - break;
22.1210 -
22.1211 - }
22.1212 - } finally {dbg.exitSubRule(13);}
22.1213 -
22.1214 - dbg.location(88,9);
22.1215 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:88:9: ( optionsSpec )?
22.1216 - int alt14=2;
22.1217 - try { dbg.enterSubRule(14);
22.1218 - try { dbg.enterDecision(14, decisionCanBacktrack[14]);
22.1219 -
22.1220 - int LA14_0 = input.LA(1);
22.1221 -
22.1222 - if ( (LA14_0==OPTIONS) ) {
22.1223 - alt14=1;
22.1224 - }
22.1225 - } finally {dbg.exitDecision(14);}
22.1226 -
22.1227 - switch (alt14) {
22.1228 - case 1 :
22.1229 - dbg.enterAlt(1);
22.1230 -
22.1231 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:88:9: optionsSpec
22.1232 - {
22.1233 - dbg.location(88,9);
22.1234 - pushFollow(FOLLOW_optionsSpec_in_rule347);
22.1235 - optionsSpec();
22.1236 -
22.1237 - state._fsp--;
22.1238 -
22.1239 -
22.1240 - }
22.1241 - break;
22.1242 -
22.1243 - }
22.1244 - } finally {dbg.exitSubRule(14);}
22.1245 -
22.1246 - dbg.location(88,22);
22.1247 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:88:22: ( ruleScopeSpec )?
22.1248 - int alt15=2;
22.1249 - try { dbg.enterSubRule(15);
22.1250 - try { dbg.enterDecision(15, decisionCanBacktrack[15]);
22.1251 -
22.1252 - int LA15_0 = input.LA(1);
22.1253 -
22.1254 - if ( (LA15_0==SCOPE) ) {
22.1255 - alt15=1;
22.1256 - }
22.1257 - } finally {dbg.exitDecision(15);}
22.1258 -
22.1259 - switch (alt15) {
22.1260 - case 1 :
22.1261 - dbg.enterAlt(1);
22.1262 -
22.1263 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:88:22: ruleScopeSpec
22.1264 - {
22.1265 - dbg.location(88,22);
22.1266 - pushFollow(FOLLOW_ruleScopeSpec_in_rule350);
22.1267 - ruleScopeSpec();
22.1268 -
22.1269 - state._fsp--;
22.1270 -
22.1271 -
22.1272 - }
22.1273 - break;
22.1274 -
22.1275 - }
22.1276 - } finally {dbg.exitSubRule(15);}
22.1277 -
22.1278 - dbg.location(88,37);
22.1279 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:88:37: ( ruleAction )*
22.1280 - try { dbg.enterSubRule(16);
22.1281 -
22.1282 - loop16:
22.1283 - do {
22.1284 - int alt16=2;
22.1285 - try { dbg.enterDecision(16, decisionCanBacktrack[16]);
22.1286 -
22.1287 - int LA16_0 = input.LA(1);
22.1288 -
22.1289 - if ( (LA16_0==72) ) {
22.1290 - alt16=1;
22.1291 - }
22.1292 -
22.1293 -
22.1294 - } finally {dbg.exitDecision(16);}
22.1295 -
22.1296 - switch (alt16) {
22.1297 - case 1 :
22.1298 - dbg.enterAlt(1);
22.1299 -
22.1300 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:88:37: ruleAction
22.1301 - {
22.1302 - dbg.location(88,37);
22.1303 - pushFollow(FOLLOW_ruleAction_in_rule353);
22.1304 - ruleAction();
22.1305 -
22.1306 - state._fsp--;
22.1307 -
22.1308 -
22.1309 - }
22.1310 - break;
22.1311 -
22.1312 - default :
22.1313 - break loop16;
22.1314 - }
22.1315 - } while (true);
22.1316 - } finally {dbg.exitSubRule(16);}
22.1317 -
22.1318 - dbg.location(89,9);
22.1319 - pushFollow(FOLLOW_altList_in_rule364);
22.1320 - altList();
22.1321 -
22.1322 - state._fsp--;
22.1323 -
22.1324 - dbg.location(90,9);
22.1325 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:90:9: ( exceptionGroup )?
22.1326 - int alt17=2;
22.1327 - try { dbg.enterSubRule(17);
22.1328 - try { dbg.enterDecision(17, decisionCanBacktrack[17]);
22.1329 -
22.1330 - int LA17_0 = input.LA(1);
22.1331 -
22.1332 - if ( ((LA17_0>=85 && LA17_0<=86)) ) {
22.1333 - alt17=1;
22.1334 - }
22.1335 - } finally {dbg.exitDecision(17);}
22.1336 -
22.1337 - switch (alt17) {
22.1338 - case 1 :
22.1339 - dbg.enterAlt(1);
22.1340 -
22.1341 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:90:9: exceptionGroup
22.1342 - {
22.1343 - dbg.location(90,9);
22.1344 - pushFollow(FOLLOW_exceptionGroup_in_rule374);
22.1345 - exceptionGroup();
22.1346 -
22.1347 - state._fsp--;
22.1348 -
22.1349 -
22.1350 - }
22.1351 - break;
22.1352 -
22.1353 - }
22.1354 - } finally {dbg.exitSubRule(17);}
22.1355 -
22.1356 - dbg.location(90,25);
22.1357 - match(input,EOR,FOLLOW_EOR_in_rule377);
22.1358 -
22.1359 - match(input, Token.UP, null);
22.1360 -
22.1361 - }
22.1362 -
22.1363 - }
22.1364 - catch (RecognitionException re) {
22.1365 - reportError(re);
22.1366 - recover(input,re);
22.1367 - }
22.1368 - finally {
22.1369 - }
22.1370 - dbg.location(92, 2);
22.1371 -
22.1372 - }
22.1373 - finally {
22.1374 - dbg.exitRule(getGrammarFileName(), "rule");
22.1375 - decRuleLevel();
22.1376 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.1377 - }
22.1378 -
22.1379 - return ;
22.1380 - }
22.1381 - // $ANTLR end "rule"
22.1382 -
22.1383 -
22.1384 - // $ANTLR start "modifier"
22.1385 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:94:1: modifier : ( 'protected' | 'public' | 'private' | 'fragment' );
22.1386 - public final void modifier() throws RecognitionException {
22.1387 - try { dbg.enterRule(getGrammarFileName(), "modifier");
22.1388 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.1389 - incRuleLevel();
22.1390 - dbg.location(94, 1);
22.1391 -
22.1392 - try {
22.1393 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:95:2: ( 'protected' | 'public' | 'private' | 'fragment' )
22.1394 - dbg.enterAlt(1);
22.1395 -
22.1396 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:
22.1397 - {
22.1398 - dbg.location(95,2);
22.1399 - if ( input.LA(1)==FRAGMENT||(input.LA(1)>=75 && input.LA(1)<=77) ) {
22.1400 - input.consume();
22.1401 - state.errorRecovery=false;
22.1402 - }
22.1403 - else {
22.1404 - MismatchedSetException mse = new MismatchedSetException(null,input);
22.1405 - dbg.recognitionException(mse);
22.1406 - throw mse;
22.1407 - }
22.1408 -
22.1409 -
22.1410 - }
22.1411 -
22.1412 - }
22.1413 - catch (RecognitionException re) {
22.1414 - reportError(re);
22.1415 - recover(input,re);
22.1416 - }
22.1417 - finally {
22.1418 - }
22.1419 - dbg.location(96, 2);
22.1420 -
22.1421 - }
22.1422 - finally {
22.1423 - dbg.exitRule(getGrammarFileName(), "modifier");
22.1424 - decRuleLevel();
22.1425 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.1426 - }
22.1427 -
22.1428 - return ;
22.1429 - }
22.1430 - // $ANTLR end "modifier"
22.1431 -
22.1432 -
22.1433 - // $ANTLR start "ruleAction"
22.1434 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:98:1: ruleAction : ^( '@' ID ACTION ) ;
22.1435 - public final void ruleAction() throws RecognitionException {
22.1436 - try { dbg.enterRule(getGrammarFileName(), "ruleAction");
22.1437 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.1438 - incRuleLevel();
22.1439 - dbg.location(98, 1);
22.1440 -
22.1441 - try {
22.1442 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:100:2: ( ^( '@' ID ACTION ) )
22.1443 - dbg.enterAlt(1);
22.1444 -
22.1445 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:100:4: ^( '@' ID ACTION )
22.1446 - {
22.1447 - dbg.location(100,4);
22.1448 - dbg.location(100,6);
22.1449 - match(input,72,FOLLOW_72_in_ruleAction416);
22.1450 -
22.1451 - match(input, Token.DOWN, null);
22.1452 - dbg.location(100,10);
22.1453 - match(input,ID,FOLLOW_ID_in_ruleAction418);
22.1454 - dbg.location(100,13);
22.1455 - match(input,ACTION,FOLLOW_ACTION_in_ruleAction420);
22.1456 -
22.1457 - match(input, Token.UP, null);
22.1458 -
22.1459 - }
22.1460 -
22.1461 - }
22.1462 - catch (RecognitionException re) {
22.1463 - reportError(re);
22.1464 - recover(input,re);
22.1465 - }
22.1466 - finally {
22.1467 - }
22.1468 - dbg.location(101, 2);
22.1469 -
22.1470 - }
22.1471 - finally {
22.1472 - dbg.exitRule(getGrammarFileName(), "ruleAction");
22.1473 - decRuleLevel();
22.1474 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.1475 - }
22.1476 -
22.1477 - return ;
22.1478 - }
22.1479 - // $ANTLR end "ruleAction"
22.1480 -
22.1481 -
22.1482 - // $ANTLR start "throwsSpec"
22.1483 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:103:1: throwsSpec : ^( 'throws' ( ID )+ ) ;
22.1484 - public final void throwsSpec() throws RecognitionException {
22.1485 - try { dbg.enterRule(getGrammarFileName(), "throwsSpec");
22.1486 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.1487 - incRuleLevel();
22.1488 - dbg.location(103, 1);
22.1489 -
22.1490 - try {
22.1491 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:104:2: ( ^( 'throws' ( ID )+ ) )
22.1492 - dbg.enterAlt(1);
22.1493 -
22.1494 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:104:4: ^( 'throws' ( ID )+ )
22.1495 - {
22.1496 - dbg.location(104,4);
22.1497 - dbg.location(104,6);
22.1498 - match(input,80,FOLLOW_80_in_throwsSpec433);
22.1499 -
22.1500 - match(input, Token.DOWN, null);
22.1501 - dbg.location(104,15);
22.1502 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:104:15: ( ID )+
22.1503 - int cnt18=0;
22.1504 - try { dbg.enterSubRule(18);
22.1505 -
22.1506 - loop18:
22.1507 - do {
22.1508 - int alt18=2;
22.1509 - try { dbg.enterDecision(18, decisionCanBacktrack[18]);
22.1510 -
22.1511 - int LA18_0 = input.LA(1);
22.1512 -
22.1513 - if ( (LA18_0==ID) ) {
22.1514 - alt18=1;
22.1515 - }
22.1516 -
22.1517 -
22.1518 - } finally {dbg.exitDecision(18);}
22.1519 -
22.1520 - switch (alt18) {
22.1521 - case 1 :
22.1522 - dbg.enterAlt(1);
22.1523 -
22.1524 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:104:15: ID
22.1525 - {
22.1526 - dbg.location(104,15);
22.1527 - match(input,ID,FOLLOW_ID_in_throwsSpec435);
22.1528 -
22.1529 - }
22.1530 - break;
22.1531 -
22.1532 - default :
22.1533 - if ( cnt18 >= 1 ) break loop18;
22.1534 - EarlyExitException eee =
22.1535 - new EarlyExitException(18, input);
22.1536 - dbg.recognitionException(eee);
22.1537 -
22.1538 - throw eee;
22.1539 - }
22.1540 - cnt18++;
22.1541 - } while (true);
22.1542 - } finally {dbg.exitSubRule(18);}
22.1543 -
22.1544 -
22.1545 - match(input, Token.UP, null);
22.1546 -
22.1547 - }
22.1548 -
22.1549 - }
22.1550 - catch (RecognitionException re) {
22.1551 - reportError(re);
22.1552 - recover(input,re);
22.1553 - }
22.1554 - finally {
22.1555 - }
22.1556 - dbg.location(105, 2);
22.1557 -
22.1558 - }
22.1559 - finally {
22.1560 - dbg.exitRule(getGrammarFileName(), "throwsSpec");
22.1561 - decRuleLevel();
22.1562 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.1563 - }
22.1564 -
22.1565 - return ;
22.1566 - }
22.1567 - // $ANTLR end "throwsSpec"
22.1568 -
22.1569 -
22.1570 - // $ANTLR start "ruleScopeSpec"
22.1571 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:107:1: ruleScopeSpec : ( ^( 'scope' ACTION ) | ^( 'scope' ACTION ( ID )+ ) | ^( 'scope' ( ID )+ ) );
22.1572 - public final void ruleScopeSpec() throws RecognitionException {
22.1573 - try { dbg.enterRule(getGrammarFileName(), "ruleScopeSpec");
22.1574 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.1575 - incRuleLevel();
22.1576 - dbg.location(107, 1);
22.1577 -
22.1578 - try {
22.1579 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:108:2: ( ^( 'scope' ACTION ) | ^( 'scope' ACTION ( ID )+ ) | ^( 'scope' ( ID )+ ) )
22.1580 - int alt21=3;
22.1581 - try { dbg.enterDecision(21, decisionCanBacktrack[21]);
22.1582 -
22.1583 - int LA21_0 = input.LA(1);
22.1584 -
22.1585 - if ( (LA21_0==SCOPE) ) {
22.1586 - int LA21_1 = input.LA(2);
22.1587 -
22.1588 - if ( (LA21_1==DOWN) ) {
22.1589 - int LA21_2 = input.LA(3);
22.1590 -
22.1591 - if ( (LA21_2==ACTION) ) {
22.1592 - int LA21_3 = input.LA(4);
22.1593 -
22.1594 - if ( (LA21_3==UP) ) {
22.1595 - alt21=1;
22.1596 - }
22.1597 - else if ( (LA21_3==ID) ) {
22.1598 - alt21=2;
22.1599 - }
22.1600 - else {
22.1601 - NoViableAltException nvae =
22.1602 - new NoViableAltException("", 21, 3, input);
22.1603 -
22.1604 - dbg.recognitionException(nvae);
22.1605 - throw nvae;
22.1606 - }
22.1607 - }
22.1608 - else if ( (LA21_2==ID) ) {
22.1609 - alt21=3;
22.1610 - }
22.1611 - else {
22.1612 - NoViableAltException nvae =
22.1613 - new NoViableAltException("", 21, 2, input);
22.1614 -
22.1615 - dbg.recognitionException(nvae);
22.1616 - throw nvae;
22.1617 - }
22.1618 - }
22.1619 - else {
22.1620 - NoViableAltException nvae =
22.1621 - new NoViableAltException("", 21, 1, input);
22.1622 -
22.1623 - dbg.recognitionException(nvae);
22.1624 - throw nvae;
22.1625 - }
22.1626 - }
22.1627 - else {
22.1628 - NoViableAltException nvae =
22.1629 - new NoViableAltException("", 21, 0, input);
22.1630 -
22.1631 - dbg.recognitionException(nvae);
22.1632 - throw nvae;
22.1633 - }
22.1634 - } finally {dbg.exitDecision(21);}
22.1635 -
22.1636 - switch (alt21) {
22.1637 - case 1 :
22.1638 - dbg.enterAlt(1);
22.1639 -
22.1640 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:108:4: ^( 'scope' ACTION )
22.1641 - {
22.1642 - dbg.location(108,4);
22.1643 - dbg.location(108,6);
22.1644 - match(input,SCOPE,FOLLOW_SCOPE_in_ruleScopeSpec449);
22.1645 -
22.1646 - match(input, Token.DOWN, null);
22.1647 - dbg.location(108,14);
22.1648 - match(input,ACTION,FOLLOW_ACTION_in_ruleScopeSpec451);
22.1649 -
22.1650 - match(input, Token.UP, null);
22.1651 -
22.1652 - }
22.1653 - break;
22.1654 - case 2 :
22.1655 - dbg.enterAlt(2);
22.1656 -
22.1657 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:109:4: ^( 'scope' ACTION ( ID )+ )
22.1658 - {
22.1659 - dbg.location(109,4);
22.1660 - dbg.location(109,6);
22.1661 - match(input,SCOPE,FOLLOW_SCOPE_in_ruleScopeSpec458);
22.1662 -
22.1663 - match(input, Token.DOWN, null);
22.1664 - dbg.location(109,14);
22.1665 - match(input,ACTION,FOLLOW_ACTION_in_ruleScopeSpec460);
22.1666 - dbg.location(109,21);
22.1667 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:109:21: ( ID )+
22.1668 - int cnt19=0;
22.1669 - try { dbg.enterSubRule(19);
22.1670 -
22.1671 - loop19:
22.1672 - do {
22.1673 - int alt19=2;
22.1674 - try { dbg.enterDecision(19, decisionCanBacktrack[19]);
22.1675 -
22.1676 - int LA19_0 = input.LA(1);
22.1677 -
22.1678 - if ( (LA19_0==ID) ) {
22.1679 - alt19=1;
22.1680 - }
22.1681 -
22.1682 -
22.1683 - } finally {dbg.exitDecision(19);}
22.1684 -
22.1685 - switch (alt19) {
22.1686 - case 1 :
22.1687 - dbg.enterAlt(1);
22.1688 -
22.1689 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:109:21: ID
22.1690 - {
22.1691 - dbg.location(109,21);
22.1692 - match(input,ID,FOLLOW_ID_in_ruleScopeSpec462);
22.1693 -
22.1694 - }
22.1695 - break;
22.1696 -
22.1697 - default :
22.1698 - if ( cnt19 >= 1 ) break loop19;
22.1699 - EarlyExitException eee =
22.1700 - new EarlyExitException(19, input);
22.1701 - dbg.recognitionException(eee);
22.1702 -
22.1703 - throw eee;
22.1704 - }
22.1705 - cnt19++;
22.1706 - } while (true);
22.1707 - } finally {dbg.exitSubRule(19);}
22.1708 -
22.1709 -
22.1710 - match(input, Token.UP, null);
22.1711 -
22.1712 - }
22.1713 - break;
22.1714 - case 3 :
22.1715 - dbg.enterAlt(3);
22.1716 -
22.1717 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:110:4: ^( 'scope' ( ID )+ )
22.1718 - {
22.1719 - dbg.location(110,4);
22.1720 - dbg.location(110,6);
22.1721 - match(input,SCOPE,FOLLOW_SCOPE_in_ruleScopeSpec470);
22.1722 -
22.1723 - match(input, Token.DOWN, null);
22.1724 - dbg.location(110,14);
22.1725 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:110:14: ( ID )+
22.1726 - int cnt20=0;
22.1727 - try { dbg.enterSubRule(20);
22.1728 -
22.1729 - loop20:
22.1730 - do {
22.1731 - int alt20=2;
22.1732 - try { dbg.enterDecision(20, decisionCanBacktrack[20]);
22.1733 -
22.1734 - int LA20_0 = input.LA(1);
22.1735 -
22.1736 - if ( (LA20_0==ID) ) {
22.1737 - alt20=1;
22.1738 - }
22.1739 -
22.1740 -
22.1741 - } finally {dbg.exitDecision(20);}
22.1742 -
22.1743 - switch (alt20) {
22.1744 - case 1 :
22.1745 - dbg.enterAlt(1);
22.1746 -
22.1747 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:110:14: ID
22.1748 - {
22.1749 - dbg.location(110,14);
22.1750 - match(input,ID,FOLLOW_ID_in_ruleScopeSpec472);
22.1751 -
22.1752 - }
22.1753 - break;
22.1754 -
22.1755 - default :
22.1756 - if ( cnt20 >= 1 ) break loop20;
22.1757 - EarlyExitException eee =
22.1758 - new EarlyExitException(20, input);
22.1759 - dbg.recognitionException(eee);
22.1760 -
22.1761 - throw eee;
22.1762 - }
22.1763 - cnt20++;
22.1764 - } while (true);
22.1765 - } finally {dbg.exitSubRule(20);}
22.1766 -
22.1767 -
22.1768 - match(input, Token.UP, null);
22.1769 -
22.1770 - }
22.1771 - break;
22.1772 -
22.1773 - }
22.1774 - }
22.1775 - catch (RecognitionException re) {
22.1776 - reportError(re);
22.1777 - recover(input,re);
22.1778 - }
22.1779 - finally {
22.1780 - }
22.1781 - dbg.location(111, 2);
22.1782 -
22.1783 - }
22.1784 - finally {
22.1785 - dbg.exitRule(getGrammarFileName(), "ruleScopeSpec");
22.1786 - decRuleLevel();
22.1787 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.1788 - }
22.1789 -
22.1790 - return ;
22.1791 - }
22.1792 - // $ANTLR end "ruleScopeSpec"
22.1793 -
22.1794 -
22.1795 - // $ANTLR start "block"
22.1796 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:113:1: block : ^( BLOCK ( optionsSpec )? ( alternative rewrite )+ EOB ) ;
22.1797 - public final void block() throws RecognitionException {
22.1798 - try { dbg.enterRule(getGrammarFileName(), "block");
22.1799 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.1800 - incRuleLevel();
22.1801 - dbg.location(113, 1);
22.1802 -
22.1803 - try {
22.1804 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:114:5: ( ^( BLOCK ( optionsSpec )? ( alternative rewrite )+ EOB ) )
22.1805 - dbg.enterAlt(1);
22.1806 -
22.1807 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:114:9: ^( BLOCK ( optionsSpec )? ( alternative rewrite )+ EOB )
22.1808 - {
22.1809 - dbg.location(114,9);
22.1810 - dbg.location(114,12);
22.1811 - match(input,BLOCK,FOLLOW_BLOCK_in_block492);
22.1812 -
22.1813 - match(input, Token.DOWN, null);
22.1814 - dbg.location(114,18);
22.1815 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:114:18: ( optionsSpec )?
22.1816 - int alt22=2;
22.1817 - try { dbg.enterSubRule(22);
22.1818 - try { dbg.enterDecision(22, decisionCanBacktrack[22]);
22.1819 -
22.1820 - int LA22_0 = input.LA(1);
22.1821 -
22.1822 - if ( (LA22_0==OPTIONS) ) {
22.1823 - alt22=1;
22.1824 - }
22.1825 - } finally {dbg.exitDecision(22);}
22.1826 -
22.1827 - switch (alt22) {
22.1828 - case 1 :
22.1829 - dbg.enterAlt(1);
22.1830 -
22.1831 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:114:18: optionsSpec
22.1832 - {
22.1833 - dbg.location(114,18);
22.1834 - pushFollow(FOLLOW_optionsSpec_in_block494);
22.1835 - optionsSpec();
22.1836 -
22.1837 - state._fsp--;
22.1838 -
22.1839 -
22.1840 - }
22.1841 - break;
22.1842 -
22.1843 - }
22.1844 - } finally {dbg.exitSubRule(22);}
22.1845 -
22.1846 - dbg.location(114,31);
22.1847 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:114:31: ( alternative rewrite )+
22.1848 - int cnt23=0;
22.1849 - try { dbg.enterSubRule(23);
22.1850 -
22.1851 - loop23:
22.1852 - do {
22.1853 - int alt23=2;
22.1854 - try { dbg.enterDecision(23, decisionCanBacktrack[23]);
22.1855 -
22.1856 - int LA23_0 = input.LA(1);
22.1857 -
22.1858 - if ( (LA23_0==ALT) ) {
22.1859 - alt23=1;
22.1860 - }
22.1861 -
22.1862 -
22.1863 - } finally {dbg.exitDecision(23);}
22.1864 -
22.1865 - switch (alt23) {
22.1866 - case 1 :
22.1867 - dbg.enterAlt(1);
22.1868 -
22.1869 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:114:32: alternative rewrite
22.1870 - {
22.1871 - dbg.location(114,32);
22.1872 - pushFollow(FOLLOW_alternative_in_block498);
22.1873 - alternative();
22.1874 -
22.1875 - state._fsp--;
22.1876 -
22.1877 - dbg.location(114,44);
22.1878 - pushFollow(FOLLOW_rewrite_in_block500);
22.1879 - rewrite();
22.1880 -
22.1881 - state._fsp--;
22.1882 -
22.1883 -
22.1884 - }
22.1885 - break;
22.1886 -
22.1887 - default :
22.1888 - if ( cnt23 >= 1 ) break loop23;
22.1889 - EarlyExitException eee =
22.1890 - new EarlyExitException(23, input);
22.1891 - dbg.recognitionException(eee);
22.1892 -
22.1893 - throw eee;
22.1894 - }
22.1895 - cnt23++;
22.1896 - } while (true);
22.1897 - } finally {dbg.exitSubRule(23);}
22.1898 -
22.1899 - dbg.location(114,54);
22.1900 - match(input,EOB,FOLLOW_EOB_in_block504);
22.1901 -
22.1902 - match(input, Token.UP, null);
22.1903 -
22.1904 - }
22.1905 -
22.1906 - }
22.1907 - catch (RecognitionException re) {
22.1908 - reportError(re);
22.1909 - recover(input,re);
22.1910 - }
22.1911 - finally {
22.1912 - }
22.1913 - dbg.location(115, 5);
22.1914 -
22.1915 - }
22.1916 - finally {
22.1917 - dbg.exitRule(getGrammarFileName(), "block");
22.1918 - decRuleLevel();
22.1919 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.1920 - }
22.1921 -
22.1922 - return ;
22.1923 - }
22.1924 - // $ANTLR end "block"
22.1925 -
22.1926 -
22.1927 - // $ANTLR start "altList"
22.1928 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:117:1: altList : ^( BLOCK ( alternative rewrite )+ EOB ) ;
22.1929 - public final void altList() throws RecognitionException {
22.1930 - try { dbg.enterRule(getGrammarFileName(), "altList");
22.1931 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.1932 - incRuleLevel();
22.1933 - dbg.location(117, 1);
22.1934 -
22.1935 - try {
22.1936 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:118:5: ( ^( BLOCK ( alternative rewrite )+ EOB ) )
22.1937 - dbg.enterAlt(1);
22.1938 -
22.1939 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:118:9: ^( BLOCK ( alternative rewrite )+ EOB )
22.1940 - {
22.1941 - dbg.location(118,9);
22.1942 - dbg.location(118,12);
22.1943 - match(input,BLOCK,FOLLOW_BLOCK_in_altList527);
22.1944 -
22.1945 - match(input, Token.DOWN, null);
22.1946 - dbg.location(118,18);
22.1947 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:118:18: ( alternative rewrite )+
22.1948 - int cnt24=0;
22.1949 - try { dbg.enterSubRule(24);
22.1950 -
22.1951 - loop24:
22.1952 - do {
22.1953 - int alt24=2;
22.1954 - try { dbg.enterDecision(24, decisionCanBacktrack[24]);
22.1955 -
22.1956 - int LA24_0 = input.LA(1);
22.1957 -
22.1958 - if ( (LA24_0==ALT) ) {
22.1959 - alt24=1;
22.1960 - }
22.1961 -
22.1962 -
22.1963 - } finally {dbg.exitDecision(24);}
22.1964 -
22.1965 - switch (alt24) {
22.1966 - case 1 :
22.1967 - dbg.enterAlt(1);
22.1968 -
22.1969 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:118:19: alternative rewrite
22.1970 - {
22.1971 - dbg.location(118,19);
22.1972 - pushFollow(FOLLOW_alternative_in_altList530);
22.1973 - alternative();
22.1974 -
22.1975 - state._fsp--;
22.1976 -
22.1977 - dbg.location(118,31);
22.1978 - pushFollow(FOLLOW_rewrite_in_altList532);
22.1979 - rewrite();
22.1980 -
22.1981 - state._fsp--;
22.1982 -
22.1983 -
22.1984 - }
22.1985 - break;
22.1986 -
22.1987 - default :
22.1988 - if ( cnt24 >= 1 ) break loop24;
22.1989 - EarlyExitException eee =
22.1990 - new EarlyExitException(24, input);
22.1991 - dbg.recognitionException(eee);
22.1992 -
22.1993 - throw eee;
22.1994 - }
22.1995 - cnt24++;
22.1996 - } while (true);
22.1997 - } finally {dbg.exitSubRule(24);}
22.1998 -
22.1999 - dbg.location(118,41);
22.2000 - match(input,EOB,FOLLOW_EOB_in_altList536);
22.2001 -
22.2002 - match(input, Token.UP, null);
22.2003 -
22.2004 - }
22.2005 -
22.2006 - }
22.2007 - catch (RecognitionException re) {
22.2008 - reportError(re);
22.2009 - recover(input,re);
22.2010 - }
22.2011 - finally {
22.2012 - }
22.2013 - dbg.location(119, 5);
22.2014 -
22.2015 - }
22.2016 - finally {
22.2017 - dbg.exitRule(getGrammarFileName(), "altList");
22.2018 - decRuleLevel();
22.2019 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.2020 - }
22.2021 -
22.2022 - return ;
22.2023 - }
22.2024 - // $ANTLR end "altList"
22.2025 -
22.2026 -
22.2027 - // $ANTLR start "alternative"
22.2028 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:121:1: alternative : ( ^( ALT ( element )+ EOA ) | ^( ALT EPSILON EOA ) );
22.2029 - public final void alternative() throws RecognitionException {
22.2030 - try { dbg.enterRule(getGrammarFileName(), "alternative");
22.2031 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.2032 - incRuleLevel();
22.2033 - dbg.location(121, 1);
22.2034 -
22.2035 - try {
22.2036 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:122:5: ( ^( ALT ( element )+ EOA ) | ^( ALT EPSILON EOA ) )
22.2037 - int alt26=2;
22.2038 - try { dbg.enterDecision(26, decisionCanBacktrack[26]);
22.2039 -
22.2040 - int LA26_0 = input.LA(1);
22.2041 -
22.2042 - if ( (LA26_0==ALT) ) {
22.2043 - int LA26_1 = input.LA(2);
22.2044 -
22.2045 - if ( (LA26_1==DOWN) ) {
22.2046 - int LA26_2 = input.LA(3);
22.2047 -
22.2048 - if ( (LA26_2==EPSILON) ) {
22.2049 - alt26=2;
22.2050 - }
22.2051 - else if ( ((LA26_2>=BLOCK && LA26_2<=SYNPRED)||LA26_2==CHAR_RANGE||(LA26_2>=SEMPRED && LA26_2<=SYN_SEMPRED)||(LA26_2>=TREE_BEGIN && LA26_2<=BANG)||(LA26_2>=TOKEN_REF && LA26_2<=ACTION)||LA26_2==RULE_REF||LA26_2==71||LA26_2==87||LA26_2==89||LA26_2==92) ) {
22.2052 - alt26=1;
22.2053 - }
22.2054 - else {
22.2055 - NoViableAltException nvae =
22.2056 - new NoViableAltException("", 26, 2, input);
22.2057 -
22.2058 - dbg.recognitionException(nvae);
22.2059 - throw nvae;
22.2060 - }
22.2061 - }
22.2062 - else {
22.2063 - NoViableAltException nvae =
22.2064 - new NoViableAltException("", 26, 1, input);
22.2065 -
22.2066 - dbg.recognitionException(nvae);
22.2067 - throw nvae;
22.2068 - }
22.2069 - }
22.2070 - else {
22.2071 - NoViableAltException nvae =
22.2072 - new NoViableAltException("", 26, 0, input);
22.2073 -
22.2074 - dbg.recognitionException(nvae);
22.2075 - throw nvae;
22.2076 - }
22.2077 - } finally {dbg.exitDecision(26);}
22.2078 -
22.2079 - switch (alt26) {
22.2080 - case 1 :
22.2081 - dbg.enterAlt(1);
22.2082 -
22.2083 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:122:9: ^( ALT ( element )+ EOA )
22.2084 - {
22.2085 - dbg.location(122,9);
22.2086 - dbg.location(122,11);
22.2087 - match(input,ALT,FOLLOW_ALT_in_alternative558);
22.2088 -
22.2089 - match(input, Token.DOWN, null);
22.2090 - dbg.location(122,15);
22.2091 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:122:15: ( element )+
22.2092 - int cnt25=0;
22.2093 - try { dbg.enterSubRule(25);
22.2094 -
22.2095 - loop25:
22.2096 - do {
22.2097 - int alt25=2;
22.2098 - try { dbg.enterDecision(25, decisionCanBacktrack[25]);
22.2099 -
22.2100 - int LA25_0 = input.LA(1);
22.2101 -
22.2102 - if ( ((LA25_0>=BLOCK && LA25_0<=SYNPRED)||LA25_0==CHAR_RANGE||(LA25_0>=SEMPRED && LA25_0<=SYN_SEMPRED)||(LA25_0>=TREE_BEGIN && LA25_0<=BANG)||(LA25_0>=TOKEN_REF && LA25_0<=ACTION)||LA25_0==RULE_REF||LA25_0==71||LA25_0==87||LA25_0==89||LA25_0==92) ) {
22.2103 - alt25=1;
22.2104 - }
22.2105 -
22.2106 -
22.2107 - } finally {dbg.exitDecision(25);}
22.2108 -
22.2109 - switch (alt25) {
22.2110 - case 1 :
22.2111 - dbg.enterAlt(1);
22.2112 -
22.2113 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:122:15: element
22.2114 - {
22.2115 - dbg.location(122,15);
22.2116 - pushFollow(FOLLOW_element_in_alternative560);
22.2117 - element();
22.2118 -
22.2119 - state._fsp--;
22.2120 -
22.2121 -
22.2122 - }
22.2123 - break;
22.2124 -
22.2125 - default :
22.2126 - if ( cnt25 >= 1 ) break loop25;
22.2127 - EarlyExitException eee =
22.2128 - new EarlyExitException(25, input);
22.2129 - dbg.recognitionException(eee);
22.2130 -
22.2131 - throw eee;
22.2132 - }
22.2133 - cnt25++;
22.2134 - } while (true);
22.2135 - } finally {dbg.exitSubRule(25);}
22.2136 -
22.2137 - dbg.location(122,24);
22.2138 - match(input,EOA,FOLLOW_EOA_in_alternative563);
22.2139 -
22.2140 - match(input, Token.UP, null);
22.2141 -
22.2142 - }
22.2143 - break;
22.2144 - case 2 :
22.2145 - dbg.enterAlt(2);
22.2146 -
22.2147 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:123:9: ^( ALT EPSILON EOA )
22.2148 - {
22.2149 - dbg.location(123,9);
22.2150 - dbg.location(123,11);
22.2151 - match(input,ALT,FOLLOW_ALT_in_alternative575);
22.2152 -
22.2153 - match(input, Token.DOWN, null);
22.2154 - dbg.location(123,15);
22.2155 - match(input,EPSILON,FOLLOW_EPSILON_in_alternative577);
22.2156 - dbg.location(123,23);
22.2157 - match(input,EOA,FOLLOW_EOA_in_alternative579);
22.2158 -
22.2159 - match(input, Token.UP, null);
22.2160 -
22.2161 - }
22.2162 - break;
22.2163 -
22.2164 - }
22.2165 - }
22.2166 - catch (RecognitionException re) {
22.2167 - reportError(re);
22.2168 - recover(input,re);
22.2169 - }
22.2170 - finally {
22.2171 - }
22.2172 - dbg.location(124, 5);
22.2173 -
22.2174 - }
22.2175 - finally {
22.2176 - dbg.exitRule(getGrammarFileName(), "alternative");
22.2177 - decRuleLevel();
22.2178 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.2179 - }
22.2180 -
22.2181 - return ;
22.2182 - }
22.2183 - // $ANTLR end "alternative"
22.2184 -
22.2185 -
22.2186 - // $ANTLR start "exceptionGroup"
22.2187 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:126:1: exceptionGroup : ( ( exceptionHandler )+ ( finallyClause )? | finallyClause );
22.2188 - public final void exceptionGroup() throws RecognitionException {
22.2189 - try { dbg.enterRule(getGrammarFileName(), "exceptionGroup");
22.2190 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.2191 - incRuleLevel();
22.2192 - dbg.location(126, 1);
22.2193 -
22.2194 - try {
22.2195 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:127:2: ( ( exceptionHandler )+ ( finallyClause )? | finallyClause )
22.2196 - int alt29=2;
22.2197 - try { dbg.enterDecision(29, decisionCanBacktrack[29]);
22.2198 -
22.2199 - int LA29_0 = input.LA(1);
22.2200 -
22.2201 - if ( (LA29_0==85) ) {
22.2202 - alt29=1;
22.2203 - }
22.2204 - else if ( (LA29_0==86) ) {
22.2205 - alt29=2;
22.2206 - }
22.2207 - else {
22.2208 - NoViableAltException nvae =
22.2209 - new NoViableAltException("", 29, 0, input);
22.2210 -
22.2211 - dbg.recognitionException(nvae);
22.2212 - throw nvae;
22.2213 - }
22.2214 - } finally {dbg.exitDecision(29);}
22.2215 -
22.2216 - switch (alt29) {
22.2217 - case 1 :
22.2218 - dbg.enterAlt(1);
22.2219 -
22.2220 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:127:4: ( exceptionHandler )+ ( finallyClause )?
22.2221 - {
22.2222 - dbg.location(127,4);
22.2223 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:127:4: ( exceptionHandler )+
22.2224 - int cnt27=0;
22.2225 - try { dbg.enterSubRule(27);
22.2226 -
22.2227 - loop27:
22.2228 - do {
22.2229 - int alt27=2;
22.2230 - try { dbg.enterDecision(27, decisionCanBacktrack[27]);
22.2231 -
22.2232 - int LA27_0 = input.LA(1);
22.2233 -
22.2234 - if ( (LA27_0==85) ) {
22.2235 - alt27=1;
22.2236 - }
22.2237 -
22.2238 -
22.2239 - } finally {dbg.exitDecision(27);}
22.2240 -
22.2241 - switch (alt27) {
22.2242 - case 1 :
22.2243 - dbg.enterAlt(1);
22.2244 -
22.2245 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:127:4: exceptionHandler
22.2246 - {
22.2247 - dbg.location(127,4);
22.2248 - pushFollow(FOLLOW_exceptionHandler_in_exceptionGroup594);
22.2249 - exceptionHandler();
22.2250 -
22.2251 - state._fsp--;
22.2252 -
22.2253 -
22.2254 - }
22.2255 - break;
22.2256 -
22.2257 - default :
22.2258 - if ( cnt27 >= 1 ) break loop27;
22.2259 - EarlyExitException eee =
22.2260 - new EarlyExitException(27, input);
22.2261 - dbg.recognitionException(eee);
22.2262 -
22.2263 - throw eee;
22.2264 - }
22.2265 - cnt27++;
22.2266 - } while (true);
22.2267 - } finally {dbg.exitSubRule(27);}
22.2268 -
22.2269 - dbg.location(127,22);
22.2270 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:127:22: ( finallyClause )?
22.2271 - int alt28=2;
22.2272 - try { dbg.enterSubRule(28);
22.2273 - try { dbg.enterDecision(28, decisionCanBacktrack[28]);
22.2274 -
22.2275 - int LA28_0 = input.LA(1);
22.2276 -
22.2277 - if ( (LA28_0==86) ) {
22.2278 - alt28=1;
22.2279 - }
22.2280 - } finally {dbg.exitDecision(28);}
22.2281 -
22.2282 - switch (alt28) {
22.2283 - case 1 :
22.2284 - dbg.enterAlt(1);
22.2285 -
22.2286 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:127:22: finallyClause
22.2287 - {
22.2288 - dbg.location(127,22);
22.2289 - pushFollow(FOLLOW_finallyClause_in_exceptionGroup597);
22.2290 - finallyClause();
22.2291 -
22.2292 - state._fsp--;
22.2293 -
22.2294 -
22.2295 - }
22.2296 - break;
22.2297 -
22.2298 - }
22.2299 - } finally {dbg.exitSubRule(28);}
22.2300 -
22.2301 -
22.2302 - }
22.2303 - break;
22.2304 - case 2 :
22.2305 - dbg.enterAlt(2);
22.2306 -
22.2307 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:128:4: finallyClause
22.2308 - {
22.2309 - dbg.location(128,4);
22.2310 - pushFollow(FOLLOW_finallyClause_in_exceptionGroup603);
22.2311 - finallyClause();
22.2312 -
22.2313 - state._fsp--;
22.2314 -
22.2315 -
22.2316 - }
22.2317 - break;
22.2318 -
22.2319 - }
22.2320 - }
22.2321 - catch (RecognitionException re) {
22.2322 - reportError(re);
22.2323 - recover(input,re);
22.2324 - }
22.2325 - finally {
22.2326 - }
22.2327 - dbg.location(129, 5);
22.2328 -
22.2329 - }
22.2330 - finally {
22.2331 - dbg.exitRule(getGrammarFileName(), "exceptionGroup");
22.2332 - decRuleLevel();
22.2333 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.2334 - }
22.2335 -
22.2336 - return ;
22.2337 - }
22.2338 - // $ANTLR end "exceptionGroup"
22.2339 -
22.2340 -
22.2341 - // $ANTLR start "exceptionHandler"
22.2342 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:131:1: exceptionHandler : ^( 'catch' ARG_ACTION ACTION ) ;
22.2343 - public final void exceptionHandler() throws RecognitionException {
22.2344 - try { dbg.enterRule(getGrammarFileName(), "exceptionHandler");
22.2345 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.2346 - incRuleLevel();
22.2347 - dbg.location(131, 1);
22.2348 -
22.2349 - try {
22.2350 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:132:5: ( ^( 'catch' ARG_ACTION ACTION ) )
22.2351 - dbg.enterAlt(1);
22.2352 -
22.2353 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:132:10: ^( 'catch' ARG_ACTION ACTION )
22.2354 - {
22.2355 - dbg.location(132,10);
22.2356 - dbg.location(132,12);
22.2357 - match(input,85,FOLLOW_85_in_exceptionHandler624);
22.2358 -
22.2359 - match(input, Token.DOWN, null);
22.2360 - dbg.location(132,20);
22.2361 - match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_exceptionHandler626);
22.2362 - dbg.location(132,31);
22.2363 - match(input,ACTION,FOLLOW_ACTION_in_exceptionHandler628);
22.2364 -
22.2365 - match(input, Token.UP, null);
22.2366 -
22.2367 - }
22.2368 -
22.2369 - }
22.2370 - catch (RecognitionException re) {
22.2371 - reportError(re);
22.2372 - recover(input,re);
22.2373 - }
22.2374 - finally {
22.2375 - }
22.2376 - dbg.location(133, 5);
22.2377 -
22.2378 - }
22.2379 - finally {
22.2380 - dbg.exitRule(getGrammarFileName(), "exceptionHandler");
22.2381 - decRuleLevel();
22.2382 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.2383 - }
22.2384 -
22.2385 - return ;
22.2386 - }
22.2387 - // $ANTLR end "exceptionHandler"
22.2388 -
22.2389 -
22.2390 - // $ANTLR start "finallyClause"
22.2391 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:135:1: finallyClause : ^( 'finally' ACTION ) ;
22.2392 - public final void finallyClause() throws RecognitionException {
22.2393 - try { dbg.enterRule(getGrammarFileName(), "finallyClause");
22.2394 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.2395 - incRuleLevel();
22.2396 - dbg.location(135, 1);
22.2397 -
22.2398 - try {
22.2399 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:136:5: ( ^( 'finally' ACTION ) )
22.2400 - dbg.enterAlt(1);
22.2401 -
22.2402 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:136:10: ^( 'finally' ACTION )
22.2403 - {
22.2404 - dbg.location(136,10);
22.2405 - dbg.location(136,12);
22.2406 - match(input,86,FOLLOW_86_in_finallyClause650);
22.2407 -
22.2408 - match(input, Token.DOWN, null);
22.2409 - dbg.location(136,22);
22.2410 - match(input,ACTION,FOLLOW_ACTION_in_finallyClause652);
22.2411 -
22.2412 - match(input, Token.UP, null);
22.2413 -
22.2414 - }
22.2415 -
22.2416 - }
22.2417 - catch (RecognitionException re) {
22.2418 - reportError(re);
22.2419 - recover(input,re);
22.2420 - }
22.2421 - finally {
22.2422 - }
22.2423 - dbg.location(137, 5);
22.2424 -
22.2425 - }
22.2426 - finally {
22.2427 - dbg.exitRule(getGrammarFileName(), "finallyClause");
22.2428 - decRuleLevel();
22.2429 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.2430 - }
22.2431 -
22.2432 - return ;
22.2433 - }
22.2434 - // $ANTLR end "finallyClause"
22.2435 -
22.2436 -
22.2437 - // $ANTLR start "element"
22.2438 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:139:1: element : elementNoOptionSpec ;
22.2439 - public final void element() throws RecognitionException {
22.2440 - try { dbg.enterRule(getGrammarFileName(), "element");
22.2441 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.2442 - incRuleLevel();
22.2443 - dbg.location(139, 1);
22.2444 -
22.2445 - try {
22.2446 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:140:2: ( elementNoOptionSpec )
22.2447 - dbg.enterAlt(1);
22.2448 -
22.2449 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:140:4: elementNoOptionSpec
22.2450 - {
22.2451 - dbg.location(140,4);
22.2452 - pushFollow(FOLLOW_elementNoOptionSpec_in_element667);
22.2453 - elementNoOptionSpec();
22.2454 -
22.2455 - state._fsp--;
22.2456 -
22.2457 -
22.2458 - }
22.2459 -
22.2460 - }
22.2461 - catch (RecognitionException re) {
22.2462 - reportError(re);
22.2463 - recover(input,re);
22.2464 - }
22.2465 - finally {
22.2466 - }
22.2467 - dbg.location(141, 2);
22.2468 -
22.2469 - }
22.2470 - finally {
22.2471 - dbg.exitRule(getGrammarFileName(), "element");
22.2472 - decRuleLevel();
22.2473 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.2474 - }
22.2475 -
22.2476 - return ;
22.2477 - }
22.2478 - // $ANTLR end "element"
22.2479 -
22.2480 -
22.2481 - // $ANTLR start "elementNoOptionSpec"
22.2482 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:143:1: elementNoOptionSpec : ( ^( ( '=' | '+=' ) ID block ) | ^( ( '=' | '+=' ) ID atom ) | atom | ebnf | ACTION | SEMPRED | GATED_SEMPRED | treeSpec );
22.2483 - public final void elementNoOptionSpec() throws RecognitionException {
22.2484 - try { dbg.enterRule(getGrammarFileName(), "elementNoOptionSpec");
22.2485 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.2486 - incRuleLevel();
22.2487 - dbg.location(143, 1);
22.2488 -
22.2489 - try {
22.2490 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:144:2: ( ^( ( '=' | '+=' ) ID block ) | ^( ( '=' | '+=' ) ID atom ) | atom | ebnf | ACTION | SEMPRED | GATED_SEMPRED | treeSpec )
22.2491 - int alt30=8;
22.2492 - try { dbg.enterDecision(30, decisionCanBacktrack[30]);
22.2493 -
22.2494 - try {
22.2495 - isCyclicDecision = true;
22.2496 - alt30 = dfa30.predict(input);
22.2497 - }
22.2498 - catch (NoViableAltException nvae) {
22.2499 - dbg.recognitionException(nvae);
22.2500 - throw nvae;
22.2501 - }
22.2502 - } finally {dbg.exitDecision(30);}
22.2503 -
22.2504 - switch (alt30) {
22.2505 - case 1 :
22.2506 - dbg.enterAlt(1);
22.2507 -
22.2508 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:144:4: ^( ( '=' | '+=' ) ID block )
22.2509 - {
22.2510 - dbg.location(144,4);
22.2511 - dbg.location(144,6);
22.2512 - if ( input.LA(1)==71||input.LA(1)==87 ) {
22.2513 - input.consume();
22.2514 - state.errorRecovery=false;
22.2515 - }
22.2516 - else {
22.2517 - MismatchedSetException mse = new MismatchedSetException(null,input);
22.2518 - dbg.recognitionException(mse);
22.2519 - throw mse;
22.2520 - }
22.2521 -
22.2522 -
22.2523 - match(input, Token.DOWN, null);
22.2524 - dbg.location(144,17);
22.2525 - match(input,ID,FOLLOW_ID_in_elementNoOptionSpec685);
22.2526 - dbg.location(144,20);
22.2527 - pushFollow(FOLLOW_block_in_elementNoOptionSpec687);
22.2528 - block();
22.2529 -
22.2530 - state._fsp--;
22.2531 -
22.2532 -
22.2533 - match(input, Token.UP, null);
22.2534 -
22.2535 - }
22.2536 - break;
22.2537 - case 2 :
22.2538 - dbg.enterAlt(2);
22.2539 -
22.2540 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:145:4: ^( ( '=' | '+=' ) ID atom )
22.2541 - {
22.2542 - dbg.location(145,4);
22.2543 - dbg.location(145,6);
22.2544 - if ( input.LA(1)==71||input.LA(1)==87 ) {
22.2545 - input.consume();
22.2546 - state.errorRecovery=false;
22.2547 - }
22.2548 - else {
22.2549 - MismatchedSetException mse = new MismatchedSetException(null,input);
22.2550 - dbg.recognitionException(mse);
22.2551 - throw mse;
22.2552 - }
22.2553 -
22.2554 -
22.2555 - match(input, Token.DOWN, null);
22.2556 - dbg.location(145,17);
22.2557 - match(input,ID,FOLLOW_ID_in_elementNoOptionSpec700);
22.2558 - dbg.location(145,20);
22.2559 - pushFollow(FOLLOW_atom_in_elementNoOptionSpec702);
22.2560 - atom();
22.2561 -
22.2562 - state._fsp--;
22.2563 -
22.2564 -
22.2565 - match(input, Token.UP, null);
22.2566 -
22.2567 - }
22.2568 - break;
22.2569 - case 3 :
22.2570 - dbg.enterAlt(3);
22.2571 -
22.2572 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:146:4: atom
22.2573 - {
22.2574 - dbg.location(146,4);
22.2575 - pushFollow(FOLLOW_atom_in_elementNoOptionSpec708);
22.2576 - atom();
22.2577 -
22.2578 - state._fsp--;
22.2579 -
22.2580 -
22.2581 - }
22.2582 - break;
22.2583 - case 4 :
22.2584 - dbg.enterAlt(4);
22.2585 -
22.2586 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:147:4: ebnf
22.2587 - {
22.2588 - dbg.location(147,4);
22.2589 - pushFollow(FOLLOW_ebnf_in_elementNoOptionSpec713);
22.2590 - ebnf();
22.2591 -
22.2592 - state._fsp--;
22.2593 -
22.2594 -
22.2595 - }
22.2596 - break;
22.2597 - case 5 :
22.2598 - dbg.enterAlt(5);
22.2599 -
22.2600 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:148:6: ACTION
22.2601 - {
22.2602 - dbg.location(148,6);
22.2603 - match(input,ACTION,FOLLOW_ACTION_in_elementNoOptionSpec720);
22.2604 -
22.2605 - }
22.2606 - break;
22.2607 - case 6 :
22.2608 - dbg.enterAlt(6);
22.2609 -
22.2610 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:149:6: SEMPRED
22.2611 - {
22.2612 - dbg.location(149,6);
22.2613 - match(input,SEMPRED,FOLLOW_SEMPRED_in_elementNoOptionSpec727);
22.2614 -
22.2615 - }
22.2616 - break;
22.2617 - case 7 :
22.2618 - dbg.enterAlt(7);
22.2619 -
22.2620 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:150:4: GATED_SEMPRED
22.2621 - {
22.2622 - dbg.location(150,4);
22.2623 - match(input,GATED_SEMPRED,FOLLOW_GATED_SEMPRED_in_elementNoOptionSpec732);
22.2624 -
22.2625 - }
22.2626 - break;
22.2627 - case 8 :
22.2628 - dbg.enterAlt(8);
22.2629 -
22.2630 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:151:6: treeSpec
22.2631 - {
22.2632 - dbg.location(151,6);
22.2633 - pushFollow(FOLLOW_treeSpec_in_elementNoOptionSpec739);
22.2634 - treeSpec();
22.2635 -
22.2636 - state._fsp--;
22.2637 -
22.2638 -
22.2639 - }
22.2640 - break;
22.2641 -
22.2642 - }
22.2643 - }
22.2644 - catch (RecognitionException re) {
22.2645 - reportError(re);
22.2646 - recover(input,re);
22.2647 - }
22.2648 - finally {
22.2649 - }
22.2650 - dbg.location(152, 2);
22.2651 -
22.2652 - }
22.2653 - finally {
22.2654 - dbg.exitRule(getGrammarFileName(), "elementNoOptionSpec");
22.2655 - decRuleLevel();
22.2656 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.2657 - }
22.2658 -
22.2659 - return ;
22.2660 - }
22.2661 - // $ANTLR end "elementNoOptionSpec"
22.2662 -
22.2663 -
22.2664 - // $ANTLR start "atom"
22.2665 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:154:1: atom : ( ^( ( '^' | '!' ) atom ) | range | notSet | ^( RULE_REF ARG_ACTION ) | RULE_REF | terminal );
22.2666 - public final void atom() throws RecognitionException {
22.2667 - try { dbg.enterRule(getGrammarFileName(), "atom");
22.2668 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.2669 - incRuleLevel();
22.2670 - dbg.location(154, 1);
22.2671 -
22.2672 - try {
22.2673 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:154:5: ( ^( ( '^' | '!' ) atom ) | range | notSet | ^( RULE_REF ARG_ACTION ) | RULE_REF | terminal )
22.2674 - int alt31=6;
22.2675 - try { dbg.enterDecision(31, decisionCanBacktrack[31]);
22.2676 -
22.2677 - switch ( input.LA(1) ) {
22.2678 - case ROOT:
22.2679 - case BANG:
22.2680 - {
22.2681 - alt31=1;
22.2682 - }
22.2683 - break;
22.2684 - case CHAR_RANGE:
22.2685 - {
22.2686 - alt31=2;
22.2687 - }
22.2688 - break;
22.2689 - case 89:
22.2690 - {
22.2691 - alt31=3;
22.2692 - }
22.2693 - break;
22.2694 - case RULE_REF:
22.2695 - {
22.2696 - int LA31_4 = input.LA(2);
22.2697 -
22.2698 - if ( (LA31_4==DOWN) ) {
22.2699 - alt31=4;
22.2700 - }
22.2701 - else if ( (LA31_4==UP||(LA31_4>=BLOCK && LA31_4<=SYNPRED)||LA31_4==CHAR_RANGE||LA31_4==EOA||(LA31_4>=SEMPRED && LA31_4<=SYN_SEMPRED)||(LA31_4>=TREE_BEGIN && LA31_4<=BANG)||(LA31_4>=TOKEN_REF && LA31_4<=ACTION)||LA31_4==RULE_REF||LA31_4==71||LA31_4==87||LA31_4==89||LA31_4==92) ) {
22.2702 - alt31=5;
22.2703 - }
22.2704 - else {
22.2705 - NoViableAltException nvae =
22.2706 - new NoViableAltException("", 31, 4, input);
22.2707 -
22.2708 - dbg.recognitionException(nvae);
22.2709 - throw nvae;
22.2710 - }
22.2711 - }
22.2712 - break;
22.2713 - case TOKEN_REF:
22.2714 - case STRING_LITERAL:
22.2715 - case CHAR_LITERAL:
22.2716 - case 92:
22.2717 - {
22.2718 - alt31=6;
22.2719 - }
22.2720 - break;
22.2721 - default:
22.2722 - NoViableAltException nvae =
22.2723 - new NoViableAltException("", 31, 0, input);
22.2724 -
22.2725 - dbg.recognitionException(nvae);
22.2726 - throw nvae;
22.2727 - }
22.2728 -
22.2729 - } finally {dbg.exitDecision(31);}
22.2730 -
22.2731 - switch (alt31) {
22.2732 - case 1 :
22.2733 - dbg.enterAlt(1);
22.2734 -
22.2735 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:154:9: ^( ( '^' | '!' ) atom )
22.2736 - {
22.2737 - dbg.location(154,9);
22.2738 - dbg.location(154,11);
22.2739 - if ( (input.LA(1)>=ROOT && input.LA(1)<=BANG) ) {
22.2740 - input.consume();
22.2741 - state.errorRecovery=false;
22.2742 - }
22.2743 - else {
22.2744 - MismatchedSetException mse = new MismatchedSetException(null,input);
22.2745 - dbg.recognitionException(mse);
22.2746 - throw mse;
22.2747 - }
22.2748 -
22.2749 -
22.2750 - match(input, Token.DOWN, null);
22.2751 - dbg.location(154,21);
22.2752 - pushFollow(FOLLOW_atom_in_atom757);
22.2753 - atom();
22.2754 -
22.2755 - state._fsp--;
22.2756 -
22.2757 -
22.2758 - match(input, Token.UP, null);
22.2759 -
22.2760 - }
22.2761 - break;
22.2762 - case 2 :
22.2763 - dbg.enterAlt(2);
22.2764 -
22.2765 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:155:4: range
22.2766 - {
22.2767 - dbg.location(155,4);
22.2768 - pushFollow(FOLLOW_range_in_atom763);
22.2769 - range();
22.2770 -
22.2771 - state._fsp--;
22.2772 -
22.2773 -
22.2774 - }
22.2775 - break;
22.2776 - case 3 :
22.2777 - dbg.enterAlt(3);
22.2778 -
22.2779 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:156:4: notSet
22.2780 - {
22.2781 - dbg.location(156,4);
22.2782 - pushFollow(FOLLOW_notSet_in_atom768);
22.2783 - notSet();
22.2784 -
22.2785 - state._fsp--;
22.2786 -
22.2787 -
22.2788 - }
22.2789 - break;
22.2790 - case 4 :
22.2791 - dbg.enterAlt(4);
22.2792 -
22.2793 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:157:7: ^( RULE_REF ARG_ACTION )
22.2794 - {
22.2795 - dbg.location(157,7);
22.2796 - dbg.location(157,9);
22.2797 - match(input,RULE_REF,FOLLOW_RULE_REF_in_atom777);
22.2798 -
22.2799 - match(input, Token.DOWN, null);
22.2800 - dbg.location(157,18);
22.2801 - match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_atom779);
22.2802 -
22.2803 - match(input, Token.UP, null);
22.2804 -
22.2805 - }
22.2806 - break;
22.2807 - case 5 :
22.2808 - dbg.enterAlt(5);
22.2809 -
22.2810 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:158:7: RULE_REF
22.2811 - {
22.2812 - dbg.location(158,7);
22.2813 - match(input,RULE_REF,FOLLOW_RULE_REF_in_atom788);
22.2814 -
22.2815 - }
22.2816 - break;
22.2817 - case 6 :
22.2818 - dbg.enterAlt(6);
22.2819 -
22.2820 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:159:9: terminal
22.2821 - {
22.2822 - dbg.location(159,9);
22.2823 - pushFollow(FOLLOW_terminal_in_atom798);
22.2824 - terminal();
22.2825 -
22.2826 - state._fsp--;
22.2827 -
22.2828 -
22.2829 - }
22.2830 - break;
22.2831 -
22.2832 - }
22.2833 - }
22.2834 - catch (RecognitionException re) {
22.2835 - reportError(re);
22.2836 - recover(input,re);
22.2837 - }
22.2838 - finally {
22.2839 - }
22.2840 - dbg.location(160, 5);
22.2841 -
22.2842 - }
22.2843 - finally {
22.2844 - dbg.exitRule(getGrammarFileName(), "atom");
22.2845 - decRuleLevel();
22.2846 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.2847 - }
22.2848 -
22.2849 - return ;
22.2850 - }
22.2851 - // $ANTLR end "atom"
22.2852 -
22.2853 -
22.2854 - // $ANTLR start "notSet"
22.2855 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:162:1: notSet : ( ^( '~' notTerminal ) | ^( '~' block ) );
22.2856 - public final void notSet() throws RecognitionException {
22.2857 - try { dbg.enterRule(getGrammarFileName(), "notSet");
22.2858 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.2859 - incRuleLevel();
22.2860 - dbg.location(162, 1);
22.2861 -
22.2862 - try {
22.2863 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:163:2: ( ^( '~' notTerminal ) | ^( '~' block ) )
22.2864 - int alt32=2;
22.2865 - try { dbg.enterDecision(32, decisionCanBacktrack[32]);
22.2866 -
22.2867 - int LA32_0 = input.LA(1);
22.2868 -
22.2869 - if ( (LA32_0==89) ) {
22.2870 - int LA32_1 = input.LA(2);
22.2871 -
22.2872 - if ( (LA32_1==DOWN) ) {
22.2873 - int LA32_2 = input.LA(3);
22.2874 -
22.2875 - if ( ((LA32_2>=TOKEN_REF && LA32_2<=CHAR_LITERAL)) ) {
22.2876 - alt32=1;
22.2877 - }
22.2878 - else if ( (LA32_2==BLOCK) ) {
22.2879 - alt32=2;
22.2880 - }
22.2881 - else {
22.2882 - NoViableAltException nvae =
22.2883 - new NoViableAltException("", 32, 2, input);
22.2884 -
22.2885 - dbg.recognitionException(nvae);
22.2886 - throw nvae;
22.2887 - }
22.2888 - }
22.2889 - else {
22.2890 - NoViableAltException nvae =
22.2891 - new NoViableAltException("", 32, 1, input);
22.2892 -
22.2893 - dbg.recognitionException(nvae);
22.2894 - throw nvae;
22.2895 - }
22.2896 - }
22.2897 - else {
22.2898 - NoViableAltException nvae =
22.2899 - new NoViableAltException("", 32, 0, input);
22.2900 -
22.2901 - dbg.recognitionException(nvae);
22.2902 - throw nvae;
22.2903 - }
22.2904 - } finally {dbg.exitDecision(32);}
22.2905 -
22.2906 - switch (alt32) {
22.2907 - case 1 :
22.2908 - dbg.enterAlt(1);
22.2909 -
22.2910 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:163:4: ^( '~' notTerminal )
22.2911 - {
22.2912 - dbg.location(163,4);
22.2913 - dbg.location(163,6);
22.2914 - match(input,89,FOLLOW_89_in_notSet813);
22.2915 -
22.2916 - match(input, Token.DOWN, null);
22.2917 - dbg.location(163,10);
22.2918 - pushFollow(FOLLOW_notTerminal_in_notSet815);
22.2919 - notTerminal();
22.2920 -
22.2921 - state._fsp--;
22.2922 -
22.2923 -
22.2924 - match(input, Token.UP, null);
22.2925 -
22.2926 - }
22.2927 - break;
22.2928 - case 2 :
22.2929 - dbg.enterAlt(2);
22.2930 -
22.2931 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:164:4: ^( '~' block )
22.2932 - {
22.2933 - dbg.location(164,4);
22.2934 - dbg.location(164,6);
22.2935 - match(input,89,FOLLOW_89_in_notSet822);
22.2936 -
22.2937 - match(input, Token.DOWN, null);
22.2938 - dbg.location(164,10);
22.2939 - pushFollow(FOLLOW_block_in_notSet824);
22.2940 - block();
22.2941 -
22.2942 - state._fsp--;
22.2943 -
22.2944 -
22.2945 - match(input, Token.UP, null);
22.2946 -
22.2947 - }
22.2948 - break;
22.2949 -
22.2950 - }
22.2951 - }
22.2952 - catch (RecognitionException re) {
22.2953 - reportError(re);
22.2954 - recover(input,re);
22.2955 - }
22.2956 - finally {
22.2957 - }
22.2958 - dbg.location(165, 2);
22.2959 -
22.2960 - }
22.2961 - finally {
22.2962 - dbg.exitRule(getGrammarFileName(), "notSet");
22.2963 - decRuleLevel();
22.2964 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.2965 - }
22.2966 -
22.2967 - return ;
22.2968 - }
22.2969 - // $ANTLR end "notSet"
22.2970 -
22.2971 -
22.2972 - // $ANTLR start "treeSpec"
22.2973 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:167:1: treeSpec : ^( TREE_BEGIN ( element )+ ) ;
22.2974 - public final void treeSpec() throws RecognitionException {
22.2975 - try { dbg.enterRule(getGrammarFileName(), "treeSpec");
22.2976 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.2977 - incRuleLevel();
22.2978 - dbg.location(167, 1);
22.2979 -
22.2980 - try {
22.2981 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:168:2: ( ^( TREE_BEGIN ( element )+ ) )
22.2982 - dbg.enterAlt(1);
22.2983 -
22.2984 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:168:4: ^( TREE_BEGIN ( element )+ )
22.2985 - {
22.2986 - dbg.location(168,4);
22.2987 - dbg.location(168,6);
22.2988 - match(input,TREE_BEGIN,FOLLOW_TREE_BEGIN_in_treeSpec837);
22.2989 -
22.2990 - match(input, Token.DOWN, null);
22.2991 - dbg.location(168,17);
22.2992 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:168:17: ( element )+
22.2993 - int cnt33=0;
22.2994 - try { dbg.enterSubRule(33);
22.2995 -
22.2996 - loop33:
22.2997 - do {
22.2998 - int alt33=2;
22.2999 - try { dbg.enterDecision(33, decisionCanBacktrack[33]);
22.3000 -
22.3001 - int LA33_0 = input.LA(1);
22.3002 -
22.3003 - if ( ((LA33_0>=BLOCK && LA33_0<=SYNPRED)||LA33_0==CHAR_RANGE||(LA33_0>=SEMPRED && LA33_0<=SYN_SEMPRED)||(LA33_0>=TREE_BEGIN && LA33_0<=BANG)||(LA33_0>=TOKEN_REF && LA33_0<=ACTION)||LA33_0==RULE_REF||LA33_0==71||LA33_0==87||LA33_0==89||LA33_0==92) ) {
22.3004 - alt33=1;
22.3005 - }
22.3006 -
22.3007 -
22.3008 - } finally {dbg.exitDecision(33);}
22.3009 -
22.3010 - switch (alt33) {
22.3011 - case 1 :
22.3012 - dbg.enterAlt(1);
22.3013 -
22.3014 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:168:17: element
22.3015 - {
22.3016 - dbg.location(168,17);
22.3017 - pushFollow(FOLLOW_element_in_treeSpec839);
22.3018 - element();
22.3019 -
22.3020 - state._fsp--;
22.3021 -
22.3022 -
22.3023 - }
22.3024 - break;
22.3025 -
22.3026 - default :
22.3027 - if ( cnt33 >= 1 ) break loop33;
22.3028 - EarlyExitException eee =
22.3029 - new EarlyExitException(33, input);
22.3030 - dbg.recognitionException(eee);
22.3031 -
22.3032 - throw eee;
22.3033 - }
22.3034 - cnt33++;
22.3035 - } while (true);
22.3036 - } finally {dbg.exitSubRule(33);}
22.3037 -
22.3038 -
22.3039 - match(input, Token.UP, null);
22.3040 -
22.3041 - }
22.3042 -
22.3043 - }
22.3044 - catch (RecognitionException re) {
22.3045 - reportError(re);
22.3046 - recover(input,re);
22.3047 - }
22.3048 - finally {
22.3049 - }
22.3050 - dbg.location(169, 2);
22.3051 -
22.3052 - }
22.3053 - finally {
22.3054 - dbg.exitRule(getGrammarFileName(), "treeSpec");
22.3055 - decRuleLevel();
22.3056 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.3057 - }
22.3058 -
22.3059 - return ;
22.3060 - }
22.3061 - // $ANTLR end "treeSpec"
22.3062 -
22.3063 -
22.3064 - // $ANTLR start "ebnf"
22.3065 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:171:1: ebnf : ( ^( SYNPRED block ) | SYN_SEMPRED | ^( ebnfSuffix block ) | block );
22.3066 - public final void ebnf() throws RecognitionException {
22.3067 - try { dbg.enterRule(getGrammarFileName(), "ebnf");
22.3068 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.3069 - incRuleLevel();
22.3070 - dbg.location(171, 1);
22.3071 -
22.3072 - try {
22.3073 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:173:2: ( ^( SYNPRED block ) | SYN_SEMPRED | ^( ebnfSuffix block ) | block )
22.3074 - int alt34=4;
22.3075 - try { dbg.enterDecision(34, decisionCanBacktrack[34]);
22.3076 -
22.3077 - switch ( input.LA(1) ) {
22.3078 - case SYNPRED:
22.3079 - {
22.3080 - alt34=1;
22.3081 - }
22.3082 - break;
22.3083 - case SYN_SEMPRED:
22.3084 - {
22.3085 - alt34=2;
22.3086 - }
22.3087 - break;
22.3088 - case OPTIONAL:
22.3089 - case CLOSURE:
22.3090 - case POSITIVE_CLOSURE:
22.3091 - {
22.3092 - alt34=3;
22.3093 - }
22.3094 - break;
22.3095 - case BLOCK:
22.3096 - {
22.3097 - alt34=4;
22.3098 - }
22.3099 - break;
22.3100 - default:
22.3101 - NoViableAltException nvae =
22.3102 - new NoViableAltException("", 34, 0, input);
22.3103 -
22.3104 - dbg.recognitionException(nvae);
22.3105 - throw nvae;
22.3106 - }
22.3107 -
22.3108 - } finally {dbg.exitDecision(34);}
22.3109 -
22.3110 - switch (alt34) {
22.3111 - case 1 :
22.3112 - dbg.enterAlt(1);
22.3113 -
22.3114 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:173:4: ^( SYNPRED block )
22.3115 - {
22.3116 - dbg.location(173,4);
22.3117 - dbg.location(173,6);
22.3118 - match(input,SYNPRED,FOLLOW_SYNPRED_in_ebnf855);
22.3119 -
22.3120 - match(input, Token.DOWN, null);
22.3121 - dbg.location(173,14);
22.3122 - pushFollow(FOLLOW_block_in_ebnf857);
22.3123 - block();
22.3124 -
22.3125 - state._fsp--;
22.3126 -
22.3127 -
22.3128 - match(input, Token.UP, null);
22.3129 -
22.3130 - }
22.3131 - break;
22.3132 - case 2 :
22.3133 - dbg.enterAlt(2);
22.3134 -
22.3135 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:174:4: SYN_SEMPRED
22.3136 - {
22.3137 - dbg.location(174,4);
22.3138 - match(input,SYN_SEMPRED,FOLLOW_SYN_SEMPRED_in_ebnf863);
22.3139 -
22.3140 - }
22.3141 - break;
22.3142 - case 3 :
22.3143 - dbg.enterAlt(3);
22.3144 -
22.3145 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:175:4: ^( ebnfSuffix block )
22.3146 - {
22.3147 - dbg.location(175,4);
22.3148 - dbg.location(175,6);
22.3149 - pushFollow(FOLLOW_ebnfSuffix_in_ebnf869);
22.3150 - ebnfSuffix();
22.3151 -
22.3152 - state._fsp--;
22.3153 -
22.3154 -
22.3155 - match(input, Token.DOWN, null);
22.3156 - dbg.location(175,17);
22.3157 - pushFollow(FOLLOW_block_in_ebnf871);
22.3158 - block();
22.3159 -
22.3160 - state._fsp--;
22.3161 -
22.3162 -
22.3163 - match(input, Token.UP, null);
22.3164 -
22.3165 - }
22.3166 - break;
22.3167 - case 4 :
22.3168 - dbg.enterAlt(4);
22.3169 -
22.3170 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:176:4: block
22.3171 - {
22.3172 - dbg.location(176,4);
22.3173 - pushFollow(FOLLOW_block_in_ebnf877);
22.3174 - block();
22.3175 -
22.3176 - state._fsp--;
22.3177 -
22.3178 -
22.3179 - }
22.3180 - break;
22.3181 -
22.3182 - }
22.3183 - }
22.3184 - catch (RecognitionException re) {
22.3185 - reportError(re);
22.3186 - recover(input,re);
22.3187 - }
22.3188 - finally {
22.3189 - }
22.3190 - dbg.location(177, 2);
22.3191 -
22.3192 - }
22.3193 - finally {
22.3194 - dbg.exitRule(getGrammarFileName(), "ebnf");
22.3195 - decRuleLevel();
22.3196 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.3197 - }
22.3198 -
22.3199 - return ;
22.3200 - }
22.3201 - // $ANTLR end "ebnf"
22.3202 -
22.3203 -
22.3204 - // $ANTLR start "range"
22.3205 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:179:1: range : ^( CHAR_RANGE CHAR_LITERAL CHAR_LITERAL ) ;
22.3206 - public final void range() throws RecognitionException {
22.3207 - try { dbg.enterRule(getGrammarFileName(), "range");
22.3208 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.3209 - incRuleLevel();
22.3210 - dbg.location(179, 1);
22.3211 -
22.3212 - try {
22.3213 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:180:2: ( ^( CHAR_RANGE CHAR_LITERAL CHAR_LITERAL ) )
22.3214 - dbg.enterAlt(1);
22.3215 -
22.3216 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:180:4: ^( CHAR_RANGE CHAR_LITERAL CHAR_LITERAL )
22.3217 - {
22.3218 - dbg.location(180,4);
22.3219 - dbg.location(180,6);
22.3220 - match(input,CHAR_RANGE,FOLLOW_CHAR_RANGE_in_range889);
22.3221 -
22.3222 - match(input, Token.DOWN, null);
22.3223 - dbg.location(180,17);
22.3224 - match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_range891);
22.3225 - dbg.location(180,30);
22.3226 - match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_range893);
22.3227 -
22.3228 - match(input, Token.UP, null);
22.3229 -
22.3230 - }
22.3231 -
22.3232 - }
22.3233 - catch (RecognitionException re) {
22.3234 - reportError(re);
22.3235 - recover(input,re);
22.3236 - }
22.3237 - finally {
22.3238 - }
22.3239 - dbg.location(181, 2);
22.3240 -
22.3241 - }
22.3242 - finally {
22.3243 - dbg.exitRule(getGrammarFileName(), "range");
22.3244 - decRuleLevel();
22.3245 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.3246 - }
22.3247 -
22.3248 - return ;
22.3249 - }
22.3250 - // $ANTLR end "range"
22.3251 -
22.3252 -
22.3253 - // $ANTLR start "terminal"
22.3254 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:183:1: terminal : ( CHAR_LITERAL | TOKEN_REF | STRING_LITERAL | ^( TOKEN_REF ARG_ACTION ) | '.' );
22.3255 - public final void terminal() throws RecognitionException {
22.3256 - try { dbg.enterRule(getGrammarFileName(), "terminal");
22.3257 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.3258 - incRuleLevel();
22.3259 - dbg.location(183, 1);
22.3260 -
22.3261 - try {
22.3262 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:184:5: ( CHAR_LITERAL | TOKEN_REF | STRING_LITERAL | ^( TOKEN_REF ARG_ACTION ) | '.' )
22.3263 - int alt35=5;
22.3264 - try { dbg.enterDecision(35, decisionCanBacktrack[35]);
22.3265 -
22.3266 - switch ( input.LA(1) ) {
22.3267 - case CHAR_LITERAL:
22.3268 - {
22.3269 - alt35=1;
22.3270 - }
22.3271 - break;
22.3272 - case TOKEN_REF:
22.3273 - {
22.3274 - int LA35_2 = input.LA(2);
22.3275 -
22.3276 - if ( (LA35_2==DOWN) ) {
22.3277 - alt35=4;
22.3278 - }
22.3279 - else if ( (LA35_2==UP||(LA35_2>=BLOCK && LA35_2<=SYNPRED)||LA35_2==CHAR_RANGE||LA35_2==EOA||(LA35_2>=SEMPRED && LA35_2<=SYN_SEMPRED)||(LA35_2>=TREE_BEGIN && LA35_2<=BANG)||(LA35_2>=TOKEN_REF && LA35_2<=ACTION)||LA35_2==RULE_REF||LA35_2==71||LA35_2==87||LA35_2==89||LA35_2==92) ) {
22.3280 - alt35=2;
22.3281 - }
22.3282 - else {
22.3283 - NoViableAltException nvae =
22.3284 - new NoViableAltException("", 35, 2, input);
22.3285 -
22.3286 - dbg.recognitionException(nvae);
22.3287 - throw nvae;
22.3288 - }
22.3289 - }
22.3290 - break;
22.3291 - case STRING_LITERAL:
22.3292 - {
22.3293 - alt35=3;
22.3294 - }
22.3295 - break;
22.3296 - case 92:
22.3297 - {
22.3298 - alt35=5;
22.3299 - }
22.3300 - break;
22.3301 - default:
22.3302 - NoViableAltException nvae =
22.3303 - new NoViableAltException("", 35, 0, input);
22.3304 -
22.3305 - dbg.recognitionException(nvae);
22.3306 - throw nvae;
22.3307 - }
22.3308 -
22.3309 - } finally {dbg.exitDecision(35);}
22.3310 -
22.3311 - switch (alt35) {
22.3312 - case 1 :
22.3313 - dbg.enterAlt(1);
22.3314 -
22.3315 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:184:9: CHAR_LITERAL
22.3316 - {
22.3317 - dbg.location(184,9);
22.3318 - match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_terminal910);
22.3319 -
22.3320 - }
22.3321 - break;
22.3322 - case 2 :
22.3323 - dbg.enterAlt(2);
22.3324 -
22.3325 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:185:7: TOKEN_REF
22.3326 - {
22.3327 - dbg.location(185,7);
22.3328 - match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_terminal918);
22.3329 -
22.3330 - }
22.3331 - break;
22.3332 - case 3 :
22.3333 - dbg.enterAlt(3);
22.3334 -
22.3335 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:186:7: STRING_LITERAL
22.3336 - {
22.3337 - dbg.location(186,7);
22.3338 - match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_terminal926);
22.3339 -
22.3340 - }
22.3341 - break;
22.3342 - case 4 :
22.3343 - dbg.enterAlt(4);
22.3344 -
22.3345 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:187:7: ^( TOKEN_REF ARG_ACTION )
22.3346 - {
22.3347 - dbg.location(187,7);
22.3348 - dbg.location(187,9);
22.3349 - match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_terminal935);
22.3350 -
22.3351 - match(input, Token.DOWN, null);
22.3352 - dbg.location(187,19);
22.3353 - match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_terminal937);
22.3354 -
22.3355 - match(input, Token.UP, null);
22.3356 -
22.3357 - }
22.3358 - break;
22.3359 - case 5 :
22.3360 - dbg.enterAlt(5);
22.3361 -
22.3362 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:188:7: '.'
22.3363 - {
22.3364 - dbg.location(188,7);
22.3365 - match(input,92,FOLLOW_92_in_terminal946);
22.3366 -
22.3367 - }
22.3368 - break;
22.3369 -
22.3370 - }
22.3371 - }
22.3372 - catch (RecognitionException re) {
22.3373 - reportError(re);
22.3374 - recover(input,re);
22.3375 - }
22.3376 - finally {
22.3377 - }
22.3378 - dbg.location(189, 2);
22.3379 -
22.3380 - }
22.3381 - finally {
22.3382 - dbg.exitRule(getGrammarFileName(), "terminal");
22.3383 - decRuleLevel();
22.3384 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.3385 - }
22.3386 -
22.3387 - return ;
22.3388 - }
22.3389 - // $ANTLR end "terminal"
22.3390 -
22.3391 -
22.3392 - // $ANTLR start "notTerminal"
22.3393 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:191:1: notTerminal : ( CHAR_LITERAL | TOKEN_REF | STRING_LITERAL );
22.3394 - public final void notTerminal() throws RecognitionException {
22.3395 - try { dbg.enterRule(getGrammarFileName(), "notTerminal");
22.3396 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.3397 - incRuleLevel();
22.3398 - dbg.location(191, 1);
22.3399 -
22.3400 - try {
22.3401 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:192:2: ( CHAR_LITERAL | TOKEN_REF | STRING_LITERAL )
22.3402 - dbg.enterAlt(1);
22.3403 -
22.3404 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:
22.3405 - {
22.3406 - dbg.location(192,2);
22.3407 - if ( (input.LA(1)>=TOKEN_REF && input.LA(1)<=CHAR_LITERAL) ) {
22.3408 - input.consume();
22.3409 - state.errorRecovery=false;
22.3410 - }
22.3411 - else {
22.3412 - MismatchedSetException mse = new MismatchedSetException(null,input);
22.3413 - dbg.recognitionException(mse);
22.3414 - throw mse;
22.3415 - }
22.3416 -
22.3417 -
22.3418 - }
22.3419 -
22.3420 - }
22.3421 - catch (RecognitionException re) {
22.3422 - reportError(re);
22.3423 - recover(input,re);
22.3424 - }
22.3425 - finally {
22.3426 - }
22.3427 - dbg.location(195, 2);
22.3428 -
22.3429 - }
22.3430 - finally {
22.3431 - dbg.exitRule(getGrammarFileName(), "notTerminal");
22.3432 - decRuleLevel();
22.3433 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.3434 - }
22.3435 -
22.3436 - return ;
22.3437 - }
22.3438 - // $ANTLR end "notTerminal"
22.3439 -
22.3440 -
22.3441 - // $ANTLR start "ebnfSuffix"
22.3442 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:197:1: ebnfSuffix : ( OPTIONAL | CLOSURE | POSITIVE_CLOSURE );
22.3443 - public final void ebnfSuffix() throws RecognitionException {
22.3444 - try { dbg.enterRule(getGrammarFileName(), "ebnfSuffix");
22.3445 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.3446 - incRuleLevel();
22.3447 - dbg.location(197, 1);
22.3448 -
22.3449 - try {
22.3450 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:198:2: ( OPTIONAL | CLOSURE | POSITIVE_CLOSURE )
22.3451 - dbg.enterAlt(1);
22.3452 -
22.3453 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:
22.3454 - {
22.3455 - dbg.location(198,2);
22.3456 - if ( (input.LA(1)>=OPTIONAL && input.LA(1)<=POSITIVE_CLOSURE) ) {
22.3457 - input.consume();
22.3458 - state.errorRecovery=false;
22.3459 - }
22.3460 - else {
22.3461 - MismatchedSetException mse = new MismatchedSetException(null,input);
22.3462 - dbg.recognitionException(mse);
22.3463 - throw mse;
22.3464 - }
22.3465 -
22.3466 -
22.3467 - }
22.3468 -
22.3469 - }
22.3470 - catch (RecognitionException re) {
22.3471 - reportError(re);
22.3472 - recover(input,re);
22.3473 - }
22.3474 - finally {
22.3475 - }
22.3476 - dbg.location(201, 2);
22.3477 -
22.3478 - }
22.3479 - finally {
22.3480 - dbg.exitRule(getGrammarFileName(), "ebnfSuffix");
22.3481 - decRuleLevel();
22.3482 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.3483 - }
22.3484 -
22.3485 - return ;
22.3486 - }
22.3487 - // $ANTLR end "ebnfSuffix"
22.3488 -
22.3489 -
22.3490 - // $ANTLR start "rewrite"
22.3491 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:205:1: rewrite : ( ( ^( '->' SEMPRED rewrite_alternative ) )* ^( '->' rewrite_alternative ) | );
22.3492 - public final void rewrite() throws RecognitionException {
22.3493 - try { dbg.enterRule(getGrammarFileName(), "rewrite");
22.3494 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.3495 - incRuleLevel();
22.3496 - dbg.location(205, 1);
22.3497 -
22.3498 - try {
22.3499 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:206:2: ( ( ^( '->' SEMPRED rewrite_alternative ) )* ^( '->' rewrite_alternative ) | )
22.3500 - int alt37=2;
22.3501 - try { dbg.enterDecision(37, decisionCanBacktrack[37]);
22.3502 -
22.3503 - int LA37_0 = input.LA(1);
22.3504 -
22.3505 - if ( (LA37_0==REWRITE) ) {
22.3506 - alt37=1;
22.3507 - }
22.3508 - else if ( (LA37_0==ALT||LA37_0==EOB) ) {
22.3509 - alt37=2;
22.3510 - }
22.3511 - else {
22.3512 - NoViableAltException nvae =
22.3513 - new NoViableAltException("", 37, 0, input);
22.3514 -
22.3515 - dbg.recognitionException(nvae);
22.3516 - throw nvae;
22.3517 - }
22.3518 - } finally {dbg.exitDecision(37);}
22.3519 -
22.3520 - switch (alt37) {
22.3521 - case 1 :
22.3522 - dbg.enterAlt(1);
22.3523 -
22.3524 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:206:4: ( ^( '->' SEMPRED rewrite_alternative ) )* ^( '->' rewrite_alternative )
22.3525 - {
22.3526 - dbg.location(206,4);
22.3527 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:206:4: ( ^( '->' SEMPRED rewrite_alternative ) )*
22.3528 - try { dbg.enterSubRule(36);
22.3529 -
22.3530 - loop36:
22.3531 - do {
22.3532 - int alt36=2;
22.3533 - try { dbg.enterDecision(36, decisionCanBacktrack[36]);
22.3534 -
22.3535 - int LA36_0 = input.LA(1);
22.3536 -
22.3537 - if ( (LA36_0==REWRITE) ) {
22.3538 - int LA36_1 = input.LA(2);
22.3539 -
22.3540 - if ( (LA36_1==DOWN) ) {
22.3541 - int LA36_2 = input.LA(3);
22.3542 -
22.3543 - if ( (LA36_2==SEMPRED) ) {
22.3544 - alt36=1;
22.3545 - }
22.3546 -
22.3547 -
22.3548 - }
22.3549 -
22.3550 -
22.3551 - }
22.3552 -
22.3553 -
22.3554 - } finally {dbg.exitDecision(36);}
22.3555 -
22.3556 - switch (alt36) {
22.3557 - case 1 :
22.3558 - dbg.enterAlt(1);
22.3559 -
22.3560 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:206:5: ^( '->' SEMPRED rewrite_alternative )
22.3561 - {
22.3562 - dbg.location(206,5);
22.3563 - dbg.location(206,7);
22.3564 - match(input,REWRITE,FOLLOW_REWRITE_in_rewrite1012);
22.3565 -
22.3566 - match(input, Token.DOWN, null);
22.3567 - dbg.location(206,12);
22.3568 - match(input,SEMPRED,FOLLOW_SEMPRED_in_rewrite1014);
22.3569 - dbg.location(206,20);
22.3570 - pushFollow(FOLLOW_rewrite_alternative_in_rewrite1016);
22.3571 - rewrite_alternative();
22.3572 -
22.3573 - state._fsp--;
22.3574 -
22.3575 -
22.3576 - match(input, Token.UP, null);
22.3577 -
22.3578 - }
22.3579 - break;
22.3580 -
22.3581 - default :
22.3582 - break loop36;
22.3583 - }
22.3584 - } while (true);
22.3585 - } finally {dbg.exitSubRule(36);}
22.3586 -
22.3587 - dbg.location(206,43);
22.3588 - dbg.location(206,45);
22.3589 - match(input,REWRITE,FOLLOW_REWRITE_in_rewrite1022);
22.3590 -
22.3591 - match(input, Token.DOWN, null);
22.3592 - dbg.location(206,50);
22.3593 - pushFollow(FOLLOW_rewrite_alternative_in_rewrite1024);
22.3594 - rewrite_alternative();
22.3595 -
22.3596 - state._fsp--;
22.3597 -
22.3598 -
22.3599 - match(input, Token.UP, null);
22.3600 -
22.3601 - }
22.3602 - break;
22.3603 - case 2 :
22.3604 - dbg.enterAlt(2);
22.3605 -
22.3606 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:208:2:
22.3607 - {
22.3608 - }
22.3609 - break;
22.3610 -
22.3611 - }
22.3612 - }
22.3613 - catch (RecognitionException re) {
22.3614 - reportError(re);
22.3615 - recover(input,re);
22.3616 - }
22.3617 - finally {
22.3618 - }
22.3619 - dbg.location(208, 2);
22.3620 -
22.3621 - }
22.3622 - finally {
22.3623 - dbg.exitRule(getGrammarFileName(), "rewrite");
22.3624 - decRuleLevel();
22.3625 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.3626 - }
22.3627 -
22.3628 - return ;
22.3629 - }
22.3630 - // $ANTLR end "rewrite"
22.3631 -
22.3632 -
22.3633 - // $ANTLR start "rewrite_alternative"
22.3634 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:210:1: rewrite_alternative : ( rewrite_template | rewrite_tree_alternative | ^( ALT EPSILON EOA ) );
22.3635 - public final void rewrite_alternative() throws RecognitionException {
22.3636 - try { dbg.enterRule(getGrammarFileName(), "rewrite_alternative");
22.3637 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.3638 - incRuleLevel();
22.3639 - dbg.location(210, 1);
22.3640 -
22.3641 - try {
22.3642 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:211:2: ( rewrite_template | rewrite_tree_alternative | ^( ALT EPSILON EOA ) )
22.3643 - int alt38=3;
22.3644 - try { dbg.enterDecision(38, decisionCanBacktrack[38]);
22.3645 -
22.3646 - int LA38_0 = input.LA(1);
22.3647 -
22.3648 - if ( (LA38_0==TEMPLATE||LA38_0==ACTION) ) {
22.3649 - alt38=1;
22.3650 - }
22.3651 - else if ( (LA38_0==ALT) ) {
22.3652 - int LA38_2 = input.LA(2);
22.3653 -
22.3654 - if ( (LA38_2==DOWN) ) {
22.3655 - int LA38_3 = input.LA(3);
22.3656 -
22.3657 - if ( (LA38_3==EPSILON) ) {
22.3658 - alt38=3;
22.3659 - }
22.3660 - else if ( ((LA38_3>=BLOCK && LA38_3<=POSITIVE_CLOSURE)||LA38_3==LABEL||LA38_3==TREE_BEGIN||(LA38_3>=TOKEN_REF && LA38_3<=ACTION)||LA38_3==RULE_REF) ) {
22.3661 - alt38=2;
22.3662 - }
22.3663 - else {
22.3664 - NoViableAltException nvae =
22.3665 - new NoViableAltException("", 38, 3, input);
22.3666 -
22.3667 - dbg.recognitionException(nvae);
22.3668 - throw nvae;
22.3669 - }
22.3670 - }
22.3671 - else {
22.3672 - NoViableAltException nvae =
22.3673 - new NoViableAltException("", 38, 2, input);
22.3674 -
22.3675 - dbg.recognitionException(nvae);
22.3676 - throw nvae;
22.3677 - }
22.3678 - }
22.3679 - else {
22.3680 - NoViableAltException nvae =
22.3681 - new NoViableAltException("", 38, 0, input);
22.3682 -
22.3683 - dbg.recognitionException(nvae);
22.3684 - throw nvae;
22.3685 - }
22.3686 - } finally {dbg.exitDecision(38);}
22.3687 -
22.3688 - switch (alt38) {
22.3689 - case 1 :
22.3690 - dbg.enterAlt(1);
22.3691 -
22.3692 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:211:4: rewrite_template
22.3693 - {
22.3694 - dbg.location(211,4);
22.3695 - pushFollow(FOLLOW_rewrite_template_in_rewrite_alternative1039);
22.3696 - rewrite_template();
22.3697 -
22.3698 - state._fsp--;
22.3699 -
22.3700 -
22.3701 - }
22.3702 - break;
22.3703 - case 2 :
22.3704 - dbg.enterAlt(2);
22.3705 -
22.3706 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:212:4: rewrite_tree_alternative
22.3707 - {
22.3708 - dbg.location(212,4);
22.3709 - pushFollow(FOLLOW_rewrite_tree_alternative_in_rewrite_alternative1044);
22.3710 - rewrite_tree_alternative();
22.3711 -
22.3712 - state._fsp--;
22.3713 -
22.3714 -
22.3715 - }
22.3716 - break;
22.3717 - case 3 :
22.3718 - dbg.enterAlt(3);
22.3719 -
22.3720 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:213:9: ^( ALT EPSILON EOA )
22.3721 - {
22.3722 - dbg.location(213,9);
22.3723 - dbg.location(213,11);
22.3724 - match(input,ALT,FOLLOW_ALT_in_rewrite_alternative1055);
22.3725 -
22.3726 - match(input, Token.DOWN, null);
22.3727 - dbg.location(213,15);
22.3728 - match(input,EPSILON,FOLLOW_EPSILON_in_rewrite_alternative1057);
22.3729 - dbg.location(213,23);
22.3730 - match(input,EOA,FOLLOW_EOA_in_rewrite_alternative1059);
22.3731 -
22.3732 - match(input, Token.UP, null);
22.3733 -
22.3734 - }
22.3735 - break;
22.3736 -
22.3737 - }
22.3738 - }
22.3739 - catch (RecognitionException re) {
22.3740 - reportError(re);
22.3741 - recover(input,re);
22.3742 - }
22.3743 - finally {
22.3744 - }
22.3745 - dbg.location(214, 2);
22.3746 -
22.3747 - }
22.3748 - finally {
22.3749 - dbg.exitRule(getGrammarFileName(), "rewrite_alternative");
22.3750 - decRuleLevel();
22.3751 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.3752 - }
22.3753 -
22.3754 - return ;
22.3755 - }
22.3756 - // $ANTLR end "rewrite_alternative"
22.3757 -
22.3758 -
22.3759 - // $ANTLR start "rewrite_tree_block"
22.3760 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:216:1: rewrite_tree_block : ^( BLOCK rewrite_tree_alternative EOB ) ;
22.3761 - public final void rewrite_tree_block() throws RecognitionException {
22.3762 - try { dbg.enterRule(getGrammarFileName(), "rewrite_tree_block");
22.3763 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.3764 - incRuleLevel();
22.3765 - dbg.location(216, 1);
22.3766 -
22.3767 - try {
22.3768 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:217:5: ( ^( BLOCK rewrite_tree_alternative EOB ) )
22.3769 - dbg.enterAlt(1);
22.3770 -
22.3771 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:217:9: ^( BLOCK rewrite_tree_alternative EOB )
22.3772 - {
22.3773 - dbg.location(217,9);
22.3774 - dbg.location(217,11);
22.3775 - match(input,BLOCK,FOLLOW_BLOCK_in_rewrite_tree_block1078);
22.3776 -
22.3777 - match(input, Token.DOWN, null);
22.3778 - dbg.location(217,17);
22.3779 - pushFollow(FOLLOW_rewrite_tree_alternative_in_rewrite_tree_block1080);
22.3780 - rewrite_tree_alternative();
22.3781 -
22.3782 - state._fsp--;
22.3783 -
22.3784 - dbg.location(217,42);
22.3785 - match(input,EOB,FOLLOW_EOB_in_rewrite_tree_block1082);
22.3786 -
22.3787 - match(input, Token.UP, null);
22.3788 -
22.3789 - }
22.3790 -
22.3791 - }
22.3792 - catch (RecognitionException re) {
22.3793 - reportError(re);
22.3794 - recover(input,re);
22.3795 - }
22.3796 - finally {
22.3797 - }
22.3798 - dbg.location(218, 5);
22.3799 -
22.3800 - }
22.3801 - finally {
22.3802 - dbg.exitRule(getGrammarFileName(), "rewrite_tree_block");
22.3803 - decRuleLevel();
22.3804 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.3805 - }
22.3806 -
22.3807 - return ;
22.3808 - }
22.3809 - // $ANTLR end "rewrite_tree_block"
22.3810 -
22.3811 -
22.3812 - // $ANTLR start "rewrite_tree_alternative"
22.3813 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:220:1: rewrite_tree_alternative : ^( ALT ( rewrite_tree_element )+ EOA ) ;
22.3814 - public final void rewrite_tree_alternative() throws RecognitionException {
22.3815 - try { dbg.enterRule(getGrammarFileName(), "rewrite_tree_alternative");
22.3816 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.3817 - incRuleLevel();
22.3818 - dbg.location(220, 1);
22.3819 -
22.3820 - try {
22.3821 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:221:5: ( ^( ALT ( rewrite_tree_element )+ EOA ) )
22.3822 - dbg.enterAlt(1);
22.3823 -
22.3824 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:221:7: ^( ALT ( rewrite_tree_element )+ EOA )
22.3825 - {
22.3826 - dbg.location(221,7);
22.3827 - dbg.location(221,9);
22.3828 - match(input,ALT,FOLLOW_ALT_in_rewrite_tree_alternative1101);
22.3829 -
22.3830 - match(input, Token.DOWN, null);
22.3831 - dbg.location(221,13);
22.3832 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:221:13: ( rewrite_tree_element )+
22.3833 - int cnt39=0;
22.3834 - try { dbg.enterSubRule(39);
22.3835 -
22.3836 - loop39:
22.3837 - do {
22.3838 - int alt39=2;
22.3839 - try { dbg.enterDecision(39, decisionCanBacktrack[39]);
22.3840 -
22.3841 - int LA39_0 = input.LA(1);
22.3842 -
22.3843 - if ( ((LA39_0>=BLOCK && LA39_0<=POSITIVE_CLOSURE)||LA39_0==LABEL||LA39_0==TREE_BEGIN||(LA39_0>=TOKEN_REF && LA39_0<=ACTION)||LA39_0==RULE_REF) ) {
22.3844 - alt39=1;
22.3845 - }
22.3846 -
22.3847 -
22.3848 - } finally {dbg.exitDecision(39);}
22.3849 -
22.3850 - switch (alt39) {
22.3851 - case 1 :
22.3852 - dbg.enterAlt(1);
22.3853 -
22.3854 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:221:13: rewrite_tree_element
22.3855 - {
22.3856 - dbg.location(221,13);
22.3857 - pushFollow(FOLLOW_rewrite_tree_element_in_rewrite_tree_alternative1103);
22.3858 - rewrite_tree_element();
22.3859 -
22.3860 - state._fsp--;
22.3861 -
22.3862 -
22.3863 - }
22.3864 - break;
22.3865 -
22.3866 - default :
22.3867 - if ( cnt39 >= 1 ) break loop39;
22.3868 - EarlyExitException eee =
22.3869 - new EarlyExitException(39, input);
22.3870 - dbg.recognitionException(eee);
22.3871 -
22.3872 - throw eee;
22.3873 - }
22.3874 - cnt39++;
22.3875 - } while (true);
22.3876 - } finally {dbg.exitSubRule(39);}
22.3877 -
22.3878 - dbg.location(221,35);
22.3879 - match(input,EOA,FOLLOW_EOA_in_rewrite_tree_alternative1106);
22.3880 -
22.3881 - match(input, Token.UP, null);
22.3882 -
22.3883 - }
22.3884 -
22.3885 - }
22.3886 - catch (RecognitionException re) {
22.3887 - reportError(re);
22.3888 - recover(input,re);
22.3889 - }
22.3890 - finally {
22.3891 - }
22.3892 - dbg.location(222, 5);
22.3893 -
22.3894 - }
22.3895 - finally {
22.3896 - dbg.exitRule(getGrammarFileName(), "rewrite_tree_alternative");
22.3897 - decRuleLevel();
22.3898 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.3899 - }
22.3900 -
22.3901 - return ;
22.3902 - }
22.3903 - // $ANTLR end "rewrite_tree_alternative"
22.3904 -
22.3905 -
22.3906 - // $ANTLR start "rewrite_tree_element"
22.3907 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:224:1: rewrite_tree_element : ( rewrite_tree_atom | rewrite_tree | rewrite_tree_block | rewrite_tree_ebnf );
22.3908 - public final void rewrite_tree_element() throws RecognitionException {
22.3909 - try { dbg.enterRule(getGrammarFileName(), "rewrite_tree_element");
22.3910 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.3911 - incRuleLevel();
22.3912 - dbg.location(224, 1);
22.3913 -
22.3914 - try {
22.3915 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:225:2: ( rewrite_tree_atom | rewrite_tree | rewrite_tree_block | rewrite_tree_ebnf )
22.3916 - int alt40=4;
22.3917 - try { dbg.enterDecision(40, decisionCanBacktrack[40]);
22.3918 -
22.3919 - switch ( input.LA(1) ) {
22.3920 - case LABEL:
22.3921 - case TOKEN_REF:
22.3922 - case STRING_LITERAL:
22.3923 - case CHAR_LITERAL:
22.3924 - case ACTION:
22.3925 - case RULE_REF:
22.3926 - {
22.3927 - alt40=1;
22.3928 - }
22.3929 - break;
22.3930 - case TREE_BEGIN:
22.3931 - {
22.3932 - alt40=2;
22.3933 - }
22.3934 - break;
22.3935 - case BLOCK:
22.3936 - {
22.3937 - alt40=3;
22.3938 - }
22.3939 - break;
22.3940 - case OPTIONAL:
22.3941 - case CLOSURE:
22.3942 - case POSITIVE_CLOSURE:
22.3943 - {
22.3944 - alt40=4;
22.3945 - }
22.3946 - break;
22.3947 - default:
22.3948 - NoViableAltException nvae =
22.3949 - new NoViableAltException("", 40, 0, input);
22.3950 -
22.3951 - dbg.recognitionException(nvae);
22.3952 - throw nvae;
22.3953 - }
22.3954 -
22.3955 - } finally {dbg.exitDecision(40);}
22.3956 -
22.3957 - switch (alt40) {
22.3958 - case 1 :
22.3959 - dbg.enterAlt(1);
22.3960 -
22.3961 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:225:4: rewrite_tree_atom
22.3962 - {
22.3963 - dbg.location(225,4);
22.3964 - pushFollow(FOLLOW_rewrite_tree_atom_in_rewrite_tree_element1121);
22.3965 - rewrite_tree_atom();
22.3966 -
22.3967 - state._fsp--;
22.3968 -
22.3969 -
22.3970 - }
22.3971 - break;
22.3972 - case 2 :
22.3973 - dbg.enterAlt(2);
22.3974 -
22.3975 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:226:4: rewrite_tree
22.3976 - {
22.3977 - dbg.location(226,4);
22.3978 - pushFollow(FOLLOW_rewrite_tree_in_rewrite_tree_element1126);
22.3979 - rewrite_tree();
22.3980 -
22.3981 - state._fsp--;
22.3982 -
22.3983 -
22.3984 - }
22.3985 - break;
22.3986 - case 3 :
22.3987 - dbg.enterAlt(3);
22.3988 -
22.3989 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:227:6: rewrite_tree_block
22.3990 - {
22.3991 - dbg.location(227,6);
22.3992 - pushFollow(FOLLOW_rewrite_tree_block_in_rewrite_tree_element1133);
22.3993 - rewrite_tree_block();
22.3994 -
22.3995 - state._fsp--;
22.3996 -
22.3997 -
22.3998 - }
22.3999 - break;
22.4000 - case 4 :
22.4001 - dbg.enterAlt(4);
22.4002 -
22.4003 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:228:6: rewrite_tree_ebnf
22.4004 - {
22.4005 - dbg.location(228,6);
22.4006 - pushFollow(FOLLOW_rewrite_tree_ebnf_in_rewrite_tree_element1140);
22.4007 - rewrite_tree_ebnf();
22.4008 -
22.4009 - state._fsp--;
22.4010 -
22.4011 -
22.4012 - }
22.4013 - break;
22.4014 -
22.4015 - }
22.4016 - }
22.4017 - catch (RecognitionException re) {
22.4018 - reportError(re);
22.4019 - recover(input,re);
22.4020 - }
22.4021 - finally {
22.4022 - }
22.4023 - dbg.location(229, 2);
22.4024 -
22.4025 - }
22.4026 - finally {
22.4027 - dbg.exitRule(getGrammarFileName(), "rewrite_tree_element");
22.4028 - decRuleLevel();
22.4029 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.4030 - }
22.4031 -
22.4032 - return ;
22.4033 - }
22.4034 - // $ANTLR end "rewrite_tree_element"
22.4035 -
22.4036 -
22.4037 - // $ANTLR start "rewrite_tree_atom"
22.4038 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:231:1: rewrite_tree_atom : ( CHAR_LITERAL | TOKEN_REF | ^( TOKEN_REF ARG_ACTION ) | RULE_REF | STRING_LITERAL | LABEL | ACTION );
22.4039 - public final void rewrite_tree_atom() throws RecognitionException {
22.4040 - try { dbg.enterRule(getGrammarFileName(), "rewrite_tree_atom");
22.4041 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.4042 - incRuleLevel();
22.4043 - dbg.location(231, 1);
22.4044 -
22.4045 - try {
22.4046 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:232:5: ( CHAR_LITERAL | TOKEN_REF | ^( TOKEN_REF ARG_ACTION ) | RULE_REF | STRING_LITERAL | LABEL | ACTION )
22.4047 - int alt41=7;
22.4048 - try { dbg.enterDecision(41, decisionCanBacktrack[41]);
22.4049 -
22.4050 - switch ( input.LA(1) ) {
22.4051 - case CHAR_LITERAL:
22.4052 - {
22.4053 - alt41=1;
22.4054 - }
22.4055 - break;
22.4056 - case TOKEN_REF:
22.4057 - {
22.4058 - int LA41_2 = input.LA(2);
22.4059 -
22.4060 - if ( (LA41_2==DOWN) ) {
22.4061 - alt41=3;
22.4062 - }
22.4063 - else if ( (LA41_2==UP||(LA41_2>=BLOCK && LA41_2<=POSITIVE_CLOSURE)||LA41_2==EOA||LA41_2==LABEL||LA41_2==TREE_BEGIN||(LA41_2>=TOKEN_REF && LA41_2<=ACTION)||LA41_2==RULE_REF) ) {
22.4064 - alt41=2;
22.4065 - }
22.4066 - else {
22.4067 - NoViableAltException nvae =
22.4068 - new NoViableAltException("", 41, 2, input);
22.4069 -
22.4070 - dbg.recognitionException(nvae);
22.4071 - throw nvae;
22.4072 - }
22.4073 - }
22.4074 - break;
22.4075 - case RULE_REF:
22.4076 - {
22.4077 - alt41=4;
22.4078 - }
22.4079 - break;
22.4080 - case STRING_LITERAL:
22.4081 - {
22.4082 - alt41=5;
22.4083 - }
22.4084 - break;
22.4085 - case LABEL:
22.4086 - {
22.4087 - alt41=6;
22.4088 - }
22.4089 - break;
22.4090 - case ACTION:
22.4091 - {
22.4092 - alt41=7;
22.4093 - }
22.4094 - break;
22.4095 - default:
22.4096 - NoViableAltException nvae =
22.4097 - new NoViableAltException("", 41, 0, input);
22.4098 -
22.4099 - dbg.recognitionException(nvae);
22.4100 - throw nvae;
22.4101 - }
22.4102 -
22.4103 - } finally {dbg.exitDecision(41);}
22.4104 -
22.4105 - switch (alt41) {
22.4106 - case 1 :
22.4107 - dbg.enterAlt(1);
22.4108 -
22.4109 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:232:9: CHAR_LITERAL
22.4110 - {
22.4111 - dbg.location(232,9);
22.4112 - match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_rewrite_tree_atom1156);
22.4113 -
22.4114 - }
22.4115 - break;
22.4116 - case 2 :
22.4117 - dbg.enterAlt(2);
22.4118 -
22.4119 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:233:6: TOKEN_REF
22.4120 - {
22.4121 - dbg.location(233,6);
22.4122 - match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_rewrite_tree_atom1163);
22.4123 -
22.4124 - }
22.4125 - break;
22.4126 - case 3 :
22.4127 - dbg.enterAlt(3);
22.4128 -
22.4129 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:234:6: ^( TOKEN_REF ARG_ACTION )
22.4130 - {
22.4131 - dbg.location(234,6);
22.4132 - dbg.location(234,8);
22.4133 - match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_rewrite_tree_atom1171);
22.4134 -
22.4135 - match(input, Token.DOWN, null);
22.4136 - dbg.location(234,18);
22.4137 - match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rewrite_tree_atom1173);
22.4138 -
22.4139 - match(input, Token.UP, null);
22.4140 -
22.4141 - }
22.4142 - break;
22.4143 - case 4 :
22.4144 - dbg.enterAlt(4);
22.4145 -
22.4146 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:235:9: RULE_REF
22.4147 - {
22.4148 - dbg.location(235,9);
22.4149 - match(input,RULE_REF,FOLLOW_RULE_REF_in_rewrite_tree_atom1185);
22.4150 -
22.4151 - }
22.4152 - break;
22.4153 - case 5 :
22.4154 - dbg.enterAlt(5);
22.4155 -
22.4156 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:236:6: STRING_LITERAL
22.4157 - {
22.4158 - dbg.location(236,6);
22.4159 - match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_rewrite_tree_atom1192);
22.4160 -
22.4161 - }
22.4162 - break;
22.4163 - case 6 :
22.4164 - dbg.enterAlt(6);
22.4165 -
22.4166 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:237:6: LABEL
22.4167 - {
22.4168 - dbg.location(237,6);
22.4169 - match(input,LABEL,FOLLOW_LABEL_in_rewrite_tree_atom1199);
22.4170 -
22.4171 - }
22.4172 - break;
22.4173 - case 7 :
22.4174 - dbg.enterAlt(7);
22.4175 -
22.4176 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:238:4: ACTION
22.4177 - {
22.4178 - dbg.location(238,4);
22.4179 - match(input,ACTION,FOLLOW_ACTION_in_rewrite_tree_atom1204);
22.4180 -
22.4181 - }
22.4182 - break;
22.4183 -
22.4184 - }
22.4185 - }
22.4186 - catch (RecognitionException re) {
22.4187 - reportError(re);
22.4188 - recover(input,re);
22.4189 - }
22.4190 - finally {
22.4191 - }
22.4192 - dbg.location(239, 2);
22.4193 -
22.4194 - }
22.4195 - finally {
22.4196 - dbg.exitRule(getGrammarFileName(), "rewrite_tree_atom");
22.4197 - decRuleLevel();
22.4198 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.4199 - }
22.4200 -
22.4201 - return ;
22.4202 - }
22.4203 - // $ANTLR end "rewrite_tree_atom"
22.4204 -
22.4205 -
22.4206 - // $ANTLR start "rewrite_tree_ebnf"
22.4207 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:241:1: rewrite_tree_ebnf : ^( ebnfSuffix rewrite_tree_block ) ;
22.4208 - public final void rewrite_tree_ebnf() throws RecognitionException {
22.4209 - try { dbg.enterRule(getGrammarFileName(), "rewrite_tree_ebnf");
22.4210 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.4211 - incRuleLevel();
22.4212 - dbg.location(241, 1);
22.4213 -
22.4214 - try {
22.4215 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:242:2: ( ^( ebnfSuffix rewrite_tree_block ) )
22.4216 - dbg.enterAlt(1);
22.4217 -
22.4218 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:242:4: ^( ebnfSuffix rewrite_tree_block )
22.4219 - {
22.4220 - dbg.location(242,4);
22.4221 - dbg.location(242,6);
22.4222 - pushFollow(FOLLOW_ebnfSuffix_in_rewrite_tree_ebnf1216);
22.4223 - ebnfSuffix();
22.4224 -
22.4225 - state._fsp--;
22.4226 -
22.4227 -
22.4228 - match(input, Token.DOWN, null);
22.4229 - dbg.location(242,17);
22.4230 - pushFollow(FOLLOW_rewrite_tree_block_in_rewrite_tree_ebnf1218);
22.4231 - rewrite_tree_block();
22.4232 -
22.4233 - state._fsp--;
22.4234 -
22.4235 -
22.4236 - match(input, Token.UP, null);
22.4237 -
22.4238 - }
22.4239 -
22.4240 - }
22.4241 - catch (RecognitionException re) {
22.4242 - reportError(re);
22.4243 - recover(input,re);
22.4244 - }
22.4245 - finally {
22.4246 - }
22.4247 - dbg.location(243, 2);
22.4248 -
22.4249 - }
22.4250 - finally {
22.4251 - dbg.exitRule(getGrammarFileName(), "rewrite_tree_ebnf");
22.4252 - decRuleLevel();
22.4253 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.4254 - }
22.4255 -
22.4256 - return ;
22.4257 - }
22.4258 - // $ANTLR end "rewrite_tree_ebnf"
22.4259 -
22.4260 -
22.4261 - // $ANTLR start "rewrite_tree"
22.4262 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:245:1: rewrite_tree : ^( TREE_BEGIN rewrite_tree_atom ( rewrite_tree_element )* ) ;
22.4263 - public final void rewrite_tree() throws RecognitionException {
22.4264 - try { dbg.enterRule(getGrammarFileName(), "rewrite_tree");
22.4265 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.4266 - incRuleLevel();
22.4267 - dbg.location(245, 1);
22.4268 -
22.4269 - try {
22.4270 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:246:2: ( ^( TREE_BEGIN rewrite_tree_atom ( rewrite_tree_element )* ) )
22.4271 - dbg.enterAlt(1);
22.4272 -
22.4273 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:246:4: ^( TREE_BEGIN rewrite_tree_atom ( rewrite_tree_element )* )
22.4274 - {
22.4275 - dbg.location(246,4);
22.4276 - dbg.location(246,6);
22.4277 - match(input,TREE_BEGIN,FOLLOW_TREE_BEGIN_in_rewrite_tree1232);
22.4278 -
22.4279 - match(input, Token.DOWN, null);
22.4280 - dbg.location(246,17);
22.4281 - pushFollow(FOLLOW_rewrite_tree_atom_in_rewrite_tree1234);
22.4282 - rewrite_tree_atom();
22.4283 -
22.4284 - state._fsp--;
22.4285 -
22.4286 - dbg.location(246,35);
22.4287 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:246:35: ( rewrite_tree_element )*
22.4288 - try { dbg.enterSubRule(42);
22.4289 -
22.4290 - loop42:
22.4291 - do {
22.4292 - int alt42=2;
22.4293 - try { dbg.enterDecision(42, decisionCanBacktrack[42]);
22.4294 -
22.4295 - int LA42_0 = input.LA(1);
22.4296 -
22.4297 - if ( ((LA42_0>=BLOCK && LA42_0<=POSITIVE_CLOSURE)||LA42_0==LABEL||LA42_0==TREE_BEGIN||(LA42_0>=TOKEN_REF && LA42_0<=ACTION)||LA42_0==RULE_REF) ) {
22.4298 - alt42=1;
22.4299 - }
22.4300 -
22.4301 -
22.4302 - } finally {dbg.exitDecision(42);}
22.4303 -
22.4304 - switch (alt42) {
22.4305 - case 1 :
22.4306 - dbg.enterAlt(1);
22.4307 -
22.4308 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:246:35: rewrite_tree_element
22.4309 - {
22.4310 - dbg.location(246,35);
22.4311 - pushFollow(FOLLOW_rewrite_tree_element_in_rewrite_tree1236);
22.4312 - rewrite_tree_element();
22.4313 -
22.4314 - state._fsp--;
22.4315 -
22.4316 -
22.4317 - }
22.4318 - break;
22.4319 -
22.4320 - default :
22.4321 - break loop42;
22.4322 - }
22.4323 - } while (true);
22.4324 - } finally {dbg.exitSubRule(42);}
22.4325 -
22.4326 -
22.4327 - match(input, Token.UP, null);
22.4328 -
22.4329 - }
22.4330 -
22.4331 - }
22.4332 - catch (RecognitionException re) {
22.4333 - reportError(re);
22.4334 - recover(input,re);
22.4335 - }
22.4336 - finally {
22.4337 - }
22.4338 - dbg.location(247, 2);
22.4339 -
22.4340 - }
22.4341 - finally {
22.4342 - dbg.exitRule(getGrammarFileName(), "rewrite_tree");
22.4343 - decRuleLevel();
22.4344 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.4345 - }
22.4346 -
22.4347 - return ;
22.4348 - }
22.4349 - // $ANTLR end "rewrite_tree"
22.4350 -
22.4351 -
22.4352 - // $ANTLR start "rewrite_template"
22.4353 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:249:1: rewrite_template : ( ^( TEMPLATE ID rewrite_template_args ( DOUBLE_QUOTE_STRING_LITERAL | DOUBLE_ANGLE_STRING_LITERAL ) ) | rewrite_template_ref | rewrite_indirect_template_head | ACTION );
22.4354 - public final void rewrite_template() throws RecognitionException {
22.4355 - try { dbg.enterRule(getGrammarFileName(), "rewrite_template");
22.4356 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.4357 - incRuleLevel();
22.4358 - dbg.location(249, 1);
22.4359 -
22.4360 - try {
22.4361 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:250:2: ( ^( TEMPLATE ID rewrite_template_args ( DOUBLE_QUOTE_STRING_LITERAL | DOUBLE_ANGLE_STRING_LITERAL ) ) | rewrite_template_ref | rewrite_indirect_template_head | ACTION )
22.4362 - int alt43=4;
22.4363 - try { dbg.enterDecision(43, decisionCanBacktrack[43]);
22.4364 -
22.4365 - try {
22.4366 - isCyclicDecision = true;
22.4367 - alt43 = dfa43.predict(input);
22.4368 - }
22.4369 - catch (NoViableAltException nvae) {
22.4370 - dbg.recognitionException(nvae);
22.4371 - throw nvae;
22.4372 - }
22.4373 - } finally {dbg.exitDecision(43);}
22.4374 -
22.4375 - switch (alt43) {
22.4376 - case 1 :
22.4377 - dbg.enterAlt(1);
22.4378 -
22.4379 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:250:6: ^( TEMPLATE ID rewrite_template_args ( DOUBLE_QUOTE_STRING_LITERAL | DOUBLE_ANGLE_STRING_LITERAL ) )
22.4380 - {
22.4381 - dbg.location(250,6);
22.4382 - dbg.location(250,9);
22.4383 - match(input,TEMPLATE,FOLLOW_TEMPLATE_in_rewrite_template1254);
22.4384 -
22.4385 - match(input, Token.DOWN, null);
22.4386 - dbg.location(250,18);
22.4387 - match(input,ID,FOLLOW_ID_in_rewrite_template1256);
22.4388 - dbg.location(250,21);
22.4389 - pushFollow(FOLLOW_rewrite_template_args_in_rewrite_template1258);
22.4390 - rewrite_template_args();
22.4391 -
22.4392 - state._fsp--;
22.4393 -
22.4394 - dbg.location(251,6);
22.4395 - if ( (input.LA(1)>=DOUBLE_QUOTE_STRING_LITERAL && input.LA(1)<=DOUBLE_ANGLE_STRING_LITERAL) ) {
22.4396 - input.consume();
22.4397 - state.errorRecovery=false;
22.4398 - }
22.4399 - else {
22.4400 - MismatchedSetException mse = new MismatchedSetException(null,input);
22.4401 - dbg.recognitionException(mse);
22.4402 - throw mse;
22.4403 - }
22.4404 -
22.4405 -
22.4406 - match(input, Token.UP, null);
22.4407 -
22.4408 - }
22.4409 - break;
22.4410 - case 2 :
22.4411 - dbg.enterAlt(2);
22.4412 -
22.4413 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:253:4: rewrite_template_ref
22.4414 - {
22.4415 - dbg.location(253,4);
22.4416 - pushFollow(FOLLOW_rewrite_template_ref_in_rewrite_template1281);
22.4417 - rewrite_template_ref();
22.4418 -
22.4419 - state._fsp--;
22.4420 -
22.4421 -
22.4422 - }
22.4423 - break;
22.4424 - case 3 :
22.4425 - dbg.enterAlt(3);
22.4426 -
22.4427 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:254:4: rewrite_indirect_template_head
22.4428 - {
22.4429 - dbg.location(254,4);
22.4430 - pushFollow(FOLLOW_rewrite_indirect_template_head_in_rewrite_template1286);
22.4431 - rewrite_indirect_template_head();
22.4432 -
22.4433 - state._fsp--;
22.4434 -
22.4435 -
22.4436 - }
22.4437 - break;
22.4438 - case 4 :
22.4439 - dbg.enterAlt(4);
22.4440 -
22.4441 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:255:4: ACTION
22.4442 - {
22.4443 - dbg.location(255,4);
22.4444 - match(input,ACTION,FOLLOW_ACTION_in_rewrite_template1291);
22.4445 -
22.4446 - }
22.4447 - break;
22.4448 -
22.4449 - }
22.4450 - }
22.4451 - catch (RecognitionException re) {
22.4452 - reportError(re);
22.4453 - recover(input,re);
22.4454 - }
22.4455 - finally {
22.4456 - }
22.4457 - dbg.location(256, 2);
22.4458 -
22.4459 - }
22.4460 - finally {
22.4461 - dbg.exitRule(getGrammarFileName(), "rewrite_template");
22.4462 - decRuleLevel();
22.4463 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.4464 - }
22.4465 -
22.4466 - return ;
22.4467 - }
22.4468 - // $ANTLR end "rewrite_template"
22.4469 -
22.4470 -
22.4471 - // $ANTLR start "rewrite_template_ref"
22.4472 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:258:1: rewrite_template_ref : ^( TEMPLATE ID rewrite_template_args ) ;
22.4473 - public final void rewrite_template_ref() throws RecognitionException {
22.4474 - try { dbg.enterRule(getGrammarFileName(), "rewrite_template_ref");
22.4475 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.4476 - incRuleLevel();
22.4477 - dbg.location(258, 1);
22.4478 -
22.4479 - try {
22.4480 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:260:2: ( ^( TEMPLATE ID rewrite_template_args ) )
22.4481 - dbg.enterAlt(1);
22.4482 -
22.4483 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:260:4: ^( TEMPLATE ID rewrite_template_args )
22.4484 - {
22.4485 - dbg.location(260,4);
22.4486 - dbg.location(260,6);
22.4487 - match(input,TEMPLATE,FOLLOW_TEMPLATE_in_rewrite_template_ref1305);
22.4488 -
22.4489 - match(input, Token.DOWN, null);
22.4490 - dbg.location(260,15);
22.4491 - match(input,ID,FOLLOW_ID_in_rewrite_template_ref1307);
22.4492 - dbg.location(260,18);
22.4493 - pushFollow(FOLLOW_rewrite_template_args_in_rewrite_template_ref1309);
22.4494 - rewrite_template_args();
22.4495 -
22.4496 - state._fsp--;
22.4497 -
22.4498 -
22.4499 - match(input, Token.UP, null);
22.4500 -
22.4501 - }
22.4502 -
22.4503 - }
22.4504 - catch (RecognitionException re) {
22.4505 - reportError(re);
22.4506 - recover(input,re);
22.4507 - }
22.4508 - finally {
22.4509 - }
22.4510 - dbg.location(261, 2);
22.4511 -
22.4512 - }
22.4513 - finally {
22.4514 - dbg.exitRule(getGrammarFileName(), "rewrite_template_ref");
22.4515 - decRuleLevel();
22.4516 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.4517 - }
22.4518 -
22.4519 - return ;
22.4520 - }
22.4521 - // $ANTLR end "rewrite_template_ref"
22.4522 -
22.4523 -
22.4524 - // $ANTLR start "rewrite_indirect_template_head"
22.4525 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:263:1: rewrite_indirect_template_head : ^( TEMPLATE ACTION rewrite_template_args ) ;
22.4526 - public final void rewrite_indirect_template_head() throws RecognitionException {
22.4527 - try { dbg.enterRule(getGrammarFileName(), "rewrite_indirect_template_head");
22.4528 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.4529 - incRuleLevel();
22.4530 - dbg.location(263, 1);
22.4531 -
22.4532 - try {
22.4533 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:265:2: ( ^( TEMPLATE ACTION rewrite_template_args ) )
22.4534 - dbg.enterAlt(1);
22.4535 -
22.4536 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:265:4: ^( TEMPLATE ACTION rewrite_template_args )
22.4537 - {
22.4538 - dbg.location(265,4);
22.4539 - dbg.location(265,6);
22.4540 - match(input,TEMPLATE,FOLLOW_TEMPLATE_in_rewrite_indirect_template_head1324);
22.4541 -
22.4542 - match(input, Token.DOWN, null);
22.4543 - dbg.location(265,15);
22.4544 - match(input,ACTION,FOLLOW_ACTION_in_rewrite_indirect_template_head1326);
22.4545 - dbg.location(265,22);
22.4546 - pushFollow(FOLLOW_rewrite_template_args_in_rewrite_indirect_template_head1328);
22.4547 - rewrite_template_args();
22.4548 -
22.4549 - state._fsp--;
22.4550 -
22.4551 -
22.4552 - match(input, Token.UP, null);
22.4553 -
22.4554 - }
22.4555 -
22.4556 - }
22.4557 - catch (RecognitionException re) {
22.4558 - reportError(re);
22.4559 - recover(input,re);
22.4560 - }
22.4561 - finally {
22.4562 - }
22.4563 - dbg.location(266, 2);
22.4564 -
22.4565 - }
22.4566 - finally {
22.4567 - dbg.exitRule(getGrammarFileName(), "rewrite_indirect_template_head");
22.4568 - decRuleLevel();
22.4569 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.4570 - }
22.4571 -
22.4572 - return ;
22.4573 - }
22.4574 - // $ANTLR end "rewrite_indirect_template_head"
22.4575 -
22.4576 -
22.4577 - // $ANTLR start "rewrite_template_args"
22.4578 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:268:1: rewrite_template_args : ( ^( ARGLIST ( rewrite_template_arg )+ ) | ARGLIST );
22.4579 - public final void rewrite_template_args() throws RecognitionException {
22.4580 - try { dbg.enterRule(getGrammarFileName(), "rewrite_template_args");
22.4581 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.4582 - incRuleLevel();
22.4583 - dbg.location(268, 1);
22.4584 -
22.4585 - try {
22.4586 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:269:2: ( ^( ARGLIST ( rewrite_template_arg )+ ) | ARGLIST )
22.4587 - int alt45=2;
22.4588 - try { dbg.enterDecision(45, decisionCanBacktrack[45]);
22.4589 -
22.4590 - int LA45_0 = input.LA(1);
22.4591 -
22.4592 - if ( (LA45_0==ARGLIST) ) {
22.4593 - int LA45_1 = input.LA(2);
22.4594 -
22.4595 - if ( (LA45_1==DOWN) ) {
22.4596 - alt45=1;
22.4597 - }
22.4598 - else if ( (LA45_1==UP||(LA45_1>=DOUBLE_QUOTE_STRING_LITERAL && LA45_1<=DOUBLE_ANGLE_STRING_LITERAL)) ) {
22.4599 - alt45=2;
22.4600 - }
22.4601 - else {
22.4602 - NoViableAltException nvae =
22.4603 - new NoViableAltException("", 45, 1, input);
22.4604 -
22.4605 - dbg.recognitionException(nvae);
22.4606 - throw nvae;
22.4607 - }
22.4608 - }
22.4609 - else {
22.4610 - NoViableAltException nvae =
22.4611 - new NoViableAltException("", 45, 0, input);
22.4612 -
22.4613 - dbg.recognitionException(nvae);
22.4614 - throw nvae;
22.4615 - }
22.4616 - } finally {dbg.exitDecision(45);}
22.4617 -
22.4618 - switch (alt45) {
22.4619 - case 1 :
22.4620 - dbg.enterAlt(1);
22.4621 -
22.4622 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:269:4: ^( ARGLIST ( rewrite_template_arg )+ )
22.4623 - {
22.4624 - dbg.location(269,4);
22.4625 - dbg.location(269,6);
22.4626 - match(input,ARGLIST,FOLLOW_ARGLIST_in_rewrite_template_args1341);
22.4627 -
22.4628 - match(input, Token.DOWN, null);
22.4629 - dbg.location(269,14);
22.4630 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:269:14: ( rewrite_template_arg )+
22.4631 - int cnt44=0;
22.4632 - try { dbg.enterSubRule(44);
22.4633 -
22.4634 - loop44:
22.4635 - do {
22.4636 - int alt44=2;
22.4637 - try { dbg.enterDecision(44, decisionCanBacktrack[44]);
22.4638 -
22.4639 - int LA44_0 = input.LA(1);
22.4640 -
22.4641 - if ( (LA44_0==ARG) ) {
22.4642 - alt44=1;
22.4643 - }
22.4644 -
22.4645 -
22.4646 - } finally {dbg.exitDecision(44);}
22.4647 -
22.4648 - switch (alt44) {
22.4649 - case 1 :
22.4650 - dbg.enterAlt(1);
22.4651 -
22.4652 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:269:14: rewrite_template_arg
22.4653 - {
22.4654 - dbg.location(269,14);
22.4655 - pushFollow(FOLLOW_rewrite_template_arg_in_rewrite_template_args1343);
22.4656 - rewrite_template_arg();
22.4657 -
22.4658 - state._fsp--;
22.4659 -
22.4660 -
22.4661 - }
22.4662 - break;
22.4663 -
22.4664 - default :
22.4665 - if ( cnt44 >= 1 ) break loop44;
22.4666 - EarlyExitException eee =
22.4667 - new EarlyExitException(44, input);
22.4668 - dbg.recognitionException(eee);
22.4669 -
22.4670 - throw eee;
22.4671 - }
22.4672 - cnt44++;
22.4673 - } while (true);
22.4674 - } finally {dbg.exitSubRule(44);}
22.4675 -
22.4676 -
22.4677 - match(input, Token.UP, null);
22.4678 -
22.4679 - }
22.4680 - break;
22.4681 - case 2 :
22.4682 - dbg.enterAlt(2);
22.4683 -
22.4684 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:270:4: ARGLIST
22.4685 - {
22.4686 - dbg.location(270,4);
22.4687 - match(input,ARGLIST,FOLLOW_ARGLIST_in_rewrite_template_args1350);
22.4688 -
22.4689 - }
22.4690 - break;
22.4691 -
22.4692 - }
22.4693 - }
22.4694 - catch (RecognitionException re) {
22.4695 - reportError(re);
22.4696 - recover(input,re);
22.4697 - }
22.4698 - finally {
22.4699 - }
22.4700 - dbg.location(271, 2);
22.4701 -
22.4702 - }
22.4703 - finally {
22.4704 - dbg.exitRule(getGrammarFileName(), "rewrite_template_args");
22.4705 - decRuleLevel();
22.4706 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.4707 - }
22.4708 -
22.4709 - return ;
22.4710 - }
22.4711 - // $ANTLR end "rewrite_template_args"
22.4712 -
22.4713 -
22.4714 - // $ANTLR start "rewrite_template_arg"
22.4715 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:273:1: rewrite_template_arg : ^( ARG ID ACTION ) ;
22.4716 - public final void rewrite_template_arg() throws RecognitionException {
22.4717 - try { dbg.enterRule(getGrammarFileName(), "rewrite_template_arg");
22.4718 - if ( getRuleLevel()==0 ) {dbg.commence();}
22.4719 - incRuleLevel();
22.4720 - dbg.location(273, 1);
22.4721 -
22.4722 - try {
22.4723 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:274:2: ( ^( ARG ID ACTION ) )
22.4724 - dbg.enterAlt(1);
22.4725 -
22.4726 - // /Volumes/Mercurial/web-main/contrib/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/ANTLRv3Tree.g:274:6: ^( ARG ID ACTION )
22.4727 - {
22.4728 - dbg.location(274,6);
22.4729 - dbg.location(274,8);
22.4730 - match(input,ARG,FOLLOW_ARG_in_rewrite_template_arg1364);
22.4731 -
22.4732 - match(input, Token.DOWN, null);
22.4733 - dbg.location(274,12);
22.4734 - match(input,ID,FOLLOW_ID_in_rewrite_template_arg1366);
22.4735 - dbg.location(274,15);
22.4736 - match(input,ACTION,FOLLOW_ACTION_in_rewrite_template_arg1368);
22.4737 -
22.4738 - match(input, Token.UP, null);
22.4739 -
22.4740 - }
22.4741 -
22.4742 - }
22.4743 - catch (RecognitionException re) {
22.4744 - reportError(re);
22.4745 - recover(input,re);
22.4746 - }
22.4747 - finally {
22.4748 - }
22.4749 - dbg.location(275, 2);
22.4750 -
22.4751 - }
22.4752 - finally {
22.4753 - dbg.exitRule(getGrammarFileName(), "rewrite_template_arg");
22.4754 - decRuleLevel();
22.4755 - if ( getRuleLevel()==0 ) {dbg.terminate();}
22.4756 - }
22.4757 -
22.4758 - return ;
22.4759 - }
22.4760 - // $ANTLR end "rewrite_template_arg"
22.4761 -
22.4762 - // Delegated rules
22.4763 -
22.4764 -
22.4765 - protected DFA30 dfa30 = new DFA30(this);
22.4766 - protected DFA43 dfa43 = new DFA43(this);
22.4767 - static final String DFA30_eotS =
22.4768 - "\14\uffff";
22.4769 - static final String DFA30_eofS =
22.4770 - "\14\uffff";
22.4771 - static final String DFA30_minS =
22.4772 - "\1\10\1\2\6\uffff\1\24\1\10\2\uffff";
22.4773 - static final String DFA30_maxS =
22.4774 - "\1\134\1\2\6\uffff\1\24\1\134\2\uffff";
22.4775 - static final String DFA30_acceptS =
22.4776 - "\2\uffff\1\3\1\4\1\5\1\6\1\7\1\10\2\uffff\1\1\1\2";
22.4777 - static final String DFA30_specialS =
22.4778 - "\14\uffff}>";
22.4779 - static final String[] DFA30_transitionS = {
22.4780 - "\5\3\1\uffff\1\2\21\uffff\1\5\1\6\1\3\2\uffff\1\7\2\2\2\uffff"+
22.4781 - "\3\2\1\4\3\uffff\1\2\25\uffff\1\1\17\uffff\1\1\1\uffff\1\2\2"+
22.4782 - "\uffff\1\2",
22.4783 - "\1\10",
22.4784 - "",
22.4785 - "",
22.4786 - "",
22.4787 - "",
22.4788 - "",
22.4789 - "",
22.4790 - "\1\11",
22.4791 - "\1\12\5\uffff\1\13\27\uffff\2\13\2\uffff\3\13\4\uffff\1\13"+
22.4792 - "\47\uffff\1\13\2\uffff\1\13",
22.4793 - "",
22.4794 - ""
22.4795 - };
22.4796 -
22.4797 - static final short[] DFA30_eot = DFA.unpackEncodedString(DFA30_eotS);
22.4798 - static final short[] DFA30_eof = DFA.unpackEncodedString(DFA30_eofS);
22.4799 - static final char[] DFA30_min = DFA.unpackEncodedStringToUnsignedChars(DFA30_minS);
22.4800 - static final char[] DFA30_max = DFA.unpackEncodedStringToUnsignedChars(DFA30_maxS);
22.4801 - static final short[] DFA30_accept = DFA.unpackEncodedString(DFA30_acceptS);
22.4802 - static final short[] DFA30_special = DFA.unpackEncodedString(DFA30_specialS);
22.4803 - static final short[][] DFA30_transition;
22.4804 -
22.4805 - static {
22.4806 - int numStates = DFA30_transitionS.length;
22.4807 - DFA30_transition = new short[numStates][];
22.4808 - for (int i=0; i<numStates; i++) {
22.4809 - DFA30_transition[i] = DFA.unpackEncodedString(DFA30_transitionS[i]);
22.4810 - }
22.4811 - }
22.4812 -
22.4813 - class DFA30 extends DFA {
22.4814 -
22.4815 - public DFA30(BaseRecognizer recognizer) {
22.4816 - this.recognizer = recognizer;
22.4817 - this.decisionNumber = 30;
22.4818 - this.eot = DFA30_eot;
22.4819 - this.eof = DFA30_eof;
22.4820 - this.min = DFA30_min;
22.4821 - this.max = DFA30_max;
22.4822 - this.accept = DFA30_accept;
22.4823 - this.special = DFA30_special;
22.4824 - this.transition = DFA30_transition;
22.4825 - }
22.4826 - public String getDescription() {
22.4827 - return "143:1: elementNoOptionSpec : ( ^( ( '=' | '+=' ) ID block ) | ^( ( '=' | '+=' ) ID atom ) | atom | ebnf | ACTION | SEMPRED | GATED_SEMPRED | treeSpec );";
22.4828 - }
22.4829 - public void error(NoViableAltException nvae) {
22.4830 - dbg.recognitionException(nvae);
22.4831 - }
22.4832 - }
22.4833 - static final String DFA43_eotS =
22.4834 - "\20\uffff";
22.4835 - static final String DFA43_eofS =
22.4836 - "\20\uffff";
22.4837 - static final String DFA43_minS =
22.4838 - "\1\36\1\2\1\uffff\1\24\1\26\1\uffff\1\2\1\25\2\uffff\1\2\1\24\1"+
22.4839 - "\55\3\3";
22.4840 - static final String DFA43_maxS =
22.4841 - "\1\55\1\2\1\uffff\1\55\1\26\1\uffff\1\63\1\25\2\uffff\1\2\1\24\1"+
22.4842 - "\55\1\3\1\25\1\63";
22.4843 - static final String DFA43_acceptS =
22.4844 - "\2\uffff\1\4\2\uffff\1\3\2\uffff\1\1\1\2\6\uffff";
22.4845 - static final String DFA43_specialS =
22.4846 - "\20\uffff}>";
22.4847 - static final String[] DFA43_transitionS = {
22.4848 - "\1\1\16\uffff\1\2",
22.4849 - "\1\3",
22.4850 - "",
22.4851 - "\1\4\30\uffff\1\5",
22.4852 - "\1\6",
22.4853 - "",
22.4854 - "\1\7\1\11\56\uffff\2\10",
22.4855 - "\1\12",
22.4856 - "",
22.4857 - "",
22.4858 - "\1\13",
22.4859 - "\1\14",
22.4860 - "\1\15",
22.4861 - "\1\16",
22.4862 - "\1\17\21\uffff\1\12",
22.4863 - "\1\11\56\uffff\2\10"
22.4864 - };
22.4865 -
22.4866 - static final short[] DFA43_eot = DFA.unpackEncodedString(DFA43_eotS);
22.4867 - static final short[] DFA43_eof = DFA.unpackEncodedString(DFA43_eofS);
22.4868 - static final char[] DFA43_min = DFA.unpackEncodedStringToUnsignedChars(DFA43_minS);
22.4869 - static final char[] DFA43_max = DFA.unpackEncodedStringToUnsignedChars(DFA43_maxS);
22.4870 - static final short[] DFA43_accept = DFA.unpackEncodedString(DFA43_acceptS);
22.4871 - static final short[] DFA43_special = DFA.unpackEncodedString(DFA43_specialS);
22.4872 - static final short[][] DFA43_transition;
22.4873 -
22.4874 - static {
22.4875 - int numStates = DFA43_transitionS.length;
22.4876 - DFA43_transition = new short[numStates][];
22.4877 - for (int i=0; i<numStates; i++) {
22.4878 - DFA43_transition[i] = DFA.unpackEncodedString(DFA43_transitionS[i]);
22.4879 - }
22.4880 - }
22.4881 -
22.4882 - class DFA43 extends DFA {
22.4883 -
22.4884 - public DFA43(BaseRecognizer recognizer) {
22.4885 - this.recognizer = recognizer;
22.4886 - this.decisionNumber = 43;
22.4887 - this.eot = DFA43_eot;
22.4888 - this.eof = DFA43_eof;
22.4889 - this.min = DFA43_min;
22.4890 - this.max = DFA43_max;
22.4891 - this.accept = DFA43_accept;
22.4892 - this.special = DFA43_special;
22.4893 - this.transition = DFA43_transition;
22.4894 - }
22.4895 - public String getDescription() {
22.4896 - return "249:1: rewrite_template : ( ^( TEMPLATE ID rewrite_template_args ( DOUBLE_QUOTE_STRING_LITERAL | DOUBLE_ANGLE_STRING_LITERAL ) ) | rewrite_template_ref | rewrite_indirect_template_head | ACTION );";
22.4897 - }
22.4898 - public void error(NoViableAltException nvae) {
22.4899 - dbg.recognitionException(nvae);
22.4900 - }
22.4901 - }
22.4902 -
22.4903 -
22.4904 - public static final BitSet FOLLOW_grammarType_in_grammarDef52 = new BitSet(new long[]{0x0000000000000004L});
22.4905 - public static final BitSet FOLLOW_ID_in_grammarDef54 = new BitSet(new long[]{0x0000420080000090L,0x0000000000000100L});
22.4906 - public static final BitSet FOLLOW_DOC_COMMENT_in_grammarDef56 = new BitSet(new long[]{0x0000420080000090L,0x0000000000000100L});
22.4907 - public static final BitSet FOLLOW_optionsSpec_in_grammarDef59 = new BitSet(new long[]{0x0000420080000090L,0x0000000000000100L});
22.4908 - public static final BitSet FOLLOW_tokensSpec_in_grammarDef62 = new BitSet(new long[]{0x0000420080000090L,0x0000000000000100L});
22.4909 - public static final BitSet FOLLOW_attrScope_in_grammarDef65 = new BitSet(new long[]{0x0000420080000090L,0x0000000000000100L});
22.4910 - public static final BitSet FOLLOW_action_in_grammarDef68 = new BitSet(new long[]{0x0000420080000090L,0x0000000000000100L});
22.4911 - public static final BitSet FOLLOW_rule_in_grammarDef71 = new BitSet(new long[]{0x0000420080000098L,0x0000000000000100L});
22.4912 - public static final BitSet FOLLOW_set_in_grammarType0 = new BitSet(new long[]{0x0000000000000002L});
22.4913 - public static final BitSet FOLLOW_TOKENS_in_tokensSpec127 = new BitSet(new long[]{0x0000000000000004L});
22.4914 - public static final BitSet FOLLOW_tokenSpec_in_tokensSpec129 = new BitSet(new long[]{0x0000040000000008L,0x0000000000000080L});
22.4915 - public static final BitSet FOLLOW_71_in_tokenSpec143 = new BitSet(new long[]{0x0000000000000004L});
22.4916 - public static final BitSet FOLLOW_TOKEN_REF_in_tokenSpec145 = new BitSet(new long[]{0x0000080000000000L});
22.4917 - public static final BitSet FOLLOW_STRING_LITERAL_in_tokenSpec147 = new BitSet(new long[]{0x0000000000000008L});
22.4918 - public static final BitSet FOLLOW_71_in_tokenSpec154 = new BitSet(new long[]{0x0000000000000004L});
22.4919 - public static final BitSet FOLLOW_TOKEN_REF_in_tokenSpec156 = new BitSet(new long[]{0x0000100000000000L});
22.4920 - public static final BitSet FOLLOW_CHAR_LITERAL_in_tokenSpec158 = new BitSet(new long[]{0x0000000000000008L});
22.4921 - public static final BitSet FOLLOW_TOKEN_REF_in_tokenSpec164 = new BitSet(new long[]{0x0000000000000002L});
22.4922 - public static final BitSet FOLLOW_SCOPE_in_attrScope176 = new BitSet(new long[]{0x0000000000000004L});
22.4923 - public static final BitSet FOLLOW_ID_in_attrScope178 = new BitSet(new long[]{0x0000200000000000L});
22.4924 - public static final BitSet FOLLOW_ACTION_in_attrScope180 = new BitSet(new long[]{0x0000000000000008L});
22.4925 - public static final BitSet FOLLOW_72_in_action193 = new BitSet(new long[]{0x0000000000000004L});
22.4926 - public static final BitSet FOLLOW_ID_in_action195 = new BitSet(new long[]{0x0000000000100000L});
22.4927 - public static final BitSet FOLLOW_ID_in_action197 = new BitSet(new long[]{0x0000200000000000L});
22.4928 - public static final BitSet FOLLOW_ACTION_in_action199 = new BitSet(new long[]{0x0000000000000008L});
22.4929 - public static final BitSet FOLLOW_72_in_action206 = new BitSet(new long[]{0x0000000000000004L});
22.4930 - public static final BitSet FOLLOW_ID_in_action208 = new BitSet(new long[]{0x0000200000000000L});
22.4931 - public static final BitSet FOLLOW_ACTION_in_action210 = new BitSet(new long[]{0x0000000000000008L});
22.4932 - public static final BitSet FOLLOW_OPTIONS_in_optionsSpec223 = new BitSet(new long[]{0x0000000000000004L});
22.4933 - public static final BitSet FOLLOW_option_in_optionsSpec225 = new BitSet(new long[]{0x0000000000000008L,0x0000000000000080L});
22.4934 - public static final BitSet FOLLOW_71_in_option244 = new BitSet(new long[]{0x0000000000000004L});
22.4935 - public static final BitSet FOLLOW_ID_in_option246 = new BitSet(new long[]{0x0000980000100000L});
22.4936 - public static final BitSet FOLLOW_optionValue_in_option248 = new BitSet(new long[]{0x0000000000000008L});
22.4937 - public static final BitSet FOLLOW_set_in_optionValue0 = new BitSet(new long[]{0x0000000000000002L});
22.4938 - public static final BitSet FOLLOW_RULE_in_rule314 = new BitSet(new long[]{0x0000000000000004L});
22.4939 - public static final BitSet FOLLOW_ID_in_rule316 = new BitSet(new long[]{0x0000401080A00100L,0x0000000000003900L});
22.4940 - public static final BitSet FOLLOW_modifier_in_rule318 = new BitSet(new long[]{0x0000401080A00100L,0x0000000000003900L});
22.4941 - public static final BitSet FOLLOW_ARG_in_rule323 = new BitSet(new long[]{0x0000000000000004L});
22.4942 - public static final BitSet FOLLOW_ARG_ACTION_in_rule325 = new BitSet(new long[]{0x0000000000000008L});
22.4943 - public static final BitSet FOLLOW_RET_in_rule332 = new BitSet(new long[]{0x0000000000000004L});
22.4944 - public static final BitSet FOLLOW_ARG_ACTION_in_rule334 = new BitSet(new long[]{0x0000000000000008L});
22.4945 - public static final BitSet FOLLOW_optionsSpec_in_rule347 = new BitSet(new long[]{0x0000401080A00100L,0x0000000000003900L});
22.4946 - public static final BitSet FOLLOW_ruleScopeSpec_in_rule350 = new BitSet(new long[]{0x0000401080A00100L,0x0000000000003900L});
22.4947 - public static final BitSet FOLLOW_ruleAction_in_rule353 = new BitSet(new long[]{0x0000401080A00100L,0x0000000000003900L});
22.4948 - public static final BitSet FOLLOW_altList_in_rule364 = new BitSet(new long[]{0x0000000000020000L,0x0000000000600000L});
22.4949 - public static final BitSet FOLLOW_exceptionGroup_in_rule374 = new BitSet(new long[]{0x0000000000020000L});
22.4950 - public static final BitSet FOLLOW_EOR_in_rule377 = new BitSet(new long[]{0x0000000000000008L});
22.4951 - public static final BitSet FOLLOW_set_in_modifier0 = new BitSet(new long[]{0x0000000000000002L});
22.4952 - public static final BitSet FOLLOW_72_in_ruleAction416 = new BitSet(new long[]{0x0000000000000004L});
22.4953 - public static final BitSet FOLLOW_ID_in_ruleAction418 = new BitSet(new long[]{0x0000200000000000L});
22.4954 - public static final BitSet FOLLOW_ACTION_in_ruleAction420 = new BitSet(new long[]{0x0000000000000008L});
22.4955 - public static final BitSet FOLLOW_80_in_throwsSpec433 = new BitSet(new long[]{0x0000000000000004L});
22.4956 - public static final BitSet FOLLOW_ID_in_throwsSpec435 = new BitSet(new long[]{0x0000000000100008L});
22.4957 - public static final BitSet FOLLOW_SCOPE_in_ruleScopeSpec449 = new BitSet(new long[]{0x0000000000000004L});
22.4958 - public static final BitSet FOLLOW_ACTION_in_ruleScopeSpec451 = new BitSet(new long[]{0x0000000000000008L});
22.4959 - public static final BitSet FOLLOW_SCOPE_in_ruleScopeSpec458 = new BitSet(new long[]{0x0000000000000004L});
22.4960 - public static final BitSet FOLLOW_ACTION_in_ruleScopeSpec460 = new BitSet(new long[]{0x0000000000100000L});
22.4961 - public static final BitSet FOLLOW_ID_in_ruleScopeSpec462 = new BitSet(new long[]{0x0000000000100008L});
22.4962 - public static final BitSet FOLLOW_SCOPE_in_ruleScopeSpec470 = new BitSet(new long[]{0x0000000000000004L});
22.4963 - public static final BitSet FOLLOW_ID_in_ruleScopeSpec472 = new BitSet(new long[]{0x0000000000100008L});
22.4964 - public static final BitSet FOLLOW_BLOCK_in_block492 = new BitSet(new long[]{0x0000000000000004L});
22.4965 - public static final BitSet FOLLOW_optionsSpec_in_block494 = new BitSet(new long[]{0x0000000000010000L});
22.4966 - public static final BitSet FOLLOW_alternative_in_block498 = new BitSet(new long[]{0x0000010000050000L});
22.4967 - public static final BitSet FOLLOW_rewrite_in_block500 = new BitSet(new long[]{0x0000000000050000L});
22.4968 - public static final BitSet FOLLOW_EOB_in_block504 = new BitSet(new long[]{0x0000000000000008L});
22.4969 - public static final BitSet FOLLOW_BLOCK_in_altList527 = new BitSet(new long[]{0x0000000000000004L});
22.4970 - public static final BitSet FOLLOW_alternative_in_altList530 = new BitSet(new long[]{0x0000010000050000L});
22.4971 - public static final BitSet FOLLOW_rewrite_in_altList532 = new BitSet(new long[]{0x0000000000050000L});
22.4972 - public static final BitSet FOLLOW_EOB_in_altList536 = new BitSet(new long[]{0x0000000000000008L});
22.4973 - public static final BitSet FOLLOW_ALT_in_alternative558 = new BitSet(new long[]{0x0000000000000004L});
22.4974 - public static final BitSet FOLLOW_element_in_alternative560 = new BitSet(new long[]{0x00023CE700085F00L,0x0000000012800080L});
22.4975 - public static final BitSet FOLLOW_EOA_in_alternative563 = new BitSet(new long[]{0x0000000000000008L});
22.4976 - public static final BitSet FOLLOW_ALT_in_alternative575 = new BitSet(new long[]{0x0000000000000004L});
22.4977 - public static final BitSet FOLLOW_EPSILON_in_alternative577 = new BitSet(new long[]{0x0000000000080000L});
22.4978 - public static final BitSet FOLLOW_EOA_in_alternative579 = new BitSet(new long[]{0x0000000000000008L});
22.4979 - public static final BitSet FOLLOW_exceptionHandler_in_exceptionGroup594 = new BitSet(new long[]{0x0000000000000002L,0x0000000000600000L});
22.4980 - public static final BitSet FOLLOW_finallyClause_in_exceptionGroup597 = new BitSet(new long[]{0x0000000000000002L});
22.4981 - public static final BitSet FOLLOW_finallyClause_in_exceptionGroup603 = new BitSet(new long[]{0x0000000000000002L});
22.4982 - public static final BitSet FOLLOW_85_in_exceptionHandler624 = new BitSet(new long[]{0x0000000000000004L});
22.4983 - public static final BitSet FOLLOW_ARG_ACTION_in_exceptionHandler626 = new BitSet(new long[]{0x0000200000000000L});
22.4984 - public static final BitSet FOLLOW_ACTION_in_exceptionHandler628 = new BitSet(new long[]{0x0000000000000008L});
22.4985 - public static final BitSet FOLLOW_86_in_finallyClause650 = new BitSet(new long[]{0x0000000000000004L});
22.4986 - public static final BitSet FOLLOW_ACTION_in_finallyClause652 = new BitSet(new long[]{0x0000000000000008L});
22.4987 - public static final BitSet FOLLOW_elementNoOptionSpec_in_element667 = new BitSet(new long[]{0x0000000000000002L});
22.4988 - public static final BitSet FOLLOW_set_in_elementNoOptionSpec679 = new BitSet(new long[]{0x0000000000000004L});
22.4989 - public static final BitSet FOLLOW_ID_in_elementNoOptionSpec685 = new BitSet(new long[]{0x0000000400001F00L});
22.4990 - public static final BitSet FOLLOW_block_in_elementNoOptionSpec687 = new BitSet(new long[]{0x0000000000000008L});
22.4991 - public static final BitSet FOLLOW_set_in_elementNoOptionSpec694 = new BitSet(new long[]{0x0000000000000004L});
22.4992 - public static final BitSet FOLLOW_ID_in_elementNoOptionSpec700 = new BitSet(new long[]{0x00021CC000004000L,0x0000000012000000L});
22.4993 - public static final BitSet FOLLOW_atom_in_elementNoOptionSpec702 = new BitSet(new long[]{0x0000000000000008L});
22.4994 - public static final BitSet FOLLOW_atom_in_elementNoOptionSpec708 = new BitSet(new long[]{0x0000000000000002L});
22.4995 - public static final BitSet FOLLOW_ebnf_in_elementNoOptionSpec713 = new BitSet(new long[]{0x0000000000000002L});
22.4996 - public static final BitSet FOLLOW_ACTION_in_elementNoOptionSpec720 = new BitSet(new long[]{0x0000000000000002L});
22.4997 - public static final BitSet FOLLOW_SEMPRED_in_elementNoOptionSpec727 = new BitSet(new long[]{0x0000000000000002L});
22.4998 - public static final BitSet FOLLOW_GATED_SEMPRED_in_elementNoOptionSpec732 = new BitSet(new long[]{0x0000000000000002L});
22.4999 - public static final BitSet FOLLOW_treeSpec_in_elementNoOptionSpec739 = new BitSet(new long[]{0x0000000000000002L});
22.5000 - public static final BitSet FOLLOW_set_in_atom751 = new BitSet(new long[]{0x0000000000000004L});
22.5001 - public static final BitSet FOLLOW_atom_in_atom757 = new BitSet(new long[]{0x0000000000000008L});
22.5002 - public static final BitSet FOLLOW_range_in_atom763 = new BitSet(new long[]{0x0000000000000002L});
22.5003 - public static final BitSet FOLLOW_notSet_in_atom768 = new BitSet(new long[]{0x0000000000000002L});
22.5004 - public static final BitSet FOLLOW_RULE_REF_in_atom777 = new BitSet(new long[]{0x0000000000000004L});
22.5005 - public static final BitSet FOLLOW_ARG_ACTION_in_atom779 = new BitSet(new long[]{0x0000000000000008L});
22.5006 - public static final BitSet FOLLOW_RULE_REF_in_atom788 = new BitSet(new long[]{0x0000000000000002L});
22.5007 - public static final BitSet FOLLOW_terminal_in_atom798 = new BitSet(new long[]{0x0000000000000002L});
22.5008 - public static final BitSet FOLLOW_89_in_notSet813 = new BitSet(new long[]{0x0000000000000004L});
22.5009 - public static final BitSet FOLLOW_notTerminal_in_notSet815 = new BitSet(new long[]{0x0000000000000008L});
22.5010 - public static final BitSet FOLLOW_89_in_notSet822 = new BitSet(new long[]{0x0000000000000004L});
22.5011 - public static final BitSet FOLLOW_block_in_notSet824 = new BitSet(new long[]{0x0000000000000008L});
22.5012 - public static final BitSet FOLLOW_TREE_BEGIN_in_treeSpec837 = new BitSet(new long[]{0x0000000000000004L});
22.5013 - public static final BitSet FOLLOW_element_in_treeSpec839 = new BitSet(new long[]{0x00023CE700085F08L,0x0000000012800080L});
22.5014 - public static final BitSet FOLLOW_SYNPRED_in_ebnf855 = new BitSet(new long[]{0x0000000000000004L});
22.5015 - public static final BitSet FOLLOW_block_in_ebnf857 = new BitSet(new long[]{0x0000000000000008L});
22.5016 - public static final BitSet FOLLOW_SYN_SEMPRED_in_ebnf863 = new BitSet(new long[]{0x0000000000000002L});
22.5017 - public static final BitSet FOLLOW_ebnfSuffix_in_ebnf869 = new BitSet(new long[]{0x0000000000000004L});
22.5018 - public static final BitSet FOLLOW_block_in_ebnf871 = new BitSet(new long[]{0x0000000000000008L});
22.5019 - public static final BitSet FOLLOW_block_in_ebnf877 = new BitSet(new long[]{0x0000000000000002L});
22.5020 - public static final BitSet FOLLOW_CHAR_RANGE_in_range889 = new BitSet(new long[]{0x0000000000000004L});
22.5021 - public static final BitSet FOLLOW_CHAR_LITERAL_in_range891 = new BitSet(new long[]{0x0000100000000000L});
22.5022 - public static final BitSet FOLLOW_CHAR_LITERAL_in_range893 = new BitSet(new long[]{0x0000000000000008L});
22.5023 - public static final BitSet FOLLOW_CHAR_LITERAL_in_terminal910 = new BitSet(new long[]{0x0000000000000002L});
22.5024 - public static final BitSet FOLLOW_TOKEN_REF_in_terminal918 = new BitSet(new long[]{0x0000000000000002L});
22.5025 - public static final BitSet FOLLOW_STRING_LITERAL_in_terminal926 = new BitSet(new long[]{0x0000000000000002L});
22.5026 - public static final BitSet FOLLOW_TOKEN_REF_in_terminal935 = new BitSet(new long[]{0x0000000000000004L});
22.5027 - public static final BitSet FOLLOW_ARG_ACTION_in_terminal937 = new BitSet(new long[]{0x0000000000000008L});
22.5028 - public static final BitSet FOLLOW_92_in_terminal946 = new BitSet(new long[]{0x0000000000000002L});
22.5029 - public static final BitSet FOLLOW_set_in_notTerminal0 = new BitSet(new long[]{0x0000000000000002L});
22.5030 - public static final BitSet FOLLOW_set_in_ebnfSuffix0 = new BitSet(new long[]{0x0000000000000002L});
22.5031 - public static final BitSet FOLLOW_REWRITE_in_rewrite1012 = new BitSet(new long[]{0x0000000000000004L});
22.5032 - public static final BitSet FOLLOW_SEMPRED_in_rewrite1014 = new BitSet(new long[]{0x0000200040010000L});
22.5033 - public static final BitSet FOLLOW_rewrite_alternative_in_rewrite1016 = new BitSet(new long[]{0x0000000000000008L});
22.5034 - public static final BitSet FOLLOW_REWRITE_in_rewrite1022 = new BitSet(new long[]{0x0000000000000004L});
22.5035 - public static final BitSet FOLLOW_rewrite_alternative_in_rewrite1024 = new BitSet(new long[]{0x0000000000000008L});
22.5036 - public static final BitSet FOLLOW_rewrite_template_in_rewrite_alternative1039 = new BitSet(new long[]{0x0000000000000002L});
22.5037 - public static final BitSet FOLLOW_rewrite_tree_alternative_in_rewrite_alternative1044 = new BitSet(new long[]{0x0000000000000002L});
22.5038 - public static final BitSet FOLLOW_ALT_in_rewrite_alternative1055 = new BitSet(new long[]{0x0000000000000004L});
22.5039 - public static final BitSet FOLLOW_EPSILON_in_rewrite_alternative1057 = new BitSet(new long[]{0x0000000000080000L});
22.5040 - public static final BitSet FOLLOW_EOA_in_rewrite_alternative1059 = new BitSet(new long[]{0x0000000000000008L});
22.5041 - public static final BitSet FOLLOW_BLOCK_in_rewrite_tree_block1078 = new BitSet(new long[]{0x0000000000000004L});
22.5042 - public static final BitSet FOLLOW_rewrite_tree_alternative_in_rewrite_tree_block1080 = new BitSet(new long[]{0x0000000000040000L});
22.5043 - public static final BitSet FOLLOW_EOB_in_rewrite_tree_block1082 = new BitSet(new long[]{0x0000000000000008L});
22.5044 - public static final BitSet FOLLOW_ALT_in_rewrite_tree_alternative1101 = new BitSet(new long[]{0x0000000000000004L});
22.5045 - public static final BitSet FOLLOW_rewrite_tree_element_in_rewrite_tree_alternative1103 = new BitSet(new long[]{0x00023C2020080F00L});
22.5046 - public static final BitSet FOLLOW_EOA_in_rewrite_tree_alternative1106 = new BitSet(new long[]{0x0000000000000008L});
22.5047 - public static final BitSet FOLLOW_rewrite_tree_atom_in_rewrite_tree_element1121 = new BitSet(new long[]{0x0000000000000002L});
22.5048 - public static final BitSet FOLLOW_rewrite_tree_in_rewrite_tree_element1126 = new BitSet(new long[]{0x0000000000000002L});
22.5049 - public static final BitSet FOLLOW_rewrite_tree_block_in_rewrite_tree_element1133 = new BitSet(new long[]{0x0000000000000002L});
22.5050 - public static final BitSet FOLLOW_rewrite_tree_ebnf_in_rewrite_tree_element1140 = new BitSet(new long[]{0x0000000000000002L});
22.5051 - public static final BitSet FOLLOW_CHAR_LITERAL_in_rewrite_tree_atom1156 = new BitSet(new long[]{0x0000000000000002L});
22.5052 - public static final BitSet FOLLOW_TOKEN_REF_in_rewrite_tree_atom1163 = new BitSet(new long[]{0x0000000000000002L});
22.5053 - public static final BitSet FOLLOW_TOKEN_REF_in_rewrite_tree_atom1171 = new BitSet(new long[]{0x0000000000000004L});
22.5054 - public static final BitSet FOLLOW_ARG_ACTION_in_rewrite_tree_atom1173 = new BitSet(new long[]{0x0000000000000008L});
22.5055 - public static final BitSet FOLLOW_RULE_REF_in_rewrite_tree_atom1185 = new BitSet(new long[]{0x0000000000000002L});
22.5056 - public static final BitSet FOLLOW_STRING_LITERAL_in_rewrite_tree_atom1192 = new BitSet(new long[]{0x0000000000000002L});
22.5057 - public static final BitSet FOLLOW_LABEL_in_rewrite_tree_atom1199 = new BitSet(new long[]{0x0000000000000002L});
22.5058 - public static final BitSet FOLLOW_ACTION_in_rewrite_tree_atom1204 = new BitSet(new long[]{0x0000000000000002L});
22.5059 - public static final BitSet FOLLOW_ebnfSuffix_in_rewrite_tree_ebnf1216 = new BitSet(new long[]{0x0000000000000004L});
22.5060 - public static final BitSet FOLLOW_rewrite_tree_block_in_rewrite_tree_ebnf1218 = new BitSet(new long[]{0x0000000000000008L});
22.5061 - public static final BitSet FOLLOW_TREE_BEGIN_in_rewrite_tree1232 = new BitSet(new long[]{0x0000000000000004L});
22.5062 - public static final BitSet FOLLOW_rewrite_tree_atom_in_rewrite_tree1234 = new BitSet(new long[]{0x00023C2020080F08L});
22.5063 - public static final BitSet FOLLOW_rewrite_tree_element_in_rewrite_tree1236 = new BitSet(new long[]{0x00023C2020080F08L});
22.5064 - public static final BitSet FOLLOW_TEMPLATE_in_rewrite_template1254 = new BitSet(new long[]{0x0000000000000004L});
22.5065 - public static final BitSet FOLLOW_ID_in_rewrite_template1256 = new BitSet(new long[]{0x0000000000400000L});
22.5066 - public static final BitSet FOLLOW_rewrite_template_args_in_rewrite_template1258 = new BitSet(new long[]{0x000C000000000000L});
22.5067 - public static final BitSet FOLLOW_set_in_rewrite_template1265 = new BitSet(new long[]{0x0000000000000008L});
22.5068 - public static final BitSet FOLLOW_rewrite_template_ref_in_rewrite_template1281 = new BitSet(new long[]{0x0000000000000002L});
22.5069 - public static final BitSet FOLLOW_rewrite_indirect_template_head_in_rewrite_template1286 = new BitSet(new long[]{0x0000000000000002L});
22.5070 - public static final BitSet FOLLOW_ACTION_in_rewrite_template1291 = new BitSet(new long[]{0x0000000000000002L});
22.5071 - public static final BitSet FOLLOW_TEMPLATE_in_rewrite_template_ref1305 = new BitSet(new long[]{0x0000000000000004L});
22.5072 - public static final BitSet FOLLOW_ID_in_rewrite_template_ref1307 = new BitSet(new long[]{0x0000000000400000L});
22.5073 - public static final BitSet FOLLOW_rewrite_template_args_in_rewrite_template_ref1309 = new BitSet(new long[]{0x0000000000000008L});
22.5074 - public static final BitSet FOLLOW_TEMPLATE_in_rewrite_indirect_template_head1324 = new BitSet(new long[]{0x0000000000000004L});
22.5075 - public static final BitSet FOLLOW_ACTION_in_rewrite_indirect_template_head1326 = new BitSet(new long[]{0x0000000000400000L});
22.5076 - public static final BitSet FOLLOW_rewrite_template_args_in_rewrite_indirect_template_head1328 = new BitSet(new long[]{0x0000000000000008L});
22.5077 - public static final BitSet FOLLOW_ARGLIST_in_rewrite_template_args1341 = new BitSet(new long[]{0x0000000000000004L});
22.5078 - public static final BitSet FOLLOW_rewrite_template_arg_in_rewrite_template_args1343 = new BitSet(new long[]{0x0000000000200008L});
22.5079 - public static final BitSet FOLLOW_ARGLIST_in_rewrite_template_args1350 = new BitSet(new long[]{0x0000000000000002L});
22.5080 - public static final BitSet FOLLOW_ARG_in_rewrite_template_arg1364 = new BitSet(new long[]{0x0000000000000004L});
22.5081 - public static final BitSet FOLLOW_ID_in_rewrite_template_arg1366 = new BitSet(new long[]{0x0000200000000000L});
22.5082 - public static final BitSet FOLLOW_ACTION_in_rewrite_template_arg1368 = new BitSet(new long[]{0x0000000000000008L});
22.5083 -
22.5084 -}
22.5085 \ No newline at end of file
23.1 --- a/o.n.antlr.editor/src/org/netbeans/modules/antlr/editor/gen/ANTLRv3Tree.tokens Mon Jan 14 15:49:47 2013 +0100
23.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
23.3 @@ -1,126 +0,0 @@
23.4 -T__65=65
23.5 -T__66=66
23.6 -T__67=67
23.7 -T__68=68
23.8 -T__69=69
23.9 -T__70=70
23.10 -T__71=71
23.11 -T__72=72
23.12 -T__73=73
23.13 -T__74=74
23.14 -T__75=75
23.15 -T__76=76
23.16 -T__77=77
23.17 -T__78=78
23.18 -T__79=79
23.19 -T__80=80
23.20 -T__81=81
23.21 -T__82=82
23.22 -T__83=83
23.23 -T__84=84
23.24 -T__85=85
23.25 -T__86=86
23.26 -T__87=87
23.27 -T__88=88
23.28 -T__89=89
23.29 -T__90=90
23.30 -T__91=91
23.31 -T__92=92
23.32 -T__93=93
23.33 -DOC_COMMENT=4
23.34 -PARSER=5
23.35 -LEXER=6
23.36 -RULE=7
23.37 -BLOCK=8
23.38 -OPTIONAL=9
23.39 -CLOSURE=10
23.40 -POSITIVE_CLOSURE=11
23.41 -SYNPRED=12
23.42 -RANGE=13
23.43 -CHAR_RANGE=14
23.44 -EPSILON=15
23.45 -ALT=16
23.46 -EOR=17
23.47 -EOB=18
23.48 -EOA=19
23.49 -ID=20
23.50 -ARG=21
23.51 -ARGLIST=22
23.52 -RET=23
23.53 -LEXER_GRAMMAR=24
23.54 -PARSER_GRAMMAR=25
23.55 -TREE_GRAMMAR=26
23.56 -COMBINED_GRAMMAR=27
23.57 -INITACTION=28
23.58 -LABEL=29
23.59 -TEMPLATE=30
23.60 -SCOPE=31
23.61 -SEMPRED=32
23.62 -GATED_SEMPRED=33
23.63 -SYN_SEMPRED=34
23.64 -BACKTRACK_SEMPRED=35
23.65 -FRAGMENT=36
23.66 -TREE_BEGIN=37
23.67 -ROOT=38
23.68 -BANG=39
23.69 -REWRITE=40
23.70 -TOKENS=41
23.71 -TOKEN_REF=42
23.72 -STRING_LITERAL=43
23.73 -CHAR_LITERAL=44
23.74 -ACTION=45
23.75 -OPTIONS=46
23.76 -INT=47
23.77 -ARG_ACTION=48
23.78 -RULE_REF=49
23.79 -DOUBLE_QUOTE_STRING_LITERAL=50
23.80 -DOUBLE_ANGLE_STRING_LITERAL=51
23.81 -SRC=52
23.82 -SL_COMMENT=53
23.83 -ML_COMMENT=54
23.84 -LITERAL_CHAR=55
23.85 -ESC=56
23.86 -XDIGIT=57
23.87 -NESTED_ARG_ACTION=58
23.88 -ACTION_STRING_LITERAL=59
23.89 -ACTION_CHAR_LITERAL=60
23.90 -NESTED_ACTION=61
23.91 -ACTION_ESC=62
23.92 -WS_LOOP=63
23.93 -WS=64
23.94 -'scope'=31
23.95 -'fragment'=36
23.96 -'^('=37
23.97 -'^'=38
23.98 -'!'=39
23.99 -'..'=13
23.100 -'->'=40
23.101 -'lexer'=65
23.102 -'parser'=66
23.103 -'tree'=67
23.104 -'grammar'=68
23.105 -';'=69
23.106 -'}'=70
23.107 -'='=71
23.108 -'@'=72
23.109 -'::'=73
23.110 -'*'=74
23.111 -'protected'=75
23.112 -'public'=76
23.113 -'private'=77
23.114 -'returns'=78
23.115 -':'=79
23.116 -'throws'=80
23.117 -','=81
23.118 -'('=82
23.119 -'|'=83
23.120 -')'=84
23.121 -'catch'=85
23.122 -'finally'=86
23.123 -'+='=87
23.124 -'=>'=88
23.125 -'~'=89
23.126 -'?'=90
23.127 -'+'=91
23.128 -'.'=92
23.129 -'$'=93
24.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
24.2 +++ b/o.n.antlr.editor/test/unit/data/testfiles/Css3.g Tue Jan 15 10:42:04 2013 +0100
24.3 @@ -0,0 +1,1319 @@
24.4 +// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
24.5 +//
24.6 +// Copyright 2011 Oracle and/or its affiliates. All rights reserved.
24.7 +//
24.8 +// Oracle and Java are registered trademarks of Oracle and/or its affiliates.
24.9 +// Other names may be trademarks of their respective owners.
24.10 +//
24.11 +// The contents of this file are subject to the terms of either the GNU
24.12 +// General Public License Version 2 only ("GPL") or the Common
24.13 +// Development and Distribution License("CDDL") (collectively, the
24.14 +// "License"). You may not use this file except in compliance with the
24.15 +// License. You can obtain a copy of the License at
24.16 +// http://www.netbeans.org/cddl-gplv2.html
24.17 +// or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
24.18 +// specific language governing permissions and limitations under the
24.19 +// License. When distributing the software, include this License Header
24.20 +// Notice in each file and include the License file at
24.21 +// nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
24.22 +// particular file as subject to the "Classpath" exception as provided
24.23 +// by Oracle in the GPL Version 2 section of the License file that
24.24 +// accompanied this code. If applicable, add the following below the
24.25 +// License Header, with the fields enclosed by brackets [] replaced by
24.26 +// your own identifying information:
24.27 +// "Portions Copyrighted [year] [name of copyright owner]"
24.28 +//
24.29 +// If you wish your version of this file to be governed by only the CDDL
24.30 +// or only the GPL Version 2, indicate your decision by adding
24.31 +// "[Contributor] elects to include this software in this distribution
24.32 +// under the [CDDL or GPL Version 2] license." If you do not indicate a
24.33 +// single choice of license, a recipient has the option to distribute
24.34 +// your version of this file under either the CDDL, the GPL Version 2 or
24.35 +// to extend the choice of license to its licensees as provided above.
24.36 +// However, if you add GPL Version 2 code and therefore, elected the GPL
24.37 +// Version 2 license, then the option applies only if the new code is
24.38 +// made subject to such option by the copyright holder.
24.39 +//
24.40 +// Contributor(s):
24.41 +//
24.42 +// Portions Copyrighted 2011 Sun Microsystems, Inc.
24.43 +//
24.44 +// A complete lexer and grammar for CSS 2.1 as defined by the
24.45 +// W3 specification.
24.46 +//
24.47 +// This grammar is free to use providing you retain everyhting in this header comment
24.48 +// section.
24.49 +//
24.50 +// Author : Jim Idle, Temporal Wave LLC.
24.51 +// Contact : jimi@temporal-wave.com
24.52 +// Website : http://www.temporal-wave.com
24.53 +// License : ANTLR Free BSD License
24.54 +//
24.55 +// Please visit our Web site at http://www.temporal-wave.com and try our commercial
24.56 +// parsers for SQL, C#, VB.Net and more.
24.57 +//
24.58 +// This grammar is free to use providing you retain everything in this header comment
24.59 +// section.
24.60 +//
24.61 +
24.62 +//Modifications to the original css21 source file by Jim Idle have been done to fulfill the
24.63 +//css3 parsing rules and making the parser more error prone.
24.64 +//1) incorporated the grammar changes from selectors module: http://www.w3.org/TR/css3-selectors/#grammar
24.65 +// a. There's no 'universal' selector node, 'typeSelector' is used instead where instead of the identifier there's the star token.
24.66 +// This solves the too long (==3) lookahead problem in the simpleSelectorSequence rule
24.67 +//2) implemented custom error recovery
24.68 +//3) removed whitespaces from the alpha token fragments
24.69 +//
24.70 +//Author: Marek Fukala (mfukala@netbeans.org)
24.71 +//Please be aware that the grammar doesn't properly and fully reflect the whole css3 specification!!!
24.72 +
24.73 +grammar Css3;
24.74 +
24.75 +//options {
24.76 +// output=AST;
24.77 +//}
24.78 +
24.79 +@header {
24.80 +/*
24.81 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
24.82 + *
24.83 + * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
24.84 + *
24.85 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
24.86 + * Other names may be trademarks of their respective owners.
24.87 + *
24.88 + * The contents of this file are subject to the terms of either the GNU
24.89 + * General Public License Version 2 only ("GPL") or the Common
24.90 + * Development and Distribution License("CDDL") (collectively, the
24.91 + * "License"). You may not use this file except in compliance with the
24.92 + * License. You can obtain a copy of the License at
24.93 + * http://www.netbeans.org/cddl-gplv2.html
24.94 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
24.95 + * specific language governing permissions and limitations under the
24.96 + * License. When distributing the software, include this License Header
24.97 + * Notice in each file and include the License file at
24.98 + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
24.99 + * particular file as subject to the "Classpath" exception as provided
24.100 + * by Oracle in the GPL Version 2 section of the License file that
24.101 + * accompanied this code. If applicable, add the following below the
24.102 + * License Header, with the fields enclosed by brackets [] replaced by
24.103 + * your own identifying information:
24.104 + * "Portions Copyrighted [year] [name of copyright owner]"
24.105 + *
24.106 + * If you wish your version of this file to be governed by only the CDDL
24.107 + * or only the GPL Version 2, indicate your decision by adding
24.108 + * "[Contributor] elects to include this software in this distribution
24.109 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
24.110 + * single choice of license, a recipient has the option to distribute
24.111 + * your version of this file under either the CDDL, the GPL Version 2 or
24.112 + * to extend the choice of license to its licensees as provided above.
24.113 + * However, if you add GPL Version 2 code and therefore, elected the GPL
24.114 + * Version 2 license, then the option applies only if the new code is
24.115 + * made subject to such option by the copyright holder.
24.116 + *
24.117 + * Contributor(s):
24.118 + *
24.119 + * Portions Copyrighted 2011 Sun Microsystems, Inc.
24.120 + */
24.121 +package org.netbeans.modules.css.lib;
24.122 +
24.123 +}
24.124 +
24.125 +@members {
24.126 +/**
24.127 + * Use the current stacked followset to work out the valid tokens that
24.128 + * can follow on from the current point in the parse, then recover by
24.129 + * eating tokens that are not a member of the follow set we compute.
24.130 + *
24.131 + * This method is used whenever we wish to force a sync, even though
24.132 + * the parser has not yet checked LA(1) for alt selection. This is useful
24.133 + * in situations where only a subset of tokens can begin a new construct
24.134 + * (such as the start of a new statement in a block) and we want to
24.135 + * proactively detect garbage so that the current rule does not exit on
24.136 + * on an exception.
24.137 + *
24.138 + * We could override recover() to make this the default behavior but that
24.139 + * is too much like using a sledge hammer to crack a nut. We want finer
24.140 + * grained control of the recovery and error mechanisms.
24.141 + */
24.142 + protected void syncToSet()
24.143 + {
24.144 + // Compute the followset that is in context wherever we are in the
24.145 + // rule chain/stack
24.146 + //
24.147 + BitSet follow = state.following[state._fsp]; //computeContextSensitiveRuleFOLLOW();
24.148 +
24.149 + syncToSet(follow);
24.150 + }
24.151 +
24.152 + protected void syncToSet(BitSet follow)
24.153 + {
24.154 + int mark = -1;
24.155 +
24.156 + //create error-recovery node
24.157 + dbg.enterRule(getGrammarFileName(), "recovery");
24.158 +
24.159 + try {
24.160 +
24.161 + mark = input.mark();
24.162 +
24.163 + // Consume all tokens in the stream until we find a member of the follow
24.164 + // set, which means the next production should be guaranteed to be happy.
24.165 + //
24.166 + while (! follow.member(input.LA(1)) ) {
24.167 +
24.168 + if (input.LA(1) == Token.EOF) {
24.169 +
24.170 + // Looks like we didn't find anything at all that can help us here
24.171 + // so we need to rewind to where we were and let normal error handling
24.172 + // bail out.
24.173 + //
24.174 + input.rewind();
24.175 + mark = -1;
24.176 + return;
24.177 + }
24.178 + input.consume();
24.179 +
24.180 + // Now here, because you are consuming some tokens, yu will probably want
24.181 + // to raise an error message such as "Spurious elements after the class member were discarded"
24.182 + // using whatever your override of displayRecognitionError() routine does to record
24.183 + // error messages. The exact error my depend on context etc.
24.184 + //
24.185 + }
24.186 + } catch (Exception e) {
24.187 +
24.188 + // Just ignore any errors here, we will just let the recognizer
24.189 + // try to resync as normal - something must be very screwed.
24.190 + //
24.191 + }
24.192 + finally {
24.193 + dbg.exitRule(getGrammarFileName(), "recovery");
24.194 +
24.195 + // Always release the mark we took
24.196 + //
24.197 + if (mark != -1) {
24.198 + input.release(mark);
24.199 + }
24.200 + }
24.201 + }
24.202 +
24.203 + /**
24.204 + * synces to next RBRACE "}" taking nesting into account
24.205 + */
24.206 + protected void syncToRBRACE(int nest)
24.207 + {
24.208 +
24.209 + int mark = -1;
24.210 + //create error-recovery node
24.211 + //dbg.enterRule(getGrammarFileName(), "recovery");
24.212 +
24.213 + try {
24.214 + mark = input.mark();
24.215 + for(;;) {
24.216 + //read char
24.217 + int c = input.LA(1);
24.218 +
24.219 + switch(c) {
24.220 + case Token.EOF:
24.221 + input.rewind();
24.222 + mark = -1;
24.223 + return ;
24.224 + case Css3Lexer.LBRACE:
24.225 + nest++;
24.226 + break;
24.227 + case Css3Lexer.RBRACE:
24.228 + nest--;
24.229 + if(nest == 0) {
24.230 + //do not eat the final RBRACE
24.231 + return ;
24.232 + }
24.233 + }
24.234 +
24.235 + input.consume();
24.236 +
24.237 + }
24.238 +
24.239 + } catch (Exception e) {
24.240 +
24.241 + // Just ignore any errors here, we will just let the recognizer
24.242 + // try to resync as normal - something must be very screwed.
24.243 + //
24.244 + }
24.245 + finally {
24.246 + if (mark != -1) {
24.247 + input.release(mark);
24.248 + }
24.249 + //dbg.exitRule(getGrammarFileName(), "recovery");
24.250 + }
24.251 + }
24.252 +
24.253 +}
24.254 +
24.255 +@lexer::header {
24.256 +/*
24.257 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
24.258 + *
24.259 + * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
24.260 + *
24.261 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
24.262 + * Other names may be trademarks of their respective owners.
24.263 + *
24.264 + * The contents of this file are subject to the terms of either the GNU
24.265 + * General Public License Version 2 only ("GPL") or the Common
24.266 + * Development and Distribution License("CDDL") (collectively, the
24.267 + * "License"). You may not use this file except in compliance with the
24.268 + * License. You can obtain a copy of the License at
24.269 + * http://www.netbeans.org/cddl-gplv2.html
24.270 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
24.271 + * specific language governing permissions and limitations under the
24.272 + * License. When distributing the software, include this License Header
24.273 + * Notice in each file and include the License file at
24.274 + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
24.275 + * particular file as subject to the "Classpath" exception as provided
24.276 + * by Oracle in the GPL Version 2 section of the License file that
24.277 + * accompanied this code. If applicable, add the following below the
24.278 + * License Header, with the fields enclosed by brackets [] replaced by
24.279 + * your own identifying information:
24.280 + * "Portions Copyrighted [year] [name of copyright owner]"
24.281 + *
24.282 + * If you wish your version of this file to be governed by only the CDDL
24.283 + * or only the GPL Version 2, indicate your decision by adding
24.284 + * "[Contributor] elects to include this software in this distribution
24.285 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
24.286 + * single choice of license, a recipient has the option to distribute
24.287 + * your version of this file under either the CDDL, the GPL Version 2 or
24.288 + * to extend the choice of license to its licensees as provided above.
24.289 + * However, if you add GPL Version 2 code and therefore, elected the GPL
24.290 + * Version 2 license, then the option applies only if the new code is
24.291 + * made subject to such option by the copyright holder.
24.292 + *
24.293 + * Contributor(s):
24.294 + *
24.295 + * Portions Copyrighted 2011 Sun Microsystems, Inc.
24.296 + */
24.297 +package org.netbeans.modules.css.lib;
24.298 +}
24.299 +
24.300 +// -------------
24.301 +// Main rule. This is the main entry rule for the parser, the top level
24.302 +// grammar rule.
24.303 +//
24.304 +// A style sheet consists of an optional character set specification, an optional series
24.305 +// of imports, and then the main body of style rules.
24.306 +//
24.307 +styleSheet
24.308 + :
24.309 + ws?
24.310 + ( charSet ws? )?
24.311 + imports?
24.312 + namespaces?
24.313 + body?
24.314 + EOF
24.315 + ;
24.316 +
24.317 +namespaces
24.318 + :
24.319 + ( namespace ws? )+
24.320 + ;
24.321 +
24.322 +namespace
24.323 + : NAMESPACE_SYM ws? (namespacePrefixName ws?)? resourceIdentifier ws? ';'
24.324 + ;
24.325 +
24.326 +namespacePrefixName
24.327 + : IDENT
24.328 + ;
24.329 +
24.330 +resourceIdentifier
24.331 + : STRING | URI
24.332 + ;
24.333 +
24.334 +charSet
24.335 + : CHARSET_SYM ws? charSetValue ws? SEMI
24.336 + ;
24.337 +
24.338 +charSetValue
24.339 + : STRING
24.340 + ;
24.341 +
24.342 +imports
24.343 + :
24.344 + ( importItem ws? )+
24.345 + ;
24.346 +
24.347 +importItem
24.348 + : IMPORT_SYM ws? resourceIdentifier ws? mediaQueryList SEMI
24.349 + ;
24.350 +media
24.351 + : MEDIA_SYM ws? mediaQueryList
24.352 + LBRACE ws?
24.353 + ( ( rule | page | fontFace | vendorAtRule ) ws?)*
24.354 + RBRACE
24.355 + ;
24.356 +
24.357 +mediaQueryList
24.358 + : ( mediaQuery ( COMMA ws? mediaQuery )* )?
24.359 + ;
24.360 +
24.361 +mediaQuery
24.362 + : (mediaQueryOperator ws? )? mediaType ws? ( AND ws? mediaExpression )*
24.363 + | mediaExpression ( AND ws? mediaExpression )*
24.364 + ;
24.365 +
24.366 +mediaQueryOperator
24.367 + : ONLY | NOT
24.368 + ;
24.369 +
24.370 +mediaType
24.371 + : IDENT | GEN
24.372 + ;
24.373 +
24.374 +mediaExpression
24.375 + : '(' ws? mediaFeature ws? ( ':' ws? expression )? ')' ws?
24.376 + ;
24.377 +
24.378 +mediaFeature
24.379 + : IDENT
24.380 + ;
24.381 +
24.382 + body :
24.383 + ( bodyItem ws? )+
24.384 + ;
24.385 +
24.386 +bodyItem
24.387 + :
24.388 + rule
24.389 + | media
24.390 + | page
24.391 + | counterStyle
24.392 + | fontFace
24.393 + | vendorAtRule
24.394 + ;
24.395 +
24.396 +// catch[ RecognitionException rce] {
24.397 +// reportError(rce);
24.398 +// syncToRBRACE(0); //nesting aware, initial nest == 0
24.399 +// input.consume(); //consume the RBRACE as well
24.400 +// }
24.401 +
24.402 +vendorAtRule
24.403 +: moz_document | webkitKeyframes | generic_at_rule;
24.404 +
24.405 +atRuleId
24.406 + :
24.407 + IDENT | STRING
24.408 + ;
24.409 +
24.410 +generic_at_rule
24.411 + : GENERIC_AT_RULE WS* ( atRuleId WS* )?
24.412 + LBRACE
24.413 + syncTo_RBRACE
24.414 + RBRACE
24.415 + ;
24.416 +moz_document
24.417 + :
24.418 + MOZ_DOCUMENT_SYM ws? ( moz_document_function ws?) ( COMMA ws? moz_document_function ws? )*
24.419 + LBRACE ws?
24.420 + body? //can be empty
24.421 + RBRACE
24.422 + ;
24.423 +
24.424 +moz_document_function
24.425 + :
24.426 + URI | MOZ_URL_PREFIX | MOZ_DOMAIN | MOZ_REGEXP
24.427 + ;
24.428 +
24.429 +//http://developer.apple.com/library/safari/#documentation/appleapplications/reference/SafariCSSRef/Articles/OtherStandardCSS3Features.html#//apple_ref/doc/uid/TP40007601-SW1
24.430 +webkitKeyframes
24.431 + :
24.432 + WEBKIT_KEYFRAMES_SYM ws? atRuleId ws?
24.433 + LBRACE ws?
24.434 + ( webkitKeyframesBlock ws? )*
24.435 + RBRACE
24.436 + ;
24.437 +
24.438 +webkitKeyframesBlock
24.439 + :
24.440 + webkitKeyframeSelectors ws?
24.441 + LBRACE ws? syncToDeclarationsRule
24.442 + declarations
24.443 + RBRACE
24.444 + ;
24.445 +
24.446 +webkitKeyframeSelectors
24.447 + :
24.448 + ( IDENT | PERCENTAGE ) ( ws? COMMA ws? ( IDENT | PERCENTAGE ) )*
24.449 + ;
24.450 +
24.451 +page
24.452 + : PAGE_SYM ws? ( IDENT ws? )? (pseudoPage ws?)?
24.453 + LBRACE ws?
24.454 + //the grammar in the http://www.w3.org/TR/css3-page/ says the declaration/margins should be delimited by the semicolon,
24.455 + //but there's no such char in the examples => making it arbitrary
24.456 + //the original rule:
24.457 + (declaration|margin ws?)? (SEMI ws? (declaration|margin ws?)?)*
24.458 + RBRACE
24.459 + ;
24.460 +
24.461 +counterStyle
24.462 + : COUNTER_STYLE_SYM ws? IDENT ws?
24.463 + LBRACE ws? syncToDeclarationsRule
24.464 + declarations
24.465 + RBRACE
24.466 + ;
24.467 +
24.468 +fontFace
24.469 + : FONT_FACE_SYM ws?
24.470 + LBRACE ws? syncToDeclarationsRule
24.471 + declarations
24.472 + RBRACE
24.473 + ;
24.474 +
24.475 +margin
24.476 + : margin_sym ws? LBRACE ws? syncToDeclarationsRule declarations RBRACE
24.477 + ;
24.478 +
24.479 +margin_sym
24.480 + :
24.481 + TOPLEFTCORNER_SYM |
24.482 + TOPLEFT_SYM |
24.483 + TOPCENTER_SYM |
24.484 + TOPRIGHT_SYM |
24.485 + TOPRIGHTCORNER_SYM |
24.486 + BOTTOMLEFTCORNER_SYM |
24.487 + BOTTOMLEFT_SYM |
24.488 + BOTTOMCENTER_SYM |
24.489 + BOTTOMRIGHT_SYM |
24.490 + BOTTOMRIGHTCORNER_SYM |
24.491 + LEFTTOP_SYM |
24.492 + LEFTMIDDLE_SYM |
24.493 + LEFTBOTTOM_SYM |
24.494 + RIGHTTOP_SYM |
24.495 + RIGHTMIDDLE_SYM |
24.496 + RIGHTBOTTOM_SYM
24.497 + ;
24.498 +
24.499 +pseudoPage
24.500 + : COLON IDENT
24.501 + ;
24.502 +
24.503 +operator
24.504 + : SOLIDUS ws?
24.505 + | COMMA ws?
24.506 + |
24.507 + ;
24.508 +
24.509 +combinator
24.510 + : PLUS ws?
24.511 + | GREATER ws?
24.512 + | TILDE ws?//use this rule preferably
24.513 + |
24.514 + ;
24.515 +
24.516 +unaryOperator
24.517 + : MINUS
24.518 + | PLUS
24.519 + ;
24.520 +
24.521 +property
24.522 + : (IDENT | GEN) ws?
24.523 + ;
24.524 +
24.525 +rule
24.526 + : selectorsGroup
24.527 + LBRACE ws? syncToDeclarationsRule
24.528 + declarations
24.529 + RBRACE
24.530 + ;
24.531 + catch[ RecognitionException rce] {
24.532 + reportError(rce);
24.533 + consumeUntil(input, BitSet.of(RBRACE));
24.534 + input.consume(); //consume the RBRACE as well
24.535 + }
24.536 +
24.537 +declarations
24.538 + :
24.539 + //Allow empty rule. Allows? multiple semicolons
24.540 + //http://en.wikipedia.org/wiki/CSS_filter#Star_hack
24.541 + (declaration)? (SEMI ws? (declaration)?)*
24.542 + ;
24.543 +
24.544 +selectorsGroup
24.545 + : selector (COMMA ws? selector)*
24.546 + ;
24.547 +
24.548 +selector
24.549 + : simpleSelectorSequence (combinator simpleSelectorSequence)*
24.550 + ;
24.551 +
24.552 +
24.553 +simpleSelectorSequence
24.554 + :
24.555 + //using typeSelector even for the universal selector since the lookahead would have to be 3 (IDENT PIPE (IDENT|STAR) :-(
24.556 + ( typeSelector ((esPred)=>elementSubsequent)* )
24.557 + |
24.558 + ( ((esPred)=>elementSubsequent)+ )
24.559 + ;
24.560 + catch[ RecognitionException rce] {
24.561 + reportError(rce);
24.562 + consumeUntil(input, BitSet.of(LBRACE));
24.563 + }
24.564 +
24.565 +//predicate
24.566 +esPred
24.567 + : '#' | HASH | DOT | LBRACKET | COLON | DCOLON
24.568 + ;
24.569 +
24.570 +typeSelector
24.571 + options { k = 2; }
24.572 + : ((nsPred)=>namespacePrefix)? ( elementName ws? )
24.573 + ;
24.574 +
24.575 +//predicate
24.576 +nsPred
24.577 + :
24.578 + (IDENT | STAR)? PIPE
24.579 + ;
24.580 +
24.581 +namespacePrefix
24.582 + : ( namespacePrefixName | STAR)? PIPE
24.583 + ;
24.584 +
24.585 +
24.586 +elementSubsequent
24.587 + :
24.588 + (
24.589 + cssId
24.590 + | cssClass
24.591 + | slAttribute
24.592 + | pseudo
24.593 + )
24.594 + ws?
24.595 + ;
24.596 +
24.597 +//Error Recovery: Allow the parser to enter the cssId rule even if there's just hash char.
24.598 +cssId
24.599 + : HASH | ( '#' NAME )
24.600 + ;
24.601 + catch[ RecognitionException rce] {
24.602 + reportError(rce);
24.603 + consumeUntil(input, BitSet.of(WS, IDENT, LBRACE));
24.604 + }
24.605 +
24.606 +cssClass
24.607 + : DOT ( IDENT | GEN )
24.608 + ;
24.609 + catch[ RecognitionException rce] {
24.610 + reportError(rce);
24.611 + consumeUntil(input, BitSet.of(WS, IDENT, LBRACE));
24.612 + }
24.613 +
24.614 +//using typeSelector even for the universal selector since the lookahead would have to be 3 (IDENT PIPE (IDENT|STAR) :-(
24.615 +elementName
24.616 + : ( IDENT | GEN ) | '*'
24.617 + ;
24.618 +
24.619 +slAttribute
24.620 + : LBRACKET
24.621 + namespacePrefix? ws?
24.622 + slAttributeName ws?
24.623 +
24.624 + (
24.625 + (
24.626 + OPEQ
24.627 + | INCLUDES
24.628 + | DASHMATCH
24.629 + | BEGINS
24.630 + | ENDS
24.631 + | CONTAINS
24.632 + )
24.633 + ws?
24.634 + slAttributeValue
24.635 + ws?
24.636 + )?
24.637 +
24.638 + RBRACKET
24.639 +;
24.640 +catch[ RecognitionException rce] {
24.641 + reportError(rce);
24.642 + consumeUntil(input, BitSet.of(IDENT, LBRACE));
24.643 + }
24.644 +
24.645 +//bit similar naming to attrvalue, attrname - but these are different - for functions
24.646 +slAttributeName
24.647 + : IDENT
24.648 + ;
24.649 +
24.650 +slAttributeValue
24.651 + :
24.652 + (
24.653 + IDENT
24.654 + | STRING
24.655 + )
24.656 + ;
24.657 +
24.658 +pseudo
24.659 + : ( COLON | DCOLON )
24.660 + (
24.661 + (
24.662 + ( IDENT | GEN )
24.663 + ( // Function
24.664 + ws? LPAREN ws? ( expression | '*' )? RPAREN
24.665 + )?
24.666 + )
24.667 + |
24.668 + ( NOT ws? LPAREN ws? simpleSelectorSequence? RPAREN )
24.669 + )
24.670 + ;
24.671 +
24.672 +declaration
24.673 + :
24.674 + //syncToIdent //recovery: this will sync the parser the identifier (property) if there's a gargabe in front of it
24.675 + STAR? property COLON ws? propertyValue prio?
24.676 + ;
24.677 + catch[ RecognitionException rce] {
24.678 + reportError(rce);
24.679 + //recovery: if an mismatched token occures inside a declaration is found,
24.680 + //then skip all tokens until an end of the rule is found represented by right curly brace
24.681 + consumeUntil(input, BitSet.of(SEMI, RBRACE));
24.682 + }
24.683 +
24.684 +propertyValue
24.685 + : expression
24.686 + ;
24.687 +
24.688 +//recovery: syncs the parser to the first identifier in the token input stream or the closing curly bracket
24.689 +//since the rule matches epsilon it will always be entered
24.690 +syncToDeclarationsRule
24.691 + @init {
24.692 + syncToSet(BitSet.of(IDENT, RBRACE, STAR));
24.693 + }
24.694 + :
24.695 + ;
24.696 +
24.697 +syncTo_RBRACE
24.698 + @init {
24.699 + syncToRBRACE(1); //initial nest == 1
24.700 + }
24.701 + :
24.702 + ;
24.703 +
24.704 +//synct to computed follow set in the rule
24.705 +syncToFollow
24.706 + @init {
24.707 + syncToSet();
24.708 + }
24.709 + :
24.710 + ;
24.711 +
24.712 +prio
24.713 + : IMPORTANT_SYM ws?
24.714 + ;
24.715 +
24.716 +expression
24.717 + : term (operator term)*
24.718 + ;
24.719 +
24.720 +term
24.721 + : ( unaryOperator ws? )?
24.722 + (
24.723 + (
24.724 + NUMBER
24.725 + | PERCENTAGE
24.726 + | LENGTH
24.727 + | EMS
24.728 + | REM
24.729 + | EXS
24.730 + | ANGLE
24.731 + | TIME
24.732 + | FREQ
24.733 + | RESOLUTION
24.734 + | DIMENSION //so we can match expression like a:nth-child(3n+1) -- the "3n" is lexed as dimension
24.735 + )
24.736 + | STRING
24.737 + | IDENT
24.738 + | GEN
24.739 + | URI
24.740 + | hexColor
24.741 + | function
24.742 + )
24.743 + ws?
24.744 + ;
24.745 +
24.746 +function
24.747 + : functionName ws?
24.748 + LPAREN ws?
24.749 + (
24.750 + expression
24.751 + |
24.752 + (
24.753 + fnAttribute (COMMA ws? fnAttribute )*
24.754 + )
24.755 + )
24.756 + RPAREN
24.757 + ;
24.758 +catch[ RecognitionException rce] {
24.759 + reportError(rce);
24.760 + consumeUntil(input, BitSet.of(RPAREN, SEMI, RBRACE));
24.761 +}
24.762 +
24.763 +functionName
24.764 + //css spec allows? here just IDENT,
24.765 + //but due to some nonstandart MS extension like progid:DXImageTransform.Microsoft.gradien
24.766 + //the function name can be a bit more complicated
24.767 + : (IDENT COLON)? IDENT (DOT IDENT)*
24.768 + ;
24.769 +
24.770 +fnAttribute
24.771 + : fnAttributeName ws? OPEQ ws? fnAttributeValue
24.772 + ;
24.773 +
24.774 +fnAttributeName
24.775 + : IDENT (DOT IDENT)*
24.776 + ;
24.777 +
24.778 +fnAttributeValue
24.779 + : expression
24.780 + ;
24.781 +
24.782 +hexColor
24.783 + : HASH
24.784 + ;
24.785 +
24.786 +ws
24.787 + : ( WS | NL | COMMENT )+
24.788 + ;
24.789 +
24.790 +// ==============================================================
24.791 +// LEXER
24.792 +//
24.793 +// The lexer follows the normative section of WWW standard as closely
24.794 +// as it can. For instance, where the ANTLR lexer returns a token that
24.795 +// is unambiguous for both ANTLR and lex (the standard defines tokens
24.796 +// in lex notation), then the token names are equivalent.
24.797 +//
24.798 +// Note however that lex has a match order defined as top to bottom
24.799 +// with longest match first. This results in a fairly inefficent, match,
24.800 +// REJECT, match REJECT set of operations. ANTLR lexer grammars are actaully
24.801 +// LL grammars (and hence LL recognizers), which means that we must
24.802 +// specifically disambiguate longest matches and so on, when the lex
24.803 +// like normative grammar results in ambiguities as far as ANTLR is concerned.
24.804 +//
24.805 +// This means that some tokens will either be combined compared to the
24.806 +// normative spec, and the paresr will recognize them for what they are.
24.807 +// In this case, the token will named as XXX_YYY where XXX and YYY are the
24.808 +// token names used in the specification.
24.809 +//
24.810 +// Lex style macro names used in the spec may sometimes be used (in upper case
24.811 +// version) as fragment rules in this grammar. However ANTLR fragment rules
24.812 +// are not quite the same as lex macros, in that they generate actual
24.813 +// methods in the recognizer class, and so may not be as effecient. In
24.814 +// some cases then, the macro contents are embedded. Annotation indicate when
24.815 +// this is the case.
24.816 +//
24.817 +// See comments in the rules for specific details.
24.818 +// --------------------------------------------------------------
24.819 +//
24.820 +// N.B. CSS 2.1 is defined as case insensitive, but because each character
24.821 +// is allowed to be written as in escaped form we basically define each
24.822 +// character as a fragment and reuse it in all other rules.
24.823 +// ==============================================================
24.824 +
24.825 +
24.826 +// --------------------------------------------------------------
24.827 +// Define all the fragments of the lexer. These rules neither recognize
24.828 +// nor create tokens, but must be called from non-fragment rules, which
24.829 +// do create tokens, using these fragments to either purely define the
24.830 +// token number, or by calling them to match a certain portion of
24.831 +// the token string.
24.832 +//
24.833 +
24.834 +GEN : '@@@';
24.835 +
24.836 +fragment HEXCHAR : ('a'..'f'|'A'..'F'|'0'..'9') ;
24.837 +
24.838 +fragment NONASCII : '\u0080'..'\uFFFF' ; // NB: Upper bound should be \u4177777
24.839 +
24.840 +fragment UNICODE : '\\' HEXCHAR
24.841 + (HEXCHAR
24.842 + (HEXCHAR
24.843 + (HEXCHAR
24.844 + (HEXCHAR HEXCHAR?)?
24.845 + )?
24.846 + )?
24.847 + )?
24.848 + ('\r'|'\n'|'\t'|'\f'|' ')* ;
24.849 +
24.850 +fragment ESCAPE : UNICODE | '\\' ~('\r'|'\n'|'\f'|HEXCHAR) ;
24.851 +
24.852 +fragment NMSTART : '_'
24.853 + | 'a'..'z'
24.854 + | 'A'..'Z'
24.855 + | NONASCII
24.856 + | ESCAPE
24.857 + ;
24.858 +
24.859 +fragment NMCHAR : '_'
24.860 + | 'a'..'z'
24.861 + | 'A'..'Z'
24.862 + | '0'..'9'
24.863 + | '-'
24.864 + | NONASCII
24.865 + | ESCAPE
24.866 + ;
24.867 +
24.868 +fragment NAME : NMCHAR+ ;
24.869 +
24.870 +fragment URL : (
24.871 + '['|'!'|'#'|'$'|'%'|'&'|'*'|'~'|'.'|':'|'/'|'?'|'='|';'|','|'+'
24.872 + | NMCHAR
24.873 + )*
24.874 + ;
24.875 +
24.876 +
24.877 +// Basic Alpha characters in upper, lower and escaped form.
24.878 +
24.879 +fragment A : ('a'|'A')
24.880 + | '\\' ('0' ('0' ('0' '0'?)?)?)? ('4'|'6')'1'
24.881 + ;
24.882 +fragment B : ('b'|'B')
24.883 + | '\\' ('0' ('0' ('0' '0'?)?)?)? ('4'|'6')'2'
24.884 + ;
24.885 +fragment C : ('c'|'C')
24.886 + | '\\' ('0' ('0' ('0' '0'?)?)?)? ('4'|'6')'3'
24.887 + ;
24.888 +fragment D : ('d'|'D')
24.889 + | '\\' ('0' ('0' ('0' '0'?)?)?)? ('4'|'6')'4'
24.890 + ;
24.891 +fragment E : ('e'|'E')
24.892 + | '\\' ('0' ('0' ('0' '0'?)?)?)? ('4'|'6')'5'
24.893 + ;
24.894 +fragment F : ('f'|'F')
24.895 + | '\\' ('0' ('0' ('0' '0'?)?)?)? ('4'|'6')'6'
24.896 + ;
24.897 +fragment G : ('g'|'G')
24.898 + | '\\'
24.899 + (
24.900 + 'g'
24.901 + | 'G'
24.902 + | ('0' ('0' ('0' '0'?)?)?)? ('4'|'6')'7'
24.903 + )
24.904 + ;
24.905 +fragment H : ('h'|'H')
24.906 + | '\\'
24.907 + (
24.908 + 'h'
24.909 + | 'H'
24.910 + | ('0' ('0' ('0' '0'?)?)?)? ('4'|'6')'8'
24.911 + )
24.912 + ;
24.913 +fragment I : ('i'|'I')
24.914 + | '\\'
24.915 + (
24.916 + 'i'
24.917 + | 'I'
24.918 + | ('0' ('0' ('0' '0'?)?)?)? ('4'|'6')'9'
24.919 + )
24.920 + ;
24.921 +fragment J : ('j'|'J')
24.922 + | '\\'
24.923 + (
24.924 + 'j'
24.925 + | 'J'
24.926 + | ('0' ('0' ('0' '0'?)?)?)? ('4'|'6')('A'|'a')
24.927 + )
24.928 + ;
24.929 +fragment K : ('k'|'K')
24.930 + | '\\'
24.931 + (
24.932 + 'k'
24.933 + | 'K'
24.934 + | ('0' ('0' ('0' '0'?)?)?)? ('4'|'6')('B'|'b')
24.935 + )
24.936 + ;
24.937 +fragment L : ('l'|'L')
24.938 + | '\\'
24.939 + (
24.940 + 'l'
24.941 + | 'L'
24.942 + | ('0' ('0' ('0' '0'?)?)?)? ('4'|'6')('C'|'c')
24.943 + )
24.944 + ;
24.945 +fragment M : ('m'|'M')
24.946 + | '\\'
24.947 + (
24.948 + 'm'
24.949 + | 'M'
24.950 + | ('0' ('0' ('0' '0'?)?)?)? ('4'|'6')('D'|'d')
24.951 + )
24.952 + ;
24.953 +fragment N : ('n'|'N')
24.954 + | '\\'
24.955 + (
24.956 + 'n'
24.957 + | 'N'
24.958 + | ('0' ('0' ('0' '0'?)?)?)? ('4'|'6')('E'|'e')
24.959 + )
24.960 + ;
24.961 +fragment O : ('o'|'O')
24.962 + | '\\'
24.963 + (
24.964 + 'o'
24.965 + | 'O'
24.966 + | ('0' ('0' ('0' '0'?)?)?)? ('4'|'6')('F'|'f')
24.967 + )
24.968 + ;
24.969 +fragment P : ('p'|'P')
24.970 + | '\\'
24.971 + (
24.972 + 'p'
24.973 + | 'P'
24.974 + | ('0' ('0' ('0' '0'?)?)?)? ('5'|'7')('0')
24.975 + )
24.976 + ;
24.977 +fragment Q : ('q'|'Q')
24.978 + | '\\'
24.979 + (
24.980 + 'q'
24.981 + | 'Q'
24.982 + | ('0' ('0' ('0' '0'?)?)?)? ('5'|'7')('1')
24.983 + )
24.984 + ;
24.985 +fragment R : ('r'|'R')
24.986 + | '\\'
24.987 + (
24.988 + 'r'
24.989 + | 'R'
24.990 + | ('0' ('0' ('0' '0'?)?)?)? ('5'|'7')('2')
24.991 + )
24.992 + ;
24.993 +fragment S : ('s'|'S')
24.994 + | '\\'
24.995 + (
24.996 + 's'
24.997 + | 'S'
24.998 + | ('0' ('0' ('0' '0'?)?)?)? ('5'|'7')('3')
24.999 + )
24.1000 + ;
24.1001 +fragment T : ('t'|'T')
24.1002 + | '\\'
24.1003 + (
24.1004 + 't'
24.1005 + | 'T'
24.1006 + | ('0' ('0' ('0' '0'?)?)?)? ('5'|'7')('4')
24.1007 + )
24.1008 + ;
24.1009 +fragment U : ('u'|'U')
24.1010 + | '\\'
24.1011 + (
24.1012 + 'u'
24.1013 + | 'U'
24.1014 + | ('0' ('0' ('0' '0'?)?)?)? ('5'|'7')('5')
24.1015 + )
24.1016 + ;
24.1017 +fragment V : ('v'|'V')
24.1018 + | '\\'
24.1019 + ( 'v'
24.1020 + | 'V'
24.1021 + | ('0' ('0' ('0' '0'?)?)?)? ('5'|'7')('6')
24.1022 + )
24.1023 + ;
24.1024 +fragment W : ('w'|'W')
24.1025 + | '\\'
24.1026 + (
24.1027 + 'w'
24.1028 + | 'W'
24.1029 + | ('0' ('0' ('0' '0'?)?)?)? ('5'|'7')('7')
24.1030 + )
24.1031 + ;
24.1032 +fragment X : ('x'|'X')
24.1033 + | '\\'
24.1034 + (
24.1035 + 'x'
24.1036 + | 'X'
24.1037 + | ('0' ('0' ('0' '0'?)?)?)? ('5'|'7')('8')
24.1038 + )
24.1039 + ;
24.1040 +fragment Y : ('y'|'Y')
24.1041 + | '\\'
24.1042 + (
24.1043 + 'y'
24.1044 + | 'Y'
24.1045 + | ('0' ('0' ('0' '0'?)?)?)? ('5'|'7')('9')
24.1046 + )
24.1047 + ;
24.1048 +fragment Z : ('z'|'Z')
24.1049 + | '\\'
24.1050 + (
24.1051 + 'z'
24.1052 + | 'Z'
24.1053 + | ('0' ('0' ('0' '0'?)?)?)? ('5'|'7')('A'|'a')
24.1054 + )
24.1055 + ;
24.1056 +
24.1057 +
24.1058 +
24.1059 +// ---------------------
24.1060 +// HTML comment open. HTML/XML comments may be placed around style sheets so that they
24.1061 +// are hidden from higher scope parsing engines such as HTML parsers.
24.1062 +// They comment open is therfore ignored by the CSS parser and we hide
24.1063 +// it from the ANLTR parser.
24.1064 +//
24.1065 +CDO : '<!--'
24.1066 +
24.1067 + {
24.1068 + $channel = 3; // CDO on channel 3 in case we want it later
24.1069 + }
24.1070 + ;
24.1071 +
24.1072 +// ---------------------
24.1073 +// HTML comment close. HTML/XML comments may be placed around style sheets so that they
24.1074 +// are hidden from higher scope parsing engines such as HTML parsers.
24.1075 +// They comment close is therfore ignored by the CSS parser and we hide
24.1076 +// it from the ANLTR parser.
24.1077 +//
24.1078 +CDC : '-->'
24.1079 +
24.1080 + {
24.1081 + $channel = 4; // CDC on channel 4 in case we want it later
24.1082 + }
24.1083 + ;
24.1084 +
24.1085 +INCLUDES : '~=' ;
24.1086 +DASHMATCH : '|=' ;
24.1087 +BEGINS : '^=' ;
24.1088 +ENDS : '$=' ;
24.1089 +CONTAINS : '*=' ;
24.1090 +
24.1091 +GREATER : '>' ;
24.1092 +LBRACE : '{' ;
24.1093 +RBRACE : '}' ;
24.1094 +LBRACKET : '[' ;
24.1095 +RBRACKET : ']' ;
24.1096 +OPEQ : '=' ;
24.1097 +SEMI : ';' ;
24.1098 +COLON : ':' ;
24.1099 +DCOLON : '::' ;
24.1100 +SOLIDUS : '/' ;
24.1101 +MINUS : '-' ;
24.1102 +PLUS : '+' ;
24.1103 +STAR : '*' ;
24.1104 +LPAREN : '(' ;
24.1105 +RPAREN : ')' ;
24.1106 +COMMA : ',' ;
24.1107 +DOT : '.' ;
24.1108 +TILDE : '~' ;
24.1109 +PIPE : '|' ;
24.1110 +
24.1111 +// -----------------
24.1112 +// Literal strings. Delimited by either ' or "
24.1113 +//
24.1114 +fragment INVALID :;
24.1115 +STRING : '\'' ( ~('\n'|'\r'|'\f'|'\'') )*
24.1116 + (
24.1117 + '\''
24.1118 + | { $type = INVALID; }
24.1119 + )
24.1120 +
24.1121 + | '"' ( ~('\n'|'\r'|'\f'|'"') )*
24.1122 + (
24.1123 + '"'
24.1124 + | { $type = INVALID; }
24.1125 + )
24.1126 + ;
24.1127 +
24.1128 +
24.1129 +ONLY : 'ONLY';
24.1130 +NOT : 'NOT';
24.1131 +AND : 'AND';
24.1132 +
24.1133 +// -------------
24.1134 +// Identifier. Identifier tokens pick up properties names and values
24.1135 +//
24.1136 +IDENT : '-'? NMSTART NMCHAR* ;
24.1137 +
24.1138 +// -------------
24.1139 +// Reference. Reference to an element in the body we are styling, such as <XXXX id="reference">
24.1140 +//
24.1141 +HASH : '#' NAME ;
24.1142 +
24.1143 +IMPORTANT_SYM : '!' (WS|COMMENT)* 'IMPORTANT' ;
24.1144 +
24.1145 +IMPORT_SYM : '@IMPORT';
24.1146 +PAGE_SYM : '@PAGE';
24.1147 +MEDIA_SYM : '@MEDIA';
24.1148 +NAMESPACE_SYM : '@NAMESPACE' ;
24.1149 +CHARSET_SYM : '@CHARSET';
24.1150 +COUNTER_STYLE_SYM : '@COUNTER-STYLE';
24.1151 +FONT_FACE_SYM : '@FONT-FACE';
24.1152 +
24.1153 +TOPLEFTCORNER_SYM :'@TOP-LEFT-CORNER';
24.1154 +TOPLEFT_SYM :'@TOP-LEFT';
24.1155 +TOPCENTER_SYM :'@TOP-CENTER';
24.1156 +TOPRIGHT_SYM :'@TOP-RIGHT';
24.1157 +TOPRIGHTCORNER_SYM :'@TOP-RIGHT-CORNER';
24.1158 +BOTTOMLEFTCORNER_SYM :'@BOTTOM-LEFT-CORNER';
24.1159 +BOTTOMLEFT_SYM :'@BOTTOM-LEFT';
24.1160 +BOTTOMCENTER_SYM :'@BOTTOM-CENTER';
24.1161 +BOTTOMRIGHT_SYM :'@BOTTOM-RIGHT';
24.1162 +BOTTOMRIGHTCORNER_SYM :'@BOTTOM-RIGHT-CORNER';
24.1163 +LEFTTOP_SYM :'@LEFT-TOP';
24.1164 +LEFTMIDDLE_SYM :'@LEFT-MIDDLE';
24.1165 +LEFTBOTTOM_SYM :'@LEFT-BOTTOM';
24.1166 +RIGHTTOP_SYM :'@RIGHT-TOP';
24.1167 +RIGHTMIDDLE_SYM :'@RIGHT-MIDDLE';
24.1168 +RIGHTBOTTOM_SYM :'@RIGHT-BOTTOM';
24.1169 +
24.1170 +MOZ_DOCUMENT_SYM : '@-MOZ-DOCUMENT';
24.1171 +WEBKIT_KEYFRAMES_SYM : '@-WEBKIT-KEYFRAMES';
24.1172 +
24.1173 +//this generic at rule must be after the last of the specific at rule tokens
24.1174 +GENERIC_AT_RULE : '@' NMCHAR+;
24.1175 +
24.1176 +// ---------
24.1177 +// Numbers. Numbers can be followed by pre-known units or unknown units
24.1178 +// as well as '%' it is a precentage. Whitespace cannot be between
24.1179 +// the numebr and teh unit or percent. Hence we scan any numeric, then
24.1180 +// if we detect one of the lexical sequences for unit tokens, we change
24.1181 +// the lexical type dynamically.
24.1182 +//
24.1183 +// Here we first define the various tokens, then we implement the
24.1184 +// number parsing rule.
24.1185 +//
24.1186 +fragment EMS :; // 'em'
24.1187 +fragment EXS :; // 'ex'
24.1188 +fragment LENGTH :; // 'px'. 'cm', 'mm', 'in'. 'pt', 'pc'
24.1189 +fragment REM :; // 'rem'
24.1190 +fragment ANGLE :; // 'deg', 'rad', 'grad'
24.1191 +fragment TIME :; // 'ms', 's'
24.1192 +fragment FREQ :; // 'khz', 'hz'
24.1193 +fragment DIMENSION :; // nnn'Somethingnotyetinvented'
24.1194 +fragment PERCENTAGE :; // '%'
24.1195 +fragment RESOLUTION :; //dpi,dpcm
24.1196 +
24.1197 +NUMBER
24.1198 + : (
24.1199 + '0'..'9'+ ('.' '0'..'9'+)?
24.1200 + | '.' '0'..'9'+
24.1201 + )
24.1202 + (
24.1203 + (D P (I|C))=>
24.1204 + D P
24.1205 + (
24.1206 + I | C M
24.1207 + )
24.1208 + { $type = RESOLUTION; }
24.1209 +
24.1210 + | (E (M|X))=>
24.1211 + E
24.1212 + (
24.1213 + M { $type = EMS; }
24.1214 + | X { $type = EXS; }
24.1215 + )
24.1216 + | (P(X|T|C))=>
24.1217 + P
24.1218 + (
24.1219 + X
24.1220 + | T
24.1221 + | C
24.1222 + )
24.1223 + { $type = LENGTH; }
24.1224 + | (C M)=>
24.1225 + C M { $type = LENGTH; }
24.1226 + | (M (M|S))=>
24.1227 + M
24.1228 + (
24.1229 + M { $type = LENGTH; }
24.1230 +
24.1231 + | S { $type = TIME; }
24.1232 + )
24.1233 + | (I N)=>
24.1234 + I N { $type = LENGTH; }
24.1235 +
24.1236 + | (D E G)=>
24.1237 + D E G { $type = ANGLE; }
24.1238 +// | (R A D)=>
24.1239 +// R A D { $type = ANGLE; }
24.1240 +
24.1241 + | (R (A|E))=>
24.1242 + R
24.1243 + (
24.1244 + A D {$type = ANGLE; }
24.1245 + | E M {$type = REM; }
24.1246 + )
24.1247 +
24.1248 + | (S)=>S { $type = TIME; }
24.1249 +
24.1250 + | (K? H Z)=>
24.1251 + K? H Z { $type = FREQ; }
24.1252 +
24.1253 + | IDENT { $type = DIMENSION; }
24.1254 +
24.1255 + | '%' { $type = PERCENTAGE; }
24.1256 +
24.1257 + | // Just a number
24.1258 + )
24.1259 + ;
24.1260 +
24.1261 +// ------------
24.1262 +// url and uri.
24.1263 +//
24.1264 +URI : U R L
24.1265 + '('
24.1266 + ((WS)=>WS)? (URL|STRING) WS?
24.1267 + ')'
24.1268 + ;
24.1269 +
24.1270 +MOZ_URL_PREFIX
24.1271 + :
24.1272 + 'URL-PREFIX('
24.1273 + ((WS)=>WS)? (URL|STRING) WS?
24.1274 + ')'
24.1275 +
24.1276 + ;
24.1277 +
24.1278 +MOZ_DOMAIN
24.1279 + :
24.1280 + 'DOMAIN('
24.1281 + ((WS)=>WS)? (URL|STRING) WS?
24.1282 + ')'
24.1283 +
24.1284 + ;
24.1285 +
24.1286 +MOZ_REGEXP
24.1287 + :
24.1288 + 'REGEXP('
24.1289 + ((WS)=>WS)? STRING WS?
24.1290 + ')'
24.1291 +
24.1292 + ;
24.1293 +
24.1294 +
24.1295 +
24.1296 +// -------------
24.1297 +// Whitespace. Though the W3 standard shows a Yacc/Lex style parser and lexer
24.1298 +// that process the whitespace within the parser, ANTLR does not
24.1299 +// need to deal with the whitespace directly in the parser.
24.1300 +//
24.1301 +WS : (' '|'\t')+;
24.1302 +
24.1303 +NL : ('\r' '\n'? | '\n') {
24.1304 + //$channel = HIDDEN;
24.1305 +} ;
24.1306 +
24.1307 +// -------------
24.1308 +// Comments. Comments may not be nested, may be multilined and are delimited
24.1309 +// like C comments: /* ..... */
24.1310 +// COMMENTS are hidden from the parser which simplifies the parser
24.1311 +// grammar a lot.
24.1312 +//
24.1313 +COMMENT : '/*' ( options { greedy=false; } : .*) '*/'
24.1314 +
24.1315 + {
24.1316 +// $channel = 2; // Comments on channel 2 in case we want to find them
24.1317 + }
24.1318 + ;
24.1319 +
24.1320 +// -------------
24.1321 +// Illegal. Any other character shoudl not be allowed.
24.1322 +//
25.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
25.2 +++ b/o.n.antlr.editor/test/unit/data/testfiles/test.g Tue Jan 15 10:42:04 2013 +0100
25.3 @@ -0,0 +1,41 @@
25.4 +grammar test;
25.5 +
25.6 +options {
25.7 + k = 2;
25.8 + exportVocab=MyExpr;
25.9 + buildAST = true;
25.10 +}
25.11 +
25.12 +exprlist
25.13 + : ( assignment_statement )* EOF!
25.14 + ;
25.15 +
25.16 +assignment_statement
25.17 + : assignment SEMICOLON!
25.18 + ;
25.19 +
25.20 +assignment
25.21 + : (IDENT ASSIGN )? expr
25.22 + ;
25.23 +
25.24 +primary_expr
25.25 + : IDENT
25.26 + | constant
25.27 + | (LPAREN! expr RPAREN! )
25.28 + ;
25.29 +
25.30 +sign_expr
25.31 + : (MINUS)? primary_expr
25.32 + ;
25.33 +
25.34 +mul_expr
25.35 + : sign_expr (( TIMES | DIVIDE | MOD ) sign_expr)*
25.36 + ;
25.37 +
25.38 +expr
25.39 + : mul_expr (( PLUS | MINUS ) mul_expr)*
25.40 + ;
25.41 +
25.42 +constant
25.43 + : (ICON | CHCON)
25.44 + ;
25.45 \ No newline at end of file
26.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
26.2 +++ b/o.n.antlr.editor/test/unit/src/org/netbeans/modules/antlr/editor/AntlrStructureScannerTest.java Tue Jan 15 10:42:04 2013 +0100
26.3 @@ -0,0 +1,88 @@
26.4 +/*
26.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
26.6 + *
26.7 + * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
26.8 + *
26.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
26.10 + * Other names may be trademarks of their respective owners.
26.11 + *
26.12 + * The contents of this file are subject to the terms of either the GNU
26.13 + * General Public License Version 2 only ("GPL") or the Common
26.14 + * Development and Distribution License("CDDL") (collectively, the
26.15 + * "License"). You may not use this file except in compliance with the
26.16 + * License. You can obtain a copy of the License at
26.17 + * http://www.netbeans.org/cddl-gplv2.html
26.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
26.19 + * specific language governing permissions and limitations under the
26.20 + * License. When distributing the software, include this License Header
26.21 + * Notice in each file and include the License file at
26.22 + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
26.23 + * particular file as subject to the "Classpath" exception as provided
26.24 + * by Oracle in the GPL Version 2 section of the License file that
26.25 + * accompanied this code. If applicable, add the following below the
26.26 + * License Header, with the fields enclosed by brackets [] replaced by
26.27 + * your own identifying information:
26.28 + * "Portions Copyrighted [year] [name of copyright owner]"
26.29 + *
26.30 + * If you wish your version of this file to be governed by only the CDDL
26.31 + * or only the GPL Version 2, indicate your decision by adding
26.32 + * "[Contributor] elects to include this software in this distribution
26.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
26.34 + * single choice of license, a recipient has the option to distribute
26.35 + * your version of this file under either the CDDL, the GPL Version 2 or
26.36 + * to extend the choice of license to its licensees as provided above.
26.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
26.38 + * Version 2 license, then the option applies only if the new code is
26.39 + * made subject to such option by the copyright holder.
26.40 + *
26.41 + * Contributor(s):
26.42 + *
26.43 + * Portions Copyrighted 2013 Sun Microsystems, Inc.
26.44 + */
26.45 +package org.netbeans.modules.antlr.editor;
26.46 +
26.47 +import java.util.List;
26.48 +import static junit.framework.Assert.assertNotNull;
26.49 +import org.antlr.runtime.tree.CommonTree;
26.50 +import org.junit.Test;
26.51 +import static org.junit.Assert.*;
26.52 +import org.netbeans.modules.csl.api.StructureItem;
26.53 +import org.netbeans.modules.parsing.api.Snapshot;
26.54 +import org.netbeans.modules.parsing.api.Source;
26.55 +import org.netbeans.modules.parsing.spi.ParseException;
26.56 +import org.openide.filesystems.FileObject;
26.57 +
26.58 +/**
26.59 + *
26.60 + * @author marekfukala
26.61 + */
26.62 +public class AntlrStructureScannerTest extends AntlrTestBase {
26.63 +
26.64 + public AntlrStructureScannerTest(String testName) {
26.65 + super(testName);
26.66 + }
26.67 +
26.68 + public void testStructureItems() throws ParseException {
26.69 +// FileObject testFile = getTestFile("testfiles/ANTLRv3.g");
26.70 +// FileObject testFile = getTestFile("testfiles/Css3.g");
26.71 + FileObject testFile = getTestFile("testfiles/test.g");
26.72 +
26.73 + Source s = Source.create(testFile);
26.74 + Snapshot snap = s.createSnapshot();
26.75 + NbAntlrParser parser = new NbAntlrParser();
26.76 + parser.parse(snap, null, null);
26.77 +
26.78 + NbAntlrParserResult result = (NbAntlrParserResult)parser.getResult(null);
26.79 + assertNotNull(result);
26.80 + CommonTree parseTree = result.getParseTree();
26.81 +// Utils.dumpTree(parseTree);
26.82 +
26.83 + AntlrStructureScanner scanner = new AntlrStructureScanner();
26.84 + List<? extends StructureItem> scan = scanner.scan(result);
26.85 +
26.86 + assertNotNull(scan);
26.87 + assertFalse(scan.isEmpty());
26.88 +
26.89 + }
26.90 +
26.91 +}
27.1 --- a/o.n.antlr.editor/test/unit/src/org/netbeans/modules/antlr/editor/NbAntlrParserTest.java Mon Jan 14 15:49:47 2013 +0100
27.2 +++ b/o.n.antlr.editor/test/unit/src/org/netbeans/modules/antlr/editor/NbAntlrParserTest.java Tue Jan 15 10:42:04 2013 +0100
27.3 @@ -41,6 +41,10 @@
27.4 */
27.5 package org.netbeans.modules.antlr.editor;
27.6
27.7 +import org.antlr.runtime.CommonToken;
27.8 +import org.antlr.runtime.tree.CommonTree;
27.9 +import org.antlr.runtime.tree.TreeVisitor;
27.10 +import org.antlr.runtime.tree.TreeVisitorAction;
27.11 import org.netbeans.modules.parsing.api.Snapshot;
27.12 import org.netbeans.modules.parsing.api.Source;
27.13 import org.netbeans.modules.parsing.spi.ParseException;
27.14 @@ -57,7 +61,9 @@
27.15 }
27.16
27.17 public void testParserBasic() throws ParseException {
27.18 - FileObject testFile = getTestFile("testfiles/ANTLRv3.g");
27.19 +// FileObject testFile = getTestFile("testfiles/ANTLRv3.g");
27.20 +// FileObject testFile = getTestFile("testfiles/Css3.g");
27.21 + FileObject testFile = getTestFile("testfiles/test.g");
27.22
27.23 Source s = Source.create(testFile);
27.24 Snapshot snap = s.createSnapshot();
27.25 @@ -67,11 +73,10 @@
27.26 NbAntlrParserResult result = (NbAntlrParserResult)parser.getResult(null);
27.27 assertNotNull(result);
27.28
27.29 - Node parseTree = result.getParseTree();
27.30 + CommonTree parseTree = result.getParseTree();
27.31 assertNotNull(parseTree);
27.32
27.33 - NodeUtil.dumpTree(parseTree);
27.34 -
27.35 +// Utils.dumpTree(parseTree);
27.36 }
27.37
27.38 }