From 6db53b43e218cd7ce41d37e6119fb43fd564019b Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Mon, 25 Sep 2006 21:54:05 +0000 Subject: [PATCH] Regened the selector so it has the new copyright headers and add missing header. git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/branches/activemq-4.0@449831 13f79535-47bb-0310-9956-ffa450edef68 --- .../activemq/selector/ParseException.java | 20 +- .../activemq/selector/SelectorParser.java | 250 ++++++++++-------- .../selector/SelectorParserConstants.java | 18 ++ .../selector/SelectorParserTokenManager.java | 18 ++ .../activemq/selector/SimpleCharStream.java | 72 +++-- .../org/apache/activemq/selector/Token.java | 22 +- .../activemq/selector/TokenMgrError.java | 22 +- .../org/apache/activemq/state/Tracked.java | 17 +- 8 files changed, 289 insertions(+), 150 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/selector/ParseException.java b/activemq-core/src/main/java/org/apache/activemq/selector/ParseException.java index d7cb23ddc9..c586b85975 100755 --- a/activemq-core/src/main/java/org/apache/activemq/selector/ParseException.java +++ b/activemq-core/src/main/java/org/apache/activemq/selector/ParseException.java @@ -1,4 +1,22 @@ -/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 2.1 */ +/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.apache.activemq.selector; /** diff --git a/activemq-core/src/main/java/org/apache/activemq/selector/SelectorParser.java b/activemq-core/src/main/java/org/apache/activemq/selector/SelectorParser.java index 81d8118131..58508d43f5 100755 --- a/activemq-core/src/main/java/org/apache/activemq/selector/SelectorParser.java +++ b/activemq-core/src/main/java/org/apache/activemq/selector/SelectorParser.java @@ -1,4 +1,22 @@ /* Generated By:JavaCC: Do not edit this line. SelectorParser.java */ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.apache.activemq.selector; import java.io.*; @@ -552,118 +570,6 @@ public class SelectorParser implements SelectorParserConstants { catch(LookaheadSuccess ls) { return true; } } - final private boolean jj_3R_56() { - if (jj_scan_token(37)) return true; - if (jj_3R_9()) return true; - return false; - } - - final private boolean jj_3R_51() { - if (jj_scan_token(32)) return true; - if (jj_3R_43()) return true; - return false; - } - - final private boolean jj_3R_27() { - if (jj_scan_token(ID)) return true; - return false; - } - - final private boolean jj_3R_61() { - if (jj_scan_token(35)) return true; - if (jj_3R_21()) return true; - return false; - } - - final private boolean jj_3R_48() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_56()) { - jj_scanpos = xsp; - if (jj_3R_57()) return true; - } - return false; - } - - final private boolean jj_3R_38() { - if (jj_scan_token(OR)) return true; - if (jj_3R_37()) return true; - return false; - } - - final private boolean jj_3R_50() { - if (jj_scan_token(31)) return true; - if (jj_3R_43()) return true; - return false; - } - - final private boolean jj_3R_25() { - if (jj_scan_token(34)) return true; - if (jj_3R_28()) return true; - if (jj_scan_token(36)) return true; - return false; - } - - final private boolean jj_3R_24() { - if (jj_3R_27()) return true; - return false; - } - - final private boolean jj_3R_49() { - if (jj_scan_token(30)) return true; - if (jj_3R_43()) return true; - return false; - } - - final private boolean jj_3R_44() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_49()) { - jj_scanpos = xsp; - if (jj_3R_50()) { - jj_scanpos = xsp; - if (jj_3R_51()) { - jj_scanpos = xsp; - if (jj_3R_52()) { - jj_scanpos = xsp; - if (jj_3R_53()) { - jj_scanpos = xsp; - if (jj_3_2()) { - jj_scanpos = xsp; - if (jj_3R_54()) { - jj_scanpos = xsp; - if (jj_3_3()) { - jj_scanpos = xsp; - if (jj_3R_55()) { - jj_scanpos = xsp; - if (jj_3_4()) return true; - } - } - } - } - } - } - } - } - } - return false; - } - - final private boolean jj_3R_23() { - if (jj_3R_26()) return true; - return false; - } - - final private boolean jj_3R_43() { - if (jj_3R_9()) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_48()) { jj_scanpos = xsp; break; } - } - return false; - } - final private boolean jj_3R_28() { if (jj_3R_37()) return true; Token xsp; @@ -687,13 +593,13 @@ public class SelectorParser implements SelectorParserConstants { return false; } - final private boolean jj_3R_17() { - if (jj_3R_22()) return true; + final private boolean jj_3R_21() { + if (jj_scan_token(STRING_LITERAL)) return true; return false; } - final private boolean jj_3R_21() { - if (jj_scan_token(STRING_LITERAL)) return true; + final private boolean jj_3R_17() { + if (jj_3R_22()) return true; return false; } @@ -1045,6 +951,118 @@ public class SelectorParser implements SelectorParserConstants { return false; } + final private boolean jj_3R_56() { + if (jj_scan_token(37)) return true; + if (jj_3R_9()) return true; + return false; + } + + final private boolean jj_3R_51() { + if (jj_scan_token(32)) return true; + if (jj_3R_43()) return true; + return false; + } + + final private boolean jj_3R_27() { + if (jj_scan_token(ID)) return true; + return false; + } + + final private boolean jj_3R_61() { + if (jj_scan_token(35)) return true; + if (jj_3R_21()) return true; + return false; + } + + final private boolean jj_3R_48() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_56()) { + jj_scanpos = xsp; + if (jj_3R_57()) return true; + } + return false; + } + + final private boolean jj_3R_38() { + if (jj_scan_token(OR)) return true; + if (jj_3R_37()) return true; + return false; + } + + final private boolean jj_3R_50() { + if (jj_scan_token(31)) return true; + if (jj_3R_43()) return true; + return false; + } + + final private boolean jj_3R_25() { + if (jj_scan_token(34)) return true; + if (jj_3R_28()) return true; + if (jj_scan_token(36)) return true; + return false; + } + + final private boolean jj_3R_24() { + if (jj_3R_27()) return true; + return false; + } + + final private boolean jj_3R_49() { + if (jj_scan_token(30)) return true; + if (jj_3R_43()) return true; + return false; + } + + final private boolean jj_3R_44() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_49()) { + jj_scanpos = xsp; + if (jj_3R_50()) { + jj_scanpos = xsp; + if (jj_3R_51()) { + jj_scanpos = xsp; + if (jj_3R_52()) { + jj_scanpos = xsp; + if (jj_3R_53()) { + jj_scanpos = xsp; + if (jj_3_2()) { + jj_scanpos = xsp; + if (jj_3R_54()) { + jj_scanpos = xsp; + if (jj_3_3()) { + jj_scanpos = xsp; + if (jj_3R_55()) { + jj_scanpos = xsp; + if (jj_3_4()) return true; + } + } + } + } + } + } + } + } + } + return false; + } + + final private boolean jj_3R_23() { + if (jj_3R_26()) return true; + return false; + } + + final private boolean jj_3R_43() { + if (jj_3R_9()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_48()) { jj_scanpos = xsp; break; } + } + return false; + } + public SelectorParserTokenManager token_source; SimpleCharStream jj_input_stream; public Token token, jj_nt; diff --git a/activemq-core/src/main/java/org/apache/activemq/selector/SelectorParserConstants.java b/activemq-core/src/main/java/org/apache/activemq/selector/SelectorParserConstants.java index 6542976f20..db32cbbab5 100755 --- a/activemq-core/src/main/java/org/apache/activemq/selector/SelectorParserConstants.java +++ b/activemq-core/src/main/java/org/apache/activemq/selector/SelectorParserConstants.java @@ -1,4 +1,22 @@ /* Generated By:JavaCC: Do not edit this line. SelectorParserConstants.java */ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.apache.activemq.selector; public interface SelectorParserConstants { diff --git a/activemq-core/src/main/java/org/apache/activemq/selector/SelectorParserTokenManager.java b/activemq-core/src/main/java/org/apache/activemq/selector/SelectorParserTokenManager.java index 5593a7dc46..deaae2d4f7 100755 --- a/activemq-core/src/main/java/org/apache/activemq/selector/SelectorParserTokenManager.java +++ b/activemq-core/src/main/java/org/apache/activemq/selector/SelectorParserTokenManager.java @@ -1,4 +1,22 @@ /* Generated By:JavaCC: Do not edit this line. SelectorParserTokenManager.java */ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.apache.activemq.selector; import java.io.*; import java.util.*; diff --git a/activemq-core/src/main/java/org/apache/activemq/selector/SimpleCharStream.java b/activemq-core/src/main/java/org/apache/activemq/selector/SimpleCharStream.java index 8d5be83bdf..197693e974 100755 --- a/activemq-core/src/main/java/org/apache/activemq/selector/SimpleCharStream.java +++ b/activemq-core/src/main/java/org/apache/activemq/selector/SimpleCharStream.java @@ -1,4 +1,22 @@ -/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 2.1 */ +/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 3.0 */ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.apache.activemq.selector; /** @@ -6,29 +24,29 @@ package org.apache.activemq.selector; * contain only ASCII characters (without unicode processing). */ -public final class SimpleCharStream +public class SimpleCharStream { public static final boolean staticFlag = false; int bufsize; int available; int tokenBegin; public int bufpos = -1; - private int bufline[]; - private int bufcolumn[]; + protected int bufline[]; + protected int bufcolumn[]; - private int column = 0; - private int line = 1; + protected int column = 0; + protected int line = 1; - private boolean prevCharIsCR = false; - private boolean prevCharIsLF = false; + protected boolean prevCharIsCR = false; + protected boolean prevCharIsLF = false; - private java.io.Reader inputStream; + protected java.io.Reader inputStream; - private char[] buffer; - private int maxNextCharInd = 0; - private int inBuf = 0; + protected char[] buffer; + protected int maxNextCharInd = 0; + protected int inBuf = 0; - private final void ExpandBuff(boolean wrapAround) + protected void ExpandBuff(boolean wrapAround) { char[] newbuffer = new char[bufsize + 2048]; int newbufline[] = new int[bufsize + 2048]; @@ -78,7 +96,7 @@ public final class SimpleCharStream tokenBegin = 0; } - private final void FillBuff() throws java.io.IOException + protected void FillBuff() throws java.io.IOException { if (maxNextCharInd == available) { @@ -123,7 +141,7 @@ public final class SimpleCharStream } } - public final char BeginToken() throws java.io.IOException + public char BeginToken() throws java.io.IOException { tokenBegin = -1; char c = readChar(); @@ -132,7 +150,7 @@ public final class SimpleCharStream return c; } - private final void UpdateLineColumn(char c) + protected void UpdateLineColumn(char c) { column++; @@ -172,7 +190,7 @@ public final class SimpleCharStream bufcolumn[bufpos] = column; } - public final char readChar() throws java.io.IOException + public char readChar() throws java.io.IOException { if (inBuf > 0) { @@ -198,7 +216,7 @@ public final class SimpleCharStream * @see #getEndColumn */ - public final int getColumn() { + public int getColumn() { return bufcolumn[bufpos]; } @@ -207,27 +225,27 @@ public final class SimpleCharStream * @see #getEndLine */ - public final int getLine() { + public int getLine() { return bufline[bufpos]; } - public final int getEndColumn() { + public int getEndColumn() { return bufcolumn[bufpos]; } - public final int getEndLine() { + public int getEndLine() { return bufline[bufpos]; } - public final int getBeginColumn() { + public int getBeginColumn() { return bufcolumn[tokenBegin]; } - public final int getBeginLine() { + public int getBeginLine() { return bufline[tokenBegin]; } - public final void backup(int amount) { + public void backup(int amount) { inBuf += amount; if ((bufpos -= amount) < 0) @@ -318,7 +336,7 @@ public final class SimpleCharStream { ReInit(dstream, startline, startcolumn, 4096); } - public final String GetImage() + public String GetImage() { if (bufpos >= tokenBegin) return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); @@ -327,7 +345,7 @@ public final class SimpleCharStream new String(buffer, 0, bufpos + 1); } - public final char[] GetSuffix(int len) + public char[] GetSuffix(int len) { char[] ret = new char[len]; @@ -351,7 +369,7 @@ public final class SimpleCharStream } /** - * Method to adjust line and column numbers for the start of a token.
+ * Method to adjust line and column numbers for the start of a token. */ public void adjustBeginLineColumn(int newLine, int newCol) { diff --git a/activemq-core/src/main/java/org/apache/activemq/selector/Token.java b/activemq-core/src/main/java/org/apache/activemq/selector/Token.java index 5ca5b68492..b139e7fbfe 100755 --- a/activemq-core/src/main/java/org/apache/activemq/selector/Token.java +++ b/activemq-core/src/main/java/org/apache/activemq/selector/Token.java @@ -1,4 +1,22 @@ -/* Generated By:JavaCC: Do not edit this line. Token.java Version 2.1 */ +/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.apache.activemq.selector; /** @@ -53,7 +71,7 @@ public class Token { /** * Returns the image. */ - public final String toString() + public String toString() { return image; } diff --git a/activemq-core/src/main/java/org/apache/activemq/selector/TokenMgrError.java b/activemq-core/src/main/java/org/apache/activemq/selector/TokenMgrError.java index 8728d5d7da..7bfbb0b565 100755 --- a/activemq-core/src/main/java/org/apache/activemq/selector/TokenMgrError.java +++ b/activemq-core/src/main/java/org/apache/activemq/selector/TokenMgrError.java @@ -1,4 +1,22 @@ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 2.1 */ +/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.apache.activemq.selector; public class TokenMgrError extends Error @@ -94,7 +112,7 @@ public class TokenMgrError extends Error * curchar : the offending character * Note: You can customize the lexical error message by modifying this method. */ - private static final String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { + protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { return("Lexical error at line " + errorLine + ", column " + errorColumn + ". Encountered: " + diff --git a/activemq-core/src/main/java/org/apache/activemq/state/Tracked.java b/activemq-core/src/main/java/org/apache/activemq/state/Tracked.java index 9bc76da08b..2e5d29c496 100644 --- a/activemq-core/src/main/java/org/apache/activemq/state/Tracked.java +++ b/activemq-core/src/main/java/org/apache/activemq/state/Tracked.java @@ -1,5 +1,18 @@ /** - * + * + * Copyright 2005-2006 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.apache.activemq.state; @@ -24,4 +37,4 @@ public class Tracked extends Response { return runnable!=null; } -} \ No newline at end of file +}