Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
net.ripe.db.whois.common.generated.ExportViaParser Maven / Gradle / Ivy
//### This file created by BYACC 1.8(/Java extension 1.15)
//### Java capabilities added 7 Jan 97, Bob Jamison
//### Updated : 27 Nov 97 -- Bob Jamison, Joe Nieten
//### 01 Jan 98 -- Bob Jamison -- fixed generic semantic constructor
//### 01 Jun 99 -- Bob Jamison -- added Runnable support
//### 06 Aug 00 -- Bob Jamison -- made state variables class-global
//### 03 Jan 01 -- Bob Jamison -- improved flags, tracing
//### 16 May 01 -- Bob Jamison -- added custom stack sizing
//### 04 Mar 02 -- Yuval Oren -- improved java performance, added options
//### 14 Mar 02 -- Tomas Hurka -- -d support, static initializer workaround
//### Please send bug reports to [email protected]
//### static char yysccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/90";
package net.ripe.db.whois.common.generated;
//#line 2 "src/main/parser/byacc/export_via.y"
import net.ripe.db.whois.common.rpsl.AttributeParser;
import net.ripe.db.whois.common.rpsl.ParserHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.StringReader;
/*
filename: export_via.y
description:
Defines the grammar for an export-via attribute. Derived
from mp_export.y.
notes:
Defines tokens for the associated lexer, export_via.l.
*/
//#line 35 "ExportViaParser.java"
public class ExportViaParser
implements AttributeParser
{
boolean yydebug; //do I want debug output?
int yynerrs; //number of errors so far
int yyerrflag; //was there an error?
int yychar; //the current working character
//########## MESSAGES ##########
//###############################################################
// method: debug
//###############################################################
void debug(String msg)
{
if (yydebug)
System.out.println(msg);
}
//########## STATE STACK ##########
final static int YYSTACKSIZE = 500; //maximum stack size
int statestk[] = new int[YYSTACKSIZE]; //state stack
int stateptr;
int stateptrmax; //highest index of stackptr
int statemax; //state when highest index reached
//###############################################################
// methods: state stack push,pop,drop,peek
//###############################################################
final void state_push(int state)
{
try {
stateptr++;
statestk[stateptr]=state;
}
catch (ArrayIndexOutOfBoundsException e) {
int oldsize = statestk.length;
int newsize = oldsize * 2;
int[] newstack = new int[newsize];
System.arraycopy(statestk,0,newstack,0,oldsize);
statestk = newstack;
statestk[stateptr]=state;
}
}
final int state_pop()
{
return statestk[stateptr--];
}
final void state_drop(int cnt)
{
stateptr -= cnt;
}
final int state_peek(int relative)
{
return statestk[stateptr-relative];
}
//###############################################################
// method: init_stacks : allocate and prepare stacks
//###############################################################
final boolean init_stacks()
{
stateptr = -1;
val_init();
return true;
}
//###############################################################
// method: dump_stacks : show n levels of the stacks
//###############################################################
void dump_stacks(int count)
{
int i;
System.out.println("=index==state====value= s:"+stateptr+" v:"+valptr);
for (i=0;i=YYSTACKSIZE)
return;
valstk[++valptr]=val;
}
ExportViaParserVal val_pop()
{
if (valptr<0)
return new ExportViaParserVal();
return valstk[valptr--];
}
void val_drop(int cnt)
{
int ptr;
ptr=valptr-cnt;
if (ptr<0)
return;
valptr = ptr;
}
ExportViaParserVal val_peek(int relative)
{
int ptr;
ptr=valptr-relative;
if (ptr<0)
return new ExportViaParserVal();
return valstk[ptr];
}
final ExportViaParserVal dup_yyval(ExportViaParserVal val)
{
ExportViaParserVal dup = new ExportViaParserVal();
dup.ival = val.ival;
dup.dval = val.dval;
dup.sval = val.sval;
dup.obj = val.obj;
return dup;
}
//#### end semantic value section ####
public final static short OP_OR=257;
public final static short OP_AND=258;
public final static short OP_NOT=259;
public final static short OP_MS=260;
public final static short OP_EQUAL=261;
public final static short OP_APPEND=262;
public final static short OP_COMPARE=263;
public final static short KEYW_ANY=264;
public final static short KEYW_PEERAS=265;
public final static short ASPATH_POSTFIX=266;
public final static short TKN_FLTRNAME=267;
public final static short TKN_ASNO=268;
public final static short TKN_ASRANGE=269;
public final static short TKN_RSNAME=270;
public final static short TKN_ASNAME=271;
public final static short TKN_PRFXV4=272;
public final static short TKN_PRFXV4RNG=273;
public final static short TKN_IPV4=274;
public final static short TKN_RTRSNAME=275;
public final static short TKN_PRNGNAME=276;
public final static short TKN_IPV6=277;
public final static short TKN_IPV6DC=278;
public final static short TKN_PRFXV6=279;
public final static short TKN_PRFXV6DC=280;
public final static short TKN_PRFXV6RNG=281;
public final static short TKN_PRFXV6DCRNG=282;
public final static short KEYW_TO=283;
public final static short KEYW_ACTION=284;
public final static short KEYW_EXCEPT=285;
public final static short KEYW_AFI=286;
public final static short KEYW_AFI_VALUE_V4=287;
public final static short KEYW_AFI_VALUE_V6=288;
public final static short KEYW_AFI_VALUE_ANY=289;
public final static short TKN_PREF=290;
public final static short TKN_MED=291;
public final static short TKN_DPA=292;
public final static short TKN_ASPATH=293;
public final static short TKN_COMMUNITY=294;
public final static short TKN_NEXT_HOP=295;
public final static short TKN_COST=296;
public final static short TKN_COMM_NO=297;
public final static short KEYW_IGP_COST=298;
public final static short KEYW_SELF=299;
public final static short KEYW_PREPEND=300;
public final static short KEYW_APPEND=301;
public final static short KEYW_DELETE=302;
public final static short KEYW_CONTAINS=303;
public final static short KEYW_AT=304;
public final static short KEYW_INTERNET=305;
public final static short KEYW_NO_EXPORT=306;
public final static short KEYW_NO_ADVERTISE=307;
public final static short KEYW_PROTOCOL=308;
public final static short TKN_PROTOCOL=309;
public final static short KEYW_INTO=310;
public final static short KEYW_REFINE=311;
public final static short KEYW_ANNOUNCE=312;
public final static short TKN_INT=313;
public final static short TKN_DNS=314;
public final static short YYERRCODE=256;
final static short yylhs[] = { -1,
0, 0, 0, 2, 2, 3, 3, 4, 4, 6,
6, 6, 6, 7, 7, 7, 7, 7, 7, 7,
7, 8, 8, 5, 5, 10, 10, 9, 11, 11,
13, 13, 14, 14, 15, 15, 19, 19, 19, 20,
20, 21, 21, 16, 16, 17, 17, 22, 22, 23,
23, 23, 24, 24, 25, 25, 25, 25, 25, 1,
1, 18, 18, 26, 26, 26, 26, 26, 26, 26,
27, 28, 28, 29, 30, 34, 34, 31, 31, 31,
31, 31, 31, 31, 35, 36, 36, 37, 37, 37,
37, 37, 32, 32, 32, 32, 33, 12, 12, 12,
38, 38, 39, 39, 39, 40, 40, 40, 40, 40,
42, 42, 43, 43, 43, 43, 43, 44, 44, 45,
45, 46, 46, 46, 46, 46, 46, 41, 41, 47,
47, 48, 48, 48, 48, 48, 49, 49, 49, 49,
50, 50, 50, 50, 50, 50, 51, 51, 51, 51,
51, 51, 51,
};
final static short yylen[] = { 2,
3, 3, 4, 0, 2, 0, 2, 1, 3, 1,
3, 3, 2, 3, 3, 3, 3, 1, 1, 1,
1, 2, 3, 1, 3, 2, 3, 3, 4, 5,
3, 1, 0, 2, 3, 1, 3, 3, 1, 3,
1, 1, 1, 0, 1, 0, 2, 3, 1, 3,
3, 1, 3, 1, 1, 1, 1, 1, 1, 1,
3, 2, 3, 1, 1, 1, 1, 1, 1, 1,
3, 3, 3, 3, 6, 1, 3, 3, 3, 6,
6, 6, 4, 3, 3, 1, 3, 1, 1, 1,
1, 1, 3, 3, 3, 3, 3, 3, 2, 1,
3, 1, 2, 3, 1, 1, 1, 3, 1, 1,
2, 1, 1, 1, 1, 1, 3, 0, 1, 1,
3, 1, 1, 1, 1, 1, 1, 3, 1, 2,
1, 2, 2, 2, 2, 1, 1, 1, 3, 1,
1, 1, 1, 1, 3, 4, 0, 2, 2, 2,
4, 2, 2,
};
final static short yydefred[] = { 0,
0, 0, 0, 5, 0, 0, 7, 21, 42, 43,
32, 0, 18, 19, 20, 0, 0, 1, 0, 8,
0, 0, 0, 0, 0, 0, 0, 39, 41, 0,
0, 0, 0, 3, 0, 0, 0, 22, 0, 0,
0, 0, 55, 59, 56, 57, 60, 0, 0, 0,
0, 0, 52, 54, 0, 0, 0, 9, 0, 26,
23, 0, 40, 17, 14, 15, 16, 0, 12, 0,
11, 0, 106, 114, 109, 113, 116, 115, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 107,
64, 65, 66, 67, 68, 69, 70, 0, 102, 105,
110, 0, 0, 0, 0, 0, 0, 0, 31, 0,
0, 0, 37, 38, 27, 0, 103, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 122, 125,
123, 124, 126, 127, 0, 0, 120, 0, 142, 141,
143, 0, 144, 137, 138, 0, 0, 0, 0, 136,
140, 0, 0, 0, 111, 0, 0, 29, 53, 61,
0, 0, 50, 51, 71, 73, 72, 74, 0, 0,
78, 79, 84, 92, 88, 89, 90, 91, 0, 86,
0, 0, 0, 93, 94, 95, 96, 97, 117, 0,
104, 0, 147, 0, 108, 0, 0, 135, 132, 133,
134, 0, 101, 30, 0, 0, 0, 0, 0, 83,
0, 0, 0, 121, 139, 0, 149, 0, 152, 153,
150, 145, 0, 0, 62, 76, 0, 85, 87, 0,
0, 0, 146, 0, 63, 0, 75, 80, 81, 82,
151, 77,
};
final static short yydgoto[] = { 2,
49, 3, 6, 18, 19, 20, 21, 22, 70, 32,
24, 89, 25, 158, 26, 50, 109, 205, 27, 28,
29, 51, 52, 53, 54, 90, 91, 92, 93, 94,
95, 96, 97, 227, 171, 179, 180, 98, 99, 100,
147, 101, 102, 135, 136, 137, 148, 149, 150, 151,
194,
};
final static short yysindex[] = { -278,
-273, 0, -251, 0, -235, 384, 0, 0, 0, 0,
0, -167, 0, 0, 0, 206, -17, 0, 42, 0,
71, -257, 64, -23, -156, -40, -215, 0, 0, 316,
66, -21, -38, 0, -158, 410, 410, 0, 349, -124,
206, -17, 0, 0, 0, 0, 0, -35, 114, -142,
-94, -214, 0, 0, -17, -17, -158, 0, 64, 0,
0, 110, 0, 0, 0, 0, 0, -167, 0, 64,
0, 349, 0, 0, 0, 0, 0, 0, -91, -89,
-88, 128, 274, -86, -85, -132, 349, -1, 331, 0,
0, 0, 0, 0, 0, 0, 0, -81, 0, 0,
0, -82, 206, -105, -215, -37, -134, -35, 0, -35,
-35, -35, 0, 0, 0, 316, 0, -131, -267, -130,
-116, 62, 62, 62, -169, -135, -190, -127, 0, 0,
0, 0, 0, 0, 65, 148, 0, 259, 0, 0,
0, -1, 0, 0, 0, 99, -52, -1, -34, 0,
0, 349, -81, 349, 0, -105, -139, 0, 0, 0,
-94, -214, 0, 0, 0, 0, 0, 0, 154, -169,
0, 0, 0, 0, 0, 0, 0, 0, -4, 0,
155, 157, 158, 0, 0, 0, 0, 0, 0, -132,
0, -19, 0, -44, 0, -1, -34, 0, 0, 0,
0, -81, 0, 0, -139, 140, -68, -18, -169, 0,
-169, -169, -169, 0, 0, 33, 0, 156, 0, 0,
0, 0, -1, 143, 0, 0, 7, 0, 0, 67,
75, 117, 0, -64, 0, -63, 0, 0, 0, 0,
0, 0,
};
final static short yyrindex[] = { 212,
0, 0, 424, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 203, 0,
0, 207, 208, 0, 0, -221, 102, 0, 0, 0,
0, 0, 0, 0, 211, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 147, 63,
151, -27, 0, 0, 0, 0, 0, 0, 214, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 81, 0, 0, 18, 0,
0, 0, 0, 0, 0, 0, 0, 16, 0, 0,
0, 1, 0, 45, 124, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 87, 0, 0, 0, 0,
0, 0, 0, 0, 0, 125, 0, -30, 450, 0,
0, 0, 58, 0, 0, 45, 0, 0, 0, 0,
173, 169, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 469, 0, 0, 0,
0, 73, 0, 0, 149, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 365, 0, 0,
0, 0, -29, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,
};
final static short yygindex[] = { 0,
0, 0, 0, 32, 0, -24, 13, 0, 80, 0,
0, 129, -3, 59, 205, 0, 0, 0, 181, 79,
0, -28, 116, -59, 0, -123, 0, 0, 0, 0,
0, 0, 0, 0, 22, -146, 19, -74, -65, 0,
89, 0, 0, 0, 0, 39, 37, -121, 0, 0,
43,
};
final static int YYTABLESIZE=740;
static short yytable[];
static { yytable();}
static void yytable(){
yytable = new short[]{ 48,
112, 221, 63, 159, 48, 58, 117, 199, 201, 195,
129, 128, 49, 49, 153, 100, 17, 28, 17, 106,
40, 215, 17, 208, 30, 209, 197, 36, 200, 1,
166, 129, 128, 206, 145, 4, 210, 104, 142, 209,
112, 112, 55, 111, 143, 167, 44, 237, 222, 44,
236, 163, 164, 37, 44, 100, 100, 99, 5, 112,
112, 44, 44, 153, 230, 231, 232, 69, 71, 56,
112, 196, 98, 7, 100, 100, 28, 202, 221, 161,
116, 224, 44, 184, 33, 23, 185, 186, 203, 146,
44, 58, 144, 129, 128, 31, 8, 99, 99, 156,
34, 197, 46, 61, 196, 64, 228, 238, 187, 59,
209, 62, 98, 98, 35, 239, 99, 99, 209, 13,
14, 15, 38, 112, 60, 233, 41, 174, 65, 66,
67, 98, 98, 113, 114, 175, 176, 177, 100, 129,
130, 36, 36, 178, 172, 173, 131, 132, 133, 134,
79, 80, 81, 82, 83, 84, 85, 240, 103, 107,
209, 108, 110, 35, 35, 181, 182, 183, 115, 118,
147, 119, 120, 121, 127, 128, 154, 155, 157, 160,
99, 165, 168, 169, 170, 188, 58, 58, 34, 189,
45, 190, 193, 207, 211, 98, 212, 213, 225, 226,
234, 235, 2, 241, 242, 118, 10, 24, 48, 48,
13, 119, 47, 25, 204, 138, 42, 147, 42, 110,
217, 33, 105, 218, 219, 162, 220, 229, 214, 49,
192, 198, 223, 43, 44, 216, 45, 46, 43, 44,
49, 45, 46, 49, 9, 17, 9, 10, 49, 10,
9, 4, 11, 10, 11, 49, 49, 112, 112, 112,
0, 0, 0, 139, 112, 112, 140, 112, 112, 141,
112, 112, 100, 47, 100, 0, 49, 0, 47, 100,
100, 0, 100, 100, 49, 100, 100, 0, 39, 0,
112, 112, 112, 112, 112, 112, 112, 217, 87, 191,
218, 219, 0, 220, 0, 100, 100, 100, 100, 100,
100, 100, 33, 125, 99, 33, 99, 0, 88, 126,
33, 99, 99, 0, 99, 99, 0, 99, 99, 98,
46, 98, 0, 46, 4, 0, 98, 98, 46, 98,
98, 0, 98, 98, 0, 46, 46, 99, 99, 99,
99, 99, 99, 99, 0, 17, 33, 0, 36, 57,
0, 0, 98, 98, 98, 98, 98, 98, 98, 36,
87, 0, 36, 0, 46, 36, 36, 36, 36, 36,
35, 86, 0, 0, 36, 36, 0, 0, 87, 147,
88, 35, 147, 147, 35, 147, 0, 35, 35, 35,
35, 35, 0, 58, 58, 36, 35, 35, 88, 0,
148, 0, 0, 36, 58, 36, 34, 58, 45, 34,
0, 45, 58, 17, 34, 48, 45, 35, 0, 58,
58, 58, 0, 45, 45, 35, 48, 35, 16, 48,
47, 0, 0, 47, 48, 0, 0, 0, 47, 17,
58, 48, 48, 86, 45, 47, 47, 148, 58, 0,
34, 0, 45, 6, 0, 0, 0, 0, 0, 0,
0, 86, 48, 9, 0, 4, 10, 0, 0, 4,
48, 11, 4, 0, 47, 131, 0, 4, 0, 131,
131, 0, 0, 0, 0, 131, 0, 4, 4, 4,
4, 0, 0, 0, 130, 0, 16, 0, 130, 130,
0, 131, 0, 0, 130, 152, 0, 72, 0, 0,
0, 4, 73, 74, 0, 75, 76, 0, 77, 78,
130, 0, 16, 0, 122, 123, 124, 0, 0, 0,
131, 0, 0, 131, 0, 0, 6, 0, 79, 80,
81, 82, 83, 84, 85, 0, 0, 0, 0, 130,
0, 0, 130, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 131, 0, 0, 0, 0, 0, 8,
0, 0, 0, 9, 0, 0, 10, 152, 0, 72,
0, 11, 130, 0, 73, 74, 0, 75, 76, 0,
77, 78, 13, 14, 15, 0, 0, 72, 0, 0,
0, 0, 73, 74, 0, 75, 76, 0, 77, 78,
79, 80, 81, 82, 83, 84, 85, 0, 0, 148,
0, 0, 148, 148, 0, 148, 0, 0, 79, 80,
81, 82, 83, 84, 85, 0, 0, 8, 0, 0,
0, 9, 0, 0, 10, 0, 0, 0, 0, 11,
0, 0, 0, 0, 0, 0, 0, 0, 0, 12,
13, 14, 15, 8, 0, 0, 0, 9, 0, 0,
10, 0, 0, 0, 0, 11, 0, 6, 0, 0,
0, 6, 0, 0, 6, 68, 13, 14, 15, 6,
0, 0, 0, 0, 0, 0, 0, 0, 0, 6,
6, 6, 6, 0, 131, 0, 0, 131, 0, 0,
131, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 130, 0, 0, 130, 0, 0, 130,
};
}
static short yycheck[];
static { yycheck(); }
static void yycheck() {
yycheck = new short[] { 40,
0, 46, 41, 41, 40, 30, 72, 42, 43, 62,
41, 41, 40, 41, 89, 0, 40, 0, 40, 48,
24, 41, 40, 170, 12, 44, 148, 285, 63, 308,
298, 62, 62, 157, 36, 309, 41, 41, 40, 44,
40, 41, 258, 258, 46, 313, 268, 41, 93, 271,
44, 111, 112, 311, 276, 40, 41, 0, 310, 59,
60, 283, 284, 138, 211, 212, 213, 36, 37, 285,
285, 124, 0, 309, 59, 60, 59, 152, 46, 108,
68, 205, 304, 274, 40, 6, 277, 278, 154, 91,
312, 116, 94, 124, 124, 16, 264, 40, 41, 103,
59, 223, 40, 125, 124, 264, 125, 41, 299, 30,
44, 32, 40, 41, 44, 41, 59, 60, 44, 287,
288, 289, 59, 123, 59, 93, 283, 297, 287, 288,
289, 59, 60, 55, 56, 305, 306, 307, 123, 272,
273, 40, 41, 313, 123, 124, 279, 280, 281, 282,
290, 291, 292, 293, 294, 295, 296, 41, 283, 46,
44, 304, 257, 40, 41, 301, 302, 303, 59, 261,
46, 261, 261, 46, 261, 261, 258, 260, 284, 314,
123, 313, 313, 300, 123, 313, 40, 41, 40, 125,
40, 44, 94, 40, 40, 123, 40, 40, 59, 268,
45, 59, 0, 268, 268, 125, 0, 0, 40, 41,
0, 125, 40, 0, 156, 87, 257, 93, 257, 257,
265, 17, 42, 268, 269, 110, 271, 209, 190, 257,
142, 266, 196, 274, 275, 193, 277, 278, 274, 275,
268, 277, 278, 271, 268, 40, 268, 271, 276, 271,
268, 40, 276, 271, 276, 283, 284, 257, 258, 259,
-1, -1, -1, 265, 264, 265, 268, 267, 268, 271,
270, 271, 257, 314, 259, -1, 304, -1, 314, 264,
265, -1, 267, 268, 312, 270, 271, -1, 312, -1,
290, 291, 292, 293, 294, 295, 296, 265, 40, 41,
268, 269, -1, 271, -1, 290, 291, 292, 293, 294,
295, 296, 268, 40, 257, 271, 259, -1, 60, 46,
276, 264, 265, -1, 267, 268, -1, 270, 271, 257,
268, 259, -1, 271, 123, -1, 264, 265, 276, 267,
268, -1, 270, 271, -1, 283, 284, 290, 291, 292,
293, 294, 295, 296, -1, 40, 312, -1, 257, 44,
-1, -1, 290, 291, 292, 293, 294, 295, 296, 268,
40, -1, 271, -1, 312, 274, 275, 276, 277, 278,
257, 123, -1, -1, 283, 284, -1, -1, 40, 265,
60, 268, 268, 269, 271, 271, -1, 274, 275, 276,
277, 278, -1, 257, 258, 304, 283, 284, 60, -1,
46, -1, -1, 312, 268, 314, 268, 271, 268, 271,
-1, 271, 276, 40, 276, 257, 276, 304, -1, 283,
284, 285, -1, 283, 284, 312, 268, 314, 123, 271,
268, -1, -1, 271, 276, -1, -1, -1, 276, 40,
304, 283, 284, 123, 304, 283, 284, 93, 312, -1,
312, -1, 312, 40, -1, -1, -1, -1, -1, -1,
-1, 123, 304, 268, -1, 264, 271, -1, -1, 268,
312, 276, 271, -1, 312, 36, -1, 276, -1, 40,
41, -1, -1, -1, -1, 46, -1, 286, 287, 288,
289, -1, -1, -1, 36, -1, 123, -1, 40, 41,
-1, 62, -1, -1, 46, 257, -1, 259, -1, -1,
-1, 310, 264, 265, -1, 267, 268, -1, 270, 271,
62, -1, 123, -1, 261, 262, 263, -1, -1, -1,
91, -1, -1, 94, -1, -1, 123, -1, 290, 291,
292, 293, 294, 295, 296, -1, -1, -1, -1, 91,
-1, -1, 94, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 124, -1, -1, -1, -1, -1, 264,
-1, -1, -1, 268, -1, -1, 271, 257, -1, 259,
-1, 276, 124, -1, 264, 265, -1, 267, 268, -1,
270, 271, 287, 288, 289, -1, -1, 259, -1, -1,
-1, -1, 264, 265, -1, 267, 268, -1, 270, 271,
290, 291, 292, 293, 294, 295, 296, -1, -1, 265,
-1, -1, 268, 269, -1, 271, -1, -1, 290, 291,
292, 293, 294, 295, 296, -1, -1, 264, -1, -1,
-1, 268, -1, -1, 271, -1, -1, -1, -1, 276,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 286,
287, 288, 289, 264, -1, -1, -1, 268, -1, -1,
271, -1, -1, -1, -1, 276, -1, 264, -1, -1,
-1, 268, -1, -1, 271, 286, 287, 288, 289, 276,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 286,
287, 288, 289, -1, 265, -1, -1, 268, -1, -1,
271, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 265, -1, -1, 268, -1, -1, 271,
};
}
final static short YYFINAL=2;
final static short YYMAXTOKEN=314;
final static String yyname[] = {
"end-of-file",null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,"'$'",null,null,null,"'('","')'","'*'","'+'",
"','","'-'","'.'",null,null,null,null,null,null,null,null,null,null,null,null,
"';'","'<'",null,"'>'","'?'",null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,"'['",null,"']'","'^'",null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,"'{'","'|'","'}'",null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,"OP_OR","OP_AND","OP_NOT","OP_MS",
"OP_EQUAL","OP_APPEND","OP_COMPARE","KEYW_ANY","KEYW_PEERAS","ASPATH_POSTFIX",
"TKN_FLTRNAME","TKN_ASNO","TKN_ASRANGE","TKN_RSNAME","TKN_ASNAME","TKN_PRFXV4",
"TKN_PRFXV4RNG","TKN_IPV4","TKN_RTRSNAME","TKN_PRNGNAME","TKN_IPV6",
"TKN_IPV6DC","TKN_PRFXV6","TKN_PRFXV6DC","TKN_PRFXV6RNG","TKN_PRFXV6DCRNG",
"KEYW_TO","KEYW_ACTION","KEYW_EXCEPT","KEYW_AFI","KEYW_AFI_VALUE_V4",
"KEYW_AFI_VALUE_V6","KEYW_AFI_VALUE_ANY","TKN_PREF","TKN_MED","TKN_DPA",
"TKN_ASPATH","TKN_COMMUNITY","TKN_NEXT_HOP","TKN_COST","TKN_COMM_NO",
"KEYW_IGP_COST","KEYW_SELF","KEYW_PREPEND","KEYW_APPEND","KEYW_DELETE",
"KEYW_CONTAINS","KEYW_AT","KEYW_INTERNET","KEYW_NO_EXPORT","KEYW_NO_ADVERTISE",
"KEYW_PROTOCOL","TKN_PROTOCOL","KEYW_INTO","KEYW_REFINE","KEYW_ANNOUNCE",
"TKN_INT","TKN_DNS",
};
final static String yyrule[] = {
"$accept : export_via_attribute",
"export_via_attribute : opt_protocol_from opt_protocol_into afi_export_expr",
"export_via_attribute : opt_protocol_from opt_protocol_into afi_export_factor",
"export_via_attribute : opt_protocol_from opt_protocol_into afi_export_factor ';'",
"opt_protocol_from :",
"opt_protocol_from : KEYW_PROTOCOL TKN_PROTOCOL",
"opt_protocol_into :",
"opt_protocol_into : KEYW_INTO TKN_PROTOCOL",
"afi_export_expr : export_expr",
"afi_export_expr : KEYW_AFI afi_list export_expr",
"export_expr : export_term",
"export_expr : export_term KEYW_REFINE afi_export_expr",
"export_expr : export_term KEYW_EXCEPT afi_export_expr",
"export_expr : afi_list ','",
"afi_list : afi_list ',' KEYW_AFI_VALUE_V4",
"afi_list : afi_list ',' KEYW_AFI_VALUE_V6",
"afi_list : afi_list ',' KEYW_AFI_VALUE_ANY",
"afi_list : afi_list ',' KEYW_ANY",
"afi_list : KEYW_AFI_VALUE_V4",
"afi_list : KEYW_AFI_VALUE_V6",
"afi_list : KEYW_AFI_VALUE_ANY",
"afi_list : KEYW_ANY",
"export_term : export_factor ';'",
"export_term : '{' export_factor_list '}'",
"afi_export_factor : export_factor",
"afi_export_factor : KEYW_AFI afi_list export_factor",
"export_factor_list : export_factor ';'",
"export_factor_list : export_factor_list export_factor ';'",
"export_factor : export_peering_action_list KEYW_ANNOUNCE filter",
"export_peering_action_list : peering KEYW_TO peering opt_action",
"export_peering_action_list : export_peering_action_list peering KEYW_TO peering opt_action",
"peering : as_expr opt_router_expr opt_router_expr_with_at",
"peering : TKN_PRNGNAME",
"opt_action :",
"opt_action : KEYW_ACTION action",
"as_expr : as_expr OP_OR as_expr_term",
"as_expr : as_expr_term",
"as_expr_term : as_expr_term OP_AND as_expr_factor",
"as_expr_term : as_expr_term KEYW_EXCEPT as_expr_factor",
"as_expr_term : as_expr_factor",
"as_expr_factor : '(' as_expr ')'",
"as_expr_factor : as_expr_operand",
"as_expr_operand : TKN_ASNO",
"as_expr_operand : TKN_ASNAME",
"opt_router_expr :",
"opt_router_expr : router_expr",
"opt_router_expr_with_at :",
"opt_router_expr_with_at : KEYW_AT router_expr",
"router_expr : router_expr OP_OR router_expr_term",
"router_expr : router_expr_term",
"router_expr_term : router_expr_term OP_AND router_expr_factor",
"router_expr_term : router_expr_term KEYW_EXCEPT router_expr_factor",
"router_expr_term : router_expr_factor",
"router_expr_factor : '(' router_expr ')'",
"router_expr_factor : router_expr_operand",
"router_expr_operand : TKN_IPV4",
"router_expr_operand : TKN_IPV6",
"router_expr_operand : TKN_IPV6DC",
"router_expr_operand : domain_name",
"router_expr_operand : TKN_RTRSNAME",
"domain_name : TKN_DNS",
"domain_name : domain_name '.' TKN_DNS",
"action : rp_attribute ';'",
"action : action rp_attribute ';'",
"rp_attribute : pref",
"rp_attribute : med",
"rp_attribute : dpa",
"rp_attribute : aspath",
"rp_attribute : community",
"rp_attribute : next_hop",
"rp_attribute : cost",
"pref : TKN_PREF OP_EQUAL TKN_INT",
"med : TKN_MED OP_EQUAL TKN_INT",
"med : TKN_MED OP_EQUAL KEYW_IGP_COST",
"dpa : TKN_DPA OP_EQUAL TKN_INT",
"aspath : TKN_ASPATH '.' KEYW_PREPEND '(' asno_list ')'",
"asno_list : TKN_ASNO",
"asno_list : asno_list ',' TKN_ASNO",
"community : TKN_COMMUNITY OP_EQUAL community_list",
"community : TKN_COMMUNITY OP_APPEND community_list",
"community : TKN_COMMUNITY '.' KEYW_APPEND '(' community_elm_list ')'",
"community : TKN_COMMUNITY '.' KEYW_DELETE '(' community_elm_list ')'",
"community : TKN_COMMUNITY '.' KEYW_CONTAINS '(' community_elm_list ')'",
"community : TKN_COMMUNITY '(' community_elm_list ')'",
"community : TKN_COMMUNITY OP_COMPARE community_list",
"community_list : '{' community_elm_list '}'",
"community_elm_list : community_elm",
"community_elm_list : community_elm_list ',' community_elm",
"community_elm : KEYW_INTERNET",
"community_elm : KEYW_NO_EXPORT",
"community_elm : KEYW_NO_ADVERTISE",
"community_elm : TKN_INT",
"community_elm : TKN_COMM_NO",
"next_hop : TKN_NEXT_HOP OP_EQUAL TKN_IPV4",
"next_hop : TKN_NEXT_HOP OP_EQUAL TKN_IPV6",
"next_hop : TKN_NEXT_HOP OP_EQUAL TKN_IPV6DC",
"next_hop : TKN_NEXT_HOP OP_EQUAL KEYW_SELF",
"cost : TKN_COST OP_EQUAL TKN_INT",
"filter : filter OP_OR filter_term",
"filter : filter filter_term",
"filter : filter_term",
"filter_term : filter_term OP_AND filter_factor",
"filter_term : filter_factor",
"filter_factor : OP_NOT filter_factor",
"filter_factor : '(' filter ')'",
"filter_factor : filter_operand",
"filter_operand : KEYW_ANY",
"filter_operand : rp_attribute",
"filter_operand : '<' filter_aspath '>'",
"filter_operand : TKN_FLTRNAME",
"filter_operand : filter_prefix",
"filter_prefix : filter_prefix_operand OP_MS",
"filter_prefix : filter_prefix_operand",
"filter_prefix_operand : TKN_ASNO",
"filter_prefix_operand : KEYW_PEERAS",
"filter_prefix_operand : TKN_ASNAME",
"filter_prefix_operand : TKN_RSNAME",
"filter_prefix_operand : '{' opt_filter_prefix_list '}'",
"opt_filter_prefix_list :",
"opt_filter_prefix_list : filter_prefix_list",
"filter_prefix_list : filter_prefix_list_prefix",
"filter_prefix_list : filter_prefix_list ',' filter_prefix_list_prefix",
"filter_prefix_list_prefix : TKN_PRFXV4",
"filter_prefix_list_prefix : TKN_PRFXV6",
"filter_prefix_list_prefix : TKN_PRFXV6DC",
"filter_prefix_list_prefix : TKN_PRFXV4RNG",
"filter_prefix_list_prefix : TKN_PRFXV6RNG",
"filter_prefix_list_prefix : TKN_PRFXV6DCRNG",
"filter_aspath : filter_aspath '|' filter_aspath_term",
"filter_aspath : filter_aspath_term",
"filter_aspath_term : filter_aspath_term filter_aspath_closure",
"filter_aspath_term : filter_aspath_closure",
"filter_aspath_closure : filter_aspath_closure '*'",
"filter_aspath_closure : filter_aspath_closure '?'",
"filter_aspath_closure : filter_aspath_closure '+'",
"filter_aspath_closure : filter_aspath_closure ASPATH_POSTFIX",
"filter_aspath_closure : filter_aspath_factor",
"filter_aspath_factor : '^'",
"filter_aspath_factor : '$'",
"filter_aspath_factor : '(' filter_aspath ')'",
"filter_aspath_factor : filter_aspath_no",
"filter_aspath_no : TKN_ASNO",
"filter_aspath_no : KEYW_PEERAS",
"filter_aspath_no : TKN_ASNAME",
"filter_aspath_no : '.'",
"filter_aspath_no : '[' filter_aspath_range ']'",
"filter_aspath_no : '[' '^' filter_aspath_range ']'",
"filter_aspath_range :",
"filter_aspath_range : filter_aspath_range TKN_ASNO",
"filter_aspath_range : filter_aspath_range KEYW_PEERAS",
"filter_aspath_range : filter_aspath_range '.'",
"filter_aspath_range : filter_aspath_range TKN_ASNO '-' TKN_ASNO",
"filter_aspath_range : filter_aspath_range TKN_ASRANGE",
"filter_aspath_range : filter_aspath_range TKN_ASNAME",
};
//#line 313 "src/main/parser/byacc/export_via.y"
protected final Logger LOGGER = LoggerFactory.getLogger(ExportViaParser.class);
private ExportViaLexer lexer;
private int yylex () {
int yyl_return = -1;
try {
yyl_return = lexer.yylex();
}
catch (IOException e) {
LOGGER.error(e.getMessage(), e);
}
return yyl_return;
}
public void yyerror (String error) {
String errorMessage = (yylval.sval == null ? error : yylval.sval);
ParserHelper.parserError(errorMessage);
}
@Override
public Void parse(final String attributeValue) {
lexer = new ExportViaLexer(new StringReader(attributeValue), this);
final int result = yyparse();
if (result > 0) {
throw new IllegalArgumentException("Unexpected parse result: " + result);
}
return null;
}
//#line 679 "ExportViaParser.java"
//###############################################################
// method: yylexdebug : check lexer state
//###############################################################
void yylexdebug(int state,int ch)
{
String s=null;
if (ch < 0) ch=0;
if (ch <= YYMAXTOKEN) //check index bounds
s = yyname[ch]; //now get it
if (s==null)
s = "illegal-symbol";
debug("state "+state+", reading "+ch+" ("+s+")");
}
//The following are now global, to aid in error reporting
int yyn; //next next thing to do
int yym; //
int yystate; //current parsing state from state table
String yys; //current token string
//###############################################################
// method: yyparse : parse input and execute indicated items
//###############################################################
int yyparse()
{
boolean doaction;
init_stacks();
yynerrs = 0;
yyerrflag = 0;
yychar = -1; //impossible char forces a read
yystate=0; //initial state
state_push(yystate); //save it
val_push(yylval); //save empty value
while (true) //until parsing is done, either correctly, or w/error
{
doaction=true;
//if (yydebug) debug("loop");
//#### NEXT ACTION (from reduction table)
for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])
{
//if (yydebug) debug("yyn:"+yyn+" state:"+yystate+" yychar:"+yychar);
if (yychar < 0) //we want a char?
{
yychar = yylex(); //get next token
//if (yydebug) debug(" next yychar:"+yychar);
//#### ERROR CHECK ####
if (yychar < 0) //it it didn't work/error
{
yychar = 0; //change it to default string (no -1!)
//if (yydebug)
// yylexdebug(yystate,yychar);
}
}//yychar<0
yyn = yysindex[yystate]; //get amount to shift by (shift index)
if ((yyn != 0) && (yyn += yychar) >= 0 &&
yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
{
//if (yydebug)
//debug("state "+yystate+", shifting to state "+yytable[yyn]);
//#### NEXT STATE ####
yystate = yytable[yyn];//we are in a new state
state_push(yystate); //save it
val_push(yylval); //push our lval as the input for next rule
yychar = -1; //since we have 'eaten' a token, say we need another
if (yyerrflag > 0) //have we recovered an error?
--yyerrflag; //give ourselves credit
doaction=false; //but don't process yet
break; //quit the yyn=0 loop
}
yyn = yyrindex[yystate]; //reduce
if ((yyn !=0 ) && (yyn += yychar) >= 0 &&
yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
{ //we reduced!
//if (yydebug) debug("reduce");
yyn = yytable[yyn];
doaction=true; //get ready to execute
break; //drop down to actions
}
else //ERROR RECOVERY
{
if (yyerrflag==0)
{
yyerror("syntax error");
yynerrs++;
}
if (yyerrflag < 3) //low error count?
{
yyerrflag = 3;
while (true) //do until break
{
if (stateptr<0) //check for under & overflow here
{
yyerror("stack underflow. aborting..."); //note lower case 's'
return 1;
}
yyn = yysindex[state_peek(0)];
if ((yyn != 0) && (yyn += YYERRCODE) >= 0 &&
yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
{
//if (yydebug)
//debug("state "+state_peek(0)+", error recovery shifting to state "+yytable[yyn]+" ");
yystate = yytable[yyn];
state_push(yystate);
val_push(yylval);
doaction=false;
break;
}
else
{
//if (yydebug)
//debug("error recovery discarding state "+state_peek(0)+" ");
if (stateptr<0) //check for under & overflow here
{
yyerror("Stack underflow. aborting..."); //capital 'S'
return 1;
}
state_pop();
val_pop();
}
}
}
else //discard this token
{
if (yychar == 0)
return 1; //yyabort
//if (yydebug)
//{
//yys = null;
//if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
//if (yys == null) yys = "illegal-symbol";
//debug("state "+yystate+", error recovery discards token "+yychar+" ("+yys+")");
//}
yychar = -1; //read another
}
}//end error recovery
}//yyn=0 loop
if (!doaction) //any reason not to proceed?
continue; //skip action
yym = yylen[yyn]; //get count of terminals on rhs
//if (yydebug)
//debug("state "+yystate+", reducing "+yym+" by rule "+yyn+" ("+yyrule[yyn]+")");
if (yym>0) //if count of rhs not 'nil'
yyval = val_peek(yym-1); //get current semantic value
yyval = dup_yyval(yyval); //duplicate yyval if ParserVal is used as semantic value
switch(yyn)
{
//########## USER-SUPPLIED ACTIONS ##########
case 58:
//#line 144 "src/main/parser/byacc/export_via.y"
{
ParserHelper.checkStringLength(val_peek(0).sval, 255);
}
break;
case 71:
//#line 167 "src/main/parser/byacc/export_via.y"
{
ParserHelper.check16bit(val_peek(0).sval);
}
break;
case 72:
//#line 172 "src/main/parser/byacc/export_via.y"
{
ParserHelper.check16bit(val_peek(0).sval);
}
break;
case 74:
//#line 178 "src/main/parser/byacc/export_via.y"
{
ParserHelper.check16bit(val_peek(0).sval);
}
break;
case 91:
//#line 209 "src/main/parser/byacc/export_via.y"
{
ParserHelper.check32bit(val_peek(0).sval);
}
break;
case 97:
//#line 221 "src/main/parser/byacc/export_via.y"
{
ParserHelper.check16bit(val_peek(0).sval);
}
break;
//#line 864 "ExportViaParser.java"
//########## END OF USER-SUPPLIED ACTIONS ##########
}//switch
//#### Now let's reduce... ####
//if (yydebug) debug("reduce");
state_drop(yym); //we just reduced yylen states
yystate = state_peek(0); //get new state
val_drop(yym); //corresponding value drop
yym = yylhs[yyn]; //select next TERMINAL(on lhs)
if (yystate == 0 && yym == 0)//done? 'rest' state and at first TERMINAL
{
//if (yydebug) debug("After reduction, shifting from state 0 to state "+YYFINAL+"");
yystate = YYFINAL; //explicitly say we're done
state_push(YYFINAL); //and save it
val_push(yyval); //also save the semantic value of parsing
if (yychar < 0) //we want another character?
{
yychar = yylex(); //get next character
if (yychar<0) yychar=0; //clean, if necessary
//if (yydebug)
//yylexdebug(yystate,yychar);
}
if (yychar == 0) //Good exit (if lex returns 0 ;-)
break; //quit the loop--all DONE
}//if yystate
else //else not done yet
{ //get next state and push, for next yydefred[]
yyn = yygindex[yym]; //find out where to go
if ((yyn != 0) && (yyn += yystate) >= 0 &&
yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
yystate = yytable[yyn]; //get new state
else
yystate = yydgoto[yym]; //else go to new defred
//if (yydebug) debug("after reduction, shifting from state "+state_peek(0)+" to state "+yystate+"");
state_push(yystate); //going again, so push state & val...
val_push(yyval); //for next action
}
}//main loop
return 0;//yyaccept!!
}
//## end of method parse() ######################################
//## run() --- for Thread #######################################
//## The -Jnorun option was used ##
//## end of method run() ########################################
//## Constructors ###############################################
//## The -Jnoconstruct option was used ##
//###############################################################
}
//################### END OF CLASS ##############################