1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2025-10-16 23:47:46 +02:00

see #2247 better grammar to parse ipv6 addresses. Looks like I was able to build lexer rules to tokenize ipv6 addresses, yay!

This commit is contained in:
Vadim Kurland 2011-03-18 17:20:17 -07:00
parent bc669bf21e
commit d9e5fd7c0a
15 changed files with 5990 additions and 2010 deletions

View File

@ -7,7 +7,7 @@ FWB_MICRO_VERSION=0
# build number is like "nano" version number. I am incrementing build
# number during development cycle
#
BUILD_NUM="3502"
BUILD_NUM="3503"
VERSION="$FWB_MAJOR_VERSION.$FWB_MINOR_VERSION.$FWB_MICRO_VERSION.$BUILD_NUM"

View File

@ -1,2 +1,2 @@
#define VERSION "4.2.0.3502"
#define VERSION "4.2.0.3503"
#define GENERATION "4.2"

View File

@ -3,7 +3,7 @@
%define name fwbuilder
%define version 4.2.0.3502
%define version 4.2.0.3503
%define release 1
%if "%_vendor" == "MandrakeSoft"

View File

@ -4,6 +4,6 @@ Replaces: fwbuilder (<=4.1.1-1), fwbuilder-common, fwbuilder-bsd, fwbuilder-linu
Priority: extra
Section: checkinstall
Maintainer: vadim@fwbuilder.org
Version: 4.2.0.3502-1
Version: 4.2.0.3503-1
Depends: libqt4-gui (>= 4.3.0), libxml2, libxslt1.1, libsnmp | libsnmp15
Description: Firewall Builder GUI and policy compilers

View File

@ -1,6 +1,6 @@
%define name fwbuilder
%define version 4.2.0.3502
%define version 4.2.0.3503
%define release 1
%if "%_vendor" == "MandrakeSoft"

View File

