/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. Parser.jj */
/*@egen*//*
* @(#)file Parser.jjt
* @(#)author Sun Microsystems, Inc.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
options {
STATIC=false;
}
/*@egen*/
}
SKIP :
{
" "
| "\t"
| "\n"
| "\r"
| <"--" (~["\n","\r"])* ("\n"|"\r"|"\r\n")>
| <"#" (~["\n","\r"])* ("\n"|"\r"|"\r\n")>
}
/* RESERVED WORDS AND LITERALS */
TOKEN :
{
<ACCESS: "access">
| <ACL: "acl">
| <ASSIGN: "=">
| <COMMUNITIES: "communities">
| <ENTERPRISE: "enterprise">
| <HOSTS: "hosts">
| <LBRACE: "{">
| <MANAGERS: "managers">
| <RANGE: "-">
| <RBRACE: "}">
| <RO: "read-only">
| <RW: "read-write">
| <TRAP: "trap">
| <INFORM: "inform">
| <TRAPCOMMUNITY: "trap-community">
| <INFORMCOMMUNITY: "inform-community">
| <TRAPNUM: "trap-num">
}
TOKEN : /* LITERALS */
{
>
|
|
|
}
TOKEN : /* V6 LITERALS */
{
< V6_ADDRESS: ((( ( (<H> ":")+ (":")?) | "::" ) (<H> ":")* (<H> | (<D> "." <D> "." <D> "." <D>))) | ("::")) | ( (<H> ":")+ ":") >
|
<#H: (["0"-"9","a"-"f","A"-"F"])+ >
|
<#D: (["0"-"9"])+ >
}
TOKEN : /* IDENTIFIERS */
{
< IDENTIFIER: ( (<DIGIT>|<LETTER>)+ (<SEPARATOR>|<LETTER>|<DIGIT>)* (<DIGIT>|<LETTER>)+ ) | (<DIGIT>|<LETTER>)+ >
|
|
|
|
}
TOKEN: /* SEPARATOR */
{
< COMMA: "," >
| < DOT: "." >
| < MARK: "!" >
| < MASK: "/">
}
// A file can contain several acl definitions
//
boolean jjtc000 = true;
/*@egen*/}
{/*@bgen(jjtree) SecurityDefs */
try {
/*@egen*/
[AclBlock()]
[TrapBlock()]
[InformBlock()]
<EOF>/*@bgen(jjtree)*/
{
jjtc000 = false;
}
/*@egen*/
{ return jjtn000;}/*@bgen(jjtree)*/
if (jjtc000) {
jjtc000 = false;
} else {
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void AclBlock(): {/*@bgen(jjtree) AclBlock */
boolean jjtc000 = true;
/*@egen*/}
{/*@bgen(jjtree) AclBlock */
try {
/*@egen*/
if (jjtc000) {
jjtc000 = false;
} else {
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void AclItem(): {/*@bgen(jjtree) AclItem */
boolean jjtc000 = true;
/*@egen*/}
{/*@bgen(jjtree) AclItem */
try {
/*@egen*/
if (jjtc000) {
jjtc000 = false;
} else {
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
boolean jjtc000 = true;
/*@egen*/}
{/*@bgen(jjtree) Communities */
try {
/*@egen*/
{
jjtc000 = false;
}
/*@egen*/
{return jjtn000;}/*@bgen(jjtree)*/
if (jjtc000) {
jjtc000 = false;
} else {
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void Community():
{/*@bgen(jjtree) Community */
boolean jjtc000 = true;
/*@egen*/
Token t;
}
{/*@bgen(jjtree) Community */
try {
/*@egen*/
t=<IDENTIFIER>/*@bgen(jjtree)*/
{
jjtc000 = false;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
boolean jjtc000 = true;
/*@egen*/}
{/*@bgen(jjtree) Access */
try {
/*@egen*/
|
)/*@bgen(jjtree)*/
{
jjtc000 = false;
}
/*@egen*/
{return jjtn000;}/*@bgen(jjtree)*/
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void Managers() : {/*@bgen(jjtree) Managers */
boolean jjtc000 = true;
/*@egen*/ }
{/*@bgen(jjtree) Managers */
try {
/*@egen*/
if (jjtc000) {
jjtc000 = false;
} else {
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void Host() :
{/*@bgen(jjtree) Host */
boolean jjtc000 = true;
/*@egen*/
Token t;
}
{/*@bgen(jjtree) Host */
try {
/*@egen*/
HostName()
|
NetMask()
|
|
|
|
IpMask()/*@bgen(jjtree)*/
if (jjtc000) {
jjtc000 = false;
} else {
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void HostName():
{/*@bgen(jjtree) HostName */
boolean jjtc000 = true;
/*@egen*/
Token t;
}
{/*@bgen(jjtree) HostName */
try {
/*@egen*/
(
"." t=<IDENTIFIER>
)*/*@bgen(jjtree)*/
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void IpAddress():
{/*@bgen(jjtree) IpAddress */
boolean jjtc000 = true;
/*@egen*/
Token t;
}
{/*@bgen(jjtree) IpAddress */
try {
/*@egen*/
t= <INTEGER_LITERAL>
(
"." t= <INTEGER_LITERAL>
)*/*@bgen(jjtree)*/
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void IpV6Address():
{/*@bgen(jjtree) IpV6Address */
boolean jjtc000 = true;
/*@egen*/
Token t;
}
{/*@bgen(jjtree) IpV6Address */
try {
/*@egen*/
t= <V6_ADDRESS>/*@bgen(jjtree)*/
{
jjtc000 = false;
}
/*@egen*/
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void IpMask():
{/*@bgen(jjtree) IpMask */
boolean jjtc000 = true;
/*@egen*/
Token t;
}
{/*@bgen(jjtree) IpMask */
try {
/*@egen*/
t= <INTEGER_LITERAL>
(
"!" t= <INTEGER_LITERAL>
)*/*@bgen(jjtree)*/
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void NetMask():
{/*@bgen(jjtree) NetMask */
boolean jjtc000 = true;
/*@egen*/
Token t;
}
{/*@bgen(jjtree) NetMask */
try {
/*@egen*/
t= <INTEGER_LITERAL>
(
"." t= <INTEGER_LITERAL>
{
jjtc000 = false;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void NetMaskV6():
{/*@bgen(jjtree) NetMaskV6 */
boolean jjtc000 = true;
/*@egen*/
Token t;
}
{/*@bgen(jjtree) NetMaskV6 */
try {
/*@egen*/
t= <V6_ADDRESS>
{
jjtc000 = false;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void TrapBlock(): {/*@bgen(jjtree) TrapBlock */
boolean jjtc000 = true;
/*@egen*/ }
{/*@bgen(jjtree) TrapBlock */
try {
/*@egen*/
if (jjtc000) {
jjtc000 = false;
} else {
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void TrapItem(): {/*@bgen(jjtree) TrapItem */
boolean jjtc000 = true;
/*@egen*/ }
{/*@bgen(jjtree) TrapItem */
try {
/*@egen*/
if (jjtc000) {
jjtc000 = false;
} else {
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
{/*@bgen(jjtree) TrapCommunity */
boolean jjtc000 = true;
/*@egen*/
Token t;
}
{/*@bgen(jjtree) TrapCommunity */
try {
/*@egen*/
{
jjtc000 = false;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void TrapInterestedHost(): {/*@bgen(jjtree) TrapInterestedHost */
boolean jjtc000 = true;
/*@egen*/ }
{/*@bgen(jjtree) TrapInterestedHost */
try {
/*@egen*/
if (jjtc000) {
jjtc000 = false;
} else {
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void HostTrap() :
{/*@bgen(jjtree) HostTrap */
boolean jjtc000 = true;
/*@egen*/
Token t;
}
{/*@bgen(jjtree) HostTrap */
try {
/*@egen*/
HostName()
|
|
IpV6Address()/*@bgen(jjtree)*/
if (jjtc000) {
jjtc000 = false;
} else {
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void Enterprise():
{/*@bgen(jjtree) Enterprise */
boolean jjtc000 = true;
/*@egen*/
Token t;
}
{/*@bgen(jjtree) Enterprise */
try {
/*@egen*/
"{"
"}"/*@bgen(jjtree)*/
if (jjtc000) {
jjtc000 = false;
} else {
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void TrapNum():
{/*@bgen(jjtree) TrapNum */
boolean jjtc000 = true;
/*@egen*/
Token t;
}
{/*@bgen(jjtree) TrapNum */
try {
/*@egen*/
[
]/*@bgen(jjtree)*/
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void InformBlock(): {/*@bgen(jjtree) InformBlock */
boolean jjtc000 = true;
/*@egen*/ }
{/*@bgen(jjtree) InformBlock */
try {
/*@egen*/
if (jjtc000) {
jjtc000 = false;
} else {
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void InformItem(): {/*@bgen(jjtree) InformItem */
boolean jjtc000 = true;
/*@egen*/ }
{/*@bgen(jjtree) InformItem */
try {
/*@egen*/
if (jjtc000) {
jjtc000 = false;
} else {
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
{/*@bgen(jjtree) InformCommunity */
boolean jjtc000 = true;
/*@egen*/
Token t;
}
{/*@bgen(jjtree) InformCommunity */
try {
/*@egen*/
{
jjtc000 = false;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void InformInterestedHost(): {/*@bgen(jjtree) InformInterestedHost */
boolean jjtc000 = true;
/*@egen*/ }
{/*@bgen(jjtree) InformInterestedHost */
try {
/*@egen*/
if (jjtc000) {
jjtc000 = false;
} else {
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}
void HostInform() :
{/*@bgen(jjtree) HostInform */
boolean jjtc000 = true;
/*@egen*/
Token t;
}
{/*@bgen(jjtree) HostInform */
try {
/*@egen*/
HostName()
|
|
IpV6Address()/*@bgen(jjtree)*/
if (jjtc000) {
jjtc000 = false;
} else {
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof ParseException) {
throw (ParseException)jjte000;
}
} finally {
if (jjtc000) {
}
}
/*@egen*/
}