@ -48,89 +48,89 @@ void PIXCfgLexer::initLiterals()
{
literals["name"] = 9;
literals["names"] = 8;
literals["ospf"] = 21;
literals["established"] = 67;
literals["mac-address"] = 81;
literals["nameif"] = 87;
literals["subnet"] = 32;
literals["controller"] = 70;
literals["object"] = 26;
literals["pcp"] = 22;
literals["remark"] = 94;
literals["access-list"] = 57;
literals["hostname"] = 55;
literals["hold-time"] = 79;
literals["ospf"] = 22;
literals["established"] = 68;
literals["mac-address"] = 82;
literals["nameif"] = 88;
literals["subnet"] = 33;
literals["controller"] = 71;
literals["object"] = 27;
literals["pcp"] = 23;
literals["remark"] = 95;
literals["access-list"] = 58;
literals["hostname"] = 56;
literals["hold-time"] = 80;
literals["community-list"] = 7;
literals["permit"] = 58;
literals["security-level"] = 86;
literals["no"] = 85;
literals["source"] = 39;
literals["igrp"] = 17;
literals["group-object"] = 42;
literals["pim"] = 23;
literals["nos"] = 20;
literals["ipinip"] = 18;
literals["permit"] = 59;
literals["security-level"] = 87;
literals["no"] = 86;
literals["source"] = 40;
literals["igrp"] = 18;
literals["group-object"] = 43;
literals["pim"] = 24;
literals["nos"] = 21;
literals["ipinip"] = 19;
literals["quit"] = 5;
literals["crypto"] = 49;
literals["protocol"] = 44;
literals["icmp-type"] = 46;
literals["PIX"] = 51;
literals["icmp-object"] = 47;
literals["exit"] = 96;
literals["nat"] = 28;
literals["object-group"] = 41;
literals["range"] = 31;
literals["service-object"] = 48;
literals["gre"] = 15;
literals["gt"] = 61;
literals["ah"] = 12;
literals["host"] = 30;
literals["secondary"] = 98;
literals["interface"] = 71;
literals["rip"] = 84;
literals["protocol-object"] = 45;
literals["standard"] = 101;
literals["network"] = 27;
literals["service"] = 33;
literals["vlan"] = 73;
literals["access"] = 93;
literals["multicast"] = 82;
literals["any"] = 64;
literals["dhcp"] = 90;
literals["speed"] = 74;
literals["deny"] = 59;
literals["neq"] = 63;
literals["address"] = 89;
literals["esp"] = 14;
literals["network-object"] = 43;
literals["shutdown"] = 88;
literals["delay"] = 78;
literals["certificate"] = 50;
literals["udp"] = 38;
literals["fragments"] = 68;
literals["eq"] = 60;
literals["destination"] = 40;
literals["duplex"] = 75;
literals["setroute"] = 99;
literals["crypto"] = 50;
literals["protocol"] = 45;
literals["icmp-type"] = 47;
literals["PIX"] = 52;
literals["icmp-object"] = 48;
literals["exit"] = 97;
literals["nat"] = 29;
literals["object-group"] = 42;
literals["range"] = 32;
literals["service-object"] = 49;
literals["gre"] = 16;
literals["gt"] = 62;
literals["ah"] = 13;
literals["host"] = 31;
literals["secondary"] = 99;
literals["interface"] = 72;
literals["rip"] = 85;
literals["protocol-object"] = 46;
literals["standard"] = 102;
literals["network"] = 28;
literals["service"] = 34;
literals["vlan"] = 74;
literals["access"] = 94;
literals["multicast"] = 83;
literals["any"] = 65;
literals["dhcp"] = 91;
literals["speed"] = 75;
literals["deny"] = 60;
literals["neq"] = 64;
literals["address"] = 90;
literals["esp"] = 15;
literals["network-object"] = 44;
literals["shutdown"] = 89;
literals["delay"] = 79;
literals["certificate"] = 51;
literals["udp"] = 39;
literals["fragments"] = 69;
literals["eq"] = 61;
literals["destination"] = 41;
literals["duplex"] = 76;
literals["setroute"] = 100;
literals["ip"] = 6;
literals["eigrp"] = 13;
literals["log-input"] = 66;
literals["switchport"] = 92;
literals["description"] = 29;
literals["extended"] = 100;
literals["igmp"] = 16;
literals["access-group"] = 95;
literals["ddns"] = 76;
literals["Version"] = 53;
literals["log"] = 65;
literals["forward"] = 77;
literals["ASA"] = 52;
literals["lt"] = 62;
literals["ipv6"] = 80;
literals["time-range"] = 69;
literals["standby"] = 91;
literals["icmp"] = 34;
literals["tcp"] = 37;
literals["eigrp"] = 14;
literals["log-input"] = 67;
literals["switchport"] = 93;
literals["description"] = 30;
literals["extended"] = 101;
literals["igmp"] = 17;
literals["access-group"] = 96;
literals["ddns"] = 77;
literals["Version"] = 54;
literals["log"] = 66;
literals["forward"] = 78;
literals["ASA"] = 53;
literals["lt"] = 63;
literals["ipv6"] = 81;
literals["time-range"] = 70;
literals["standby"] = 92;
literals["icmp"] = 35;
literals["tcp"] = 38;
}
ANTLR_USE_NAMESPACE(antlr)RefToken PIXCfgLexer::nextToken()
@ -149,6 +149,7 @@ ANTLR_USE_NAMESPACE(antlr)RefToken PIXCfgLexer::nextToken()
theRetToken=_returnToken;
break;
}
case 0x24 /* '$' */ :
case 0x30 /* '0' */ :
case 0x31 /* '1' */ :
case 0x32 /* '2' */ :
@ -159,18 +160,6 @@ ANTLR_USE_NAMESPACE(antlr)RefToken PIXCfgLexer::nextToken()
case 0x37 /* '7' */ :
case 0x38 /* '8' */ :
case 0x39 /* '9' */ :
{
mNUMBER(true);
theRetToken=_returnToken;
break;
}
case 0x2e /* '.' */ :
{
mDOT(true);
theRetToken=_returnToken;
break;
}
case 0x24 /* '$' */ :
case 0x41 /* 'A' */ :
case 0x42 /* 'B' */ :
case 0x43 /* 'C' */ :
@ -224,7 +213,13 @@ ANTLR_USE_NAMESPACE(antlr)RefToken PIXCfgLexer::nextToken()
case 0x79 /* 'y' */ :
case 0x7a /* 'z' */ :
{
mWORD(true);
mNUMBER(true);
theRetToken=_returnToken;
break;
}
case 0x2e /* '.' */ :
{
mDOT(true);
theRetToken=_returnToken;
break;
}
@ -449,11 +444,11 @@ void PIXCfgLexer::mLINE_COMMENT(bool _createToken) {
}
}
else {
goto _loop170;
goto _loop178;
}
}
_loop170:;
_loop178:;
} // ( ... )*
mNEWLINE(false);
if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
@ -485,9 +480,9 @@ void PIXCfgLexer::mNEWLINE(bool _createToken) {
}
if ( inputState->guessing==0 ) {
#line 1426 "pix.g"
#line 1475 "pix.g"
newline();
#line 491 "PIXCfgLexer.cpp"
#line 486 "PIXCfgLexer.cpp"
}
if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
_token = makeToken(_ttype);
@ -511,11 +506,11 @@ void PIXCfgLexer::mCOLON_COMMENT(bool _createToken) {
}
}
else {
goto _loop174;
goto _loop182;
}
}
_loop174:;
_loop182:;
} // ( ... )*
mNEWLINE(false);
if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
@ -609,9 +604,9 @@ void PIXCfgLexer::mWhitespace(bool _createToken) {
}
}
if ( inputState->guessing==0 ) {
#line 1421 "pix.g"
#line 1470 "pix.g"
_ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP;
#line 615 "PIXCfgLexer.cpp"
#line 610 "PIXCfgLexer.cpp"
}
if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
_token = makeToken(_ttype);
@ -679,36 +674,7 @@ void PIXCfgLexer::mHEXDIGIT(bool _createToken) {
_ttype = HEXDIGIT;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
switch ( LA(1)) {
case 0x30 /* '0' */ :
case 0x31 /* '1' */ :
case 0x32 /* '2' */ :
case 0x33 /* '3' */ :
case 0x34 /* '4' */ :
case 0x35 /* '5' */ :
case 0x36 /* '6' */ :
case 0x37 /* '7' */ :
case 0x38 /* '8' */ :
case 0x39 /* '9' */ :
{
matchRange('0','9');
break;
}
case 0x41 /* 'A' */ :
case 0x42 /* 'B' */ :
case 0x43 /* 'C' */ :
case 0x44 /* 'D' */ :
case 0x45 /* 'E' */ :
case 0x46 /* 'F' */ :
{
matchRange('A','F');
break;
}
default:
{
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
}
}
matchRange('a','f');
if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
_token = makeToken(_ttype);
_token->setText(text.substr(_begin, text.length()-_begin));
@ -723,156 +689,236 @@ void PIXCfgLexer::mNUMBER(bool _createToken) {
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
{
bool synPredMatched193 = false;
if ((((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ )) && (_tokenSet_2.member(LA(2))) && (_tokenSet_2.member(LA(3))) && (_tokenSet_2.member(LA(4))) && (_tokenSet_2.member(LA(5))) && (_tokenSet_2.member(LA(6))) && (_tokenSet_2.member(LA(7))) && (true) && (true) && (true))) {
int _m193 = mark();
synPredMatched193 = true;
bool synPredMatched230 = false;
if (((_tokenSet_2.member(LA(1))) && (_tokenSet_3.member(LA(2))) && (true))) {
int _m230 = mark();
synPredMatched230 = true;
inputState->guessing++;
try {
{
{ // ( ... )+
int _cnt188=0;
int _cnt229=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
switch ( LA(1)) {
case 0x61 /* 'a' */ :
case 0x62 /* 'b' */ :
case 0x63 /* 'c' */ :
case 0x64 /* 'd' */ :
case 0x65 /* 'e' */ :
case 0x66 /* 'f' */ :
{
matchRange('a','f');
break;
}
else {
if ( _cnt188>=1 ) { goto _loop188; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
case 0x30 /* '0' */ :
case 0x31 /* '1' */ :
case 0x32 /* '2' */ :
case 0x33 /* '3' */ :
case 0x34 /* '4' */ :
case 0x35 /* '5' */ :
case 0x36 /* '6' */ :
case 0x37 /* '7' */ :
case 0x38 /* '8' */ :
case 0x39 /* '9' */ :
{
matchRange('0','9');
break;
}
_cnt188++;
default:
{
if ( _cnt229>=1 ) { goto _loop229; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
}
_cnt229++;
}
_loop188:;
} // ( ... )+
mDOT(false);
{ // ( ... )+
int _cnt190=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt190>=1 ) { goto _loop190; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt190++;
}
_loop190:;
} // ( ... )+
mDOT(false);
{ // ( ... )+
int _cnt192=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt192>=1 ) { goto _loop192; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt192++;
}
_loop192:;
_loop229:;
} // ( ... )+
mCOLON(false);
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
synPredMatched193 = false;
synPredMatched230 = false;
}
rewind(_m193);
rewind(_m230);
inputState->guessing--;
}
if ( synPredMatched193 ) {
if ( synPredMatched230 ) {
{
{
{ // ( ... )+
int _cnt196=0;
int _cnt234=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
switch ( LA(1)) {
case 0x61 /* 'a' */ :
case 0x62 /* 'b' */ :
case 0x63 /* 'c' */ :
case 0x64 /* 'd' */ :
case 0x65 /* 'e' */ :
case 0x66 /* 'f' */ :
{
matchRange('a','f');
break;
}
else {
if ( _cnt196>=1 ) { goto _loop196; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
case 0x30 /* '0' */ :
case 0x31 /* '1' */ :
case 0x32 /* '2' */ :
case 0x33 /* '3' */ :
case 0x34 /* '4' */ :
case 0x35 /* '5' */ :
case 0x36 /* '6' */ :
case 0x37 /* '7' */ :
case 0x38 /* '8' */ :
case 0x39 /* '9' */ :
{
matchRange('0','9');
break;
}
_cnt196++;
default:
{
if ( _cnt234>=1 ) { goto _loop234; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
}
_cnt234++;
}
_loop196:;
_loop234:;
} // ( ... )+
mDOT(false);
{ // ( ... )+
int _cnt198=0;
int _cnt238=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
if ((LA(1) == 0x3a /* ':' */ )) {
mCOLON(false);
{ // ( ... )*
for (;;) {
switch ( LA(1)) {
case 0x61 /* 'a' */ :
case 0x62 /* 'b' */ :
case 0x63 /* 'c' */ :
case 0x64 /* 'd' */ :
case 0x65 /* 'e' */ :
case 0x66 /* 'f' */ :
{
matchRange('a','f');
break;
}
case 0x30 /* '0' */ :
case 0x31 /* '1' */ :
case 0x32 /* '2' */ :
case 0x33 /* '3' */ :
case 0x34 /* '4' */ :
case 0x35 /* '5' */ :
case 0x36 /* '6' */ :
case 0x37 /* '7' */ :
case 0x38 /* '8' */ :
case 0x39 /* '9' */ :
{
matchRange('0','9');
break;
}
default:
{
goto _loop237;
}
}
}
_loop237:;
} // ( ... )*
}
else {
if ( _cnt198>=1 ) { goto _loop198; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
if ( _cnt238>=1 ) { goto _loop238; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt198++;
_cnt238++;
}
_loop198:;
} // ( ... )+
mDOT(false);
{ // ( ... )+
int _cnt200=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt200>=1 ) { goto _loop200; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt200++;
}
_loop200:;
} // ( ... )+
mDOT(false);
{ // ( ... )+
int _cnt202=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt202>=1 ) { goto _loop202; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt202++;
}
_loop202:;
_loop238:;
} // ( ... )+
}
if ( inputState->guessing==0 ) {
#line 1446 "pix.g"
_ttype = IPV4;
#line 851 "PIXCfgLexer.cpp"
#line 1509 "pix.g"
_ttype = IPV6;
#line 839 "PIXCfgLexer.cpp"
}
}
}
else {
bool synPredMatched208 = false;
if ((((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ )) && (_tokenSet_2.member(LA(2))) && (_tokenSet_2.member(LA(3))) && (true) && (true) && (true) && (true) && (true) && (true) && (true))) {
int _m208 = mark();
synPredMatched208 = true;
bool synPredMatched195 = false;
if ((((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ )) && (true) && (true))) {
int _m195 = mark();
synPredMatched195 = true;
inputState->guessing++;
try {
{
{ // ( ... )+
int _cnt205=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt205>=1 ) { goto _loop205; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt205++;
mDIGIT(false);
}
_loop205:;
} // ( ... )+
mDOT(false);
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
synPredMatched195 = false;
}
rewind(_m195);
inputState->guessing--;
}
if ( synPredMatched195 ) {
{
bool synPredMatched204 = false;
if ((((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ )) && (_tokenSet_4.member(LA(2))) && (_tokenSet_4.member(LA(3))))) {
int _m204 = mark();
synPredMatched204 = true;
inputState->guessing++;
try {
{
{ // ( ... )+
int _cnt199=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt199>=1 ) { goto _loop199; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt199++;
}
_loop199:;
} // ( ... )+
mDOT(false);
{ // ( ... )+
int _cnt201=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt201>=1 ) { goto _loop201; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt201++;
}
_loop201:;
} // ( ... )+
mDOT(false);
{ // ( ... )+
int _cnt203=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt203>=1 ) { goto _loop203; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt203++;
}
_loop203:;
} // ( ... )+
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
synPredMatched204 = false;
}
rewind(_m204);
inputState->guessing--;
}
if ( synPredMatched204 ) {
{
{ // ( ... )+
int _cnt207=0;
for (;;) {
@ -887,91 +933,400 @@ void PIXCfgLexer::mNUMBER(bool _createToken) {
}
_loop207:;
} // ( ... )+
mDOT(false);
{ // ( ... )+
int _cnt209=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt209>=1 ) { goto _loop209; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt209++;
}
_loop209:;
} // ( ... )+
mDOT(false);
{ // ( ... )+
int _cnt211=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt211>=1 ) { goto _loop211; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt211++;
}
_loop211:;
} // ( ... )+
mDOT(false);
{ // ( ... )+
int _cnt213=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt213>=1 ) { goto _loop213; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt213++;
}
_loop213:;
} // ( ... )+
}
if ( inputState->guessing==0 ) {
#line 1498 "pix.g"
_ttype = IPV4;
#line 986 "PIXCfgLexer.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
synPredMatched208 = false;
else {
bool synPredMatched219 = false;
if ((((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ )) && (_tokenSet_4.member(LA(2))) && (_tokenSet_4.member(LA(3))))) {
int _m219 = mark();
synPredMatched219 = true;
inputState->guessing++;
try {
{
{ // ( ... )+
int _cnt216=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt216>=1 ) { goto _loop216; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt216++;
}
_loop216:;
} // ( ... )+
mDOT(false);
{ // ( ... )+
int _cnt218=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt218>=1 ) { goto _loop218; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt218++;
}
_loop218:;
} // ( ... )+
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe) {
synPredMatched219 = false;
}
rewind(_m219);
inputState->guessing--;
}
if ( synPredMatched219 ) {
{
{ // ( ... )+
int _cnt222=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt222>=1 ) { goto _loop222; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt222++;
}
_loop222:;
} // ( ... )+
mDOT(false);
{ // ( ... )+
int _cnt224=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt224>=1 ) { goto _loop224; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt224++;
}
_loop224:;
} // ( ... )+
}
}
else if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ )) && (true) && (true)) {
{ // ( ... )+
int _cnt226=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt226>=1 ) { goto _loop226; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt226++;
}
_loop226:;
} // ( ... )+
if ( inputState->guessing==0 ) {
#line 1502 "pix.g"
_ttype = INT_CONST;
#line 1085 "PIXCfgLexer.cpp"
}
}
else {
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
}
}
}
rewind(_m208);
inputState->guessing--;
}
if ( synPredMatched208 ) {
else if ((_tokenSet_5.member(LA(1))) && (true) && (true)) {
{
{ // ( ... )+
int _cnt211=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt211>=1 ) { goto _loop211; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt211++;
}
_loop211:;
} // ( ... )+
mDOT(false);
{ // ( ... )+
int _cnt213=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt213>=1 ) { goto _loop213; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt213++;
}
_loop213:;
} // ( ... )+
}
}
else if ((LA(1) == 0x30 /* '0' */ ) && (LA(2) == 0x78 /* 'x' */ )) {
switch ( LA(1)) {
case 0x61 /* 'a' */ :
case 0x62 /* 'b' */ :
case 0x63 /* 'c' */ :
case 0x64 /* 'd' */ :
case 0x65 /* 'e' */ :
case 0x66 /* 'f' */ :
case 0x67 /* 'g' */ :
case 0x68 /* 'h' */ :
case 0x69 /* 'i' */ :
case 0x6a /* 'j' */ :
case 0x6b /* 'k' */ :
case 0x6c /* 'l' */ :
case 0x6d /* 'm' */ :
case 0x6e /* 'n' */ :
case 0x6f /* 'o' */ :
case 0x70 /* 'p' */ :
case 0x71 /* 'q' */ :
case 0x72 /* 'r' */ :
case 0x73 /* 's' */ :
case 0x74 /* 't' */ :
case 0x75 /* 'u' */ :
case 0x76 /* 'v' */ :
case 0x77 /* 'w' */ :
case 0x78 /* 'x' */ :
case 0x79 /* 'y' */ :
case 0x7a /* 'z' */ :
{
match('0' /* charlit */ );
match('x' /* charlit */ );
{ // ( ... )+
int _cnt218=0;
matchRange('a','z');
break;
}
case 0x41 /* 'A' */ :
case 0x42 /* 'B' */ :
case 0x43 /* 'C' */ :
case 0x44 /* 'D' */ :
case 0x45 /* 'E' */ :
case 0x46 /* 'F' */ :
case 0x47 /* 'G' */ :
case 0x48 /* 'H' */ :
case 0x49 /* 'I' */ :
case 0x4a /* 'J' */ :
case 0x4b /* 'K' */ :
case 0x4c /* 'L' */ :
case 0x4d /* 'M' */ :
case 0x4e /* 'N' */ :
case 0x4f /* 'O' */ :
case 0x50 /* 'P' */ :
case 0x51 /* 'Q' */ :
case 0x52 /* 'R' */ :
case 0x53 /* 'S' */ :
case 0x54 /* 'T' */ :
case 0x55 /* 'U' */ :
case 0x56 /* 'V' */ :
case 0x57 /* 'W' */ :
case 0x58 /* 'X' */ :
case 0x59 /* 'Y' */ :
case 0x5a /* 'Z' */ :
{
matchRange('A','Z');
break;
}
case 0x24 /* '$' */ :
{
match('$' /* charlit */ );
break;
}
default:
{
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
}
}
}
{ // ( ... )*
for (;;) {
if ((_tokenSet_3.member(LA(1)))) {
mHEXDIGIT(false);
switch ( LA(1)) {
case 0x21 /* '!' */ :
case 0x22 /* '\"' */ :
case 0x23 /* '#' */ :
case 0x24 /* '$' */ :
case 0x25 /* '%' */ :
case 0x26 /* '&' */ :
case 0x27 /* '\'' */ :
case 0x28 /* '(' */ :
case 0x29 /* ')' */ :
case 0x2a /* '*' */ :
case 0x2b /* '+' */ :
case 0x2c /* ',' */ :
case 0x2d /* '-' */ :
case 0x2e /* '.' */ :
case 0x2f /* '/' */ :
{
matchRange('!','/');
break;
}
case 0x30 /* '0' */ :
case 0x31 /* '1' */ :
case 0x32 /* '2' */ :
case 0x33 /* '3' */ :
case 0x34 /* '4' */ :
case 0x35 /* '5' */ :
case 0x36 /* '6' */ :
case 0x37 /* '7' */ :
case 0x38 /* '8' */ :
case 0x39 /* '9' */ :
{
matchRange('0','9');
break;
}
case 0x3a /* ':' */ :
{
match(':' /* charlit */ );
break;
}
case 0x3b /* ';' */ :
{
match(';' /* charlit */ );
break;
}
case 0x3c /* '<' */ :
{
match('<' /* charlit */ );
break;
}
case 0x3d /* '=' */ :
{
match('=' /* charlit */ );
break;
}
case 0x3e /* '>' */ :
{
match('>' /* charlit */ );
break;
}
case 0x3f /* '?' */ :
{
match('?' /* charlit */ );
break;
}
case 0x40 /* '@' */ :
{
match('@' /* charlit */ );
break;
}
case 0x41 /* 'A' */ :
case 0x42 /* 'B' */ :
case 0x43 /* 'C' */ :
case 0x44 /* 'D' */ :
case 0x45 /* 'E' */ :
case 0x46 /* 'F' */ :
case 0x47 /* 'G' */ :
case 0x48 /* 'H' */ :
case 0x49 /* 'I' */ :
case 0x4a /* 'J' */ :
case 0x4b /* 'K' */ :
case 0x4c /* 'L' */ :
case 0x4d /* 'M' */ :
case 0x4e /* 'N' */ :
case 0x4f /* 'O' */ :
case 0x50 /* 'P' */ :
case 0x51 /* 'Q' */ :
case 0x52 /* 'R' */ :
case 0x53 /* 'S' */ :
case 0x54 /* 'T' */ :
case 0x55 /* 'U' */ :
case 0x56 /* 'V' */ :
case 0x57 /* 'W' */ :
case 0x58 /* 'X' */ :
case 0x59 /* 'Y' */ :
case 0x5a /* 'Z' */ :
{
matchRange('A','Z');
break;
}
case 0x5c /* '\\' */ :
{
match('\\' /* charlit */ );
break;
}
case 0x5e /* '^' */ :
{
match('^' /* charlit */ );
break;
}
case 0x5f /* '_' */ :
{
match('_' /* charlit */ );
break;
}
case 0x60 /* '`' */ :
{
match('`' /* charlit */ );
break;
}
case 0x61 /* 'a' */ :
case 0x62 /* 'b' */ :
case 0x63 /* 'c' */ :
case 0x64 /* 'd' */ :
case 0x65 /* 'e' */ :
case 0x66 /* 'f' */ :
case 0x67 /* 'g' */ :
case 0x68 /* 'h' */ :
case 0x69 /* 'i' */ :
case 0x6a /* 'j' */ :
case 0x6b /* 'k' */ :
case 0x6c /* 'l' */ :
case 0x6d /* 'm' */ :
case 0x6e /* 'n' */ :
case 0x6f /* 'o' */ :
case 0x70 /* 'p' */ :
case 0x71 /* 'q' */ :
case 0x72 /* 'r' */ :
case 0x73 /* 's' */ :
case 0x74 /* 't' */ :
case 0x75 /* 'u' */ :
case 0x76 /* 'v' */ :
case 0x77 /* 'w' */ :
case 0x78 /* 'x' */ :
case 0x79 /* 'y' */ :
case 0x7a /* 'z' */ :
{
matchRange('a','z');
break;
}
default:
{
goto _loop241;
}
else {
if ( _cnt218>=1 ) { goto _loop218; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt218++;
}
_loop218:;
} // ( ... )+
}
_loop241:;
} // ( ... )*
if ( inputState->guessing==0 ) {
#line 1452 "pix.g"
_ttype = HEX_CONST;
#line 954 "PIXCfgLexer.cpp"
}
}
else if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ )) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true) && (true)) {
{ // ( ... )+
int _cnt215=0;
for (;;) {
if (((LA(1) >= 0x30 /* '0' */ && LA(1) <= 0x39 /* '9' */ ))) {
mDIGIT(false);
}
else {
if ( _cnt215>=1 ) { goto _loop215; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());}
}
_cnt215++;
}
_loop215:;
} // ( ... )+
if ( inputState->guessing==0 ) {
#line 1450 "pix.g"
_ttype = INT_CONST;
#line 975 "PIXCfgLexer.cpp"
#line 1515 "pix.g"
_ttype = WORD;
#line 1330 "PIXCfgLexer.cpp"
}
}
else {
@ -1001,251 +1356,6 @@ void PIXCfgLexer::mDOT(bool _createToken) {
_saveIndex=0;
}
void PIXCfgLexer::mWORD(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = WORD;
ANTLR_USE_NAMESPACE(std)string::size_type _saveIndex;
{
switch ( LA(1)) {
case 0x61 /* 'a' */ :
case 0x62 /* 'b' */ :
case 0x63 /* 'c' */ :
case 0x64 /* 'd' */ :
case 0x65 /* 'e' */ :
case 0x66 /* 'f' */ :
case 0x67 /* 'g' */ :
case 0x68 /* 'h' */ :
case 0x69 /* 'i' */ :
case 0x6a /* 'j' */ :
case 0x6b /* 'k' */ :
case 0x6c /* 'l' */ :
case 0x6d /* 'm' */ :
case 0x6e /* 'n' */ :
case 0x6f /* 'o' */ :
case 0x70 /* 'p' */ :
case 0x71 /* 'q' */ :
case 0x72 /* 'r' */ :
case 0x73 /* 's' */ :
case 0x74 /* 't' */ :
case 0x75 /* 'u' */ :
case 0x76 /* 'v' */ :
case 0x77 /* 'w' */ :
case 0x78 /* 'x' */ :
case 0x79 /* 'y' */ :
case 0x7a /* 'z' */ :
{
matchRange('a','z');
break;
}
case 0x41 /* 'A' */ :
case 0x42 /* 'B' */ :
case 0x43 /* 'C' */ :
case 0x44 /* 'D' */ :
case 0x45 /* 'E' */ :
case 0x46 /* 'F' */ :
case 0x47 /* 'G' */ :
case 0x48 /* 'H' */ :
case 0x49 /* 'I' */ :
case 0x4a /* 'J' */ :
case 0x4b /* 'K' */ :
case 0x4c /* 'L' */ :
case 0x4d /* 'M' */ :
case 0x4e /* 'N' */ :
case 0x4f /* 'O' */ :
case 0x50 /* 'P' */ :
case 0x51 /* 'Q' */ :
case 0x52 /* 'R' */ :
case 0x53 /* 'S' */ :
case 0x54 /* 'T' */ :
case 0x55 /* 'U' */ :
case 0x56 /* 'V' */ :
case 0x57 /* 'W' */ :
case 0x58 /* 'X' */ :
case 0x59 /* 'Y' */ :
case 0x5a /* 'Z' */ :
{
matchRange('A','Z');
break;
}
case 0x24 /* '$' */ :
{
match('$' /* charlit */ );
break;
}
default:
{
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltForCharException(LA(1), getFilename(), getLine(), getColumn());
}
}
}
{ // ( ... )*
for (;;) {
switch ( LA(1)) {
case 0x21 /* '!' */ :
case 0x22 /* '\"' */ :
case 0x23 /* '#' */ :
case 0x24 /* '$' */ :
case 0x25 /* '%' */ :
case 0x26 /* '&' */ :
case 0x27 /* '\'' */ :
case 0x28 /* '(' */ :
case 0x29 /* ')' */ :
case 0x2a /* '*' */ :
case 0x2b /* '+' */ :
case 0x2c /* ',' */ :
case 0x2d /* '-' */ :
case 0x2e /* '.' */ :
case 0x2f /* '/' */ :
{
matchRange('!','/');
break;
}
case 0x30 /* '0' */ :
case 0x31 /* '1' */ :
case 0x32 /* '2' */ :
case 0x33 /* '3' */ :
case 0x34 /* '4' */ :
case 0x35 /* '5' */ :
case 0x36 /* '6' */ :
case 0x37 /* '7' */ :
case 0x38 /* '8' */ :
case 0x39 /* '9' */ :
{
matchRange('0','9');
break;
}
case 0x3a /* ':' */ :
{
match(':' /* charlit */ );
break;
}
case 0x3b /* ';' */ :
{
match(';' /* charlit */ );
break;
}
case 0x3c /* '<' */ :
{
match('<' /* charlit */ );
break;
}
case 0x3d /* '=' */ :
{
match('=' /* charlit */ );
break;
}
case 0x3e /* '>' */ :
{
match('>' /* charlit */ );
break;
}
case 0x3f /* '?' */ :
{
match('?' /* charlit */ );
break;
}
case 0x40 /* '@' */ :
{
match('@' /* charlit */ );
break;
}
case 0x41 /* 'A' */ :
case 0x42 /* 'B' */ :
case 0x43 /* 'C' */ :
case 0x44 /* 'D' */ :
case 0x45 /* 'E' */ :
case 0x46 /* 'F' */ :
case 0x47 /* 'G' */ :
case 0x48 /* 'H' */ :
case 0x49 /* 'I' */ :
case 0x4a /* 'J' */ :
case 0x4b /* 'K' */ :
case 0x4c /* 'L' */ :
case 0x4d /* 'M' */ :
case 0x4e /* 'N' */ :
case 0x4f /* 'O' */ :
case 0x50 /* 'P' */ :
case 0x51 /* 'Q' */ :
case 0x52 /* 'R' */ :
case 0x53 /* 'S' */ :
case 0x54 /* 'T' */ :
case 0x55 /* 'U' */ :
case 0x56 /* 'V' */ :
case 0x57 /* 'W' */ :
case 0x58 /* 'X' */ :
case 0x59 /* 'Y' */ :
case 0x5a /* 'Z' */ :
{
matchRange('A','Z');
break;
}
case 0x5c /* '\\' */ :
{
match('\\' /* charlit */ );
break;
}
case 0x5e /* '^' */ :
{
match('^' /* charlit */ );
break;
}
case 0x5f /* '_' */ :
{
match('_' /* charlit */ );
break;
}
case 0x60 /* '`' */ :
{
match('`' /* charlit */ );
break;
}
case 0x61 /* 'a' */ :
case 0x62 /* 'b' */ :
case 0x63 /* 'c' */ :
case 0x64 /* 'd' */ :
case 0x65 /* 'e' */ :
case 0x66 /* 'f' */ :
case 0x67 /* 'g' */ :
case 0x68 /* 'h' */ :
case 0x69 /* 'i' */ :
case 0x6a /* 'j' */ :
case 0x6b /* 'k' */ :
case 0x6c /* 'l' */ :
case 0x6d /* 'm' */ :
case 0x6e /* 'n' */ :
case 0x6f /* 'o' */ :
case 0x70 /* 'p' */ :
case 0x71 /* 'q' */ :
case 0x72 /* 'r' */ :
case 0x73 /* 's' */ :
case 0x74 /* 't' */ :
case 0x75 /* 'u' */ :
case 0x76 /* 'v' */ :
case 0x77 /* 'w' */ :
case 0x78 /* 'x' */ :
case 0x79 /* 'y' */ :
case 0x7a /* 'z' */ :
{
matchRange('a','z');
break;
}
default:
{
goto _loop222;
}
}
}
_loop222:;
} // ( ... )*
if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
_token = makeToken(_ttype);
_token->setText(text.substr(_begin, text.length()-_begin));
}
_returnToken = _token;
_saveIndex=0;
}
void PIXCfgLexer::mSTRING(bool _createToken) {
int _ttype; ANTLR_USE_NAMESPACE(antlr)RefToken _token; ANTLR_USE_NAMESPACE(std)string::size_type _begin = text.length();
_ttype = STRING;
@ -1254,15 +1364,15 @@ void PIXCfgLexer::mSTRING(bool _createToken) {
match('\"' /* charlit */ );
{ // ( ... )*
for (;;) {
if ((_tokenSet_4.member(LA(1)))) {
if ((_tokenSet_6.member(LA(1)))) {
matchNot('\"' /* charlit */ );
}
else {
goto _loop225;
goto _loop244;
}
}
_loop225:;
_loop244:;
} // ( ... )*
match('\"' /* charlit */ );
if ( _createToken && _token==ANTLR_USE_NAMESPACE(antlr)nullToken && _ttype!=ANTLR_USE_NAMESPACE(antlr)Token::SKIP ) {
@ -1641,7 +1751,7 @@ void PIXCfgLexer::mEXLAMATION(bool _createToken) {
const unsigned long PIXCfgLexer::_tokenSet_0_data_[] = { 4294958072UL, 1UL, 0UL, 2147483648UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xe 0xf 0x10 0x11 0x12 0x13 0x14
// 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x7f 0x80 0x81
// 0x82 0x83 0x84 0x85 0x86
// 0x82 0x83 0x84 0x85 0x86 0x87
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgLexer::_tokenSet_0(_tokenSet_0_data_,16);
const unsigned long PIXCfgLexer::_tokenSet_1_data_[] = { 4294958072UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xb 0xc 0xe 0xf 0x10 0x11 0x12 0x13 0x14
@ -1649,20 +1759,27 @@ const unsigned long PIXCfgLexer::_tokenSet_1_data_[] = { 4294958072UL, 429496729
// & \' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G
// H I J K L M N O P Q R S T U V W X Y Z [ 0x5c ] ^ _ ` a b c d e f g h
// i j k l m n o p q r s t u v w x y z { | } ~ 0x7f 0x80 0x81 0x82 0x83
// 0x84 0x85 0x86
// 0x84 0x85 0x86 0x87
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgLexer::_tokenSet_1(_tokenSet_1_data_,16);
const unsigned long PIXCfgLexer::_tokenSet_2_data_[] = { 0UL, 67059712UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// . 0 1 2 3 4 5 6 7 8 9
const unsigned long PIXCfgLexer::_tokenSet_2_data_[] = { 0UL, 67043328UL, 0UL, 126UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// 0 1 2 3 4 5 6 7 8 9 a b c d e f
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgLexer::_tokenSet_2(_tokenSet_2_data_,10);
const unsigned long PIXCfgLexer::_tokenSet_3_data_[] = { 0UL, 67043328UL, 126UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
const unsigned long PIXCfgLexer::_tokenSet_3_data_[] = { 0UL, 134152192UL, 0UL, 126UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// 0 1 2 3 4 5 6 7 8 9 : a b c d e f
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgLexer::_tokenSet_3(_tokenSet_3_data_,10);
const unsigned long PIXCfgLexer::_tokenSet_4_data_[] = { 4294967288UL, 4294967291UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
const unsigned long PIXCfgLexer::_tokenSet_4_data_[] = { 0UL, 67059712UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// . 0 1 2 3 4 5 6 7 8 9
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgLexer::_tokenSet_4(_tokenSet_4_data_,10);
const unsigned long PIXCfgLexer::_tokenSet_5_data_[] = { 0UL, 16UL, 134217726UL, 134217726UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// $ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g
// h i j k l m n o p q r s t u v w x y z
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgLexer::_tokenSet_5(_tokenSet_5_data_,10);
const unsigned long PIXCfgLexer::_tokenSet_6_data_[] = { 4294967288UL, 4294967291UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x11 0x12 0x13
// 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f ! # $
// % & \' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F
// G H I J K L M N O P Q R S T U V W X Y Z [ 0x5c ] ^ _ ` a b c d e f g
// h i j k l m n o p q r s t u v w x y z { | } ~ 0x7f 0x80 0x81 0x82 0x83
// 0x84 0x85 0x86
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgLexer::_tokenSet_4(_tokenSet_4_data_,16);
// 0x84 0x85 0x86 0x87
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgLexer::_tokenSet_6(_tokenSet_6_data_,16);

View File

@ -58,7 +58,6 @@ public:
protected: void mHEXDIGIT(bool _createToken);
public: void mNUMBER(bool _createToken);
public: void mDOT(bool _createToken);
public: void mWORD(bool _createToken);
public: void mSTRING(bool _createToken);
public: void mPIPE_CHAR(bool _createToken);
public: void mNUMBER_SIGN(bool _createToken);
@ -98,6 +97,10 @@ private:
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_3;
static const unsigned long _tokenSet_4_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_4;
static const unsigned long _tokenSet_5_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_5;
static const unsigned long _tokenSet_6_data_[];
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_6;
};
#endif /*INC_PIXCfgLexer_hpp_*/

View File

@ -40,9 +40,13 @@ The lexer nextToken rule is synthesized from all of the user-defined
lexer rules. It logically consists of one big alternative block with
each user-defined rule being an alternative.
The grammar analyzer has determined that the synthesized
nextToken rule is non-deterministic (i.e., it has ambiguities)
This means that there is some overlap of the character
lookahead for two or more of your lexer rules.
Start of an alternative block.
The lookahead set for this block is:
{
k==1: {
'\u0003', '\u0004', '\u0005', '\u0006', '\u0007',
'\u0008', '\t', '\n', '\u000b', '\u000c', '\r',
'\u000e', '\u000f', '\u0010', '\u0011', '\u0012', '\u0013',
@ -86,11 +90,146 @@ Start of an alternative block.
'\u00f4', '\u00f5', '\u00f6', '\u00f7', '\u00f8', '\u00f9',
'\u00fa', '\u00fb', '\u00fc', '\u00fd', '\u00fe', '\u00ff'
}
k==2: {
'\u0003', '\u0004', '\u0005', '\u0006', '\u0007',
'\u0008', '\t', '\n', '\u000b', '\u000c', '\r',
'\u000e', '\u000f', '\u0010', '\u0011', '\u0012', '\u0013',
'\u0014', '\u0015', '\u0016', '\u0017', '\u0018', '\u0019',
'\u001a', '\u001b', '\u001c', '\u001d', '\u001e', '\u001f',
' ', '!', '"', '#', '$', '%',
'&', '\'', '(', ')', '*', '+',
',', '-', '.', '/', '0', '1',
'2', '3', '4', '5', '6', '7',
'8', '9', ':', ';', '<', '=',
'>', '?', '@', 'A', 'B', 'C',
'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O',
'P', 'Q', 'R', 'S', 'T', 'U',
'V', 'W', 'X', 'Y', 'Z', '[',
'\\', ']', '^', '_', '`', 'a',
'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's',
't', 'u', 'v', 'w', 'x', 'y',
'z', '{', '|', '}', '~', '\u007f',
'\u0080', '\u0081', '\u0082', '\u0083', '\u0084', '\u0085',
'\u0086', '\u0087', '\u0088', '\u0089', '\u008a', '\u008b',
'\u008c', '\u008d', '\u008e', '\u008f', '\u0090', '\u0091',
'\u0092', '\u0093', '\u0094', '\u0095', '\u0096', '\u0097',
'\u0098', '\u0099', '\u009a', '\u009b', '\u009c', '\u009d',
'\u009e', '\u009f', '\u00a0', '\u00a1', '\u00a2', '\u00a3',
'\u00a4', '\u00a5', '\u00a6', '\u00a7', '\u00a8', '\u00a9',
'\u00aa', '\u00ab', '\u00ac', '\u00ad', '\u00ae', '\u00af',
'\u00b0', '\u00b1', '\u00b2', '\u00b3', '\u00b4', '\u00b5',
'\u00b6', '\u00b7', '\u00b8', '\u00b9', '\u00ba', '\u00bb',
'\u00bc', '\u00bd', '\u00be', '\u00bf', '\u00c0', '\u00c1',
'\u00c2', '\u00c3', '\u00c4', '\u00c5', '\u00c6', '\u00c7',
'\u00c8', '\u00c9', '\u00ca', '\u00cb', '\u00cc', '\u00cd',
'\u00ce', '\u00cf', '\u00d0', '\u00d1', '\u00d2', '\u00d3',
'\u00d4', '\u00d5', '\u00d6', '\u00d7', '\u00d8', '\u00d9',
'\u00da', '\u00db', '\u00dc', '\u00dd', '\u00de', '\u00df',
'\u00e0', '\u00e1', '\u00e2', '\u00e3', '\u00e4', '\u00e5',
'\u00e6', '\u00e7', '\u00e8', '\u00e9', '\u00ea', '\u00eb',
'\u00ec', '\u00ed', '\u00ee', '\u00ef', '\u00f0', '\u00f1',
'\u00f2', '\u00f3', '\u00f4', '\u00f5', '\u00f6', '\u00f7',
'\u00f8', '\u00f9', '\u00fa', '\u00fb', '\u00fc', '\u00fd',
'\u00fe', '\u00ff'
}
k==3: {
'\u0003', '\u0004', '\u0005', '\u0006', '\u0007',
'\u0008', '\t', '\n', '\u000b', '\u000c', '\r',
'\u000e', '\u000f', '\u0010', '\u0011', '\u0012', '\u0013',
'\u0014', '\u0015', '\u0016', '\u0017', '\u0018', '\u0019',
'\u001a', '\u001b', '\u001c', '\u001d', '\u001e', '\u001f',
' ', '!', '"', '#', '$', '%',
'&', '\'', '(', ')', '*', '+',
',', '-', '.', '/', '0', '1',
'2', '3', '4', '5', '6', '7',
'8', '9', ':', ';', '<', '=',
'>', '?', '@', 'A', 'B', 'C',
'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O',
'P', 'Q', 'R', 'S', 'T', 'U',
'V', 'W', 'X', 'Y', 'Z', '[',
'\\', ']', '^', '_', '`', 'a',
'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's',
't', 'u', 'v', 'w', 'x', 'y',
'z', '{', '|', '}', '~', '\u007f',
'\u0080', '\u0081', '\u0082', '\u0083', '\u0084', '\u0085',
'\u0086', '\u0087', '\u0088', '\u0089', '\u008a', '\u008b',
'\u008c', '\u008d', '\u008e', '\u008f', '\u0090', '\u0091',
'\u0092', '\u0093', '\u0094', '\u0095', '\u0096', '\u0097',
'\u0098', '\u0099', '\u009a', '\u009b', '\u009c', '\u009d',
'\u009e', '\u009f', '\u00a0', '\u00a1', '\u00a2', '\u00a3',
'\u00a4', '\u00a5', '\u00a6', '\u00a7', '\u00a8', '\u00a9',
'\u00aa', '\u00ab', '\u00ac', '\u00ad', '\u00ae', '\u00af',
'\u00b0', '\u00b1', '\u00b2', '\u00b3', '\u00b4', '\u00b5',
'\u00b6', '\u00b7', '\u00b8', '\u00b9', '\u00ba', '\u00bb',
'\u00bc', '\u00bd', '\u00be', '\u00bf', '\u00c0', '\u00c1',
'\u00c2', '\u00c3', '\u00c4', '\u00c5', '\u00c6', '\u00c7',
'\u00c8', '\u00c9', '\u00ca', '\u00cb', '\u00cc', '\u00cd',
'\u00ce', '\u00cf', '\u00d0', '\u00d1', '\u00d2', '\u00d3',
'\u00d4', '\u00d5', '\u00d6', '\u00d7', '\u00d8', '\u00d9',
'\u00da', '\u00db', '\u00dc', '\u00dd', '\u00de', '\u00df',
'\u00e0', '\u00e1', '\u00e2', '\u00e3', '\u00e4', '\u00e5',
'\u00e6', '\u00e7', '\u00e8', '\u00e9', '\u00ea', '\u00eb',
'\u00ec', '\u00ed', '\u00ee', '\u00ef', '\u00f0', '\u00f1',
'\u00f2', '\u00f3', '\u00f4', '\u00f5', '\u00f6', '\u00f7',
'\u00f8', '\u00f9', '\u00fa', '\u00fb', '\u00fc', '\u00fd',
'\u00fe', '\u00ff'
}
This block has multiple alternatives:
Alternate(1) will be taken IF:
The lookahead set:
{ '!' }
k==1: {'!' }
k==2: {
'\u0003', '\u0004', '\u0005', '\u0006', '\u0007',
'\u0008', '\t', '\n', '\u000b', '\u000c', '\r',
'\u000e', '\u000f', '\u0010', '\u0011', '\u0012', '\u0013',
'\u0014', '\u0015', '\u0016', '\u0017', '\u0018', '\u0019',
'\u001a', '\u001b', '\u001c', '\u001d', '\u001e', '\u001f',
' ', '!', '"', '#', '$', '%',
'&', '\'', '(', ')', '*', '+',
',', '-', '.', '/', '0', '1',
'2', '3', '4', '5', '6', '7',
'8', '9', ':', ';', '<', '=',
'>', '?', '@', 'A', 'B', 'C',
'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O',
'P', 'Q', 'R', 'S', 'T', 'U',
'V', 'W', 'X', 'Y', 'Z', '[',
'\\', ']', '^', '_', '`', 'a',
'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's',
't', 'u', 'v', 'w', 'x', 'y',
'z', '{', '|', '}', '~', '\u007f',
'\u0080', '\u0081', '\u0082', '\u0083', '\u0084', '\u0085',
'\u0086', '\u0087', '\u0088', '\u0089', '\u008a', '\u008b',
'\u008c', '\u008d', '\u008e', '\u008f', '\u0090', '\u0091',
'\u0092', '\u0093', '\u0094', '\u0095', '\u0096', '\u0097',
'\u0098', '\u0099', '\u009a', '\u009b', '\u009c', '\u009d',
'\u009e', '\u009f', '\u00a0', '\u00a1', '\u00a2', '\u00a3',
'\u00a4', '\u00a5', '\u00a6', '\u00a7', '\u00a8', '\u00a9',
'\u00aa', '\u00ab', '\u00ac', '\u00ad', '\u00ae', '\u00af',
'\u00b0', '\u00b1', '\u00b2', '\u00b3', '\u00b4', '\u00b5',
'\u00b6', '\u00b7', '\u00b8', '\u00b9', '\u00ba', '\u00bb',
'\u00bc', '\u00bd', '\u00be', '\u00bf', '\u00c0', '\u00c1',
'\u00c2', '\u00c3', '\u00c4', '\u00c5', '\u00c6', '\u00c7',
'\u00c8', '\u00c9', '\u00ca', '\u00cb', '\u00cc', '\u00cd',
'\u00ce', '\u00cf', '\u00d0', '\u00d1', '\u00d2', '\u00d3',
'\u00d4', '\u00d5', '\u00d6', '\u00d7', '\u00d8', '\u00d9',
'\u00da', '\u00db', '\u00dc', '\u00dd', '\u00de', '\u00df',
'\u00e0', '\u00e1', '\u00e2', '\u00e3', '\u00e4', '\u00e5',
'\u00e6', '\u00e7', '\u00e8', '\u00e9', '\u00ea', '\u00eb',
'\u00ec', '\u00ed', '\u00ee', '\u00ef', '\u00f0', '\u00f1',
'\u00f2', '\u00f3', '\u00f4', '\u00f5', '\u00f6', '\u00f7',
'\u00f8', '\u00f9', '\u00fa', '\u00fb', '\u00fc', '\u00fd',
'\u00fe', '\u00ff'
}
is matched.
Rule Reference: mLINE_COMMENT
@ -101,6 +240,64 @@ Start of an alternative block.
Rule Reference: mNEWLINE
Otherwise, Alternate(3) will be taken IF:
The lookahead set:
k==1: {':' }
k==2: {
'\u0003', '\u0004', '\u0005', '\u0006', '\u0007',
'\u0008', '\t', '\n', '\u000b', '\u000c', '\r',
'\u000e', '\u000f', '\u0010', '\u0011', '\u0012', '\u0013',
'\u0014', '\u0015', '\u0016', '\u0017', '\u0018', '\u0019',
'\u001a', '\u001b', '\u001c', '\u001d', '\u001e', '\u001f',
' ', '!', '"', '#', '$', '%',
'&', '\'', '(', ')', '*', '+',
',', '-', '.', '/', '0', '1',
'2', '3', '4', '5', '6', '7',
'8', '9', ':', ';', '<', '=',
'>', '?', '@', 'A', 'B', 'C',
'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O',
'P', 'Q', 'R', 'S', 'T', 'U',
'V', 'W', 'X', 'Y', 'Z', '[',
'\\', ']', '^', '_', '`', 'a',
'b', 'c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's',
't', 'u', 'v', 'w', 'x', 'y',
'z', '{', '|', '}', '~', '\u007f',
'\u0080', '\u0081', '\u0082', '\u0083', '\u0084', '\u0085',
'\u0086', '\u0087', '\u0088', '\u0089', '\u008a', '\u008b',
'\u008c', '\u008d', '\u008e', '\u008f', '\u0090', '\u0091',
'\u0092', '\u0093', '\u0094', '\u0095', '\u0096', '\u0097',
'\u0098', '\u0099', '\u009a', '\u009b', '\u009c', '\u009d',
'\u009e', '\u009f', '\u00a0', '\u00a1', '\u00a2', '\u00a3',
'\u00a4', '\u00a5', '\u00a6', '\u00a7', '\u00a8', '\u00a9',
'\u00aa', '\u00ab', '\u00ac', '\u00ad', '\u00ae', '\u00af',
'\u00b0', '\u00b1', '\u00b2', '\u00b3', '\u00b4', '\u00b5',
'\u00b6', '\u00b7', '\u00b8', '\u00b9', '\u00ba', '\u00bb',
'\u00bc', '\u00bd', '\u00be', '\u00bf', '\u00c0', '\u00c1',
'\u00c2', '\u00c3', '\u00c4', '\u00c5', '\u00c6', '\u00c7',
'\u00c8', '\u00c9', '\u00ca', '\u00cb', '\u00cc', '\u00cd',
'\u00ce', '\u00cf', '\u00d0', '\u00d1', '\u00d2', '\u00d3',
'\u00d4', '\u00d5', '\u00d6', '\u00d7', '\u00d8', '\u00d9',
'\u00da', '\u00db', '\u00dc', '\u00dd', '\u00de', '\u00df',
'\u00e0', '\u00e1', '\u00e2', '\u00e3', '\u00e4', '\u00e5',
'\u00e6', '\u00e7', '\u00e8', '\u00e9', '\u00ea', '\u00eb',
'\u00ec', '\u00ed', '\u00ee', '\u00ef', '\u00f0', '\u00f1',
'\u00f2', '\u00f3', '\u00f4', '\u00f5', '\u00f6', '\u00f7',
'\u00f8', '\u00f9', '\u00fa', '\u00fb', '\u00fc', '\u00fd',
'\u00fe', '\u00ff'
}
is matched.
Rule Reference: mCOLON_COMMENT
Otherwise, Alternate(4) will be taken IF:
The lookahead set:
k==1: {':' }
k==2: { }
is matched.
Rule Reference: mCOLON
Otherwise, Alternate(5) will be taken IF:
The lookahead set:
{
'\u0003', '\u0004', '\u0005', '\u0006', '\u0007',
@ -134,24 +331,37 @@ Start of an alternative block.
is matched.
Rule Reference: mWhitespace
Otherwise, Alternate(4) will be taken IF:
Otherwise, Alternate(6) will be taken IF:
The lookahead set:
{
k==1: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
'5', '6', '7', '8', '9', 'a',
'b', 'c', 'd', 'e', 'f'
}
k==2: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9',
':', 'a', 'b', 'c', 'd', 'e',
'f'
}
k==3: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9',
':', 'a', 'b', 'c', 'd', 'e',
'f'
}
is matched.
Rule Reference: mNUMBER
Otherwise, Alternate(5) will be taken IF:
Otherwise, Alternate(7) will be taken IF:
The lookahead set:
{ '.' }
is matched.
Rule Reference: mDOT
Otherwise, Alternate(6) will be taken IF:
Otherwise, Alternate(8) will be taken IF:
The lookahead set:
{
k==1: {
'$', 'A', 'B', 'C', 'D',
'E', 'F', 'G', 'H', 'I', 'J',
'K', 'L', 'M', 'N', 'O', 'P',
@ -162,171 +372,206 @@ Start of an alternative block.
'o', 'p', 'q', 'r', 's', 't',
'u', 'v', 'w', 'x', 'y', 'z'
}
k==2: {
'!', '"', '#', '$', '%',
'&', '\'', '(', ')', '*', '+',
',', '-', '.', '/', '0', '1',
'2', '3', '4', '5', '6', '7',
'8', '9', ':', ';', '<', '=',
'>', '?', '@', 'A', 'B', 'C',
'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O',
'P', 'Q', 'R', 'S', 'T', 'U',
'V', 'W', 'X', 'Y', 'Z', '\\',
'^', '_', '`', 'a', 'b', 'c',
'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u',
'v', 'w', 'x', 'y', 'z'
}
k==3: {
'!', '"', '#', '$', '%',
'&', '\'', '(', ')', '*', '+',
',', '-', '.', '/', '0', '1',
'2', '3', '4', '5', '6', '7',
'8', '9', ':', ';', '<', '=',
'>', '?', '@', 'A', 'B', 'C',
'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O',
'P', 'Q', 'R', 'S', 'T', 'U',
'V', 'W', 'X', 'Y', 'Z', '\\',
'^', '_', '`', 'a', 'b', 'c',
'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u',
'v', 'w', 'x', 'y', 'z'
}
is matched.
Rule Reference: mWORD
Otherwise, Alternate(7) will be taken IF:
Otherwise, Alternate(9) will be taken IF:
The lookahead set:
{ '"' }
is matched.
Rule Reference: mSTRING
Otherwise, Alternate(8) will be taken IF:
Otherwise, Alternate(10) will be taken IF:
The lookahead set:
{ '|' }
is matched.
Rule Reference: mPIPE_CHAR
Otherwise, Alternate(9) will be taken IF:
Otherwise, Alternate(11) will be taken IF:
The lookahead set:
{ '#' }
is matched.
Rule Reference: mNUMBER_SIGN
Otherwise, Alternate(10) will be taken IF:
Otherwise, Alternate(12) will be taken IF:
The lookahead set:
{ '%' }
is matched.
Rule Reference: mPERCENT
Otherwise, Alternate(11) will be taken IF:
Otherwise, Alternate(13) will be taken IF:
The lookahead set:
{ '&' }
is matched.
Rule Reference: mAMPERSAND
Otherwise, Alternate(12) will be taken IF:
Otherwise, Alternate(14) will be taken IF:
The lookahead set:
{ '\'' }
is matched.
Rule Reference: mAPOSTROPHE
Otherwise, Alternate(13) will be taken IF:
Otherwise, Alternate(15) will be taken IF:
The lookahead set:
{ '(' }
is matched.
Rule Reference: mOPENING_PAREN
Otherwise, Alternate(14) will be taken IF:
Otherwise, Alternate(16) will be taken IF:
The lookahead set:
{ ')' }
is matched.
Rule Reference: mCLOSING_PAREN
Otherwise, Alternate(15) will be taken IF:
Otherwise, Alternate(17) will be taken IF:
The lookahead set:
{ '*' }
is matched.
Rule Reference: mSTAR
Otherwise, Alternate(16) will be taken IF:
Otherwise, Alternate(18) will be taken IF:
The lookahead set:
{ '+' }
is matched.
Rule Reference: mPLUS
Otherwise, Alternate(17) will be taken IF:
Otherwise, Alternate(19) will be taken IF:
The lookahead set:
{ ',' }
is matched.
Rule Reference: mCOMMA
Otherwise, Alternate(18) will be taken IF:
Otherwise, Alternate(20) will be taken IF:
The lookahead set:
{ '-' }
is matched.
Rule Reference: mMINUS
Otherwise, Alternate(19) will be taken IF:
Otherwise, Alternate(21) will be taken IF:
The lookahead set:
{ '/' }
is matched.
Rule Reference: mSLASH
Otherwise, Alternate(20) will be taken IF:
The lookahead set:
{ ':' }
is matched.
Rule Reference: mCOLON
Otherwise, Alternate(21) will be taken IF:
Otherwise, Alternate(22) will be taken IF:
The lookahead set:
{ ';' }
is matched.
Rule Reference: mSEMICOLON
Otherwise, Alternate(22) will be taken IF:
Otherwise, Alternate(23) will be taken IF:
The lookahead set:
{ '<' }
is matched.
Rule Reference: mLESS_THAN
Otherwise, Alternate(23) will be taken IF:
Otherwise, Alternate(24) will be taken IF:
The lookahead set:
{ '=' }
is matched.
Rule Reference: mEQUALS
Otherwise, Alternate(24) will be taken IF:
Otherwise, Alternate(25) will be taken IF:
The lookahead set:
{ '>' }
is matched.
Rule Reference: mGREATER_THAN
Otherwise, Alternate(25) will be taken IF:
Otherwise, Alternate(26) will be taken IF:
The lookahead set:
{ '?' }
is matched.
Rule Reference: mQUESTION
Otherwise, Alternate(26) will be taken IF:
Otherwise, Alternate(27) will be taken IF:
The lookahead set:
{ '@' }
is matched.
Rule Reference: mCOMMERCIAL_AT
Otherwise, Alternate(27) will be taken IF:
Otherwise, Alternate(28) will be taken IF:
The lookahead set:
{ '[' }
is matched.
Rule Reference: mOPENING_SQUARE
Otherwise, Alternate(28) will be taken IF:
Otherwise, Alternate(29) will be taken IF:
The lookahead set:
{ ']' }
is matched.
Rule Reference: mCLOSING_SQUARE
Otherwise, Alternate(29) will be taken IF:
Otherwise, Alternate(30) will be taken IF:
The lookahead set:
{ '^' }
is matched.
Rule Reference: mCARET
Otherwise, Alternate(30) will be taken IF:
Otherwise, Alternate(31) will be taken IF:
The lookahead set:
{ '_' }
is matched.
Rule Reference: mUNDERLINE
Otherwise, Alternate(31) will be taken IF:
Otherwise, Alternate(32) will be taken IF:
The lookahead set:
{ '{' }
is matched.
Rule Reference: mOPENING_BRACE
Otherwise, Alternate(32) will be taken IF:
Otherwise, Alternate(33) will be taken IF:
The lookahead set:
{ '}' }
is matched.
Rule Reference: mCLOSING_BRACE
Otherwise, Alternate(33) will be taken IF:
Otherwise, Alternate(34) will be taken IF:
The lookahead set:
{ '~' }
is matched.
Rule Reference: mTILDE
Otherwise, Alternate(35) will be taken IF:
The lookahead set:
k==1: {'!' }
k==2: { }
is matched.
Rule Reference: mEXLAMATION
OTHERWISE, a NoViableAlt exception will be thrown
End of alternatives
@ -571,6 +816,211 @@ End of alternative block.
End of alternative block.
*** End Lexer Rule: mNEWLINE
*** Lexer Rule: mCOLON_COMMENT
Access: public
Return value: lexical rule returns an implicit token type
Start of an alternative block.
The lookahead set for this block is:
{ ':' }
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{ ':' }
is matched.
Rule Reference: mCOLON
Start ZERO-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'\u0003', '\u0004', '\u0005', '\u0006', '\u0007',
'\u0008', '\t', '\u000b', '\u000c', '\u000e', '\u000f',
'\u0010', '\u0011', '\u0012', '\u0013', '\u0014', '\u0015',
'\u0016', '\u0017', '\u0018', '\u0019', '\u001a', '\u001b',
'\u001c', '\u001d', '\u001e', '\u001f', ' ', '!',
'"', '#', '$', '%', '&', '\'',
'(', ')', '*', '+', ',', '-',
'.', '/', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9',
':', ';', '<', '=', '>', '?',
'@', 'A', 'B', 'C', 'D', 'E',
'F', 'G', 'H', 'I', 'J', 'K',
'L', 'M', 'N', 'O', 'P', 'Q',
'R', 'S', 'T', 'U', 'V', 'W',
'X', 'Y', 'Z', '[', '\\', ']',
'^', '_', '`', 'a', 'b', 'c',
'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u',
'v', 'w', 'x', 'y', 'z', '{',
'|', '}', '~', '\u007f', '\u0080', '\u0081',
'\u0082', '\u0083', '\u0084', '\u0085', '\u0086', '\u0087',
'\u0088', '\u0089', '\u008a', '\u008b', '\u008c', '\u008d',
'\u008e', '\u008f', '\u0090', '\u0091', '\u0092', '\u0093',
'\u0094', '\u0095', '\u0096', '\u0097', '\u0098', '\u0099',
'\u009a', '\u009b', '\u009c', '\u009d', '\u009e', '\u009f',
'\u00a0', '\u00a1', '\u00a2', '\u00a3', '\u00a4', '\u00a5',
'\u00a6', '\u00a7', '\u00a8', '\u00a9', '\u00aa', '\u00ab',
'\u00ac', '\u00ad', '\u00ae', '\u00af', '\u00b0', '\u00b1',
'\u00b2', '\u00b3', '\u00b4', '\u00b5', '\u00b6', '\u00b7',
'\u00b8', '\u00b9', '\u00ba', '\u00bb', '\u00bc', '\u00bd',
'\u00be', '\u00bf', '\u00c0', '\u00c1', '\u00c2', '\u00c3',
'\u00c4', '\u00c5', '\u00c6', '\u00c7', '\u00c8', '\u00c9',
'\u00ca', '\u00cb', '\u00cc', '\u00cd', '\u00ce', '\u00cf',
'\u00d0', '\u00d1', '\u00d2', '\u00d3', '\u00d4', '\u00d5',
'\u00d6', '\u00d7', '\u00d8', '\u00d9', '\u00da', '\u00db',
'\u00dc', '\u00dd', '\u00de', '\u00df', '\u00e0', '\u00e1',
'\u00e2', '\u00e3', '\u00e4', '\u00e5', '\u00e6', '\u00e7',
'\u00e8', '\u00e9', '\u00ea', '\u00eb', '\u00ec', '\u00ed',
'\u00ee', '\u00ef', '\u00f0', '\u00f1', '\u00f2', '\u00f3',
'\u00f4', '\u00f5', '\u00f6', '\u00f7', '\u00f8', '\u00f9',
'\u00fa', '\u00fb', '\u00fc', '\u00fd', '\u00fe', '\u00ff'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'\u0003', '\u0004', '\u0005', '\u0006', '\u0007',
'\u0008', '\t', '\u000b', '\u000c', '\u000e', '\u000f',
'\u0010', '\u0011', '\u0012', '\u0013', '\u0014', '\u0015',
'\u0016', '\u0017', '\u0018', '\u0019', '\u001a', '\u001b',
'\u001c', '\u001d', '\u001e', '\u001f', ' ', '!',
'"', '#', '$', '%', '&', '\'',
'(', ')', '*', '+', ',', '-',
'.', '/', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9',
':', ';', '<', '=', '>', '?',
'@', 'A', 'B', 'C', 'D', 'E',
'F', 'G', 'H', 'I', 'J', 'K',
'L', 'M', 'N', 'O', 'P', 'Q',
'R', 'S', 'T', 'U', 'V', 'W',
'X', 'Y', 'Z', '[', '\\', ']',
'^', '_', '`', 'a', 'b', 'c',
'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u',
'v', 'w', 'x', 'y', 'z', '{',
'|', '}', '~', '\u007f', '\u0080', '\u0081',
'\u0082', '\u0083', '\u0084', '\u0085', '\u0086', '\u0087',
'\u0088', '\u0089', '\u008a', '\u008b', '\u008c', '\u008d',
'\u008e', '\u008f', '\u0090', '\u0091', '\u0092', '\u0093',
'\u0094', '\u0095', '\u0096', '\u0097', '\u0098', '\u0099',
'\u009a', '\u009b', '\u009c', '\u009d', '\u009e', '\u009f',
'\u00a0', '\u00a1', '\u00a2', '\u00a3', '\u00a4', '\u00a5',
'\u00a6', '\u00a7', '\u00a8', '\u00a9', '\u00aa', '\u00ab',
'\u00ac', '\u00ad', '\u00ae', '\u00af', '\u00b0', '\u00b1',
'\u00b2', '\u00b3', '\u00b4', '\u00b5', '\u00b6', '\u00b7',
'\u00b8', '\u00b9', '\u00ba', '\u00bb', '\u00bc', '\u00bd',
'\u00be', '\u00bf', '\u00c0', '\u00c1', '\u00c2', '\u00c3',
'\u00c4', '\u00c5', '\u00c6', '\u00c7', '\u00c8', '\u00c9',
'\u00ca', '\u00cb', '\u00cc', '\u00cd', '\u00ce', '\u00cf',
'\u00d0', '\u00d1', '\u00d2', '\u00d3', '\u00d4', '\u00d5',
'\u00d6', '\u00d7', '\u00d8', '\u00d9', '\u00da', '\u00db',
'\u00dc', '\u00dd', '\u00de', '\u00df', '\u00e0', '\u00e1',
'\u00e2', '\u00e3', '\u00e4', '\u00e5', '\u00e6', '\u00e7',
'\u00e8', '\u00e9', '\u00ea', '\u00eb', '\u00ec', '\u00ed',
'\u00ee', '\u00ef', '\u00f0', '\u00f1', '\u00f2', '\u00f3',
'\u00f4', '\u00f5', '\u00f6', '\u00f7', '\u00f8', '\u00f9',
'\u00fa', '\u00fb', '\u00fc', '\u00fd', '\u00fe', '\u00ff'
}
is matched.
Start of alternative block.
Start of an alternative block.
The lookahead set for this block is:
{
'\u0003', '\u0004', '\u0005', '\u0006', '\u0007',
'\u0008', '\t', '\u000b', '\u000c', '\u000e', '\u000f',
'\u0010', '\u0011', '\u0012', '\u0013', '\u0014', '\u0015',
'\u0016', '\u0017', '\u0018', '\u0019', '\u001a', '\u001b',
'\u001c', '\u001d', '\u001e', '\u001f', ' ', '!',
'"', '#', '$', '%', '&', '\'',
'(', ')', '*', '+', ',', '-',
'.', '/', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9',
':', ';', '<', '=', '>', '?',
'@', 'A', 'B', 'C', 'D', 'E',
'F', 'G', 'H', 'I', 'J', 'K',
'L', 'M', 'N', 'O', 'P', 'Q',
'R', 'S', 'T', 'U', 'V', 'W',
'X', 'Y', 'Z', '[', '\\', ']',
'^', '_', '`', 'a', 'b', 'c',
'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u',
'v', 'w', 'x', 'y', 'z', '{',
'|', '}', '~', '\u007f', '\u0080', '\u0081',
'\u0082', '\u0083', '\u0084', '\u0085', '\u0086', '\u0087',
'\u0088', '\u0089', '\u008a', '\u008b', '\u008c', '\u008d',
'\u008e', '\u008f', '\u0090', '\u0091', '\u0092', '\u0093',
'\u0094', '\u0095', '\u0096', '\u0097', '\u0098', '\u0099',
'\u009a', '\u009b', '\u009c', '\u009d', '\u009e', '\u009f',
'\u00a0', '\u00a1', '\u00a2', '\u00a3', '\u00a4', '\u00a5',
'\u00a6', '\u00a7', '\u00a8', '\u00a9', '\u00aa', '\u00ab',
'\u00ac', '\u00ad', '\u00ae', '\u00af', '\u00b0', '\u00b1',
'\u00b2', '\u00b3', '\u00b4', '\u00b5', '\u00b6', '\u00b7',
'\u00b8', '\u00b9', '\u00ba', '\u00bb', '\u00bc', '\u00bd',
'\u00be', '\u00bf', '\u00c0', '\u00c1', '\u00c2', '\u00c3',
'\u00c4', '\u00c5', '\u00c6', '\u00c7', '\u00c8', '\u00c9',
'\u00ca', '\u00cb', '\u00cc', '\u00cd', '\u00ce', '\u00cf',
'\u00d0', '\u00d1', '\u00d2', '\u00d3', '\u00d4', '\u00d5',
'\u00d6', '\u00d7', '\u00d8', '\u00d9', '\u00da', '\u00db',
'\u00dc', '\u00dd', '\u00de', '\u00df', '\u00e0', '\u00e1',
'\u00e2', '\u00e3', '\u00e4', '\u00e5', '\u00e6', '\u00e7',
'\u00e8', '\u00e9', '\u00ea', '\u00eb', '\u00ec', '\u00ed',
'\u00ee', '\u00ef', '\u00f0', '\u00f1', '\u00f2', '\u00f3',
'\u00f4', '\u00f5', '\u00f6', '\u00f7', '\u00f8', '\u00f9',
'\u00fa', '\u00fb', '\u00fc', '\u00fd', '\u00fe', '\u00ff'
}
This block has multiple alternatives:
Alternate(1) will be taken IF:
The lookahead set:
{ '\r' }
is matched.
Match character '\r'
Otherwise, Alternate(2) will be taken IF:
The lookahead set:
{ '\n' }
is matched.
Match character '\n'
OTHERWISE, a NoViableAlt exception will be thrown
End of alternatives
End of alternative block.
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ZERO-OR-MORE block.
Rule Reference: mNEWLINE
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
*** End Lexer Rule: mCOLON_COMMENT
*** Lexer Rule: mCOLON
Access: public
Return value: lexical rule returns an implicit token type
Start of an alternative block.
The lookahead set for this block is:
{ ':' }
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{ ':' }
is matched.
Match character ':'
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
*** End Lexer Rule: mCOLON
*** Lexer Rule: mWhitespace
Access: public
Return value: lexical rule returns an implicit token type
@ -842,33 +1292,22 @@ End of alternative block.
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9', 'A',
'B', 'C', 'D', 'E', 'F'
'a', 'b', 'c', 'd', 'e',
'f'
}
This block has multiple alternatives:
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Match character range: '0'..'9'
Otherwise, Alternate(2) will be taken IF:
The lookahead set:
{
'A', 'B', 'C', 'D', 'E',
'F'
}
is matched.
Match character range: 'A'..'F'
OTHERWISE, a NoViableAlt exception will be thrown
End of alternatives
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'a', 'b', 'c', 'd', 'e',
'f'
}
is matched.
Match character range: 'a'..'f'
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
*** End Lexer Rule: mHEXDIGIT
@ -879,7 +1318,8 @@ End of alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
'5', '6', '7', '8', '9', 'a',
'b', 'c', 'd', 'e', 'f'
}
This block has a single alternative
@ -887,7 +1327,8 @@ End of alternative block.
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
'5', '6', '7', '8', '9', 'a',
'b', 'c', 'd', 'e', 'f'
}
is matched.
Start of alternative block.
@ -896,52 +1337,20 @@ End of alternative block.
The lookahead set for this block is:
k==1: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
'5', '6', '7', '8', '9', 'a',
'b', 'c', 'd', 'e', 'f'
}
k==2: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9',
'x'
':', 'a', 'b', 'c', 'd', 'e',
'f'
}
k==3: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'
}
k==4: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'
}
k==5: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'
}
k==6: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'
}
k==7: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'
}
k==8: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'
}
k==9: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'
}
k==10: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'
':', 'a', 'b', 'c', 'd', 'e',
'f'
}
This block has multiple alternatives:
@ -959,34 +1368,6 @@ End of alternative block.
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==4: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==5: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==6: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==7: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==8: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==9: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==10: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
is matched, AND the syntactic predicate:
Start of alternative block.
Start of an alternative block.
@ -1004,6 +1385,409 @@ End of alternative block.
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
is matched.
Start of alternative block.
Warning: This alternative block is non-deterministic
Start of an alternative block.
The lookahead set for this block is:
k==1: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
k==2: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==3: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
This block has multiple alternatives:
Alternate(1) will be taken IF:
The lookahead set:
k==1: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
k==2: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==3: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
is matched, AND the syntactic predicate:
Start of alternative block.
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mDOT
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mDOT
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
is matched.
Start of alternative block.
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mDOT
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mDOT
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mDOT
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
ACTION: _ttype = IPV4;
Otherwise, Alternate(2) will be taken IF:
The lookahead set:
k==1: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
k==2: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==3: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
is matched, AND the syntactic predicate:
Start of alternative block.
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mDOT
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
is matched.
Start of alternative block.
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mDOT
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
Otherwise, Alternate(3) will be taken IF:
The lookahead set:
k==1: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
k==2: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
k==3: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
@ -1026,211 +1810,29 @@ End of alternative block.
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mDOT
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mDOT
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
ACTION: _ttype = INT_CONST;
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
is matched.
Start of alternative block.
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mDOT
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mDOT
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mDOT
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
OTHERWISE, a NoViableAlt exception will be thrown
End of alternatives
End of alternative block.
ACTION: _ttype = IPV4;
Otherwise, Alternate(2) will be taken IF:
The lookahead set:
k==1: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
'5', '6', '7', '8', '9', 'a',
'b', 'c', 'd', 'e', 'f'
}
k==2: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9', ':',
'a', 'b', 'c', 'd', 'e', 'f'
}
k==3: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==4: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==5: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==6: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==7: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==8: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==9: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
}
k==10: {
'.', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9'
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9', ':',
'a', 'b', 'c', 'd', 'e', 'f'
}
is matched, AND the syntactic predicate:
Start of alternative block.
@ -1238,7 +1840,8 @@ End of alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
'5', '6', '7', '8', '9', 'a',
'b', 'c', 'd', 'e', 'f'
}
This block has a single alternative
@ -1246,7 +1849,8 @@ End of alternative block.
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
'5', '6', '7', '8', '9', 'a',
'b', 'c', 'd', 'e', 'f'
}
is matched.
Start ONE-OR-MORE (...)+ block:
@ -1254,46 +1858,35 @@ End of alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
'5', '6', '7', '8', '9', 'a',
'b', 'c', 'd', 'e', 'f'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mDOT
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
This block has multiple alternatives:
Alternate(1) will be taken IF:
The lookahead set:
{
'a', 'b', 'c', 'd', 'e',
'f'
}
is matched.
Match character range: 'a'..'f'
Otherwise, Alternate(2) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Match character range: '0'..'9'
OTHERWISE, a NoViableAlt exception will be thrown
End of alternatives
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mCOLON
OTHERWISE, a NoViableAlt exception will be thrown
@ -1304,7 +1897,8 @@ End of alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
'5', '6', '7', '8', '9', 'a',
'b', 'c', 'd', 'e', 'f'
}
This block has a single alternative
@ -1312,15 +1906,17 @@ End of alternative block.
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
'5', '6', '7', '8', '9', 'a',
'b', 'c', 'd', 'e', 'f'
}
is matched.
Start ONE-OR-MORE (...)+ block:
Start of alternative block.
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
'5', '6', '7', '8', '9', 'a',
'b', 'c', 'd', 'e', 'f'
}
This block has a single alternative
@ -1328,157 +1924,54 @@ End of alternative block.
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
'5', '6', '7', '8', '9', 'a',
'b', 'c', 'd', 'e', 'f'
}
is matched.
Rule Reference: mDIGIT
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9', 'a',
'b', 'c', 'd', 'e', 'f'
}
This block has multiple alternatives:
Alternate(1) will be taken IF:
The lookahead set:
{
'a', 'b', 'c', 'd', 'e',
'f'
}
is matched.
Match character range: 'a'..'f'
Otherwise, Alternate(2) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Match character range: '0'..'9'
OTHERWISE, a NoViableAlt exception will be thrown
End of alternatives
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mCOLON
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
Rule Reference: mDOT
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
ACTION: _ttype = IPV6;
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
Otherwise, Alternate(3) will be taken IF:
The lookahead set:
k==1: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
k==2: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
k==3: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
k==4: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
k==5: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
k==6: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
k==7: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
k==8: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
k==9: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
k==10: {
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9'
}
is matched.
Rule Reference: mDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
ACTION: _ttype = INT_CONST;
Otherwise, Alternate(4) will be taken IF:
The lookahead set:
k==1: {'0' }
k==2: {'x' }
is matched.
Start of alternative block.
Start of an alternative block.
The lookahead set for this block is:
{ '0' }
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{ '0' }
is matched.
Match character '0'
Match character 'x'
Start ONE-OR-MORE (...)+ block:
Start of an alternative block.
The lookahead set for this block is:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9', 'A',
'B', 'C', 'D', 'E', 'F'
}
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{
'0', '1', '2', '3', '4',
'5', '6', '7', '8', '9', 'A',
'B', 'C', 'D', 'E', 'F'
}
is matched.
Rule Reference: mHEXDIGIT
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
End ONE-OR-MORE block.
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
ACTION: _ttype = HEX_CONST;
OTHERWISE, a NoViableAlt exception will be thrown
End of alternatives
@ -2084,25 +2577,6 @@ End of alternative block.
End of alternative block.
*** End Lexer Rule: mSLASH
*** Lexer Rule: mCOLON
Access: public
Return value: lexical rule returns an implicit token type
Start of an alternative block.
The lookahead set for this block is:
{ ':' }
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{ ':' }
is matched.
Match character ':'
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
*** End Lexer Rule: mCOLON
*** Lexer Rule: mSEMICOLON
Access: public
Return value: lexical rule returns an implicit token type
@ -2349,5 +2823,24 @@ End of alternative block.
End of alternative block.
*** End Lexer Rule: mTILDE
*** Lexer Rule: mEXLAMATION
Access: public
Return value: lexical rule returns an implicit token type
Start of an alternative block.
The lookahead set for this block is:
{ '!' }
This block has a single alternative
Alternate(1) will be taken IF:
The lookahead set:
{ '!' }
is matched.
Match character '!'
OTHERWISE, a NoViableAlt exception will be thrown
End of alternative block.
*** End Lexer Rule: mEXLAMATION
*** End User-defined Lexer rules:

View File

@ -107,6 +107,7 @@ void PIXCfgParser::cfgfile() {
break;
}
case NAME:
case IPV6:
{
name_entry();
break;
@ -231,14 +232,14 @@ void PIXCfgParser::version() {
match(VERSION_WORD);
match(NUMBER);
if ( inputState->guessing==0 ) {
#line 651 "pix.g"
#line 700 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
importer->setDiscoveredVersion(LT(0)->getText());
*dbg << "VERSION " << LT(0)->getText() << std::endl;
consumeUntil(NEWLINE);
#line 242 "PIXCfgParser.cpp"
#line 243 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -275,7 +276,7 @@ void PIXCfgParser::hostname() {
}
}
if ( inputState->guessing==0 ) {
#line 661 "pix.g"
#line 710 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
importer->setHostName( LT(0)->getText() );
@ -283,7 +284,7 @@ void PIXCfgParser::hostname() {
<< "LT0=" << LT(0)->getText()
<< std::endl;
#line 287 "PIXCfgParser.cpp"
#line 288 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -306,7 +307,7 @@ void PIXCfgParser::ip_access_list_ext() {
name = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 697 "pix.g"
#line 746 "pix.g"
importer->clear();
importer->setCurrentLineNumber(LT(0)->getLine());
@ -315,7 +316,7 @@ void PIXCfgParser::ip_access_list_ext() {
*dbg << name->getLine() << ":"
<< " ACL ext " << name->getText() << std::endl;
#line 319 "PIXCfgParser.cpp"
#line 320 "PIXCfgParser.cpp"
}
{
switch ( LA(1)) {
@ -352,12 +353,12 @@ void PIXCfgParser::ip_access_list_ext() {
}
}
if ( inputState->guessing==0 ) {
#line 716 "pix.g"
#line 765 "pix.g"
*dbg << LT(0)->getLine() << ":"
<< " ACL line end" << std::endl << std::endl;
#line 361 "PIXCfgParser.cpp"
#line 362 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -377,11 +378,11 @@ void PIXCfgParser::community_list_command() {
match(IP);
match(COMMUNITY_LIST);
if ( inputState->guessing==0 ) {
#line 146 "pix.g"
#line 142 "pix.g"
consumeUntil(NEWLINE);
#line 385 "PIXCfgParser.cpp"
#line 386 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -401,11 +402,11 @@ void PIXCfgParser::unknown_ip_command() {
match(IP);
match(WORD);
if ( inputState->guessing==0 ) {
#line 629 "pix.g"
#line 678 "pix.g"
consumeUntil(NEWLINE);
#line 409 "PIXCfgParser.cpp"
#line 410 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -427,7 +428,7 @@ void PIXCfgParser::intrface() {
in = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 978 "pix.g"
#line 1027 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
importer->newInterface( in->getText() );
@ -435,7 +436,7 @@ void PIXCfgParser::intrface() {
<< " INTRFACE: " << in->getText() << std::endl;
consumeUntil(NEWLINE);
#line 439 "PIXCfgParser.cpp"
#line 440 "PIXCfgParser.cpp"
}
{
switch ( LA(1)) {
@ -455,18 +456,18 @@ void PIXCfgParser::intrface() {
}
}
{ // ( ... )+
int _cnt137=0;
int _cnt145=0;
for (;;) {
if ((LA(1) == NEWLINE) && (_tokenSet_2.member(LA(2)))) {
interface_parameters();
}
else {
if ( _cnt137>=1 ) { goto _loop137; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
if ( _cnt145>=1 ) { goto _loop145; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
}
_cnt137++;
_cnt145++;
}
_loop137:;
_loop145:;
} // ( ... )+
match(NEWLINE);
match(LINE_COMMENT);
@ -487,12 +488,12 @@ void PIXCfgParser::controller() {
try { // for error handling
match(CONTROLLER);
if ( inputState->guessing==0 ) {
#line 932 "pix.g"
#line 981 "pix.g"
importer->clearCurrentInterface();
consumeUntil(NEWLINE);
#line 496 "PIXCfgParser.cpp"
#line 497 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -514,7 +515,7 @@ void PIXCfgParser::access_list_commands() {
acl_num = LT(1);
match(INT_CONST);
if ( inputState->guessing==0 ) {
#line 677 "pix.g"
#line 726 "pix.g"
importer->clear();
importer->setCurrentLineNumber(LT(0)->getLine());
@ -523,7 +524,7 @@ void PIXCfgParser::access_list_commands() {
*dbg << acl_num->getLine() << ":"
<< " ACL #" << acl_num->getText() << " ";
#line 527 "PIXCfgParser.cpp"
#line 528 "PIXCfgParser.cpp"
}
{
switch ( LA(1)) {
@ -582,12 +583,12 @@ void PIXCfgParser::certificate() {
match(CERTIFICATE);
match(WORD);
if ( inputState->guessing==0 ) {
#line 643 "pix.g"
#line 692 "pix.g"
consumeUntil(NEWLINE);
consumeUntil(QUIT);
#line 591 "PIXCfgParser.cpp"
#line 592 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -606,11 +607,11 @@ void PIXCfgParser::quit() {
try { // for error handling
match(QUIT);
if ( inputState->guessing==0 ) {
#line 139 "pix.g"
#line 135 "pix.g"
consumeUntil(NEWLINE);
#line 614 "PIXCfgParser.cpp"
#line 615 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -629,7 +630,7 @@ void PIXCfgParser::names_section() {
try { // for error handling
match(NAMES);
if ( inputState->guessing==0 ) {
#line 153 "pix.g"
#line 149 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
importer->addMessageToLog(
@ -637,7 +638,7 @@ void PIXCfgParser::names_section() {
"Import of configuration that uses \"names\" "
"is not supported at this time");
#line 641 "PIXCfgParser.cpp"
#line 642 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -654,22 +655,52 @@ void PIXCfgParser::name_entry() {
Tracer traceInOut(this, "name_entry");
ANTLR_USE_NAMESPACE(antlr)RefToken a = ANTLR_USE_NAMESPACE(antlr)nullToken;
ANTLR_USE_NAMESPACE(antlr)RefToken n = ANTLR_USE_NAMESPACE(antlr)nullToken;
ANTLR_USE_NAMESPACE(antlr)RefToken v6 = ANTLR_USE_NAMESPACE(antlr)nullToken;
try { // for error handling
match(NAME);
a = LT(1);
match(IPV4);
n = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 163 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
importer->addMessageToLog(
"Name " + a->getText() + " " + n->getText());
*dbg << "Name " << a->getText() << " " << n->getText() << std::endl;
#line 673 "PIXCfgParser.cpp"
switch ( LA(1)) {
case NAME:
{
match(NAME);
{
a = LT(1);
match(IPV4);
n = LT(1);
match(WORD);
}
break;
}
case IPV6:
{
{
v6 = LT(1);
match(IPV6);
}
if ( inputState->guessing==0 ) {
#line 159 "pix.g"
if (a)
{
importer->setCurrentLineNumber(LT(0)->getLine());
importer->addMessageToLog(
"Name " + a->getText() + " " + n->getText());
*dbg << "Name " << a->getText() << " " << n->getText() << std::endl;
}
if (v6)
{
importer->addMessageToLog(
"Parser warning: IPv6 import is not supported. ");
consumeUntil(NEWLINE);
}
#line 697 "PIXCfgParser.cpp"
}
break;
}
default:
{
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
}
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -692,7 +723,7 @@ void PIXCfgParser::named_object_network() {
name = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 187 "pix.g"
#line 192 "pix.g"
importer->clear();
importer->setCurrentLineNumber(LT(0)->getLine());
@ -700,7 +731,7 @@ void PIXCfgParser::named_object_network() {
*dbg << name->getLine() << ":"
<< " Named Object " << name->getText() << std::endl;
#line 704 "PIXCfgParser.cpp"
#line 735 "PIXCfgParser.cpp"
}
{ // ( ... )*
for (;;) {
@ -709,11 +740,11 @@ void PIXCfgParser::named_object_network() {
named_object_network_parameters();
}
else {
goto _loop12;
goto _loop14;
}
}
_loop12:;
_loop14:;
} // ( ... )*
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -736,7 +767,7 @@ void PIXCfgParser::named_object_service() {
name = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 271 "pix.g"
#line 302 "pix.g"
importer->clear();
importer->setCurrentLineNumber(LT(0)->getLine());
@ -744,7 +775,7 @@ void PIXCfgParser::named_object_service() {
*dbg << name->getLine() << ":"
<< " Named Object " << name->getText() << std::endl;
#line 748 "PIXCfgParser.cpp"
#line 779 "PIXCfgParser.cpp"
}
{ // ( ... )*
for (;;) {
@ -753,11 +784,11 @@ void PIXCfgParser::named_object_service() {
named_object_service_parameters();
}
else {
goto _loop25;
goto _loop30;
}
}
_loop25:;
_loop30:;
} // ( ... )*
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -780,7 +811,7 @@ void PIXCfgParser::object_group_network() {
name = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 365 "pix.g"
#line 396 "pix.g"
importer->clear();
importer->setCurrentLineNumber(LT(0)->getLine());
@ -788,21 +819,21 @@ void PIXCfgParser::object_group_network() {
*dbg << name->getLine() << ":"
<< " Object Group " << name->getText() << std::endl;
#line 792 "PIXCfgParser.cpp"
#line 823 "PIXCfgParser.cpp"
}
{ // ( ... )+
int _cnt42=0;
int _cnt47=0;
for (;;) {
if ((LA(1) == NEWLINE) && (LA(2) == DESCRIPTION || LA(2) == GROUP_OBJECT || LA(2) == NETWORK_OBJECT)) {
object_group_network_parameters();
}
else {
if ( _cnt42>=1 ) { goto _loop42; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
if ( _cnt47>=1 ) { goto _loop47; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
}
_cnt42++;
_cnt47++;
}
_loop42:;
_loop47:;
} // ( ... )+
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -825,7 +856,7 @@ void PIXCfgParser::object_group_service() {
name = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 548 "pix.g"
#line 597 "pix.g"
importer->clear();
importer->setCurrentLineNumber(LT(0)->getLine());
@ -833,21 +864,21 @@ void PIXCfgParser::object_group_service() {
*dbg << name->getLine() << ":"
<< " Object Group " << name->getText() << std::endl;
#line 837 "PIXCfgParser.cpp"
#line 868 "PIXCfgParser.cpp"
}
{ // ( ... )+
int _cnt67=0;
int _cnt75=0;
for (;;) {
if ((LA(1) == NEWLINE) && (LA(2) == DESCRIPTION || LA(2) == GROUP_OBJECT || LA(2) == SERVICE_OBJECT)) {
object_group_service_parameters();
}
else {
if ( _cnt67>=1 ) { goto _loop67; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
if ( _cnt75>=1 ) { goto _loop75; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
}
_cnt67++;
_cnt75++;
}
_loop67:;
_loop75:;
} // ( ... )+
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -870,7 +901,7 @@ void PIXCfgParser::object_group_protocol() {
name = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 445 "pix.g"
#line 494 "pix.g"
importer->clear();
importer->setCurrentLineNumber(LT(0)->getLine());
@ -878,21 +909,21 @@ void PIXCfgParser::object_group_protocol() {
*dbg << name->getLine() << ":"
<< " Object Group " << name->getText() << std::endl;
#line 882 "PIXCfgParser.cpp"
#line 913 "PIXCfgParser.cpp"
}
{ // ( ... )+
int _cnt51=0;
int _cnt59=0;
for (;;) {
if ((LA(1) == NEWLINE) && (LA(2) == DESCRIPTION || LA(2) == GROUP_OBJECT || LA(2) == PROTOCOL_OBJECT)) {
object_group_protocol_parameters();
}
else {
if ( _cnt51>=1 ) { goto _loop51; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
if ( _cnt59>=1 ) { goto _loop59; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
}
_cnt51++;
_cnt59++;
}
_loop51:;
_loop59:;
} // ( ... )+
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -915,7 +946,7 @@ void PIXCfgParser::object_group_icmp() {
name = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 493 "pix.g"
#line 542 "pix.g"
importer->clear();
importer->setCurrentLineNumber(LT(0)->getLine());
@ -923,21 +954,21 @@ void PIXCfgParser::object_group_icmp() {
*dbg << name->getLine() << ":"
<< " Object Group " << name->getText() << std::endl;
#line 927 "PIXCfgParser.cpp"
#line 958 "PIXCfgParser.cpp"
}
{ // ( ... )+
int _cnt59=0;
int _cnt67=0;
for (;;) {
if ((LA(1) == NEWLINE) && (LA(2) == DESCRIPTION || LA(2) == GROUP_OBJECT || LA(2) == ICMP_OBJECT)) {
object_group_icmp_parameters();
}
else {
if ( _cnt59>=1 ) { goto _loop59; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
if ( _cnt67>=1 ) { goto _loop67; } else {throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());}
}
_cnt59++;
_cnt67++;
}
_loop59:;
_loop67:;
} // ( ... )+
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -956,11 +987,11 @@ void PIXCfgParser::crypto() {
try { // for error handling
match(CRYPTO);
if ( inputState->guessing==0 ) {
#line 622 "pix.g"
#line 671 "pix.g"
consumeUntil(NEWLINE);
#line 964 "PIXCfgParser.cpp"
#line 995 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -979,11 +1010,11 @@ void PIXCfgParser::unknown_command() {
try { // for error handling
match(WORD);
if ( inputState->guessing==0 ) {
#line 636 "pix.g"
#line 685 "pix.g"
consumeUntil(NEWLINE);
#line 987 "PIXCfgParser.cpp"
#line 1018 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -1148,7 +1179,7 @@ void PIXCfgParser::named_object_nat() {
try { // for error handling
match(NAT);
if ( inputState->guessing==0 ) {
#line 215 "pix.g"
#line 220 "pix.g"
importer->addMessageToLog(
"Parser warning: "
@ -1156,7 +1187,7 @@ void PIXCfgParser::named_object_nat() {
"is not supported at this time");
consumeUntil(NEWLINE);
#line 1160 "PIXCfgParser.cpp"
#line 1191 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -1172,23 +1203,51 @@ void PIXCfgParser::named_object_nat() {
void PIXCfgParser::host_addr() {
Tracer traceInOut(this, "host_addr");
ANTLR_USE_NAMESPACE(antlr)RefToken h = ANTLR_USE_NAMESPACE(antlr)nullToken;
ANTLR_USE_NAMESPACE(antlr)RefToken v6 = ANTLR_USE_NAMESPACE(antlr)nullToken;
try { // for error handling
{
match(HOST);
h = LT(1);
match(IPV4);
{
switch ( LA(1)) {
case IPV4:
{
h = LT(1);
match(IPV4);
break;
}
case IPV6:
{
v6 = LT(1);
match(IPV6);
break;
}
default:
{
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
}
}
}
}
if ( inputState->guessing==0 ) {
#line 240 "pix.g"
#line 251 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
if (h)
{
importer->tmp_a = h->getText();
importer->tmp_nm = "255.255.255.255";
importer->commitNamedAddressObject();
*dbg << h->getText() << "/255.255.255.255";
}
if (v6)
{
importer->addMessageToLog(
"Parser warning: IPv6 import is not supported. ");
consumeUntil(NEWLINE);
}
#line 1192 "PIXCfgParser.cpp"
#line 1251 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -1215,7 +1274,7 @@ void PIXCfgParser::range_addr() {
match(IPV4);
}
if ( inputState->guessing==0 ) {
#line 250 "pix.g"
#line 270 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
importer->tmp_range_1 = r1->getText();
@ -1223,7 +1282,7 @@ void PIXCfgParser::range_addr() {
importer->commitNamedAddressRangeObject();
*dbg << r1->getText() << "/" << r2->getText();
#line 1227 "PIXCfgParser.cpp"
#line 1286 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -1240,25 +1299,55 @@ void PIXCfgParser::subnet_addr() {
Tracer traceInOut(this, "subnet_addr");
ANTLR_USE_NAMESPACE(antlr)RefToken a = ANTLR_USE_NAMESPACE(antlr)nullToken;
ANTLR_USE_NAMESPACE(antlr)RefToken nm = ANTLR_USE_NAMESPACE(antlr)nullToken;
ANTLR_USE_NAMESPACE(antlr)RefToken v6 = ANTLR_USE_NAMESPACE(antlr)nullToken;
try { // for error handling
{
match(SUBNET);
a = LT(1);
match(IPV4);
nm = LT(1);
match(IPV4);
{
switch ( LA(1)) {
case IPV4:
{
{
a = LT(1);
match(IPV4);
nm = LT(1);
match(IPV4);
}
break;
}
case IPV6:
{
v6 = LT(1);
match(IPV6);
break;
}
default:
{
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
}
}
}
}
if ( inputState->guessing==0 ) {
#line 260 "pix.g"
#line 280 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
if (a)
{
importer->tmp_a = a->getText();
importer->tmp_nm = nm->getText();
importer->commitNamedAddressObject();
*dbg << a->getText() << "/" << nm->getText();
}
if (v6)
{
importer->addMessageToLog(
"Parser warning: IPv6 import is not supported. ");
consumeUntil(NEWLINE);
}
#line 1262 "PIXCfgParser.cpp"
#line 1351 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -1277,7 +1366,7 @@ void PIXCfgParser::named_object_description() {
try { // for error handling
match(DESCRIPTION);
if ( inputState->guessing==0 ) {
#line 225 "pix.g"
#line 230 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
*dbg << LT(1)->getLine() << ":";
@ -1290,7 +1379,7 @@ void PIXCfgParser::named_object_description() {
importer->setNamedObjectDescription(descr);
*dbg << " DESCRIPTION " << descr << std::endl;
#line 1294 "PIXCfgParser.cpp"
#line 1383 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -1354,11 +1443,11 @@ void PIXCfgParser::service_icmp() {
icmp_type = LT(1);
match(INT_CONST);
if ( inputState->guessing==0 ) {
#line 301 "pix.g"
#line 332 "pix.g"
importer->icmp_type = LT(0)->getText();
#line 1362 "PIXCfgParser.cpp"
#line 1451 "PIXCfgParser.cpp"
}
break;
}
@ -1367,11 +1456,11 @@ void PIXCfgParser::service_icmp() {
icmp_word = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 305 "pix.g"
#line 336 "pix.g"
importer->icmp_spec = icmp_word->getText();
#line 1375 "PIXCfgParser.cpp"
#line 1464 "PIXCfgParser.cpp"
}
break;
}
@ -1382,13 +1471,13 @@ void PIXCfgParser::service_icmp() {
}
}
if ( inputState->guessing==0 ) {
#line 309 "pix.g"
#line 340 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
importer->commitNamedICMPServiceObject();
*dbg << "NAMED OBJECT SERVICE ICMP " << LT(0)->getText() << " ";
#line 1392 "PIXCfgParser.cpp"
#line 1481 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -1426,7 +1515,7 @@ void PIXCfgParser::service_icmp6() {
}
}
if ( inputState->guessing==0 ) {
#line 317 "pix.g"
#line 348 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
importer->addMessageToLog("Parser warning: "
@ -1435,7 +1524,7 @@ void PIXCfgParser::service_icmp6() {
*dbg << "NAMED OBJECT SERVICE ICMP6 " << LT(0)->getText() << " ";
consumeUntil(NEWLINE);
#line 1439 "PIXCfgParser.cpp"
#line 1528 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -1472,12 +1561,12 @@ void PIXCfgParser::service_tcp_udp() {
}
}
if ( inputState->guessing==0 ) {
#line 328 "pix.g"
#line 359 "pix.g"
importer->protocol = LT(0)->getText();
*dbg << "NAMED OBJECT SERVICE " << LT(0)->getText() << " ";
#line 1481 "PIXCfgParser.cpp"
#line 1570 "PIXCfgParser.cpp"
}
{
switch ( LA(1)) {
@ -1493,6 +1582,7 @@ void PIXCfgParser::service_tcp_udp() {
case NAMES:
case NAME:
case WORD:
case IPV6:
case OBJECT:
case DESTINATION:
case OBJECT_GROUP:
@ -1530,6 +1620,7 @@ void PIXCfgParser::service_tcp_udp() {
case NAMES:
case NAME:
case WORD:
case IPV6:
case OBJECT:
case OBJECT_GROUP:
case CRYPTO:
@ -1553,12 +1644,12 @@ void PIXCfgParser::service_tcp_udp() {
}
}
if ( inputState->guessing==0 ) {
#line 334 "pix.g"
#line 365 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
importer->commitNamedTCPUDPServiceObject();
#line 1562 "PIXCfgParser.cpp"
#line 1653 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -1609,14 +1700,14 @@ void PIXCfgParser::service_other() {
}
}
if ( inputState->guessing==0 ) {
#line 353 "pix.g"
#line 384 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
importer->protocol = LT(0)->getText();
importer->commitNamedIPServiceObject();
*dbg << "NAMED OBJECT SERVICE " << LT(0)->getText() << " ";
#line 1620 "PIXCfgParser.cpp"
#line 1711 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -1636,11 +1727,11 @@ void PIXCfgParser::src_port_spec() {
match(SOURCE);
xoperator();
if ( inputState->guessing==0 ) {
#line 341 "pix.g"
#line 372 "pix.g"
importer->SaveTmpPortToSrc();
#line 1644 "PIXCfgParser.cpp"
#line 1735 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -1660,11 +1751,11 @@ void PIXCfgParser::dst_port_spec() {
match(DESTINATION);
xoperator();
if ( inputState->guessing==0 ) {
#line 347 "pix.g"
#line 378 "pix.g"
importer->SaveTmpPortToDst();
#line 1668 "PIXCfgParser.cpp"
#line 1759 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -1756,7 +1847,7 @@ void PIXCfgParser::object_group_description() {
try { // for error handling
match(DESCRIPTION);
if ( inputState->guessing==0 ) {
#line 389 "pix.g"
#line 420 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
*dbg << LT(1)->getLine() << ":";
@ -1769,7 +1860,7 @@ void PIXCfgParser::object_group_description() {
importer->setObjectGroupDescription(descr);
*dbg << " DESCRIPTION " << descr << std::endl;
#line 1773 "PIXCfgParser.cpp"
#line 1864 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -1791,14 +1882,14 @@ void PIXCfgParser::group_object() {
name = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 404 "pix.g"
#line 435 "pix.g"
importer->clearTempVars();
importer->setCurrentLineNumber(LT(0)->getLine());
importer->addNamedObjectToObjectGroup(name->getText());
*dbg << " GROUP MEMBER " << name->getLine() << std::endl;
#line 1802 "PIXCfgParser.cpp"
#line 1893 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -1815,53 +1906,112 @@ void PIXCfgParser::network_object() {
Tracer traceInOut(this, "network_object");
ANTLR_USE_NAMESPACE(antlr)RefToken a = ANTLR_USE_NAMESPACE(antlr)nullToken;
ANTLR_USE_NAMESPACE(antlr)RefToken nm = ANTLR_USE_NAMESPACE(antlr)nullToken;
ANTLR_USE_NAMESPACE(antlr)RefToken v6 = ANTLR_USE_NAMESPACE(antlr)nullToken;
ANTLR_USE_NAMESPACE(antlr)RefToken h = ANTLR_USE_NAMESPACE(antlr)nullToken;
ANTLR_USE_NAMESPACE(antlr)RefToken hv6 = ANTLR_USE_NAMESPACE(antlr)nullToken;
ANTLR_USE_NAMESPACE(antlr)RefToken name = ANTLR_USE_NAMESPACE(antlr)nullToken;
try { // for error handling
match(NETWORK_OBJECT);
if ( inputState->guessing==0 ) {
#line 413 "pix.g"
#line 444 "pix.g"
importer->clearTempVars();
importer->setCurrentLineNumber(LT(0)->getLine());
#line 1830 "PIXCfgParser.cpp"
#line 1923 "PIXCfgParser.cpp"
}
{
switch ( LA(1)) {
case IPV4:
case IPV6:
{
a = LT(1);
match(IPV4);
nm = LT(1);
match(IPV4);
{
switch ( LA(1)) {
case IPV4:
{
{
a = LT(1);
match(IPV4);
nm = LT(1);
match(IPV4);
}
break;
}
case IPV6:
{
v6 = LT(1);
match(IPV6);
break;
}
default:
{
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
}
}
}
if ( inputState->guessing==0 ) {
#line 419 "pix.g"
#line 450 "pix.g"
if (a)
{
importer->tmp_a = a->getText();
importer->tmp_nm = nm->getText();
importer->addNetworkToObjectGroup();
*dbg << a->getText() << "/" << nm->getText();
}
if (v6)
{
importer->addMessageToLog(
"Parser warning: IPv6 import is not supported. ");
consumeUntil(NEWLINE);
}
#line 1848 "PIXCfgParser.cpp"
#line 1971 "PIXCfgParser.cpp"
}
break;
}
case HOST:
{
match(HOST);
h = LT(1);
match(IPV4);
{
switch ( LA(1)) {
case IPV4:
{
h = LT(1);
match(IPV4);
break;
}
case IPV6:
{
hv6 = LT(1);
match(IPV6);
break;
}
default:
{
throw ANTLR_USE_NAMESPACE(antlr)NoViableAltException(LT(1), getFilename());
}
}
}
if ( inputState->guessing==0 ) {
#line 427 "pix.g"
#line 467 "pix.g"
if (h)
{
importer->tmp_a = h->getText();
importer->tmp_nm = "255.255.255.255";
importer->addNetworkToObjectGroup();
*dbg << h->getText() << "/255.255.255.255";
}
if (hv6)
{
importer->addMessageToLog(
"Parser warning: IPv6 import is not supported. ");
consumeUntil(NEWLINE);
}
#line 1865 "PIXCfgParser.cpp"
#line 2015 "PIXCfgParser.cpp"
}
break;
}
@ -1871,12 +2021,12 @@ void PIXCfgParser::network_object() {
name = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 435 "pix.g"
#line 484 "pix.g"
importer->addNamedObjectToObjectGroup(name->getText());
*dbg << " GROUP MEMBER " << name->getLine() << std::endl;
#line 1880 "PIXCfgParser.cpp"
#line 2030 "PIXCfgParser.cpp"
}
break;
}
@ -1943,12 +2093,12 @@ void PIXCfgParser::protocol_object() {
try { // for error handling
match(PROTOCOL_OBJECT);
if ( inputState->guessing==0 ) {
#line 469 "pix.g"
#line 518 "pix.g"
importer->clearTempVars();
importer->setCurrentLineNumber(LT(0)->getLine());
#line 1952 "PIXCfgParser.cpp"
#line 2102 "PIXCfgParser.cpp"
}
{
switch ( LA(1)) {
@ -2002,14 +2152,14 @@ void PIXCfgParser::protocol_object() {
}
}
if ( inputState->guessing==0 ) {
#line 475 "pix.g"
#line 524 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
importer->protocol = LT(0)->getText();
importer->addIPServiceToObjectGroup();
*dbg << " GROUP MEMBER " << LT(0)->getText() << " ";
#line 2013 "PIXCfgParser.cpp"
#line 2163 "PIXCfgParser.cpp"
}
break;
}
@ -2019,12 +2169,12 @@ void PIXCfgParser::protocol_object() {
name = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 483 "pix.g"
#line 532 "pix.g"
importer->addNamedObjectToObjectGroup(name->getText());
*dbg << " GROUP MEMBER " << name->getLine() << std::endl;
#line 2028 "PIXCfgParser.cpp"
#line 2178 "PIXCfgParser.cpp"
}
break;
}
@ -2093,12 +2243,12 @@ void PIXCfgParser::icmp_object() {
try { // for error handling
match(ICMP_OBJECT);
if ( inputState->guessing==0 ) {
#line 517 "pix.g"
#line 566 "pix.g"
importer->clearTempVars();
importer->setCurrentLineNumber(LT(0)->getLine());
#line 2102 "PIXCfgParser.cpp"
#line 2252 "PIXCfgParser.cpp"
}
{
switch ( LA(1)) {
@ -2112,11 +2262,11 @@ void PIXCfgParser::icmp_object() {
icmp_type = LT(1);
match(INT_CONST);
if ( inputState->guessing==0 ) {
#line 524 "pix.g"
#line 573 "pix.g"
importer->icmp_type = LT(0)->getText();
#line 2120 "PIXCfgParser.cpp"
#line 2270 "PIXCfgParser.cpp"
}
break;
}
@ -2125,11 +2275,11 @@ void PIXCfgParser::icmp_object() {
icmp_word = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 528 "pix.g"
#line 577 "pix.g"
importer->icmp_spec = icmp_word->getText();
#line 2133 "PIXCfgParser.cpp"
#line 2283 "PIXCfgParser.cpp"
}
break;
}
@ -2140,12 +2290,12 @@ void PIXCfgParser::icmp_object() {
}
}
if ( inputState->guessing==0 ) {
#line 532 "pix.g"
#line 581 "pix.g"
importer->addICMPServiceToObjectGroup();
*dbg << " SERVICE ICMP " << LT(0)->getText() << " ";
#line 2149 "PIXCfgParser.cpp"
#line 2299 "PIXCfgParser.cpp"
}
break;
}
@ -2155,12 +2305,12 @@ void PIXCfgParser::icmp_object() {
name = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 538 "pix.g"
#line 587 "pix.g"
importer->addNamedObjectToObjectGroup(name->getText());
*dbg << " GROUP MEMBER " << name->getLine() << std::endl;
#line 2164 "PIXCfgParser.cpp"
#line 2314 "PIXCfgParser.cpp"
}
break;
}
@ -2229,12 +2379,12 @@ void PIXCfgParser::service_object() {
try { // for error handling
match(SERVICE_OBJECT);
if ( inputState->guessing==0 ) {
#line 572 "pix.g"
#line 621 "pix.g"
importer->clearTempVars();
importer->setCurrentLineNumber(LT(0)->getLine());
#line 2238 "PIXCfgParser.cpp"
#line 2388 "PIXCfgParser.cpp"
}
{
switch ( LA(1)) {
@ -2288,14 +2438,14 @@ void PIXCfgParser::service_object() {
}
}
if ( inputState->guessing==0 ) {
#line 578 "pix.g"
#line 627 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
importer->protocol = LT(0)->getText();
importer->addIPServiceToObjectGroup();
*dbg << " GROUP MEMBER " << LT(0)->getText() << " ";
#line 2299 "PIXCfgParser.cpp"
#line 2449 "PIXCfgParser.cpp"
}
break;
}
@ -2321,12 +2471,12 @@ void PIXCfgParser::service_object() {
}
}
if ( inputState->guessing==0 ) {
#line 586 "pix.g"
#line 635 "pix.g"
importer->protocol = LT(0)->getText();
*dbg << " SERVICE TCP/UDP" << LT(0)->getText() << " ";
#line 2330 "PIXCfgParser.cpp"
#line 2480 "PIXCfgParser.cpp"
}
{
switch ( LA(1)) {
@ -2342,6 +2492,7 @@ void PIXCfgParser::service_object() {
case NAMES:
case NAME:
case WORD:
case IPV6:
case OBJECT:
case DESTINATION:
case OBJECT_GROUP:
@ -2379,6 +2530,7 @@ void PIXCfgParser::service_object() {
case NAMES:
case NAME:
case WORD:
case IPV6:
case OBJECT:
case OBJECT_GROUP:
case CRYPTO:
@ -2402,11 +2554,11 @@ void PIXCfgParser::service_object() {
}
}
if ( inputState->guessing==0 ) {
#line 592 "pix.g"
#line 641 "pix.g"
importer->addTCPUDPServiceToObjectGroup();
#line 2410 "PIXCfgParser.cpp"
#line 2562 "PIXCfgParser.cpp"
}
break;
}
@ -2420,11 +2572,11 @@ void PIXCfgParser::service_object() {
icmp_type = LT(1);
match(INT_CONST);
if ( inputState->guessing==0 ) {
#line 599 "pix.g"
#line 648 "pix.g"
importer->icmp_type = LT(0)->getText();
#line 2428 "PIXCfgParser.cpp"
#line 2580 "PIXCfgParser.cpp"
}
break;
}
@ -2433,11 +2585,11 @@ void PIXCfgParser::service_object() {
icmp_word = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 603 "pix.g"
#line 652 "pix.g"
importer->icmp_spec = icmp_word->getText();
#line 2441 "PIXCfgParser.cpp"
#line 2593 "PIXCfgParser.cpp"
}
break;
}
@ -2448,12 +2600,12 @@ void PIXCfgParser::service_object() {
}
}
if ( inputState->guessing==0 ) {
#line 607 "pix.g"
#line 656 "pix.g"
importer->addICMPServiceToObjectGroup();
*dbg << " SERVICE ICMP " << LT(0)->getText() << " ";
#line 2457 "PIXCfgParser.cpp"
#line 2609 "PIXCfgParser.cpp"
}
break;
}
@ -2463,12 +2615,12 @@ void PIXCfgParser::service_object() {
name = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 613 "pix.g"
#line 662 "pix.g"
importer->addNamedObjectToObjectGroup(name->getText());
*dbg << " GROUP MEMBER " << name->getLine() << std::endl;
#line 2472 "PIXCfgParser.cpp"
#line 2624 "PIXCfgParser.cpp"
}
break;
}
@ -2495,23 +2647,23 @@ void PIXCfgParser::permit_ext() {
try { // for error handling
match(PERMIT);
if ( inputState->guessing==0 ) {
#line 724 "pix.g"
#line 773 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
importer->newPolicyRule();
importer->action = "permit";
*dbg << LT(1)->getLine() << ":" << " permit ";
#line 2506 "PIXCfgParser.cpp"
#line 2658 "PIXCfgParser.cpp"
}
rule_ext();
match(NEWLINE);
if ( inputState->guessing==0 ) {
#line 731 "pix.g"
#line 780 "pix.g"
importer->pushRule();
#line 2515 "PIXCfgParser.cpp"
#line 2667 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -2530,23 +2682,23 @@ void PIXCfgParser::deny_ext() {
try { // for error handling
match(DENY);
if ( inputState->guessing==0 ) {
#line 737 "pix.g"
#line 786 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
importer->newPolicyRule();
importer->action = "deny";
*dbg << LT(1)->getLine() << ":" << " deny ";
#line 2541 "PIXCfgParser.cpp"
#line 2693 "PIXCfgParser.cpp"
}
rule_ext();
match(NEWLINE);
if ( inputState->guessing==0 ) {
#line 744 "pix.g"
#line 793 "pix.g"
importer->pushRule();
#line 2550 "PIXCfgParser.cpp"
#line 2702 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -2565,7 +2717,7 @@ void PIXCfgParser::remark() {
try { // for error handling
match(REMARK);
if ( inputState->guessing==0 ) {
#line 1232 "pix.g"
#line 1281 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
*dbg << LT(1)->getLine() << ":";
@ -2579,7 +2731,7 @@ void PIXCfgParser::remark() {
*dbg << " REMARK " << rem << std::endl;
//consumeUntil(NEWLINE);
#line 2583 "PIXCfgParser.cpp"
#line 2735 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -2617,15 +2769,15 @@ void PIXCfgParser::rule_ext() {
ip_protocols();
hostaddr_ext();
if ( inputState->guessing==0 ) {
#line 754 "pix.g"
#line 803 "pix.g"
importer->SaveTmpAddrToSrc(); *dbg << "(src) ";
#line 2623 "PIXCfgParser.cpp"
#line 2775 "PIXCfgParser.cpp"
}
hostaddr_ext();
if ( inputState->guessing==0 ) {
#line 755 "pix.g"
#line 804 "pix.g"
importer->SaveTmpAddrToDst(); *dbg << "(dst) ";
#line 2629 "PIXCfgParser.cpp"
#line 2781 "PIXCfgParser.cpp"
}
{
switch ( LA(1)) {
@ -2690,24 +2842,24 @@ void PIXCfgParser::rule_ext() {
{
match(ICMP);
if ( inputState->guessing==0 ) {
#line 761 "pix.g"
#line 810 "pix.g"
importer->protocol = LT(0)->getText();
*dbg << "protocol " << LT(0)->getText() << " ";
#line 2699 "PIXCfgParser.cpp"
#line 2851 "PIXCfgParser.cpp"
}
hostaddr_ext();
if ( inputState->guessing==0 ) {
#line 765 "pix.g"
#line 814 "pix.g"
importer->SaveTmpAddrToSrc(); *dbg << "(src) ";
#line 2705 "PIXCfgParser.cpp"
#line 2857 "PIXCfgParser.cpp"
}
hostaddr_ext();
if ( inputState->guessing==0 ) {
#line 766 "pix.g"
#line 815 "pix.g"
importer->SaveTmpAddrToDst(); *dbg << "(dst) ";
#line 2711 "PIXCfgParser.cpp"
#line 2863 "PIXCfgParser.cpp"
}
{
switch ( LA(1)) {
@ -2812,18 +2964,18 @@ void PIXCfgParser::rule_ext() {
}
}
if ( inputState->guessing==0 ) {
#line 773 "pix.g"
#line 822 "pix.g"
importer->protocol = LT(0)->getText();
*dbg << "protocol " << LT(0)->getText() << " ";
#line 2821 "PIXCfgParser.cpp"
#line 2973 "PIXCfgParser.cpp"
}
hostaddr_ext();
if ( inputState->guessing==0 ) {
#line 777 "pix.g"
#line 826 "pix.g"
importer->SaveTmpAddrToSrc(); *dbg << "(src) ";
#line 2827 "PIXCfgParser.cpp"
#line 2979 "PIXCfgParser.cpp"
}
{
switch ( LA(1)) {
@ -2835,9 +2987,9 @@ void PIXCfgParser::rule_ext() {
{
xoperator();
if ( inputState->guessing==0 ) {
#line 778 "pix.g"
#line 827 "pix.g"
importer->SaveTmpPortToSrc();
#line 2841 "PIXCfgParser.cpp"
#line 2993 "PIXCfgParser.cpp"
}
break;
}
@ -2855,9 +3007,9 @@ void PIXCfgParser::rule_ext() {
}
hostaddr_ext();
if ( inputState->guessing==0 ) {
#line 779 "pix.g"
#line 828 "pix.g"
importer->SaveTmpAddrToDst(); *dbg << "(dst) ";
#line 2861 "PIXCfgParser.cpp"
#line 3013 "PIXCfgParser.cpp"
}
{
switch ( LA(1)) {
@ -2869,9 +3021,9 @@ void PIXCfgParser::rule_ext() {
{
xoperator();
if ( inputState->guessing==0 ) {
#line 780 "pix.g"
#line 829 "pix.g"
importer->SaveTmpPortToDst();
#line 2875 "PIXCfgParser.cpp"
#line 3027 "PIXCfgParser.cpp"
}
break;
}
@ -2977,11 +3129,11 @@ void PIXCfgParser::rule_ext() {
}
}
if ( inputState->guessing==0 ) {
#line 786 "pix.g"
#line 835 "pix.g"
*dbg << std::endl;
#line 2985 "PIXCfgParser.cpp"
#line 3137 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3000,12 +3152,12 @@ void PIXCfgParser::ip_protocols() {
try { // for error handling
ip_protocol_names();
if ( inputState->guessing==0 ) {
#line 793 "pix.g"
#line 842 "pix.g"
importer->protocol = LT(0)->getText();
*dbg << "protocol " << LT(0)->getText() << " ";
#line 3009 "PIXCfgParser.cpp"
#line 3161 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3034,13 +3186,13 @@ void PIXCfgParser::hostaddr_ext() {
match(IPV4);
}
if ( inputState->guessing==0 ) {
#line 856 "pix.g"
#line 905 "pix.g"
importer->tmp_a = h->getText();
importer->tmp_nm = "255.255.255.255";
*dbg << h->getText() << "/255.255.255.255";
#line 3044 "PIXCfgParser.cpp"
#line 3196 "PIXCfgParser.cpp"
}
break;
}
@ -3053,13 +3205,13 @@ void PIXCfgParser::hostaddr_ext() {
match(IPV4);
}
if ( inputState->guessing==0 ) {
#line 863 "pix.g"
#line 912 "pix.g"
importer->tmp_a = a->getText();
importer->tmp_nm = m->getText();
*dbg << a->getText() << "/" << m->getText();
#line 3063 "PIXCfgParser.cpp"
#line 3215 "PIXCfgParser.cpp"
}
break;
}
@ -3067,13 +3219,13 @@ void PIXCfgParser::hostaddr_ext() {
{
match(ANY);
if ( inputState->guessing==0 ) {
#line 870 "pix.g"
#line 919 "pix.g"
importer->tmp_a = "0.0.0.0";
importer->tmp_nm = "0.0.0.0";
*dbg << "0.0.0.0/0.0.0.0";
#line 3077 "PIXCfgParser.cpp"
#line 3229 "PIXCfgParser.cpp"
}
break;
}
@ -3102,12 +3254,12 @@ void PIXCfgParser::time_range() {
tr_name = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 922 "pix.g"
#line 971 "pix.g"
importer->time_range_name = tr_name->getText();
*dbg << "time_range " << tr_name->getText() << " ";
#line 3111 "PIXCfgParser.cpp"
#line 3263 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3126,12 +3278,12 @@ void PIXCfgParser::fragments() {
try { // for error handling
match(FRAGMENTS);
if ( inputState->guessing==0 ) {
#line 915 "pix.g"
#line 964 "pix.g"
importer->fragments = true;
*dbg << "fragments ";
#line 3135 "PIXCfgParser.cpp"
#line 3287 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3167,12 +3319,12 @@ void PIXCfgParser::log() {
}
}
if ( inputState->guessing==0 ) {
#line 901 "pix.g"
#line 950 "pix.g"
importer->logging = true;
*dbg << "logging ";
#line 3176 "PIXCfgParser.cpp"
#line 3328 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3203,7 +3355,7 @@ void PIXCfgParser::icmp_spec() {
match(INT_CONST);
}
if ( inputState->guessing==0 ) {
#line 801 "pix.g"
#line 850 "pix.g"
importer->icmp_type = icmp_type->getText();
importer->icmp_code = icmp_code->getText();
@ -3211,7 +3363,7 @@ void PIXCfgParser::icmp_spec() {
*dbg << icmp_type->getText() << " "
<< icmp_code->getText() << " ";
#line 3215 "PIXCfgParser.cpp"
#line 3367 "PIXCfgParser.cpp"
}
break;
}
@ -3220,12 +3372,12 @@ void PIXCfgParser::icmp_spec() {
icmp_word = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 810 "pix.g"
#line 859 "pix.g"
importer->icmp_spec = icmp_word->getText();
*dbg << icmp_word->getText() << " ";
#line 3229 "PIXCfgParser.cpp"
#line 3381 "PIXCfgParser.cpp"
}
break;
}
@ -3252,12 +3404,12 @@ void PIXCfgParser::established() {
try { // for error handling
match(ESTABLISHED);
if ( inputState->guessing==0 ) {
#line 908 "pix.g"
#line 957 "pix.g"
importer->established = true;
*dbg << "established ";
#line 3261 "PIXCfgParser.cpp"
#line 3413 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3303,12 +3455,12 @@ void PIXCfgParser::single_port_op() {
}
}
if ( inputState->guessing==0 ) {
#line 821 "pix.g"
#line 870 "pix.g"
importer->tmp_port_op = LT(0)->getText();
*dbg << LT(0)->getText() << " ";
#line 3312 "PIXCfgParser.cpp"
#line 3464 "PIXCfgParser.cpp"
}
port_spec();
}
@ -3329,12 +3481,12 @@ void PIXCfgParser::port_range() {
match(RANGE);
pair_of_ports_spec();
if ( inputState->guessing==0 ) {
#line 836 "pix.g"
#line 885 "pix.g"
importer->tmp_port_op = "range";
*dbg << "range ";
#line 3338 "PIXCfgParser.cpp"
#line 3490 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3370,12 +3522,12 @@ void PIXCfgParser::port_spec() {
}
}
if ( inputState->guessing==0 ) {
#line 829 "pix.g"
#line 878 "pix.g"
importer->tmp_port_spec = (std::string(" ") + LT(0)->getText());
*dbg << LT(0)->getText() << " " << importer->tmp_port_spec;
#line 3379 "PIXCfgParser.cpp"
#line 3531 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3437,7 +3589,7 @@ void PIXCfgParser::pair_of_ports_spec() {
}
}
if ( inputState->guessing==0 ) {
#line 843 "pix.g"
#line 892 "pix.g"
importer->tmp_port_spec = "";
if (s1) importer->tmp_port_spec += s1->getText();
@ -3447,7 +3599,7 @@ void PIXCfgParser::pair_of_ports_spec() {
if (e2) importer->tmp_port_spec += e2->getText();
*dbg << "pair of ports: " << importer->tmp_port_spec;
#line 3451 "PIXCfgParser.cpp"
#line 3603 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3473,13 +3625,13 @@ void PIXCfgParser::hostaddr_std() {
match(IPV4);
}
if ( inputState->guessing==0 ) {
#line 879 "pix.g"
#line 928 "pix.g"
importer->tmp_a = h->getText();
importer->tmp_nm = "0.0.0.0";
*dbg << h->getText() << "/0.0.0.0";
#line 3483 "PIXCfgParser.cpp"
#line 3635 "PIXCfgParser.cpp"
}
}
else if ((LA(1) == IPV4) && (LA(2) == IPV4)) {
@ -3490,25 +3642,25 @@ void PIXCfgParser::hostaddr_std() {
match(IPV4);
}
if ( inputState->guessing==0 ) {
#line 886 "pix.g"
#line 935 "pix.g"
importer->tmp_a = a->getText();
importer->tmp_nm = m->getText();
*dbg << a->getText() << "/" << m->getText();
#line 3500 "PIXCfgParser.cpp"
#line 3652 "PIXCfgParser.cpp"
}
}
else if ((LA(1) == ANY)) {
match(ANY);
if ( inputState->guessing==0 ) {
#line 893 "pix.g"
#line 942 "pix.g"
importer->tmp_a = "0.0.0.0";
importer->tmp_nm = "0.0.0.0";
*dbg << "0.0.0.0/0.0.0.0";
#line 3512 "PIXCfgParser.cpp"
#line 3664 "PIXCfgParser.cpp"
}
}
else {
@ -3532,7 +3684,7 @@ void PIXCfgParser::interface_description() {
try { // for error handling
match(DESCRIPTION);
if ( inputState->guessing==0 ) {
#line 1108 "pix.g"
#line 1157 "pix.g"
*dbg << LT(1)->getLine() << ":";
std::string descr;
@ -3545,7 +3697,7 @@ void PIXCfgParser::interface_description() {
*dbg << " DESCRIPTION " << descr << std::endl;
//consumeUntil(NEWLINE);
#line 3549 "PIXCfgParser.cpp"
#line 3701 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3564,11 +3716,11 @@ void PIXCfgParser::interface_parameters() {
try { // for error handling
match(NEWLINE);
if ( inputState->guessing==0 ) {
#line 996 "pix.g"
#line 1045 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
#line 3572 "PIXCfgParser.cpp"
#line 3724 "PIXCfgParser.cpp"
}
{
switch ( LA(1)) {
@ -3621,7 +3773,7 @@ void PIXCfgParser::interface_parameters() {
case FORWARD:
case DELAY:
case HOLD_TIME:
case IPV6:
case IPV6_C:
case MAC_ADDRESS:
case MULTICAST:
case PPPOE:
@ -3692,12 +3844,12 @@ void PIXCfgParser::vlan_interface() {
vlan_id = LT(1);
match(INT_CONST);
if ( inputState->guessing==0 ) {
#line 1021 "pix.g"
#line 1070 "pix.g"
importer->setInterfaceVlanId(vlan_id->getText());
*dbg << " VLAN: " << vlan_id->getText() << std::endl;
#line 3701 "PIXCfgParser.cpp"
#line 3853 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3719,12 +3871,12 @@ void PIXCfgParser::sec_level() {
sec_level = LT(1);
match(INT_CONST);
if ( inputState->guessing==0 ) {
#line 1073 "pix.g"
#line 1122 "pix.g"
importer->setInterfaceSecurityLevel(sec_level->getText());
*dbg << "SEC_LEVEL: " << sec_level->getText() << std::endl;
#line 3728 "PIXCfgParser.cpp"
#line 3880 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3770,7 +3922,7 @@ void PIXCfgParser::nameif() {
}
}
if ( inputState->guessing==0 ) {
#line 1096 "pix.g"
#line 1145 "pix.g"
std::string label = (intf_label) ? intf_label->getText() : "";
std::string seclevel = (sec_level) ? sec_level->getText() : "";
@ -3778,7 +3930,7 @@ void PIXCfgParser::nameif() {
*dbg << " NAMEIF: "
<< p_intf->getText() << label << seclevel << std::endl;
#line 3782 "PIXCfgParser.cpp"
#line 3934 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3802,12 +3954,12 @@ void PIXCfgParser::switchport() {
vlan_num = LT(1);
match(INT_CONST);
if ( inputState->guessing==0 ) {
#line 1220 "pix.g"
#line 1269 "pix.g"
importer->addMessageToLog("Switch port vlan " + vlan_num->getText());
*dbg << "Switch port vlan " << vlan_num->getText() << std::endl;
#line 3811 "PIXCfgParser.cpp"
#line 3963 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3826,13 +3978,13 @@ void PIXCfgParser::shutdown() {
try { // for error handling
match(SHUTDOWN);
if ( inputState->guessing==0 ) {
#line 1123 "pix.g"
#line 1172 "pix.g"
importer->ignoreCurrentInterface();
*dbg<< LT(1)->getLine() << ":"
<< " INTERFACE SHUTDOWN " << std::endl;
#line 3836 "PIXCfgParser.cpp"
#line 3988 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3852,13 +4004,13 @@ void PIXCfgParser::interface_no_commands() {
match(NO);
match(WORD);
if ( inputState->guessing==0 ) {
#line 1065 "pix.g"
#line 1114 "pix.g"
*dbg << " INTERFACE \"NO\" COMMAND: "
<< LT(0)->getText() << std::endl;
consumeUntil(NEWLINE);
#line 3862 "PIXCfgParser.cpp"
#line 4014 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -3912,9 +4064,9 @@ void PIXCfgParser::unsupported_interface_commands() {
match(IGMP);
break;
}
case IPV6:
case IPV6_C:
{
match(IPV6);
match(IPV6_C);
break;
}
case MAC_ADDRESS:
@ -3954,13 +4106,13 @@ void PIXCfgParser::unsupported_interface_commands() {
}
}
if ( inputState->guessing==0 ) {
#line 1057 "pix.g"
#line 1106 "pix.g"
*dbg << " UNSUPPORTED INTERFACE COMMAND: "
<< LT(0)->getText() << std::endl;
consumeUntil(NEWLINE);
#line 3964 "PIXCfgParser.cpp"
#line 4116 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -4040,7 +4192,7 @@ void PIXCfgParser::v6_dhcp_address() {
dhcp = LT(1);
match(DHCP);
if ( inputState->guessing==0 ) {
#line 1158 "pix.g"
#line 1207 "pix.g"
std::string label = lbl->getText();
std::string addr = dhcp->getText();
@ -4051,7 +4203,7 @@ void PIXCfgParser::v6_dhcp_address() {
// which we do not support
consumeUntil(NEWLINE);
#line 4055 "PIXCfgParser.cpp"
#line 4207 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -4078,7 +4230,7 @@ void PIXCfgParser::v6_static_address() {
m = LT(1);
match(IPV4);
if ( inputState->guessing==0 ) {
#line 1171 "pix.g"
#line 1220 "pix.g"
std::string label = lbl->getText();
std::string addr = a->getText();
@ -4089,7 +4241,7 @@ void PIXCfgParser::v6_static_address() {
// in case there are some other parameters after address and netmask
consumeUntil(NEWLINE);
#line 4093 "PIXCfgParser.cpp"
#line 4245 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -4110,7 +4262,7 @@ void PIXCfgParser::v7_dhcp_address() {
dhcp = LT(1);
match(DHCP);
if ( inputState->guessing==0 ) {
#line 1188 "pix.g"
#line 1237 "pix.g"
std::string addr = dhcp->getText();
importer->addInterfaceAddress(addr, "");
@ -4118,7 +4270,7 @@ void PIXCfgParser::v7_dhcp_address() {
<< " INTRFACE ADDRESS: " << addr << std::endl;
consumeUntil(NEWLINE);
#line 4122 "PIXCfgParser.cpp"
#line 4274 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -4161,7 +4313,7 @@ void PIXCfgParser::v7_static_address() {
}
}
if ( inputState->guessing==0 ) {
#line 1199 "pix.g"
#line 1248 "pix.g"
std::string addr = a->getText();
std::string netm = m->getText();
@ -4178,7 +4330,7 @@ void PIXCfgParser::v7_static_address() {
}
consumeUntil(NEWLINE);
#line 4182 "PIXCfgParser.cpp"
#line 4334 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -4207,7 +4359,7 @@ void PIXCfgParser::access_group_by_name() {
intf_label = LT(1);
match(WORD);
if ( inputState->guessing==0 ) {
#line 1250 "pix.g"
#line 1299 "pix.g"
importer->setCurrentLineNumber(LT(0)->getLine());
importer->setInterfaceAndDirectionForRuleSet(
@ -4219,7 +4371,7 @@ void PIXCfgParser::access_group_by_name() {
<< " " << intf_label->getText()
<< " " << dir->getText() << std::endl;
#line 4223 "PIXCfgParser.cpp"
#line 4375 "PIXCfgParser.cpp"
}
}
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& ex) {
@ -4248,6 +4400,7 @@ const char* PIXCfgParser::tokenNames[] = {
"\"name\"",
"IPV4",
"WORD",
"IPV6",
"\"ah\"",
"\"eigrp\"",
"\"esp\"",
@ -4377,53 +4530,53 @@ const char* PIXCfgParser::tokenNames[] = {
const unsigned long PIXCfgParser::_tokenSet_0_data_[] = { 2UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// EOF
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgParser::_tokenSet_0(_tokenSet_0_data_,6);
const unsigned long PIXCfgParser::_tokenSet_1_data_[] = { 67111794UL, 43909632UL, 448UL, 3UL, 0UL, 0UL, 0UL, 0UL };
// EOF NEWLINE "quit" "ip" "names" "name" WORD "object" "object-group"
const unsigned long PIXCfgParser::_tokenSet_1_data_[] = { 134224754UL, 87819264UL, 896UL, 6UL, 0UL, 0UL, 0UL, 0UL };
// EOF NEWLINE "quit" "ip" "names" "name" WORD IPV6 "object" "object-group"
// "crypto" "certificate" "PIX" "ASA" "hostname" "access-list" "controller"
// "interface" LINE_COMMENT "exit" COLON_COMMENT
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgParser::_tokenSet_1(_tokenSet_1_data_,8);
const unsigned long PIXCfgParser::_tokenSet_2_data_[] = { 547422272UL, 0UL, 301989376UL, 0UL, 0UL, 0UL, 0UL, 0UL };
const unsigned long PIXCfgParser::_tokenSet_2_data_[] = { 1094844480UL, 0UL, 603978752UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// "ip" "igmp" "ospf" "pim" "description" "vlan" "speed" "duplex" "ddns"
// "forward" "delay" "hold-time" "ipv6" "mac-address" "multicast" PPPOE
// "rip" "no" "security-level" "nameif" "shutdown" "switchport"
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgParser::_tokenSet_2(_tokenSet_2_data_,8);
const unsigned long PIXCfgParser::_tokenSet_3_data_[] = { 1140854642UL, 43909632UL, 449UL, 3UL, 0UL, 0UL, 0UL, 0UL };
// EOF NEWLINE "quit" "ip" "names" "name" IPV4 WORD "object" "host" "object-group"
// "crypto" "certificate" "PIX" "ASA" "hostname" "access-list" "any" "controller"
// "interface" LINE_COMMENT "exit" COLON_COMMENT
const unsigned long PIXCfgParser::_tokenSet_3_data_[] = { 2281709426UL, 87819264UL, 898UL, 6UL, 0UL, 0UL, 0UL, 0UL };
// EOF NEWLINE "quit" "ip" "names" "name" IPV4 WORD IPV6 "object" "host"
// "object-group" "crypto" "certificate" "PIX" "ASA" "hostname" "access-list"
// "any" "controller" "interface" LINE_COMMENT "exit" COLON_COMMENT
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgParser::_tokenSet_3(_tokenSet_3_data_,8);
const unsigned long PIXCfgParser::_tokenSet_4_data_[] = { 67104832UL, 8UL, 0UL, 0UL, 0UL, 0UL };
const unsigned long PIXCfgParser::_tokenSet_4_data_[] = { 134209600UL, 16UL, 0UL, 0UL, 0UL, 0UL };
// "ip" "ah" "eigrp" "esp" "gre" "igmp" "igrp" "ipinip" IPSEC "nos" "ospf"
// "pcp" "pim" PPTP SNP INT_CONST
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgParser::_tokenSet_4(_tokenSet_4_data_,6);
const unsigned long PIXCfgParser::_tokenSet_5_data_[] = { 67111794UL, 43909888UL, 448UL, 3UL, 0UL, 0UL, 0UL, 0UL };
// EOF NEWLINE "quit" "ip" "names" "name" WORD "object" "destination" "object-group"
// "crypto" "certificate" "PIX" "ASA" "hostname" "access-list" "controller"
// "interface" LINE_COMMENT "exit" COLON_COMMENT
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgParser::_tokenSet_5(_tokenSet_5_data_,8);
const unsigned long PIXCfgParser::_tokenSet_6_data_[] = { 1140854642UL, 43909888UL, 511UL, 3UL, 0UL, 0UL, 0UL, 0UL };
// EOF NEWLINE "quit" "ip" "names" "name" IPV4 WORD "object" "host" "destination"
const unsigned long PIXCfgParser::_tokenSet_5_data_[] = { 134224754UL, 87819776UL, 896UL, 6UL, 0UL, 0UL, 0UL, 0UL };
// EOF NEWLINE "quit" "ip" "names" "name" WORD IPV6 "object" "destination"
// "object-group" "crypto" "certificate" "PIX" "ASA" "hostname" "access-list"
// "any" "log" "log-input" "established" "fragments" "time-range" "controller"
// "interface" LINE_COMMENT "exit" COLON_COMMENT
// "controller" "interface" LINE_COMMENT "exit" COLON_COMMENT
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgParser::_tokenSet_5(_tokenSet_5_data_,8);
const unsigned long PIXCfgParser::_tokenSet_6_data_[] = { 2281709426UL, 87819776UL, 1022UL, 6UL, 0UL, 0UL, 0UL, 0UL };
// EOF NEWLINE "quit" "ip" "names" "name" IPV4 WORD IPV6 "object" "host"
// "destination" "object-group" "crypto" "certificate" "PIX" "ASA" "hostname"
// "access-list" "any" "log" "log-input" "established" "fragments" "time-range"
// "controller" "interface" LINE_COMMENT "exit" COLON_COMMENT
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgParser::_tokenSet_6(_tokenSet_6_data_,8);
const unsigned long PIXCfgParser::_tokenSet_7_data_[] = { 16UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// NEWLINE
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgParser::_tokenSet_7(_tokenSet_7_data_,6);
const unsigned long PIXCfgParser::_tokenSet_8_data_[] = { 1073742848UL, 0UL, 1UL, 0UL, 0UL, 0UL, 0UL, 0UL };
const unsigned long PIXCfgParser::_tokenSet_8_data_[] = { 2147484672UL, 0UL, 2UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// IPV4 "host" "any"
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgParser::_tokenSet_8(_tokenSet_8_data_,8);
const unsigned long PIXCfgParser::_tokenSet_9_data_[] = { 3221228560UL, 4026531848UL, 63UL, 0UL, 0UL, 0UL, 0UL, 0UL };
const unsigned long PIXCfgParser::_tokenSet_9_data_[] = { 2147486736UL, 3758096401UL, 127UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// NEWLINE IPV4 WORD "host" "range" INT_CONST "eq" "gt" "lt" "neq" "any"
// "log" "log-input" "established" "fragments" "time-range"
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgParser::_tokenSet_9(_tokenSet_9_data_,8);
const unsigned long PIXCfgParser::_tokenSet_10_data_[] = { 16UL, 0UL, 22UL, 0UL, 0UL, 0UL, 0UL, 0UL };
const unsigned long PIXCfgParser::_tokenSet_10_data_[] = { 16UL, 0UL, 44UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// NEWLINE "log" "log-input" "fragments"
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgParser::_tokenSet_10(_tokenSet_10_data_,8);
const unsigned long PIXCfgParser::_tokenSet_11_data_[] = { 16UL, 0UL, 6UL, 0UL, 0UL, 0UL, 0UL, 0UL };
const unsigned long PIXCfgParser::_tokenSet_11_data_[] = { 16UL, 0UL, 12UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// NEWLINE "log" "log-input"
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgParser::_tokenSet_11(_tokenSet_11_data_,8);
const unsigned long PIXCfgParser::_tokenSet_12_data_[] = { 16UL, 0UL, 54UL, 0UL, 0UL, 0UL, 0UL, 0UL };
const unsigned long PIXCfgParser::_tokenSet_12_data_[] = { 16UL, 0UL, 108UL, 0UL, 0UL, 0UL, 0UL, 0UL };
// NEWLINE "log" "log-input" "fragments" "time-range"
const ANTLR_USE_NAMESPACE(antlr)BitSet PIXCfgParser::_tokenSet_12(_tokenSet_12_data_,8);

View File

@ -32,7 +32,7 @@ class PIXImporter;
#line 33 "PIXCfgParser.hpp"
class CUSTOM_API PIXCfgParser : public ANTLR_USE_NAMESPACE(antlr)LLkParser, public PIXCfgParserTokenTypes
{
#line 73 "pix.g"
#line 74 "pix.g"
// additional methods and members
@ -157,10 +157,10 @@ protected:
private:
static const char* tokenNames[];
#ifndef NO_STATIC_CONSTS
static const int NUM_TOKENS = 135;
static const int NUM_TOKENS = 136;
#else
enum {
NUM_TOKENS = 135
NUM_TOKENS = 136
};
#endif

File diff suppressed because it is too large Load Diff

View File

@ -20,129 +20,130 @@ struct CUSTOM_API PIXCfgParserTokenTypes {
NAME = 9,
IPV4 = 10,
WORD = 11,
AH = 12,
EIGRP = 13,
ESP = 14,
GRE = 15,
IGMP = 16,
IGRP = 17,
IPINIP = 18,
IPSEC = 19,
NOS = 20,
OSPF = 21,
PCP = 22,
PIM = 23,
PPTP = 24,
SNP = 25,
OBJECT = 26,
NETWORK = 27,
NAT = 28,
DESCRIPTION = 29,
HOST = 30,
RANGE = 31,
SUBNET = 32,
SERVICE = 33,
ICMP = 34,
INT_CONST = 35,
ICMP6 = 36,
TCP = 37,
UDP = 38,
SOURCE = 39,
DESTINATION = 40,
OBJECT_GROUP = 41,
GROUP_OBJECT = 42,
NETWORK_OBJECT = 43,
PROTOCOL = 44,
PROTOCOL_OBJECT = 45,
ICMP_TYPE = 46,
ICMP_OBJECT = 47,
SERVICE_OBJECT = 48,
CRYPTO = 49,
CERTIFICATE = 50,
PIX_WORD = 51,
ASA_WORD = 52,
VERSION_WORD = 53,
NUMBER = 54,
HOSTNAME = 55,
STRING = 56,
ACCESS_LIST = 57,
PERMIT = 58,
DENY = 59,
P_EQ = 60,
P_GT = 61,
P_LT = 62,
P_NEQ = 63,
ANY = 64,
LOG = 65,
LOG_INPUT = 66,
ESTABLISHED = 67,
FRAGMENTS = 68,
TIME_RANGE = 69,
CONTROLLER = 70,
INTRFACE = 71,
LINE_COMMENT = 72,
VLAN = 73,
SPEED = 74,
DUPLEX = 75,
DDNS = 76,
FORWARD = 77,
DELAY = 78,
HOLD_TIME = 79,
IPV6 = 80,
MAC_ADDRESS = 81,
MULTICAST = 82,
PPPOE = 83,
RIP = 84,
NO = 85,
SEC_LEVEL = 86,
NAMEIF = 87,
SHUTDOWN = 88,
ADDRESS = 89,
DHCP = 90,
STANDBY = 91,
SWITCHPORT = 92,
ACCESS = 93,
REMARK = 94,
ACCESS_GROUP = 95,
EXIT = 96,
COLON_COMMENT = 97,
SECONDARY = 98,
SETROUTE = 99,
EXTENDED = 100,
STANDARD = 101,
Whitespace = 102,
HEX_CONST = 103,
NEG_INT_CONST = 104,
DIGIT = 105,
HEXDIGIT = 106,
PIPE_CHAR = 107,
NUMBER_SIGN = 108,
PERCENT = 109,
AMPERSAND = 110,
APOSTROPHE = 111,
OPENING_PAREN = 112,
CLOSING_PAREN = 113,
STAR = 114,
PLUS = 115,
COMMA = 116,
MINUS = 117,
DOT = 118,
SLASH = 119,
COLON = 120,
SEMICOLON = 121,
LESS_THAN = 122,
EQUALS = 123,
GREATER_THAN = 124,
QUESTION = 125,
COMMERCIAL_AT = 126,
OPENING_SQUARE = 127,
CLOSING_SQUARE = 128,
CARET = 129,
UNDERLINE = 130,
OPENING_BRACE = 131,
CLOSING_BRACE = 132,
TILDE = 133,
EXLAMATION = 134,
IPV6 = 12,
AH = 13,
EIGRP = 14,
ESP = 15,
GRE = 16,
IGMP = 17,
IGRP = 18,
IPINIP = 19,
IPSEC = 20,
NOS = 21,
OSPF = 22,
PCP = 23,
PIM = 24,
PPTP = 25,
SNP = 26,
OBJECT = 27,
NETWORK = 28,
NAT = 29,
DESCRIPTION = 30,
HOST = 31,
RANGE = 32,
SUBNET = 33,
SERVICE = 34,
ICMP = 35,
INT_CONST = 36,
ICMP6 = 37,
TCP = 38,
UDP = 39,
SOURCE = 40,
DESTINATION = 41,
OBJECT_GROUP = 42,
GROUP_OBJECT = 43,
NETWORK_OBJECT = 44,
PROTOCOL = 45,
PROTOCOL_OBJECT = 46,
ICMP_TYPE = 47,
ICMP_OBJECT = 48,
SERVICE_OBJECT = 49,
CRYPTO = 50,
CERTIFICATE = 51,
PIX_WORD = 52,
ASA_WORD = 53,
VERSION_WORD = 54,
NUMBER = 55,
HOSTNAME = 56,
STRING = 57,
ACCESS_LIST = 58,
PERMIT = 59,
DENY = 60,
P_EQ = 61,
P_GT = 62,
P_LT = 63,
P_NEQ = 64,
ANY = 65,
LOG = 66,
LOG_INPUT = 67,
ESTABLISHED = 68,
FRAGMENTS = 69,
TIME_RANGE = 70,
CONTROLLER = 71,
INTRFACE = 72,
LINE_COMMENT = 73,
VLAN = 74,
SPEED = 75,
DUPLEX = 76,
DDNS = 77,
FORWARD = 78,
DELAY = 79,
HOLD_TIME = 80,
IPV6_C = 81,
MAC_ADDRESS = 82,
MULTICAST = 83,
PPPOE = 84,
RIP = 85,
NO = 86,
SEC_LEVEL = 87,
NAMEIF = 88,
SHUTDOWN = 89,
ADDRESS = 90,
DHCP = 91,
STANDBY = 92,
SWITCHPORT = 93,
ACCESS = 94,
REMARK = 95,
ACCESS_GROUP = 96,
EXIT = 97,
COLON_COMMENT = 98,
SECONDARY = 99,
SETROUTE = 100,
EXTENDED = 101,
STANDARD = 102,
Whitespace = 103,
HEX_CONST = 104,
NEG_INT_CONST = 105,
DIGIT = 106,
HEXDIGIT = 107,
PIPE_CHAR = 108,
NUMBER_SIGN = 109,
PERCENT = 110,
AMPERSAND = 111,
APOSTROPHE = 112,
OPENING_PAREN = 113,
CLOSING_PAREN = 114,
STAR = 115,
PLUS = 116,
COMMA = 117,
MINUS = 118,
DOT = 119,
SLASH = 120,
COLON = 121,
SEMICOLON = 122,
LESS_THAN = 123,
EQUALS = 124,
GREATER_THAN = 125,
QUESTION = 126,
COMMERCIAL_AT = 127,
OPENING_SQUARE = 128,
CLOSING_SQUARE = 129,
CARET = 130,
UNDERLINE = 131,
OPENING_BRACE = 132,
CLOSING_BRACE = 133,
TILDE = 134,
EXLAMATION = 135,
NULL_TREE_LOOKAHEAD = 3
};
#ifdef __cplusplus

View File

@ -8,126 +8,127 @@ NAMES="names"=8
NAME="name"=9
IPV4=10
WORD=11
AH="ah"=12
EIGRP="eigrp"=13
ESP="esp"=14
GRE="gre"=15
IGMP="igmp"=16
IGRP="igrp"=17
IPINIP="ipinip"=18
IPSEC=19
NOS="nos"=20
OSPF="ospf"=21
PCP="pcp"=22
PIM="pim"=23
PPTP=24
SNP=25
OBJECT="object"=26
NETWORK="network"=27
NAT="nat"=28
DESCRIPTION="description"=29
HOST="host"=30
RANGE="range"=31
SUBNET="subnet"=32
SERVICE="service"=33
ICMP="icmp"=34
INT_CONST=35
ICMP6=36
TCP="tcp"=37
UDP="udp"=38
SOURCE="source"=39
DESTINATION="destination"=40
OBJECT_GROUP="object-group"=41
GROUP_OBJECT="group-object"=42
NETWORK_OBJECT="network-object"=43
PROTOCOL="protocol"=44
PROTOCOL_OBJECT="protocol-object"=45
ICMP_TYPE="icmp-type"=46
ICMP_OBJECT="icmp-object"=47
SERVICE_OBJECT="service-object"=48
CRYPTO="crypto"=49
CERTIFICATE="certificate"=50
PIX_WORD="PIX"=51
ASA_WORD="ASA"=52
VERSION_WORD="Version"=53
NUMBER=54
HOSTNAME="hostname"=55
STRING=56
ACCESS_LIST="access-list"=57
PERMIT="permit"=58
DENY="deny"=59
P_EQ="eq"=60
P_GT="gt"=61
P_LT="lt"=62
P_NEQ="neq"=63
ANY="any"=64
LOG="log"=65
LOG_INPUT="log-input"=66
ESTABLISHED="established"=67
FRAGMENTS="fragments"=68
TIME_RANGE="time-range"=69
CONTROLLER="controller"=70
INTRFACE="interface"=71
LINE_COMMENT=72
VLAN="vlan"=73
SPEED="speed"=74
DUPLEX="duplex"=75
DDNS="ddns"=76
FORWARD="forward"=77
DELAY="delay"=78
HOLD_TIME="hold-time"=79
IPV6="ipv6"=80
MAC_ADDRESS="mac-address"=81
MULTICAST="multicast"=82
PPPOE=83
RIP="rip"=84
NO="no"=85
SEC_LEVEL="security-level"=86
NAMEIF="nameif"=87
SHUTDOWN="shutdown"=88
ADDRESS="address"=89
DHCP="dhcp"=90
STANDBY="standby"=91
SWITCHPORT="switchport"=92
ACCESS="access"=93
REMARK="remark"=94
ACCESS_GROUP="access-group"=95
EXIT="exit"=96
COLON_COMMENT=97
SECONDARY="secondary"=98
SETROUTE="setroute"=99
EXTENDED="extended"=100
STANDARD="standard"=101
Whitespace=102
HEX_CONST=103
NEG_INT_CONST=104
DIGIT=105
HEXDIGIT=106
PIPE_CHAR=107
NUMBER_SIGN=108
PERCENT=109
AMPERSAND=110
APOSTROPHE=111
OPENING_PAREN=112
CLOSING_PAREN=113
STAR=114
PLUS=115
COMMA=116
MINUS=117
DOT=118
SLASH=119
COLON=120
SEMICOLON=121
LESS_THAN=122
EQUALS=123
GREATER_THAN=124
QUESTION=125
COMMERCIAL_AT=126
OPENING_SQUARE=127
CLOSING_SQUARE=128
CARET=129
UNDERLINE=130
OPENING_BRACE=131
CLOSING_BRACE=132
TILDE=133
EXLAMATION=134
IPV6=12
AH="ah"=13
EIGRP="eigrp"=14
ESP="esp"=15
GRE="gre"=16
IGMP="igmp"=17
IGRP="igrp"=18
IPINIP="ipinip"=19
IPSEC=20
NOS="nos"=21
OSPF="ospf"=22
PCP="pcp"=23
PIM="pim"=24
PPTP=25
SNP=26
OBJECT="object"=27
NETWORK="network"=28
NAT="nat"=29
DESCRIPTION="description"=30
HOST="host"=31
RANGE="range"=32
SUBNET="subnet"=33
SERVICE="service"=34
ICMP="icmp"=35
INT_CONST=36
ICMP6=37
TCP="tcp"=38
UDP="udp"=39
SOURCE="source"=40
DESTINATION="destination"=41
OBJECT_GROUP="object-group"=42
GROUP_OBJECT="group-object"=43
NETWORK_OBJECT="network-object"=44
PROTOCOL="protocol"=45
PROTOCOL_OBJECT="protocol-object"=46
ICMP_TYPE="icmp-type"=47
ICMP_OBJECT="icmp-object"=48
SERVICE_OBJECT="service-object"=49
CRYPTO="crypto"=50
CERTIFICATE="certificate"=51
PIX_WORD="PIX"=52
ASA_WORD="ASA"=53
VERSION_WORD="Version"=54
NUMBER=55
HOSTNAME="hostname"=56
STRING=57
ACCESS_LIST="access-list"=58
PERMIT="permit"=59
DENY="deny"=60
P_EQ="eq"=61
P_GT="gt"=62
P_LT="lt"=63
P_NEQ="neq"=64
ANY="any"=65
LOG="log"=66
LOG_INPUT="log-input"=67
ESTABLISHED="established"=68
FRAGMENTS="fragments"=69
TIME_RANGE="time-range"=70
CONTROLLER="controller"=71
INTRFACE="interface"=72
LINE_COMMENT=73
VLAN="vlan"=74
SPEED="speed"=75
DUPLEX="duplex"=76
DDNS="ddns"=77
FORWARD="forward"=78
DELAY="delay"=79
HOLD_TIME="hold-time"=80
IPV6_C="ipv6"=81
MAC_ADDRESS="mac-address"=82
MULTICAST="multicast"=83
PPPOE=84
RIP="rip"=85
NO="no"=86
SEC_LEVEL="security-level"=87
NAMEIF="nameif"=88
SHUTDOWN="shutdown"=89
ADDRESS="address"=90
DHCP="dhcp"=91
STANDBY="standby"=92
SWITCHPORT="switchport"=93
ACCESS="access"=94
REMARK="remark"=95
ACCESS_GROUP="access-group"=96
EXIT="exit"=97
COLON_COMMENT=98
SECONDARY="secondary"=99
SETROUTE="setroute"=100
EXTENDED="extended"=101
STANDARD="standard"=102
Whitespace=103
HEX_CONST=104
NEG_INT_CONST=105
DIGIT=106
HEXDIGIT=107
PIPE_CHAR=108
NUMBER_SIGN=109
PERCENT=110
AMPERSAND=111
APOSTROPHE=112
OPENING_PAREN=113
CLOSING_PAREN=114
STAR=115
PLUS=116
COMMA=117
MINUS=118
DOT=119
SLASH=120
COLON=121
SEMICOLON=122
LESS_THAN=123
EQUALS=124
GREATER_THAN=125
QUESTION=126
COMMERCIAL_AT=127
OPENING_SQUARE=128
CLOSING_SQUARE=129
CARET=130
UNDERLINE=131
OPENING_BRACE=132
CLOSING_BRACE=133
TILDE=134
EXLAMATION=135

View File

@ -69,6 +69,7 @@ options
{
k = 2;
// defaultErrorHandler=false;
// see http://www.antlr2.org/doc/options.html
}
{
// additional methods and members
@ -129,11 +130,6 @@ cfgfile :
)+
;
//****************************************************************
// ip_commands : IP ( ip_access_list_ext | community_list_command | unknown_ip_command )
// ;
//****************************************************************
quit : QUIT
{
@ -159,12 +155,21 @@ names_section : NAMES
}
;
name_entry : NAME a:IPV4 n:WORD
name_entry : NAME (a:IPV4 n:WORD) | (v6:IPV6)
{
importer->setCurrentLineNumber(LT(0)->getLine());
importer->addMessageToLog(
"Name " + a->getText() + " " + n->getText());
*dbg << "Name " << a->getText() << " " << n->getText() << std::endl;
if (a)
{
importer->setCurrentLineNumber(LT(0)->getLine());
importer->addMessageToLog(
"Name " + a->getText() + " " + n->getText());
*dbg << "Name " << a->getText() << " " << n->getText() << std::endl;
}
if (v6)
{
importer->addMessageToLog(
"Parser warning: IPv6 import is not supported. ");
consumeUntil(NEWLINE);
}
}
;
@ -236,13 +241,28 @@ named_object_description : DESCRIPTION
}
;
host_addr : (HOST h:IPV4)
// construct such as "host 2001:0db8:85a3:0000:0000:8a2e:0370:7334" does not
// parse but the parser should not fail catastrophically and should continue
// working with input stream. This grammar splits words on ":" boundary and
// so the ipv6 address appears as token INT_CONST (2001), then a word that
// starts with ':'.
//
host_addr : (HOST (h:IPV4 | v6:IPV6))
{
importer->setCurrentLineNumber(LT(0)->getLine());
importer->tmp_a = h->getText();
importer->tmp_nm = "255.255.255.255";
importer->commitNamedAddressObject();
*dbg << h->getText() << "/255.255.255.255";
if (h)
{
importer->tmp_a = h->getText();
importer->tmp_nm = "255.255.255.255";
importer->commitNamedAddressObject();
*dbg << h->getText() << "/255.255.255.255";
}
if (v6)
{
importer->addMessageToLog(
"Parser warning: IPv6 import is not supported. ");
consumeUntil(NEWLINE);
}
}
;
@ -256,15 +276,26 @@ range_addr : (RANGE r1:IPV4 r2:IPV4)
}
;
subnet_addr : (SUBNET a:IPV4 nm:IPV4)
subnet_addr : (SUBNET ((a:IPV4 nm:IPV4) | v6:IPV6))
{
importer->setCurrentLineNumber(LT(0)->getLine());
importer->tmp_a = a->getText();
importer->tmp_nm = nm->getText();
importer->commitNamedAddressObject();
*dbg << a->getText() << "/" << nm->getText();
if (a)
{
importer->tmp_a = a->getText();
importer->tmp_nm = nm->getText();
importer->commitNamedAddressObject();
*dbg << a->getText() << "/" << nm->getText();
}
if (v6)
{
importer->addMessageToLog(
"Parser warning: IPv6 import is not supported. ");
consumeUntil(NEWLINE);
}
}
;
//****************************************************************
named_object_service : OBJECT SERVICE name:WORD
@ -415,20 +446,38 @@ network_object : NETWORK_OBJECT
importer->setCurrentLineNumber(LT(0)->getLine());
}
(
a:IPV4 nm:IPV4
( (a:IPV4 nm:IPV4) | v6:IPV6 )
{
importer->tmp_a = a->getText();
importer->tmp_nm = nm->getText();
importer->addNetworkToObjectGroup();
*dbg << a->getText() << "/" << nm->getText();
if (a)
{
importer->tmp_a = a->getText();
importer->tmp_nm = nm->getText();
importer->addNetworkToObjectGroup();
*dbg << a->getText() << "/" << nm->getText();
}
if (v6)
{
importer->addMessageToLog(
"Parser warning: IPv6 import is not supported. ");
consumeUntil(NEWLINE);
}
}
|
HOST h:IPV4
HOST ( h:IPV4 | hv6:IPV6)
{
importer->tmp_a = h->getText();
importer->tmp_nm = "255.255.255.255";
importer->addNetworkToObjectGroup();
*dbg << h->getText() << "/255.255.255.255";
if (h)
{
importer->tmp_a = h->getText();
importer->tmp_nm = "255.255.255.255";
importer->addNetworkToObjectGroup();
*dbg << h->getText() << "/255.255.255.255";
}
if (hv6)
{
importer->addMessageToLog(
"Parser warning: IPv6 import is not supported. ");
consumeUntil(NEWLINE);
}
}
|
OBJECT name:WORD
@ -1040,7 +1089,7 @@ unsupported_interface_commands :
|
IGMP
|
IPV6
IPV6_C
|
MAC_ADDRESS
|
@ -1287,7 +1336,7 @@ comment : (LINE_COMMENT | COLON_COMMENT) ;
class PIXCfgLexer extends Lexer;
options
{
k = 10;
k = 3;
// ASCII only
charVocabulary = '\3'..'\377';
}
@ -1313,7 +1362,7 @@ tokens
DDNS = "ddns";
FORWARD = "forward";
HOLD_TIME = "hold-time";
IPV6 = "ipv6";
IPV6_C = "ipv6";
MAC_ADDRESS = "mac-address";
MULTICAST = "multicast";
@ -1438,23 +1487,35 @@ protected
DIGIT : '0'..'9' ;
protected
HEXDIGIT : '0'..'9' | 'A'..'F' ;
HEXDIGIT : 'a'..'f' ;
NUMBER :
(
( (DIGIT)+ DOT (DIGIT)+ DOT (DIGIT)+ )=> ( (DIGIT)+ DOT (DIGIT)+ DOT (DIGIT)+ DOT (DIGIT)+ )
{ _ttype = IPV4; }
|
( (DIGIT)+ DOT (DIGIT)+ )=> ( (DIGIT)+ DOT (DIGIT)+ )
( DIGIT ) =>
(
( (DIGIT)+ DOT (DIGIT)+ DOT (DIGIT)+ ) =>
( (DIGIT)+ DOT (DIGIT)+ DOT (DIGIT)+ DOT (DIGIT)+ )
{ _ttype = IPV4; }
|
( (DIGIT)+ DOT (DIGIT)+ )=> ( (DIGIT)+ DOT (DIGIT)+ )
|
( DIGIT )+ { _ttype = INT_CONST; }
)
|
( DIGIT )+ { _ttype = INT_CONST; }
|
( '0' 'x' ( HEXDIGIT )+ ) { _ttype = HEX_CONST; }
( ( 'a'..'f' | '0'..'9' )+ COLON ) =>
(
( ( 'a'..'f' | '0'..'9' )+
( COLON ( 'a'..'f' | '0'..'9' )* )+ )
{ _ttype = IPV6; }
)
|
( 'a'..'z' | 'A'..'Z' | '$' )
( '!'..'/' | '0'..'9' | ':' | ';' | '<' | '=' | '>' |
'?' | '@' | 'A'..'Z' | '\\' | '^' | '_' | '`' | 'a'..'z' )*
{ _ttype = WORD; }
)
;
WORD : ( 'a'..'z' | 'A'..'Z' | '$' ) ( '!'..'/' | '0'..'9' | ':' | ';' | '<' | '=' | '>' | '?' | '@' | 'A'..'Z' | '\\' | '^' | '_' | '`' | 'a'..'z' )*
;
STRING : '"' (~'"')* '"';

View File

@ -9,6 +9,7 @@ names
name 1.2.3.4 gw
name 192.168.3.0 fake_network
name 192.168.4.1 inside_ip
name 2001:0db8:85a3:0000:0000:8a2e:0370:7334 some_ipv6_address
!
interface Vlan1
description inside interface
@ -93,11 +94,17 @@ object network my-inside-net
! ipv6 addresses
!
object network ipv6-host-object-1
host 2001:0db8:85a3:0000:0000:8a2e:0370:7334
description Example of IPv6 host object
host 2001::1
object network ipv6-network-object-1
description IPv6 network object example
subnet 2001::/64
description IPv6 network object example
object network ipv6-host-object-3
host fe80::202:b3ff:fe1e:8329
description Example of IPv6 host object
object network ipv6-host-object-3
host a1b2:c3d4:e5f6:b3ff:fe1e:8329:0:1234
description Example of IPv6 host object
! empty named object definition
object network dummy-address
@ -111,6 +118,13 @@ object network dummy-address-1
object network internal_subnet_6
subnet 10.10.2.0 255.255.255.0
!
object network ipv6-host-object-2
host 2001:af::1
description Test IPv6 host
object network host-1
host 10.0.0.1
!
object service smtp
service tcp destination eq smtp
object service http