From igorm at etf.rs Thu Aug 2 07:59:01 2012 From: igorm at etf.rs (=?ISO-8859-2?Q?Igor_Maravi=E6?=) Date: Thu, 2 Aug 2012 16:59:01 +0200 Subject: [Xorp-hackers] [Xorp-users] XORP Presentation - need HELP In-Reply-To: <047d01cd6f26$0c98e700$25cab500$@maine.edu> References: <5016B04B.1010701@candelatech.com> <047d01cd6f26$0c98e700$25cab500$@maine.edu> Message-ID: Thank You Gary :) Is there anybody else who want to share with the community how do they use Xorp? BR Igor 2012/7/31 Garry Peirce : > Igor, > We in Maine (US) have been using XORP (1.6 moving to CT) within a developed > CPE appliance for our K12 environment (~100 in production) for about 3 years > now. > The device allows us to cost effectively enable more services at the edge , > aggregate school district connectivity, and allow a level of local admin > control/visibility. > We use it for v4 unicast/mcast, and make use of both RIP and OSPF. > > Some info here: http://www.networkmaine.net/msln/joebox/ > This is actually a 'Maine' version of a device derived through a partnership > we have with an organization called 'mecnet' - http://www.mecnet.net. > > >> -----Original Message----- >> From: xorp-users-bounces at xorp.org [mailto:xorp-users-bounces at xorp.org] >> On Behalf Of Igor Maravic >> Sent: Tuesday, July 31, 2012 4:16 AM >> To: Achmad Basuki >> Cc: xorp-hackers at icir.org; xorp-users at icir.org >> Subject: Re: [Xorp-users] XORP Presentation - need HELP >> >> Thank you Achmad and Ben! :) >> >> We're research group of School of Electrical Engineering of Belgrade >> University, Serbia. >> As a part of our research we're building internet router. Our data plane > is >> almost finished, and we needed solution for our control plane. >> >> This is where Xorp fits in. :) >> >> We still didn't put it on our board, so currently we're just improving it > and >> we're developing MPLS part. >> Of course, we're going to push our code back to the Xorp, as soon as it >> becomes operational. >> >> Is there anybody else who is using Xorp? >> >> BR >> Igor >> >> _______________________________________________ >> Xorp-users mailing list >> Xorp-users at xorp.org >> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users > From jiangxin.hu at crc.gc.ca Fri Aug 3 10:49:00 2012 From: jiangxin.hu at crc.gc.ca (Jiangxin Hu) Date: Fri, 3 Aug 2012 13:49:00 -0400 Subject: [Xorp-hackers] A standalone routing protocol wrapper for XORP In-Reply-To: Message-ID: <20120803174846.9848D6B2DAF@mailhub.crc.ca> Hi, We are a small research group in CRC. We developed a wrapper routing protocol for XORP. The protocol allows wrapper a standalone version routing protocol to work with XORP without developing a special version for XORP. No need to learn how to use XRL, sometimes, no protocol source code required. It could be a great tool for XORP. We want to integrate this protocol into XORP so people who want to use it no need to patch their XORP and rebuild. Who should we contact? Regards, Jiangxin From greearb at candelatech.com Fri Aug 3 11:03:38 2012 From: greearb at candelatech.com (Ben Greear) Date: Fri, 03 Aug 2012 11:03:38 -0700 Subject: [Xorp-hackers] A standalone routing protocol wrapper for XORP In-Reply-To: <20120803174846.9848D6B2DAF@mailhub.crc.ca> References: <20120803174846.9848D6B2DAF@mailhub.crc.ca> Message-ID: <501C127A.9070300@candelatech.com> On 08/03/2012 10:49 AM, Jiangxin Hu wrote: > > Hi, > > We are a small research group in CRC. We developed a wrapper routing > protocol for XORP. The protocol allows wrapper a standalone version routing > protocol to work with XORP without developing a special version for XORP. No > need to learn how to use XRL, sometimes, no protocol source code required. > It could be a great tool for XORP. > > We want to integrate this protocol into XORP so people who want to use it no > need to patch their XORP and rebuild. > > Who should we contact? Please post your patches to this group (xorp-hackers). Preferably in 'git format-patch' format with useful comments and such. Thanks, Ben > > Regards, > Jiangxin > > _______________________________________________ > Xorp-hackers mailing list > Xorp-hackers at icir.org > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers > -- Ben Greear Candela Technologies Inc http://www.candelatech.com From leonshg at gmail.com Mon Aug 6 07:16:23 2012 From: leonshg at gmail.com (Leonid Shigris) Date: Mon, 6 Aug 2012 17:16:23 +0300 Subject: [Xorp-hackers] help Message-ID: Hi, I'm using xorp 1.8.6-wip. My problem is, When I try set over 100 static routes : #set protocols static route 120.0.1.0/24 next-hop 170.105.1.1 #set protocols static route 120.0.2.0/24 next-hop 170.105.1.1 #set protocols static route 120.0.3.0/24 next-hop 170.105.1.1 #set protocols static route 120.0.4.0/24 next-hop 170.105.1.1 #set protocols static route 120.0.5.0/24 next-hop 170.105.1.1 #set protocols static route 120.0.6.0/24 next-hop 170.105.1.1 #set protocols static route 120.0.7.0/24 next-hop 170.105.1.1 #set protocols static route 120.0.8.0/24 next-hop 170.105.1.1 etc... up to 100 routes #commit I get an error: parse error [line 375]: memory exhausted; last symbol parsed was "metric" If I set less then 90 static routes, works is fine. So, Could You please explain, where the problem can be? Is it related to bison parser? Best Regards, Leon. mail: leonshg at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20120806/f8b2356e/attachment.html From greearb at candelatech.com Mon Aug 6 08:39:37 2012 From: greearb at candelatech.com (Ben Greear) Date: Mon, 06 Aug 2012 08:39:37 -0700 Subject: [Xorp-hackers] help In-Reply-To: References: Message-ID: <501FE539.8090304@candelatech.com> On 08/06/2012 07:16 AM, Leonid Shigris wrote: > Hi, > > I'm using xorp 1.8.6-wip. > > My problem is, > > When I try set over 100 static routes : > #set protocols static route 120.0.1.0/24 next-hop 170.105.1.1 > #set protocols static route 120.0.2.0/24 next-hop 170.105.1.1 > #set protocols static route 120.0.3.0/24 next-hop 170.105.1.1 > #set protocols static route 120.0.4.0/24 next-hop 170.105.1.1 > #set protocols static route 120.0.5.0/24 next-hop 170.105.1.1 > #set protocols static route 120.0.6.0/24 next-hop 170.105.1.1 > #set protocols static route 120.0.7.0/24 next-hop 170.105.1.1 > #set protocols static route 120.0.8.0/24 next-hop 170.105.1.1 > etc... > up to 100 routes > > #commit > I get an error: > parse error [line 375]: memory exhausted; last symbol parsed was "metric" > > If I set less then 90 static routes, works is fine. > > So, Could You please explain, where the problem can be? > Is it related to bison parser? Maybe so. I'm traveling until Wednesday. I'll take a look at it when I'm back unless someone gets it fixed first. Thanks, Ben > > Best Regards, > Leon. > mail: leonshg at gmail.com > > > _______________________________________________ > Xorp-hackers mailing list > Xorp-hackers at icir.org > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers > -- Ben Greear Candela Technologies Inc http://www.candelatech.com From igorm at etf.rs Wed Aug 8 01:10:25 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Wed, 8 Aug 2012 10:10:25 +0200 Subject: [Xorp-hackers] [PATCH] xorp: rtrmgr: Memory exhausted error fix In-Reply-To: References: Message-ID: <1344413425-3416-1-git-send-email-igorm@etf.rs> From: Igor Maravic Memory was exhausted because right recursion was used instead of left recursion! Fixed that. Reported-by: Leonid Shigris Signed-off-by: Igor Maravic --- xorp/rtrmgr/boot.yy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xorp/rtrmgr/boot.yy b/xorp/rtrmgr/boot.yy index 8f47eff..dffb438 100644 --- a/xorp/rtrmgr/boot.yy +++ b/xorp/rtrmgr/boot.yy @@ -141,7 +141,7 @@ long_nodegroup: UPLEVEL statements DOWNLEVEL { pop_path(); } ; statements: /* empty string */ - | statement statements + | statements statement ; statement: terminal -- 1.7.9.5 From igorm at etf.rs Wed Aug 8 01:11:59 2012 From: igorm at etf.rs (=?ISO-8859-2?Q?Igor_Maravi=E6?=) Date: Wed, 8 Aug 2012 10:11:59 +0200 Subject: [Xorp-hackers] help In-Reply-To: <501FE539.8090304@candelatech.com> References: <501FE539.8090304@candelatech.com> Message-ID: I've just sent the patch to the list. I've tested it with 200 entries and it works fine :) Please test it. BR Igor 2012/8/6 Ben Greear : > On 08/06/2012 07:16 AM, Leonid Shigris wrote: >> Hi, >> >> I'm using xorp 1.8.6-wip. >> >> My problem is, >> >> When I try set over 100 static routes : >> #set protocols static route 120.0.1.0/24 next-hop 170.105.1.1 >> #set protocols static route 120.0.2.0/24 next-hop 170.105.1.1 >> #set protocols static route 120.0.3.0/24 next-hop 170.105.1.1 >> #set protocols static route 120.0.4.0/24 next-hop 170.105.1.1 >> #set protocols static route 120.0.5.0/24 next-hop 170.105.1.1 >> #set protocols static route 120.0.6.0/24 next-hop 170.105.1.1 >> #set protocols static route 120.0.7.0/24 next-hop 170.105.1.1 >> #set protocols static route 120.0.8.0/24 next-hop 170.105.1.1 >> etc... >> up to 100 routes >> >> #commit >> I get an error: >> parse error [line 375]: memory exhausted; last symbol parsed was "metric" >> >> If I set less then 90 static routes, works is fine. >> >> So, Could You please explain, where the problem can be? >> Is it related to bison parser? > > Maybe so. I'm traveling until Wednesday. I'll take a look at it when I'm > back unless someone gets it fixed first. > > Thanks, > Ben > >> >> Best Regards, >> Leon. >> mail: leonshg at gmail.com >> >> >> _______________________________________________ >> Xorp-hackers mailing list >> Xorp-hackers at icir.org >> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers >> > > > -- > Ben Greear > Candela Technologies Inc http://www.candelatech.com > > > _______________________________________________ > Xorp-hackers mailing list > Xorp-hackers at icir.org > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers From jiangxin.hu at crc.gc.ca Wed Aug 8 06:28:01 2012 From: jiangxin.hu at crc.gc.ca (Jiangxin Hu) Date: Wed, 8 Aug 2012 09:28:01 -0400 Subject: [Xorp-hackers] A standalone routing protocol wrapper for XORP In-Reply-To: <501C127A.9070300@candelatech.com> Message-ID: <20120808132808.3A4966B2E31@mailhub.crc.ca> Attached is the wrapper routingh protocol for XORP. I don't have git so the patch is not a git format patch. The patch is very simple so it won't be a big problem. Files attached are Xorp-wrapper.tar.gz and xorp-wrapper.patch are the changes for XORP source code. Ldwrapper-0.0.2.tar.gz is the source code of a routing wrapper which communicate with XORP wrapper to redirect routing operation to XORP. (see attached OLSRd example) Xorp-wrapper.tar.gz includes files are completely new to XORP. Following files are changed in the patch file: - xrl/targets/SConscript - xrl/interfaces/SConscript - SConscript - SConstruct - etc/templates/SConscript - etc/templates/policy.tp The protocol is called wrapper4 which only supports IPv4. We tested it with routing protocol OLSRd, OLSRv2, and BABEL. If anyone has questions, please contact me. Thanks, Jiangxin -------------- next part -------------- A non-text attachment was scrubbed... Name: ldwrapper-0.0.2.tar.gz Type: application/x-gzip Size: 335372 bytes Desc: not available Url : http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20120808/bf4388c4/attachment-0002.gz -------------- next part -------------- A non-text attachment was scrubbed... Name: xorp-wrapper.tar.gz Type: application/x-gzip Size: 19928 bytes Desc: not available Url : http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20120808/bf4388c4/attachment-0003.gz -------------- next part -------------- A non-text attachment was scrubbed... Name: xorp-wrapper.patch Type: application/octet-stream Size: 3679 bytes Desc: not available Url : http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20120808/bf4388c4/attachment-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: OLSRd example.jpg Type: image/jpeg Size: 29996 bytes Desc: not available Url : http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20120808/bf4388c4/attachment-0001.jpg From noreply at github.com Wed Aug 8 08:56:42 2012 From: noreply at github.com (GitHub) Date: Wed, 08 Aug 2012 08:56:42 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] 00cd0b: xorp: rtrmgr: Memory exhausted error fix Message-ID: <50228c3ae399f_195711edaec22950@sh2.rs.github.com.mail> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: 00cd0b4507a1f79a3cfb357b5be53068595d3c6b https://github.com/greearb/xorp.ct/commit/00cd0b4507a1f79a3cfb357b5be53068595d3c6b Author: Igor Maravic Date: 2012-08-08 (Wed, 08 Aug 2012) Changed paths: M xorp/rtrmgr/boot.yy Log Message: ----------- xorp: rtrmgr: Memory exhausted error fix Memory was exhausted because right recursion was used instead of left recursion! Fixed that. Reported-by: Leonid Shigris Signed-off-by: Igor Maravic From greearb at candelatech.com Wed Aug 8 08:57:07 2012 From: greearb at candelatech.com (Ben Greear) Date: Wed, 08 Aug 2012 08:57:07 -0700 Subject: [Xorp-hackers] help In-Reply-To: References: <501FE539.8090304@candelatech.com> Message-ID: <50228C53.6060104@candelatech.com> On 08/08/2012 01:11 AM, Igor Maravi? wrote: > I've just sent the patch to the list. I've tested it with 200 entries > and it works fine :) > Please test it. I just pushed this upstream... Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From greearb at candelatech.com Mon Aug 13 09:12:46 2012 From: greearb at candelatech.com (Ben Greear) Date: Mon, 13 Aug 2012 09:12:46 -0700 Subject: [Xorp-hackers] A standalone routing protocol wrapper for XORP In-Reply-To: <20120808132808.3A4966B2E31@mailhub.crc.ca> References: <20120808132808.3A4966B2E31@mailhub.crc.ca> Message-ID: <5029277E.5070700@candelatech.com> On 08/08/2012 06:28 AM, Jiangxin Hu wrote: > > > Attached is the wrapper routingh protocol for XORP. I don't have git so the > patch is not a git format patch. The patch is very simple so it won't be a > big problem. > > Files attached are > Xorp-wrapper.tar.gz and xorp-wrapper.patch are the changes for XORP source > code. > Ldwrapper-0.0.2.tar.gz is the source code of a routing wrapper which > communicate with XORP wrapper to redirect routing operation to XORP. (see > attached OLSRd example) > > Xorp-wrapper.tar.gz includes files are completely new to XORP. > > Following files are changed in the patch file: > - xrl/targets/SConscript > - xrl/interfaces/SConscript > - SConscript > - SConstruct > - etc/templates/SConscript > - etc/templates/policy.tp > > The protocol is called wrapper4 which only supports IPv4. We tested it with > routing protocol OLSRd, OLSRv2, and BABEL. > > If anyone has questions, please contact me. I started looking at this, and so far, it seems reasonable enough. Before I apply it, however...please confirm that you have the right to publish this code as GPL by responding to your original email with: Signed-off-by: [name] If you have any questions about what this means, let me know. As for the code itself..do you want me to add all of this to the xorp repository or are you maintaining the ldwrapper code elsewhere? It appears that ldwrapper is meant to be compiled by itself using standard compile tools instead of 'scons'? Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From jiangxin.hu at crc.gc.ca Mon Aug 13 10:45:35 2012 From: jiangxin.hu at crc.gc.ca (Jiangxin Hu) Date: Mon, 13 Aug 2012 13:45:35 -0400 Subject: [Xorp-hackers] A standalone routing protocol wrapper for XORP In-Reply-To: <20120808132808.3A4966B2E31@mailhub.crc.ca> Message-ID: <20120813174606.EFAD9EC8025@mailhub.crc.ca> Signed-off-by: [Jiangxin Hu] -----Original Message----- From: xorp-hackers-bounces at icir.org [mailto:xorp-hackers-bounces at icir.org] On Behalf Of Jiangxin Hu Sent: Wednesday, August 08, 2012 9:28 AM To: xorp-hackers at icir.org Cc: xorp-hackers at icir.org Subject: [Xorp-hackers] A standalone routing protocol wrapper for XORP Attached is the wrapper routingh protocol for XORP. I don't have git so the patch is not a git format patch. The patch is very simple so it won't be a big problem. Files attached are Xorp-wrapper.tar.gz and xorp-wrapper.patch are the changes for XORP source code. Ldwrapper-0.0.2.tar.gz is the source code of a routing wrapper which communicate with XORP wrapper to redirect routing operation to XORP. (see attached OLSRd example) Xorp-wrapper.tar.gz includes files are completely new to XORP. Following files are changed in the patch file: - xrl/targets/SConscript - xrl/interfaces/SConscript - SConscript - SConstruct - etc/templates/SConscript - etc/templates/policy.tp The protocol is called wrapper4 which only supports IPv4. We tested it with routing protocol OLSRd, OLSRv2, and BABEL. If anyone has questions, please contact me. Thanks, Jiangxin From jiangxin.hu at crc.gc.ca Mon Aug 13 11:03:19 2012 From: jiangxin.hu at crc.gc.ca (Jiangxin Hu) Date: Mon, 13 Aug 2012 14:03:19 -0400 Subject: [Xorp-hackers] A standalone routing protocol wrapper for XORP In-Reply-To: <5029277E.5070700@candelatech.com> Message-ID: <20120813180350.DA187EC8025@mailhub.crc.ca> > As for the code itself..do you want me to add all of this to the xorp repository or are you maintaining the ldwrapper code elsewhere? I prefer keep ldwrapper somewhere in xorp since it is the necessary part for the wrapper protocol. > It appears that ldwrapper is meant to be compiled by itself using standard compile tools instead of 'scons'? The ldwrapper is initially developed by my colleagues and we are not family with 'scons'. I am unable to port it to 'scons' for now. The good thing is it is a standalone package. Jiangxin -----Original Message----- From: Ben Greear [mailto:greearb at candelatech.com] Sent: Monday, August 13, 2012 12:13 PM To: Jiangxin Hu Cc: xorp-hackers at icir.org Subject: Re: [Xorp-hackers] A standalone routing protocol wrapper for XORP On 08/08/2012 06:28 AM, Jiangxin Hu wrote: > > > Attached is the wrapper routingh protocol for XORP. I don't have git > so the patch is not a git format patch. The patch is very simple so it > won't be a big problem. > > Files attached are > Xorp-wrapper.tar.gz and xorp-wrapper.patch are the changes for XORP > source code. > Ldwrapper-0.0.2.tar.gz is the source code of a routing wrapper which > communicate with XORP wrapper to redirect routing operation to XORP. > (see attached OLSRd example) > > Xorp-wrapper.tar.gz includes files are completely new to XORP. > > Following files are changed in the patch file: > - xrl/targets/SConscript > - xrl/interfaces/SConscript > - SConscript > - SConstruct > - etc/templates/SConscript > - etc/templates/policy.tp > > The protocol is called wrapper4 which only supports IPv4. We tested it > with routing protocol OLSRd, OLSRv2, and BABEL. > > If anyone has questions, please contact me. I started looking at this, and so far, it seems reasonable enough. Before I apply it, however...please confirm that you have the right to publish this code as GPL by responding to your original email with: Signed-off-by: [name] If you have any questions about what this means, let me know. As for the code itself..do you want me to add all of this to the xorp repository or are you maintaining the ldwrapper code elsewhere? It appears that ldwrapper is meant to be compiled by itself using standard compile tools instead of 'scons'? Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From igorm at etf.rs Tue Aug 14 07:45:27 2012 From: igorm at etf.rs (=?ISO-8859-2?Q?Igor_Maravi=E6?=) Date: Tue, 14 Aug 2012 16:45:27 +0200 Subject: [Xorp-hackers] Pictures in www folder Message-ID: Ben, Pictures in www folder, of git repository, are malformed. Could you replace them with good pictures? BR Igor From greearb at candelatech.com Tue Aug 14 08:31:04 2012 From: greearb at candelatech.com (Ben Greear) Date: Tue, 14 Aug 2012 08:31:04 -0700 Subject: [Xorp-hackers] Pictures in www folder In-Reply-To: References: Message-ID: <502A6F38.7060005@candelatech.com> On 08/14/2012 07:45 AM, Igor Maravi? wrote: > Ben, > Pictures in www folder, of git repository, are malformed. Could you > replace them with good pictures? Even the old svn repo I have lying around has corrupted images. Not sure where to find good ones... Maybe they could be dug out from older snapshots, or something. Thanks, Ben > BR > Igor > -- Ben Greear Candela Technologies Inc http://www.candelatech.com From Anthony.Chan at gdcanada.com Wed Aug 22 20:19:09 2012 From: Anthony.Chan at gdcanada.com (Chan, Anthony) Date: Wed, 22 Aug 2012 21:19:09 -0600 Subject: [Xorp-hackers] xorp error handling Message-ID: <0843D0F1EEBB2E49A2156C6981B4A17E08BEFD3C@CGYSVW100.gdcan.com> Hi, We are running XORP with a custom routing protocol and are able to run into the error situation where a SEND_FAILED error code is generated ("XrlPFSTCPSender died: Keepalive timeout"). After this occurs, XORP basically becomes non operational, but all the processes are still around and in a running state. Our platform is resource constrained so it is fairly easy for us to reproduce once we inject enough routes. I believe what is happening is that the RIB process becomes too busy to acknowledge the IPC keepalive between it and the routing process. However the rtrmngr/Finder does not restart the RIB because the RIB became responsive again and acknowledged the keepalive from the rtrmngr/Finder process. Since the IPC between the routing and RIB process is now down, and rtrmngr/Finder cannot detect any process issues, nothing can be done now to recover from this state. Do you believe this is a possible scenario with the current XORP error handling process?? We are using 1.8.5 without setting the environment variable " XORP_SENDER_KEEPALIVE_TIME", therefore using the default 10 seconds as the keepalive interval. Thanks, Anthony The information contained in this e-mail message is PRIVATE. It may contain confidential information and may be legally privileged. It is intended for the exclusive use of the addressee(s). If you are not the intended recipient, you are hereby notified that any dissemination, distribution or reproduction of this communication is strictly prohibited. If the intended recipient(s) cannot be reached or if a transmission problem has occurred, please notify the sender immediately by return e-mail and destroy all copies of this message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20120822/5292930e/attachment.html From greearb at candelatech.com Wed Aug 22 20:57:49 2012 From: greearb at candelatech.com (Ben Greear) Date: Wed, 22 Aug 2012 20:57:49 -0700 Subject: [Xorp-hackers] xorp error handling In-Reply-To: <0843D0F1EEBB2E49A2156C6981B4A17E08BEFD3C@CGYSVW100.gdcan.com> References: <0843D0F1EEBB2E49A2156C6981B4A17E08BEFD3C@CGYSVW100.gdcan.com> Message-ID: <5035AA3D.8040308@candelatech.com> On 08/22/2012 08:19 PM, Chan, Anthony wrote: > Hi, > > We are running XORP with a custom routing protocol and are able to run into the error situation where a SEND_FAILED error code is generated (?XrlPFSTCPSender > died: Keepalive timeout?). After this occurs, XORP basically becomes non operational, but all the processes are still around and in a running state. Our > platform is resource constrained so it is fairly easy for us to reproduce once we inject enough routes. > > I believe what is happening is that the RIB process becomes too busy to acknowledge the IPC keepalive between it and the routing process. However the > rtrmngr/Finder does not restart the RIB because the RIB became responsive again and acknowledged the keepalive from the rtrmngr/Finder process. Since the IPC > between the routing and RIB process is now down, and rtrmngr/Finder cannot detect any process issues, nothing can be done now to recover from this state. Do > you believe this is a possible scenario with the current XORP error handling process?? > > We are using 1.8.5 without setting the environment variable ? XORP_SENDER_KEEPALIVE_TIME?, therefore using the default 10 seconds as the keepalive interval. Does the problem go away if you set the keep-alive higher? You could also throttle your routes that you are sending to the RIB to keep from over-working it. In general, restarting xorp processes never works right anyway..so if one dies (or times out), you usually just have to restart xorp completely. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From noreply at github.com Mon Aug 27 10:14:17 2012 From: noreply at github.com (GitHub) Date: Mon, 27 Aug 2012 10:14:17 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] 6a1c44: Update build script for LANforge 5.2.6 Message-ID: <503baae9825f7_33f61a8caf4596ba@sh3.rs.github.com.mail> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: 6a1c44115ec0fc2de8e990145a06927ed7b44399 https://github.com/greearb/xorp.ct/commit/6a1c44115ec0fc2de8e990145a06927ed7b44399 Author: Ben Greear Date: 2012-08-27 (Mon, 27 Aug 2012) Changed paths: M xorp/Makefile.deb Log Message: ----------- Update build script for LANforge 5.2.6 From noreply at github.com Thu Aug 30 08:00:13 2012 From: noreply at github.com (GitHub) Date: Thu, 30 Aug 2012 08:00:13 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] Message-ID: <503f7ffdae1f7_31e81579ae4745e4@sh2.rs.github.com.mail> Branch: refs/tags/lf-5.2.6 Home: https://github.com/greearb/xorp.ct From igorm at etf.rs Fri Aug 31 04:33:46 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:33:46 +0200 Subject: [Xorp-hackers] [PATCH 00/15] Add new operators for changing metric in policy code In-Reply-To: References: Message-ID: <1346412841-31507-1-git-send-email-igorm@etf.rs> From: Igor Maravic Hi, As suggested by Phil, I've added new operators for changing metric in policy code. New operators are *=, /=, <<=, >>=, &=, |= and ^=. I didn't have the time to test it thouroughly, so any volunteers to test the code are welcome. :) In the first patch I've added new patern for one line comments. Everything after %% is considered a comment. In the last patch I've hacked RIP so the routes that have metric > RIP_INFINITY would be pushed through the EXPORT filter. I've tested it, and it works. Unfortunatelly I'm not 100% sure if this hack is ok. All other patches should be fine! BR Igor Igor Maravic (15): xorp:rtrmgr: Add patern for one line comment xorp: policy:backend: Rename backend.y to backend.yy xorp:policy:backend: Rename backend.l to backend.ll xorp: policy: REname policy.l to policy.ll xorp:policy: Rename policy.y to policy.yy xorp: policy: Automaticly build lex and yacc fails from policy.ll and policy.yy xorp:policy:backend: Automaticly build lex and yacc files from backend.{ll,yy} Remove lex.yy_policy_backend_parser.cc Remove yacc.yy_policy_backend_parser.cc Remove yacc.yy_policy_backend_parser.cc.h Remove lex.yy_policy_parser.cc Remove yacc.yy_policy_parser.cc Remove yacc.yy_policy_parser.cc.h xorp: Add new operators xorp: rip: Force RIP to do EXPORT filtering when the route comes xorp/etc/templates/bgp.tp | 4 +- xorp/etc/templates/ospfv2.tp | 2 +- xorp/etc/templates/ospfv3.tp | 2 +- xorp/etc/templates/policy.tp | 2 +- xorp/etc/templates/rip.tp | 2 +- xorp/etc/templates/ripng.tp | 2 +- xorp/policy/SConscript | 32 +- xorp/policy/backend/SConscript | 31 +- xorp/policy/backend/backend.l | 153 - xorp/policy/backend/backend.ll | 165 + xorp/policy/backend/backend.y | 183 - xorp/policy/backend/backend.yy | 191 + .../policy/backend/lex.yy_policy_backend_parser.cc | 2035 --------- .../backend/yacc.yy_policy_backend_parser.cc | 706 --- .../backend/yacc.yy_policy_backend_parser.cc.h | 46 - xorp/policy/common/operator.cc | 6 + xorp/policy/common/operator.hh | 7 + xorp/policy/common/operator_base.hh | 6 + xorp/policy/common/register_operations.cc | 12 + xorp/policy/lex.yy_policy_parser.cc | 4508 -------------------- xorp/policy/policy.l | 222 - xorp/policy/policy.ll | 248 ++ xorp/policy/policy.y | 140 - xorp/policy/policy.yy | 156 + xorp/policy/yacc.yy_policy_parser.cc | 858 ---- xorp/policy/yacc.yy_policy_parser.cc.h | 57 - xorp/rip/output.hh | 29 - xorp/rip/output_table.cc | 17 +- xorp/rip/output_updates.cc | 11 +- xorp/rip/route_db.cc | 60 +- xorp/rip/route_db.hh | 2 +- xorp/rtrmgr/boot.ll | 14 +- xorp/rtrmgr/config_operators.cc | 72 +- xorp/rtrmgr/config_operators.hh | 50 +- xorp/rtrmgr/op_commands.ll | 10 + xorp/rtrmgr/template.ll | 12 + 36 files changed, 1045 insertions(+), 9008 deletions(-) delete mode 100644 xorp/policy/backend/backend.l create mode 100644 xorp/policy/backend/backend.ll delete mode 100644 xorp/policy/backend/backend.y create mode 100644 xorp/policy/backend/backend.yy delete mode 100644 xorp/policy/backend/lex.yy_policy_backend_parser.cc delete mode 100644 xorp/policy/backend/yacc.yy_policy_backend_parser.cc delete mode 100644 xorp/policy/backend/yacc.yy_policy_backend_parser.cc.h delete mode 100644 xorp/policy/lex.yy_policy_parser.cc delete mode 100644 xorp/policy/policy.l create mode 100644 xorp/policy/policy.ll delete mode 100644 xorp/policy/policy.y create mode 100644 xorp/policy/policy.yy delete mode 100644 xorp/policy/yacc.yy_policy_parser.cc delete mode 100644 xorp/policy/yacc.yy_policy_parser.cc.h -- 1.7.9.5 From igorm at etf.rs Fri Aug 31 04:33:49 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:33:49 +0200 Subject: [Xorp-hackers] [PATCH 03/15] xorp:policy:backend: Rename backend.l to backend.ll In-Reply-To: <1346412841-31507-1-git-send-email-igorm@etf.rs> References: <1346412841-31507-1-git-send-email-igorm@etf.rs> Message-ID: <1346412841-31507-4-git-send-email-igorm@etf.rs> From: Igor Maravic Signed-off-by: Igor Maravic --- xorp/policy/backend/backend.l | 153 -------------------------------------- xorp/policy/backend/backend.ll | 159 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 159 insertions(+), 153 deletions(-) delete mode 100644 xorp/policy/backend/backend.l create mode 100644 xorp/policy/backend/backend.ll diff --git a/xorp/policy/backend/backend.l b/xorp/policy/backend/backend.l deleted file mode 100644 index 124f6c5..0000000 --- a/xorp/policy/backend/backend.l +++ /dev/null @@ -1,153 +0,0 @@ -%{ - -#include -#include - -#include "libxorp/xorp.h" -#include "policy/common/policy_utils.hh" -#include "policy_backend_parser.hh" -#include "yacc.yy_policy_backend_parser.cc.h" - -#define yyparse yy_policy_backend_parserparse -#define yyerror yy_policy_backend_parsererror -#define yylval yy_policy_backend_parserlval - -using namespace policy_utils; -using namespace policy_backend_parser; - -void yyerror(const char*); -int yyparse(void); - -vector* policy_backend_parser::_yy_policies; -map* policy_backend_parser::_yy_sets; -vector* policy_backend_parser::_yy_terms; -vector* policy_backend_parser::_yy_instructions; -bool policy_backend_parser::_yy_trace; -SUBR* policy_backend_parser::_yy_subr; - -namespace { - string _last_error; - unsigned _parser_lineno; -} - -%} -%option noyywrap -%option nounput -%option prefix="yy_policy_backend_parser" -%option outfile="lex.yy_policy_backend_parser.cc" -%option never-interactive -%x STR -%% - -"POLICY_START" { return YY_POLICY_START; } -"POLICY_END" { return YY_POLICY_END; } -"TERM_START" { return YY_TERM_START; } -"TERM_END" { return YY_TERM_END; } -"SET" { return YY_SET; } -"PUSH" { return YY_PUSH; } -"PUSH_SET" { return YY_PUSH_SET; } -"REGEX" { return YY_REGEX; } -"LOAD" { return YY_LOAD; } -"STORE" { return YY_STORE; } -"ACCEPT" { return YY_ACCEPT; } -"REJECT" { return YY_REJECT; } -"NOT" { return YY_NOT; } -"AND" { return YY_AND; } -"XOR" { return YY_XOR; } -"OR" { return YY_OR; } -"HEAD" { return YY_HEAD; } -"CTR" { return YY_CTR; } -"ONFALSE_EXIT" { return YY_ONFALSE_EXIT; } -"NON_EMPTY_INTERSECTION" { return YY_NE_INT; } -"NEXT" { return YY_NEXT; } -"POLICY" { return YY_POLICY; } -"TERM" { return YY_TERM; } -"SUBR_START" { return YY_SUBR_START; } -"SUBR_END" { return YY_SUBR_END; } - -"==" { return YY_EQ; } -"!=" { return YY_NE; } -"<" { return YY_LT; } -">" { return YY_GT; } -"<=" { return YY_LE; } -">=" { return YY_GE; } -"+" { return YY_ADD; } -"\-" { return YY_SUB; } -"*" { return YY_MUL; } - -"\n" { _parser_lineno++; return YY_NEWLINE; } - -[[:blank:]]+ /* eat blanks */ - -[^\"[:blank:]\n]+ { - yylval.c_str = strdup(yytext); - return YY_ARG; - } - -\" BEGIN(STR); - -\" BEGIN(INITIAL); - -[^\"]+ { yylval.c_str = strdup(yytext); - _parser_lineno += count_nl(yytext); - return YY_ARG; - } - -%% - -void yyerror(const char *m) -{ - ostringstream oss; - - oss << "Error on line " << _parser_lineno << " near ("; - for(int i = 0; i < yyleng; i++) - oss << yytext[i]; - oss << "): " << m; - - _last_error = oss.str(); -} - -int -policy_backend_parser::policy_backend_parse(vector& outpolicies, - map& outsets, - SUBR& subr, - const string& conf, - string& outerr) -{ - - YY_BUFFER_STATE yybuffstate = yy_scan_string(conf.c_str()); - - _last_error = "No error"; - _parser_lineno = 1; - - _yy_policies = &outpolicies; - _yy_sets = &outsets; - _yy_subr = &subr; - _yy_terms = new vector(); - _yy_instructions = new vector(); - _yy_trace = false; - - int res = yyparse(); - - yy_delete_buffer(yybuffstate); - outerr = _last_error; - - // parse error - if (res) { - // get rid of temporary parse object not yet bound to policies - delete_vector(_yy_terms); - delete_vector(_yy_instructions); - } - // good parse - else { - // all terms should be bound to policies - assert(_yy_terms->empty()); - delete _yy_terms; - - // all instructions should be bound to terms - assert(_yy_instructions->empty()); - delete _yy_instructions; - } - - return res; -} diff --git a/xorp/policy/backend/backend.ll b/xorp/policy/backend/backend.ll new file mode 100644 index 0000000..a874ec2 --- /dev/null +++ b/xorp/policy/backend/backend.ll @@ -0,0 +1,159 @@ +%{ + +#include +#include + +#include "libxorp/xorp.h" +#include "policy/common/policy_utils.hh" +#include "policy/backend/policy_backend_parser.hh" + +#if defined(NEED_LEX_H_HACK) +extern YYSTYPE tpltlval; +#include "y.policy_backend_parser_tab.cc.h" +#else +#include "y.policy_backend_parser_tab.hh" +#endif + +#define yyparse policy_backend_parserparse +#define yyerror policy_backend_parsererror +#define yylval policy_backend_parserlval + +using namespace policy_utils; +using namespace policy_backend_parser; + +void yyerror(const char*); +int yyparse(void); + +vector* policy_backend_parser::_yy_policies; +map* policy_backend_parser::_yy_sets; +vector* policy_backend_parser::_yy_terms; +vector* policy_backend_parser::_yy_instructions; +bool policy_backend_parser::_yy_trace; +SUBR* policy_backend_parser::_yy_subr; + +namespace { + string _last_error; + unsigned _parser_lineno; +} + +%} +%option noyywrap +%option nounput +%option prefix="policy_backend_parser" +%option outfile="lex.policy_backend_parser.cc" +%option never-interactive +%x STR +%% + +"POLICY_START" { return YY_POLICY_START; } +"POLICY_END" { return YY_POLICY_END; } +"TERM_START" { return YY_TERM_START; } +"TERM_END" { return YY_TERM_END; } +"SET" { return YY_SET; } +"PUSH" { return YY_PUSH; } +"PUSH_SET" { return YY_PUSH_SET; } +"REGEX" { return YY_REGEX; } +"LOAD" { return YY_LOAD; } +"STORE" { return YY_STORE; } +"ACCEPT" { return YY_ACCEPT; } +"REJECT" { return YY_REJECT; } +"NOT" { return YY_NOT; } +"AND" { return YY_AND; } +"XOR" { return YY_XOR; } +"OR" { return YY_OR; } +"HEAD" { return YY_HEAD; } +"CTR" { return YY_CTR; } +"ONFALSE_EXIT" { return YY_ONFALSE_EXIT; } +"NON_EMPTY_INTERSECTION" { return YY_NE_INT; } +"NEXT" { return YY_NEXT; } +"POLICY" { return YY_POLICY; } +"TERM" { return YY_TERM; } +"SUBR_START" { return YY_SUBR_START; } +"SUBR_END" { return YY_SUBR_END; } + +"==" { return YY_EQ; } +"!=" { return YY_NE; } +"<" { return YY_LT; } +">" { return YY_GT; } +"<=" { return YY_LE; } +">=" { return YY_GE; } +"+" { return YY_ADD; } +"\-" { return YY_SUB; } +"*" { return YY_MUL; } + +"\n" { _parser_lineno++; return YY_NEWLINE; } + +[[:blank:]]+ /* eat blanks */ + +[^\"[:blank:]\n]+ { + yylval.c_str = strdup(yytext); + return YY_ARG; + } + +\" BEGIN(STR); + +\" BEGIN(INITIAL); + +[^\"]+ { yylval.c_str = strdup(yytext); + _parser_lineno += count_nl(yytext); + return YY_ARG; + } + +%% + +void yyerror(const char *m) +{ + ostringstream oss; + + oss << "Error on line " << _parser_lineno << " near ("; + for(int i = 0; i < yyleng; i++) + oss << yytext[i]; + oss << "): " << m; + + _last_error = oss.str(); +} + +int +policy_backend_parser::policy_backend_parse(vector& outpolicies, + map& outsets, + SUBR& subr, + const string& conf, + string& outerr) +{ + + YY_BUFFER_STATE yybuffstate = yy_scan_string(conf.c_str()); + + _last_error = "No error"; + _parser_lineno = 1; + + _yy_policies = &outpolicies; + _yy_sets = &outsets; + _yy_subr = &subr; + _yy_terms = new vector(); + _yy_instructions = new vector(); + _yy_trace = false; + + int res = yyparse(); + + yy_delete_buffer(yybuffstate); + outerr = _last_error; + + // parse error + if (res) { + // get rid of temporary parse object not yet bound to policies + delete_vector(_yy_terms); + delete_vector(_yy_instructions); + } + // good parse + else { + // all terms should be bound to policies + assert(_yy_terms->empty()); + delete _yy_terms; + + // all instructions should be bound to terms + assert(_yy_instructions->empty()); + delete _yy_instructions; + } + + return res; +} -- 1.7.9.5 From igorm at etf.rs Fri Aug 31 04:33:48 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:33:48 +0200 Subject: [Xorp-hackers] [PATCH 02/15] xorp: policy:backend: Rename backend.y to backend.yy In-Reply-To: <1346412841-31507-1-git-send-email-igorm@etf.rs> References: <1346412841-31507-1-git-send-email-igorm@etf.rs> Message-ID: <1346412841-31507-3-git-send-email-igorm@etf.rs> From: Igor Maravic Signed-off-by: Igor Maravic --- xorp/policy/backend/backend.y | 183 ---------------------------------------- xorp/policy/backend/backend.yy | 183 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 183 insertions(+), 183 deletions(-) delete mode 100644 xorp/policy/backend/backend.y create mode 100644 xorp/policy/backend/backend.yy diff --git a/xorp/policy/backend/backend.y b/xorp/policy/backend/backend.y deleted file mode 100644 index c282906..0000000 --- a/xorp/policy/backend/backend.y +++ /dev/null @@ -1,183 +0,0 @@ -%{ -/* - * yacc -d -p yy_policy_backend_parser -o yacc.yy_policy_backend_parser.cc backend.y - */ - -#include - -#include "libxorp/xorp.h" -#include "policy/common/varrw.hh" -#include "policy/common/element_factory.hh" -#include "policy/common/operator.hh" -#include "policy_backend_parser.hh" -#include "instruction.hh" -#include "term_instr.hh" -#include "policy_instr.hh" - -extern int yylex(void); -extern void yyerror(const char*); - -using namespace policy_backend_parser; - -static ElementFactory _ef; - -%} - -%union { - char* c_str; - PolicyInstr* c_pi; -}; - -%token YY_ARG -%token YY_NEWLINE YY_BLANK -%token YY_POLICY_START YY_POLICY_END YY_TERM_START YY_TERM_END -%token YY_PUSH YY_PUSH_SET -%token YY_EQ YY_NE YY_LT YY_GT YY_LE YY_GE -%token YY_NOT YY_AND YY_OR YY_XOR YY_HEAD YY_CTR YY_NE_INT -%token YY_ADD YY_SUB YY_MUL -%token YY_ONFALSE_EXIT -%token YY_REGEX -%token YY_LOAD YY_STORE -%token YY_ACCEPT YY_REJECT -%token YY_SET YY_NEXT YY_POLICY YY_SUBR_START YY_SUBR_END YY_TERM - -%type policy -%% - -program: - program policy { _yy_policies->push_back($2); } - | program subroutine - | program set - | /* empty */ - ; - -set: - YY_SET YY_ARG YY_ARG YY_ARG YY_NEWLINE - { - // XXX: doesn't delete old - (*_yy_sets)[$3] = _ef.create($2, $4); - free($2); free($3); free($4); - } - ; - -subroutine: - YY_SUBR_START YY_NEWLINE policies YY_SUBR_END YY_NEWLINE - ; - -policies: - policies policy { (*_yy_subr)[$2->name()] = $2; } - | /* empty */ - ; - -policy: YY_POLICY_START YY_ARG YY_NEWLINE terms YY_POLICY_END YY_NEWLINE - { - PolicyInstr* pi = new PolicyInstr($2,_yy_terms); - - pi->set_trace(_yy_trace); - _yy_trace = false; - - _yy_terms = new vector(); - - free($2); - - $$ = pi; - } - ; - -terms: - terms YY_TERM_START YY_ARG YY_NEWLINE statements YY_TERM_END YY_NEWLINE { - - TermInstr* ti = new TermInstr($3,_yy_instructions); - _yy_instructions = new vector(); - _yy_terms->push_back(ti); - free($3); - } - | /* empty */ - ; - -statements: - statements statement YY_NEWLINE - | /* empty */ - ; - - -statement: - YY_PUSH YY_ARG YY_ARG { - Instruction* i = new Push(_ef.create($2,$3)); - _yy_instructions->push_back(i); - free($2); free($3); - } - | YY_PUSH_SET YY_ARG { - _yy_instructions->push_back(new PushSet($2)); - free($2); - } - - | YY_ONFALSE_EXIT { - _yy_instructions->push_back(new OnFalseExit()); - } - - | YY_LOAD YY_ARG { - char* err = NULL; - bool is_error = false; - VarRW::Id id = strtoul($2, &err, 10); - if ((err != NULL) && (*err != '\0')) - is_error = true; - free($2); - if (is_error) { - yyerror("Need numeric var ID"); - YYERROR; - } - _yy_instructions->push_back(new Load(id)); - } - - | YY_STORE YY_ARG { - char* err = NULL; - bool is_error = false; - VarRW::Id id = strtoul($2, &err, 10); - - if ((err != NULL) && (*err != '\0')) - is_error = true; - - free($2); - - if (is_error) { - yyerror("Need numeric var ID"); - YYERROR; - } - - if (id == VarRW::VAR_TRACE) - _yy_trace = true; - - _yy_instructions->push_back(new Store(id)); - } - - | YY_ACCEPT { _yy_instructions->push_back(new Accept()); } - | YY_REJECT { _yy_instructions->push_back(new Reject()); } - - | YY_EQ { _yy_instructions->push_back(new NaryInstr(new OpEq)); } - | YY_NE { _yy_instructions->push_back(new NaryInstr(new OpNe)); } - | YY_LT { _yy_instructions->push_back(new NaryInstr(new OpLt)); } - | YY_GT { _yy_instructions->push_back(new NaryInstr(new OpGt)); } - | YY_LE { _yy_instructions->push_back(new NaryInstr(new OpLe)); } - | YY_GE { _yy_instructions->push_back(new NaryInstr(new OpGe)); } - - | YY_NOT { _yy_instructions->push_back(new NaryInstr(new OpNot)); } - | YY_AND { _yy_instructions->push_back(new NaryInstr(new OpAnd)); } - | YY_XOR { _yy_instructions->push_back(new NaryInstr(new OpXor)); } - | YY_OR { _yy_instructions->push_back(new NaryInstr(new OpOr)); } - - | YY_ADD { _yy_instructions->push_back(new NaryInstr(new OpAdd)); } - | YY_SUB { _yy_instructions->push_back(new NaryInstr(new OpSub)); } - | YY_MUL { _yy_instructions->push_back(new NaryInstr(new OpMul)); } - | YY_HEAD { _yy_instructions->push_back(new NaryInstr(new OpHead));} - | YY_CTR { _yy_instructions->push_back(new NaryInstr(new OpCtr));} - | YY_NE_INT { _yy_instructions->push_back(new NaryInstr(new OpNEInt));} - | YY_REGEX { _yy_instructions->push_back(new NaryInstr(new OpRegex));} - | YY_NEXT YY_POLICY - { _yy_instructions->push_back(new Next(Next::POLICY)); } - | YY_NEXT YY_TERM - { _yy_instructions->push_back(new Next(Next::TERM)); } - | YY_POLICY YY_ARG - { _yy_instructions->push_back(new Subr($2)); free($2); } - ; -%% diff --git a/xorp/policy/backend/backend.yy b/xorp/policy/backend/backend.yy new file mode 100644 index 0000000..844e81e --- /dev/null +++ b/xorp/policy/backend/backend.yy @@ -0,0 +1,183 @@ +%{ +/* + * yacc -d -p yy_policy_backend_parser -o yacc.yy_policy_backend_parser.cc backend.y + */ + +#include + +#include "libxorp/xorp.h" +#include "policy/common/varrw.hh" +#include "policy/common/element_factory.hh" +#include "policy/common/operator.hh" +#include "policy/backend/policy_backend_parser.hh" +#include "policy/backend/instruction.hh" +#include "policy/backend/term_instr.hh" +#include "policy/backend/policy_instr.hh" + +extern int yylex(void); +extern void yyerror(const char*); + +using namespace policy_backend_parser; + +static ElementFactory _ef; + +%} + +%union { + char* c_str; + PolicyInstr* c_pi; +}; + +%token YY_ARG +%token YY_NEWLINE YY_BLANK +%token YY_POLICY_START YY_POLICY_END YY_TERM_START YY_TERM_END +%token YY_PUSH YY_PUSH_SET +%token YY_EQ YY_NE YY_LT YY_GT YY_LE YY_GE +%token YY_NOT YY_AND YY_OR YY_XOR YY_HEAD YY_CTR YY_NE_INT +%token YY_ADD YY_SUB YY_MUL +%token YY_ONFALSE_EXIT +%token YY_REGEX +%token YY_LOAD YY_STORE +%token YY_ACCEPT YY_REJECT +%token YY_SET YY_NEXT YY_POLICY YY_SUBR_START YY_SUBR_END YY_TERM + +%type policy +%% + +program: + program policy { _yy_policies->push_back($2); } + | program subroutine + | program set + | /* empty */ + ; + +set: + YY_SET YY_ARG YY_ARG YY_ARG YY_NEWLINE + { + // XXX: doesn't delete old + (*_yy_sets)[$3] = _ef.create($2, $4); + free($2); free($3); free($4); + } + ; + +subroutine: + YY_SUBR_START YY_NEWLINE policies YY_SUBR_END YY_NEWLINE + ; + +policies: + policies policy { (*_yy_subr)[$2->name()] = $2; } + | /* empty */ + ; + +policy: YY_POLICY_START YY_ARG YY_NEWLINE terms YY_POLICY_END YY_NEWLINE + { + PolicyInstr* pi = new PolicyInstr($2,_yy_terms); + + pi->set_trace(_yy_trace); + _yy_trace = false; + + _yy_terms = new vector(); + + free($2); + + $$ = pi; + } + ; + +terms: + terms YY_TERM_START YY_ARG YY_NEWLINE statements YY_TERM_END YY_NEWLINE { + + TermInstr* ti = new TermInstr($3,_yy_instructions); + _yy_instructions = new vector(); + _yy_terms->push_back(ti); + free($3); + } + | /* empty */ + ; + +statements: + statements statement YY_NEWLINE + | /* empty */ + ; + + +statement: + YY_PUSH YY_ARG YY_ARG { + Instruction* i = new Push(_ef.create($2,$3)); + _yy_instructions->push_back(i); + free($2); free($3); + } + | YY_PUSH_SET YY_ARG { + _yy_instructions->push_back(new PushSet($2)); + free($2); + } + + | YY_ONFALSE_EXIT { + _yy_instructions->push_back(new OnFalseExit()); + } + + | YY_LOAD YY_ARG { + char* err = NULL; + bool is_error = false; + VarRW::Id id = strtoul($2, &err, 10); + if ((err != NULL) && (*err != '\0')) + is_error = true; + free($2); + if (is_error) { + yyerror("Need numeric var ID"); + YYERROR; + } + _yy_instructions->push_back(new Load(id)); + } + + | YY_STORE YY_ARG { + char* err = NULL; + bool is_error = false; + VarRW::Id id = strtoul($2, &err, 10); + + if ((err != NULL) && (*err != '\0')) + is_error = true; + + free($2); + + if (is_error) { + yyerror("Need numeric var ID"); + YYERROR; + } + + if (id == VarRW::VAR_TRACE) + _yy_trace = true; + + _yy_instructions->push_back(new Store(id)); + } + + | YY_ACCEPT { _yy_instructions->push_back(new Accept()); } + | YY_REJECT { _yy_instructions->push_back(new Reject()); } + + | YY_EQ { _yy_instructions->push_back(new NaryInstr(new OpEq)); } + | YY_NE { _yy_instructions->push_back(new NaryInstr(new OpNe)); } + | YY_LT { _yy_instructions->push_back(new NaryInstr(new OpLt)); } + | YY_GT { _yy_instructions->push_back(new NaryInstr(new OpGt)); } + | YY_LE { _yy_instructions->push_back(new NaryInstr(new OpLe)); } + | YY_GE { _yy_instructions->push_back(new NaryInstr(new OpGe)); } + + | YY_NOT { _yy_instructions->push_back(new NaryInstr(new OpNot)); } + | YY_AND { _yy_instructions->push_back(new NaryInstr(new OpAnd)); } + | YY_XOR { _yy_instructions->push_back(new NaryInstr(new OpXor)); } + | YY_OR { _yy_instructions->push_back(new NaryInstr(new OpOr)); } + + | YY_ADD { _yy_instructions->push_back(new NaryInstr(new OpAdd)); } + | YY_SUB { _yy_instructions->push_back(new NaryInstr(new OpSub)); } + | YY_MUL { _yy_instructions->push_back(new NaryInstr(new OpMul)); } + | YY_HEAD { _yy_instructions->push_back(new NaryInstr(new OpHead));} + | YY_CTR { _yy_instructions->push_back(new NaryInstr(new OpCtr));} + | YY_NE_INT { _yy_instructions->push_back(new NaryInstr(new OpNEInt));} + | YY_REGEX { _yy_instructions->push_back(new NaryInstr(new OpRegex));} + | YY_NEXT YY_POLICY + { _yy_instructions->push_back(new Next(Next::POLICY)); } + | YY_NEXT YY_TERM + { _yy_instructions->push_back(new Next(Next::TERM)); } + | YY_POLICY YY_ARG + { _yy_instructions->push_back(new Subr($2)); free($2); } + ; +%% -- 1.7.9.5 From igorm at etf.rs Fri Aug 31 04:33:52 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:33:52 +0200 Subject: [Xorp-hackers] [PATCH 06/15] xorp: policy: Automaticly build lex and yacc fails from policy.ll and policy.yy In-Reply-To: <1346412841-31507-1-git-send-email-igorm@etf.rs> References: <1346412841-31507-1-git-send-email-igorm@etf.rs> Message-ID: <1346412841-31507-7-git-send-email-igorm@etf.rs> From: Igor Maravic Signed-off-by: Igor Maravic --- xorp/policy/SConscript | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/xorp/policy/SConscript b/xorp/policy/SConscript index b6dc68c..f98b855 100644 --- a/xorp/policy/SConscript +++ b/xorp/policy/SConscript @@ -32,6 +32,7 @@ is_shared = env.has_key('SHAREDLIBS') env.AppendUnique(CPPPATH = [ '#', '$BUILDDIR', + env['xorp_sourcedir'], #this is needed for lex and yacc generated files ]) env.PrependUnique(LIBPATH = [ @@ -85,7 +86,36 @@ env.Replace(RPATH = [ env.Literal(env['xorp_module_rpath']) ]) +# Automatically generate flex and yacc files + +#Create yacc files +yacc_env = env.Clone() + +# bison on BSD generates headers files with .h suffix, +# while on other OSs it generates header files with .hh suffix +# +# But, on FreeBSD at least, if you don't do the .hh suffix, it doesn't even +# build a .h file of any type --Ben +yacc_env.Replace(YACCHXXFILESUFFIX='.hh') + +yacc_env.AppendUnique(YACCFLAGS='-d') + +yacc_env.AppendUnique(YACCFLAGS='-ppolicy_parser') + +policy_yacc = yacc_env.CXXFile(target='y.policy_parser_tab.cc', + source='policy.yy') + +#create lex files +lex_env = env.Clone() + +lex_env.AppendUnique(LEXFLAGS='-Ppolicy_parser') + +policy_lex = lex_env.CXXFile(target='lex.policy_parser.cc', + source='policy.ll') + libxorp_policy_srcs = [ + policy_lex[0], + policy_yacc[0], 'code.cc', 'code_generator.cc', 'code_list.cc', @@ -111,8 +141,6 @@ libxorp_policy_srcs = [ 'visitor_semantic.cc', 'visitor_test.cc', 'xrl_target.cc', - 'yacc.yy_policy_parser.cc', - 'lex.yy_policy_parser.cc' ] ###### -- 1.7.9.5 From igorm at etf.rs Fri Aug 31 04:33:51 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:33:51 +0200 Subject: [Xorp-hackers] [PATCH 05/15] xorp:policy: Rename policy.y to policy.yy In-Reply-To: <1346412841-31507-1-git-send-email-igorm@etf.rs> References: <1346412841-31507-1-git-send-email-igorm@etf.rs> Message-ID: <1346412841-31507-6-git-send-email-igorm@etf.rs> From: Igor Maravic Signed-off-by: Igor Maravic --- xorp/policy/policy.y | 140 ------------------------------------------------- xorp/policy/policy.yy | 140 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+), 140 deletions(-) delete mode 100644 xorp/policy/policy.y create mode 100644 xorp/policy/policy.yy diff --git a/xorp/policy/policy.y b/xorp/policy/policy.y deleted file mode 100644 index a8f88a0..0000000 --- a/xorp/policy/policy.y +++ /dev/null @@ -1,140 +0,0 @@ -%{ -/* - * Grammar may be simplified, by allowing "any structure", semantic checking is - * done at run time anyway... - * By any structure i mean that you may add / multiple boolean expressions for - * example. This will give more run time flexibility - * - * yacc -d -p yy_policy_parser -o yacc.yy_policy_parser.cc policy.y - */ - -#include - -#include "policy_module.h" -#include "libxorp/xorp.h" -#include "policy/common/element.hh" -#include "policy/common/element_factory.hh" -#include "policy/common/operator.hh" -#include "policy_parser.hh" - -extern int yylex(void); -extern void yyerror(const char *m); - -using namespace policy_parser; - -static ElementFactory _ef; - -%} - -%union { - char* c_str; - Node* node; - BinOper* op; -}; - -%token YY_BOOL YY_INT YY_UINT YY_UINTRANGE YY_STR YY_ID -%token YY_IPV4 YY_IPV4RANGE YY_IPV4NET YY_IPV6 YY_IPV6RANGE YY_IPV6NET -%token YY_SEMICOLON YY_LPAR YY_RPAR YY_ASSIGN YY_SET YY_REGEX -%token YY_ACCEPT YY_REJECT YY_PROTOCOL YY_NEXT YY_POLICY YY_PLUS_EQUALS -%token YY_MINUS_EQUALS YY_TERM - -%left YY_NOT YY_AND YY_XOR YY_OR YY_HEAD YY_CTR YY_NE_INT -%left YY_EQ YY_NE YY_LE YY_GT YY_LT YY_GE -%left YY_IPNET_EQ YY_IPNET_LE YY_IPNET_GT YY_IPNET_LT YY_IPNET_GE -%left YY_ADD YY_SUB -%left YY_MUL - -%type actionstatement action boolstatement boolexpr expr assignexpr -%type assignop -%% - -statement: - statement actionstatement { _parser_nodes->push_back($2); } - | statement boolstatement { _parser_nodes->push_back($2); } - | /* empty */ - ; - -actionstatement: - action YY_SEMICOLON { $$ = $1; } - ; - -action: - assignexpr - | YY_ACCEPT { $$ = new NodeAccept(_parser_lineno); } - | YY_REJECT { $$ = new NodeReject(_parser_lineno); } - | YY_NEXT YY_POLICY - { $$ = new NodeNext(_parser_lineno, NodeNext::POLICY); } - | YY_NEXT YY_TERM - { $$ = new NodeNext(_parser_lineno, NodeNext::TERM); } - ; - -assignexpr: - YY_ID assignop expr - { $$ = new NodeAssign($1, $2, $3, _parser_lineno); free($1); } - ; - -assignop: - YY_ASSIGN { $$ = NULL; } - | YY_PLUS_EQUALS { $$ = new OpAdd; } - | YY_MINUS_EQUALS { $$ = new OpSub; } - ; - -boolstatement: - boolexpr YY_SEMICOLON { $$ = $1; } - ; - -boolexpr: - YY_PROTOCOL YY_EQ YY_ID { $$ = new NodeProto($3,_parser_lineno); free($3); } - | YY_NOT boolexpr { $$ = new NodeUn(new OpNot,$2,_parser_lineno); } - | YY_POLICY YY_ID { $$ = new NodeSubr(_parser_lineno, $2); free($2); } - | boolexpr YY_AND boolexpr { $$ = new NodeBin(new OpAnd,$1,$3,_parser_lineno); } - | boolexpr YY_XOR boolexpr { $$ = new NodeBin(new OpXor,$1,$3,_parser_lineno); } - | boolexpr YY_OR boolexpr { $$ = new NodeBin(new OpOr,$1,$3,_parser_lineno); } - - | expr YY_EQ expr { $$ = new NodeBin(new OpEq,$1,$3,_parser_lineno); } - | expr YY_NE expr { $$ = new NodeBin(new OpNe,$1,$3,_parser_lineno); } - - | expr YY_LT expr { $$ = new NodeBin(new OpLt,$1,$3,_parser_lineno); } - | expr YY_GT expr { $$ = new NodeBin(new OpGt,$1,$3,_parser_lineno); } - | expr YY_LE expr { $$ = new NodeBin(new OpLe,$1,$3,_parser_lineno); } - | expr YY_GE expr { $$ = new NodeBin(new OpGe,$1,$3,_parser_lineno); } - - | expr YY_IPNET_EQ expr { $$ = new NodeBin(new OpEq,$1,$3,_parser_lineno); } - | expr YY_NOT expr { $$ = new NodeBin(new OpNe,$1,$3,_parser_lineno); } - | expr YY_IPNET_LT expr { $$ = new NodeBin(new OpLt,$1,$3,_parser_lineno); } - | expr YY_IPNET_GT expr { $$ = new NodeBin(new OpGt,$1,$3,_parser_lineno); } - | expr YY_IPNET_LE expr { $$ = new NodeBin(new OpLe,$1,$3,_parser_lineno); } - | expr YY_IPNET_GE expr { $$ = new NodeBin(new OpGe,$1,$3,_parser_lineno); } - - | expr YY_NE_INT expr { $$ = new NodeBin(new OpNEInt, $1, $3, _parser_lineno); } - - | YY_LPAR boolexpr YY_RPAR { $$ = $2; } - - | expr YY_REGEX expr { $$ = new NodeBin(new OpRegex, $1, $3, _parser_lineno); } - ; - -expr: - expr YY_ADD expr { $$ = new NodeBin(new OpAdd,$1,$3,_parser_lineno); } - | expr YY_SUB expr { $$ = new NodeBin(new OpSub,$1,$3,_parser_lineno); } - | expr YY_MUL expr { $$ = new NodeBin(new OpMul,$1,$3,_parser_lineno); } - - | YY_HEAD expr { $$ = new NodeUn(new OpHead, $2, _parser_lineno); } - | YY_CTR expr expr { $$ = new NodeBin(new OpCtr, $2, $3, _parser_lineno); } - - | YY_LPAR expr YY_RPAR { $$ = $2; } - - | YY_STR { $$ = new NodeElem(_ef.create(ElemStr::id,$1),_parser_lineno); free($1); } - | YY_UINT { $$ = new NodeElem(_ef.create(ElemU32::id,$1),_parser_lineno); free($1);} - | YY_UINTRANGE { $$ = new NodeElem(_ef.create(ElemU32Range::id,$1),_parser_lineno); free($1);} - | YY_INT { $$ = new NodeElem(_ef.create(ElemInt32::id,$1),_parser_lineno); free($1);} - | YY_BOOL { $$ = new NodeElem(_ef.create(ElemBool::id,$1),_parser_lineno); free($1);} - | YY_ID { $$ = new NodeVar($1,_parser_lineno); free($1); } - | YY_SET YY_ID { $$ = new NodeSet($2,_parser_lineno); free($2); } - | YY_IPV4 { $$ = new NodeElem(_ef.create(ElemIPv4::id,$1),_parser_lineno); free($1); } - | YY_IPV4RANGE { $$ = new NodeElem(_ef.create(ElemIPv4Range::id,$1),_parser_lineno); free($1); } - | YY_IPV6 { $$ = new NodeElem(_ef.create(ElemIPv6::id,$1),_parser_lineno); free($1); } - | YY_IPV6RANGE { $$ = new NodeElem(_ef.create(ElemIPv6Range::id,$1),_parser_lineno); free($1); } - | YY_IPV4NET { $$ = new NodeElem(_ef.create(ElemIPv4Net::id,$1),_parser_lineno); free($1); } - | YY_IPV6NET { $$ = new NodeElem(_ef.create(ElemIPv6Net::id,$1),_parser_lineno); free($1); } - ; -%% diff --git a/xorp/policy/policy.yy b/xorp/policy/policy.yy new file mode 100644 index 0000000..1d055e3 --- /dev/null +++ b/xorp/policy/policy.yy @@ -0,0 +1,140 @@ +%{ +/* + * Grammar may be simplified, by allowing "any structure", semantic checking is + * done at run time anyway... + * By any structure i mean that you may add / multiple boolean expressions for + * example. This will give more run time flexibility + * + * yacc -d -p yy_policy_parser -o yacc.yy_policy_parser.cc policy.y + */ + +#include + +#include "policy/policy_module.h" +#include "libxorp/xorp.h" +#include "policy/common/element.hh" +#include "policy/common/element_factory.hh" +#include "policy/common/operator.hh" +#include "policy/policy_parser.hh" + +extern int yylex(void); +extern void yyerror(const char *m); + +using namespace policy_parser; + +static ElementFactory _ef; + +%} + +%union { + char* c_str; + Node* node; + BinOper* op; +}; + +%token YY_BOOL YY_INT YY_UINT YY_UINTRANGE YY_STR YY_ID +%token YY_IPV4 YY_IPV4RANGE YY_IPV4NET YY_IPV6 YY_IPV6RANGE YY_IPV6NET +%token YY_SEMICOLON YY_LPAR YY_RPAR YY_ASSIGN YY_SET YY_REGEX +%token YY_ACCEPT YY_REJECT YY_PROTOCOL YY_NEXT YY_POLICY YY_PLUS_EQUALS +%token YY_MINUS_EQUALS YY_TERM + +%left YY_NOT YY_AND YY_XOR YY_OR YY_HEAD YY_CTR YY_NE_INT +%left YY_EQ YY_NE YY_LE YY_GT YY_LT YY_GE +%left YY_IPNET_EQ YY_IPNET_LE YY_IPNET_GT YY_IPNET_LT YY_IPNET_GE +%left YY_ADD YY_SUB +%left YY_MUL + +%type actionstatement action boolstatement boolexpr expr assignexpr +%type assignop +%% + +statement: + statement actionstatement { _parser_nodes->push_back($2); } + | statement boolstatement { _parser_nodes->push_back($2); } + | /* empty */ + ; + +actionstatement: + action YY_SEMICOLON { $$ = $1; } + ; + +action: + assignexpr + | YY_ACCEPT { $$ = new NodeAccept(_parser_lineno); } + | YY_REJECT { $$ = new NodeReject(_parser_lineno); } + | YY_NEXT YY_POLICY + { $$ = new NodeNext(_parser_lineno, NodeNext::POLICY); } + | YY_NEXT YY_TERM + { $$ = new NodeNext(_parser_lineno, NodeNext::TERM); } + ; + +assignexpr: + YY_ID assignop expr + { $$ = new NodeAssign($1, $2, $3, _parser_lineno); free($1); } + ; + +assignop: + YY_ASSIGN { $$ = NULL; } + | YY_PLUS_EQUALS { $$ = new OpAdd; } + | YY_MINUS_EQUALS { $$ = new OpSub; } + ; + +boolstatement: + boolexpr YY_SEMICOLON { $$ = $1; } + ; + +boolexpr: + YY_PROTOCOL YY_EQ YY_ID { $$ = new NodeProto($3,_parser_lineno); free($3); } + | YY_NOT boolexpr { $$ = new NodeUn(new OpNot,$2,_parser_lineno); } + | YY_POLICY YY_ID { $$ = new NodeSubr(_parser_lineno, $2); free($2); } + | boolexpr YY_AND boolexpr { $$ = new NodeBin(new OpAnd,$1,$3,_parser_lineno); } + | boolexpr YY_XOR boolexpr { $$ = new NodeBin(new OpXor,$1,$3,_parser_lineno); } + | boolexpr YY_OR boolexpr { $$ = new NodeBin(new OpOr,$1,$3,_parser_lineno); } + + | expr YY_EQ expr { $$ = new NodeBin(new OpEq,$1,$3,_parser_lineno); } + | expr YY_NE expr { $$ = new NodeBin(new OpNe,$1,$3,_parser_lineno); } + + | expr YY_LT expr { $$ = new NodeBin(new OpLt,$1,$3,_parser_lineno); } + | expr YY_GT expr { $$ = new NodeBin(new OpGt,$1,$3,_parser_lineno); } + | expr YY_LE expr { $$ = new NodeBin(new OpLe,$1,$3,_parser_lineno); } + | expr YY_GE expr { $$ = new NodeBin(new OpGe,$1,$3,_parser_lineno); } + + | expr YY_IPNET_EQ expr { $$ = new NodeBin(new OpEq,$1,$3,_parser_lineno); } + | expr YY_NOT expr { $$ = new NodeBin(new OpNe,$1,$3,_parser_lineno); } + | expr YY_IPNET_LT expr { $$ = new NodeBin(new OpLt,$1,$3,_parser_lineno); } + | expr YY_IPNET_GT expr { $$ = new NodeBin(new OpGt,$1,$3,_parser_lineno); } + | expr YY_IPNET_LE expr { $$ = new NodeBin(new OpLe,$1,$3,_parser_lineno); } + | expr YY_IPNET_GE expr { $$ = new NodeBin(new OpGe,$1,$3,_parser_lineno); } + + | expr YY_NE_INT expr { $$ = new NodeBin(new OpNEInt, $1, $3, _parser_lineno); } + + | YY_LPAR boolexpr YY_RPAR { $$ = $2; } + + | expr YY_REGEX expr { $$ = new NodeBin(new OpRegex, $1, $3, _parser_lineno); } + ; + +expr: + expr YY_ADD expr { $$ = new NodeBin(new OpAdd,$1,$3,_parser_lineno); } + | expr YY_SUB expr { $$ = new NodeBin(new OpSub,$1,$3,_parser_lineno); } + | expr YY_MUL expr { $$ = new NodeBin(new OpMul,$1,$3,_parser_lineno); } + + | YY_HEAD expr { $$ = new NodeUn(new OpHead, $2, _parser_lineno); } + | YY_CTR expr expr { $$ = new NodeBin(new OpCtr, $2, $3, _parser_lineno); } + + | YY_LPAR expr YY_RPAR { $$ = $2; } + + | YY_STR { $$ = new NodeElem(_ef.create(ElemStr::id,$1),_parser_lineno); free($1); } + | YY_UINT { $$ = new NodeElem(_ef.create(ElemU32::id,$1),_parser_lineno); free($1);} + | YY_UINTRANGE { $$ = new NodeElem(_ef.create(ElemU32Range::id,$1),_parser_lineno); free($1);} + | YY_INT { $$ = new NodeElem(_ef.create(ElemInt32::id,$1),_parser_lineno); free($1);} + | YY_BOOL { $$ = new NodeElem(_ef.create(ElemBool::id,$1),_parser_lineno); free($1);} + | YY_ID { $$ = new NodeVar($1,_parser_lineno); free($1); } + | YY_SET YY_ID { $$ = new NodeSet($2,_parser_lineno); free($2); } + | YY_IPV4 { $$ = new NodeElem(_ef.create(ElemIPv4::id,$1),_parser_lineno); free($1); } + | YY_IPV4RANGE { $$ = new NodeElem(_ef.create(ElemIPv4Range::id,$1),_parser_lineno); free($1); } + | YY_IPV6 { $$ = new NodeElem(_ef.create(ElemIPv6::id,$1),_parser_lineno); free($1); } + | YY_IPV6RANGE { $$ = new NodeElem(_ef.create(ElemIPv6Range::id,$1),_parser_lineno); free($1); } + | YY_IPV4NET { $$ = new NodeElem(_ef.create(ElemIPv4Net::id,$1),_parser_lineno); free($1); } + | YY_IPV6NET { $$ = new NodeElem(_ef.create(ElemIPv6Net::id,$1),_parser_lineno); free($1); } + ; +%% -- 1.7.9.5 From igorm at etf.rs Fri Aug 31 04:33:53 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:33:53 +0200 Subject: [Xorp-hackers] [PATCH 07/15] xorp:policy:backend: Automaticly build lex and yacc files from backend.{ll, yy} In-Reply-To: <1346412841-31507-1-git-send-email-igorm@etf.rs> References: <1346412841-31507-1-git-send-email-igorm@etf.rs> Message-ID: <1346412841-31507-8-git-send-email-igorm@etf.rs> From: Igor Maravic Signed-off-by: Igor Maravic --- xorp/policy/backend/SConscript | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/xorp/policy/backend/SConscript b/xorp/policy/backend/SConscript index 0d811a4..f91e022 100644 --- a/xorp/policy/backend/SConscript +++ b/xorp/policy/backend/SConscript @@ -26,7 +26,36 @@ is_shared = env.has_key('SHAREDLIBS') env.AppendUnique(CPPPATH = [ '#' ]) +# Automatically generate flex and yacc files + +#Create yacc files +yacc_env = env.Clone() + +# bison on BSD generates headers files with .h suffix, +# while on other OSs it generates header files with .hh suffix +# +# But, on FreeBSD at least, if you don't do the .hh suffix, it doesn't even +# build a .h file of any type --Ben +yacc_env.Replace(YACCHXXFILESUFFIX='.hh') + +yacc_env.AppendUnique(YACCFLAGS='-d') + +yacc_env.AppendUnique(YACCFLAGS='-ppolicy_backend_parser') + +backend_yacc = yacc_env.CXXFile(target='y.policy_backend_parser_tab.cc', + source='backend.yy') + +#create lex files +lex_env = env.Clone() + +lex_env.AppendUnique(LEXFLAGS='-Ppolicy_backend_parser') + +backend_lex = lex_env.CXXFile(target='lex.policy_backend_parser.cc', + source='backend.ll') + libpbesrcs = [ + backend_lex[0], + backend_yacc[0], 'iv_exec.cc', 'policy_filter.cc', 'policy_filters.cc', @@ -36,8 +65,6 @@ libpbesrcs = [ 'single_varrw.cc', 'version_filter.cc', 'version_filters.cc', - 'lex.yy_policy_backend_parser.cc', - 'yacc.yy_policy_backend_parser.cc' ] if not (env.has_key('disable_profile') and env['disable_profile']): -- 1.7.9.5 From igorm at etf.rs Fri Aug 31 04:33:50 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:33:50 +0200 Subject: [Xorp-hackers] [PATCH 04/15] xorp: policy: REname policy.l to policy.ll In-Reply-To: <1346412841-31507-1-git-send-email-igorm@etf.rs> References: <1346412841-31507-1-git-send-email-igorm@etf.rs> Message-ID: <1346412841-31507-5-git-send-email-igorm@etf.rs> From: Igor Maravic Signed-off-by: Igor Maravic --- xorp/policy/policy.l | 222 ----------------------------------------------- xorp/policy/policy.ll | 228 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 228 insertions(+), 222 deletions(-) delete mode 100644 xorp/policy/policy.l create mode 100644 xorp/policy/policy.ll diff --git a/xorp/policy/policy.l b/xorp/policy/policy.l deleted file mode 100644 index 0f2c58c..0000000 --- a/xorp/policy/policy.l +++ /dev/null @@ -1,222 +0,0 @@ -%{ - -#include -#include -#include - -#include "policy_module.h" -#include "libxorp/xorp.h" -#include "policy/common/policy_utils.hh" -#include "policy_parser.hh" -#include "yacc.yy_policy_parser.cc.h" - -#define yylval yy_policy_parserlval -#define yyerror yy_policy_parsererror -#define yyparse yy_policy_parserparse - -void yyerror(const char *m); -extern int yyparse(void); - -using namespace policy_parser; - -// instantiate the globals here. -vector* policy_parser::_parser_nodes; -unsigned policy_parser::_parser_lineno; - -// try not to pollute -namespace { - string _last_error; - Term::BLOCKS _block; -} - -%} - -%option prefix="yy_policy_parser" -%option outfile="lex.yy_policy_parser.cc" -%option noyywrap -%option nounput -%option never-interactive -%x STR - -RE_IPV4_BYTE 25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]? -RE_IPV4 {RE_IPV4_BYTE}\.{RE_IPV4_BYTE}\.{RE_IPV4_BYTE}\.{RE_IPV4_BYTE} -RE_IPV4_PREFIXLEN 3[0-2]|[0-2]?[0-9] -RE_IPV4NET {RE_IPV4}\/{RE_IPV4_PREFIXLEN} - -RE_H4 [a-fA-F0-9]{1,4} -RE_H4_COLON {RE_H4}: -RE_LS32 (({RE_H4}:{RE_H4})|{RE_IPV4}) -RE_IPV6_P1 {RE_H4_COLON}{6}{RE_LS32} -RE_IPV6_P2 ::{RE_H4_COLON}{5}{RE_LS32} -RE_IPV6_P3 ({RE_H4})?::{RE_H4_COLON}{4}{RE_LS32} -RE_IPV6_P4 ({RE_H4_COLON}{0,1}{RE_H4})?::{RE_H4_COLON}{3}{RE_LS32} -RE_IPV6_P5 ({RE_H4_COLON}{0,2}{RE_H4})?::{RE_H4_COLON}{2}{RE_LS32} -RE_IPV6_P6 ({RE_H4_COLON}{0,3}{RE_H4})?::{RE_H4_COLON}{1}{RE_LS32} -RE_IPV6_P7 ({RE_H4_COLON}{0,4}{RE_H4})?::{RE_LS32} -RE_IPV6_P8 ({RE_H4_COLON}{0,5}{RE_H4})?::{RE_H4} -RE_IPV6_P9 ({RE_H4_COLON}{0,6}{RE_H4})?:: -RE_IPV6 {RE_IPV6_P1}|{RE_IPV6_P2}|{RE_IPV6_P3}|{RE_IPV6_P4}|{RE_IPV6_P5}|{RE_IPV6_P6}|{RE_IPV6_P7}|{RE_IPV6_P8}|{RE_IPV6_P9} -RE_IPV6_PREFIXLEN 12[0-8]|1[01][0-9]|[0-9][0-9]? -RE_IPV6NET {RE_IPV6}\/{RE_IPV6_PREFIXLEN} - -%% - -[[:digit:]]+".."[[:digit:]]+ { yylval.c_str = strdup(yytext); - return YY_UINTRANGE; - } - -[[:digit:]]+ { yylval.c_str = strdup(yytext); - return YY_UINT; - } - --[[:digit:]]+ { yylval.c_str = strdup(yytext); - return YY_INT; - } - -"true" { yylval.c_str = strdup(yytext); - return YY_BOOL; - } - -"false" { yylval.c_str = strdup(yytext); - return YY_BOOL; - } - -\"|\' BEGIN(STR); - -\"|\' BEGIN(INITIAL); - -[^\"\']+ { yylval.c_str = strdup(yytext); - _parser_lineno += policy_utils::count_nl(yytext); - /* XXX: a string can be started with " but terminated with ' - * and vice versa... - */ - return YY_STR; - } - -{RE_IPV4}".."{RE_IPV4} { - yylval.c_str = strdup(yytext); - return YY_IPV4RANGE; - } - -{RE_IPV4} { - yylval.c_str = strdup(yytext); - return YY_IPV4; - } - -{RE_IPV4NET} { - yylval.c_str = strdup(yytext); - return YY_IPV4NET; - } - - -{RE_IPV6}".."{RE_IPV6} { - yylval.c_str = strdup(yytext); - return YY_IPV6RANGE; - } - -{RE_IPV6} { - yylval.c_str = strdup(yytext); - return YY_IPV6; - } - -{RE_IPV6NET} { - yylval.c_str = strdup(yytext); - return YY_IPV6NET; - } - -":" { - // the colon is an alias for asignment in action and equality - // in the source / dest blocks. - if (_block == Term::ACTION) - return YY_ASSIGN; - else - return YY_EQ; - } - -"(" return YY_LPAR; -")" return YY_RPAR; -"==" return YY_EQ; -"!=" return YY_NE; -"<=" return YY_LE; -">=" return YY_GE; -"<" return YY_LT; -">" return YY_GT; -"+" return YY_ADD; -"*" return YY_MUL; -"\-" return YY_SUB; -"=" return YY_ASSIGN; -"+=" return YY_PLUS_EQUALS; -"-=" return YY_MINUS_EQUALS; -"||" return YY_OR; -"&&" return YY_AND; -"!" return YY_NOT; - -"exact" return YY_IPNET_EQ; -"longer" return YY_IPNET_LT; -"shorter" return YY_IPNET_GT; -"orlonger" return YY_IPNET_LE; -"orshorter" return YY_IPNET_GE; -"and" return YY_AND; -"or" return YY_OR; -"xor" return YY_XOR; -"not" return YY_NOT; -"add" return YY_PLUS_EQUALS; -"sub" return YY_MINUS_EQUALS; -"head" return YY_HEAD; -"ctr" return YY_CTR; -"ne_int" return YY_NE_INT; -"accept" return YY_ACCEPT; -"reject" return YY_REJECT; -"SET" return YY_SET; -"REGEX" return YY_REGEX; -"protocol" return YY_PROTOCOL; -"next" return YY_NEXT; -"policy" return YY_POLICY; -"term" return YY_TERM; - -[[:alpha:]][[:alnum:]_-]* { yylval.c_str = strdup(yytext); - return YY_ID; - } - -; return YY_SEMICOLON; - -[[:blank:]]+ /* eat blanks */ - -"\n" _parser_lineno++; - -. { yyerror("Unknown character"); } - -%% - -void yyerror(const char *m) -{ - ostringstream oss; - oss << "Error on line " << _parser_lineno << " near ("; - - for(int i = 0; i < yyleng; i++) - oss << yytext[i]; - oss << "): " << m; - - _last_error = oss.str(); -} - -// Everything is put in the lexer because of YY_BUFFER_STATE... -int -policy_parser::policy_parse(vector& outnodes, const Term::BLOCKS& block, - const string& conf, string& outerr) -{ - - YY_BUFFER_STATE yybuffstate = yy_scan_string(conf.c_str()); - - _last_error = "No error"; - _parser_nodes = &outnodes; - _parser_lineno = 1; - _block = block; - - int res = yyparse(); - - yy_delete_buffer(yybuffstate); - outerr = _last_error; - - return res; -} diff --git a/xorp/policy/policy.ll b/xorp/policy/policy.ll new file mode 100644 index 0000000..3f29934 --- /dev/null +++ b/xorp/policy/policy.ll @@ -0,0 +1,228 @@ +%{ + +#include +#include +#include + +#include "policy/policy_module.h" +#include "libxorp/xorp.h" +#include "policy/common/policy_utils.hh" +#include "policy/policy_parser.hh" + +#if defined(NEED_LEX_H_HACK) +extern YYSTYPE tpltlval; +#include "y.policy_parser_tab.cc.h" +#else +#include "y.policy_parser_tab.hh" +#endif + +#define yylval policy_parserlval +#define yyerror policy_parsererror +#define yyparse policy_parserparse + +void yyerror(const char *m); +extern int yyparse(void); + +using namespace policy_parser; + +// instantiate the globals here. +vector* policy_parser::_parser_nodes; +unsigned policy_parser::_parser_lineno; + +// try not to pollute +namespace { + string _last_error; + Term::BLOCKS _block; +} + +%} + +%option prefix="policy_parser" +%option outfile="lex.policy_parser.cc" +%option noyywrap +%option nounput +%option never-interactive +%x STR + +RE_IPV4_BYTE 25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]? +RE_IPV4 {RE_IPV4_BYTE}\.{RE_IPV4_BYTE}\.{RE_IPV4_BYTE}\.{RE_IPV4_BYTE} +RE_IPV4_PREFIXLEN 3[0-2]|[0-2]?[0-9] +RE_IPV4NET {RE_IPV4}\/{RE_IPV4_PREFIXLEN} + +RE_H4 [a-fA-F0-9]{1,4} +RE_H4_COLON {RE_H4}: +RE_LS32 (({RE_H4}:{RE_H4})|{RE_IPV4}) +RE_IPV6_P1 {RE_H4_COLON}{6}{RE_LS32} +RE_IPV6_P2 ::{RE_H4_COLON}{5}{RE_LS32} +RE_IPV6_P3 ({RE_H4})?::{RE_H4_COLON}{4}{RE_LS32} +RE_IPV6_P4 ({RE_H4_COLON}{0,1}{RE_H4})?::{RE_H4_COLON}{3}{RE_LS32} +RE_IPV6_P5 ({RE_H4_COLON}{0,2}{RE_H4})?::{RE_H4_COLON}{2}{RE_LS32} +RE_IPV6_P6 ({RE_H4_COLON}{0,3}{RE_H4})?::{RE_H4_COLON}{1}{RE_LS32} +RE_IPV6_P7 ({RE_H4_COLON}{0,4}{RE_H4})?::{RE_LS32} +RE_IPV6_P8 ({RE_H4_COLON}{0,5}{RE_H4})?::{RE_H4} +RE_IPV6_P9 ({RE_H4_COLON}{0,6}{RE_H4})?:: +RE_IPV6 {RE_IPV6_P1}|{RE_IPV6_P2}|{RE_IPV6_P3}|{RE_IPV6_P4}|{RE_IPV6_P5}|{RE_IPV6_P6}|{RE_IPV6_P7}|{RE_IPV6_P8}|{RE_IPV6_P9} +RE_IPV6_PREFIXLEN 12[0-8]|1[01][0-9]|[0-9][0-9]? +RE_IPV6NET {RE_IPV6}\/{RE_IPV6_PREFIXLEN} + +%% + +[[:digit:]]+".."[[:digit:]]+ { yylval.c_str = strdup(yytext); + return YY_UINTRANGE; + } + +[[:digit:]]+ { yylval.c_str = strdup(yytext); + return YY_UINT; + } + +-[[:digit:]]+ { yylval.c_str = strdup(yytext); + return YY_INT; + } + +"true" { yylval.c_str = strdup(yytext); + return YY_BOOL; + } + +"false" { yylval.c_str = strdup(yytext); + return YY_BOOL; + } + +\"|\' BEGIN(STR); + +\"|\' BEGIN(INITIAL); + +[^\"\']+ { yylval.c_str = strdup(yytext); + _parser_lineno += policy_utils::count_nl(yytext); + /* XXX: a string can be started with " but terminated with ' + * and vice versa... + */ + return YY_STR; + } + +{RE_IPV4}".."{RE_IPV4} { + yylval.c_str = strdup(yytext); + return YY_IPV4RANGE; + } + +{RE_IPV4} { + yylval.c_str = strdup(yytext); + return YY_IPV4; + } + +{RE_IPV4NET} { + yylval.c_str = strdup(yytext); + return YY_IPV4NET; + } + + +{RE_IPV6}".."{RE_IPV6} { + yylval.c_str = strdup(yytext); + return YY_IPV6RANGE; + } + +{RE_IPV6} { + yylval.c_str = strdup(yytext); + return YY_IPV6; + } + +{RE_IPV6NET} { + yylval.c_str = strdup(yytext); + return YY_IPV6NET; + } + +":" { + // the colon is an alias for asignment in action and equality + // in the source / dest blocks. + if (_block == Term::ACTION) + return YY_ASSIGN; + else + return YY_EQ; + } + +"(" return YY_LPAR; +")" return YY_RPAR; +"==" return YY_EQ; +"!=" return YY_NE; +"<=" return YY_LE; +">=" return YY_GE; +"<" return YY_LT; +">" return YY_GT; +"+" return YY_ADD; +"*" return YY_MUL; +"\-" return YY_SUB; +"=" return YY_ASSIGN; +"+=" return YY_PLUS_EQUALS; +"-=" return YY_MINUS_EQUALS; +"||" return YY_OR; +"&&" return YY_AND; +"!" return YY_NOT; + +"exact" return YY_IPNET_EQ; +"longer" return YY_IPNET_LT; +"shorter" return YY_IPNET_GT; +"orlonger" return YY_IPNET_LE; +"orshorter" return YY_IPNET_GE; +"and" return YY_AND; +"or" return YY_OR; +"xor" return YY_XOR; +"not" return YY_NOT; +"add" return YY_PLUS_EQUALS; +"sub" return YY_MINUS_EQUALS; +"head" return YY_HEAD; +"ctr" return YY_CTR; +"ne_int" return YY_NE_INT; +"accept" return YY_ACCEPT; +"reject" return YY_REJECT; +"SET" return YY_SET; +"REGEX" return YY_REGEX; +"protocol" return YY_PROTOCOL; +"next" return YY_NEXT; +"policy" return YY_POLICY; +"term" return YY_TERM; + +[[:alpha:]][[:alnum:]_-]* { yylval.c_str = strdup(yytext); + return YY_ID; + } + +; return YY_SEMICOLON; + +[[:blank:]]+ /* eat blanks */ + +"\n" _parser_lineno++; + +. { yyerror("Unknown character"); } + +%% + +void yyerror(const char *m) +{ + ostringstream oss; + oss << "Error on line " << _parser_lineno << " near ("; + + for(int i = 0; i < yyleng; i++) + oss << yytext[i]; + oss << "): " << m; + + _last_error = oss.str(); +} + +// Everything is put in the lexer because of YY_BUFFER_STATE... +int +policy_parser::policy_parse(vector& outnodes, const Term::BLOCKS& block, + const string& conf, string& outerr) +{ + + YY_BUFFER_STATE yybuffstate = yy_scan_string(conf.c_str()); + + _last_error = "No error"; + _parser_nodes = &outnodes; + _parser_lineno = 1; + _block = block; + + int res = yyparse(); + + yy_delete_buffer(yybuffstate); + outerr = _last_error; + + return res; +} -- 1.7.9.5 From igorm at etf.rs Fri Aug 31 04:33:47 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:33:47 +0200 Subject: [Xorp-hackers] [PATCH 01/15] xorp:rtrmgr: Add patern for one line comment In-Reply-To: <1346412841-31507-1-git-send-email-igorm@etf.rs> References: <1346412841-31507-1-git-send-email-igorm@etf.rs> Message-ID: <1346412841-31507-2-git-send-email-igorm@etf.rs> From: Igor Maravic Everything in a line, that is behind %% is considered a comment. Signed-off-by: Igor Maravic --- xorp/rtrmgr/boot.ll | 10 ++++++++++ xorp/rtrmgr/op_commands.ll | 10 ++++++++++ xorp/rtrmgr/template.ll | 12 ++++++++++++ 3 files changed, 32 insertions(+) diff --git a/xorp/rtrmgr/boot.ll b/xorp/rtrmgr/boot.ll index d832afd..6e682ae 100644 --- a/xorp/rtrmgr/boot.ll +++ b/xorp/rtrmgr/boot.ll @@ -33,6 +33,7 @@ extern YYSTYPE bootlval; %option noyywrap %option nounput %option never-interactive +%x one_liner %x comment %x string %x arith @@ -453,6 +454,15 @@ RE_ARITH_OPERATOR [" "]*({RE_BIN_OPERATOR})[" "]* "*"+"/" BEGIN(INITIAL); +"%%" BEGIN(one_liner); + +[^\n]* /* eat up everything, except new line*/ + +\n { + boot_linenum++; + BEGIN(INITIAL); + } + . { /* everything else is a syntax error */ return SYNTAX_ERROR; diff --git a/xorp/rtrmgr/op_commands.ll b/xorp/rtrmgr/op_commands.ll index 0052a41..6dea7a4 100644 --- a/xorp/rtrmgr/op_commands.ll +++ b/xorp/rtrmgr/op_commands.ll @@ -30,6 +30,7 @@ extern YYSTYPE opcmdlval; %option noyywrap %option nounput %option never-interactive +%x one_liner %x comment %x string @@ -151,6 +152,15 @@ extern YYSTYPE opcmdlval; "*"+"/" BEGIN(INITIAL); +"%%" BEGIN(one_liner); + +[^\n]* /* eat up everything, except new line*/ + +\n { + opcmd_linenum++; + BEGIN(INITIAL); + } + . { /* everything else is a syntax error */ return SYNTAX_ERROR; diff --git a/xorp/rtrmgr/template.ll b/xorp/rtrmgr/template.ll index a256ccb..d9f9184 100644 --- a/xorp/rtrmgr/template.ll +++ b/xorp/rtrmgr/template.ll @@ -29,6 +29,7 @@ extern YYSTYPE tpltlval; %option noyywrap %option nounput %option never-interactive +%x one_liner %x comment %x string @@ -487,6 +488,17 @@ RE_URL_SUBDELIMS "!"|"$"|"&"|"'"|"("|")"|"*"|"+"|","|";"|"=" "*"+"/" BEGIN(INITIAL); +"%%" BEGIN(one_liner); + +[^\n]* /* eat up everything, except new line*/ + +\n { + tplt_linenum++; + BEGIN(INITIAL); + } + + + . { /* everything else is a syntax error */ return SYNTAX_ERROR; -- 1.7.9.5 From igorm at etf.rs Fri Aug 31 04:33:55 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:33:55 +0200 Subject: [Xorp-hackers] [PATCH 09/15] Remove yacc.yy_policy_backend_parser.cc In-Reply-To: <1346412841-31507-1-git-send-email-igorm@etf.rs> References: <1346412841-31507-1-git-send-email-igorm@etf.rs> Message-ID: <1346412841-31507-10-git-send-email-igorm@etf.rs> From: Igor Maravic Signed-off-by: Igor Maravic --- .../backend/yacc.yy_policy_backend_parser.cc | 706 -------------------- 1 file changed, 706 deletions(-) delete mode 100644 xorp/policy/backend/yacc.yy_policy_backend_parser.cc diff --git a/xorp/policy/backend/yacc.yy_policy_backend_parser.cc b/xorp/policy/backend/yacc.yy_policy_backend_parser.cc deleted file mode 100644 index ed08404..0000000 --- a/xorp/policy/backend/yacc.yy_policy_backend_parser.cc +++ /dev/null @@ -1,706 +0,0 @@ -#include -#ifndef lint - -#endif -#define YYBYACC 1 -#define YYMAJOR 1 -#define YYMINOR 9 -#define YYLEX yylex() -#define YYEMPTY -1 -#define yyclearin (yychar=(YYEMPTY)) -#define yyerrok (yyerrflag=0) -#define YYRECOVERING() (yyerrflag!=0) -#if defined(__cplusplus) || __STDC__ -static int yygrowstack(void); -#else -static int yygrowstack(); -#endif -#define yyparse yy_policy_backend_parserparse -#define yylex yy_policy_backend_parserlex -#define yyerror yy_policy_backend_parsererror -#define yychar yy_policy_backend_parserchar -#define yyval yy_policy_backend_parserval -#define yylval yy_policy_backend_parserlval -#define yydebug yy_policy_backend_parserdebug -#define yynerrs yy_policy_backend_parsernerrs -#define yyerrflag yy_policy_backend_parsererrflag -#define yyss yy_policy_backend_parserss -#define yyssp yy_policy_backend_parserssp -#define yyvs yy_policy_backend_parservs -#define yyvsp yy_policy_backend_parservsp -#define yylhs yy_policy_backend_parserlhs -#define yylen yy_policy_backend_parserlen -#define yydefred yy_policy_backend_parserdefred -#define yydgoto yy_policy_backend_parserdgoto -#define yysindex yy_policy_backend_parsersindex -#define yyrindex yy_policy_backend_parserrindex -#define yygindex yy_policy_backend_parsergindex -#define yytable yy_policy_backend_parsertable -#define yycheck yy_policy_backend_parsercheck -#define yyname yy_policy_backend_parsername -#define yyrule yy_policy_backend_parserrule -#define yysslim yy_policy_backend_parsersslim -#define yystacksize yy_policy_backend_parserstacksize -#define YYPREFIX "yy_policy_backend_parser" -#line 2 "backend.y" -/* - * yacc -d -p yy_policy_backend_parser -o yacc.yy_policy_backend_parser.cc backend.y - */ - - - -#include "libxorp/xorp.h" -#include "policy/common/varrw.hh" -#include "policy/common/element_factory.hh" -#include "policy/common/operator.hh" -#include "policy_backend_parser.hh" -#include "instruction.hh" -#include "term_instr.hh" -#include "policy_instr.hh" - -extern int yylex(void); -extern void yyerror(const char*); - -using namespace policy_backend_parser; - -static ElementFactory _ef; - -#line 26 "backend.y" -typedef union { - char* c_str; - PolicyInstr* c_pi; -} YYSTYPE; -#line 78 "yacc.yy_policy_backend_parser.cc" -#define YYERRCODE 256 -#define YY_ARG 257 -#define YY_NEWLINE 258 -#define YY_BLANK 259 -#define YY_POLICY_START 260 -#define YY_POLICY_END 261 -#define YY_TERM_START 262 -#define YY_TERM_END 263 -#define YY_PUSH 264 -#define YY_PUSH_SET 265 -#define YY_EQ 266 -#define YY_NE 267 -#define YY_LT 268 -#define YY_GT 269 -#define YY_LE 270 -#define YY_GE 271 -#define YY_NOT 272 -#define YY_AND 273 -#define YY_OR 274 -#define YY_XOR 275 -#define YY_HEAD 276 -#define YY_CTR 277 -#define YY_NE_INT 278 -#define YY_ADD 279 -#define YY_SUB 280 -#define YY_MUL 281 -#define YY_ONFALSE_EXIT 282 -#define YY_REGEX 283 -#define YY_LOAD 284 -#define YY_STORE 285 -#define YY_ACCEPT 286 -#define YY_REJECT 287 -#define YY_SET 288 -#define YY_NEXT 289 -#define YY_POLICY 290 -#define YY_SUBR_START 291 -#define YY_SUBR_END 292 -#define YY_TERM 293 -const short yy_policy_backend_parserlhs[] = { -1, - 0, 0, 0, 0, 3, 2, 4, 4, 1, 5, - 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, -}; -const short yy_policy_backend_parserlen[] = { 2, - 2, 2, 2, 0, 5, 5, 2, 0, 6, 7, - 0, 3, 0, 3, 2, 1, 2, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, -}; -const short yy_policy_backend_parserdefred[] = { 4, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 8, - 11, 0, 0, 0, 0, 0, 7, 0, 0, 5, - 6, 9, 0, 13, 0, 0, 0, 0, 21, 22, - 23, 24, 25, 26, 27, 28, 30, 29, 34, 35, - 36, 31, 32, 33, 16, 37, 0, 0, 19, 20, - 0, 0, 0, 10, 0, 15, 17, 18, 38, 39, - 40, 12, 14, -}; -const short yy_policy_backend_parserdgoto[] = { 1, - 5, 6, 7, 13, 14, 25, 53, -}; -const short yy_policy_backend_parsersindex[] = { 0, - -258, -254, -250, -249, 0, 0, 0, -248, -246, 0, - 0, -245, -260, -256, -244, -243, 0, -242, -240, 0, - 0, 0, -239, 0, -229, -238, -236, -235, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -234, -233, 0, 0, - -289, -232, -231, 0, -228, 0, 0, 0, 0, 0, - 0, 0, 0, -}; -const short yy_policy_backend_parserrindex[] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -}; -const short yy_policy_backend_parsergindex[] = { 0, - -5, 0, 0, 0, 0, 0, 0, -}; -#define YYTABLESIZE 61 -const short yy_policy_backend_parsertable[] = { 2, - 59, 2, 8, 60, 18, 19, 9, 17, 10, 11, - 12, 15, 0, 20, 21, 22, 23, 0, 24, 54, - 55, 56, 57, 58, 61, 0, 62, 0, 63, 3, - 0, 16, 4, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 0, 51, - 52, -}; -const short yy_policy_backend_parsercheck[] = { 260, - 290, 260, 257, 293, 261, 262, 257, 13, 258, 258, - 257, 257, -1, 258, 258, 258, 257, -1, 258, 258, - 257, 257, 257, 257, 257, -1, 258, -1, 257, 288, - -1, 292, 291, 263, 264, 265, 266, 267, 268, 269, - 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, - 280, 281, 282, 283, 284, 285, 286, 287, -1, 289, - 290, -}; -#define YYFINAL 1 -#ifndef YYDEBUG -#define YYDEBUG 0 -#endif -#define YYMAXTOKEN 293 -#if YYDEBUG -const char * const yy_policy_backend_parsername[] = { -"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"YY_ARG","YY_NEWLINE","YY_BLANK", -"YY_POLICY_START","YY_POLICY_END","YY_TERM_START","YY_TERM_END","YY_PUSH", -"YY_PUSH_SET","YY_EQ","YY_NE","YY_LT","YY_GT","YY_LE","YY_GE","YY_NOT","YY_AND", -"YY_OR","YY_XOR","YY_HEAD","YY_CTR","YY_NE_INT","YY_ADD","YY_SUB","YY_MUL", -"YY_ONFALSE_EXIT","YY_REGEX","YY_LOAD","YY_STORE","YY_ACCEPT","YY_REJECT", -"YY_SET","YY_NEXT","YY_POLICY","YY_SUBR_START","YY_SUBR_END","YY_TERM", -}; -const char * const yy_policy_backend_parserrule[] = { -"$accept : program", -"program : program policy", -"program : program subroutine", -"program : program set", -"program :", -"set : YY_SET YY_ARG YY_ARG YY_ARG YY_NEWLINE", -"subroutine : YY_SUBR_START YY_NEWLINE policies YY_SUBR_END YY_NEWLINE", -"policies : policies policy", -"policies :", -"policy : YY_POLICY_START YY_ARG YY_NEWLINE terms YY_POLICY_END YY_NEWLINE", -"terms : terms YY_TERM_START YY_ARG YY_NEWLINE statements YY_TERM_END YY_NEWLINE", -"terms :", -"statements : statements statement YY_NEWLINE", -"statements :", -"statement : YY_PUSH YY_ARG YY_ARG", -"statement : YY_PUSH_SET YY_ARG", -"statement : YY_ONFALSE_EXIT", -"statement : YY_LOAD YY_ARG", -"statement : YY_STORE YY_ARG", -"statement : YY_ACCEPT", -"statement : YY_REJECT", -"statement : YY_EQ", -"statement : YY_NE", -"statement : YY_LT", -"statement : YY_GT", -"statement : YY_LE", -"statement : YY_GE", -"statement : YY_NOT", -"statement : YY_AND", -"statement : YY_XOR", -"statement : YY_OR", -"statement : YY_ADD", -"statement : YY_SUB", -"statement : YY_MUL", -"statement : YY_HEAD", -"statement : YY_CTR", -"statement : YY_NE_INT", -"statement : YY_REGEX", -"statement : YY_NEXT YY_POLICY", -"statement : YY_NEXT YY_TERM", -"statement : YY_POLICY YY_ARG", -}; -#endif -#if YYDEBUG -#include -#endif -#ifdef YYSTACKSIZE -#undef YYMAXDEPTH -#define YYMAXDEPTH YYSTACKSIZE -#else -#ifdef YYMAXDEPTH -#define YYSTACKSIZE YYMAXDEPTH -#else -#define YYSTACKSIZE 10000 -#define YYMAXDEPTH 10000 -#endif -#endif -#define YYINITSTACKSIZE 200 -int yydebug; -int yynerrs; -int yyerrflag; -int yychar; -short *yyssp; -YYSTYPE *yyvsp; -YYSTYPE yyval; -YYSTYPE yylval; -short *yyss; -short *yysslim; -YYSTYPE *yyvs; -int yystacksize; -/* allocate initial stack or double stack size, up to YYMAXDEPTH */ -static int yygrowstack() -{ - int newsize, i; - short *newss; - YYSTYPE *newvs; - - if ((newsize = yystacksize) == 0) - newsize = YYINITSTACKSIZE; - else if (newsize >= YYMAXDEPTH) - return -1; - else if ((newsize *= 2) > YYMAXDEPTH) - newsize = YYMAXDEPTH; - i = yyssp - yyss; - newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) : - (short *)malloc(newsize * sizeof *newss); - if (newss == NULL) - return -1; - yyss = newss; - yyssp = newss + i; - newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) : - (YYSTYPE *)malloc(newsize * sizeof *newvs); - if (newvs == NULL) - return -1; - yyvs = newvs; - yyvsp = newvs + i; - yystacksize = newsize; - yysslim = yyss + newsize - 1; - return 0; -} - -#define YYABORT goto yyabort -#define YYREJECT goto yyabort -#define YYACCEPT goto yyaccept -#define YYERROR goto yyerrlab - -#ifndef YYPARSE_PARAM -#if defined(__cplusplus) || __STDC__ -#define YYPARSE_PARAM_ARG void -#define YYPARSE_PARAM_DECL -#else /* ! ANSI-C/C++ */ -#define YYPARSE_PARAM_ARG -#define YYPARSE_PARAM_DECL -#endif /* ANSI-C/C++ */ -#else /* YYPARSE_PARAM */ -#ifndef YYPARSE_PARAM_TYPE -#define YYPARSE_PARAM_TYPE void * -#endif -#if defined(__cplusplus) || __STDC__ -#define YYPARSE_PARAM_ARG YYPARSE_PARAM_TYPE YYPARSE_PARAM -#define YYPARSE_PARAM_DECL -#else /* ! ANSI-C/C++ */ -#define YYPARSE_PARAM_ARG YYPARSE_PARAM -#define YYPARSE_PARAM_DECL YYPARSE_PARAM_TYPE YYPARSE_PARAM; -#endif /* ANSI-C/C++ */ -#endif /* ! YYPARSE_PARAM */ - -int -yyparse (YYPARSE_PARAM_ARG) - YYPARSE_PARAM_DECL -{ - int yym, yyn, yystate; -#if YYDEBUG - const char *yys; - - if ((yys = getenv("YYDEBUG"))) - { - yyn = *yys; - if (yyn >= '0' && yyn <= '9') - yydebug = yyn - '0'; - } -#endif - - yynerrs = 0; - yyerrflag = 0; - yychar = (-1); - - if (yyss == NULL && yygrowstack()) goto yyoverflow; - yyssp = yyss; - yyvsp = yyvs; - *yyssp = yystate = 0; - -yyloop: - if ((yyn = yydefred[yystate])) goto yyreduce; - if (yychar < 0) - { - if ((yychar = yylex()) < 0) yychar = 0; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("%sdebug: state %d, reading %d (%s)\n", - YYPREFIX, yystate, yychar, yys); - } -#endif - } - if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yychar) - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: state %d, shifting to state %d\n", - YYPREFIX, yystate, yytable[yyn]); -#endif - if (yyssp >= yysslim && yygrowstack()) - { - goto yyoverflow; - } - *++yyssp = yystate = yytable[yyn]; - *++yyvsp = yylval; - yychar = (-1); - if (yyerrflag > 0) --yyerrflag; - goto yyloop; - } - if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yychar) - { - yyn = yytable[yyn]; - goto yyreduce; - } - if (yyerrflag) goto yyinrecovery; -#if defined(lint) || defined(__GNUC__) - goto yynewerror; -#endif -yynewerror: - yyerror("syntax error"); -#if defined(lint) || defined(__GNUC__) - goto yyerrlab; -#endif -yyerrlab: - ++yynerrs; -yyinrecovery: - if (yyerrflag < 3) - { - yyerrflag = 3; - for (;;) - { - if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: state %d, error recovery shifting\ - to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); -#endif - if (yyssp >= yysslim && yygrowstack()) - { - goto yyoverflow; - } - *++yyssp = yystate = yytable[yyn]; - *++yyvsp = yylval; - goto yyloop; - } - else - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: error recovery discarding state %d\n", - YYPREFIX, *yyssp); -#endif - if (yyssp <= yyss) goto yyabort; - --yyssp; - --yyvsp; - } - } - } - else - { - if (yychar == 0) goto yyabort; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("%sdebug: state %d, error recovery discards token %d (%s)\n", - YYPREFIX, yystate, yychar, yys); - } -#endif - yychar = (-1); - goto yyloop; - } -yyreduce: -#if YYDEBUG - if (yydebug) - printf("%sdebug: state %d, reducing by rule %d (%s)\n", - YYPREFIX, yystate, yyn, yyrule[yyn]); -#endif - yym = yylen[yyn]; - yyval = yyvsp[1-yym]; - switch (yyn) - { -case 1: -#line 48 "backend.y" -{ _yy_policies->push_back(yyvsp[0].c_pi); } -break; -case 5: -#line 56 "backend.y" -{ - /* XXX: doesn't delete old*/ - (*_yy_sets)[yyvsp[-2].c_str] = _ef.create(yyvsp[-3].c_str, yyvsp[-1].c_str); - free(yyvsp[-3].c_str); free(yyvsp[-2].c_str); free(yyvsp[-1].c_str); - } -break; -case 7: -#line 68 "backend.y" -{ (*_yy_subr)[yyvsp[0].c_pi->name()] = yyvsp[0].c_pi; } -break; -case 9: -#line 73 "backend.y" -{ - PolicyInstr* pi = new PolicyInstr(yyvsp[-4].c_str,_yy_terms); - - pi->set_trace(_yy_trace); - _yy_trace = false; - - _yy_terms = new vector(); - - free(yyvsp[-4].c_str); - - yyval.c_pi = pi; - } -break; -case 10: -#line 88 "backend.y" -{ - - TermInstr* ti = new TermInstr(yyvsp[-4].c_str,_yy_instructions); - _yy_instructions = new vector(); - _yy_terms->push_back(ti); - free(yyvsp[-4].c_str); - } -break; -case 14: -#line 105 "backend.y" -{ - Instruction* i = new Push(_ef.create(yyvsp[-1].c_str,yyvsp[0].c_str)); - _yy_instructions->push_back(i); - free(yyvsp[-1].c_str); free(yyvsp[0].c_str); - } -break; -case 15: -#line 110 "backend.y" -{ - _yy_instructions->push_back(new PushSet(yyvsp[0].c_str)); - free(yyvsp[0].c_str); - } -break; -case 16: -#line 115 "backend.y" -{ - _yy_instructions->push_back(new OnFalseExit()); - } -break; -case 17: -#line 119 "backend.y" -{ - char* err = NULL; - bool is_error = false; - VarRW::Id id = strtoul(yyvsp[0].c_str, &err, 10); - if ((err != NULL) && (*err != '\0')) - is_error = true; - free(yyvsp[0].c_str); - if (is_error) { - yyerror("Need numeric var ID"); - YYERROR; - } - _yy_instructions->push_back(new Load(id)); - } -break; -case 18: -#line 133 "backend.y" -{ - char* err = NULL; - bool is_error = false; - VarRW::Id id = strtoul(yyvsp[0].c_str, &err, 10); - - if ((err != NULL) && (*err != '\0')) - is_error = true; - - free(yyvsp[0].c_str); - - if (is_error) { - yyerror("Need numeric var ID"); - YYERROR; - } - - if (id == VarRW::VAR_TRACE) - _yy_trace = true; - - _yy_instructions->push_back(new Store(id)); - } -break; -case 19: -#line 154 "backend.y" -{ _yy_instructions->push_back(new Accept()); } -break; -case 20: -#line 155 "backend.y" -{ _yy_instructions->push_back(new Reject()); } -break; -case 21: -#line 157 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpEq)); } -break; -case 22: -#line 158 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpNe)); } -break; -case 23: -#line 159 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpLt)); } -break; -case 24: -#line 160 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpGt)); } -break; -case 25: -#line 161 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpLe)); } -break; -case 26: -#line 162 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpGe)); } -break; -case 27: -#line 164 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpNot)); } -break; -case 28: -#line 165 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpAnd)); } -break; -case 29: -#line 166 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpXor)); } -break; -case 30: -#line 167 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpOr)); } -break; -case 31: -#line 169 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpAdd)); } -break; -case 32: -#line 170 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpSub)); } -break; -case 33: -#line 171 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpMul)); } -break; -case 34: -#line 172 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpHead));} -break; -case 35: -#line 173 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpCtr));} -break; -case 36: -#line 174 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpNEInt));} -break; -case 37: -#line 175 "backend.y" -{ _yy_instructions->push_back(new NaryInstr(new OpRegex));} -break; -case 38: -#line 177 "backend.y" -{ _yy_instructions->push_back(new Next(Next::POLICY)); } -break; -case 39: -#line 179 "backend.y" -{ _yy_instructions->push_back(new Next(Next::TERM)); } -break; -case 40: -#line 181 "backend.y" -{ _yy_instructions->push_back(new Subr(yyvsp[0].c_str)); free(yyvsp[0].c_str); } -break; -#line 655 "yacc.yy_policy_backend_parser.cc" - } - yyssp -= yym; - yystate = *yyssp; - yyvsp -= yym; - yym = yylhs[yyn]; - if (yystate == 0 && yym == 0) - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: after reduction, shifting from state 0 to\ - state %d\n", YYPREFIX, YYFINAL); -#endif - yystate = YYFINAL; - *++yyssp = YYFINAL; - *++yyvsp = yyval; - if (yychar < 0) - { - if ((yychar = yylex()) < 0) yychar = 0; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("%sdebug: state %d, reading %d (%s)\n", - YYPREFIX, YYFINAL, yychar, yys); - } -#endif - } - if (yychar == 0) goto yyaccept; - goto yyloop; - } - if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yystate) - yystate = yytable[yyn]; - else - yystate = yydgoto[yym]; -#if YYDEBUG - if (yydebug) - printf("%sdebug: after reduction, shifting from state %d \ -to state %d\n", YYPREFIX, *yyssp, yystate); -#endif - if (yyssp >= yysslim && yygrowstack()) - { - goto yyoverflow; - } - *++yyssp = yystate; - *++yyvsp = yyval; - goto yyloop; -yyoverflow: - yyerror("yacc stack overflow"); -yyabort: - return (1); -yyaccept: - return (0); -} -- 1.7.9.5 From igorm at etf.rs Fri Aug 31 04:33:54 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:33:54 +0200 Subject: [Xorp-hackers] [PATCH 08/15] Remove lex.yy_policy_backend_parser.cc In-Reply-To: <1346412841-31507-1-git-send-email-igorm@etf.rs> References: <1346412841-31507-1-git-send-email-igorm@etf.rs> Message-ID: <1346412841-31507-9-git-send-email-igorm@etf.rs> From: Igor Maravic Signed-off-by: Igor Maravic --- .../policy/backend/lex.yy_policy_backend_parser.cc | 2035 -------------------- 1 file changed, 2035 deletions(-) delete mode 100644 xorp/policy/backend/lex.yy_policy_backend_parser.cc diff --git a/xorp/policy/backend/lex.yy_policy_backend_parser.cc b/xorp/policy/backend/lex.yy_policy_backend_parser.cc deleted file mode 100644 index 306e105..0000000 --- a/xorp/policy/backend/lex.yy_policy_backend_parser.cc +++ /dev/null @@ -1,2035 +0,0 @@ -#line 2 "lex.yy_policy_backend_parser.cc" - -#line 4 "lex.yy_policy_backend_parser.cc" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 33 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -#if __STDC__ - -#define YY_USE_CONST - -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yy_policy_backend_parserrestart(yy_policy_backend_parserin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -extern int yy_policy_backend_parserleng; - -extern FILE *yy_policy_backend_parserin, *yy_policy_backend_parserout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yy_policy_backend_parsertext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yy_policy_backend_parsertext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, (yytext_ptr) ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef unsigned int yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yy_policy_backend_parserrestart()), so that the user can continue scanning by - * just pointing yy_policy_backend_parserin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -/* yy_hold_char holds the character lost when yy_policy_backend_parsertext is formed. */ -static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int yy_policy_backend_parserleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yy_policy_backend_parserwrap()'s to do buffer switches - * instead of setting up a fresh yy_policy_backend_parserin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yy_policy_backend_parserrestart (FILE *input_file ); -void yy_policy_backend_parser_switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE yy_policy_backend_parser_create_buffer (FILE *file,int size ); -void yy_policy_backend_parser_delete_buffer (YY_BUFFER_STATE b ); -void yy_policy_backend_parser_flush_buffer (YY_BUFFER_STATE b ); -void yy_policy_backend_parserpush_buffer_state (YY_BUFFER_STATE new_buffer ); -void yy_policy_backend_parserpop_buffer_state (void ); - -static void yy_policy_backend_parserensure_buffer_stack (void ); -static void yy_policy_backend_parser_load_buffer_state (void ); -static void yy_policy_backend_parser_init_buffer (YY_BUFFER_STATE b,FILE *file ); - -#define YY_FLUSH_BUFFER yy_policy_backend_parser_flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE yy_policy_backend_parser_scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE yy_policy_backend_parser_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_policy_backend_parser_scan_bytes (yyconst char *bytes,int len ); - -void *yy_policy_backend_parseralloc (yy_size_t ); -void *yy_policy_backend_parserrealloc (void *,yy_size_t ); -void yy_policy_backend_parserfree (void * ); - -#define yy_new_buffer yy_policy_backend_parser_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yy_policy_backend_parserensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_policy_backend_parser_create_buffer(yy_policy_backend_parserin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yy_policy_backend_parserensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_policy_backend_parser_create_buffer(yy_policy_backend_parserin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define yy_policy_backend_parserwrap(n) 1 -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -FILE *yy_policy_backend_parserin = (FILE *) 0, *yy_policy_backend_parserout = (FILE *) 0; - -typedef int yy_state_type; - -extern int yy_policy_backend_parserlineno; - -int yy_policy_backend_parserlineno = 1; - -extern char *yy_policy_backend_parsertext; -#define yytext_ptr yy_policy_backend_parsertext - -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yy_policy_backend_parsertext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yy_policy_backend_parserleng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 41 -#define YY_END_OF_BUFFER 42 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[151] = - { 0, - 0, 0, 0, 0, 42, 37, 36, 35, 37, 38, - 34, 32, 33, 28, 37, 29, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 37, 37, 40, 39, 37, - 36, 27, 30, 26, 31, 37, 37, 37, 37, 37, - 37, 37, 37, 16, 37, 37, 37, 37, 37, 37, - 37, 37, 40, 37, 14, 18, 37, 37, 37, 37, - 13, 37, 37, 37, 37, 37, 5, 37, 37, 37, - 15, 37, 17, 9, 21, 37, 37, 37, 6, 37, - 37, 37, 37, 23, 37, 37, 37, 37, 37, 8, - 37, 10, 37, 37, 11, 37, 37, 22, 37, 12, - - 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 37, 7, 25, 37, 4, - 37, 37, 37, 37, 37, 37, 37, 37, 37, 2, - 37, 24, 3, 37, 37, 37, 37, 19, 1, 37, - 37, 37, 37, 37, 37, 37, 37, 37, 20, 0 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 1, 1, 1, 1, 1, - 1, 6, 7, 1, 8, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, - 10, 11, 1, 1, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 1, 22, 23, 24, 25, 26, - 1, 27, 28, 29, 30, 1, 1, 31, 32, 1, - 1, 1, 1, 1, 33, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst flex_int32_t yy_meta[34] = - { 0, - 1, 2, 2, 1, 3, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1 - } ; - -static yyconst flex_int16_t yy_base[154] = - { 0, - 0, 0, 156, 155, 159, 0, 156, 162, 147, 162, - 0, 0, 0, 146, 145, 144, 20, 124, 136, 126, - 20, 11, 12, 134, 23, 133, 123, 0, 162, 0, - 145, 0, 0, 0, 0, 132, 130, 117, 131, 130, - 110, 17, 123, 0, 117, 110, 22, 108, 111, 122, - 107, 106, 0, 116, 0, 0, 116, 115, 100, 95, - 0, 115, 106, 106, 108, 107, 0, 95, 94, 97, - 0, 93, 0, 0, 0, 102, 95, 102, 82, 83, - 99, 96, 78, 77, 80, 85, 79, 74, 77, 0, - 75, 0, 31, 32, 0, 77, 86, 68, 84, 0, - - 75, 69, 73, 67, 66, 61, 33, 64, 77, 79, - 75, 77, 56, 71, 62, 56, 0, 0, 57, 0, - 56, 49, 50, 65, 67, 49, 48, 56, 55, 0, - 47, 0, 0, 49, 43, 42, 41, 0, 0, 53, - 41, 39, 42, 43, 27, 35, 29, 27, 0, 162, - 61, 49, 64 - } ; - -static yyconst flex_int16_t yy_def[154] = - { 0, - 150, 1, 151, 151, 150, 152, 150, 150, 152, 150, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 153, 150, 152, - 150, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 153, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 0, - 150, 150, 150 - } ; - -static yyconst flex_int16_t yy_nxt[196] = - { 0, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 6, 18, 6, 6, 6, 6, 19, 6, - 6, 20, 6, 21, 22, 23, 24, 25, 26, 6, - 27, 6, 6, 36, 43, 41, 45, 44, 48, 65, - 60, 46, 66, 37, 42, 61, 101, 103, 115, 30, - 149, 49, 50, 148, 147, 146, 145, 144, 102, 104, - 116, 28, 28, 28, 53, 53, 143, 142, 141, 140, - 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, - 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, - 119, 118, 117, 114, 113, 112, 111, 110, 109, 108, - - 107, 106, 105, 100, 99, 98, 97, 96, 95, 94, - 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, - 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, - 73, 72, 71, 70, 69, 68, 67, 64, 63, 62, - 59, 58, 57, 56, 55, 54, 31, 52, 51, 47, - 40, 39, 38, 35, 34, 33, 32, 31, 150, 29, - 29, 5, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150 - - } ; - -static yyconst flex_int16_t yy_chk[196] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 17, 22, 21, 23, 22, 25, 47, - 42, 23, 47, 17, 21, 42, 93, 94, 107, 152, - 148, 25, 25, 147, 146, 145, 144, 143, 93, 94, - 107, 151, 151, 151, 153, 153, 142, 141, 140, 137, - 136, 135, 134, 131, 129, 128, 127, 126, 125, 124, - 123, 122, 121, 119, 116, 115, 114, 113, 112, 111, - 110, 109, 108, 106, 105, 104, 103, 102, 101, 99, - - 98, 97, 96, 91, 89, 88, 87, 86, 85, 84, - 83, 82, 81, 80, 79, 78, 77, 76, 72, 70, - 69, 68, 66, 65, 64, 63, 62, 60, 59, 58, - 57, 54, 52, 51, 50, 49, 48, 46, 45, 43, - 41, 40, 39, 38, 37, 36, 31, 27, 26, 24, - 20, 19, 18, 16, 15, 14, 9, 7, 5, 4, - 3, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150 - - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -extern int yy_policy_backend_parser_flex_debug; -int yy_policy_backend_parser_flex_debug = 0; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *yy_policy_backend_parsertext; -#line 1 "backend.l" -#line 2 "backend.l" - -#include - - -#include "libxorp/xorp.h" -#include "policy/common/policy_utils.hh" -#include "policy_backend_parser.hh" -#include "yacc.yy_policy_backend_parser.cc.h" - -#define yyparse yy_policy_backend_parserparse -#define yyerror yy_policy_backend_parsererror -#define yylval yy_policy_backend_parserlval - -using namespace policy_utils; -using namespace policy_backend_parser; - -void yyerror(const char*); -int yyparse(void); - -vector* policy_backend_parser::_yy_policies; -map* policy_backend_parser::_yy_sets; -vector* policy_backend_parser::_yy_terms; -vector* policy_backend_parser::_yy_instructions; -bool policy_backend_parser::_yy_trace; -SUBR* policy_backend_parser::_yy_subr; - -namespace { - string _last_error; - unsigned _parser_lineno; -} - - -#line 582 "lex.yy_policy_backend_parser.cc" - -#define INITIAL 0 -#define STR 1 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -static int yy_init_globals (void ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yy_policy_backend_parserwrap (void ); -#else -extern int yy_policy_backend_parserwrap (void ); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (void ); -#else -static int input (void ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO (void) fwrite( yy_policy_backend_parsertext, yy_policy_backend_parserleng, 1, yy_policy_backend_parserout ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - int n; \ - for ( n = 0; n < max_size && \ - (c = getc( yy_policy_backend_parserin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yy_policy_backend_parserin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yy_policy_backend_parserin))==0 && ferror(yy_policy_backend_parserin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yy_policy_backend_parserin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int yy_policy_backend_parserlex (void); - -#define YY_DECL int yy_policy_backend_parserlex (void) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yy_policy_backend_parsertext and yy_policy_backend_parserleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - -#line 40 "backend.l" - - -#line 737 "lex.yy_policy_backend_parser.cc" - - if ( !(yy_init) ) - { - (yy_init) = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! yy_policy_backend_parserin ) - yy_policy_backend_parserin = stdin; - - if ( ! yy_policy_backend_parserout ) - yy_policy_backend_parserout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - yy_policy_backend_parserensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_policy_backend_parser_create_buffer(yy_policy_backend_parserin,YY_BUF_SIZE ); - } - - yy_policy_backend_parser_load_buffer_state( ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of yy_policy_backend_parsertext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 151 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_current_state != 150 ); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 42 "backend.l" -{ return YY_POLICY_START; } - YY_BREAK -case 2: -YY_RULE_SETUP -#line 43 "backend.l" -{ return YY_POLICY_END; } - YY_BREAK -case 3: -YY_RULE_SETUP -#line 44 "backend.l" -{ return YY_TERM_START; } - YY_BREAK -case 4: -YY_RULE_SETUP -#line 45 "backend.l" -{ return YY_TERM_END; } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 46 "backend.l" -{ return YY_SET; } - YY_BREAK -case 6: -YY_RULE_SETUP -#line 47 "backend.l" -{ return YY_PUSH; } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 48 "backend.l" -{ return YY_PUSH_SET; } - YY_BREAK -case 8: -YY_RULE_SETUP -#line 49 "backend.l" -{ return YY_REGEX; } - YY_BREAK -case 9: -YY_RULE_SETUP -#line 50 "backend.l" -{ return YY_LOAD; } - YY_BREAK -case 10: -YY_RULE_SETUP -#line 51 "backend.l" -{ return YY_STORE; } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 52 "backend.l" -{ return YY_ACCEPT; } - YY_BREAK -case 12: -YY_RULE_SETUP -#line 53 "backend.l" -{ return YY_REJECT; } - YY_BREAK -case 13: -YY_RULE_SETUP -#line 54 "backend.l" -{ return YY_NOT; } - YY_BREAK -case 14: -YY_RULE_SETUP -#line 55 "backend.l" -{ return YY_AND; } - YY_BREAK -case 15: -YY_RULE_SETUP -#line 56 "backend.l" -{ return YY_XOR; } - YY_BREAK -case 16: -YY_RULE_SETUP -#line 57 "backend.l" -{ return YY_OR; } - YY_BREAK -case 17: -YY_RULE_SETUP -#line 58 "backend.l" -{ return YY_HEAD; } - YY_BREAK -case 18: -YY_RULE_SETUP -#line 59 "backend.l" -{ return YY_CTR; } - YY_BREAK -case 19: -YY_RULE_SETUP -#line 60 "backend.l" -{ return YY_ONFALSE_EXIT; } - YY_BREAK -case 20: -YY_RULE_SETUP -#line 61 "backend.l" -{ return YY_NE_INT; } - YY_BREAK -case 21: -YY_RULE_SETUP -#line 62 "backend.l" -{ return YY_NEXT; } - YY_BREAK -case 22: -YY_RULE_SETUP -#line 63 "backend.l" -{ return YY_POLICY; } - YY_BREAK -case 23: -YY_RULE_SETUP -#line 64 "backend.l" -{ return YY_TERM; } - YY_BREAK -case 24: -YY_RULE_SETUP -#line 65 "backend.l" -{ return YY_SUBR_START; } - YY_BREAK -case 25: -YY_RULE_SETUP -#line 66 "backend.l" -{ return YY_SUBR_END; } - YY_BREAK -case 26: -YY_RULE_SETUP -#line 68 "backend.l" -{ return YY_EQ; } - YY_BREAK -case 27: -YY_RULE_SETUP -#line 69 "backend.l" -{ return YY_NE; } - YY_BREAK -case 28: -YY_RULE_SETUP -#line 70 "backend.l" -{ return YY_LT; } - YY_BREAK -case 29: -YY_RULE_SETUP -#line 71 "backend.l" -{ return YY_GT; } - YY_BREAK -case 30: -YY_RULE_SETUP -#line 72 "backend.l" -{ return YY_LE; } - YY_BREAK -case 31: -YY_RULE_SETUP -#line 73 "backend.l" -{ return YY_GE; } - YY_BREAK -case 32: -YY_RULE_SETUP -#line 74 "backend.l" -{ return YY_ADD; } - YY_BREAK -case 33: -YY_RULE_SETUP -#line 75 "backend.l" -{ return YY_SUB; } - YY_BREAK -case 34: -YY_RULE_SETUP -#line 76 "backend.l" -{ return YY_MUL; } - YY_BREAK -case 35: -/* rule 35 can match eol */ -YY_RULE_SETUP -#line 78 "backend.l" -{ _parser_lineno++; return YY_NEWLINE; } - YY_BREAK -case 36: -YY_RULE_SETUP -#line 80 "backend.l" -/* eat blanks */ - YY_BREAK -case 37: -YY_RULE_SETUP -#line 82 "backend.l" -{ - yylval.c_str = strdup(yy_policy_backend_parsertext); - return YY_ARG; - } - YY_BREAK -case 38: -YY_RULE_SETUP -#line 87 "backend.l" -BEGIN(STR); - YY_BREAK -case 39: -YY_RULE_SETUP -#line 89 "backend.l" -BEGIN(INITIAL); - YY_BREAK -case 40: -/* rule 40 can match eol */ -YY_RULE_SETUP -#line 91 "backend.l" -{ yylval.c_str = strdup(yy_policy_backend_parsertext); - _parser_lineno += count_nl(yy_policy_backend_parsertext); - return YY_ARG; - } - YY_BREAK -case 41: -YY_RULE_SETUP -#line 96 "backend.l" -ECHO; - YY_BREAK -#line 1029 "lex.yy_policy_backend_parser.cc" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(STR): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yy_policy_backend_parserin at a new source and called - * yy_policy_backend_parserlex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yy_policy_backend_parserin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( yy_policy_backend_parserwrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yy_policy_backend_parsertext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of yy_policy_backend_parserlex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (void) -{ - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yy_policy_backend_parserrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yy_policy_backend_parserrestart(yy_policy_backend_parserin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (void) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = (yy_start); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 151 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 151 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 150); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (void) -#else - static int input (void) -#endif - -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yy_policy_backend_parserrestart(yy_policy_backend_parserin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yy_policy_backend_parserwrap( ) ) - return EOF; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve yy_policy_backend_parsertext */ - (yy_hold_char) = *++(yy_c_buf_p); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void yy_policy_backend_parserrestart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - yy_policy_backend_parserensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_policy_backend_parser_create_buffer(yy_policy_backend_parserin,YY_BUF_SIZE ); - } - - yy_policy_backend_parser_init_buffer(YY_CURRENT_BUFFER,input_file ); - yy_policy_backend_parser_load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void yy_policy_backend_parser_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * yy_policy_backend_parserpop_buffer_state(); - * yy_policy_backend_parserpush_buffer_state(new_buffer); - */ - yy_policy_backend_parserensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_policy_backend_parser_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (yy_policy_backend_parserwrap()) processing, but the only time this flag - * is looked at is after yy_policy_backend_parserwrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void yy_policy_backend_parser_load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yy_policy_backend_parserin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE yy_policy_backend_parser_create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_policy_backend_parseralloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_policy_backend_parser_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yy_policy_backend_parseralloc(b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_policy_backend_parser_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_policy_backend_parser_init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with yy_policy_backend_parser_create_buffer() - * - */ - void yy_policy_backend_parser_delete_buffer (YY_BUFFER_STATE b ) -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yy_policy_backend_parserfree((void *) b->yy_ch_buf ); - - yy_policy_backend_parserfree((void *) b ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a yy_policy_backend_parserrestart() or at EOF. - */ - static void yy_policy_backend_parser_init_buffer (YY_BUFFER_STATE b, FILE * file ) - -{ - int oerrno = errno; - - yy_policy_backend_parser_flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then yy_policy_backend_parser_init_buffer was _probably_ - * called from yy_policy_backend_parserrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void yy_policy_backend_parser_flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - yy_policy_backend_parser_load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void yy_policy_backend_parserpush_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - yy_policy_backend_parserensure_buffer_stack(); - - /* This block is copied from yy_policy_backend_parser_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_policy_backend_parser_switch_to_buffer. */ - yy_policy_backend_parser_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void yy_policy_backend_parserpop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - yy_policy_backend_parser_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_policy_backend_parser_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void yy_policy_backend_parserensure_buffer_stack (void) -{ - int num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - (yy_buffer_stack) = (struct yy_buffer_state**)yy_policy_backend_parseralloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)yy_policy_backend_parserrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_policy_backend_parser_scan_buffer (char * base, yy_size_t size ) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) yy_policy_backend_parseralloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_policy_backend_parser_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_policy_backend_parser_switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to yy_policy_backend_parserlex() will - * scan from a @e copy of @a str. - * @param str a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * yy_policy_backend_parser_scan_bytes() instead. - */ -YY_BUFFER_STATE yy_policy_backend_parser_scan_string (yyconst char * yystr ) -{ - - return yy_policy_backend_parser_scan_bytes(yystr,strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to yy_policy_backend_parserlex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_policy_backend_parser_scan_bytes (yyconst char * yybytes, int _yybytes_len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) yy_policy_backend_parseralloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_policy_backend_parser_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_policy_backend_parser_scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_policy_backend_parser_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg ) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yy_policy_backend_parsertext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yy_policy_backend_parsertext[yy_policy_backend_parserleng] = (yy_hold_char); \ - (yy_c_buf_p) = yy_policy_backend_parsertext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yy_policy_backend_parserleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int yy_policy_backend_parserget_lineno (void) -{ - - return yy_policy_backend_parserlineno; -} - -/** Get the input stream. - * - */ -FILE *yy_policy_backend_parserget_in (void) -{ - return yy_policy_backend_parserin; -} - -/** Get the output stream. - * - */ -FILE *yy_policy_backend_parserget_out (void) -{ - return yy_policy_backend_parserout; -} - -/** Get the length of the current token. - * - */ -int yy_policy_backend_parserget_leng (void) -{ - return yy_policy_backend_parserleng; -} - -/** Get the current token. - * - */ - -char *yy_policy_backend_parserget_text (void) -{ - return yy_policy_backend_parsertext; -} - -/** Set the current line number. - * @param line_number - * - */ -void yy_policy_backend_parserset_lineno (int line_number ) -{ - - yy_policy_backend_parserlineno = line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * - * @see yy_policy_backend_parser_switch_to_buffer - */ -void yy_policy_backend_parserset_in (FILE * in_str ) -{ - yy_policy_backend_parserin = in_str ; -} - -void yy_policy_backend_parserset_out (FILE * out_str ) -{ - yy_policy_backend_parserout = out_str ; -} - -int yy_policy_backend_parserget_debug (void) -{ - return yy_policy_backend_parser_flex_debug; -} - -void yy_policy_backend_parserset_debug (int bdebug ) -{ - yy_policy_backend_parser_flex_debug = bdebug ; -} - -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yy_policy_backend_parserlex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yy_policy_backend_parserin = stdin; - yy_policy_backend_parserout = stdout; -#else - yy_policy_backend_parserin = (FILE *) 0; - yy_policy_backend_parserout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * yy_policy_backend_parserlex_init() - */ - return 0; -} - -/* yy_policy_backend_parserlex_destroy is for both reentrant and non-reentrant scanners. */ -int yy_policy_backend_parserlex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_policy_backend_parser_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yy_policy_backend_parserpop_buffer_state(); - } - - /* Destroy the stack itself. */ - yy_policy_backend_parserfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yy_policy_backend_parserlex() is called, initialization will occur. */ - yy_init_globals( ); - - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *yy_policy_backend_parseralloc (yy_size_t size ) -{ - return (void *) malloc( size ); -} - -void *yy_policy_backend_parserrealloc (void * ptr, yy_size_t size ) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void yy_policy_backend_parserfree (void * ptr ) -{ - free( (char *) ptr ); /* see yy_policy_backend_parserrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 96 "backend.l" - - - -void yyerror(const char *m) -{ - ostringstream oss; - - oss << "Error on line " << _parser_lineno << " near ("; - for(int i = 0; i < yy_policy_backend_parserleng; i++) - oss << yy_policy_backend_parsertext[i]; - oss << "): " << m; - - _last_error = oss.str(); -} - -int -policy_backend_parser::policy_backend_parse(vector& outpolicies, - map& outsets, - SUBR& subr, - const string& conf, - string& outerr) -{ - - YY_BUFFER_STATE yybuffstate = yy_policy_backend_parser_scan_string(conf.c_str()); - - _last_error = "No error"; - _parser_lineno = 1; - - _yy_policies = &outpolicies; - _yy_sets = &outsets; - _yy_subr = &subr; - _yy_terms = new vector(); - _yy_instructions = new vector(); - _yy_trace = false; - - int res = yyparse(); - - yy_policy_backend_parser_delete_buffer(yybuffstate); - outerr = _last_error; - - // parse error - if (res) { - // get rid of temporary parse object not yet bound to policies - delete_vector(_yy_terms); - delete_vector(_yy_instructions); - } - // good parse - else { - // all terms should be bound to policies - assert(_yy_terms->empty()); - delete _yy_terms; - - // all instructions should be bound to terms - assert(_yy_instructions->empty()); - delete _yy_instructions; - } - - return res; -} - -- 1.7.9.5 From igorm at etf.rs Fri Aug 31 04:33:56 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:33:56 +0200 Subject: [Xorp-hackers] [PATCH 10/15] Remove yacc.yy_policy_backend_parser.cc.h In-Reply-To: <1346412841-31507-1-git-send-email-igorm@etf.rs> References: <1346412841-31507-1-git-send-email-igorm@etf.rs> Message-ID: <1346412841-31507-11-git-send-email-igorm@etf.rs> From: Igor Maravic Signed-off-by: Igor Maravic --- .../backend/yacc.yy_policy_backend_parser.cc.h | 46 -------------------- 1 file changed, 46 deletions(-) delete mode 100644 xorp/policy/backend/yacc.yy_policy_backend_parser.cc.h diff --git a/xorp/policy/backend/yacc.yy_policy_backend_parser.cc.h b/xorp/policy/backend/yacc.yy_policy_backend_parser.cc.h deleted file mode 100644 index ce4bec9..0000000 --- a/xorp/policy/backend/yacc.yy_policy_backend_parser.cc.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef YYERRCODE -#define YYERRCODE 256 -#endif - -#define YY_ARG 257 -#define YY_NEWLINE 258 -#define YY_BLANK 259 -#define YY_POLICY_START 260 -#define YY_POLICY_END 261 -#define YY_TERM_START 262 -#define YY_TERM_END 263 -#define YY_PUSH 264 -#define YY_PUSH_SET 265 -#define YY_EQ 266 -#define YY_NE 267 -#define YY_LT 268 -#define YY_GT 269 -#define YY_LE 270 -#define YY_GE 271 -#define YY_NOT 272 -#define YY_AND 273 -#define YY_OR 274 -#define YY_XOR 275 -#define YY_HEAD 276 -#define YY_CTR 277 -#define YY_NE_INT 278 -#define YY_ADD 279 -#define YY_SUB 280 -#define YY_MUL 281 -#define YY_ONFALSE_EXIT 282 -#define YY_REGEX 283 -#define YY_LOAD 284 -#define YY_STORE 285 -#define YY_ACCEPT 286 -#define YY_REJECT 287 -#define YY_SET 288 -#define YY_NEXT 289 -#define YY_POLICY 290 -#define YY_SUBR_START 291 -#define YY_SUBR_END 292 -#define YY_TERM 293 -typedef union { - char* c_str; - PolicyInstr* c_pi; -} YYSTYPE; -extern YYSTYPE yy_policy_backend_parserlval; -- 1.7.9.5 From igorm at etf.rs Fri Aug 31 04:33:59 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:33:59 +0200 Subject: [Xorp-hackers] [PATCH 13/15] Remove yacc.yy_policy_parser.cc.h In-Reply-To: <1346412841-31507-1-git-send-email-igorm@etf.rs> References: <1346412841-31507-1-git-send-email-igorm@etf.rs> Message-ID: <1346412841-31507-14-git-send-email-igorm@etf.rs> From: Igor Maravic Signed-off-by: Igor Maravic --- xorp/policy/yacc.yy_policy_parser.cc.h | 57 -------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 xorp/policy/yacc.yy_policy_parser.cc.h diff --git a/xorp/policy/yacc.yy_policy_parser.cc.h b/xorp/policy/yacc.yy_policy_parser.cc.h deleted file mode 100644 index 9b6d95b..0000000 --- a/xorp/policy/yacc.yy_policy_parser.cc.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef YYERRCODE -#define YYERRCODE 256 -#endif - -#define YY_BOOL 257 -#define YY_INT 258 -#define YY_UINT 259 -#define YY_UINTRANGE 260 -#define YY_STR 261 -#define YY_ID 262 -#define YY_IPV4 263 -#define YY_IPV4RANGE 264 -#define YY_IPV4NET 265 -#define YY_IPV6 266 -#define YY_IPV6RANGE 267 -#define YY_IPV6NET 268 -#define YY_SEMICOLON 269 -#define YY_LPAR 270 -#define YY_RPAR 271 -#define YY_ASSIGN 272 -#define YY_SET 273 -#define YY_REGEX 274 -#define YY_ACCEPT 275 -#define YY_REJECT 276 -#define YY_PROTOCOL 277 -#define YY_NEXT 278 -#define YY_POLICY 279 -#define YY_PLUS_EQUALS 280 -#define YY_MINUS_EQUALS 281 -#define YY_TERM 282 -#define YY_NOT 283 -#define YY_AND 284 -#define YY_XOR 285 -#define YY_OR 286 -#define YY_HEAD 287 -#define YY_CTR 288 -#define YY_NE_INT 289 -#define YY_EQ 290 -#define YY_NE 291 -#define YY_LE 292 -#define YY_GT 293 -#define YY_LT 294 -#define YY_GE 295 -#define YY_IPNET_EQ 296 -#define YY_IPNET_LE 297 -#define YY_IPNET_GT 298 -#define YY_IPNET_LT 299 -#define YY_IPNET_GE 300 -#define YY_ADD 301 -#define YY_SUB 302 -#define YY_MUL 303 -typedef union { - char* c_str; - Node* node; - BinOper* op; -} YYSTYPE; -extern YYSTYPE yy_policy_parserlval; -- 1.7.9.5 From igorm at etf.rs Fri Aug 31 04:33:58 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:33:58 +0200 Subject: [Xorp-hackers] [PATCH 12/15] Remove yacc.yy_policy_parser.cc In-Reply-To: <1346412841-31507-1-git-send-email-igorm@etf.rs> References: <1346412841-31507-1-git-send-email-igorm@etf.rs> Message-ID: <1346412841-31507-13-git-send-email-igorm@etf.rs> From: Igor Maravic Signed-off-by: Igor Maravic --- xorp/policy/yacc.yy_policy_parser.cc | 858 ---------------------------------- 1 file changed, 858 deletions(-) delete mode 100644 xorp/policy/yacc.yy_policy_parser.cc diff --git a/xorp/policy/yacc.yy_policy_parser.cc b/xorp/policy/yacc.yy_policy_parser.cc deleted file mode 100644 index 8bbeea3..0000000 --- a/xorp/policy/yacc.yy_policy_parser.cc +++ /dev/null @@ -1,858 +0,0 @@ -#include -#ifndef lint - -#endif -#define YYBYACC 1 -#define YYMAJOR 1 -#define YYMINOR 9 -#define YYLEX yylex() -#define YYEMPTY -1 -#define yyclearin (yychar=(YYEMPTY)) -#define yyerrok (yyerrflag=0) -#define YYRECOVERING() (yyerrflag!=0) -#if defined(__cplusplus) || __STDC__ -static int yygrowstack(void); -#else -static int yygrowstack(); -#endif -#define yyparse yy_policy_parserparse -#define yylex yy_policy_parserlex -#define yyerror yy_policy_parsererror -#define yychar yy_policy_parserchar -#define yyval yy_policy_parserval -#define yylval yy_policy_parserlval -#define yydebug yy_policy_parserdebug -#define yynerrs yy_policy_parsernerrs -#define yyerrflag yy_policy_parsererrflag -#define yyss yy_policy_parserss -#define yyssp yy_policy_parserssp -#define yyvs yy_policy_parservs -#define yyvsp yy_policy_parservsp -#define yylhs yy_policy_parserlhs -#define yylen yy_policy_parserlen -#define yydefred yy_policy_parserdefred -#define yydgoto yy_policy_parserdgoto -#define yysindex yy_policy_parsersindex -#define yyrindex yy_policy_parserrindex -#define yygindex yy_policy_parsergindex -#define yytable yy_policy_parsertable -#define yycheck yy_policy_parsercheck -#define yyname yy_policy_parsername -#define yyrule yy_policy_parserrule -#define yysslim yy_policy_parsersslim -#define yystacksize yy_policy_parserstacksize -#define YYPREFIX "yy_policy_parser" -#line 2 "policy.y" -/* - * Grammar may be simplified, by allowing "any structure", semantic checking is - * done at run time anyway... - * By any structure i mean that you may add / multiple boolean expressions for - * example. This will give more run time flexibility - * - * yacc -d -p yy_policy_parser -o yacc.yy_policy_parser.cc policy.y - */ - - - -#include "policy_module.h" -#include "libxorp/xorp.h" -#include "policy/common/element.hh" -#include "policy/common/element_factory.hh" -#include "policy/common/operator.hh" -#include "policy_parser.hh" - -extern int yylex(void); -extern void yyerror(const char *m); - -using namespace policy_parser; - -static ElementFactory _ef; - -#line 29 "policy.y" -typedef union { - char* c_str; - Node* node; - BinOper* op; -} YYSTYPE; -#line 82 "yacc.yy_policy_parser.cc" -#define YYERRCODE 256 -#define YY_BOOL 257 -#define YY_INT 258 -#define YY_UINT 259 -#define YY_UINTRANGE 260 -#define YY_STR 261 -#define YY_ID 262 -#define YY_IPV4 263 -#define YY_IPV4RANGE 264 -#define YY_IPV4NET 265 -#define YY_IPV6 266 -#define YY_IPV6RANGE 267 -#define YY_IPV6NET 268 -#define YY_SEMICOLON 269 -#define YY_LPAR 270 -#define YY_RPAR 271 -#define YY_ASSIGN 272 -#define YY_SET 273 -#define YY_REGEX 274 -#define YY_ACCEPT 275 -#define YY_REJECT 276 -#define YY_PROTOCOL 277 -#define YY_NEXT 278 -#define YY_POLICY 279 -#define YY_PLUS_EQUALS 280 -#define YY_MINUS_EQUALS 281 -#define YY_TERM 282 -#define YY_NOT 283 -#define YY_AND 284 -#define YY_XOR 285 -#define YY_OR 286 -#define YY_HEAD 287 -#define YY_CTR 288 -#define YY_NE_INT 289 -#define YY_EQ 290 -#define YY_NE 291 -#define YY_LE 292 -#define YY_GT 293 -#define YY_LT 294 -#define YY_GE 295 -#define YY_IPNET_EQ 296 -#define YY_IPNET_LE 297 -#define YY_IPNET_GT 298 -#define YY_IPNET_LT 299 -#define YY_IPNET_GE 300 -#define YY_ADD 301 -#define YY_SUB 302 -#define YY_MUL 303 -const short yy_policy_parserlhs[] = { -1, - 0, 0, 0, 1, 2, 2, 2, 2, 2, 6, - 7, 7, 7, 3, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, -}; -const short yy_policy_parserlen[] = { 2, - 2, 2, 0, 2, 1, 1, 1, 2, 2, 3, - 1, 1, 1, 2, 3, 2, 2, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, - 3, 1, 1, 1, 1, 1, 1, 2, 1, 1, - 1, 1, 1, 1, -}; -const short yy_policy_parserdefred[] = { 3, - 0, 46, 45, 43, 44, 42, 0, 49, 50, 53, - 51, 52, 54, 0, 0, 6, 7, 0, 0, 0, - 0, 0, 0, 1, 0, 2, 0, 0, 5, 11, - 12, 13, 0, 47, 0, 0, 48, 0, 8, 9, - 17, 16, 0, 0, 0, 4, 14, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 34, 41, - 15, 0, 0, 18, 19, 20, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 38, -}; -const short yy_policy_parserdgoto[] = { 1, - 24, 25, 26, 27, 28, 29, 33, -}; -const short yy_policy_parsersindex[] = { 0, - 57, 0, 0, 0, 0, 0, -266, 0, 0, 0, - 0, 0, 0, 89, -258, 0, 0, -279, -213, -249, - 89, 121, 121, 0, -246, 0, 226, 122, 0, 0, - 0, 0, 121, 0, 11, 10, 0, -238, 0, 0, - 0, 0, 121, -178, -203, 0, 0, 89, 89, 89, - 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 121, 121, -178, 0, 0, - 0, -269, -178, 0, 0, 0, -178, -178, -178, -178, - -178, -178, -178, -178, -178, -178, -178, -178, -178, -178, - -275, -275, 0, -}; -const short yy_policy_parserrindex[] = { 0, - 0, 0, 0, 0, 0, 0, 152, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -64, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -239, 0, 0, - 0, 0, -20, 0, 0, 0, -268, -264, -259, -197, - -194, -190, 187, 190, 193, 196, 199, 217, 220, 223, - -156, -110, 0, -}; -const short yy_policy_parsergindex[] = { 0, - 0, 0, 0, 72, -14, 0, 0, -}; -#define YYTABLESIZE 512 -const short yy_policy_parsertable[] = { 36, - 35, 70, 35, 37, 28, 30, 28, 44, 45, 33, - 38, 33, 41, 31, 32, 35, 35, 35, 68, 28, - 28, 28, 46, 71, 33, 33, 33, 67, 72, 10, - 73, 65, 66, 67, 0, 0, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 2, 3, 4, 5, 6, 34, 8, - 9, 10, 11, 12, 13, 39, 43, 0, 40, 15, - 0, 21, 0, 21, 22, 0, 22, 0, 25, 0, - 25, 0, 0, 22, 23, 35, 21, 21, 21, 22, - 22, 22, 42, 25, 25, 25, 0, 65, 66, 67, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 0, 36, 36, 0, 74, - 75, 76, 65, 66, 67, 0, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, - 37, 0, 37, 37, 0, 0, 0, 0, 0, 0, - 0, 0, 37, 37, 37, 37, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, - 37, 37, 39, 39, 39, 39, 39, 39, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 0, 39, 39, - 0, 0, 0, 0, 0, 0, 0, 0, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 39, 39, 39, 39, 39, 39, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 0, 40, 40, 0, 0, 0, 0, 0, 0, - 0, 0, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 70, 69, 0, 51, 0, 0, 0, 0, 0, 0, - 0, 0, 52, 0, 48, 49, 50, 0, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 0, 14, 0, 0, 15, - 0, 16, 17, 18, 19, 20, 0, 0, 0, 21, - 0, 0, 0, 22, 23, 2, 3, 4, 5, 6, - 34, 8, 9, 10, 11, 12, 13, 0, 14, 0, - 0, 15, 0, 0, 0, 18, 0, 20, 0, 0, - 0, 21, 0, 0, 0, 22, 23, 2, 3, 4, - 5, 6, 34, 8, 9, 10, 11, 12, 13, 0, - 43, 0, 0, 15, 0, 51, 0, 0, 0, 0, - 0, 0, 0, 0, 52, 0, 0, 22, 23, 0, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 47, 0, 0, 0, 0, - 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 24, 0, 24, 23, 0, - 23, 26, 0, 26, 27, 0, 27, 31, 0, 31, - 24, 24, 24, 23, 23, 23, 26, 26, 26, 27, - 27, 27, 31, 31, 31, 30, 0, 30, 29, 0, - 29, 32, 0, 32, 47, 0, 0, 0, 0, 0, - 30, 30, 30, 29, 29, 29, 32, 32, 32, 48, - 49, 50, -}; -const short yy_policy_parsercheck[] = { 14, - 269, 271, 271, 262, 269, 272, 271, 22, 23, 269, - 290, 271, 262, 280, 281, 284, 285, 286, 33, 284, - 285, 286, 269, 262, 284, 285, 286, 303, 43, 269, - 45, 301, 302, 303, -1, -1, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 257, 258, 259, 260, 261, 262, 263, - 264, 265, 266, 267, 268, 279, 270, -1, 282, 273, - -1, 269, -1, 271, 269, -1, 271, -1, 269, -1, - 271, -1, -1, 287, 288, 14, 284, 285, 286, 284, - 285, 286, 21, 284, 285, 286, -1, 301, 302, 303, - 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, - 267, 268, 269, 270, 271, -1, 273, 274, -1, 48, - 49, 50, 301, 302, 303, -1, 283, 284, 285, 286, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 301, 302, 257, 258, 259, 260, - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, - 271, -1, 273, 274, -1, -1, -1, -1, -1, -1, - -1, -1, 283, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, 302, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, -1, 273, 274, - -1, -1, -1, -1, -1, -1, -1, -1, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 257, 258, 259, 260, - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, - 271, -1, 273, 274, -1, -1, -1, -1, -1, -1, - -1, -1, 283, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 271, 271, -1, 274, -1, -1, -1, -1, -1, -1, - -1, -1, 283, -1, 284, 285, 286, -1, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, 302, 303, 257, 258, 259, 260, 261, 262, 263, - 264, 265, 266, 267, 268, -1, 270, -1, -1, 273, - -1, 275, 276, 277, 278, 279, -1, -1, -1, 283, - -1, -1, -1, 287, 288, 257, 258, 259, 260, 261, - 262, 263, 264, 265, 266, 267, 268, -1, 270, -1, - -1, 273, -1, -1, -1, 277, -1, 279, -1, -1, - -1, 283, -1, -1, -1, 287, 288, 257, 258, 259, - 260, 261, 262, 263, 264, 265, 266, 267, 268, -1, - 270, -1, -1, 273, -1, 274, -1, -1, -1, -1, - -1, -1, -1, -1, 283, -1, -1, 287, 288, -1, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, 302, 303, 274, -1, -1, -1, -1, - -1, -1, -1, -1, 283, -1, -1, -1, -1, -1, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, 302, 303, 269, -1, 271, 269, -1, - 271, 269, -1, 271, 269, -1, 271, 269, -1, 271, - 284, 285, 286, 284, 285, 286, 284, 285, 286, 284, - 285, 286, 284, 285, 286, 269, -1, 271, 269, -1, - 271, 269, -1, 271, 269, -1, -1, -1, -1, -1, - 284, 285, 286, 284, 285, 286, 284, 285, 286, 284, - 285, 286, -}; -#define YYFINAL 1 -#ifndef YYDEBUG -#define YYDEBUG 0 -#endif -#define YYMAXTOKEN 303 -#if YYDEBUG -const char * const yy_policy_parsername[] = { -"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"YY_BOOL","YY_INT","YY_UINT", -"YY_UINTRANGE","YY_STR","YY_ID","YY_IPV4","YY_IPV4RANGE","YY_IPV4NET","YY_IPV6", -"YY_IPV6RANGE","YY_IPV6NET","YY_SEMICOLON","YY_LPAR","YY_RPAR","YY_ASSIGN", -"YY_SET","YY_REGEX","YY_ACCEPT","YY_REJECT","YY_PROTOCOL","YY_NEXT","YY_POLICY", -"YY_PLUS_EQUALS","YY_MINUS_EQUALS","YY_TERM","YY_NOT","YY_AND","YY_XOR","YY_OR", -"YY_HEAD","YY_CTR","YY_NE_INT","YY_EQ","YY_NE","YY_LE","YY_GT","YY_LT","YY_GE", -"YY_IPNET_EQ","YY_IPNET_LE","YY_IPNET_GT","YY_IPNET_LT","YY_IPNET_GE","YY_ADD", -"YY_SUB","YY_MUL", -}; -const char * const yy_policy_parserrule[] = { -"$accept : statement", -"statement : statement actionstatement", -"statement : statement boolstatement", -"statement :", -"actionstatement : action YY_SEMICOLON", -"action : assignexpr", -"action : YY_ACCEPT", -"action : YY_REJECT", -"action : YY_NEXT YY_POLICY", -"action : YY_NEXT YY_TERM", -"assignexpr : YY_ID assignop expr", -"assignop : YY_ASSIGN", -"assignop : YY_PLUS_EQUALS", -"assignop : YY_MINUS_EQUALS", -"boolstatement : boolexpr YY_SEMICOLON", -"boolexpr : YY_PROTOCOL YY_EQ YY_ID", -"boolexpr : YY_NOT boolexpr", -"boolexpr : YY_POLICY YY_ID", -"boolexpr : boolexpr YY_AND boolexpr", -"boolexpr : boolexpr YY_XOR boolexpr", -"boolexpr : boolexpr YY_OR boolexpr", -"boolexpr : expr YY_EQ expr", -"boolexpr : expr YY_NE expr", -"boolexpr : expr YY_LT expr", -"boolexpr : expr YY_GT expr", -"boolexpr : expr YY_LE expr", -"boolexpr : expr YY_GE expr", -"boolexpr : expr YY_IPNET_EQ expr", -"boolexpr : expr YY_NOT expr", -"boolexpr : expr YY_IPNET_LT expr", -"boolexpr : expr YY_IPNET_GT expr", -"boolexpr : expr YY_IPNET_LE expr", -"boolexpr : expr YY_IPNET_GE expr", -"boolexpr : expr YY_NE_INT expr", -"boolexpr : YY_LPAR boolexpr YY_RPAR", -"boolexpr : expr YY_REGEX expr", -"expr : expr YY_ADD expr", -"expr : expr YY_SUB expr", -"expr : expr YY_MUL expr", -"expr : YY_HEAD expr", -"expr : YY_CTR expr expr", -"expr : YY_LPAR expr YY_RPAR", -"expr : YY_STR", -"expr : YY_UINT", -"expr : YY_UINTRANGE", -"expr : YY_INT", -"expr : YY_BOOL", -"expr : YY_ID", -"expr : YY_SET YY_ID", -"expr : YY_IPV4", -"expr : YY_IPV4RANGE", -"expr : YY_IPV6", -"expr : YY_IPV6RANGE", -"expr : YY_IPV4NET", -"expr : YY_IPV6NET", -}; -#endif -#if YYDEBUG -#include -#endif -#ifdef YYSTACKSIZE -#undef YYMAXDEPTH -#define YYMAXDEPTH YYSTACKSIZE -#else -#ifdef YYMAXDEPTH -#define YYSTACKSIZE YYMAXDEPTH -#else -#define YYSTACKSIZE 10000 -#define YYMAXDEPTH 10000 -#endif -#endif -#define YYINITSTACKSIZE 200 -int yydebug; -int yynerrs; -int yyerrflag; -int yychar; -short *yyssp; -YYSTYPE *yyvsp; -YYSTYPE yyval; -YYSTYPE yylval; -short *yyss; -short *yysslim; -YYSTYPE *yyvs; -int yystacksize; -/* allocate initial stack or double stack size, up to YYMAXDEPTH */ -static int yygrowstack() -{ - int newsize, i; - short *newss; - YYSTYPE *newvs; - - if ((newsize = yystacksize) == 0) - newsize = YYINITSTACKSIZE; - else if (newsize >= YYMAXDEPTH) - return -1; - else if ((newsize *= 2) > YYMAXDEPTH) - newsize = YYMAXDEPTH; - i = yyssp - yyss; - newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) : - (short *)malloc(newsize * sizeof *newss); - if (newss == NULL) - return -1; - yyss = newss; - yyssp = newss + i; - newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) : - (YYSTYPE *)malloc(newsize * sizeof *newvs); - if (newvs == NULL) - return -1; - yyvs = newvs; - yyvsp = newvs + i; - yystacksize = newsize; - yysslim = yyss + newsize - 1; - return 0; -} - -#define YYABORT goto yyabort -#define YYREJECT goto yyabort -#define YYACCEPT goto yyaccept -#define YYERROR goto yyerrlab - -#ifndef YYPARSE_PARAM -#if defined(__cplusplus) || __STDC__ -#define YYPARSE_PARAM_ARG void -#define YYPARSE_PARAM_DECL -#else /* ! ANSI-C/C++ */ -#define YYPARSE_PARAM_ARG -#define YYPARSE_PARAM_DECL -#endif /* ANSI-C/C++ */ -#else /* YYPARSE_PARAM */ -#ifndef YYPARSE_PARAM_TYPE -#define YYPARSE_PARAM_TYPE void * -#endif -#if defined(__cplusplus) || __STDC__ -#define YYPARSE_PARAM_ARG YYPARSE_PARAM_TYPE YYPARSE_PARAM -#define YYPARSE_PARAM_DECL -#else /* ! ANSI-C/C++ */ -#define YYPARSE_PARAM_ARG YYPARSE_PARAM -#define YYPARSE_PARAM_DECL YYPARSE_PARAM_TYPE YYPARSE_PARAM; -#endif /* ANSI-C/C++ */ -#endif /* ! YYPARSE_PARAM */ - -int -yyparse (YYPARSE_PARAM_ARG) - YYPARSE_PARAM_DECL -{ - int yym, yyn, yystate; -#if YYDEBUG - const char *yys; - - if ((yys = getenv("YYDEBUG"))) - { - yyn = *yys; - if (yyn >= '0' && yyn <= '9') - yydebug = yyn - '0'; - } -#endif - - yynerrs = 0; - yyerrflag = 0; - yychar = (-1); - - if (yyss == NULL && yygrowstack()) goto yyoverflow; - yyssp = yyss; - yyvsp = yyvs; - *yyssp = yystate = 0; - -yyloop: - if ((yyn = yydefred[yystate])) goto yyreduce; - if (yychar < 0) - { - if ((yychar = yylex()) < 0) yychar = 0; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("%sdebug: state %d, reading %d (%s)\n", - YYPREFIX, yystate, yychar, yys); - } -#endif - } - if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yychar) - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: state %d, shifting to state %d\n", - YYPREFIX, yystate, yytable[yyn]); -#endif - if (yyssp >= yysslim && yygrowstack()) - { - goto yyoverflow; - } - *++yyssp = yystate = yytable[yyn]; - *++yyvsp = yylval; - yychar = (-1); - if (yyerrflag > 0) --yyerrflag; - goto yyloop; - } - if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yychar) - { - yyn = yytable[yyn]; - goto yyreduce; - } - if (yyerrflag) goto yyinrecovery; -#if defined(lint) || defined(__GNUC__) - goto yynewerror; -#endif -yynewerror: - yyerror("syntax error"); -#if defined(lint) || defined(__GNUC__) - goto yyerrlab; -#endif -yyerrlab: - ++yynerrs; -yyinrecovery: - if (yyerrflag < 3) - { - yyerrflag = 3; - for (;;) - { - if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: state %d, error recovery shifting\ - to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); -#endif - if (yyssp >= yysslim && yygrowstack()) - { - goto yyoverflow; - } - *++yyssp = yystate = yytable[yyn]; - *++yyvsp = yylval; - goto yyloop; - } - else - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: error recovery discarding state %d\n", - YYPREFIX, *yyssp); -#endif - if (yyssp <= yyss) goto yyabort; - --yyssp; - --yyvsp; - } - } - } - else - { - if (yychar == 0) goto yyabort; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("%sdebug: state %d, error recovery discards token %d (%s)\n", - YYPREFIX, yystate, yychar, yys); - } -#endif - yychar = (-1); - goto yyloop; - } -yyreduce: -#if YYDEBUG - if (yydebug) - printf("%sdebug: state %d, reducing by rule %d (%s)\n", - YYPREFIX, yystate, yyn, yyrule[yyn]); -#endif - yym = yylen[yyn]; - yyval = yyvsp[1-yym]; - switch (yyn) - { -case 1: -#line 52 "policy.y" -{ _parser_nodes->push_back(yyvsp[0].node); } -break; -case 2: -#line 53 "policy.y" -{ _parser_nodes->push_back(yyvsp[0].node); } -break; -case 4: -#line 58 "policy.y" -{ yyval.node = yyvsp[-1].node; } -break; -case 6: -#line 63 "policy.y" -{ yyval.node = new NodeAccept(_parser_lineno); } -break; -case 7: -#line 64 "policy.y" -{ yyval.node = new NodeReject(_parser_lineno); } -break; -case 8: -#line 66 "policy.y" -{ yyval.node = new NodeNext(_parser_lineno, NodeNext::POLICY); } -break; -case 9: -#line 68 "policy.y" -{ yyval.node = new NodeNext(_parser_lineno, NodeNext::TERM); } -break; -case 10: -#line 73 "policy.y" -{ yyval.node = new NodeAssign(yyvsp[-2].c_str, yyvsp[-1].op, yyvsp[0].node, _parser_lineno); free(yyvsp[-2].c_str); } -break; -case 11: -#line 77 "policy.y" -{ yyval.op = NULL; } -break; -case 12: -#line 78 "policy.y" -{ yyval.op = new OpAdd; } -break; -case 13: -#line 79 "policy.y" -{ yyval.op = new OpSub; } -break; -case 14: -#line 83 "policy.y" -{ yyval.node = yyvsp[-1].node; } -break; -case 15: -#line 87 "policy.y" -{ yyval.node = new NodeProto(yyvsp[0].c_str,_parser_lineno); free(yyvsp[0].c_str); } -break; -case 16: -#line 88 "policy.y" -{ yyval.node = new NodeUn(new OpNot,yyvsp[0].node,_parser_lineno); } -break; -case 17: -#line 89 "policy.y" -{ yyval.node = new NodeSubr(_parser_lineno, yyvsp[0].c_str); free(yyvsp[0].c_str); } -break; -case 18: -#line 90 "policy.y" -{ yyval.node = new NodeBin(new OpAnd,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 19: -#line 91 "policy.y" -{ yyval.node = new NodeBin(new OpXor,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 20: -#line 92 "policy.y" -{ yyval.node = new NodeBin(new OpOr,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 21: -#line 94 "policy.y" -{ yyval.node = new NodeBin(new OpEq,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 22: -#line 95 "policy.y" -{ yyval.node = new NodeBin(new OpNe,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 23: -#line 97 "policy.y" -{ yyval.node = new NodeBin(new OpLt,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 24: -#line 98 "policy.y" -{ yyval.node = new NodeBin(new OpGt,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 25: -#line 99 "policy.y" -{ yyval.node = new NodeBin(new OpLe,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 26: -#line 100 "policy.y" -{ yyval.node = new NodeBin(new OpGe,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 27: -#line 102 "policy.y" -{ yyval.node = new NodeBin(new OpEq,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 28: -#line 103 "policy.y" -{ yyval.node = new NodeBin(new OpNe,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 29: -#line 104 "policy.y" -{ yyval.node = new NodeBin(new OpLt,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 30: -#line 105 "policy.y" -{ yyval.node = new NodeBin(new OpGt,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 31: -#line 106 "policy.y" -{ yyval.node = new NodeBin(new OpLe,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 32: -#line 107 "policy.y" -{ yyval.node = new NodeBin(new OpGe,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 33: -#line 109 "policy.y" -{ yyval.node = new NodeBin(new OpNEInt, yyvsp[-2].node, yyvsp[0].node, _parser_lineno); } -break; -case 34: -#line 111 "policy.y" -{ yyval.node = yyvsp[-1].node; } -break; -case 35: -#line 113 "policy.y" -{ yyval.node = new NodeBin(new OpRegex, yyvsp[-2].node, yyvsp[0].node, _parser_lineno); } -break; -case 36: -#line 117 "policy.y" -{ yyval.node = new NodeBin(new OpAdd,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 37: -#line 118 "policy.y" -{ yyval.node = new NodeBin(new OpSub,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 38: -#line 119 "policy.y" -{ yyval.node = new NodeBin(new OpMul,yyvsp[-2].node,yyvsp[0].node,_parser_lineno); } -break; -case 39: -#line 121 "policy.y" -{ yyval.node = new NodeUn(new OpHead, yyvsp[0].node, _parser_lineno); } -break; -case 40: -#line 122 "policy.y" -{ yyval.node = new NodeBin(new OpCtr, yyvsp[-1].node, yyvsp[0].node, _parser_lineno); } -break; -case 41: -#line 124 "policy.y" -{ yyval.node = yyvsp[-1].node; } -break; -case 42: -#line 126 "policy.y" -{ yyval.node = new NodeElem(_ef.create(ElemStr::id,yyvsp[0].c_str),_parser_lineno); free(yyvsp[0].c_str); } -break; -case 43: -#line 127 "policy.y" -{ yyval.node = new NodeElem(_ef.create(ElemU32::id,yyvsp[0].c_str),_parser_lineno); free(yyvsp[0].c_str);} -break; -case 44: -#line 128 "policy.y" -{ yyval.node = new NodeElem(_ef.create(ElemU32Range::id,yyvsp[0].c_str),_parser_lineno); free(yyvsp[0].c_str);} -break; -case 45: -#line 129 "policy.y" -{ yyval.node = new NodeElem(_ef.create(ElemInt32::id,yyvsp[0].c_str),_parser_lineno); free(yyvsp[0].c_str);} -break; -case 46: -#line 130 "policy.y" -{ yyval.node = new NodeElem(_ef.create(ElemBool::id,yyvsp[0].c_str),_parser_lineno); free(yyvsp[0].c_str);} -break; -case 47: -#line 131 "policy.y" -{ yyval.node = new NodeVar(yyvsp[0].c_str,_parser_lineno); free(yyvsp[0].c_str); } -break; -case 48: -#line 132 "policy.y" -{ yyval.node = new NodeSet(yyvsp[0].c_str,_parser_lineno); free(yyvsp[0].c_str); } -break; -case 49: -#line 133 "policy.y" -{ yyval.node = new NodeElem(_ef.create(ElemIPv4::id,yyvsp[0].c_str),_parser_lineno); free(yyvsp[0].c_str); } -break; -case 50: -#line 134 "policy.y" -{ yyval.node = new NodeElem(_ef.create(ElemIPv4Range::id,yyvsp[0].c_str),_parser_lineno); free(yyvsp[0].c_str); } -break; -case 51: -#line 135 "policy.y" -{ yyval.node = new NodeElem(_ef.create(ElemIPv6::id,yyvsp[0].c_str),_parser_lineno); free(yyvsp[0].c_str); } -break; -case 52: -#line 136 "policy.y" -{ yyval.node = new NodeElem(_ef.create(ElemIPv6Range::id,yyvsp[0].c_str),_parser_lineno); free(yyvsp[0].c_str); } -break; -case 53: -#line 137 "policy.y" -{ yyval.node = new NodeElem(_ef.create(ElemIPv4Net::id,yyvsp[0].c_str),_parser_lineno); free(yyvsp[0].c_str); } -break; -case 54: -#line 138 "policy.y" -{ yyval.node = new NodeElem(_ef.create(ElemIPv6Net::id,yyvsp[0].c_str),_parser_lineno); free(yyvsp[0].c_str); } -break; -#line 807 "yacc.yy_policy_parser.cc" - } - yyssp -= yym; - yystate = *yyssp; - yyvsp -= yym; - yym = yylhs[yyn]; - if (yystate == 0 && yym == 0) - { -#if YYDEBUG - if (yydebug) - printf("%sdebug: after reduction, shifting from state 0 to\ - state %d\n", YYPREFIX, YYFINAL); -#endif - yystate = YYFINAL; - *++yyssp = YYFINAL; - *++yyvsp = yyval; - if (yychar < 0) - { - if ((yychar = yylex()) < 0) yychar = 0; -#if YYDEBUG - if (yydebug) - { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; - printf("%sdebug: state %d, reading %d (%s)\n", - YYPREFIX, YYFINAL, yychar, yys); - } -#endif - } - if (yychar == 0) goto yyaccept; - goto yyloop; - } - if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && - yyn <= YYTABLESIZE && yycheck[yyn] == yystate) - yystate = yytable[yyn]; - else - yystate = yydgoto[yym]; -#if YYDEBUG - if (yydebug) - printf("%sdebug: after reduction, shifting from state %d \ -to state %d\n", YYPREFIX, *yyssp, yystate); -#endif - if (yyssp >= yysslim && yygrowstack()) - { - goto yyoverflow; - } - *++yyssp = yystate; - *++yyvsp = yyval; - goto yyloop; -yyoverflow: - yyerror("yacc stack overflow"); -yyabort: - return (1); -yyaccept: - return (0); -} -- 1.7.9.5 From igorm at etf.rs Fri Aug 31 04:34:00 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:34:00 +0200 Subject: [Xorp-hackers] [PATCH 14/15] xorp: Add new operators In-Reply-To: <1346412841-31507-1-git-send-email-igorm@etf.rs> References: <1346412841-31507-1-git-send-email-igorm@etf.rs> Message-ID: <1346412841-31507-15-git-send-email-igorm@etf.rs> From: Igor Maravic Add operators *, /, <<, >>, &, |, ^, *=, /=, <<=, >>=, &=, |= and ^=. Operators *=, /=, <<=, >>=, &=, |= and ^= are added to policy metric semantics. Signed-off-by: Igor Maravic --- xorp/etc/templates/bgp.tp | 4 +- xorp/etc/templates/ospfv2.tp | 2 +- xorp/etc/templates/ospfv3.tp | 2 +- xorp/etc/templates/policy.tp | 2 +- xorp/etc/templates/rip.tp | 2 +- xorp/etc/templates/ripng.tp | 2 +- xorp/policy/backend/backend.ll | 6 +++ xorp/policy/backend/backend.yy | 8 ++++ xorp/policy/common/operator.cc | 6 +++ xorp/policy/common/operator.hh | 7 +++ xorp/policy/common/operator_base.hh | 6 +++ xorp/policy/common/register_operations.cc | 12 +++++ xorp/policy/policy.ll | 20 ++++++++ xorp/policy/policy.yy | 18 +++++++- xorp/rtrmgr/boot.ll | 4 +- xorp/rtrmgr/config_operators.cc | 72 ++++++++++++++++++++++++++--- xorp/rtrmgr/config_operators.hh | 50 +++++++++++++------- 17 files changed, 190 insertions(+), 33 deletions(-) diff --git a/xorp/etc/templates/bgp.tp b/xorp/etc/templates/bgp.tp index 094fa73..6e1ce8a 100644 --- a/xorp/etc/templates/bgp.tp +++ b/xorp/etc/templates/bgp.tp @@ -834,7 +834,7 @@ policy { } med { %help: short "Set the BGP MED attribute"; - %allow-operator: ":" "=" "sub" "add"; + %allow-operator: ":" "=" "sub" "add" "mul" "div" "lshift" "rshift" "bit_and" "bit_or" "bit_xor" "+=" "-=" "*=" "/=" "<<=" ">>=" "&=" "|=" "^="; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt=med $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt="; } @@ -845,7 +845,7 @@ policy { } localpref { %help: short "Set the local preference"; - %allow-operator: ":" "=" "sub" "add"; + %allow-operator: ":" "=" "sub" "add" "mul" "div" "lshift" "rshift" "bit_and" "bit_or" "bit_xor" "+=" "-=" "*=" "/=" "<<=" ">>=" "&=" "|=" "^="; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt=localpref $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt="; } diff --git a/xorp/etc/templates/ospfv2.tp b/xorp/etc/templates/ospfv2.tp index 4d22ec4..44dbbb9 100644 --- a/xorp/etc/templates/ospfv2.tp +++ b/xorp/etc/templates/ospfv2.tp @@ -555,7 +555,7 @@ policy { then { metric { %help: short "Set the metric value"; - %allow-operator: ":" "=" "sub" "add"; + %allow-operator: ":" "=" "sub" "add" "mul" "div" "lshift" "rshift" "bit_and" "bit_or" "bit_xor" "+=" "-=" "*=" "/=" "<<=" ">>=" "&=" "|=" "^="; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt=metric $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt="; } diff --git a/xorp/etc/templates/ospfv3.tp b/xorp/etc/templates/ospfv3.tp index f6ffc13..fec27fb 100644 --- a/xorp/etc/templates/ospfv3.tp +++ b/xorp/etc/templates/ospfv3.tp @@ -430,7 +430,7 @@ policy { then { metric { %help: short "Set the metric value"; - %allow-operator: ":" "=" "sub" "add"; + %allow-operator: ":" "=" "sub" "add" "mul" "div" "lshift" "rshift" "bit_and" "bit_or" "bit_xor" "+=" "-=" "*=" "/=" "<<=" ">>=" "&=" "|=" "^="; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt=metric $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt="; } diff --git a/xorp/etc/templates/policy.tp b/xorp/etc/templates/policy.tp index b48bcaa..3f1b6b8 100644 --- a/xorp/etc/templates/policy.tp +++ b/xorp/etc/templates/policy.tp @@ -276,7 +276,7 @@ policy { tag { %help: short "Tag value"; - %allow-operator: ":" "=" "add" "sub"; + %allow-operator: ":" "=" "sub" "add" "mul" "div" "lshift" "rshift" "bit_and" "bit_or" "bit_xor" "+=" "-=" "*=" "/=" "<<=" ">>=" "&=" "|=" "^="; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt=tag $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt="; } diff --git a/xorp/etc/templates/rip.tp b/xorp/etc/templates/rip.tp index 03e5ff7..aff2763 100644 --- a/xorp/etc/templates/rip.tp +++ b/xorp/etc/templates/rip.tp @@ -339,7 +339,7 @@ policy { then { metric { %help: short "Set the metric value"; - %allow-operator: ":" "=" "sub" "add"; + %allow-operator: ":" "=" "sub" "add" "mul" "div" "lshift" "rshift" "bit_and" "bit_or" "bit_xor" "+=" "-=" "*=" "/=" "<<=" ">>=" "&=" "|=" "^="; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt=metric $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt="; } diff --git a/xorp/etc/templates/ripng.tp b/xorp/etc/templates/ripng.tp index e130a70..a0b3d3c 100644 --- a/xorp/etc/templates/ripng.tp +++ b/xorp/etc/templates/ripng.tp @@ -287,7 +287,7 @@ policy { then { metric { %help: short "Set the metric value"; - %allow-operator: ":" "=" "sub" "add"; + %allow-operator: ":" "=" "sub" "add" "mul" "div" "lshift" "rshift" "bit_and" "bit_or" "bit_xor" "+=" "-=" "*=" "/=" "<<=" ">>=" "&=" "|=" "^="; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt=metric $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt="; } diff --git a/xorp/policy/backend/backend.ll b/xorp/policy/backend/backend.ll index a874ec2..e369ff7 100644 --- a/xorp/policy/backend/backend.ll +++ b/xorp/policy/backend/backend.ll @@ -71,6 +71,8 @@ namespace { "SUBR_START" { return YY_SUBR_START; } "SUBR_END" { return YY_SUBR_END; } +"<<" { return YY_LSHIFT; } +">>" { return YY_RSHIFT; } "==" { return YY_EQ; } "!=" { return YY_NE; } "<" { return YY_LT; } @@ -80,6 +82,10 @@ namespace { "+" { return YY_ADD; } "\-" { return YY_SUB; } "*" { return YY_MUL; } +"/" { return YY_DIV; } +"&" { return YY_BITAND; } +"|" { return YY_BITOR; } +"^" { return YY_BITXOR; } "\n" { _parser_lineno++; return YY_NEWLINE; } diff --git a/xorp/policy/backend/backend.yy b/xorp/policy/backend/backend.yy index 844e81e..e18fb6b 100644 --- a/xorp/policy/backend/backend.yy +++ b/xorp/policy/backend/backend.yy @@ -35,6 +35,8 @@ static ElementFactory _ef; %token YY_EQ YY_NE YY_LT YY_GT YY_LE YY_GE %token YY_NOT YY_AND YY_OR YY_XOR YY_HEAD YY_CTR YY_NE_INT %token YY_ADD YY_SUB YY_MUL +%token YY_DIV YY_LSHIFT YY_RSHIFT +%token YY_BITAND YY_BITOR YY_BITXOR %token YY_ONFALSE_EXIT %token YY_REGEX %token YY_LOAD YY_STORE @@ -169,6 +171,12 @@ statement: | YY_ADD { _yy_instructions->push_back(new NaryInstr(new OpAdd)); } | YY_SUB { _yy_instructions->push_back(new NaryInstr(new OpSub)); } | YY_MUL { _yy_instructions->push_back(new NaryInstr(new OpMul)); } + | YY_DIV { _yy_instructions->push_back(new NaryInstr(new OpDiv)); } + | YY_LSHIFT { _yy_instructions->push_back(new NaryInstr(new OpLShift)); } + | YY_RSHIFT { _yy_instructions->push_back(new NaryInstr(new OpRShift)); } + | YY_BITAND { _yy_instructions->push_back(new NaryInstr(new OpBitAnd)); } + | YY_BITOR { _yy_instructions->push_back(new NaryInstr(new OpBitOr)); } + | YY_BITXOR { _yy_instructions->push_back(new NaryInstr(new OpBitXor)); } | YY_HEAD { _yy_instructions->push_back(new NaryInstr(new OpHead));} | YY_CTR { _yy_instructions->push_back(new NaryInstr(new OpCtr));} | YY_NE_INT { _yy_instructions->push_back(new NaryInstr(new OpNEInt));} diff --git a/xorp/policy/common/operator.cc b/xorp/policy/common/operator.cc index 43b76c4..452bc1c 100644 --- a/xorp/policy/common/operator.cc +++ b/xorp/policy/common/operator.cc @@ -40,6 +40,12 @@ Oper::Hash OpGe::_hash = HASH_OP_GE; Oper::Hash OpAdd::_hash = HASH_OP_ADD; Oper::Hash OpSub::_hash = HASH_OP_SUB; Oper::Hash OpMul::_hash = HASH_OP_MUL; +Oper::Hash OpDiv::_hash = HASH_OP_DIV; +Oper::Hash OpLShift::_hash = HASH_OP_LSHIFT; +Oper::Hash OpRShift::_hash = HASH_OP_RSHIFT; +Oper::Hash OpBitAnd::_hash = HASH_OP_BITAND; +Oper::Hash OpBitOr::_hash = HASH_OP_BITOR; +Oper::Hash OpBitXor::_hash = HASH_OP_BITXOR; Oper::Hash OpRegex::_hash = HASH_OP_REGEX; Oper::Hash OpCtr::_hash = HASH_OP_CTR; diff --git a/xorp/policy/common/operator.hh b/xorp/policy/common/operator.hh index c7008b7..5bdbea5 100644 --- a/xorp/policy/common/operator.hh +++ b/xorp/policy/common/operator.hh @@ -59,6 +59,13 @@ DEFINE_BINOPER(OpGe,>=) DEFINE_BINOPER(OpAdd,+) DEFINE_BINOPER(OpSub,-) DEFINE_BINOPER(OpMul,*) +DEFINE_BINOPER(OpDiv,/) +DEFINE_BINOPER(OpLShift,<<) +DEFINE_BINOPER(OpRShift,>>) +DEFINE_BINOPER(OpBitAnd,&) +DEFINE_BINOPER(OpBitOr,|) +DEFINE_BINOPER(OpBitXor,^) + // Regular expression operator DEFINE_BINOPER(OpRegex,REGEX) diff --git a/xorp/policy/common/operator_base.hh b/xorp/policy/common/operator_base.hh index 86ba32c..63e02fb 100644 --- a/xorp/policy/common/operator_base.hh +++ b/xorp/policy/common/operator_base.hh @@ -42,6 +42,12 @@ enum { HASH_OP_ADD, HASH_OP_SUB, HASH_OP_MUL, + HASH_OP_DIV, + HASH_OP_LSHIFT, + HASH_OP_RSHIFT, + HASH_OP_BITAND, + HASH_OP_BITOR, + HASH_OP_BITXOR, HASH_OP_REGEX, HASH_OP_CTR, HASH_OP_NEINT, diff --git a/xorp/policy/common/register_operations.cc b/xorp/policy/common/register_operations.cc index 78e882d..effd12b 100644 --- a/xorp/policy/common/register_operations.cc +++ b/xorp/policy/common/register_operations.cc @@ -109,6 +109,12 @@ DEFINE_BINOP_BOOL(op_ge, >=) DEFINE_BINOP(op_add,+) DEFINE_BINOP(op_sub,-) DEFINE_BINOP(op_mul,*) +DEFINE_BINOP(op_div,/) +DEFINE_BINOP(op_lshift,<<) +DEFINE_BINOP(op_rshift,>>) +DEFINE_BINOP(op_bit_and,&); +DEFINE_BINOP(op_bit_or,|); +DEFINE_BINOP(op_bit_xor,^); // Operations for which .val() is not needed. [operation performed on element // itself]. @@ -457,6 +463,12 @@ do { \ ADD_BINOP(arg,arg,arg,op_add,Add); \ ADD_BINOP(arg,arg,arg,op_sub,Sub); \ ADD_BINOP(arg,arg,arg,op_mul,Mul); \ + ADD_BINOP(arg,arg,arg,op_div,Div); \ + ADD_BINOP(arg,arg,arg,op_lshift,LShift); \ + ADD_BINOP(arg,arg,arg,op_rshift,RShift); \ + ADD_BINOP(arg,arg,arg,op_bit_and,BitAnd); \ + ADD_BINOP(arg,arg,arg,op_bit_or,BitOr); \ + ADD_BINOP(arg,arg,arg,op_bit_xor,BitXor); \ } while (0) disp.add(OpNot()); diff --git a/xorp/policy/policy.ll b/xorp/policy/policy.ll index 3f29934..05e61f0 100644 --- a/xorp/policy/policy.ll +++ b/xorp/policy/policy.ll @@ -139,6 +139,8 @@ RE_IPV6NET {RE_IPV6}\/{RE_IPV6_PREFIXLEN} return YY_EQ; } +"<<" return YY_LSHIFT; +">>" return YY_RSHIFT; "(" return YY_LPAR; ")" return YY_RPAR; "==" return YY_EQ; @@ -153,9 +155,20 @@ RE_IPV6NET {RE_IPV6}\/{RE_IPV6_PREFIXLEN} "=" return YY_ASSIGN; "+=" return YY_PLUS_EQUALS; "-=" return YY_MINUS_EQUALS; +"*=" return YY_MUL_EQUALS; +"/=" return YY_DIV_EQUALS; +"<<=" return YY_LSHIFT_EQUALS; +">>=" return YY_RSHIFT_EQUALS; +"&=" return YY_BITAND_EQUALS; +"|=" return YY_BITOR_EQUALS; +"^=" return YY_BITXOR_EQUALS; "||" return YY_OR; "&&" return YY_AND; "!" return YY_NOT; +"/" return YY_DIV; +"&" return YY_BITAND; +"|" return YY_BITOR; +"^" return YY_BITXOR; "exact" return YY_IPNET_EQ; "longer" return YY_IPNET_LT; @@ -168,6 +181,13 @@ RE_IPV6NET {RE_IPV6}\/{RE_IPV6_PREFIXLEN} "not" return YY_NOT; "add" return YY_PLUS_EQUALS; "sub" return YY_MINUS_EQUALS; +"mul" return YY_MUL_EQUALS; +"div" return YY_DIV_EQUALS; +"lshift" return YY_LSHIFT_EQUALS; +"rshift" return YY_RSHIFT_EQUALS; +"bit_and" return YY_BITAND_EQUALS; +"bit_or" return YY_BITOR_EQUALS; +"bit_xor" return YY_BITXOR_EQUALS; "head" return YY_HEAD; "ctr" return YY_CTR; "ne_int" return YY_NE_INT; diff --git a/xorp/policy/policy.yy b/xorp/policy/policy.yy index 1d055e3..8c73246 100644 --- a/xorp/policy/policy.yy +++ b/xorp/policy/policy.yy @@ -36,12 +36,15 @@ static ElementFactory _ef; %token YY_IPV4 YY_IPV4RANGE YY_IPV4NET YY_IPV6 YY_IPV6RANGE YY_IPV6NET %token YY_SEMICOLON YY_LPAR YY_RPAR YY_ASSIGN YY_SET YY_REGEX %token YY_ACCEPT YY_REJECT YY_PROTOCOL YY_NEXT YY_POLICY YY_PLUS_EQUALS +%token YY_MUL_EQUALS YY_DIV_EQUALS YY_LSHIFT_EQUALS YY_RSHIFT_EQUALS +%token YY_BITAND_EQUALS YY_BITOR_EQUALS YY_BITXOR_EQUALS %token YY_MINUS_EQUALS YY_TERM %left YY_NOT YY_AND YY_XOR YY_OR YY_HEAD YY_CTR YY_NE_INT %left YY_EQ YY_NE YY_LE YY_GT YY_LT YY_GE %left YY_IPNET_EQ YY_IPNET_LE YY_IPNET_GT YY_IPNET_LT YY_IPNET_GE -%left YY_ADD YY_SUB +%left YY_ADD YY_SUB YY_DIV YY_LSHIFT YY_RSHIFT +%left YY_BITAND YY_BITOR YY_BITXOR %left YY_MUL %type actionstatement action boolstatement boolexpr expr assignexpr @@ -77,6 +80,13 @@ assignop: YY_ASSIGN { $$ = NULL; } | YY_PLUS_EQUALS { $$ = new OpAdd; } | YY_MINUS_EQUALS { $$ = new OpSub; } + | YY_MUL_EQUALS { $$ = new OpMul; } + | YY_DIV_EQUALS { $$ = new OpDiv; } + | YY_LSHIFT_EQUALS { $$ = new OpLShift; } + | YY_RSHIFT_EQUALS { $$ = new OpRShift; } + | YY_BITAND_EQUALS { $$ = new OpBitAnd; } + | YY_BITOR_EQUALS { $$ = new OpBitOr; } + | YY_BITXOR_EQUALS { $$ = new OpBitXor; } ; boolstatement: @@ -117,6 +127,12 @@ expr: expr YY_ADD expr { $$ = new NodeBin(new OpAdd,$1,$3,_parser_lineno); } | expr YY_SUB expr { $$ = new NodeBin(new OpSub,$1,$3,_parser_lineno); } | expr YY_MUL expr { $$ = new NodeBin(new OpMul,$1,$3,_parser_lineno); } + | expr YY_DIV expr { $$ = new NodeBin(new OpDiv,$1,$3,_parser_lineno); } + | expr YY_LSHIFT expr { $$ = new NodeBin(new OpLShift,$1,$3,_parser_lineno); } + | expr YY_RSHIFT expr { $$ = new NodeBin(new OpRShift,$1,$3,_parser_lineno); } + | expr YY_BITAND expr { $$ = new NodeBin(new OpBitAnd,$1,$3,_parser_lineno); } + | expr YY_BITOR expr { $$ = new NodeBin(new OpBitOr,$1,$3,_parser_lineno); } + | expr YY_BITXOR expr { $$ = new NodeBin(new OpBitXor,$1,$3,_parser_lineno); } | YY_HEAD expr { $$ = new NodeUn(new OpHead, $2, _parser_lineno); } | YY_CTR expr expr { $$ = new NodeBin(new OpCtr, $2, $3, _parser_lineno); } diff --git a/xorp/rtrmgr/boot.ll b/xorp/rtrmgr/boot.ll index 6e682ae..a9a3398 100644 --- a/xorp/rtrmgr/boot.ll +++ b/xorp/rtrmgr/boot.ll @@ -243,8 +243,8 @@ RE_URL_SUBDELIMS "!"|"$"|"&"|"'"|"("|")"|"*"|"+"|","|";"|"=" */ RE_COMPARATOR "<"|">"|("<"+"=")|(">"+"=")|("="+"=")|("!"+"=") RE_IPNET_COMPARATOR "exact"|"not"|"shorter"|"orshorter"|"longer"|"orlonger" -RE_BIN_OPERATOR "+"|"-"|"*"|"/" -RE_MODIFIER ":"|"add"|"sub"|"set"|"del"|"=" +RE_BIN_OPERATOR "+"|"-"|"*"|"/"|"<<"|">>"|"&"|"^"|"|" +RE_MODIFIER ":"|"add"|"sub"|"mul"|"div"|"lshift"|"rshift"|"bit_and"|"bit_or"|"bit_xor"|"set"|"del"|"="|"+="|"-="|"*="|"/="|"<<="|">>="|"&="|"|="|"^=" RE_INFIX_OPERATOR {RE_COMPARATOR}|{RE_IPNET_COMPARATOR}|{RE_BIN_OPERATOR}|{RE_MODIFIER} RE_ARITH_OPERATOR [" "]*({RE_BIN_OPERATOR})[" "]* diff --git a/xorp/rtrmgr/config_operators.cc b/xorp/rtrmgr/config_operators.cc index bd383d8..2df51bb 100644 --- a/xorp/rtrmgr/config_operators.cc +++ b/xorp/rtrmgr/config_operators.cc @@ -61,9 +61,41 @@ operator_to_str(ConfigOperator op) case OP_ASSIGN: return string(":"); case OP_ADD: - return string("add"); + return string("+"); + case OP_ADD_EQ: + return string("+="); case OP_SUB: - return string("sub"); + return string("-"); + case OP_SUB_EQ: + return string("-="); + case OP_MUL: + return string("*"); + case OP_MUL_EQ: + return string("*="); + case OP_DIV: + return string("/"); + case OP_DIV_EQ: + return string("/="); + case OP_LSHIFT: + return string("<<"); + case OP_LSHIFT_EQ: + return string("<<="); + case OP_RSHIFT: + return string(">>"); + case OP_RSHIFT_EQ: + return string(">>="); + case OP_BITAND: + return string("&"); + case OP_BITAND_EQ: + return string("&="); + case OP_BITOR: + return string("|"); + case OP_BITOR_EQ: + return string("|="); + case OP_BITXOR: + return string("^"); + case OP_BITXOR_EQ: + return string("^="); case OP_DEL: return string("del"); } @@ -103,12 +135,40 @@ lookup_operator(const string& s) throw (ParseError) return OP_ASSIGN; } else if (s == "+") { return OP_ADD; - } else if (s == "add") { - return OP_ADD; + } else if (s == "add" || s == "+=") { + return OP_ADD_EQ; } else if (s == "-") { return OP_SUB; - } else if (s == "sub") { - return OP_SUB; + } else if (s == "sub" || s == "-=") { + return OP_SUB_EQ; + } else if (s == "*") { + return OP_MUL; + } else if (s == "mul" || s == "*=") { + return OP_MUL_EQ; + } else if (s == "/") { + return OP_DIV; + } else if (s == "div" || s == "/=") { + return OP_DIV_EQ; + } else if (s == "<<") { + return OP_LSHIFT; + } else if (s == "lshift" || s == "<<=") { + return OP_LSHIFT_EQ; + } else if (s == ">>") { + return OP_RSHIFT; + } else if (s == "rshift" || s == ">>=") { + return OP_RSHIFT_EQ; + } else if (s == "&") { + return OP_BITAND; + } else if (s == "bit_and" || s == "&=") { + return OP_BITAND_EQ; + } else if (s == "|") { + return OP_BITOR; + } else if (s == "bit_or" || s == "|=") { + return OP_BITOR_EQ; + } else if (s == "^") { + return OP_BITXOR; + } else if (s == "bit_xor" || s == "^=") { + return OP_BITXOR_EQ; } else if (s == "del") { return OP_DEL; } diff --git a/xorp/rtrmgr/config_operators.hh b/xorp/rtrmgr/config_operators.hh index 72d8e70..9a9fdd8 100644 --- a/xorp/rtrmgr/config_operators.hh +++ b/xorp/rtrmgr/config_operators.hh @@ -31,24 +31,40 @@ // XXX: Comparators must be less than modifiers. // enum ConfigOperator { - OP_NONE = 0, - OP_EQ = 1, - OP_NE = 2, - OP_LT = 3, - OP_LTE = 4, - OP_GT = 5, - OP_GTE = 6, - OP_IPNET_EQ = 7, - OP_IPNET_NE = 8, - OP_IPNET_LT = 9, - OP_IPNET_GT = 10, - OP_IPNET_LE = 11, - OP_IPNET_GE = 12, + OP_NONE = 0, + OP_EQ, + OP_NE, + OP_LT, + OP_LTE, + OP_GT, + OP_GTE, + OP_IPNET_EQ, + OP_IPNET_NE, + OP_IPNET_LT, + OP_IPNET_GT, + OP_IPNET_LE, + OP_IPNET_GE, MAX_COMPARATOR = OP_IPNET_GE, - OP_ASSIGN = 101, - OP_ADD = 102, - OP_SUB = 103, - OP_DEL = 104, + OP_ASSIGN = 101, + OP_ADD, + OP_ADD_EQ, + OP_SUB, + OP_SUB_EQ, + OP_MUL, + OP_MUL_EQ, + OP_DIV, + OP_DIV_EQ, + OP_LSHIFT, + OP_LSHIFT_EQ, + OP_RSHIFT, + OP_RSHIFT_EQ, + OP_BITAND, + OP_BITAND_EQ, + OP_BITOR, + OP_BITOR_EQ, + OP_BITXOR, + OP_BITXOR_EQ, + OP_DEL, MAX_MODIFIER = OP_DEL }; -- 1.7.9.5 From igorm at etf.rs Fri Aug 31 04:34:01 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:34:01 +0200 Subject: [Xorp-hackers] [PATCH 15/15] xorp: rip: Force RIP to do EXPORT filtering when the route comes In-Reply-To: <1346412841-31507-1-git-send-email-igorm@etf.rs> References: <1346412841-31507-1-git-send-email-igorm@etf.rs> Message-ID: <1346412841-31507-16-git-send-email-igorm@etf.rs> From: Igor Maravic Also, don't check if metric is larger then RIP_INFINITY, before the route passes through the policy filters. EXPORT and IMPORT filter, could posibly change metric and make it smaller then RIP_INFINITY. After the route passes through the EXPORT filter, or if it doesn't pass IMPORT or EXPORT_SOURCEMATCH filters, check the route cost. If it's larger then RIP_INFINITY set it to ROUTE_INFINITY. Don't run EXPORT filter when the outgoing packet is sent, because route is pushed through the EXPORT filter when it comes to RIP. Signed-off-by: Igor Maravic --- xorp/rip/output.hh | 29 --------------------- xorp/rip/output_table.cc | 17 ++++++------- xorp/rip/output_updates.cc | 11 ++++---- xorp/rip/route_db.cc | 60 +++++++++++++++++++++++++++++--------------- xorp/rip/route_db.hh | 2 +- 5 files changed, 55 insertions(+), 64 deletions(-) diff --git a/xorp/rip/output.hh b/xorp/rip/output.hh index 24fed44..13d04e5 100644 --- a/xorp/rip/output.hh +++ b/xorp/rip/output.hh @@ -129,14 +129,6 @@ protected: void incr_packets_sent() { _pkts_out++; } - /** - * Policy filters the route. - * - * @param r route to filter. - * @return true if the route was accepted, false otherwise. - */ - bool do_filtering(RouteEntry* r); - protected: EventLoop& _e; Port& _port; // Port associated with output @@ -190,25 +182,4 @@ OutputBase::interpacket_gap_ms() const return _port.constants().interpacket_delay_ms(); } - -template -bool -OutputBase::do_filtering(RouteEntry* route) -{ - try { - RIPVarRW varrw(*route); - - debug_msg("[RIP] Running export filter on route: %s\n", - route->net().str().c_str()); - - bool accepted = _policy_filters.run_filter(filter::EXPORT, - varrw); - - return accepted; - } catch(const PolicyException& e) { - XLOG_FATAL("PolicyException: %s", e.str().c_str()); - XLOG_UNFINISHED(); - } -} - #endif // __RIP_OUTPUT_HH__ diff --git a/xorp/rip/output_table.cc b/xorp/rip/output_table.cc index dc2237e..b3d470f 100644 --- a/xorp/rip/output_table.cc +++ b/xorp/rip/output_table.cc @@ -50,15 +50,13 @@ OutputTable::output_packet() // or set cost to infinity... // or depending on poison-reverse / horizon settings // - if (r->filtered()) { + if (r->filtered()) continue; - } pair p = this->_port.route_policy(*r); - if (p.second > RIP_INFINITY) { + if (p.second > RIP_INFINITY) continue; - } RouteEntryOrigin* origin = NULL; // XXX string ifname, vifname; // XXX: not set, because not needed @@ -68,11 +66,12 @@ OutputTable::output_packet() origin, r->tag(), r->policytags()); - bool accepted = this->do_filtering(copy); - if (!accepted) { - delete copy; - continue; - } + // Policy EXPORT filtering was done here. + // It's moved to RouteDB::do_filtering. + // This was done because EXPORT filter could possibly change route metric, + // and thus make it lower then RIP_INFINITY. + // Routes with cost > RIP_INFINTY would never come here, because they would be filtered out in RouteDB::update_route + // - IMAR rpa.packet_add_route(copy->net(), copy->nexthop(), copy->cost(), copy->tag()); diff --git a/xorp/rip/output_updates.cc b/xorp/rip/output_updates.cc index aaf7148..92f8415 100644 --- a/xorp/rip/output_updates.cc +++ b/xorp/rip/output_updates.cc @@ -78,11 +78,12 @@ OutputUpdates::output_packet() origin, r->tag(), r->policytags()); - bool accepted = this->do_filtering(copy); - if (!accepted) { - delete copy; - continue; - } + // Policy EXPORT filtering was done here. + // It's moved to RouteDB::do_filtering. + // This was done because EXPORT filter could possibly change route metric, + // and thus make it lower then RIP_INFINITY + // Routes with cost > RIP_INFINTY would never come here, because they would be filtered out in RouteDB::update_route + // - IMAR rpa.packet_add_route(copy->net(), copy->nexthop(), copy->cost(), r->tag()); added_routes.insert(r); diff --git a/xorp/rip/route_db.cc b/xorp/rip/route_db.cc index 7b116b4..9c4fd0a 100644 --- a/xorp/rip/route_db.cc +++ b/xorp/rip/route_db.cc @@ -185,7 +185,7 @@ RouteDB::set_expiry_timer(Route* r) template bool -RouteDB::do_filtering(Route* r) +RouteDB::do_filtering(Route* r, uint32_t& cost) { try { RIPVarRW varrw(*r); @@ -199,19 +199,44 @@ RouteDB::do_filtering(Route* r) bool accepted = _policy_filters.run_filter(filter::IMPORT, varrw); if (!accepted) - return false; + goto exit; - RIPVarRW varrw2(*r); + do { + RIPVarRW varrw2(*r); - debug_msg("[RIP] Running source match filter on route %s\n", + debug_msg("[RIP] Running source match filter on route %s\n", r->net().str().c_str()); - XLOG_TRACE(trace()._routes, + XLOG_TRACE(trace()._routes, "Running source match filter on route %s\n", r->net().str().c_str()); - _policy_filters.run_filter(filter::EXPORT_SOURCEMATCH, varrw2); + accepted = _policy_filters.run_filter(filter::EXPORT_SOURCEMATCH, varrw2); + } while(0); - return true; + if (!accepted) + goto exit; + + do { + RIPVarRW varrw3(*r); + + debug_msg("[RIP] Running export filter on route: %s\n", + r->net().str().c_str()); + XLOG_TRACE(trace()._routes, + "Running export filter on route %s\n", + r->net().str().c_str()); + + accepted = _policy_filters.run_filter(filter::EXPORT, varrw3); + } while(0); + +exit: + cost = r->cost(); + if (r->cost() > RIP_INFINITY) { + r->set_cost(RIP_INFINITY); + cost = r->cost(); + accepted = false; + } + + return accepted; } catch(const PolicyException& e) { XLOG_FATAL("PolicyException: %s", e.str().c_str()); XLOG_UNFINISHED(); @@ -237,10 +262,6 @@ RouteDB::update_route(const Net& net, return false; } - if (cost > RIP_INFINITY) { - cost = RIP_INFINITY; - } - // // Update steps, based on RFC2453 pp. 26-28 // @@ -252,11 +273,7 @@ RouteDB::update_route(const Net& net, // Route does not appear in table so it needs to be // created if peer does not have an entry for it or - // resurrected if it does. But first this... - if (cost == RIP_INFINITY) { - // Don't bother adding a route for unreachable net - return false; - } + // resurrected if it does. // Create route if necessary r = o->find_route(net); @@ -270,10 +287,10 @@ RouteDB::update_route(const Net& net, XLOG_ASSERT(ok); - bool accepted = do_filtering(r); + bool accepted = do_filtering(r, cost); r->set_filtered(!accepted); - if (!accepted) + if (!accepted || cost == RIP_INFINITY) return false; _uq->push_back(r); @@ -287,9 +304,12 @@ RouteDB::update_route(const Net& net, XLOG_ASSERT(ok); // XXX: this is wrong - bool accepted = do_filtering(r); + bool accepted = do_filtering(r, cost); r->set_filtered(!accepted); + if (cost == RIP_INFINITY) + return false; + if (accepted) updated = true; } else { @@ -302,7 +322,7 @@ RouteDB::update_route(const Net& net, cost, no_origin, tag, policytags); // XXX: lost origin - bool accepted = do_filtering(new_route); + bool accepted = do_filtering(new_route, cost); // XXX: this whole section of code is too entangled. if (r->origin() == o) { diff --git a/xorp/rip/route_db.hh b/xorp/rip/route_db.hh index 0c795dc..0686920 100644 --- a/xorp/rip/route_db.hh +++ b/xorp/rip/route_db.hh @@ -213,7 +213,7 @@ public: * @param r route to filter. * @return true if route was accepted, false otherwise. */ - bool do_filtering(Route* r); + bool do_filtering(Route* r, uint32_t& cost); Trace& trace() { return _trace; } -- 1.7.9.5 From igorm at etf.rs Fri Aug 31 04:33:57 2012 From: igorm at etf.rs (igorm at etf.rs) Date: Fri, 31 Aug 2012 13:33:57 +0200 Subject: [Xorp-hackers] [PATCH 11/15] Remove lex.yy_policy_parser.cc In-Reply-To: <1346412841-31507-1-git-send-email-igorm@etf.rs> References: <1346412841-31507-1-git-send-email-igorm@etf.rs> Message-ID: <1346412841-31507-12-git-send-email-igorm@etf.rs> From: Igor Maravic Signed-off-by: Igor Maravic --- xorp/policy/lex.yy_policy_parser.cc | 4508 ----------------------------------- 1 file changed, 4508 deletions(-) delete mode 100644 xorp/policy/lex.yy_policy_parser.cc diff --git a/xorp/policy/lex.yy_policy_parser.cc b/xorp/policy/lex.yy_policy_parser.cc deleted file mode 100644 index d432870..0000000 --- a/xorp/policy/lex.yy_policy_parser.cc +++ /dev/null @@ -1,4508 +0,0 @@ -#line 2 "lex.yy_policy_parser.cc" - -#line 4 "lex.yy_policy_parser.cc" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 33 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -#if __STDC__ - -#define YY_USE_CONST - -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yy_policy_parserrestart(yy_policy_parserin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -extern int yy_policy_parserleng; - -extern FILE *yy_policy_parserin, *yy_policy_parserout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yy_policy_parsertext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yy_policy_parsertext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, (yytext_ptr) ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef unsigned int yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yy_policy_parserrestart()), so that the user can continue scanning by - * just pointing yy_policy_parserin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -/* yy_hold_char holds the character lost when yy_policy_parsertext is formed. */ -static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int yy_policy_parserleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yy_policy_parserwrap()'s to do buffer switches - * instead of setting up a fresh yy_policy_parserin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yy_policy_parserrestart (FILE *input_file ); -void yy_policy_parser_switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE yy_policy_parser_create_buffer (FILE *file,int size ); -void yy_policy_parser_delete_buffer (YY_BUFFER_STATE b ); -void yy_policy_parser_flush_buffer (YY_BUFFER_STATE b ); -void yy_policy_parserpush_buffer_state (YY_BUFFER_STATE new_buffer ); -void yy_policy_parserpop_buffer_state (void ); - -static void yy_policy_parserensure_buffer_stack (void ); -static void yy_policy_parser_load_buffer_state (void ); -static void yy_policy_parser_init_buffer (YY_BUFFER_STATE b,FILE *file ); - -#define YY_FLUSH_BUFFER yy_policy_parser_flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE yy_policy_parser_scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE yy_policy_parser_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_policy_parser_scan_bytes (yyconst char *bytes,int len ); - -void *yy_policy_parseralloc (yy_size_t ); -void *yy_policy_parserrealloc (void *,yy_size_t ); -void yy_policy_parserfree (void * ); - -#define yy_new_buffer yy_policy_parser_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yy_policy_parserensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_policy_parser_create_buffer(yy_policy_parserin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yy_policy_parserensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_policy_parser_create_buffer(yy_policy_parserin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define yy_policy_parserwrap(n) 1 -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -FILE *yy_policy_parserin = (FILE *) 0, *yy_policy_parserout = (FILE *) 0; - -typedef int yy_state_type; - -extern int yy_policy_parserlineno; - -int yy_policy_parserlineno = 1; - -extern char *yy_policy_parsertext; -#define yytext_ptr yy_policy_parsertext - -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yy_policy_parsertext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yy_policy_parserleng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 60 -#define YY_END_OF_BUFFER 61 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[1371] = - { 0, - 0, 0, 0, 0, 61, 59, 57, 58, 32, 6, - 59, 16, 17, 25, 24, 26, 2, 2, 2, 15, - 56, 22, 27, 23, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 59, 8, 7, 57, 19, 31, 28, 3, 29, - 0, 2, 0, 0, 2, 2, 2, 13, 20, 18, - 21, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 39, 55, 55, 55, 55, - 55, 55, 55, 55, 30, 8, 0, 0, 0, 0, - 2, 0, 0, 13, 2, 2, 0, 0, 13, 13, - - 13, 13, 55, 55, 49, 55, 42, 38, 45, 55, - 55, 55, 55, 55, 55, 41, 55, 55, 55, 55, - 55, 55, 43, 55, 55, 40, 1, 0, 0, 0, - 0, 0, 2, 0, 0, 0, 13, 13, 13, 13, - 0, 0, 14, 14, 0, 13, 0, 13, 13, 13, - 13, 55, 55, 55, 55, 55, 44, 55, 55, 52, - 55, 55, 55, 55, 55, 55, 54, 4, 0, 0, - 0, 0, 2, 0, 0, 13, 13, 0, 13, 13, - 13, 13, 0, 0, 14, 14, 14, 0, 0, 0, - 13, 13, 13, 13, 13, 13, 13, 50, 55, 33, - - 5, 55, 55, 55, 55, 55, 55, 55, 55, 0, - 0, 0, 0, 0, 0, 0, 0, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 0, 0, - 12, 14, 0, 0, 0, 0, 0, 13, 0, 13, - 0, 13, 13, 13, 13, 47, 34, 46, 55, 55, - 53, 55, 48, 55, 10, 10, 10, 0, 0, 0, - 13, 13, 0, 13, 13, 13, 13, 13, 13, 0, - 13, 13, 13, 13, 0, 0, 12, 12, 12, 12, - 12, 0, 0, 0, 0, 0, 0, 0, 13, 13, - 13, 13, 13, 13, 13, 55, 55, 55, 35, 0, - - 0, 10, 10, 10, 10, 0, 0, 0, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 0, 0, 0, 12, - 12, 12, 12, 0, 12, 0, 12, 12, 12, 12, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 13, 0, 13, 0, 13, 13, 13, 13, 36, 55, - 51, 0, 11, 11, 11, 10, 0, 0, 13, 13, - 0, 13, 13, 13, 13, 13, 13, 0, 13, 13, - 13, 13, 13, 13, 0, 13, 13, 13, 13, 0, - 0, 12, 12, 0, 12, 12, 12, 12, 0, 0, - - 0, 12, 12, 12, 12, 12, 12, 12, 13, 13, - 13, 0, 0, 0, 0, 0, 0, 0, 0, 13, - 13, 13, 13, 13, 13, 13, 37, 0, 0, 0, - 0, 0, 0, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 0, 0, - 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 0, 0, 0, 0, 0, 12, 0, 12, - 0, 12, 12, 12, 12, 13, 13, 13, 13, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, - - 0, 13, 0, 13, 13, 13, 13, 0, 0, 0, - 0, 0, 0, 0, 13, 13, 0, 13, 13, 13, - 13, 13, 13, 0, 13, 13, 13, 13, 13, 13, - 0, 13, 13, 13, 13, 13, 13, 0, 13, 13, - 13, 13, 0, 0, 12, 12, 0, 12, 12, 12, - 12, 12, 12, 0, 12, 12, 12, 12, 0, 0, - 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, - 12, 12, 13, 13, 13, 13, 0, 0, 0, 0, - 0, 0, 0, 0, 13, 13, 13, 13, 13, 13, - 13, 0, 0, 0, 0, 0, 0, 0, 13, 13, - - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 12, 0, 12, 0, 12, 12, 12, 12, 13, - 13, 13, 13, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 13, 0, 13, 0, 13, 13, 13, - 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 13, 0, 13, 0, 13, 13, 13, 13, 13, 13, - 0, 13, 13, 13, 13, 13, 13, 0, 13, 13, - 13, 13, 13, 13, 0, 13, 13, 13, 13, 13, - 13, 0, 13, 13, 13, 13, 0, 0, 12, 12, - 0, 12, 12, 12, 12, 12, 12, 0, 12, 12, - 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, - 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, - 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, - 13, 0, 0, 0, 0, 0, 0, 0, 0, 13, - 13, 13, 13, 13, 13, 13, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, - 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 12, 0, 12, 0, 12, 12, 12, 12, 13, - 13, 13, 13, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 13, 0, 13, 0, 13, 13, 13, - - 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 13, 13, 0, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 0, 0, 12, 12, 0, - 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, - 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, - 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, - 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, - 12, 12, 12, 12, 13, 13, 13, 13, 0, 0, - 0, 0, 0, 0, 0, 0, 13, 13, 13, 13, - 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, - - 13, 13, 13, 13, 13, 13, 13, 0, 0, 0, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 12, 0, 12, 0, - 12, 12, 12, 12, 13, 13, 13, 13, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, - 9, 9, 9, 9, 0, 0, 0, 0, 13, 13, - 13, 13, 13, 13, 13, 0, 0, 0, 0, 12, - - 0, 12, 0, 12, 12, 12, 12, 12, 12, 0, - 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, - 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, - 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, - 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, - 12, 12, 12, 12, 13, 13, 13, 13, 0, 0, - 0, 0, 0, 13, 9, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - - 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 12, 0, 12, 0, 12, 12, 12, - 12, 13, 13, 13, 13, 0, 0, 0, 0, 0, - 13, 13, 13, 13, 0, 0, 0, 0, 0, 0, - 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, - 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, - 13, 13, 13, 13, 0, 13, 13, 13, 13, 0, - 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 12, 12, 13, 13, - 13, 13, 13, 0, 0, 0, 0, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, - 0, 0, 0, 12, 13, 0, 0, 0, 0, 0, - 12, 12, 12, 12, 0, 0, 0, 0, 0, 12, - 12, 12, 12, 0, 12, 12, 12, 12, 0, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 0 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 1, 1, 6, 7, 8, - 9, 10, 11, 1, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 21, 21, 22, 23, 24, 25, - 26, 27, 1, 1, 28, 28, 28, 28, 29, 28, - 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 32, 33, 34, 31, 31, 31, 35, 31, 31, - 1, 1, 1, 1, 36, 1, 37, 38, 39, 40, - - 41, 42, 43, 44, 45, 46, 31, 47, 48, 49, - 50, 51, 31, 52, 53, 54, 55, 31, 31, 56, - 57, 31, 1, 58, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst flex_int32_t yy_meta[59] = - { 0, - 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, - 1, 3, 4, 5, 6, 6, 6, 6, 6, 6, - 6, 6, 7, 1, 1, 8, 1, 9, 9, 3, - 3, 3, 3, 3, 3, 3, 9, 9, 9, 9, - 9, 9, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 1 - } ; - -static yyconst flex_int16_t yy_base[1727] = - { 0, - 0, 0, 54, 55, 5173, 8703, 5170, 8703, 5145, 8703, - 5164, 8703, 8703, 8703, 5143, 5142, 50, 78, 65, 5142, - 8703, 5138, 5137, 5136, 89, 132, 5123, 5107, 37, 5081, - 5078, 5096, 5091, 5081, 115, 5078, 63, 5086, 20, 62, - 5076, 5067, 0, 8703, 5122, 8703, 8703, 8703, 160, 8703, - 170, 180, 5091, 5075, 208, 136, 216, 226, 8703, 8703, - 8703, 0, 254, 5067, 5062, 5056, 5054, 5053, 5040, 5052, - 5041, 5050, 5037, 128, 5022, 115, 5013, 5009, 5012, 5007, - 5018, 5003, 4999, 4999, 8703, 0, 282, 5037, 292, 5036, - 302, 5025, 5015, 332, 0, 5022, 5021, 360, 370, 398, - - 195, 408, 416, 4998, 0, 4970, 0, 0, 0, 4971, - 4956, 4968, 4964, 4961, 4951, 0, 4952, 4957, 4955, 4945, - 4948, 4919, 0, 4913, 4904, 0, 444, 452, 4931, 4930, - 462, 4929, 181, 4918, 4917, 4916, 470, 498, 241, 508, - 4923, 4912, 516, 524, 534, 544, 572, 602, 610, 620, - 4921, 4910, 4878, 51, 4849, 4836, 0, 4835, 4826, 0, - 4825, 4823, 4833, 4821, 4829, 4813, 0, 0, 4853, 628, - 4852, 4842, 193, 4822, 4812, 638, 668, 696, 726, 734, - 744, 4795, 4784, 4777, 8703, 750, 269, 4771, 760, 4770, - 239, 313, 770, 798, 347, 808, 315, 0, 4728, 0, - - 0, 4729, 4726, 4736, 4726, 4718, 4735, 4719, 4731, 816, - 4758, 4743, 826, 4734, 4723, 4722, 4721, 834, 862, 385, - 872, 345, 383, 882, 910, 431, 920, 429, 4711, 4708, - 928, 8703, 956, 4717, 4710, 966, 4694, 481, 974, 984, - 1012, 1042, 1050, 1060, 4685, 0, 0, 0, 4656, 4642, - 0, 4645, 0, 4642, 153, 1068, 236, 4666, 4647, 4646, - 1078, 1108, 1136, 1166, 1174, 1184, 4655, 483, 1192, 1220, - 1250, 1258, 1268, 4654, 4634, 4631, 1274, 1304, 1332, 559, - 4630, 4633, 1342, 4617, 4608, 4607, 1352, 4606, 557, 582, - 1362, 1390, 653, 1400, 584, 4566, 4576, 4555, 0, 4587, - - 1408, 264, 266, 1418, 319, 4576, 4575, 4574, 1426, 1454, - 683, 1464, 651, 681, 1474, 1502, 711, 1512, 709, 781, - 783, 1522, 1550, 849, 1560, 847, 4573, 4570, 4569, 1570, - 1598, 897, 4545, 1606, 1616, 1644, 4544, 1672, 1682, 293, - 1691, 4553, 4550, 1701, 4531, 1707, 4513, 4496, 1717, 4494, - 895, 1725, 1735, 1763, 1793, 1801, 1811, 4493, 0, 4436, - 0, 1817, 1825, 340, 8703, 321, 4447, 4436, 1835, 1865, - 1893, 1923, 1931, 1941, 4445, 938, 1949, 1977, 2007, 2015, - 2025, 4444, 940, 2033, 2061, 2091, 2099, 2109, 4443, 4430, - 4409, 2115, 2145, 2173, 4391, 2201, 2211, 593, 4390, 2222, - - 4389, 995, 996, 2232, 2260, 1027, 4378, 997, 381, 2270, - 426, 4387, 4384, 2280, 4363, 4345, 4334, 2290, 4333, 1025, - 1088, 2300, 2328, 1123, 2338, 1090, 0, 4332, 2348, 4331, - 4318, 4297, 4279, 2358, 2386, 1151, 2396, 1121, 1149, 2406, - 2434, 1207, 2444, 1205, 1230, 1232, 2454, 2482, 1289, 2492, - 1287, 1315, 1317, 2502, 2530, 1377, 2540, 1375, 4268, 4267, - 4266, 2550, 2578, 1441, 4265, 1241, 1343, 2588, 2616, 1489, - 4262, 1439, 2624, 4234, 4232, 2634, 4213, 4187, 2640, 2650, - 2678, 4169, 2706, 2716, 1487, 487, 489, 2727, 555, 2733, - 4167, 4166, 2743, 4165, 2749, 4162, 4140, 2759, 4139, 1533, - - 2767, 2777, 2805, 2835, 2843, 2853, 4138, 2859, 4137, 4134, - 2869, 4111, 4093, 4077, 2877, 2907, 2935, 2965, 2973, 2983, - 4068, 1535, 2991, 3019, 3049, 3057, 3067, 4067, 1581, 3075, - 3103, 3133, 3141, 3151, 4060, 1583, 3159, 3187, 3217, 3225, - 3235, 4035, 4023, 4022, 3241, 3271, 3299, 4021, 3327, 3337, - 1561, 3997, 3348, 3376, 3995, 3404, 3414, 1617, 3978, 3425, - 3962, 3927, 3891, 3435, 3889, 1628, 1629, 3445, 3473, 1659, - 3843, 1657, 589, 648, 3483, 679, 3851, 3850, 3493, 3805, - 3803, 3802, 3503, 3782, 1746, 1748, 3513, 3541, 1778, 3551, - 1776, 3763, 3561, 3762, 3761, 3750, 3747, 3569, 3599, 3627, - - 1850, 3637, 1848, 1876, 3647, 3675, 1908, 3685, 1878, 1906, - 1960, 3695, 3723, 1992, 3733, 1962, 1990, 2044, 3743, 3771, - 2076, 3781, 2046, 2074, 2125, 3791, 3819, 2160, 3829, 2127, - 3724, 3699, 3697, 3839, 3867, 2188, 3696, 2136, 2158, 3877, - 3905, 2247, 3676, 2186, 2223, 2245, 3915, 3943, 2315, 3651, - 2281, 3951, 3659, 3658, 3961, 3638, 3967, 3621, 3619, 3977, - 3618, 3607, 3983, 3993, 4021, 3606, 4049, 4059, 2313, 706, - 787, 4070, 789, 4076, 3613, 3581, 4086, 3580, 4092, 3533, - 3532, 4102, 3531, 2369, 4110, 4120, 4148, 4178, 4186, 4196, - 3530, 4202, 3466, 3465, 4212, 3464, 3453, 4220, 4248, 2421, - - 845, 3452, 4258, 0, 4288, 4296, 4306, 3459, 2371, 4314, - 0, 4344, 4352, 4362, 3423, 2419, 4370, 0, 4400, 4408, - 4418, 3422, 2465, 4426, 0, 4456, 4464, 4474, 3415, 2467, - 4482, 0, 4512, 4520, 4530, 3399, 3387, 3385, 4536, 4566, - 4594, 3384, 4622, 4632, 2339, 3383, 4643, 4671, 3380, 4699, - 4709, 2513, 3360, 4720, 4748, 3358, 4776, 4786, 2514, 4795, - 4803, 4811, 3367, 3366, 4821, 3365, 3349, 3346, 4831, 3345, - 2515, 2541, 4841, 4869, 2565, 3328, 2563, 893, 945, 4879, - 1001, 3322, 3318, 4889, 3317, 3316, 3313, 4899, 3293, 2599, - 2601, 4909, 4937, 2665, 4947, 2663, 3291, 4957, 3290, 3289, - - 3278, 4965, 4975, 3275, 3262, 5003, 5013, 2651, 1003, 2688, - 2690, 1022, 2788, 2790, 2815, 1095, 2817, 2887, 2889, 1119, - 2918, 2920, 2945, 1146, 2947, 3002, 3004, 1203, 3029, 3245, - 3243, 3242, 5024, 5052, 3090, 3241, 2826, 2956, 5062, 5090, - 3118, 3226, 3031, 3032, 3040, 5100, 5128, 3174, 3208, 3088, - 3116, 3172, 5138, 5166, 3202, 3191, 3200, 5174, 5182, 3256, - 8703, 5190, 3199, 3198, 5200, 3197, 5206, 3173, 3171, 5216, - 3170, 3142, 5222, 5232, 5260, 3124, 5288, 5298, 3254, 1237, - 1284, 5309, 1321, 5315, 3117, 3115, 5325, 3114, 5331, 3113, - 3089, 5341, 3087, 3282, 5349, 5359, 0, 5389, 5397, 5407, - - 3086, 5413, 3068, 3038, 5423, 3037, 3036, 5431, 3033, 3284, - 3309, 1323, 1373, 3310, 1437, 3311, 1485, 3359, 1539, 3361, - 1541, 3386, 1587, 3388, 1589, 3003, 3001, 5439, 5469, 5497, - 3000, 5525, 5535, 3426, 2974, 5546, 5574, 2948, 5602, 5612, - 3446, 2944, 5623, 5651, 2939, 5679, 5689, 3457, 2919, 5700, - 5728, 2890, 5756, 5766, 3458, 8703, 5775, 5783, 5791, 2898, - 2896, 5801, 2891, 2870, 2854, 5811, 2828, 3494, 3524, 5821, - 5849, 3584, 2814, 3525, 1633, 1635, 5859, 1654, 2819, 2799, - 5869, 2768, 2760, 2744, 5879, 2717, 3526, 3582, 1690, 3610, - 5887, 5895, 5903, 2701, 5911, 2699, 2697, 5921, 2692, 2652, - - 1752, 1754, 1773, 1845, 1882, 1884, 1903, 2625, 2600, 5927, - 5957, 5985, 3662, 2579, 3552, 3612, 5995, 6023, 3710, 2554, - 3660, 3708, 3754, 6033, 6061, 3806, 2506, 3755, 3756, 3804, - 6071, 6099, 3854, 2483, 3830, 3852, 3878, 6109, 6137, 3892, - 2466, 3890, 6145, 6153, 3930, 8703, 6161, 2445, 2397, 6171, - 2380, 6177, 2314, 2246, 6187, 2212, 2177, 6193, 6203, 6231, - 2175, 6259, 6269, 3916, 1966, 1968, 6280, 1987, 6286, 2159, - 2138, 6296, 2134, 6302, 2129, 2110, 6312, 2092, 3928, 2050, - 6318, 6326, 4008, 8703, 2073, 6336, 2055, 2026, 2052, 2071, - 2132, 2156, 2183, 2219, 2243, 1998, 6346, 6374, 4036, 0, - - 1979, 6384, 0, 1961, 6412, 6422, 3994, 1932, 6433, 0, - 1914, 6461, 6471, 4006, 1895, 6482, 0, 1877, 6510, 6520, - 4034, 1837, 6531, 0, 1802, 6559, 6569, 4131, 1784, 6580, - 0, 1765, 6608, 6618, 4132, 8703, 6627, 6635, 6643, 1757, - 1726, 6653, 1718, 1702, 1683, 6663, 1658, 4133, 4158, 6673, - 6701, 4235, 1646, 4159, 2311, 2375, 6711, 2377, 1637, 1630, - 6721, 1592, 1544, 2417, 8703, 6729, 1513, 1488, 6739, 1465, - 1430, 6745, 6755, 1391, 1316, 6783, 6793, 4160, 0, 4161, - 4221, 0, 4233, 4269, 4270, 0, 4271, 4325, 4326, 0, - 4327, 4381, 4382, 0, 4383, 4437, 4438, 0, 4439, 6802, - - 6810, 4497, 8703, 6818, 1305, 1286, 6828, 1269, 6834, 1243, - 1239, 6844, 1234, 1175, 6850, 6860, 0, 1157, 6888, 6898, - 4495, 2471, 2473, 6909, 2519, 6915, 1148, 1101, 6925, 1099, - 2521, 2561, 6933, 2605, 1097, 1092, 6943, 1061, 4546, 4547, - 0, 8703, 4548, 0, 1033, 0, 1014, 0, 988, 0, - 965, 0, 957, 0, 8703, 6951, 6959, 6967, 951, 949, - 6977, 947, 942, 921, 6987, 873, 4549, 4567, 0, 4578, - 2607, 2695, 6997, 2724, 827, 2794, 2796, 7007, 2822, 7013, - 809, 792, 7023, 761, 735, 0, 0, 0, 0, 0, - 0, 0, 7029, 7037, 4609, 8703, 7045, 727, 708, 7055, - - 650, 7061, 629, 621, 7071, 595, 581, 0, 2894, 2924, - 7079, 2926, 2952, 586, 7087, 535, 509, 0, 8703, 8703, - 8703, 8703, 8703, 8703, 8703, 7095, 7103, 7111, 492, 463, - 7121, 428, 409, 0, 3008, 7129, 324, 268, 7139, 238, - 7145, 7153, 4658, 8703, 7161, 194, 192, 7171, 150, 8703, - 7177, 7185, 7193, 146, 8703, 7201, 7209, 7217, 103, 7225, - 7233, 4686, 8703, 7241, 7249, 4735, 8703, 8703, 8703, 8703, - 7271, 7275, 7283, 7287, 7291, 7297, 7300, 7301, 7305, 7311, - 7314, 7316, 7320, 7324, 7330, 7333, 7334, 7338, 7342, 7348, - 7351, 7354, 7360, 7361, 7365, 7371, 7375, 7379, 7385, 7388, - - 7391, 7392, 7396, 7400, 7404, 7408, 7414, 7417, 7420, 7423, - 7426, 7433, 7439, 7440, 7444, 7450, 7456, 7460, 7464, 7468, - 7472, 7478, 7481, 7484, 7487, 7491, 7495, 7499, 7503, 7507, - 7511, 7517, 7520, 7523, 7527, 7533, 7536, 7539, 7542, 7545, - 7548, 7551, 7558, 7564, 7567, 7568, 7572, 7578, 7584, 7590, - 7594, 7598, 7602, 7608, 7612, 7618, 7621, 7622, 7628, 7631, - 7634, 7637, 7640, 7643, 7646, 7649, 7650, 7654, 7658, 7662, - 7666, 7670, 7676, 7679, 7682, 7685, 7688, 7692, 7698, 7701, - 7704, 7707, 7710, 7713, 7716, 7722, 7725, 7726, 7732, 7738, - 7744, 7750, 7754, 7758, 7762, 7768, 7772, 7778, 7782, 7788, - - 7791, 7794, 7797, 7798, 7804, 7807, 7810, 7813, 7816, 7819, - 7822, 7825, 7826, 7832, 7836, 7840, 7844, 7848, 7852, 7856, - 7860, 7864, 7868, 7872, 7876, 7882, 7885, 7888, 7891, 7894, - 7898, 7904, 7907, 7910, 7913, 7916, 7919, 7922, 7928, 7931, - 7932, 7936, 7942, 7948, 7954, 7960, 7966, 7972, 7978, 7984, - 7990, 7996, 8002, 8006, 8010, 8014, 8020, 8024, 8030, 8034, - 8040, 8044, 8050, 8053, 8056, 8059, 8060, 8066, 8069, 8072, - 8075, 8078, 8081, 8082, 8088, 8091, 8094, 8097, 8100, 8106, - 8112, 8118, 8124, 8130, 8136, 8142, 8146, 8150, 8154, 8158, - 8162, 8166, 8172, 8175, 8178, 8181, 8184, 8188, 8194, 8197, - - 8200, 8203, 8206, 8209, 8212, 8218, 8224, 8227, 8230, 8236, - 8242, 8248, 8254, 8260, 8266, 8270, 8274, 8280, 8284, 8290, - 8294, 8300, 8304, 8310, 8314, 8320, 8323, 8326, 8329, 8330, - 8336, 8339, 8342, 8345, 8348, 8351, 8354, 8360, 8363, 8366, - 8370, 8374, 8378, 8382, 8386, 8390, 8394, 8398, 8402, 8406, - 8410, 8414, 8418, 8424, 8427, 8430, 8433, 8436, 8440, 8446, - 8449, 8452, 8455, 8458, 8464, 8467, 8468, 8472, 8476, 8482, - 8486, 8492, 8496, 8502, 8506, 8512, 8516, 8522, 8526, 8532, - 8535, 8536, 8540, 8546, 8549, 8552, 8555, 8558, 8561, 8564, - 8568, 8572, 8576, 8580, 8584, 8588, 8592, 8598, 8601, 8604, - - 8607, 8610, 8614, 8620, 8623, 8626, 8629, 8630, 8634, 8638, - 8642, 8646, 8650, 8654, 8660, 8663, 8664, 8670, 8673, 8676, - 8677, 8683, 8686, 8687, 8693, 8696 - } ; - -static yyconst flex_int16_t yy_def[1727] = - { 0, - 1370, 1, 1371, 1371, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1372, 1370, 17, 18, 1370, - 1370, 1370, 1370, 1370, 1370, 25, 26, 26, 25, 25, - 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, - 26, 1370, 1373, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1374, 1375, 52, 55, 55, 1370, 1370, 1370, - 1370, 26, 25, 26, 26, 63, 63, 26, 26, 26, - 63, 26, 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 1370, 1373, 1370, 1376, 1370, 1377, - 1370, 1378, 1379, 1370, 91, 91, 1370, 1370, 1370, 99, - - 100, 100, 63, 26, 26, 103, 103, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 1370, 1370, 1377, 1380, - 1370, 1370, 1381, 1370, 1382, 1383, 1370, 137, 138, 138, - 1370, 1384, 1370, 1370, 1370, 1370, 1370, 146, 146, 148, - 148, 26, 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, 1385, 1370, - 1386, 1370, 1381, 1387, 1388, 1370, 1370, 1370, 177, 177, - 179, 179, 1389, 1370, 1370, 1370, 1370, 1390, 1370, 1391, - 1392, 1392, 1370, 193, 194, 194, 1392, 26, 26, 26, - - 26, 26, 26, 26, 26, 26, 26, 26, 26, 1370, - 1386, 1393, 1370, 1370, 1370, 1394, 1395, 1370, 218, 219, - 219, 1396, 1396, 1370, 224, 225, 225, 1396, 1397, 1398, - 1370, 1370, 1370, 1391, 1399, 1370, 1370, 1370, 1370, 1370, - 1370, 240, 240, 242, 242, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 1400, 1370, 1401, 1370, 1402, 1403, - 1370, 1370, 1370, 262, 262, 264, 264, 1370, 1370, 1370, - 269, 269, 271, 271, 1404, 1405, 1370, 1370, 278, 279, - 1406, 1407, 1370, 1408, 1370, 1409, 1370, 1410, 1411, 1411, - 1370, 291, 292, 292, 1411, 1412, 1412, 1412, 1412, 1370, - - 1370, 1401, 1413, 1370, 1370, 1370, 1414, 1415, 1370, 309, - 310, 310, 1416, 1416, 1370, 315, 316, 316, 1416, 1417, - 1417, 1370, 322, 323, 323, 1417, 1370, 1418, 1419, 1370, - 330, 331, 1420, 1370, 1370, 1370, 1421, 335, 1421, 1421, - 1370, 1422, 1423, 1370, 1370, 1370, 1424, 1425, 1370, 1370, - 1370, 1370, 1370, 1370, 353, 353, 355, 355, 1426, 1426, - 1426, 1370, 1370, 1370, 1370, 1370, 1427, 1428, 1370, 1370, - 1370, 370, 370, 372, 372, 1370, 1370, 1370, 377, 377, - 379, 379, 1370, 1370, 1370, 384, 384, 386, 386, 1429, - 1430, 1370, 1370, 1370, 1431, 393, 1431, 1431, 1432, 1370, - - 1433, 1434, 1434, 1370, 404, 405, 1435, 1434, 1436, 1370, - 1437, 1370, 1438, 1370, 1439, 1370, 1440, 1370, 1441, 1442, - 1442, 1370, 422, 423, 423, 1442, 1443, 1444, 1370, 1445, - 1370, 1446, 1447, 1370, 434, 435, 435, 1448, 1448, 1370, - 440, 441, 441, 1448, 1449, 1449, 1370, 447, 448, 448, - 1449, 1450, 1450, 1370, 454, 455, 455, 1450, 1370, 1451, - 1452, 1370, 462, 463, 1453, 1454, 1454, 1370, 468, 469, - 1455, 1454, 1370, 1456, 1457, 1370, 1370, 1370, 1370, 1370, - 1370, 1458, 480, 1458, 1458, 1459, 1460, 1370, 1370, 1370, - 1461, 1462, 1370, 1370, 1370, 1463, 1464, 1370, 1370, 1370, - - 1370, 1370, 1370, 502, 502, 504, 504, 1370, 1465, 1466, - 1370, 1370, 1467, 1468, 1370, 1370, 1370, 516, 516, 518, - 518, 1370, 1370, 1370, 523, 523, 525, 525, 1370, 1370, - 1370, 530, 530, 532, 532, 1370, 1370, 1370, 537, 537, - 539, 539, 1469, 1470, 1370, 1370, 1370, 1471, 546, 1471, - 1471, 1370, 1370, 1370, 1472, 553, 1472, 1472, 1473, 1370, - 1474, 1370, 1475, 1370, 1476, 1477, 1477, 1370, 568, 569, - 1478, 1477, 1370, 1479, 1370, 1480, 1370, 1481, 1370, 1482, - 1370, 1483, 1370, 1484, 1485, 1485, 1370, 587, 588, 588, - 1485, 1486, 1370, 1487, 1370, 1370, 1488, 1370, 1370, 599, - - 600, 600, 1489, 1489, 1370, 605, 606, 606, 1489, 1490, - 1490, 1370, 612, 613, 613, 1490, 1491, 1491, 1370, 619, - 620, 620, 1491, 1492, 1492, 1370, 626, 627, 627, 1492, - 1370, 1493, 1494, 1370, 634, 635, 1495, 1496, 1496, 1370, - 640, 641, 1497, 1496, 1498, 1498, 1370, 647, 648, 1499, - 1498, 1370, 1500, 1501, 1370, 1370, 1370, 1502, 1503, 1370, - 1370, 1370, 1370, 1370, 1370, 1504, 664, 1504, 1504, 1505, - 1506, 1370, 1370, 1370, 1507, 1508, 1370, 1370, 1370, 1509, - 1510, 1370, 1370, 1370, 1370, 1370, 1370, 686, 686, 688, - 688, 1370, 1511, 1512, 1370, 1370, 1513, 1370, 698, 699, - - 1514, 1515, 1370, 1516, 703, 703, 705, 705, 1370, 1370, - 1517, 710, 710, 712, 712, 1370, 1370, 1518, 717, 717, - 719, 719, 1370, 1370, 1519, 724, 724, 726, 726, 1370, - 1370, 1520, 731, 731, 733, 733, 1521, 1522, 1370, 1370, - 1370, 1523, 740, 1523, 1523, 1370, 1370, 1370, 1524, 747, - 1524, 1524, 1370, 1370, 1370, 1525, 754, 1525, 1525, 1370, - 1370, 1370, 1370, 1526, 1370, 1527, 1370, 1528, 1370, 1529, - 1530, 1530, 1370, 773, 774, 1531, 1530, 1370, 1532, 1370, - 1533, 1370, 1534, 1370, 1535, 1370, 1536, 1370, 1537, 1538, - 1538, 1370, 792, 793, 793, 1538, 1539, 1370, 1540, 1370, - - 1370, 1370, 1370, 1541, 1542, 803, 1542, 1542, 1543, 1544, - 1544, 1545, 1544, 1546, 1546, 1547, 1546, 1548, 1548, 1549, - 1548, 1550, 1550, 1551, 1550, 1552, 1552, 1553, 1552, 1370, - 1554, 1555, 1370, 833, 834, 1556, 1557, 1557, 1370, 839, - 840, 1558, 1557, 1559, 1559, 1370, 846, 847, 1560, 1559, - 1561, 1561, 1370, 853, 854, 1562, 1561, 1370, 1370, 1370, - 1370, 1370, 1563, 1564, 1370, 1370, 1370, 1565, 1566, 1370, - 1370, 1370, 1370, 1370, 1370, 1567, 874, 1567, 1567, 1568, - 1569, 1370, 1370, 1370, 1570, 1571, 1370, 1370, 1370, 1572, - 1573, 1370, 1370, 1370, 1370, 1370, 1574, 896, 896, 898, - - 898, 1370, 1575, 1576, 1370, 1370, 1577, 1370, 1578, 1579, - 1579, 1580, 1370, 1579, 1581, 1370, 1582, 1370, 1583, 1370, - 1584, 1370, 1585, 1370, 1586, 1587, 1588, 1370, 1370, 1370, - 1589, 929, 1589, 1589, 1370, 1370, 1370, 1590, 936, 1590, - 1590, 1370, 1370, 1370, 1591, 943, 1591, 1591, 1370, 1370, - 1370, 1592, 950, 1592, 1592, 1370, 1370, 1370, 1370, 1370, - 1593, 1370, 1594, 1370, 1595, 1370, 1596, 1597, 1597, 1370, - 970, 971, 1598, 1597, 1370, 1599, 1370, 1600, 1370, 1601, - 1370, 1602, 1370, 1603, 1370, 1604, 1605, 1605, 1606, 1605, - 1370, 1370, 1370, 1370, 1370, 1607, 1608, 1370, 1370, 1370, - - 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1370, 1616, 1370, - 1370, 1011, 1012, 1617, 1618, 1618, 1370, 1017, 1018, 1619, - 1618, 1620, 1620, 1370, 1024, 1025, 1621, 1620, 1622, 1622, - 1370, 1031, 1032, 1623, 1622, 1624, 1624, 1370, 1038, 1039, - 1625, 1624, 1370, 1370, 1370, 1370, 1370, 1626, 1627, 1370, - 1370, 1370, 1628, 1629, 1370, 1370, 1370, 1370, 1370, 1370, - 1630, 1059, 1630, 1630, 1631, 1632, 1370, 1370, 1370, 1633, - 1634, 1370, 1370, 1370, 1635, 1636, 1370, 1370, 1370, 1637, - 1370, 1370, 1370, 1370, 1638, 1370, 1639, 1370, 1640, 1370, - 1370, 1370, 1370, 1370, 1370, 1641, 1370, 1097, 1098, 1642, - - 1643, 1370, 1644, 1645, 1102, 1645, 1645, 1370, 1370, 1646, - 1647, 1109, 1647, 1647, 1370, 1370, 1648, 1649, 1116, 1649, - 1649, 1370, 1370, 1650, 1651, 1123, 1651, 1651, 1370, 1370, - 1652, 1653, 1130, 1653, 1653, 1370, 1370, 1370, 1370, 1370, - 1654, 1370, 1655, 1370, 1656, 1370, 1657, 1658, 1658, 1370, - 1150, 1151, 1659, 1658, 1370, 1660, 1370, 1661, 1370, 1662, - 1370, 1663, 1370, 1664, 1370, 1370, 1665, 1666, 1370, 1370, - 1370, 1370, 1370, 1667, 1668, 1173, 1668, 1668, 1669, 1670, - 1670, 1671, 1670, 1672, 1672, 1673, 1672, 1674, 1674, 1675, - 1674, 1676, 1676, 1677, 1676, 1678, 1678, 1679, 1678, 1370, - - 1370, 1370, 1370, 1370, 1655, 1680, 1370, 1370, 1370, 1657, - 1681, 1370, 1370, 1370, 1370, 1370, 1682, 1683, 1216, 1683, - 1683, 1661, 1684, 1370, 1370, 1370, 1663, 1685, 1370, 1370, - 1370, 1686, 1370, 1687, 1370, 1688, 1370, 1689, 1690, 1690, - 1691, 1370, 1690, 1692, 1370, 1693, 1370, 1694, 1370, 1695, - 1370, 1696, 1370, 1697, 1370, 1370, 1370, 1370, 1370, 1698, - 1370, 1699, 1370, 1700, 1370, 1701, 1702, 1702, 1703, 1702, - 1370, 1704, 1370, 1705, 1370, 1687, 1706, 1370, 1370, 1370, - 1689, 1707, 1370, 1370, 1370, 1708, 1709, 1710, 1711, 1712, - 1713, 1714, 1370, 1370, 1370, 1370, 1370, 1699, 1715, 1370, - - 1370, 1370, 1701, 1716, 1370, 1370, 1370, 1717, 1705, 1718, - 1370, 1370, 1370, 1719, 1370, 1720, 1370, 1721, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1722, - 1370, 1723, 1370, 1724, 1370, 1370, 1720, 1725, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1723, 1726, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 0, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370 - } ; - -static yyconst flex_int16_t yy_nxt[8762] = - { 0, - 6, 7, 8, 9, 10, 11, 10, 12, 13, 14, - 15, 16, 6, 6, 17, 17, 18, 19, 19, 19, - 19, 19, 20, 21, 22, 23, 24, 25, 25, 26, - 26, 27, 28, 26, 26, 6, 29, 25, 30, 25, - 31, 32, 26, 33, 26, 26, 34, 26, 35, 36, - 37, 38, 39, 40, 26, 41, 26, 42, 44, 44, - 44, 44, 51, 80, 52, 52, 52, 52, 52, 52, - 52, 52, 53, 53, 81, 66, 67, 54, 54, 57, - 57, 57, 57, 57, 57, 68, 54, 54, 54, 54, - 54, 54, 55, 55, 55, 55, 55, 56, 57, 57, - - 62, 199, 82, 63, 63, 63, 63, 63, 63, 63, - 63, 53, 77, 83, 78, 1345, 63, 63, 62, 62, - 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, - 63, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 62, 62, 62, 1370, 74, 96, 96, 1336, 62, - 62, 117, 1345, 114, 75, 300, 301, 118, 62, 62, - 62, 62, 62, 62, 49, 49, 49, 49, 49, 49, - 49, 49, 87, 115, 88, 88, 89, 90, 90, 90, - 90, 90, 51, 141, 91, 91, 91, 91, 91, 91, - - 91, 91, 53, 53, 1345, 141, 1345, 92, 92, 151, - 151, 151, 151, 151, 151, 1370, 92, 92, 92, 92, - 92, 92, 95, 95, 95, 95, 95, 95, 95, 95, - 96, 96, 96, 96, 96, 96, 96, 96, 97, 98, - 99, 99, 100, 101, 101, 101, 101, 101, 300, 301, - 1336, 145, 98, 102, 102, 182, 182, 182, 182, 182, - 182, 147, 102, 102, 102, 102, 102, 102, 103, 103, - 103, 103, 103, 103, 103, 103, 300, 301, 300, 301, - 1336, 103, 103, 232, 232, 232, 232, 232, 232, 232, - 103, 103, 103, 103, 103, 103, 127, 127, 127, 127, - - 127, 127, 127, 127, 128, 334, 130, 130, 130, 130, - 130, 131, 132, 132, 51, 336, 133, 133, 133, 133, - 133, 133, 133, 133, 53, 97, 98, 145, 98, 134, - 134, 300, 301, 300, 301, 147, 1336, 147, 134, 134, - 134, 134, 134, 134, 97, 98, 137, 137, 138, 139, - 139, 139, 139, 139, 365, 365, 365, 145, 98, 140, - 140, 245, 245, 245, 245, 245, 245, 178, 140, 140, - 140, 140, 140, 140, 143, 144, 143, 143, 143, 143, - 143, 143, 145, 98, 146, 146, 146, 146, 146, 146, - 146, 146, 147, 97, 98, 97, 98, 148, 148, 267, - - 267, 267, 267, 267, 267, 178, 148, 148, 148, 148, - 148, 148, 149, 149, 149, 149, 149, 150, 151, 151, - 97, 1302, 148, 148, 148, 148, 148, 148, 148, 148, - 152, 152, 152, 152, 152, 152, 152, 152, 97, 98, - 1345, 145, 98, 152, 152, 274, 274, 274, 274, 274, - 274, 178, 152, 152, 152, 152, 152, 152, 127, 127, - 127, 127, 127, 127, 127, 127, 169, 169, 170, 171, - 171, 171, 171, 171, 128, 1345, 172, 172, 172, 172, - 172, 172, 145, 98, 177, 177, 177, 177, 177, 177, - 177, 177, 178, 97, 98, 97, 98, 179, 179, 97, - - 98, 97, 98, 147, 1297, 178, 179, 179, 179, 179, - 179, 179, 180, 180, 180, 180, 180, 181, 182, 182, - 97, 1280, 179, 179, 179, 179, 179, 179, 179, 179, - 185, 185, 185, 185, 185, 185, 185, 185, 186, 186, - 187, 185, 185, 185, 185, 185, 142, 1336, 188, 188, - 189, 190, 190, 190, 190, 190, 145, 98, 191, 191, - 191, 191, 191, 191, 191, 191, 147, 97, 98, 239, - 98, 192, 192, 340, 340, 340, 340, 340, 340, 241, - 192, 192, 192, 192, 192, 192, 193, 193, 194, 195, - 195, 195, 195, 195, 97, 98, 239, 98, 1336, 196, - - 196, 97, 98, 1217, 241, 334, 241, 1302, 196, 196, - 196, 196, 196, 196, 97, 394, 192, 192, 192, 192, - 192, 192, 192, 192, 197, 197, 197, 197, 197, 197, - 197, 197, 145, 1302, 197, 197, 197, 197, 197, 197, - 210, 1302, 212, 212, 212, 212, 212, 213, 214, 214, - 97, 98, 218, 218, 219, 220, 220, 220, 220, 220, - 97, 98, 1297, 145, 98, 221, 221, 358, 358, 358, - 358, 358, 358, 263, 221, 221, 221, 221, 221, 221, - 145, 98, 222, 222, 222, 222, 222, 222, 222, 222, - 178, 97, 98, 97, 98, 223, 223, 375, 375, 375, - - 375, 375, 375, 263, 223, 223, 223, 223, 223, 223, - 224, 224, 225, 226, 226, 226, 226, 226, 97, 98, - 1297, 145, 98, 227, 227, 382, 382, 382, 382, 382, - 382, 263, 227, 227, 227, 227, 227, 227, 97, 1297, - 223, 223, 223, 223, 223, 223, 223, 223, 228, 228, - 228, 228, 228, 228, 228, 228, 145, 1174, 228, 228, - 228, 228, 228, 228, 232, 232, 232, 232, 232, 232, - 232, 232, 233, 1280, 235, 235, 235, 235, 235, 236, - 237, 237, 239, 98, 240, 240, 240, 240, 240, 240, - 240, 240, 241, 239, 98, 97, 98, 242, 242, 97, - - 98, 97, 98, 270, 1280, 270, 242, 242, 242, 242, - 242, 242, 243, 243, 243, 243, 243, 244, 245, 245, - 97, 1280, 242, 242, 242, 242, 242, 242, 242, 242, - 255, 255, 256, 257, 257, 257, 257, 257, 210, 1226, - 258, 258, 258, 258, 258, 258, 145, 98, 262, 262, - 262, 262, 262, 262, 262, 262, 263, 97, 98, 239, - 98, 264, 264, 389, 389, 389, 389, 389, 389, 270, - 264, 264, 264, 264, 264, 264, 265, 265, 265, 265, - 265, 266, 267, 267, 97, 1302, 264, 264, 264, 264, - 264, 264, 264, 264, 239, 98, 269, 269, 269, 269, - - 269, 269, 269, 269, 270, 97, 98, 97, 98, 271, - 271, 398, 398, 398, 398, 398, 398, 241, 271, 271, - 271, 271, 271, 271, 272, 272, 272, 272, 272, 273, - 274, 274, 97, 1302, 271, 271, 271, 271, 271, 271, - 271, 271, 278, 278, 279, 280, 280, 280, 280, 280, - 97, 98, 97, 98, 1209, 281, 281, 97, 98, 1297, - 263, 1297, 270, 1204, 281, 281, 281, 281, 281, 281, - 282, 282, 283, 284, 284, 284, 284, 284, 233, 1131, - 285, 285, 285, 285, 285, 285, 142, 1124, 286, 286, - 287, 288, 288, 288, 288, 288, 239, 98, 289, 289, - - 289, 289, 289, 289, 289, 289, 241, 334, 1370, 334, - 1117, 290, 290, 97, 98, 97, 98, 336, 336, 336, - 290, 290, 290, 290, 290, 290, 291, 291, 292, 293, - 293, 293, 293, 293, 97, 98, 1110, 352, 98, 294, - 294, 485, 485, 485, 485, 485, 485, 354, 294, 294, - 294, 294, 294, 294, 97, 1103, 290, 290, 290, 290, - 290, 290, 290, 290, 295, 295, 295, 295, 295, 295, - 295, 295, 239, 1280, 295, 295, 295, 295, 295, 295, - 300, 301, 303, 303, 303, 303, 303, 304, 305, 305, - 97, 98, 309, 309, 310, 311, 311, 311, 311, 311, - - 97, 98, 352, 98, 1280, 312, 312, 97, 98, 1166, - 354, 1226, 354, 1226, 312, 312, 312, 312, 312, 312, - 145, 98, 313, 313, 313, 313, 313, 313, 313, 313, - 263, 97, 98, 145, 98, 314, 314, 507, 507, 507, - 507, 507, 507, 371, 314, 314, 314, 314, 314, 314, - 315, 315, 316, 317, 317, 317, 317, 317, 97, 98, - 1226, 97, 98, 318, 318, 521, 521, 521, 521, 521, - 521, 371, 318, 318, 318, 318, 318, 318, 97, 1217, - 314, 314, 314, 314, 314, 314, 314, 314, 319, 319, - 319, 319, 319, 319, 319, 319, 145, 1060, 319, 319, - - 319, 319, 319, 319, 239, 98, 320, 320, 320, 320, - 320, 320, 320, 320, 270, 97, 98, 145, 98, 321, - 321, 528, 528, 528, 528, 528, 528, 371, 321, 321, - 321, 321, 321, 321, 322, 322, 323, 324, 324, 324, - 324, 324, 239, 98, 97, 98, 1209, 325, 325, 97, - 98, 1209, 378, 334, 378, 1209, 325, 325, 325, 325, - 325, 325, 97, 394, 321, 321, 321, 321, 321, 321, - 321, 321, 326, 326, 326, 326, 326, 326, 326, 326, - 239, 1204, 326, 326, 326, 326, 326, 326, 330, 330, - 331, 332, 332, 332, 332, 332, 97, 98, 1204, 239, - - 98, 333, 333, 535, 535, 535, 535, 535, 535, 378, - 333, 333, 333, 333, 333, 333, 334, 1204, 335, 335, - 335, 335, 335, 335, 335, 335, 336, 352, 98, 97, - 98, 337, 337, 97, 98, 97, 98, 385, 1174, 385, - 337, 337, 337, 337, 337, 337, 338, 338, 338, 338, - 338, 339, 340, 340, 341, 1370, 343, 343, 343, 343, - 343, 344, 345, 345, 346, 394, 348, 348, 348, 348, - 348, 349, 350, 350, 352, 98, 353, 353, 353, 353, - 353, 353, 353, 353, 354, 97, 98, 352, 98, 355, - 355, 542, 542, 542, 542, 542, 542, 385, 355, 355, - - 355, 355, 355, 355, 356, 356, 356, 356, 356, 357, - 358, 358, 97, 1242, 355, 355, 355, 355, 355, 355, - 355, 355, 363, 363, 363, 364, 365, 365, 365, 365, - 300, 301, 366, 366, 366, 366, 366, 366, 145, 98, - 370, 370, 370, 370, 370, 370, 370, 370, 371, 97, - 98, 334, 1010, 372, 372, 551, 551, 551, 551, 551, - 551, 394, 372, 372, 372, 372, 372, 372, 373, 373, - 373, 373, 373, 374, 375, 375, 97, 1166, 372, 372, - 372, 372, 372, 372, 372, 372, 239, 98, 377, 377, - 377, 377, 377, 377, 377, 377, 378, 97, 98, 479, - - 1166, 379, 379, 558, 558, 558, 558, 558, 558, 481, - 379, 379, 379, 379, 379, 379, 380, 380, 380, 380, - 380, 381, 382, 382, 97, 1166, 379, 379, 379, 379, - 379, 379, 379, 379, 352, 98, 384, 384, 384, 384, - 384, 384, 384, 384, 385, 97, 98, 97, 98, 386, - 386, 97, 98, 97, 98, 354, 1074, 371, 386, 386, - 386, 386, 386, 386, 387, 387, 387, 387, 387, 388, - 389, 389, 97, 334, 386, 386, 386, 386, 386, 386, - 386, 386, 334, 547, 393, 393, 393, 393, 393, 393, - 393, 393, 394, 97, 98, 97, 98, 395, 395, 97, - - 98, 97, 98, 378, 1226, 385, 395, 395, 395, 395, - 395, 395, 396, 396, 396, 396, 396, 397, 398, 398, - 399, 399, 400, 401, 401, 401, 401, 401, 334, 479, - 402, 402, 402, 402, 402, 402, 402, 402, 336, 554, - 479, 1370, 1226, 403, 403, 97, 98, 97, 98, 1069, - 481, 481, 403, 403, 403, 403, 403, 403, 404, 404, - 405, 406, 406, 406, 406, 406, 97, 98, 1217, 479, - 1209, 407, 407, 669, 669, 669, 669, 669, 669, 481, - 407, 407, 407, 407, 407, 407, 408, 408, 408, 408, - 408, 408, 408, 408, 334, 1209, 408, 408, 408, 408, - - 408, 408, 97, 98, 336, 409, 409, 410, 411, 411, - 411, 411, 411, 341, 1052, 412, 412, 412, 412, 412, - 412, 413, 413, 414, 415, 415, 415, 415, 415, 346, - 1204, 416, 416, 416, 416, 416, 416, 142, 1204, 417, - 417, 418, 419, 419, 419, 419, 419, 352, 98, 420, - 420, 420, 420, 420, 420, 420, 420, 354, 501, 98, - 97, 98, 421, 421, 97, 98, 97, 98, 503, 1047, - 503, 421, 421, 421, 421, 421, 421, 422, 422, 423, - 424, 424, 424, 424, 424, 97, 98, 1131, 501, 98, - 425, 425, 691, 691, 691, 691, 691, 691, 503, 425, - - 425, 425, 425, 425, 425, 97, 951, 421, 421, 421, - 421, 421, 421, 421, 421, 426, 426, 426, 426, 426, - 426, 426, 426, 352, 1124, 426, 426, 426, 426, 426, - 426, 428, 428, 429, 430, 430, 430, 430, 430, 365, - 365, 365, 365, 365, 365, 365, 365, 97, 98, 434, - 434, 435, 436, 436, 436, 436, 436, 97, 98, 944, - 145, 98, 437, 437, 708, 708, 708, 708, 708, 708, - 517, 437, 437, 437, 437, 437, 437, 145, 98, 438, - 438, 438, 438, 438, 438, 438, 438, 371, 97, 98, - 145, 98, 439, 439, 97, 98, 97, 98, 517, 1117, - - 517, 439, 439, 439, 439, 439, 439, 440, 440, 441, - 442, 442, 442, 442, 442, 97, 98, 937, 239, 98, - 443, 443, 715, 715, 715, 715, 715, 715, 524, 443, - 443, 443, 443, 443, 443, 97, 1110, 439, 439, 439, - 439, 439, 439, 439, 439, 444, 444, 444, 444, 444, - 444, 444, 444, 145, 930, 444, 444, 444, 444, 444, - 444, 239, 98, 445, 445, 445, 445, 445, 445, 445, - 445, 378, 97, 98, 239, 98, 446, 446, 97, 98, - 97, 98, 524, 1103, 524, 446, 446, 446, 446, 446, - 446, 447, 447, 448, 449, 449, 449, 449, 449, 97, - - 98, 1174, 352, 98, 450, 450, 722, 722, 722, 722, - 722, 722, 531, 450, 450, 450, 450, 450, 450, 97, - 1010, 446, 446, 446, 446, 446, 446, 446, 446, 451, - 451, 451, 451, 451, 451, 451, 451, 239, 995, 451, - 451, 451, 451, 451, 451, 352, 98, 452, 452, 452, - 452, 452, 452, 452, 452, 385, 97, 98, 352, 98, - 453, 453, 97, 98, 97, 98, 531, 1166, 531, 453, - 453, 453, 453, 453, 453, 454, 454, 455, 456, 456, - 456, 456, 456, 97, 98, 1166, 501, 98, 457, 457, - 729, 729, 729, 729, 729, 729, 538, 457, 457, 457, - - 457, 457, 457, 97, 1074, 453, 453, 453, 453, 453, - 453, 453, 453, 458, 458, 458, 458, 458, 458, 458, - 458, 352, 1074, 458, 458, 458, 458, 458, 458, 462, - 462, 463, 464, 464, 464, 464, 464, 97, 98, 501, - 98, 1074, 465, 465, 97, 98, 1069, 538, 334, 538, - 1069, 465, 465, 465, 465, 465, 465, 334, 547, 466, - 466, 466, 466, 466, 466, 466, 466, 394, 97, 98, - 1370, 1069, 467, 467, 736, 736, 736, 736, 736, 736, - 547, 467, 467, 467, 467, 467, 467, 468, 468, 469, - 470, 470, 470, 470, 470, 97, 98, 1060, 334, 875, - - 471, 471, 745, 745, 745, 745, 745, 745, 547, 471, - 471, 471, 471, 471, 471, 472, 472, 472, 472, 472, - 472, 472, 472, 334, 1052, 472, 472, 472, 472, 472, - 472, 97, 98, 394, 473, 479, 475, 475, 475, 475, - 475, 476, 477, 477, 479, 554, 480, 480, 480, 480, - 480, 480, 480, 480, 481, 97, 98, 1370, 1052, 482, - 482, 752, 752, 752, 752, 752, 752, 554, 482, 482, - 482, 482, 482, 482, 483, 483, 483, 483, 483, 484, - 485, 485, 97, 98, 487, 487, 487, 487, 487, 488, - 489, 489, 490, 479, 492, 492, 492, 492, 492, 493, - - 494, 494, 495, 554, 497, 497, 497, 497, 497, 498, - 499, 499, 501, 98, 502, 502, 502, 502, 502, 502, - 502, 502, 503, 97, 98, 663, 1052, 504, 504, 759, - 759, 759, 759, 759, 759, 665, 504, 504, 504, 504, - 504, 504, 505, 505, 505, 505, 505, 506, 507, 507, - 97, 334, 504, 504, 504, 504, 504, 504, 504, 504, - 508, 741, 510, 510, 510, 510, 510, 511, 512, 512, - 145, 98, 516, 516, 516, 516, 516, 516, 516, 516, - 517, 97, 98, 97, 98, 518, 518, 97, 98, 97, - 98, 503, 1047, 517, 518, 518, 518, 518, 518, 518, - - 519, 519, 519, 519, 519, 520, 521, 521, 97, 1047, - 518, 518, 518, 518, 518, 518, 518, 518, 239, 98, - 523, 523, 523, 523, 523, 523, 523, 523, 524, 97, - 98, 97, 98, 525, 525, 808, 808, 808, 808, 808, - 808, 524, 525, 525, 525, 525, 525, 525, 526, 526, - 526, 526, 526, 527, 528, 528, 97, 1047, 525, 525, - 525, 525, 525, 525, 525, 525, 352, 98, 530, 530, - 530, 530, 530, 530, 530, 530, 531, 97, 98, 97, - 98, 532, 532, 97, 98, 97, 98, 531, 1131, 538, - 532, 532, 532, 532, 532, 532, 533, 533, 533, 533, - - 533, 534, 535, 535, 97, 1124, 532, 532, 532, 532, - 532, 532, 532, 532, 501, 98, 537, 537, 537, 537, - 537, 537, 537, 537, 538, 479, 663, 663, 1117, 539, - 539, 97, 98, 97, 98, 748, 755, 665, 539, 539, - 539, 539, 539, 539, 540, 540, 540, 540, 540, 541, - 542, 542, 97, 1370, 539, 539, 539, 539, 539, 539, - 539, 539, 334, 665, 546, 546, 546, 546, 546, 546, - 546, 546, 547, 97, 98, 663, 1110, 548, 548, 879, - 879, 879, 879, 879, 879, 665, 548, 548, 548, 548, - 548, 548, 549, 549, 549, 549, 549, 550, 551, 551, - - 479, 1103, 553, 553, 553, 553, 553, 553, 553, 553, - 554, 685, 98, 97, 98, 555, 555, 97, 98, 97, - 98, 687, 1010, 687, 555, 555, 555, 555, 555, 555, - 556, 556, 556, 556, 556, 557, 558, 558, 559, 559, - 560, 561, 561, 561, 561, 561, 473, 832, 562, 562, - 562, 562, 562, 562, 563, 563, 564, 565, 565, 565, - 565, 565, 479, 802, 566, 566, 566, 566, 566, 566, - 566, 566, 481, 804, 804, 685, 98, 567, 567, 901, - 901, 901, 901, 901, 901, 687, 567, 567, 567, 567, - 567, 567, 568, 568, 569, 570, 570, 570, 570, 570, - - 145, 98, 97, 98, 995, 571, 571, 97, 98, 995, - 704, 995, 704, 902, 571, 571, 571, 571, 571, 571, - 572, 572, 572, 572, 572, 572, 572, 572, 479, 1074, - 572, 572, 572, 572, 572, 572, 97, 98, 481, 97, - 98, 573, 573, 573, 573, 573, 573, 574, 574, 575, - 576, 576, 576, 576, 576, 490, 1074, 577, 577, 577, - 577, 577, 577, 578, 578, 579, 580, 580, 580, 580, - 580, 495, 889, 581, 581, 581, 581, 581, 581, 142, - 1069, 582, 582, 583, 584, 584, 584, 584, 584, 501, - 98, 585, 585, 585, 585, 585, 585, 585, 585, 503, - - 145, 98, 239, 98, 586, 586, 97, 98, 97, 98, - 704, 1069, 711, 586, 586, 586, 586, 586, 586, 587, - 587, 588, 589, 589, 589, 589, 589, 97, 98, 239, - 98, 884, 590, 590, 97, 98, 1060, 711, 334, 711, - 1052, 590, 590, 590, 590, 590, 590, 97, 741, 586, - 586, 586, 586, 586, 586, 586, 586, 591, 591, 591, - 591, 591, 591, 591, 591, 501, 1052, 591, 591, 591, - 591, 591, 591, 592, 592, 593, 594, 594, 594, 594, - 594, 508, 867, 595, 595, 595, 595, 595, 595, 97, - 98, 599, 599, 600, 601, 601, 601, 601, 601, 352, - - 98, 97, 98, 1047, 602, 602, 97, 98, 1047, 718, - 862, 718, 951, 602, 602, 602, 602, 602, 602, 145, - 98, 603, 603, 603, 603, 603, 603, 603, 603, 517, - 352, 98, 501, 98, 604, 604, 97, 98, 97, 98, - 718, 755, 725, 604, 604, 604, 604, 604, 604, 605, - 605, 606, 607, 607, 607, 607, 607, 97, 98, 501, - 98, 944, 608, 608, 97, 98, 748, 725, 1370, 725, - 937, 608, 608, 608, 608, 608, 608, 97, 741, 604, - 604, 604, 604, 604, 604, 604, 604, 609, 609, 609, - 609, 609, 609, 609, 609, 145, 741, 609, 609, 609, - - 609, 609, 609, 239, 98, 610, 610, 610, 610, 610, - 610, 610, 610, 524, 685, 98, 97, 98, 611, 611, - 97, 98, 930, 1010, 732, 832, 732, 611, 611, 611, - 611, 611, 611, 612, 612, 613, 614, 614, 614, 614, - 614, 685, 98, 334, 479, 995, 615, 615, 995, 902, - 902, 732, 1370, 741, 748, 615, 615, 615, 615, 615, - 615, 97, 748, 611, 611, 611, 611, 611, 611, 611, - 611, 616, 616, 616, 616, 616, 616, 616, 616, 239, - 902, 616, 616, 616, 616, 616, 616, 352, 98, 617, - 617, 617, 617, 617, 617, 617, 617, 531, 895, 889, - - 479, 889, 618, 618, 934, 934, 934, 934, 934, 934, - 748, 618, 618, 618, 618, 618, 618, 619, 619, 620, - 621, 621, 621, 621, 621, 889, 884, 884, 663, 884, - 622, 622, 941, 941, 941, 941, 941, 941, 755, 622, - 622, 622, 622, 622, 622, 97, 875, 618, 618, 618, - 618, 618, 618, 618, 618, 623, 623, 623, 623, 623, - 623, 623, 623, 352, 665, 623, 623, 623, 623, 623, - 623, 501, 98, 624, 624, 624, 624, 624, 624, 624, - 624, 538, 867, 867, 1370, 867, 625, 625, 948, 948, - 948, 948, 948, 948, 755, 625, 625, 625, 625, 625, - - 625, 626, 626, 627, 628, 628, 628, 628, 628, 862, - 862, 862, 663, 951, 629, 629, 955, 955, 955, 955, - 955, 955, 755, 629, 629, 629, 629, 629, 629, 97, - 944, 625, 625, 625, 625, 625, 625, 625, 625, 630, - 630, 630, 630, 630, 630, 630, 630, 501, 937, 630, - 630, 630, 630, 630, 630, 634, 634, 635, 636, 636, - 636, 636, 636, 930, 928, 832, 873, 633, 637, 637, - 956, 956, 956, 956, 956, 956, 875, 637, 637, 637, - 637, 637, 637, 334, 804, 638, 638, 638, 638, 638, - 638, 638, 638, 547, 97, 98, 802, 913, 639, 639, - - 598, 692, 902, 902, 687, 889, 804, 639, 639, 639, - 639, 639, 639, 640, 640, 641, 642, 642, 642, 642, - 642, 1370, 802, 97, 98, 889, 643, 643, 679, 884, - 884, 804, 804, 704, 674, 643, 643, 643, 643, 643, - 643, 644, 644, 644, 644, 644, 644, 644, 644, 334, - 875, 644, 644, 644, 644, 644, 644, 867, 867, 547, - 479, 657, 645, 645, 645, 645, 645, 645, 645, 645, - 554, 97, 98, 97, 98, 646, 646, 862, 862, 652, - 755, 711, 554, 718, 646, 646, 646, 646, 646, 646, - 647, 647, 648, 649, 649, 649, 649, 649, 97, 98, - - 97, 98, 748, 650, 650, 547, 741, 832, 725, 633, - 732, 685, 650, 650, 650, 650, 650, 650, 651, 651, - 651, 651, 651, 651, 651, 651, 479, 501, 651, 651, - 651, 651, 651, 651, 352, 239, 554, 652, 334, 654, - 654, 654, 654, 654, 655, 656, 656, 657, 930, 659, - 659, 659, 659, 659, 660, 661, 661, 663, 479, 664, - 664, 664, 664, 664, 664, 664, 664, 665, 937, 663, - 873, 145, 666, 666, 804, 598, 692, 692, 692, 944, - 951, 666, 666, 666, 666, 666, 666, 667, 667, 667, - 667, 667, 668, 669, 669, 97, 98, 671, 671, 671, - - 671, 671, 672, 673, 673, 674, 873, 676, 676, 676, - 676, 676, 677, 678, 678, 679, 875, 681, 681, 681, - 681, 681, 682, 683, 683, 685, 98, 686, 686, 686, - 686, 686, 686, 686, 686, 687, 1370, 873, 895, 98, - 688, 688, 685, 679, 679, 679, 875, 875, 897, 688, - 688, 688, 688, 688, 688, 689, 689, 689, 689, 689, - 690, 691, 691, 97, 334, 688, 688, 688, 688, 688, - 688, 688, 688, 692, 930, 694, 694, 694, 694, 694, - 695, 696, 696, 698, 698, 699, 700, 700, 700, 700, - 700, 701, 674, 674, 97, 98, 702, 702, 1064, 1064, - - 1064, 1064, 1064, 1064, 897, 702, 702, 702, 702, 702, - 702, 145, 98, 703, 703, 703, 703, 703, 703, 703, - 703, 704, 895, 98, 1370, 674, 705, 705, 665, 481, - 657, 657, 897, 657, 930, 705, 705, 705, 705, 705, - 705, 706, 706, 706, 706, 706, 707, 708, 708, 97, - 652, 705, 705, 705, 705, 705, 705, 705, 705, 239, - 98, 710, 710, 710, 710, 710, 710, 710, 710, 711, - 652, 652, 334, 755, 712, 712, 1107, 1107, 1107, 1107, - 1107, 1107, 930, 712, 712, 712, 712, 712, 712, 713, - 713, 713, 713, 713, 714, 715, 715, 97, 748, 712, - - 712, 712, 712, 712, 712, 712, 712, 352, 98, 717, - 717, 717, 717, 717, 717, 717, 717, 718, 741, 739, - 479, 633, 719, 719, 1114, 1114, 1114, 1114, 1114, 1114, - 937, 719, 719, 719, 719, 719, 719, 720, 720, 720, - 720, 720, 721, 722, 722, 97, 461, 719, 719, 719, - 719, 719, 719, 719, 719, 501, 98, 724, 724, 724, - 724, 724, 724, 724, 724, 725, 1370, 479, 663, 598, - 726, 726, 433, 508, 692, 692, 937, 937, 944, 726, - 726, 726, 726, 726, 726, 727, 727, 727, 727, 727, - 728, 729, 729, 97, 679, 726, 726, 726, 726, 726, - - 726, 726, 726, 685, 98, 731, 731, 731, 731, 731, - 731, 731, 731, 732, 679, 495, 1370, 674, 733, 733, - 1121, 1121, 1121, 1121, 1121, 1121, 944, 733, 733, 733, - 733, 733, 733, 734, 734, 734, 734, 734, 735, 736, - 736, 97, 663, 733, 733, 733, 733, 733, 733, 733, - 733, 334, 944, 740, 740, 740, 740, 740, 740, 740, - 740, 741, 674, 490, 873, 665, 742, 742, 1128, 1128, - 1128, 1128, 1128, 1128, 951, 742, 742, 742, 742, 742, - 742, 743, 743, 743, 743, 743, 744, 745, 745, 479, - 1370, 747, 747, 747, 747, 747, 747, 747, 747, 748, - - 951, 657, 873, 657, 749, 749, 1135, 1135, 1135, 1135, - 1135, 1135, 951, 749, 749, 749, 749, 749, 749, 750, - 750, 750, 750, 750, 751, 752, 752, 663, 1058, 754, - 754, 754, 754, 754, 754, 754, 754, 755, 1060, 473, - 97, 98, 756, 756, 1136, 1136, 1136, 1136, 1136, 1136, - 897, 756, 756, 756, 756, 756, 756, 757, 757, 757, - 757, 757, 758, 759, 759, 760, 760, 761, 762, 762, - 762, 762, 762, 652, 652, 763, 763, 763, 763, 763, - 763, 764, 764, 765, 766, 766, 766, 766, 766, 657, - 652, 767, 767, 767, 767, 767, 767, 768, 768, 769, - - 770, 770, 770, 770, 770, 663, 334, 771, 771, 771, - 771, 771, 771, 771, 771, 665, 1103, 554, 479, 394, - 772, 772, 1165, 1165, 1165, 1165, 1165, 1165, 1110, 772, - 772, 772, 772, 772, 772, 773, 773, 774, 775, 775, - 775, 775, 775, 547, 633, 461, 663, 501, 776, 776, - 1178, 1178, 1178, 1178, 1178, 1178, 1117, 776, 776, 776, - 776, 776, 776, 777, 777, 777, 777, 777, 777, 777, - 777, 663, 352, 777, 777, 777, 777, 777, 777, 239, - 145, 665, 97, 98, 778, 778, 778, 778, 778, 778, - 779, 779, 780, 781, 781, 781, 781, 781, 674, 598, - - 782, 782, 782, 782, 782, 782, 783, 783, 784, 785, - 785, 785, 785, 785, 679, 433, 786, 786, 786, 786, - 786, 786, 142, 508, 787, 787, 788, 789, 789, 789, - 789, 789, 685, 98, 790, 790, 790, 790, 790, 790, - 790, 790, 687, 873, 1058, 1058, 508, 791, 791, 508, - 501, 495, 495, 1124, 1131, 1060, 791, 791, 791, 791, - 791, 791, 792, 792, 793, 794, 794, 794, 794, 794, - 1370, 1058, 1172, 334, 495, 795, 795, 490, 490, 490, - 1060, 1060, 1174, 1103, 795, 795, 795, 795, 795, 795, - 97, 481, 791, 791, 791, 791, 791, 791, 791, 791, - - 796, 796, 796, 796, 796, 796, 796, 796, 685, 336, - 796, 796, 796, 796, 796, 796, 797, 797, 798, 799, - 799, 799, 799, 799, 692, 473, 800, 800, 800, 800, - 800, 800, 802, 1370, 803, 803, 803, 803, 803, 803, - 803, 803, 804, 1103, 473, 334, 473, 805, 805, 1221, - 1221, 1221, 1221, 1221, 1221, 1103, 805, 805, 805, 805, - 805, 805, 806, 806, 806, 806, 806, 807, 808, 808, - 145, 98, 810, 810, 810, 810, 810, 810, 810, 810, - 704, 479, 1370, 479, 554, 811, 811, 547, 545, 461, - 329, 1110, 1110, 1110, 811, 811, 811, 811, 811, 811, - - 97, 515, 811, 811, 811, 811, 811, 811, 811, 811, - 813, 813, 813, 813, 813, 813, 813, 813, 145, 433, - 813, 813, 813, 813, 813, 813, 239, 98, 814, 814, - 814, 814, 814, 814, 814, 814, 711, 663, 1370, 663, - 308, 815, 815, 508, 508, 495, 495, 1117, 1117, 1117, - 815, 815, 815, 815, 815, 815, 97, 346, 815, 815, - 815, 815, 815, 815, 815, 815, 817, 817, 817, 817, - 817, 817, 817, 817, 239, 490, 817, 817, 817, 817, - 817, 817, 352, 98, 818, 818, 818, 818, 818, 818, - 818, 818, 718, 873, 1370, 873, 490, 819, 819, 341, - - 481, 473, 473, 1124, 1124, 1124, 819, 819, 819, 819, - 819, 819, 97, 394, 819, 819, 819, 819, 819, 819, - 819, 819, 821, 821, 821, 821, 821, 821, 821, 821, - 352, 461, 821, 821, 821, 821, 821, 821, 501, 98, - 822, 822, 822, 822, 822, 822, 822, 822, 725, 1058, - 1370, 1058, 329, 823, 823, 352, 239, 145, 433, 1131, - 1131, 1131, 823, 823, 823, 823, 823, 823, 97, 308, - 823, 823, 823, 823, 823, 823, 823, 823, 825, 825, - 825, 825, 825, 825, 825, 825, 501, 427, 825, 825, - 825, 825, 825, 825, 685, 98, 826, 826, 826, 826, - - 826, 826, 826, 826, 732, 352, 346, 1215, 346, 827, - 827, 1255, 1255, 1255, 1255, 1255, 1255, 1217, 827, 827, - 827, 827, 827, 827, 97, 346, 827, 827, 827, 827, - 827, 827, 827, 827, 829, 829, 829, 829, 829, 829, - 829, 829, 685, 341, 829, 829, 829, 829, 829, 829, - 833, 833, 834, 835, 835, 835, 835, 835, 1172, 1370, - 1172, 1215, 341, 836, 836, 341, 336, 394, 1174, 1174, - 1174, 1217, 836, 836, 836, 836, 836, 836, 334, 1370, - 837, 837, 837, 837, 837, 837, 837, 837, 741, 1217, - 1215, 392, 329, 838, 838, 230, 369, 308, 217, 362, - - 1217, 361, 838, 838, 838, 838, 838, 838, 839, 839, - 840, 841, 841, 841, 841, 841, 360, 359, 346, 346, - 233, 842, 842, 1325, 1325, 1325, 1325, 1325, 1325, 341, - 842, 842, 842, 842, 842, 842, 843, 843, 843, 843, - 843, 843, 843, 843, 334, 341, 843, 843, 843, 843, - 843, 843, 336, 329, 741, 479, 230, 844, 844, 844, - 844, 844, 844, 844, 844, 748, 239, 145, 308, 217, - 845, 845, 1355, 1355, 1355, 1355, 1355, 1355, 210, 845, - 845, 845, 845, 845, 845, 846, 846, 847, 848, 848, - 848, 848, 848, 299, 298, 297, 296, 239, 849, 849, - - 1368, 1368, 1368, 1368, 1368, 1368, 233, 849, 849, 849, - 849, 849, 849, 850, 850, 850, 850, 850, 850, 850, - 850, 479, 233, 850, 850, 850, 850, 850, 850, 233, - 277, 748, 663, 230, 851, 851, 851, 851, 851, 851, - 851, 851, 755, 261, 217, 136, 210, 852, 852, 1369, - 1369, 1369, 1369, 1369, 1369, 210, 852, 852, 852, 852, - 852, 852, 853, 853, 854, 855, 855, 855, 855, 855, - 210, 254, 253, 252, 251, 856, 856, 250, 249, 248, - 247, 246, 233, 233, 856, 856, 856, 856, 856, 856, - 857, 857, 857, 857, 857, 857, 857, 857, 663, 231, - - 857, 857, 857, 857, 857, 857, 230, 145, 755, 858, - 858, 858, 858, 858, 858, 858, 858, 859, 859, 859, - 859, 859, 860, 861, 861, 861, 861, 861, 861, 861, - 861, 861, 861, 862, 217, 864, 864, 864, 864, 864, - 865, 866, 866, 867, 136, 869, 869, 869, 869, 869, - 870, 871, 871, 873, 128, 874, 874, 874, 874, 874, - 874, 874, 874, 875, 210, 210, 209, 208, 876, 876, - 207, 206, 205, 204, 203, 202, 201, 876, 876, 876, - 876, 876, 876, 877, 877, 877, 877, 877, 878, 879, - 879, 97, 98, 881, 881, 881, 881, 881, 882, 883, - - 883, 884, 200, 886, 886, 886, 886, 886, 887, 888, - 888, 889, 198, 891, 891, 891, 891, 891, 892, 893, - 893, 895, 98, 896, 896, 896, 896, 896, 896, 896, - 896, 897, 53, 145, 184, 87, 898, 898, 176, 136, - 53, 128, 128, 128, 168, 898, 898, 898, 898, 898, - 898, 899, 899, 899, 899, 899, 900, 901, 901, 97, - 167, 898, 898, 898, 898, 898, 898, 898, 898, 902, - 166, 904, 904, 904, 904, 904, 905, 906, 906, 907, - 907, 908, 909, 909, 909, 909, 909, 802, 165, 910, - 910, 910, 910, 910, 910, 910, 910, 804, 164, 163, - - 162, 161, 911, 911, 160, 159, 158, 157, 156, 155, - 154, 911, 911, 911, 911, 911, 911, 914, 914, 914, - 914, 914, 914, 914, 914, 802, 153, 914, 914, 914, - 914, 914, 914, 142, 141, 804, 334, 136, 929, 929, - 929, 929, 929, 929, 929, 929, 930, 53, 128, 128, - 126, 931, 931, 125, 124, 123, 122, 121, 120, 119, - 931, 931, 931, 931, 931, 931, 932, 932, 932, 932, - 932, 933, 934, 934, 479, 116, 936, 936, 936, 936, - 936, 936, 936, 936, 937, 113, 112, 111, 110, 938, - 938, 109, 108, 107, 106, 105, 104, 53, 938, 938, - - 938, 938, 938, 938, 939, 939, 939, 939, 939, 940, - 941, 941, 663, 94, 943, 943, 943, 943, 943, 943, - 943, 943, 944, 45, 85, 84, 79, 945, 945, 76, - 73, 72, 71, 70, 69, 65, 945, 945, 945, 945, - 945, 945, 946, 946, 946, 946, 946, 947, 948, 948, - 873, 64, 950, 950, 950, 950, 950, 950, 950, 950, - 951, 61, 60, 59, 58, 952, 952, 50, 48, 47, - 46, 45, 1370, 1370, 952, 952, 952, 952, 952, 952, - 953, 953, 953, 953, 953, 954, 955, 955, 861, 861, - 861, 861, 861, 861, 861, 861, 956, 956, 956, 956, - - 956, 956, 956, 956, 957, 957, 958, 959, 959, 959, - 959, 959, 862, 1370, 960, 960, 960, 960, 960, 960, - 961, 961, 962, 963, 963, 963, 963, 963, 867, 1370, - 964, 964, 964, 964, 964, 964, 965, 965, 966, 967, - 967, 967, 967, 967, 873, 1370, 968, 968, 968, 968, - 968, 968, 968, 968, 875, 1370, 1370, 1370, 1370, 969, - 969, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 969, 969, - 969, 969, 969, 969, 970, 970, 971, 972, 972, 972, - 972, 972, 1370, 1370, 1370, 1370, 1370, 973, 973, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 973, 973, 973, 973, - - 973, 973, 974, 974, 974, 974, 974, 974, 974, 974, - 873, 1370, 974, 974, 974, 974, 974, 974, 1370, 1370, - 875, 97, 98, 975, 975, 975, 975, 975, 975, 976, - 976, 977, 978, 978, 978, 978, 978, 884, 1370, 979, - 979, 979, 979, 979, 979, 980, 980, 981, 982, 982, - 982, 982, 982, 889, 1370, 983, 983, 983, 983, 983, - 983, 142, 1370, 984, 984, 985, 986, 986, 986, 986, - 986, 895, 98, 987, 987, 987, 987, 987, 987, 987, - 987, 897, 1370, 1370, 1370, 1370, 988, 988, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 988, 988, 988, 988, 988, - - 988, 97, 1370, 988, 988, 988, 988, 988, 988, 988, - 988, 990, 990, 990, 990, 990, 990, 990, 990, 895, - 1370, 990, 990, 990, 990, 990, 990, 991, 991, 992, - 993, 993, 993, 993, 993, 902, 1370, 994, 994, 994, - 994, 994, 994, 995, 1370, 997, 997, 997, 997, 997, - 998, 999, 999, 1011, 1011, 1012, 1013, 1013, 1013, 1013, - 1013, 1370, 1370, 1370, 1370, 1370, 1014, 1014, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1014, 1014, 1014, 1014, 1014, - 1014, 334, 1370, 1015, 1015, 1015, 1015, 1015, 1015, 1015, - 1015, 930, 1370, 1370, 1370, 1370, 1016, 1016, 1370, 1370, - - 1370, 1370, 1370, 1370, 1370, 1016, 1016, 1016, 1016, 1016, - 1016, 1017, 1017, 1018, 1019, 1019, 1019, 1019, 1019, 1370, - 1370, 1370, 1370, 1370, 1020, 1020, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1020, 1020, 1020, 1020, 1020, 1020, 1021, - 1021, 1021, 1021, 1021, 1021, 1021, 1021, 334, 1370, 1021, - 1021, 1021, 1021, 1021, 1021, 1370, 1370, 930, 479, 1370, - 1022, 1022, 1022, 1022, 1022, 1022, 1022, 1022, 937, 1370, - 1370, 1370, 1370, 1023, 1023, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1023, 1023, 1023, 1023, 1023, 1023, 1024, 1024, - 1025, 1026, 1026, 1026, 1026, 1026, 1370, 1370, 1370, 1370, - - 1370, 1027, 1027, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1027, 1027, 1027, 1027, 1027, 1027, 1028, 1028, 1028, 1028, - 1028, 1028, 1028, 1028, 479, 1370, 1028, 1028, 1028, 1028, - 1028, 1028, 1370, 1370, 937, 663, 1370, 1029, 1029, 1029, - 1029, 1029, 1029, 1029, 1029, 944, 1370, 1370, 1370, 1370, - 1030, 1030, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1030, - 1030, 1030, 1030, 1030, 1030, 1031, 1031, 1032, 1033, 1033, - 1033, 1033, 1033, 1370, 1370, 1370, 1370, 1370, 1034, 1034, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1034, 1034, 1034, - 1034, 1034, 1034, 1035, 1035, 1035, 1035, 1035, 1035, 1035, - - 1035, 663, 1370, 1035, 1035, 1035, 1035, 1035, 1035, 1370, - 1370, 944, 873, 1370, 1036, 1036, 1036, 1036, 1036, 1036, - 1036, 1036, 951, 1370, 1370, 1370, 1370, 1037, 1037, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1037, 1037, 1037, 1037, - 1037, 1037, 1038, 1038, 1039, 1040, 1040, 1040, 1040, 1040, - 1370, 1370, 1370, 1370, 1370, 1041, 1041, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1041, 1041, 1041, 1041, 1041, 1041, - 1042, 1042, 1042, 1042, 1042, 1042, 1042, 1042, 873, 1370, - 1042, 1042, 1042, 1042, 1042, 1042, 1370, 1370, 951, 1043, - 1043, 1043, 1043, 1043, 1043, 1043, 1043, 1044, 1044, 1044, - - 1044, 1044, 1045, 1046, 1046, 1046, 1046, 1046, 1046, 1046, - 1046, 1046, 1046, 1047, 1370, 1049, 1049, 1049, 1049, 1049, - 1050, 1051, 1051, 1052, 1370, 1054, 1054, 1054, 1054, 1054, - 1055, 1056, 1056, 1058, 1370, 1059, 1059, 1059, 1059, 1059, - 1059, 1059, 1059, 1060, 1370, 1370, 1370, 1370, 1061, 1061, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1061, 1061, 1061, - 1061, 1061, 1061, 1062, 1062, 1062, 1062, 1062, 1063, 1064, - 1064, 97, 98, 1066, 1066, 1066, 1066, 1066, 1067, 1068, - 1068, 1069, 1370, 1071, 1071, 1071, 1071, 1071, 1072, 1073, - 1073, 1074, 1370, 1076, 1076, 1076, 1076, 1076, 1077, 1078, - - 1078, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1082, - 1082, 1082, 1082, 1082, 1083, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 1084, 1084, 1084, 1085, 1085, 1086, 1087, 1087, - 1087, 1087, 1087, 995, 1370, 1088, 1088, 1088, 1088, 1088, - 1088, 1097, 1097, 1098, 1099, 1099, 1099, 1099, 1099, 1100, - 1370, 1370, 1370, 1370, 1101, 1101, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1101, 1101, 1101, 1101, 1101, 1101, 334, - 1370, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1102, 1103, - 1370, 1370, 1370, 1370, 1104, 1104, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1104, 1104, 1104, 1104, 1104, 1104, 1105, - - 1105, 1105, 1105, 1105, 1106, 1107, 1107, 479, 1370, 1109, - 1109, 1109, 1109, 1109, 1109, 1109, 1109, 1110, 1370, 1370, - 1370, 1370, 1111, 1111, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1111, 1111, 1111, 1111, 1111, 1111, 1112, 1112, 1112, - 1112, 1112, 1113, 1114, 1114, 663, 1370, 1116, 1116, 1116, - 1116, 1116, 1116, 1116, 1116, 1117, 1370, 1370, 1370, 1370, - 1118, 1118, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1118, - 1118, 1118, 1118, 1118, 1118, 1119, 1119, 1119, 1119, 1119, - 1120, 1121, 1121, 873, 1370, 1123, 1123, 1123, 1123, 1123, - 1123, 1123, 1123, 1124, 1370, 1370, 1370, 1370, 1125, 1125, - - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1125, 1125, 1125, - 1125, 1125, 1125, 1126, 1126, 1126, 1126, 1126, 1127, 1128, - 1128, 1058, 1370, 1130, 1130, 1130, 1130, 1130, 1130, 1130, - 1130, 1131, 1370, 1370, 1370, 1370, 1132, 1132, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1132, 1132, 1132, 1132, 1132, - 1132, 1133, 1133, 1133, 1133, 1133, 1134, 1135, 1135, 1046, - 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1136, 1136, 1136, - 1136, 1136, 1136, 1136, 1136, 1137, 1137, 1138, 1139, 1139, - 1139, 1139, 1139, 1047, 1370, 1140, 1140, 1140, 1140, 1140, - 1140, 1141, 1141, 1142, 1143, 1143, 1143, 1143, 1143, 1052, - - 1370, 1144, 1144, 1144, 1144, 1144, 1144, 1145, 1145, 1146, - 1147, 1147, 1147, 1147, 1147, 1058, 1370, 1148, 1148, 1148, - 1148, 1148, 1148, 1148, 1148, 1060, 1370, 1370, 1370, 1370, - 1149, 1149, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1149, - 1149, 1149, 1149, 1149, 1149, 1150, 1150, 1151, 1152, 1152, - 1152, 1152, 1152, 1370, 1370, 1370, 1370, 1370, 1153, 1153, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1153, 1153, 1153, - 1153, 1153, 1153, 1154, 1154, 1154, 1154, 1154, 1154, 1154, - 1154, 1058, 1370, 1154, 1154, 1154, 1154, 1154, 1154, 1370, - 1370, 1060, 97, 98, 1155, 1155, 1155, 1155, 1155, 1155, - - 1156, 1156, 1157, 1158, 1158, 1158, 1158, 1158, 1069, 1370, - 1159, 1159, 1159, 1159, 1159, 1159, 1160, 1160, 1161, 1162, - 1162, 1162, 1162, 1162, 1074, 1370, 1163, 1163, 1163, 1163, - 1163, 1163, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - 1165, 1165, 1165, 1165, 1165, 1165, 1165, 1165, 1166, 1370, - 1168, 1168, 1168, 1168, 1168, 1169, 1170, 1170, 1172, 1370, - 1173, 1173, 1173, 1173, 1173, 1173, 1173, 1173, 1174, 1370, - 1370, 1370, 1370, 1175, 1175, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1175, 1175, 1175, 1175, 1175, 1175, 1176, 1176, - 1176, 1176, 1176, 1177, 1178, 1178, 334, 1370, 1180, 1180, - - 1180, 1180, 1180, 1180, 1180, 1180, 1103, 1370, 1370, 1370, - 1370, 1181, 1181, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1181, 1181, 1181, 1181, 1181, 1181, 1183, 1183, 1183, 1183, - 1183, 1183, 1183, 1183, 334, 1370, 1183, 1183, 1183, 1183, - 1183, 1183, 1370, 1370, 1103, 479, 1370, 1184, 1184, 1184, - 1184, 1184, 1184, 1184, 1184, 1110, 1370, 1370, 1370, 1370, - 1185, 1185, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1185, - 1185, 1185, 1185, 1185, 1185, 1187, 1187, 1187, 1187, 1187, - 1187, 1187, 1187, 479, 1370, 1187, 1187, 1187, 1187, 1187, - 1187, 1370, 1370, 1110, 663, 1370, 1188, 1188, 1188, 1188, - - 1188, 1188, 1188, 1188, 1117, 1370, 1370, 1370, 1370, 1189, - 1189, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1189, 1189, - 1189, 1189, 1189, 1189, 1191, 1191, 1191, 1191, 1191, 1191, - 1191, 1191, 663, 1370, 1191, 1191, 1191, 1191, 1191, 1191, - 1370, 1370, 1117, 873, 1370, 1192, 1192, 1192, 1192, 1192, - 1192, 1192, 1192, 1124, 1370, 1370, 1370, 1370, 1193, 1193, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1193, 1193, 1193, - 1193, 1193, 1193, 1195, 1195, 1195, 1195, 1195, 1195, 1195, - 1195, 873, 1370, 1195, 1195, 1195, 1195, 1195, 1195, 1370, - 1370, 1124, 1058, 1370, 1196, 1196, 1196, 1196, 1196, 1196, - - 1196, 1196, 1131, 1370, 1370, 1370, 1370, 1197, 1197, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1197, 1197, 1197, 1197, - 1197, 1197, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, - 1058, 1370, 1199, 1199, 1199, 1199, 1199, 1199, 1370, 1370, - 1131, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1201, - 1201, 1201, 1201, 1201, 1202, 1203, 1203, 1203, 1203, 1203, - 1203, 1203, 1203, 1203, 1203, 1204, 1370, 1206, 1206, 1206, - 1206, 1206, 1207, 1208, 1208, 1209, 1370, 1211, 1211, 1211, - 1211, 1211, 1212, 1213, 1213, 1215, 1370, 1216, 1216, 1216, - 1216, 1216, 1216, 1216, 1216, 1217, 1370, 1370, 1370, 1370, - - 1218, 1218, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1218, - 1218, 1218, 1218, 1218, 1218, 1219, 1219, 1219, 1219, 1219, - 1220, 1221, 1221, 97, 98, 1223, 1223, 1223, 1223, 1223, - 1224, 1225, 1225, 1226, 1370, 1228, 1228, 1228, 1228, 1228, - 1229, 1230, 1230, 1232, 1232, 1233, 1234, 1234, 1234, 1234, - 1234, 1166, 1370, 1235, 1235, 1235, 1235, 1235, 1235, 1236, - 1236, 1237, 1238, 1238, 1238, 1238, 1238, 1172, 1370, 1239, - 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1174, 1370, 1370, - 1370, 1370, 1240, 1240, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1240, 1240, 1240, 1240, 1240, 1240, 1243, 1243, 1243, - - 1243, 1243, 1243, 1243, 1243, 1172, 1370, 1243, 1243, 1243, - 1243, 1243, 1243, 1370, 1370, 1174, 1203, 1203, 1203, 1203, - 1203, 1203, 1203, 1203, 1255, 1255, 1255, 1255, 1255, 1255, - 1255, 1255, 1256, 1256, 1257, 1258, 1258, 1258, 1258, 1258, - 1204, 1370, 1259, 1259, 1259, 1259, 1259, 1259, 1260, 1260, - 1261, 1262, 1262, 1262, 1262, 1262, 1209, 1370, 1263, 1263, - 1263, 1263, 1263, 1263, 1264, 1264, 1265, 1266, 1266, 1266, - 1266, 1266, 1215, 1370, 1267, 1267, 1267, 1267, 1267, 1267, - 1267, 1267, 1217, 1370, 1370, 1370, 1370, 1268, 1268, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1268, 1268, 1268, 1268, - - 1268, 1268, 1270, 1270, 1270, 1270, 1270, 1270, 1270, 1270, - 1215, 1370, 1270, 1270, 1270, 1270, 1270, 1270, 1370, 1370, - 1217, 97, 98, 1271, 1271, 1271, 1271, 1271, 1271, 1272, - 1272, 1273, 1274, 1274, 1274, 1274, 1274, 1226, 1370, 1275, - 1275, 1275, 1275, 1275, 1275, 97, 98, 1277, 1277, 1277, - 1277, 1277, 1278, 1279, 1279, 1280, 1370, 1282, 1282, 1282, - 1282, 1282, 1283, 1284, 1284, 1293, 1293, 1293, 1293, 1293, - 1293, 1293, 1293, 1294, 1294, 1294, 1294, 1294, 1295, 1296, - 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1297, - 1370, 1299, 1299, 1299, 1299, 1299, 1300, 1301, 1301, 1302, - - 1370, 1304, 1304, 1304, 1304, 1304, 1305, 1306, 1306, 97, - 98, 1310, 1310, 1310, 1310, 1310, 1311, 1312, 1312, 97, - 98, 1313, 1313, 1313, 1313, 1313, 1313, 1314, 1314, 1315, - 1316, 1316, 1316, 1316, 1316, 1280, 1370, 1317, 1317, 1317, - 1317, 1317, 1317, 1296, 1296, 1296, 1296, 1296, 1296, 1296, - 1296, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1326, - 1326, 1327, 1328, 1328, 1328, 1328, 1328, 1297, 1370, 1329, - 1329, 1329, 1329, 1329, 1329, 1330, 1330, 1331, 1332, 1332, - 1332, 1332, 1332, 1302, 1370, 1333, 1333, 1333, 1333, 1333, - 1333, 97, 98, 1335, 1335, 1335, 1335, 1335, 1335, 1336, - - 1370, 1338, 1338, 1338, 1338, 1338, 1339, 1340, 1340, 1341, - 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1342, 1342, 1342, - 1342, 1342, 1343, 1344, 1344, 1344, 1344, 1344, 1344, 1344, - 1344, 1344, 1344, 1345, 1370, 1347, 1347, 1347, 1347, 1347, - 1348, 1349, 1349, 1351, 1351, 1352, 1353, 1353, 1353, 1353, - 1353, 1336, 1370, 1354, 1354, 1354, 1354, 1354, 1354, 1344, - 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1355, 1355, 1355, - 1355, 1355, 1355, 1355, 1355, 1356, 1356, 1357, 1358, 1358, - 1358, 1358, 1358, 1345, 1370, 1359, 1359, 1359, 1359, 1359, - 1359, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1361, - - 1361, 1361, 1361, 1361, 1362, 1363, 1363, 1363, 1363, 1363, - 1363, 1363, 1363, 1363, 1363, 1364, 1364, 1364, 1364, 1364, - 1364, 1364, 1364, 1365, 1365, 1365, 1365, 1365, 1366, 1367, - 1367, 1367, 1367, 1367, 1367, 1367, 1367, 1367, 1367, 1363, - 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1368, 1368, 1368, - 1368, 1368, 1368, 1368, 1368, 1367, 1367, 1367, 1367, 1367, - 1367, 1367, 1367, 1369, 1369, 1369, 1369, 1369, 1369, 1369, - 1369, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 49, 1370, 49, 86, 1370, 86, 86, 86, 86, 86, - 86, 86, 93, 93, 1370, 93, 92, 92, 1370, 92, - - 129, 1370, 129, 132, 1370, 132, 134, 134, 1370, 134, - 135, 135, 1370, 135, 172, 1370, 172, 173, 1370, 173, - 173, 174, 174, 1370, 174, 175, 175, 1370, 175, 183, - 183, 1370, 183, 211, 1370, 211, 214, 1370, 214, 215, - 215, 1370, 215, 216, 216, 1370, 216, 229, 229, 1370, - 229, 234, 1370, 234, 237, 1370, 237, 238, 238, 238, - 238, 1370, 238, 258, 1370, 258, 259, 259, 1370, 259, - 260, 260, 1370, 260, 268, 268, 268, 268, 1370, 268, - 275, 275, 1370, 275, 276, 276, 1370, 276, 285, 1370, - 285, 302, 302, 302, 305, 305, 305, 306, 306, 1370, - - 306, 307, 307, 1370, 307, 327, 327, 1370, 327, 328, - 328, 1370, 328, 337, 337, 1370, 337, 342, 1370, 342, - 345, 1370, 345, 347, 1370, 347, 350, 1370, 350, 351, - 351, 351, 351, 1370, 351, 62, 1370, 1370, 62, 1370, - 1370, 62, 366, 366, 366, 367, 367, 1370, 367, 368, - 368, 1370, 368, 376, 376, 376, 376, 1370, 376, 383, - 383, 383, 383, 1370, 383, 390, 390, 1370, 390, 391, - 391, 1370, 391, 395, 395, 1370, 395, 403, 403, 1370, - 403, 345, 1370, 345, 412, 1370, 412, 350, 1370, 350, - 416, 1370, 416, 62, 1370, 1370, 62, 1370, 1370, 62, - - 431, 431, 1370, 431, 432, 432, 1370, 432, 459, 459, - 1370, 459, 460, 460, 1370, 460, 467, 467, 1370, 467, - 474, 1370, 474, 477, 1370, 477, 478, 1370, 478, 478, - 1370, 478, 482, 482, 1370, 482, 486, 486, 486, 489, - 489, 489, 491, 1370, 491, 494, 1370, 494, 496, 1370, - 496, 499, 1370, 499, 500, 500, 500, 500, 1370, 500, - 62, 1370, 1370, 62, 1370, 1370, 62, 509, 1370, 509, - 512, 1370, 512, 513, 513, 1370, 513, 514, 514, 1370, - 514, 522, 522, 522, 522, 1370, 522, 529, 529, 529, - 529, 1370, 529, 536, 536, 536, 536, 1370, 536, 543, - - 543, 1370, 543, 544, 544, 1370, 544, 548, 548, 1370, - 548, 552, 1370, 552, 552, 1370, 552, 555, 555, 1370, - 555, 477, 1370, 477, 562, 1370, 562, 567, 567, 1370, - 567, 489, 489, 489, 573, 573, 573, 494, 1370, 494, - 577, 1370, 577, 499, 1370, 499, 581, 1370, 581, 512, - 1370, 512, 595, 1370, 595, 596, 596, 1370, 596, 597, - 597, 1370, 597, 631, 631, 1370, 631, 632, 632, 1370, - 632, 639, 639, 1370, 639, 646, 646, 1370, 646, 653, - 1370, 653, 656, 1370, 656, 658, 1370, 658, 661, 1370, - 661, 662, 1370, 662, 662, 1370, 662, 666, 666, 1370, - - 666, 670, 670, 670, 673, 673, 673, 675, 1370, 675, - 678, 1370, 678, 680, 1370, 680, 683, 1370, 683, 684, - 684, 684, 684, 1370, 684, 693, 1370, 693, 696, 1370, - 696, 697, 697, 1370, 697, 709, 709, 709, 709, 1370, - 709, 716, 716, 716, 716, 1370, 716, 723, 723, 723, - 723, 1370, 723, 730, 730, 730, 730, 1370, 730, 737, - 737, 1370, 737, 738, 738, 1370, 738, 742, 742, 1370, - 742, 746, 1370, 746, 746, 1370, 746, 749, 749, 1370, - 749, 753, 1370, 753, 753, 1370, 753, 756, 756, 1370, - 756, 656, 1370, 656, 763, 1370, 763, 661, 1370, 661, - - 767, 1370, 767, 772, 772, 1370, 772, 673, 673, 673, - 778, 778, 778, 678, 1370, 678, 782, 1370, 782, 683, - 1370, 683, 786, 1370, 786, 696, 1370, 696, 800, 1370, - 800, 801, 801, 1370, 801, 809, 809, 809, 1370, 1370, - 809, 805, 805, 1370, 805, 812, 1370, 1370, 812, 816, - 1370, 1370, 816, 820, 1370, 1370, 820, 824, 1370, 1370, - 824, 828, 1370, 1370, 828, 830, 830, 1370, 830, 831, - 831, 1370, 831, 838, 838, 1370, 838, 845, 845, 1370, - 845, 852, 852, 1370, 852, 863, 1370, 863, 866, 1370, - 866, 868, 1370, 868, 871, 1370, 871, 872, 1370, 872, - - 872, 1370, 872, 876, 876, 1370, 876, 880, 880, 880, - 883, 883, 883, 885, 1370, 885, 888, 1370, 888, 890, - 1370, 890, 893, 1370, 893, 894, 894, 894, 894, 1370, - 894, 903, 1370, 903, 906, 1370, 906, 912, 912, 1370, - 912, 911, 911, 1370, 911, 915, 915, 915, 1370, 1370, - 915, 916, 916, 916, 916, 1370, 916, 917, 917, 917, - 1370, 1370, 917, 918, 918, 918, 918, 1370, 918, 919, - 919, 919, 1370, 1370, 919, 920, 920, 920, 920, 1370, - 920, 921, 921, 921, 1370, 1370, 921, 922, 922, 922, - 922, 1370, 922, 923, 923, 923, 1370, 1370, 923, 924, - - 924, 924, 924, 1370, 924, 925, 925, 925, 1370, 1370, - 925, 926, 926, 1370, 926, 927, 927, 1370, 927, 931, - 931, 1370, 931, 935, 1370, 935, 935, 1370, 935, 938, - 938, 1370, 938, 942, 1370, 942, 942, 1370, 942, 945, - 945, 1370, 945, 949, 1370, 949, 949, 1370, 949, 952, - 952, 1370, 952, 866, 1370, 866, 960, 1370, 960, 871, - 1370, 871, 964, 1370, 964, 969, 969, 1370, 969, 883, - 883, 883, 975, 975, 975, 888, 1370, 888, 979, 1370, - 979, 893, 1370, 893, 983, 1370, 983, 989, 1370, 1370, - 989, 906, 1370, 906, 994, 1370, 994, 996, 1370, 996, - - 999, 1370, 999, 1000, 1370, 1000, 1000, 1370, 1000, 1001, - 1001, 1001, 1370, 1370, 1001, 1002, 1002, 1002, 1370, 1370, - 1002, 1003, 1003, 1003, 1370, 1370, 1003, 1004, 1004, 1004, - 1370, 1370, 1004, 1005, 1005, 1005, 1370, 1370, 1005, 1006, - 1006, 1006, 1370, 1370, 1006, 1007, 1007, 1007, 1370, 1370, - 1007, 1008, 1008, 1370, 1008, 1009, 1009, 1370, 1009, 1016, - 1016, 1370, 1016, 1023, 1023, 1370, 1023, 1030, 1030, 1370, - 1030, 1037, 1037, 1370, 1037, 1048, 1370, 1048, 1051, 1370, - 1051, 1053, 1370, 1053, 1056, 1370, 1056, 1057, 1370, 1057, - 1057, 1370, 1057, 1061, 1061, 1370, 1061, 1065, 1065, 1065, - - 1068, 1068, 1068, 1070, 1370, 1070, 1073, 1370, 1073, 1075, - 1370, 1075, 1078, 1370, 1078, 1079, 1079, 1079, 1079, 1370, - 1079, 1080, 1080, 1080, 1370, 1370, 1080, 999, 1370, 999, - 1088, 1370, 1088, 1089, 1089, 1089, 1370, 1370, 1089, 1090, - 1090, 1090, 1370, 1370, 1090, 1091, 1091, 1091, 1370, 1370, - 1091, 1092, 1092, 1092, 1370, 1370, 1092, 1093, 1093, 1093, - 1370, 1370, 1093, 1094, 1094, 1094, 1370, 1370, 1094, 1095, - 1095, 1095, 1370, 1370, 1095, 1096, 1096, 1370, 1096, 1104, - 1104, 1370, 1104, 1108, 1370, 1108, 1108, 1370, 1108, 1111, - 1111, 1370, 1111, 1115, 1370, 1115, 1115, 1370, 1115, 1118, - - 1118, 1370, 1118, 1122, 1370, 1122, 1122, 1370, 1122, 1125, - 1125, 1370, 1125, 1129, 1370, 1129, 1129, 1370, 1129, 1132, - 1132, 1370, 1132, 1051, 1370, 1051, 1140, 1370, 1140, 1056, - 1370, 1056, 1144, 1370, 1144, 1149, 1149, 1370, 1149, 1068, - 1068, 1068, 1155, 1155, 1155, 1073, 1370, 1073, 1159, 1370, - 1159, 1078, 1370, 1078, 1163, 1370, 1163, 1164, 1164, 1164, - 1370, 1370, 1164, 1167, 1370, 1167, 1170, 1370, 1170, 913, - 913, 913, 1370, 1370, 913, 1171, 1171, 1370, 1171, 1179, - 1370, 1370, 1179, 1175, 1175, 1370, 1175, 1182, 1370, 1370, - 1182, 1181, 1181, 1370, 1181, 1186, 1370, 1370, 1186, 1185, - - 1185, 1370, 1185, 1190, 1370, 1370, 1190, 1189, 1189, 1370, - 1189, 1194, 1370, 1370, 1194, 1193, 1193, 1370, 1193, 1198, - 1370, 1370, 1198, 1197, 1197, 1370, 1197, 1205, 1370, 1205, - 1208, 1370, 1208, 1210, 1370, 1210, 1213, 1370, 1213, 1214, - 1370, 1214, 1214, 1370, 1214, 1218, 1218, 1370, 1218, 1222, - 1222, 1222, 1225, 1225, 1225, 1227, 1370, 1227, 1230, 1370, - 1230, 1231, 1231, 1231, 1370, 1370, 1231, 1170, 1370, 1170, - 1235, 1370, 1235, 1241, 1241, 1370, 1241, 1240, 1240, 1370, - 1240, 1244, 1370, 1370, 1244, 1245, 1370, 1245, 1245, 1370, - 1245, 1246, 1370, 1370, 1246, 1247, 1370, 1247, 1247, 1370, - - 1247, 1248, 1370, 1370, 1248, 1249, 1370, 1249, 1249, 1370, - 1249, 1250, 1370, 1370, 1250, 1251, 1370, 1251, 1251, 1370, - 1251, 1252, 1370, 1370, 1252, 1253, 1370, 1253, 1253, 1370, - 1253, 1254, 1370, 1370, 1254, 1259, 1370, 1259, 1263, 1370, - 1263, 1269, 1370, 1370, 1269, 1268, 1268, 1370, 1268, 1271, - 1271, 1271, 1275, 1370, 1275, 1276, 1276, 1276, 1279, 1279, - 1279, 1281, 1370, 1281, 1284, 1370, 1284, 1285, 1370, 1285, - 1285, 1370, 1285, 1286, 1370, 1370, 1286, 1287, 1370, 1370, - 1287, 1288, 1370, 1370, 1288, 1289, 1370, 1370, 1289, 1290, - 1370, 1370, 1290, 1291, 1370, 1370, 1291, 1292, 1370, 1370, - - 1292, 1298, 1370, 1298, 1301, 1370, 1301, 1303, 1370, 1303, - 1306, 1370, 1306, 1307, 1370, 1307, 1307, 1370, 1307, 1308, - 1370, 1370, 1308, 1309, 1309, 1309, 1312, 1312, 1312, 1313, - 1313, 1313, 1317, 1370, 1317, 1318, 1370, 1370, 1318, 1319, - 1370, 1370, 1319, 1320, 1370, 1370, 1320, 1321, 1370, 1370, - 1321, 1322, 1370, 1370, 1322, 1323, 1370, 1370, 1323, 1324, - 1370, 1370, 1324, 1329, 1370, 1329, 1333, 1370, 1333, 1334, - 1370, 1370, 1334, 1335, 1335, 1335, 1337, 1370, 1337, 1340, - 1370, 1340, 1242, 1370, 1370, 1242, 1346, 1370, 1346, 1349, - 1370, 1349, 1350, 1370, 1370, 1350, 1354, 1370, 1354, 1359, - - 1370, 1359, 5, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370 - } ; - -static yyconst flex_int16_t yy_chk[8762] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, - 3, 4, 17, 39, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 154, 39, 29, 29, 17, 17, 19, - 19, 19, 19, 19, 19, 29, 17, 17, 17, 17, - 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, - - 25, 154, 40, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 37, 40, 37, 1359, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 35, 56, 56, 1354, 26, - 26, 76, 1349, 74, 35, 255, 255, 76, 26, 26, - 26, 26, 26, 26, 49, 49, 49, 49, 49, 49, - 49, 49, 51, 74, 51, 51, 51, 51, 51, 51, - 51, 51, 52, 133, 52, 52, 52, 52, 52, 52, - - 52, 52, 52, 133, 1347, 173, 1346, 52, 52, 101, - 101, 101, 101, 101, 101, 173, 52, 52, 52, 52, - 52, 52, 55, 55, 55, 55, 55, 55, 55, 55, - 57, 57, 57, 57, 57, 57, 57, 57, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 257, 257, - 1340, 191, 191, 58, 58, 139, 139, 139, 139, 139, - 139, 191, 58, 58, 58, 58, 58, 58, 63, 63, - 63, 63, 63, 63, 63, 63, 302, 302, 303, 303, - 1338, 63, 63, 187, 187, 187, 187, 187, 187, 187, - 63, 63, 63, 63, 63, 63, 87, 87, 87, 87, - - 87, 87, 87, 87, 89, 340, 89, 89, 89, 89, - 89, 89, 89, 89, 91, 340, 91, 91, 91, 91, - 91, 91, 91, 91, 91, 192, 192, 197, 197, 91, - 91, 305, 305, 366, 366, 192, 1337, 197, 91, 91, - 91, 91, 91, 91, 94, 94, 94, 94, 94, 94, - 94, 94, 94, 94, 364, 364, 364, 222, 222, 94, - 94, 195, 195, 195, 195, 195, 195, 222, 94, 94, - 94, 94, 94, 94, 98, 98, 98, 98, 98, 98, - 98, 98, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 409, 409, 223, 223, 99, 99, 220, - - 220, 220, 220, 220, 220, 223, 99, 99, 99, 99, - 99, 99, 100, 100, 100, 100, 100, 100, 100, 100, - 102, 1333, 102, 102, 102, 102, 102, 102, 102, 102, - 103, 103, 103, 103, 103, 103, 103, 103, 411, 411, - 1332, 228, 228, 103, 103, 226, 226, 226, 226, 226, - 226, 228, 103, 103, 103, 103, 103, 103, 127, 127, - 127, 127, 127, 127, 127, 127, 128, 128, 128, 128, - 128, 128, 128, 128, 131, 1330, 131, 131, 131, 131, - 131, 131, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 238, 238, 268, 268, 137, 137, 486, - - 486, 487, 487, 238, 1329, 268, 137, 137, 137, 137, - 137, 137, 138, 138, 138, 138, 138, 138, 138, 138, - 140, 1317, 140, 140, 140, 140, 140, 140, 140, 140, - 143, 143, 143, 143, 143, 143, 143, 143, 144, 144, - 144, 144, 144, 144, 144, 144, 145, 1316, 145, 145, - 145, 145, 145, 145, 145, 145, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 489, 489, 289, - 289, 146, 146, 280, 280, 280, 280, 280, 280, 289, - 146, 146, 146, 146, 146, 146, 147, 147, 147, 147, - 147, 147, 147, 147, 290, 290, 295, 295, 1314, 147, - - 147, 573, 573, 1307, 290, 398, 295, 1306, 147, 147, - 147, 147, 147, 147, 148, 398, 148, 148, 148, 148, - 148, 148, 148, 148, 149, 149, 149, 149, 149, 149, - 149, 149, 150, 1304, 150, 150, 150, 150, 150, 150, - 170, 1303, 170, 170, 170, 170, 170, 170, 170, 170, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 574, 574, 1301, 313, 313, 176, 176, 293, 293, 293, - 293, 293, 293, 313, 176, 176, 176, 176, 176, 176, - 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, - 177, 576, 576, 314, 314, 177, 177, 311, 311, 311, - - 311, 311, 311, 314, 177, 177, 177, 177, 177, 177, - 178, 178, 178, 178, 178, 178, 178, 178, 670, 670, - 1299, 319, 319, 178, 178, 317, 317, 317, 317, 317, - 317, 319, 178, 178, 178, 178, 178, 178, 179, 1298, - 179, 179, 179, 179, 179, 179, 179, 179, 180, 180, - 180, 180, 180, 180, 180, 180, 181, 1285, 181, 181, - 181, 181, 181, 181, 186, 186, 186, 186, 186, 186, - 186, 186, 189, 1284, 189, 189, 189, 189, 189, 189, - 189, 189, 193, 193, 193, 193, 193, 193, 193, 193, - 193, 193, 193, 320, 320, 321, 321, 193, 193, 671, - - 671, 673, 673, 320, 1282, 321, 193, 193, 193, 193, - 193, 193, 194, 194, 194, 194, 194, 194, 194, 194, - 196, 1281, 196, 196, 196, 196, 196, 196, 196, 196, - 210, 210, 210, 210, 210, 210, 210, 210, 213, 1275, - 213, 213, 213, 213, 213, 213, 218, 218, 218, 218, - 218, 218, 218, 218, 218, 218, 218, 701, 701, 326, - 326, 218, 218, 324, 324, 324, 324, 324, 324, 326, - 218, 218, 218, 218, 218, 218, 219, 219, 219, 219, - 219, 219, 219, 219, 221, 1266, 221, 221, 221, 221, - 221, 221, 221, 221, 224, 224, 224, 224, 224, 224, - - 224, 224, 224, 224, 224, 778, 778, 351, 351, 224, - 224, 332, 332, 332, 332, 332, 332, 351, 224, 224, - 224, 224, 224, 224, 225, 225, 225, 225, 225, 225, - 225, 225, 227, 1264, 227, 227, 227, 227, 227, 227, - 227, 227, 231, 231, 231, 231, 231, 231, 231, 231, - 376, 376, 383, 383, 1263, 231, 231, 779, 779, 1262, - 376, 1260, 383, 1259, 231, 231, 231, 231, 231, 231, - 233, 233, 233, 233, 233, 233, 233, 233, 236, 1253, - 236, 236, 236, 236, 236, 236, 239, 1251, 239, 239, - 239, 239, 239, 239, 239, 239, 240, 240, 240, 240, - - 240, 240, 240, 240, 240, 240, 240, 402, 403, 408, - 1249, 240, 240, 781, 781, 809, 809, 402, 403, 408, - 240, 240, 240, 240, 240, 240, 241, 241, 241, 241, - 241, 241, 241, 241, 812, 812, 1247, 420, 420, 241, - 241, 406, 406, 406, 406, 406, 406, 420, 241, 241, - 241, 241, 241, 241, 242, 1245, 242, 242, 242, 242, - 242, 242, 242, 242, 243, 243, 243, 243, 243, 243, - 243, 243, 244, 1238, 244, 244, 244, 244, 244, 244, - 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, - 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, - - 421, 421, 426, 426, 1236, 261, 261, 816, 816, 1235, - 421, 1230, 426, 1228, 261, 261, 261, 261, 261, 261, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 820, 820, 438, 438, 262, 262, 424, 424, 424, - 424, 424, 424, 438, 262, 262, 262, 262, 262, 262, - 263, 263, 263, 263, 263, 263, 263, 263, 824, 824, - 1227, 439, 439, 263, 263, 436, 436, 436, 436, 436, - 436, 439, 263, 263, 263, 263, 263, 263, 264, 1218, - 264, 264, 264, 264, 264, 264, 264, 264, 265, 265, - 265, 265, 265, 265, 265, 265, 266, 1214, 266, 266, - - 266, 266, 266, 266, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 828, 828, 444, 444, 269, - 269, 442, 442, 442, 442, 442, 442, 444, 269, 269, - 269, 269, 269, 269, 270, 270, 270, 270, 270, 270, - 270, 270, 445, 445, 446, 446, 1213, 270, 270, 880, - 880, 1211, 445, 466, 446, 1210, 270, 270, 270, 270, - 270, 270, 271, 466, 271, 271, 271, 271, 271, 271, - 271, 271, 272, 272, 272, 272, 272, 272, 272, 272, - 273, 1208, 273, 273, 273, 273, 273, 273, 277, 277, - 277, 277, 277, 277, 277, 277, 881, 881, 1206, 451, - - 451, 277, 277, 449, 449, 449, 449, 449, 449, 451, - 277, 277, 277, 277, 277, 277, 278, 1205, 278, 278, - 278, 278, 278, 278, 278, 278, 278, 452, 452, 453, - 453, 278, 278, 883, 883, 912, 912, 452, 1175, 453, - 278, 278, 278, 278, 278, 278, 279, 279, 279, 279, - 279, 279, 279, 279, 283, 467, 283, 283, 283, 283, - 283, 283, 283, 283, 287, 467, 287, 287, 287, 287, - 287, 287, 287, 287, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 913, 913, 458, 458, 291, - 291, 456, 456, 456, 456, 456, 456, 458, 291, 291, - - 291, 291, 291, 291, 292, 292, 292, 292, 292, 292, - 292, 292, 294, 1174, 294, 294, 294, 294, 294, 294, - 294, 294, 301, 301, 301, 301, 301, 301, 301, 301, - 304, 304, 304, 304, 304, 304, 304, 304, 309, 309, - 309, 309, 309, 309, 309, 309, 309, 309, 309, 915, - 915, 472, 1171, 309, 309, 464, 464, 464, 464, 464, - 464, 472, 309, 309, 309, 309, 309, 309, 310, 310, - 310, 310, 310, 310, 310, 310, 312, 1170, 312, 312, - 312, 312, 312, 312, 312, 312, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 917, 917, 485, - - 1168, 315, 315, 470, 470, 470, 470, 470, 470, 485, - 315, 315, 315, 315, 315, 315, 316, 316, 316, 316, - 316, 316, 316, 316, 318, 1167, 318, 318, 318, 318, - 318, 318, 318, 318, 322, 322, 322, 322, 322, 322, - 322, 322, 322, 322, 322, 500, 500, 522, 522, 322, - 322, 919, 919, 921, 921, 500, 1163, 522, 322, 322, - 322, 322, 322, 322, 323, 323, 323, 323, 323, 323, - 323, 323, 325, 551, 325, 325, 325, 325, 325, 325, - 325, 325, 330, 551, 330, 330, 330, 330, 330, 330, - 330, 330, 330, 529, 529, 536, 536, 330, 330, 923, - - 923, 925, 925, 529, 1162, 536, 330, 330, 330, 330, - 330, 330, 331, 331, 331, 331, 331, 331, 331, 331, - 334, 334, 334, 334, 334, 334, 334, 334, 335, 558, - 335, 335, 335, 335, 335, 335, 335, 335, 335, 558, - 566, 567, 1160, 335, 335, 975, 975, 976, 976, 1159, - 566, 567, 335, 335, 335, 335, 335, 335, 336, 336, - 336, 336, 336, 336, 336, 336, 978, 978, 1153, 572, - 1147, 336, 336, 570, 570, 570, 570, 570, 570, 572, - 336, 336, 336, 336, 336, 336, 338, 338, 338, 338, - 338, 338, 338, 338, 339, 1145, 339, 339, 339, 339, - - 339, 339, 989, 989, 339, 341, 341, 341, 341, 341, - 341, 341, 341, 344, 1144, 344, 344, 344, 344, 344, - 344, 346, 346, 346, 346, 346, 346, 346, 346, 349, - 1143, 349, 349, 349, 349, 349, 349, 352, 1141, 352, - 352, 352, 352, 352, 352, 352, 352, 353, 353, 353, - 353, 353, 353, 353, 353, 353, 353, 353, 585, 585, - 586, 586, 353, 353, 1001, 1001, 1002, 1002, 585, 1140, - 586, 353, 353, 353, 353, 353, 353, 354, 354, 354, - 354, 354, 354, 354, 354, 1003, 1003, 1132, 591, 591, - 354, 354, 589, 589, 589, 589, 589, 589, 591, 354, - - 354, 354, 354, 354, 354, 355, 1129, 355, 355, 355, - 355, 355, 355, 355, 355, 356, 356, 356, 356, 356, - 356, 356, 356, 357, 1125, 357, 357, 357, 357, 357, - 357, 362, 362, 362, 362, 362, 362, 362, 362, 363, - 363, 363, 363, 363, 363, 363, 363, 369, 369, 369, - 369, 369, 369, 369, 369, 369, 369, 1004, 1004, 1122, - 603, 603, 369, 369, 601, 601, 601, 601, 601, 601, - 603, 369, 369, 369, 369, 369, 369, 370, 370, 370, - 370, 370, 370, 370, 370, 370, 370, 370, 604, 604, - 609, 609, 370, 370, 1005, 1005, 1006, 1006, 604, 1118, - - 609, 370, 370, 370, 370, 370, 370, 371, 371, 371, - 371, 371, 371, 371, 371, 1007, 1007, 1115, 610, 610, - 371, 371, 607, 607, 607, 607, 607, 607, 610, 371, - 371, 371, 371, 371, 371, 372, 1111, 372, 372, 372, - 372, 372, 372, 372, 372, 373, 373, 373, 373, 373, - 373, 373, 373, 374, 1108, 374, 374, 374, 374, 374, - 374, 377, 377, 377, 377, 377, 377, 377, 377, 377, - 377, 377, 611, 611, 616, 616, 377, 377, 1065, 1065, - 1066, 1066, 611, 1104, 616, 377, 377, 377, 377, 377, - 377, 378, 378, 378, 378, 378, 378, 378, 378, 1068, - - 1068, 1101, 617, 617, 378, 378, 614, 614, 614, 614, - 614, 614, 617, 378, 378, 378, 378, 378, 378, 379, - 1096, 379, 379, 379, 379, 379, 379, 379, 379, 380, - 380, 380, 380, 380, 380, 380, 380, 381, 1088, 381, - 381, 381, 381, 381, 381, 384, 384, 384, 384, 384, - 384, 384, 384, 384, 384, 384, 618, 618, 623, 623, - 384, 384, 1080, 1080, 1089, 1089, 618, 1087, 623, 384, - 384, 384, 384, 384, 384, 385, 385, 385, 385, 385, - 385, 385, 385, 1090, 1090, 1085, 624, 624, 385, 385, - 621, 621, 621, 621, 621, 621, 624, 385, 385, 385, - - 385, 385, 385, 386, 1078, 386, 386, 386, 386, 386, - 386, 386, 386, 387, 387, 387, 387, 387, 387, 387, - 387, 388, 1076, 388, 388, 388, 388, 388, 388, 392, - 392, 392, 392, 392, 392, 392, 392, 625, 625, 630, - 630, 1075, 392, 392, 1091, 1091, 1073, 625, 638, 630, - 1071, 392, 392, 392, 392, 392, 392, 393, 638, 393, - 393, 393, 393, 393, 393, 393, 393, 393, 1092, 1092, - 639, 1070, 393, 393, 628, 628, 628, 628, 628, 628, - 639, 393, 393, 393, 393, 393, 393, 394, 394, 394, - 394, 394, 394, 394, 394, 1093, 1093, 1061, 644, 1057, - - 394, 394, 636, 636, 636, 636, 636, 636, 644, 394, - 394, 394, 394, 394, 394, 396, 396, 396, 396, 396, - 396, 396, 396, 397, 1056, 397, 397, 397, 397, 397, - 397, 1094, 1094, 397, 400, 645, 400, 400, 400, 400, - 400, 400, 400, 400, 404, 645, 404, 404, 404, 404, - 404, 404, 404, 404, 404, 1095, 1095, 646, 1054, 404, - 404, 642, 642, 642, 642, 642, 642, 646, 404, 404, - 404, 404, 404, 404, 405, 405, 405, 405, 405, 405, - 405, 405, 410, 410, 410, 410, 410, 410, 410, 410, - 410, 410, 414, 651, 414, 414, 414, 414, 414, 414, - - 414, 414, 418, 651, 418, 418, 418, 418, 418, 418, - 418, 418, 422, 422, 422, 422, 422, 422, 422, 422, - 422, 422, 422, 1155, 1155, 669, 1053, 422, 422, 649, - 649, 649, 649, 649, 649, 669, 422, 422, 422, 422, - 422, 422, 423, 423, 423, 423, 423, 423, 423, 423, - 425, 745, 425, 425, 425, 425, 425, 425, 425, 425, - 429, 745, 429, 429, 429, 429, 429, 429, 429, 429, - 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, - 434, 684, 684, 709, 709, 434, 434, 1156, 1156, 1158, - 1158, 684, 1051, 709, 434, 434, 434, 434, 434, 434, - - 435, 435, 435, 435, 435, 435, 435, 435, 437, 1049, - 437, 437, 437, 437, 437, 437, 437, 437, 440, 440, - 440, 440, 440, 440, 440, 440, 440, 440, 440, 1164, - 1164, 716, 716, 440, 440, 700, 700, 700, 700, 700, - 700, 716, 440, 440, 440, 440, 440, 440, 441, 441, - 441, 441, 441, 441, 441, 441, 443, 1048, 443, 443, - 443, 443, 443, 443, 443, 443, 447, 447, 447, 447, - 447, 447, 447, 447, 447, 447, 447, 723, 723, 730, - 730, 447, 447, 1222, 1222, 1223, 1223, 723, 1041, 730, - 447, 447, 447, 447, 447, 447, 448, 448, 448, 448, - - 448, 448, 448, 448, 450, 1034, 450, 450, 450, 450, - 450, 450, 450, 450, 454, 454, 454, 454, 454, 454, - 454, 454, 454, 454, 454, 752, 759, 771, 1027, 454, - 454, 1225, 1225, 1231, 1231, 752, 759, 771, 454, 454, - 454, 454, 454, 454, 455, 455, 455, 455, 455, 455, - 455, 455, 457, 772, 457, 457, 457, 457, 457, 457, - 457, 457, 462, 772, 462, 462, 462, 462, 462, 462, - 462, 462, 462, 1232, 1232, 777, 1020, 462, 462, 775, - 775, 775, 775, 775, 775, 777, 462, 462, 462, 462, - 462, 462, 463, 463, 463, 463, 463, 463, 463, 463, - - 468, 1014, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 790, 790, 791, 791, 468, 468, 1234, 1234, 1271, - 1271, 790, 1009, 791, 468, 468, 468, 468, 468, 468, - 469, 469, 469, 469, 469, 469, 469, 469, 473, 473, - 473, 473, 473, 473, 473, 473, 476, 1008, 476, 476, - 476, 476, 476, 476, 479, 479, 479, 479, 479, 479, - 479, 479, 480, 808, 480, 480, 480, 480, 480, 480, - 480, 480, 480, 808, 1000, 796, 796, 480, 480, 794, - 794, 794, 794, 794, 794, 796, 480, 480, 480, 480, - 480, 480, 481, 481, 481, 481, 481, 481, 481, 481, - - 810, 810, 811, 811, 999, 481, 481, 1272, 1272, 997, - 810, 996, 811, 994, 481, 481, 481, 481, 481, 481, - 483, 483, 483, 483, 483, 483, 483, 483, 484, 986, - 484, 484, 484, 484, 484, 484, 1274, 1274, 484, 488, - 488, 488, 488, 488, 488, 488, 488, 490, 490, 490, - 490, 490, 490, 490, 490, 493, 984, 493, 493, 493, - 493, 493, 493, 495, 495, 495, 495, 495, 495, 495, - 495, 498, 983, 498, 498, 498, 498, 498, 498, 501, - 982, 501, 501, 501, 501, 501, 501, 501, 501, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - - 813, 813, 814, 814, 502, 502, 1276, 1276, 1277, 1277, - 813, 980, 814, 502, 502, 502, 502, 502, 502, 503, - 503, 503, 503, 503, 503, 503, 503, 815, 815, 817, - 817, 979, 503, 503, 1279, 1279, 973, 815, 837, 817, - 967, 503, 503, 503, 503, 503, 503, 504, 837, 504, - 504, 504, 504, 504, 504, 504, 504, 505, 505, 505, - 505, 505, 505, 505, 505, 506, 965, 506, 506, 506, - 506, 506, 506, 508, 508, 508, 508, 508, 508, 508, - 508, 511, 964, 511, 511, 511, 511, 511, 511, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 818, - - 818, 819, 819, 963, 515, 515, 1309, 1309, 961, 818, - 960, 819, 952, 515, 515, 515, 515, 515, 515, 516, - 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, - 821, 821, 822, 822, 516, 516, 1310, 1310, 1312, 1312, - 821, 949, 822, 516, 516, 516, 516, 516, 516, 517, - 517, 517, 517, 517, 517, 517, 517, 823, 823, 825, - 825, 945, 517, 517, 1313, 1313, 942, 823, 838, 825, - 938, 517, 517, 517, 517, 517, 517, 518, 838, 518, - 518, 518, 518, 518, 518, 518, 518, 519, 519, 519, - 519, 519, 519, 519, 519, 520, 935, 520, 520, 520, - - 520, 520, 520, 523, 523, 523, 523, 523, 523, 523, - 523, 523, 523, 523, 826, 826, 827, 827, 523, 523, - 1335, 1335, 931, 927, 826, 926, 827, 523, 523, 523, - 523, 523, 523, 524, 524, 524, 524, 524, 524, 524, - 524, 829, 829, 843, 844, 909, 524, 524, 907, 906, - 904, 829, 845, 843, 844, 524, 524, 524, 524, 524, - 524, 525, 845, 525, 525, 525, 525, 525, 525, 525, - 525, 526, 526, 526, 526, 526, 526, 526, 526, 527, - 903, 527, 527, 527, 527, 527, 527, 530, 530, 530, - 530, 530, 530, 530, 530, 530, 530, 530, 901, 893, - - 850, 891, 530, 530, 835, 835, 835, 835, 835, 835, - 850, 530, 530, 530, 530, 530, 530, 531, 531, 531, - 531, 531, 531, 531, 531, 890, 888, 886, 851, 885, - 531, 531, 841, 841, 841, 841, 841, 841, 851, 531, - 531, 531, 531, 531, 531, 532, 876, 532, 532, 532, - 532, 532, 532, 532, 532, 533, 533, 533, 533, 533, - 533, 533, 533, 534, 872, 534, 534, 534, 534, 534, - 534, 537, 537, 537, 537, 537, 537, 537, 537, 537, - 537, 537, 871, 869, 852, 868, 537, 537, 848, 848, - 848, 848, 848, 848, 852, 537, 537, 537, 537, 537, - - 537, 538, 538, 538, 538, 538, 538, 538, 538, 866, - 864, 863, 857, 856, 538, 538, 855, 855, 855, 855, - 855, 855, 857, 538, 538, 538, 538, 538, 538, 539, - 849, 539, 539, 539, 539, 539, 539, 539, 539, 540, - 540, 540, 540, 540, 540, 540, 540, 541, 842, 541, - 541, 541, 541, 541, 541, 545, 545, 545, 545, 545, - 545, 545, 545, 836, 832, 831, 879, 830, 545, 545, - 860, 860, 860, 860, 860, 860, 879, 545, 545, 545, - 545, 545, 545, 546, 805, 546, 546, 546, 546, 546, - 546, 546, 546, 546, 894, 894, 910, 804, 546, 546, - - 801, 800, 799, 797, 894, 789, 910, 546, 546, 546, - 546, 546, 546, 547, 547, 547, 547, 547, 547, 547, - 547, 911, 914, 916, 916, 787, 547, 547, 786, 785, - 783, 911, 914, 916, 782, 547, 547, 547, 547, 547, - 547, 549, 549, 549, 549, 549, 549, 549, 549, 550, - 776, 550, 550, 550, 550, 550, 550, 770, 768, 550, - 553, 767, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 918, 918, 920, 920, 553, 553, 766, 764, 763, - 756, 918, 753, 920, 553, 553, 553, 553, 553, 553, - 554, 554, 554, 554, 554, 554, 554, 554, 922, 922, - - 924, 924, 749, 554, 554, 746, 742, 738, 922, 737, - 924, 736, 554, 554, 554, 554, 554, 554, 556, 556, - 556, 556, 556, 556, 556, 556, 557, 729, 557, 557, - 557, 557, 557, 557, 722, 715, 557, 560, 934, 560, - 560, 560, 560, 560, 560, 560, 560, 564, 934, 564, - 564, 564, 564, 564, 564, 564, 564, 568, 941, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 941, 948, - 955, 708, 568, 568, 702, 697, 696, 694, 693, 948, - 955, 568, 568, 568, 568, 568, 568, 569, 569, 569, - 569, 569, 569, 569, 569, 575, 575, 575, 575, 575, - - 575, 575, 575, 575, 575, 579, 968, 579, 579, 579, - 579, 579, 579, 579, 579, 583, 968, 583, 583, 583, - 583, 583, 583, 583, 583, 587, 587, 587, 587, 587, - 587, 587, 587, 587, 587, 587, 969, 974, 987, 987, - 587, 587, 691, 683, 681, 680, 969, 974, 987, 587, - 587, 587, 587, 587, 587, 588, 588, 588, 588, 588, - 588, 588, 588, 590, 1015, 590, 590, 590, 590, 590, - 590, 590, 590, 593, 1015, 593, 593, 593, 593, 593, - 593, 593, 593, 598, 598, 598, 598, 598, 598, 598, - 598, 598, 678, 676, 988, 988, 598, 598, 972, 972, - - 972, 972, 972, 972, 988, 598, 598, 598, 598, 598, - 598, 599, 599, 599, 599, 599, 599, 599, 599, 599, - 599, 599, 990, 990, 1016, 675, 599, 599, 666, 662, - 661, 659, 990, 658, 1016, 599, 599, 599, 599, 599, - 599, 600, 600, 600, 600, 600, 600, 600, 600, 602, - 656, 602, 602, 602, 602, 602, 602, 602, 602, 605, - 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, - 654, 653, 1021, 650, 605, 605, 1013, 1013, 1013, 1013, - 1013, 1013, 1021, 605, 605, 605, 605, 605, 605, 606, - 606, 606, 606, 606, 606, 606, 606, 608, 643, 608, - - 608, 608, 608, 608, 608, 608, 608, 612, 612, 612, - 612, 612, 612, 612, 612, 612, 612, 612, 637, 633, - 1022, 632, 612, 612, 1019, 1019, 1019, 1019, 1019, 1019, - 1022, 612, 612, 612, 612, 612, 612, 613, 613, 613, - 613, 613, 613, 613, 613, 615, 631, 615, 615, 615, - 615, 615, 615, 615, 615, 619, 619, 619, 619, 619, - 619, 619, 619, 619, 619, 619, 1023, 1028, 1029, 597, - 619, 619, 596, 595, 594, 592, 1023, 1028, 1029, 619, - 619, 619, 619, 619, 619, 620, 620, 620, 620, 620, - 620, 620, 620, 622, 584, 622, 622, 622, 622, 622, - - 622, 622, 622, 626, 626, 626, 626, 626, 626, 626, - 626, 626, 626, 626, 582, 581, 1030, 580, 626, 626, - 1026, 1026, 1026, 1026, 1026, 1026, 1030, 626, 626, 626, - 626, 626, 626, 627, 627, 627, 627, 627, 627, 627, - 627, 629, 1035, 629, 629, 629, 629, 629, 629, 629, - 629, 634, 1035, 634, 634, 634, 634, 634, 634, 634, - 634, 634, 578, 577, 1036, 571, 634, 634, 1033, 1033, - 1033, 1033, 1033, 1033, 1036, 634, 634, 634, 634, 634, - 634, 635, 635, 635, 635, 635, 635, 635, 635, 640, - 1037, 640, 640, 640, 640, 640, 640, 640, 640, 640, - - 1037, 565, 1042, 563, 640, 640, 1040, 1040, 1040, 1040, - 1040, 1040, 1042, 640, 640, 640, 640, 640, 640, 641, - 641, 641, 641, 641, 641, 641, 641, 647, 1064, 647, - 647, 647, 647, 647, 647, 647, 647, 647, 1064, 562, - 1079, 1079, 647, 647, 1045, 1045, 1045, 1045, 1045, 1045, - 1079, 647, 647, 647, 647, 647, 647, 648, 648, 648, - 648, 648, 648, 648, 648, 652, 652, 652, 652, 652, - 652, 652, 652, 655, 561, 655, 655, 655, 655, 655, - 655, 657, 657, 657, 657, 657, 657, 657, 657, 660, - 559, 660, 660, 660, 660, 660, 660, 663, 663, 663, - - 663, 663, 663, 663, 663, 664, 1107, 664, 664, 664, - 664, 664, 664, 664, 664, 664, 1107, 555, 1114, 552, - 664, 664, 1083, 1083, 1083, 1083, 1083, 1083, 1114, 664, - 664, 664, 664, 664, 664, 665, 665, 665, 665, 665, - 665, 665, 665, 548, 544, 543, 1121, 542, 665, 665, - 1099, 1099, 1099, 1099, 1099, 1099, 1121, 665, 665, 665, - 665, 665, 665, 667, 667, 667, 667, 667, 667, 667, - 667, 668, 535, 668, 668, 668, 668, 668, 668, 528, - 521, 668, 672, 672, 672, 672, 672, 672, 672, 672, - 674, 674, 674, 674, 674, 674, 674, 674, 677, 514, - - 677, 677, 677, 677, 677, 677, 679, 679, 679, 679, - 679, 679, 679, 679, 682, 513, 682, 682, 682, 682, - 682, 682, 685, 512, 685, 685, 685, 685, 685, 685, - 685, 685, 686, 686, 686, 686, 686, 686, 686, 686, - 686, 686, 686, 1128, 1135, 1148, 510, 686, 686, 509, - 507, 499, 497, 1128, 1135, 1148, 686, 686, 686, 686, - 686, 686, 687, 687, 687, 687, 687, 687, 687, 687, - 1149, 1154, 1178, 1180, 496, 687, 687, 494, 492, 491, - 1149, 1154, 1178, 1180, 687, 687, 687, 687, 687, 687, - 688, 482, 688, 688, 688, 688, 688, 688, 688, 688, - - 689, 689, 689, 689, 689, 689, 689, 689, 690, 478, - 690, 690, 690, 690, 690, 690, 692, 692, 692, 692, - 692, 692, 692, 692, 695, 477, 695, 695, 695, 695, - 695, 695, 698, 1181, 698, 698, 698, 698, 698, 698, - 698, 698, 698, 1181, 475, 1183, 474, 698, 698, 1152, - 1152, 1152, 1152, 1152, 1152, 1183, 698, 698, 698, 698, - 698, 698, 699, 699, 699, 699, 699, 699, 699, 699, - 703, 703, 703, 703, 703, 703, 703, 703, 703, 703, - 703, 1184, 1185, 1187, 471, 703, 703, 465, 461, 460, - 459, 1184, 1185, 1187, 703, 703, 703, 703, 703, 703, - - 705, 433, 705, 705, 705, 705, 705, 705, 705, 705, - 706, 706, 706, 706, 706, 706, 706, 706, 707, 432, - 707, 707, 707, 707, 707, 707, 710, 710, 710, 710, - 710, 710, 710, 710, 710, 710, 710, 1188, 1189, 1191, - 431, 710, 710, 430, 428, 419, 417, 1188, 1189, 1191, - 710, 710, 710, 710, 710, 710, 712, 416, 712, 712, - 712, 712, 712, 712, 712, 712, 713, 713, 713, 713, - 713, 713, 713, 713, 714, 415, 714, 714, 714, 714, - 714, 714, 717, 717, 717, 717, 717, 717, 717, 717, - 717, 717, 717, 1192, 1193, 1195, 413, 717, 717, 412, - - 407, 401, 399, 1192, 1193, 1195, 717, 717, 717, 717, - 717, 717, 719, 395, 719, 719, 719, 719, 719, 719, - 719, 719, 720, 720, 720, 720, 720, 720, 720, 720, - 721, 391, 721, 721, 721, 721, 721, 721, 724, 724, - 724, 724, 724, 724, 724, 724, 724, 724, 724, 1196, - 1197, 1199, 390, 724, 724, 389, 382, 375, 368, 1196, - 1197, 1199, 724, 724, 724, 724, 724, 724, 726, 367, - 726, 726, 726, 726, 726, 726, 726, 726, 727, 727, - 727, 727, 727, 727, 727, 727, 728, 360, 728, 728, - 728, 728, 728, 728, 731, 731, 731, 731, 731, 731, - - 731, 731, 731, 731, 731, 358, 350, 1221, 348, 731, - 731, 1202, 1202, 1202, 1202, 1202, 1202, 1221, 731, 731, - 731, 731, 731, 731, 733, 347, 733, 733, 733, 733, - 733, 733, 733, 733, 734, 734, 734, 734, 734, 734, - 734, 734, 735, 345, 735, 735, 735, 735, 735, 735, - 739, 739, 739, 739, 739, 739, 739, 739, 1239, 1240, - 1243, 1267, 343, 739, 739, 342, 337, 333, 1239, 1240, - 1243, 1267, 739, 739, 739, 739, 739, 739, 740, 1268, - 740, 740, 740, 740, 740, 740, 740, 740, 740, 1268, - 1270, 329, 328, 740, 740, 327, 308, 307, 306, 300, - - 1270, 298, 740, 740, 740, 740, 740, 740, 741, 741, - 741, 741, 741, 741, 741, 741, 297, 296, 288, 286, - 285, 741, 741, 1295, 1295, 1295, 1295, 1295, 1295, 284, - 741, 741, 741, 741, 741, 741, 743, 743, 743, 743, - 743, 743, 743, 743, 744, 282, 744, 744, 744, 744, - 744, 744, 281, 276, 744, 747, 275, 747, 747, 747, - 747, 747, 747, 747, 747, 747, 274, 267, 260, 259, - 747, 747, 1343, 1343, 1343, 1343, 1343, 1343, 258, 747, - 747, 747, 747, 747, 747, 748, 748, 748, 748, 748, - 748, 748, 748, 254, 252, 250, 249, 245, 748, 748, - - 1362, 1362, 1362, 1362, 1362, 1362, 237, 748, 748, 748, - 748, 748, 748, 750, 750, 750, 750, 750, 750, 750, - 750, 751, 235, 751, 751, 751, 751, 751, 751, 234, - 230, 751, 754, 229, 754, 754, 754, 754, 754, 754, - 754, 754, 754, 217, 216, 215, 214, 754, 754, 1366, - 1366, 1366, 1366, 1366, 1366, 212, 754, 754, 754, 754, - 754, 754, 755, 755, 755, 755, 755, 755, 755, 755, - 211, 209, 208, 207, 206, 755, 755, 205, 204, 203, - 202, 199, 190, 188, 755, 755, 755, 755, 755, 755, - 757, 757, 757, 757, 757, 757, 757, 757, 758, 184, - - 758, 758, 758, 758, 758, 758, 183, 182, 758, 760, - 760, 760, 760, 760, 760, 760, 760, 761, 761, 761, - 761, 761, 761, 761, 761, 762, 762, 762, 762, 762, - 762, 762, 762, 765, 175, 765, 765, 765, 765, 765, - 765, 765, 765, 769, 174, 769, 769, 769, 769, 769, - 769, 769, 769, 773, 172, 773, 773, 773, 773, 773, - 773, 773, 773, 773, 171, 169, 166, 165, 773, 773, - 164, 163, 162, 161, 159, 158, 156, 773, 773, 773, - 773, 773, 773, 774, 774, 774, 774, 774, 774, 774, - 774, 780, 780, 780, 780, 780, 780, 780, 780, 780, - - 780, 784, 155, 784, 784, 784, 784, 784, 784, 784, - 784, 788, 153, 788, 788, 788, 788, 788, 788, 788, - 788, 792, 792, 792, 792, 792, 792, 792, 792, 792, - 792, 792, 152, 151, 142, 141, 792, 792, 136, 135, - 134, 132, 130, 129, 125, 792, 792, 792, 792, 792, - 792, 793, 793, 793, 793, 793, 793, 793, 793, 795, - 124, 795, 795, 795, 795, 795, 795, 795, 795, 798, - 122, 798, 798, 798, 798, 798, 798, 798, 798, 802, - 802, 802, 802, 802, 802, 802, 802, 803, 121, 803, - 803, 803, 803, 803, 803, 803, 803, 803, 120, 119, - - 118, 117, 803, 803, 115, 114, 113, 112, 111, 110, - 106, 803, 803, 803, 803, 803, 803, 806, 806, 806, - 806, 806, 806, 806, 806, 807, 104, 807, 807, 807, - 807, 807, 807, 97, 96, 807, 833, 93, 833, 833, - 833, 833, 833, 833, 833, 833, 833, 92, 90, 88, - 84, 833, 833, 83, 82, 81, 80, 79, 78, 77, - 833, 833, 833, 833, 833, 833, 834, 834, 834, 834, - 834, 834, 834, 834, 839, 75, 839, 839, 839, 839, - 839, 839, 839, 839, 839, 73, 72, 71, 70, 839, - 839, 69, 68, 67, 66, 65, 64, 54, 839, 839, - - 839, 839, 839, 839, 840, 840, 840, 840, 840, 840, - 840, 840, 846, 53, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 45, 42, 41, 38, 846, 846, 36, - 34, 33, 32, 31, 30, 28, 846, 846, 846, 846, - 846, 846, 847, 847, 847, 847, 847, 847, 847, 847, - 853, 27, 853, 853, 853, 853, 853, 853, 853, 853, - 853, 24, 23, 22, 20, 853, 853, 16, 15, 11, - 9, 7, 5, 0, 853, 853, 853, 853, 853, 853, - 854, 854, 854, 854, 854, 854, 854, 854, 858, 858, - 858, 858, 858, 858, 858, 858, 859, 859, 859, 859, - - 859, 859, 859, 859, 862, 862, 862, 862, 862, 862, - 862, 862, 865, 0, 865, 865, 865, 865, 865, 865, - 867, 867, 867, 867, 867, 867, 867, 867, 870, 0, - 870, 870, 870, 870, 870, 870, 873, 873, 873, 873, - 873, 873, 873, 873, 874, 0, 874, 874, 874, 874, - 874, 874, 874, 874, 874, 0, 0, 0, 0, 874, - 874, 0, 0, 0, 0, 0, 0, 0, 874, 874, - 874, 874, 874, 874, 875, 875, 875, 875, 875, 875, - 875, 875, 0, 0, 0, 0, 0, 875, 875, 0, - 0, 0, 0, 0, 0, 0, 875, 875, 875, 875, - - 875, 875, 877, 877, 877, 877, 877, 877, 877, 877, - 878, 0, 878, 878, 878, 878, 878, 878, 0, 0, - 878, 882, 882, 882, 882, 882, 882, 882, 882, 884, - 884, 884, 884, 884, 884, 884, 884, 887, 0, 887, - 887, 887, 887, 887, 887, 889, 889, 889, 889, 889, - 889, 889, 889, 892, 0, 892, 892, 892, 892, 892, - 892, 895, 0, 895, 895, 895, 895, 895, 895, 895, - 895, 896, 896, 896, 896, 896, 896, 896, 896, 896, - 896, 896, 0, 0, 0, 0, 896, 896, 0, 0, - 0, 0, 0, 0, 0, 896, 896, 896, 896, 896, - - 896, 898, 0, 898, 898, 898, 898, 898, 898, 898, - 898, 899, 899, 899, 899, 899, 899, 899, 899, 900, - 0, 900, 900, 900, 900, 900, 900, 902, 902, 902, - 902, 902, 902, 902, 902, 905, 0, 905, 905, 905, - 905, 905, 905, 908, 0, 908, 908, 908, 908, 908, - 908, 908, 908, 928, 928, 928, 928, 928, 928, 928, - 928, 0, 0, 0, 0, 0, 928, 928, 0, 0, - 0, 0, 0, 0, 0, 928, 928, 928, 928, 928, - 928, 929, 0, 929, 929, 929, 929, 929, 929, 929, - 929, 929, 0, 0, 0, 0, 929, 929, 0, 0, - - 0, 0, 0, 0, 0, 929, 929, 929, 929, 929, - 929, 930, 930, 930, 930, 930, 930, 930, 930, 0, - 0, 0, 0, 0, 930, 930, 0, 0, 0, 0, - 0, 0, 0, 930, 930, 930, 930, 930, 930, 932, - 932, 932, 932, 932, 932, 932, 932, 933, 0, 933, - 933, 933, 933, 933, 933, 0, 0, 933, 936, 0, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 0, - 0, 0, 0, 936, 936, 0, 0, 0, 0, 0, - 0, 0, 936, 936, 936, 936, 936, 936, 937, 937, - 937, 937, 937, 937, 937, 937, 0, 0, 0, 0, - - 0, 937, 937, 0, 0, 0, 0, 0, 0, 0, - 937, 937, 937, 937, 937, 937, 939, 939, 939, 939, - 939, 939, 939, 939, 940, 0, 940, 940, 940, 940, - 940, 940, 0, 0, 940, 943, 0, 943, 943, 943, - 943, 943, 943, 943, 943, 943, 0, 0, 0, 0, - 943, 943, 0, 0, 0, 0, 0, 0, 0, 943, - 943, 943, 943, 943, 943, 944, 944, 944, 944, 944, - 944, 944, 944, 0, 0, 0, 0, 0, 944, 944, - 0, 0, 0, 0, 0, 0, 0, 944, 944, 944, - 944, 944, 944, 946, 946, 946, 946, 946, 946, 946, - - 946, 947, 0, 947, 947, 947, 947, 947, 947, 0, - 0, 947, 950, 0, 950, 950, 950, 950, 950, 950, - 950, 950, 950, 0, 0, 0, 0, 950, 950, 0, - 0, 0, 0, 0, 0, 0, 950, 950, 950, 950, - 950, 950, 951, 951, 951, 951, 951, 951, 951, 951, - 0, 0, 0, 0, 0, 951, 951, 0, 0, 0, - 0, 0, 0, 0, 951, 951, 951, 951, 951, 951, - 953, 953, 953, 953, 953, 953, 953, 953, 954, 0, - 954, 954, 954, 954, 954, 954, 0, 0, 954, 957, - 957, 957, 957, 957, 957, 957, 957, 958, 958, 958, - - 958, 958, 958, 958, 958, 959, 959, 959, 959, 959, - 959, 959, 959, 962, 0, 962, 962, 962, 962, 962, - 962, 962, 962, 966, 0, 966, 966, 966, 966, 966, - 966, 966, 966, 970, 0, 970, 970, 970, 970, 970, - 970, 970, 970, 970, 0, 0, 0, 0, 970, 970, - 0, 0, 0, 0, 0, 0, 0, 970, 970, 970, - 970, 970, 970, 971, 971, 971, 971, 971, 971, 971, - 971, 977, 977, 977, 977, 977, 977, 977, 977, 977, - 977, 981, 0, 981, 981, 981, 981, 981, 981, 981, - 981, 985, 0, 985, 985, 985, 985, 985, 985, 985, - - 985, 991, 991, 991, 991, 991, 991, 991, 991, 992, - 992, 992, 992, 992, 992, 992, 992, 993, 993, 993, - 993, 993, 993, 993, 993, 995, 995, 995, 995, 995, - 995, 995, 995, 998, 0, 998, 998, 998, 998, 998, - 998, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, 1010, - 0, 0, 0, 0, 1010, 1010, 0, 0, 0, 0, - 0, 0, 0, 1010, 1010, 1010, 1010, 1010, 1010, 1011, - 0, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, - 0, 0, 0, 0, 1011, 1011, 0, 0, 0, 0, - 0, 0, 0, 1011, 1011, 1011, 1011, 1011, 1011, 1012, - - 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1017, 0, 1017, - 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 0, 0, - 0, 0, 1017, 1017, 0, 0, 0, 0, 0, 0, - 0, 1017, 1017, 1017, 1017, 1017, 1017, 1018, 1018, 1018, - 1018, 1018, 1018, 1018, 1018, 1024, 0, 1024, 1024, 1024, - 1024, 1024, 1024, 1024, 1024, 1024, 0, 0, 0, 0, - 1024, 1024, 0, 0, 0, 0, 0, 0, 0, 1024, - 1024, 1024, 1024, 1024, 1024, 1025, 1025, 1025, 1025, 1025, - 1025, 1025, 1025, 1031, 0, 1031, 1031, 1031, 1031, 1031, - 1031, 1031, 1031, 1031, 0, 0, 0, 0, 1031, 1031, - - 0, 0, 0, 0, 0, 0, 0, 1031, 1031, 1031, - 1031, 1031, 1031, 1032, 1032, 1032, 1032, 1032, 1032, 1032, - 1032, 1038, 0, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - 1038, 1038, 0, 0, 0, 0, 1038, 1038, 0, 0, - 0, 0, 0, 0, 0, 1038, 1038, 1038, 1038, 1038, - 1038, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1043, - 1043, 1043, 1043, 1043, 1043, 1043, 1043, 1044, 1044, 1044, - 1044, 1044, 1044, 1044, 1044, 1047, 1047, 1047, 1047, 1047, - 1047, 1047, 1047, 1050, 0, 1050, 1050, 1050, 1050, 1050, - 1050, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1055, - - 0, 1055, 1055, 1055, 1055, 1055, 1055, 1058, 1058, 1058, - 1058, 1058, 1058, 1058, 1058, 1059, 0, 1059, 1059, 1059, - 1059, 1059, 1059, 1059, 1059, 1059, 0, 0, 0, 0, - 1059, 1059, 0, 0, 0, 0, 0, 0, 0, 1059, - 1059, 1059, 1059, 1059, 1059, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 0, 0, 0, 0, 0, 1060, 1060, - 0, 0, 0, 0, 0, 0, 0, 1060, 1060, 1060, - 1060, 1060, 1060, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1063, 0, 1063, 1063, 1063, 1063, 1063, 1063, 0, - 0, 1063, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, - - 1069, 1069, 1069, 1069, 1069, 1069, 1069, 1069, 1072, 0, - 1072, 1072, 1072, 1072, 1072, 1072, 1074, 1074, 1074, 1074, - 1074, 1074, 1074, 1074, 1077, 0, 1077, 1077, 1077, 1077, - 1077, 1077, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1082, 1086, 0, - 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1086, 1097, 0, - 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 1097, 0, - 0, 0, 0, 1097, 1097, 0, 0, 0, 0, 0, - 0, 0, 1097, 1097, 1097, 1097, 1097, 1097, 1098, 1098, - 1098, 1098, 1098, 1098, 1098, 1098, 1102, 0, 1102, 1102, - - 1102, 1102, 1102, 1102, 1102, 1102, 1102, 0, 0, 0, - 0, 1102, 1102, 0, 0, 0, 0, 0, 0, 0, - 1102, 1102, 1102, 1102, 1102, 1102, 1105, 1105, 1105, 1105, - 1105, 1105, 1105, 1105, 1106, 0, 1106, 1106, 1106, 1106, - 1106, 1106, 0, 0, 1106, 1109, 0, 1109, 1109, 1109, - 1109, 1109, 1109, 1109, 1109, 1109, 0, 0, 0, 0, - 1109, 1109, 0, 0, 0, 0, 0, 0, 0, 1109, - 1109, 1109, 1109, 1109, 1109, 1112, 1112, 1112, 1112, 1112, - 1112, 1112, 1112, 1113, 0, 1113, 1113, 1113, 1113, 1113, - 1113, 0, 0, 1113, 1116, 0, 1116, 1116, 1116, 1116, - - 1116, 1116, 1116, 1116, 1116, 0, 0, 0, 0, 1116, - 1116, 0, 0, 0, 0, 0, 0, 0, 1116, 1116, - 1116, 1116, 1116, 1116, 1119, 1119, 1119, 1119, 1119, 1119, - 1119, 1119, 1120, 0, 1120, 1120, 1120, 1120, 1120, 1120, - 0, 0, 1120, 1123, 0, 1123, 1123, 1123, 1123, 1123, - 1123, 1123, 1123, 1123, 0, 0, 0, 0, 1123, 1123, - 0, 0, 0, 0, 0, 0, 0, 1123, 1123, 1123, - 1123, 1123, 1123, 1126, 1126, 1126, 1126, 1126, 1126, 1126, - 1126, 1127, 0, 1127, 1127, 1127, 1127, 1127, 1127, 0, - 0, 1127, 1130, 0, 1130, 1130, 1130, 1130, 1130, 1130, - - 1130, 1130, 1130, 0, 0, 0, 0, 1130, 1130, 0, - 0, 0, 0, 0, 0, 0, 1130, 1130, 1130, 1130, - 1130, 1130, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, - 1134, 0, 1134, 1134, 1134, 1134, 1134, 1134, 0, 0, - 1134, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1138, - 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1139, 1139, 1139, - 1139, 1139, 1139, 1139, 1139, 1142, 0, 1142, 1142, 1142, - 1142, 1142, 1142, 1142, 1142, 1146, 0, 1146, 1146, 1146, - 1146, 1146, 1146, 1146, 1146, 1150, 0, 1150, 1150, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 0, 0, 0, 0, - - 1150, 1150, 0, 0, 0, 0, 0, 0, 0, 1150, - 1150, 1150, 1150, 1150, 1150, 1151, 1151, 1151, 1151, 1151, - 1151, 1151, 1151, 1157, 1157, 1157, 1157, 1157, 1157, 1157, - 1157, 1157, 1157, 1161, 0, 1161, 1161, 1161, 1161, 1161, - 1161, 1161, 1161, 1166, 1166, 1166, 1166, 1166, 1166, 1166, - 1166, 1169, 0, 1169, 1169, 1169, 1169, 1169, 1169, 1172, - 1172, 1172, 1172, 1172, 1172, 1172, 1172, 1173, 0, 1173, - 1173, 1173, 1173, 1173, 1173, 1173, 1173, 1173, 0, 0, - 0, 0, 1173, 1173, 0, 0, 0, 0, 0, 0, - 0, 1173, 1173, 1173, 1173, 1173, 1173, 1176, 1176, 1176, - - 1176, 1176, 1176, 1176, 1176, 1177, 0, 1177, 1177, 1177, - 1177, 1177, 1177, 0, 0, 1177, 1200, 1200, 1200, 1200, - 1200, 1200, 1200, 1200, 1201, 1201, 1201, 1201, 1201, 1201, - 1201, 1201, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204, - 1207, 0, 1207, 1207, 1207, 1207, 1207, 1207, 1209, 1209, - 1209, 1209, 1209, 1209, 1209, 1209, 1212, 0, 1212, 1212, - 1212, 1212, 1212, 1212, 1215, 1215, 1215, 1215, 1215, 1215, - 1215, 1215, 1216, 0, 1216, 1216, 1216, 1216, 1216, 1216, - 1216, 1216, 1216, 0, 0, 0, 0, 1216, 1216, 0, - 0, 0, 0, 0, 0, 0, 1216, 1216, 1216, 1216, - - 1216, 1216, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, - 1220, 0, 1220, 1220, 1220, 1220, 1220, 1220, 0, 0, - 1220, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1226, - 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1229, 0, 1229, - 1229, 1229, 1229, 1229, 1229, 1233, 1233, 1233, 1233, 1233, - 1233, 1233, 1233, 1233, 1233, 1237, 0, 1237, 1237, 1237, - 1237, 1237, 1237, 1237, 1237, 1256, 1256, 1256, 1256, 1256, - 1256, 1256, 1256, 1257, 1257, 1257, 1257, 1257, 1257, 1257, - 1257, 1258, 1258, 1258, 1258, 1258, 1258, 1258, 1258, 1261, - 0, 1261, 1261, 1261, 1261, 1261, 1261, 1261, 1261, 1265, - - 0, 1265, 1265, 1265, 1265, 1265, 1265, 1265, 1265, 1273, - 1273, 1273, 1273, 1273, 1273, 1273, 1273, 1273, 1273, 1278, - 1278, 1278, 1278, 1278, 1278, 1278, 1278, 1280, 1280, 1280, - 1280, 1280, 1280, 1280, 1280, 1283, 0, 1283, 1283, 1283, - 1283, 1283, 1283, 1293, 1293, 1293, 1293, 1293, 1293, 1293, - 1293, 1294, 1294, 1294, 1294, 1294, 1294, 1294, 1294, 1297, - 1297, 1297, 1297, 1297, 1297, 1297, 1297, 1300, 0, 1300, - 1300, 1300, 1300, 1300, 1300, 1302, 1302, 1302, 1302, 1302, - 1302, 1302, 1302, 1305, 0, 1305, 1305, 1305, 1305, 1305, - 1305, 1311, 1311, 1311, 1311, 1311, 1311, 1311, 1311, 1315, - - 0, 1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315, 1326, - 1326, 1326, 1326, 1326, 1326, 1326, 1326, 1327, 1327, 1327, - 1327, 1327, 1327, 1327, 1327, 1328, 1328, 1328, 1328, 1328, - 1328, 1328, 1328, 1331, 0, 1331, 1331, 1331, 1331, 1331, - 1331, 1331, 1331, 1336, 1336, 1336, 1336, 1336, 1336, 1336, - 1336, 1339, 0, 1339, 1339, 1339, 1339, 1339, 1339, 1341, - 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1342, 1342, 1342, - 1342, 1342, 1342, 1342, 1342, 1345, 1345, 1345, 1345, 1345, - 1345, 1345, 1345, 1348, 0, 1348, 1348, 1348, 1348, 1348, - 1348, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1351, 1352, - - 1352, 1352, 1352, 1352, 1352, 1352, 1352, 1353, 1353, 1353, - 1353, 1353, 1353, 1353, 1353, 1356, 1356, 1356, 1356, 1356, - 1356, 1356, 1356, 1357, 1357, 1357, 1357, 1357, 1357, 1357, - 1357, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1358, 1360, - 1360, 1360, 1360, 1360, 1360, 1360, 1360, 1361, 1361, 1361, - 1361, 1361, 1361, 1361, 1361, 1364, 1364, 1364, 1364, 1364, - 1364, 1364, 1364, 1365, 1365, 1365, 1365, 1365, 1365, 1365, - 1365, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - 1372, 0, 1372, 1373, 0, 1373, 1373, 1373, 1373, 1373, - 1373, 1373, 1374, 1374, 0, 1374, 1375, 1375, 0, 1375, - - 1376, 0, 1376, 1377, 0, 1377, 1378, 1378, 0, 1378, - 1379, 1379, 0, 1379, 1380, 0, 1380, 1381, 0, 1381, - 1381, 1382, 1382, 0, 1382, 1383, 1383, 0, 1383, 1384, - 1384, 0, 1384, 1385, 0, 1385, 1386, 0, 1386, 1387, - 1387, 0, 1387, 1388, 1388, 0, 1388, 1389, 1389, 0, - 1389, 1390, 0, 1390, 1391, 0, 1391, 1392, 1392, 1392, - 1392, 0, 1392, 1393, 0, 1393, 1394, 1394, 0, 1394, - 1395, 1395, 0, 1395, 1396, 1396, 1396, 1396, 0, 1396, - 1397, 1397, 0, 1397, 1398, 1398, 0, 1398, 1399, 0, - 1399, 1400, 1400, 1400, 1401, 1401, 1401, 1402, 1402, 0, - - 1402, 1403, 1403, 0, 1403, 1404, 1404, 0, 1404, 1405, - 1405, 0, 1405, 1406, 1406, 0, 1406, 1407, 0, 1407, - 1408, 0, 1408, 1409, 0, 1409, 1410, 0, 1410, 1411, - 1411, 1411, 1411, 0, 1411, 1412, 0, 0, 1412, 0, - 0, 1412, 1413, 1413, 1413, 1414, 1414, 0, 1414, 1415, - 1415, 0, 1415, 1416, 1416, 1416, 1416, 0, 1416, 1417, - 1417, 1417, 1417, 0, 1417, 1418, 1418, 0, 1418, 1419, - 1419, 0, 1419, 1420, 1420, 0, 1420, 1421, 1421, 0, - 1421, 1422, 0, 1422, 1423, 0, 1423, 1424, 0, 1424, - 1425, 0, 1425, 1426, 0, 0, 1426, 0, 0, 1426, - - 1427, 1427, 0, 1427, 1428, 1428, 0, 1428, 1429, 1429, - 0, 1429, 1430, 1430, 0, 1430, 1431, 1431, 0, 1431, - 1432, 0, 1432, 1433, 0, 1433, 1434, 0, 1434, 1434, - 0, 1434, 1435, 1435, 0, 1435, 1436, 1436, 1436, 1437, - 1437, 1437, 1438, 0, 1438, 1439, 0, 1439, 1440, 0, - 1440, 1441, 0, 1441, 1442, 1442, 1442, 1442, 0, 1442, - 1443, 0, 0, 1443, 0, 0, 1443, 1444, 0, 1444, - 1445, 0, 1445, 1446, 1446, 0, 1446, 1447, 1447, 0, - 1447, 1448, 1448, 1448, 1448, 0, 1448, 1449, 1449, 1449, - 1449, 0, 1449, 1450, 1450, 1450, 1450, 0, 1450, 1451, - - 1451, 0, 1451, 1452, 1452, 0, 1452, 1453, 1453, 0, - 1453, 1454, 0, 1454, 1454, 0, 1454, 1455, 1455, 0, - 1455, 1456, 0, 1456, 1457, 0, 1457, 1458, 1458, 0, - 1458, 1459, 1459, 1459, 1460, 1460, 1460, 1461, 0, 1461, - 1462, 0, 1462, 1463, 0, 1463, 1464, 0, 1464, 1465, - 0, 1465, 1466, 0, 1466, 1467, 1467, 0, 1467, 1468, - 1468, 0, 1468, 1469, 1469, 0, 1469, 1470, 1470, 0, - 1470, 1471, 1471, 0, 1471, 1472, 1472, 0, 1472, 1473, - 0, 1473, 1474, 0, 1474, 1475, 0, 1475, 1476, 0, - 1476, 1477, 0, 1477, 1477, 0, 1477, 1478, 1478, 0, - - 1478, 1479, 1479, 1479, 1480, 1480, 1480, 1481, 0, 1481, - 1482, 0, 1482, 1483, 0, 1483, 1484, 0, 1484, 1485, - 1485, 1485, 1485, 0, 1485, 1486, 0, 1486, 1487, 0, - 1487, 1488, 1488, 0, 1488, 1489, 1489, 1489, 1489, 0, - 1489, 1490, 1490, 1490, 1490, 0, 1490, 1491, 1491, 1491, - 1491, 0, 1491, 1492, 1492, 1492, 1492, 0, 1492, 1493, - 1493, 0, 1493, 1494, 1494, 0, 1494, 1495, 1495, 0, - 1495, 1496, 0, 1496, 1496, 0, 1496, 1497, 1497, 0, - 1497, 1498, 0, 1498, 1498, 0, 1498, 1499, 1499, 0, - 1499, 1500, 0, 1500, 1501, 0, 1501, 1502, 0, 1502, - - 1503, 0, 1503, 1504, 1504, 0, 1504, 1505, 1505, 1505, - 1506, 1506, 1506, 1507, 0, 1507, 1508, 0, 1508, 1509, - 0, 1509, 1510, 0, 1510, 1511, 0, 1511, 1512, 0, - 1512, 1513, 1513, 0, 1513, 1514, 1514, 1514, 0, 0, - 1514, 1515, 1515, 0, 1515, 1516, 0, 0, 1516, 1517, - 0, 0, 1517, 1518, 0, 0, 1518, 1519, 0, 0, - 1519, 1520, 0, 0, 1520, 1521, 1521, 0, 1521, 1522, - 1522, 0, 1522, 1523, 1523, 0, 1523, 1524, 1524, 0, - 1524, 1525, 1525, 0, 1525, 1526, 0, 1526, 1527, 0, - 1527, 1528, 0, 1528, 1529, 0, 1529, 1530, 0, 1530, - - 1530, 0, 1530, 1531, 1531, 0, 1531, 1532, 1532, 1532, - 1533, 1533, 1533, 1534, 0, 1534, 1535, 0, 1535, 1536, - 0, 1536, 1537, 0, 1537, 1538, 1538, 1538, 1538, 0, - 1538, 1539, 0, 1539, 1540, 0, 1540, 1541, 1541, 0, - 1541, 1542, 1542, 0, 1542, 1543, 1543, 1543, 0, 0, - 1543, 1544, 1544, 1544, 1544, 0, 1544, 1545, 1545, 1545, - 0, 0, 1545, 1546, 1546, 1546, 1546, 0, 1546, 1547, - 1547, 1547, 0, 0, 1547, 1548, 1548, 1548, 1548, 0, - 1548, 1549, 1549, 1549, 0, 0, 1549, 1550, 1550, 1550, - 1550, 0, 1550, 1551, 1551, 1551, 0, 0, 1551, 1552, - - 1552, 1552, 1552, 0, 1552, 1553, 1553, 1553, 0, 0, - 1553, 1554, 1554, 0, 1554, 1555, 1555, 0, 1555, 1556, - 1556, 0, 1556, 1557, 0, 1557, 1557, 0, 1557, 1558, - 1558, 0, 1558, 1559, 0, 1559, 1559, 0, 1559, 1560, - 1560, 0, 1560, 1561, 0, 1561, 1561, 0, 1561, 1562, - 1562, 0, 1562, 1563, 0, 1563, 1564, 0, 1564, 1565, - 0, 1565, 1566, 0, 1566, 1567, 1567, 0, 1567, 1568, - 1568, 1568, 1569, 1569, 1569, 1570, 0, 1570, 1571, 0, - 1571, 1572, 0, 1572, 1573, 0, 1573, 1574, 0, 0, - 1574, 1575, 0, 1575, 1576, 0, 1576, 1577, 0, 1577, - - 1578, 0, 1578, 1579, 0, 1579, 1579, 0, 1579, 1580, - 1580, 1580, 0, 0, 1580, 1581, 1581, 1581, 0, 0, - 1581, 1582, 1582, 1582, 0, 0, 1582, 1583, 1583, 1583, - 0, 0, 1583, 1584, 1584, 1584, 0, 0, 1584, 1585, - 1585, 1585, 0, 0, 1585, 1586, 1586, 1586, 0, 0, - 1586, 1587, 1587, 0, 1587, 1588, 1588, 0, 1588, 1589, - 1589, 0, 1589, 1590, 1590, 0, 1590, 1591, 1591, 0, - 1591, 1592, 1592, 0, 1592, 1593, 0, 1593, 1594, 0, - 1594, 1595, 0, 1595, 1596, 0, 1596, 1597, 0, 1597, - 1597, 0, 1597, 1598, 1598, 0, 1598, 1599, 1599, 1599, - - 1600, 1600, 1600, 1601, 0, 1601, 1602, 0, 1602, 1603, - 0, 1603, 1604, 0, 1604, 1605, 1605, 1605, 1605, 0, - 1605, 1606, 1606, 1606, 0, 0, 1606, 1607, 0, 1607, - 1608, 0, 1608, 1609, 1609, 1609, 0, 0, 1609, 1610, - 1610, 1610, 0, 0, 1610, 1611, 1611, 1611, 0, 0, - 1611, 1612, 1612, 1612, 0, 0, 1612, 1613, 1613, 1613, - 0, 0, 1613, 1614, 1614, 1614, 0, 0, 1614, 1615, - 1615, 1615, 0, 0, 1615, 1616, 1616, 0, 1616, 1617, - 1617, 0, 1617, 1618, 0, 1618, 1618, 0, 1618, 1619, - 1619, 0, 1619, 1620, 0, 1620, 1620, 0, 1620, 1621, - - 1621, 0, 1621, 1622, 0, 1622, 1622, 0, 1622, 1623, - 1623, 0, 1623, 1624, 0, 1624, 1624, 0, 1624, 1625, - 1625, 0, 1625, 1626, 0, 1626, 1627, 0, 1627, 1628, - 0, 1628, 1629, 0, 1629, 1630, 1630, 0, 1630, 1631, - 1631, 1631, 1632, 1632, 1632, 1633, 0, 1633, 1634, 0, - 1634, 1635, 0, 1635, 1636, 0, 1636, 1637, 1637, 1637, - 0, 0, 1637, 1638, 0, 1638, 1639, 0, 1639, 1640, - 1640, 1640, 0, 0, 1640, 1641, 1641, 0, 1641, 1642, - 0, 0, 1642, 1643, 1643, 0, 1643, 1644, 0, 0, - 1644, 1645, 1645, 0, 1645, 1646, 0, 0, 1646, 1647, - - 1647, 0, 1647, 1648, 0, 0, 1648, 1649, 1649, 0, - 1649, 1650, 0, 0, 1650, 1651, 1651, 0, 1651, 1652, - 0, 0, 1652, 1653, 1653, 0, 1653, 1654, 0, 1654, - 1655, 0, 1655, 1656, 0, 1656, 1657, 0, 1657, 1658, - 0, 1658, 1658, 0, 1658, 1659, 1659, 0, 1659, 1660, - 1660, 1660, 1661, 1661, 1661, 1662, 0, 1662, 1663, 0, - 1663, 1664, 1664, 1664, 0, 0, 1664, 1665, 0, 1665, - 1666, 0, 1666, 1667, 1667, 0, 1667, 1668, 1668, 0, - 1668, 1669, 0, 0, 1669, 1670, 0, 1670, 1670, 0, - 1670, 1671, 0, 0, 1671, 1672, 0, 1672, 1672, 0, - - 1672, 1673, 0, 0, 1673, 1674, 0, 1674, 1674, 0, - 1674, 1675, 0, 0, 1675, 1676, 0, 1676, 1676, 0, - 1676, 1677, 0, 0, 1677, 1678, 0, 1678, 1678, 0, - 1678, 1679, 0, 0, 1679, 1680, 0, 1680, 1681, 0, - 1681, 1682, 0, 0, 1682, 1683, 1683, 0, 1683, 1684, - 1684, 1684, 1685, 0, 1685, 1686, 1686, 1686, 1687, 1687, - 1687, 1688, 0, 1688, 1689, 0, 1689, 1690, 0, 1690, - 1690, 0, 1690, 1691, 0, 0, 1691, 1692, 0, 0, - 1692, 1693, 0, 0, 1693, 1694, 0, 0, 1694, 1695, - 0, 0, 1695, 1696, 0, 0, 1696, 1697, 0, 0, - - 1697, 1698, 0, 1698, 1699, 0, 1699, 1700, 0, 1700, - 1701, 0, 1701, 1702, 0, 1702, 1702, 0, 1702, 1703, - 0, 0, 1703, 1704, 1704, 1704, 1705, 1705, 1705, 1706, - 1706, 1706, 1707, 0, 1707, 1708, 0, 0, 1708, 1709, - 0, 0, 1709, 1710, 0, 0, 1710, 1711, 0, 0, - 1711, 1712, 0, 0, 1712, 1713, 0, 0, 1713, 1714, - 0, 0, 1714, 1715, 0, 1715, 1716, 0, 1716, 1717, - 0, 0, 1717, 1718, 1718, 1718, 1719, 0, 1719, 1720, - 0, 1720, 1721, 0, 0, 1721, 1722, 0, 1722, 1723, - 0, 1723, 1724, 0, 0, 1724, 1725, 0, 1725, 1726, - - 0, 1726, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, - 1370 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -extern int yy_policy_parser_flex_debug; -int yy_policy_parser_flex_debug = 0; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *yy_policy_parsertext; -#line 1 "policy.l" -#line 2 "policy.l" - - - - - -#include "policy_module.h" -#include "libxorp/xorp.h" -#include "policy/common/policy_utils.hh" -#include "policy_parser.hh" -#include "yacc.yy_policy_parser.cc.h" - -#define yylval yy_policy_parserlval -#define yyerror yy_policy_parsererror -#define yyparse yy_policy_parserparse - -void yyerror(const char *m); -extern int yyparse(void); - -using namespace policy_parser; - -// instantiate the globals here. -vector* policy_parser::_parser_nodes; -unsigned policy_parser::_parser_lineno; - -// try not to pollute -namespace { - string _last_error; - Term::BLOCKS _block; -} - - -#line 2947 "lex.yy_policy_parser.cc" - -#define INITIAL 0 -#define STR 1 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -static int yy_init_globals (void ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yy_policy_parserwrap (void ); -#else -extern int yy_policy_parserwrap (void ); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (void ); -#else -static int input (void ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO (void) fwrite( yy_policy_parsertext, yy_policy_parserleng, 1, yy_policy_parserout ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - int n; \ - for ( n = 0; n < max_size && \ - (c = getc( yy_policy_parserin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yy_policy_parserin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yy_policy_parserin))==0 && ferror(yy_policy_parserin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yy_policy_parserin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int yy_policy_parserlex (void); - -#define YY_DECL int yy_policy_parserlex (void) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yy_policy_parsertext and yy_policy_parserleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - -#line 62 "policy.l" - - -#line 3102 "lex.yy_policy_parser.cc" - - if ( !(yy_init) ) - { - (yy_init) = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! yy_policy_parserin ) - yy_policy_parserin = stdin; - - if ( ! yy_policy_parserout ) - yy_policy_parserout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - yy_policy_parserensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_policy_parser_create_buffer(yy_policy_parserin,YY_BUF_SIZE ); - } - - yy_policy_parser_load_buffer_state( ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of yy_policy_parsertext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1371 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_current_state != 1370 ); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 64 "policy.l" -{ yylval.c_str = strdup(yy_policy_parsertext); - return YY_UINTRANGE; - } - YY_BREAK -case 2: -YY_RULE_SETUP -#line 68 "policy.l" -{ yylval.c_str = strdup(yy_policy_parsertext); - return YY_UINT; - } - YY_BREAK -case 3: -YY_RULE_SETUP -#line 72 "policy.l" -{ yylval.c_str = strdup(yy_policy_parsertext); - return YY_INT; - } - YY_BREAK -case 4: -YY_RULE_SETUP -#line 76 "policy.l" -{ yylval.c_str = strdup(yy_policy_parsertext); - return YY_BOOL; - } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 80 "policy.l" -{ yylval.c_str = strdup(yy_policy_parsertext); - return YY_BOOL; - } - YY_BREAK -case 6: -YY_RULE_SETUP -#line 84 "policy.l" -BEGIN(STR); - YY_BREAK -case 7: -YY_RULE_SETUP -#line 86 "policy.l" -BEGIN(INITIAL); - YY_BREAK -case 8: -/* rule 8 can match eol */ -YY_RULE_SETUP -#line 88 "policy.l" -{ yylval.c_str = strdup(yy_policy_parsertext); - _parser_lineno += policy_utils::count_nl(yy_policy_parsertext); - /* XXX: a string can be started with " but terminated with ' - * and vice versa... - */ - return YY_STR; - } - YY_BREAK -case 9: -YY_RULE_SETUP -#line 96 "policy.l" -{ - yylval.c_str = strdup(yy_policy_parsertext); - return YY_IPV4RANGE; - } - YY_BREAK -case 10: -YY_RULE_SETUP -#line 101 "policy.l" -{ - yylval.c_str = strdup(yy_policy_parsertext); - return YY_IPV4; - } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 106 "policy.l" -{ - yylval.c_str = strdup(yy_policy_parsertext); - return YY_IPV4NET; - } - YY_BREAK -case 12: -YY_RULE_SETUP -#line 112 "policy.l" -{ - yylval.c_str = strdup(yy_policy_parsertext); - return YY_IPV6RANGE; - } - YY_BREAK -case 13: -YY_RULE_SETUP -#line 117 "policy.l" -{ - yylval.c_str = strdup(yy_policy_parsertext); - return YY_IPV6; - } - YY_BREAK -case 14: -YY_RULE_SETUP -#line 122 "policy.l" -{ - yylval.c_str = strdup(yy_policy_parsertext); - return YY_IPV6NET; - } - YY_BREAK -case 15: -YY_RULE_SETUP -#line 127 "policy.l" -{ - // the colon is an alias for asignment in action and equality - // in the source / dest blocks. - if (_block == Term::ACTION) - return YY_ASSIGN; - else - return YY_EQ; - } - YY_BREAK -case 16: -YY_RULE_SETUP -#line 136 "policy.l" -return YY_LPAR; - YY_BREAK -case 17: -YY_RULE_SETUP -#line 137 "policy.l" -return YY_RPAR; - YY_BREAK -case 18: -YY_RULE_SETUP -#line 138 "policy.l" -return YY_EQ; - YY_BREAK -case 19: -YY_RULE_SETUP -#line 139 "policy.l" -return YY_NE; - YY_BREAK -case 20: -YY_RULE_SETUP -#line 140 "policy.l" -return YY_LE; - YY_BREAK -case 21: -YY_RULE_SETUP -#line 141 "policy.l" -return YY_GE; - YY_BREAK -case 22: -YY_RULE_SETUP -#line 142 "policy.l" -return YY_LT; - YY_BREAK -case 23: -YY_RULE_SETUP -#line 143 "policy.l" -return YY_GT; - YY_BREAK -case 24: -YY_RULE_SETUP -#line 144 "policy.l" -return YY_ADD; - YY_BREAK -case 25: -YY_RULE_SETUP -#line 145 "policy.l" -return YY_MUL; - YY_BREAK -case 26: -YY_RULE_SETUP -#line 146 "policy.l" -return YY_SUB; - YY_BREAK -case 27: -YY_RULE_SETUP -#line 147 "policy.l" -return YY_ASSIGN; - YY_BREAK -case 28: -YY_RULE_SETUP -#line 148 "policy.l" -return YY_PLUS_EQUALS; - YY_BREAK -case 29: -YY_RULE_SETUP -#line 149 "policy.l" -return YY_MINUS_EQUALS; - YY_BREAK -case 30: -YY_RULE_SETUP -#line 150 "policy.l" -return YY_OR; - YY_BREAK -case 31: -YY_RULE_SETUP -#line 151 "policy.l" -return YY_AND; - YY_BREAK -case 32: -YY_RULE_SETUP -#line 152 "policy.l" -return YY_NOT; - YY_BREAK -case 33: -YY_RULE_SETUP -#line 154 "policy.l" -return YY_IPNET_EQ; - YY_BREAK -case 34: -YY_RULE_SETUP -#line 155 "policy.l" -return YY_IPNET_LT; - YY_BREAK -case 35: -YY_RULE_SETUP -#line 156 "policy.l" -return YY_IPNET_GT; - YY_BREAK -case 36: -YY_RULE_SETUP -#line 157 "policy.l" -return YY_IPNET_LE; - YY_BREAK -case 37: -YY_RULE_SETUP -#line 158 "policy.l" -return YY_IPNET_GE; - YY_BREAK -case 38: -YY_RULE_SETUP -#line 159 "policy.l" -return YY_AND; - YY_BREAK -case 39: -YY_RULE_SETUP -#line 160 "policy.l" -return YY_OR; - YY_BREAK -case 40: -YY_RULE_SETUP -#line 161 "policy.l" -return YY_XOR; - YY_BREAK -case 41: -YY_RULE_SETUP -#line 162 "policy.l" -return YY_NOT; - YY_BREAK -case 42: -YY_RULE_SETUP -#line 163 "policy.l" -return YY_PLUS_EQUALS; - YY_BREAK -case 43: -YY_RULE_SETUP -#line 164 "policy.l" -return YY_MINUS_EQUALS; - YY_BREAK -case 44: -YY_RULE_SETUP -#line 165 "policy.l" -return YY_HEAD; - YY_BREAK -case 45: -YY_RULE_SETUP -#line 166 "policy.l" -return YY_CTR; - YY_BREAK -case 46: -YY_RULE_SETUP -#line 167 "policy.l" -return YY_NE_INT; - YY_BREAK -case 47: -YY_RULE_SETUP -#line 168 "policy.l" -return YY_ACCEPT; - YY_BREAK -case 48: -YY_RULE_SETUP -#line 169 "policy.l" -return YY_REJECT; - YY_BREAK -case 49: -YY_RULE_SETUP -#line 170 "policy.l" -return YY_SET; - YY_BREAK -case 50: -YY_RULE_SETUP -#line 171 "policy.l" -return YY_REGEX; - YY_BREAK -case 51: -YY_RULE_SETUP -#line 172 "policy.l" -return YY_PROTOCOL; - YY_BREAK -case 52: -YY_RULE_SETUP -#line 173 "policy.l" -return YY_NEXT; - YY_BREAK -case 53: -YY_RULE_SETUP -#line 174 "policy.l" -return YY_POLICY; - YY_BREAK -case 54: -YY_RULE_SETUP -#line 175 "policy.l" -return YY_TERM; - YY_BREAK -case 55: -YY_RULE_SETUP -#line 177 "policy.l" -{ yylval.c_str = strdup(yy_policy_parsertext); - return YY_ID; - } - YY_BREAK -case 56: -YY_RULE_SETUP -#line 181 "policy.l" -return YY_SEMICOLON; - YY_BREAK -case 57: -YY_RULE_SETUP -#line 183 "policy.l" -/* eat blanks */ - YY_BREAK -case 58: -/* rule 58 can match eol */ -YY_RULE_SETUP -#line 185 "policy.l" -_parser_lineno++; - YY_BREAK -case 59: -YY_RULE_SETUP -#line 187 "policy.l" -{ yyerror("Unknown character"); } - YY_BREAK -case 60: -YY_RULE_SETUP -#line 189 "policy.l" -ECHO; - YY_BREAK -#line 3526 "lex.yy_policy_parser.cc" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(STR): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yy_policy_parserin at a new source and called - * yy_policy_parserlex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yy_policy_parserin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( yy_policy_parserwrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yy_policy_parsertext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of yy_policy_parserlex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (void) -{ - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yy_policy_parserrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yy_policy_parserrestart(yy_policy_parserin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (void) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = (yy_start); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1371 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 1371 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 1370); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (void) -#else - static int input (void) -#endif - -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yy_policy_parserrestart(yy_policy_parserin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yy_policy_parserwrap( ) ) - return EOF; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve yy_policy_parsertext */ - (yy_hold_char) = *++(yy_c_buf_p); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void yy_policy_parserrestart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - yy_policy_parserensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_policy_parser_create_buffer(yy_policy_parserin,YY_BUF_SIZE ); - } - - yy_policy_parser_init_buffer(YY_CURRENT_BUFFER,input_file ); - yy_policy_parser_load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void yy_policy_parser_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * yy_policy_parserpop_buffer_state(); - * yy_policy_parserpush_buffer_state(new_buffer); - */ - yy_policy_parserensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_policy_parser_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (yy_policy_parserwrap()) processing, but the only time this flag - * is looked at is after yy_policy_parserwrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void yy_policy_parser_load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yy_policy_parserin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE yy_policy_parser_create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_policy_parseralloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_policy_parser_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yy_policy_parseralloc(b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_policy_parser_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_policy_parser_init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with yy_policy_parser_create_buffer() - * - */ - void yy_policy_parser_delete_buffer (YY_BUFFER_STATE b ) -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yy_policy_parserfree((void *) b->yy_ch_buf ); - - yy_policy_parserfree((void *) b ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a yy_policy_parserrestart() or at EOF. - */ - static void yy_policy_parser_init_buffer (YY_BUFFER_STATE b, FILE * file ) - -{ - int oerrno = errno; - - yy_policy_parser_flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then yy_policy_parser_init_buffer was _probably_ - * called from yy_policy_parserrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void yy_policy_parser_flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - yy_policy_parser_load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void yy_policy_parserpush_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - yy_policy_parserensure_buffer_stack(); - - /* This block is copied from yy_policy_parser_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_policy_parser_switch_to_buffer. */ - yy_policy_parser_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void yy_policy_parserpop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - yy_policy_parser_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_policy_parser_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void yy_policy_parserensure_buffer_stack (void) -{ - int num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - (yy_buffer_stack) = (struct yy_buffer_state**)yy_policy_parseralloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)yy_policy_parserrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_policy_parser_scan_buffer (char * base, yy_size_t size ) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) yy_policy_parseralloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_policy_parser_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_policy_parser_switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to yy_policy_parserlex() will - * scan from a @e copy of @a str. - * @param str a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * yy_policy_parser_scan_bytes() instead. - */ -YY_BUFFER_STATE yy_policy_parser_scan_string (yyconst char * yystr ) -{ - - return yy_policy_parser_scan_bytes(yystr,strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to yy_policy_parserlex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_policy_parser_scan_bytes (yyconst char * yybytes, int _yybytes_len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) yy_policy_parseralloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_policy_parser_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_policy_parser_scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_policy_parser_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg ) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yy_policy_parsertext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yy_policy_parsertext[yy_policy_parserleng] = (yy_hold_char); \ - (yy_c_buf_p) = yy_policy_parsertext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yy_policy_parserleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int yy_policy_parserget_lineno (void) -{ - - return yy_policy_parserlineno; -} - -/** Get the input stream. - * - */ -FILE *yy_policy_parserget_in (void) -{ - return yy_policy_parserin; -} - -/** Get the output stream. - * - */ -FILE *yy_policy_parserget_out (void) -{ - return yy_policy_parserout; -} - -/** Get the length of the current token. - * - */ -int yy_policy_parserget_leng (void) -{ - return yy_policy_parserleng; -} - -/** Get the current token. - * - */ - -char *yy_policy_parserget_text (void) -{ - return yy_policy_parsertext; -} - -/** Set the current line number. - * @param line_number - * - */ -void yy_policy_parserset_lineno (int line_number ) -{ - - yy_policy_parserlineno = line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * - * @see yy_policy_parser_switch_to_buffer - */ -void yy_policy_parserset_in (FILE * in_str ) -{ - yy_policy_parserin = in_str ; -} - -void yy_policy_parserset_out (FILE * out_str ) -{ - yy_policy_parserout = out_str ; -} - -int yy_policy_parserget_debug (void) -{ - return yy_policy_parser_flex_debug; -} - -void yy_policy_parserset_debug (int bdebug ) -{ - yy_policy_parser_flex_debug = bdebug ; -} - -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yy_policy_parserlex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yy_policy_parserin = stdin; - yy_policy_parserout = stdout; -#else - yy_policy_parserin = (FILE *) 0; - yy_policy_parserout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * yy_policy_parserlex_init() - */ - return 0; -} - -/* yy_policy_parserlex_destroy is for both reentrant and non-reentrant scanners. */ -int yy_policy_parserlex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_policy_parser_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yy_policy_parserpop_buffer_state(); - } - - /* Destroy the stack itself. */ - yy_policy_parserfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yy_policy_parserlex() is called, initialization will occur. */ - yy_init_globals( ); - - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *yy_policy_parseralloc (yy_size_t size ) -{ - return (void *) malloc( size ); -} - -void *yy_policy_parserrealloc (void * ptr, yy_size_t size ) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void yy_policy_parserfree (void * ptr ) -{ - free( (char *) ptr ); /* see yy_policy_parserrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 189 "policy.l" - - - -void yyerror(const char *m) -{ - ostringstream oss; - oss << "Error on line " << _parser_lineno << " near ("; - - for(int i = 0; i < yy_policy_parserleng; i++) - oss << yy_policy_parsertext[i]; - oss << "): " << m; - - _last_error = oss.str(); -} - -// Everything is put in the lexer because of YY_BUFFER_STATE... -int -policy_parser::policy_parse(vector& outnodes, const Term::BLOCKS& block, - const string& conf, string& outerr) -{ - - YY_BUFFER_STATE yybuffstate = yy_policy_parser_scan_string(conf.c_str()); - - _last_error = "No error"; - _parser_nodes = &outnodes; - _parser_lineno = 1; - _block = block; - - int res = yyparse(); - - yy_policy_parser_delete_buffer(yybuffstate); - outerr = _last_error; - - return res; -} - -- 1.7.9.5 From noreply at github.com Fri Aug 31 10:56:40 2012 From: noreply at github.com (GitHub) Date: Fri, 31 Aug 2012 10:56:40 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] bc8cdc: pim: Store enable & should-start info in permanen... Message-ID: <5040fad8c5e3f_1b9f1396aec178b8@sh2.rs.github.com.mail> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: bc8cdcb279e896c12d97011763862426f71fdc37 https://github.com/greearb/xorp.ct/commit/bc8cdcb279e896c12d97011763862426f71fdc37 Author: Ben Greear Date: 2012-08-29 (Wed, 29 Aug 2012) Changed paths: M xorp/libxorp/vif.hh M xorp/pim/pim_node.cc M xorp/pim/pim_vif.cc M xorp/pim/pim_vif.hh Log Message: ----------- pim: Store enable & should-start info in permanent structure. This allows us to properly re-start the PIM protocol for interfaces that are deleted and then come back. Signed-off-by: Ben Greear Commit: 9b765ab6ec25572b45303e9c13cd86edcfc5add3 https://github.com/greearb/xorp.ct/commit/9b765ab6ec25572b45303e9c13cd86edcfc5add3 Author: Ben Greear Date: 2012-08-29 (Wed, 29 Aug 2012) Changed paths: M xorp/libxorp/vif.hh M xorp/mld6igmp/mld6igmp_node.cc M xorp/mld6igmp/mld6igmp_vif.cc M xorp/mld6igmp/mld6igmp_vif.hh M xorp/pim/pim_node.cc M xorp/pim/pim_vif.cc M xorp/pim/pim_vif.hh Log Message: ----------- igmp/pim: Store enabled & should-start in permanent structure. This allows us to properly re-start the PIM protocol for interfaces that are deleted and then come back. Move some common code to the vif.hh class. Signed-off-by: Ben Greear Commit: d76b02fe96085ea5b081c3197d6bee620f818326 https://github.com/greearb/xorp.ct/commit/d76b02fe96085ea5b081c3197d6bee620f818326 Author: Ben Greear Date: 2012-08-29 (Wed, 29 Aug 2012) Changed paths: M xorp/fea/mfea_config.cc M xorp/fea/mfea_node.cc M xorp/fea/mfea_vif.cc M xorp/fea/mfea_vif.hh Log Message: ----------- mefa: Store enabled & should-start in permanent structure. This allows us to properly re-start the MFEA protocol for interfaces that are deleted and then come back. Signed-off-by: Ben Greear Commit: 843fee0b96d2809d7458109afd59f3ff0496add7 https://github.com/greearb/xorp.ct/commit/843fee0b96d2809d7458109afd59f3ff0496add7 Author: Ben Greear Date: 2012-08-30 (Thu, 30 Aug 2012) Changed paths: M xorp/fea/data_plane/io/io_ip_socket.cc M xorp/fea/io_ip.hh M xorp/fea/xrl_fea_target.cc M xorp/pim/xrl_pim_node.cc M xorp/site_scons/config/allconfig.py Log Message: ----------- FEA: Fix tx Mcast packets with duplicate local IPs. When multiple interfaces have the same IP, we must pass in the interface ifindex instead of just the IP address when binding the socket before sending mcast packets. Keep fallback code for systems that do not support ip_mreqn. They will work fine as long as there are no duplicate IP addresses. Signed-off-by: Ben Greear Commit: 979d25422df23d97ce208d98e7c21e839eee92a7 https://github.com/greearb/xorp.ct/commit/979d25422df23d97ce208d98e7c21e839eee92a7 Author: Ben Greear Date: 2012-08-30 (Thu, 30 Aug 2012) Changed paths: M xorp/SConstruct M xorp/fea/mfea_mrouter.cc Log Message: ----------- mfea: Allow VIFF_USE_IFINDEX option. This is required when multiple interfaces have the same IP. It also requires a recent linux kernel...2.6.31+ or so. See: http://patchwork.ozlabs.org/patch/33723/ To enable this feature: scons enable_viff_use_ifindex=true Signed-off-by: Ben Greear Commit: f294c5a36bb4a4075488f887411ff752d9923b79 https://github.com/greearb/xorp.ct/commit/f294c5a36bb4a4075488f887411ff752d9923b79 Author: Ben Greear Date: 2012-08-30 (Thu, 30 Aug 2012) Changed paths: M xorp/pim/xrl_pim_node.cc Log Message: ----------- pim: Don't assert if failed to register protocol. Happens under normal cases if xorp is started w/out interface existing yet. Signed-off-by: Ben Greear Commit: 5c213a6a1be157324ccf42d1a6ab52a5aae2233f https://github.com/greearb/xorp.ct/commit/5c213a6a1be157324ccf42d1a6ab52a5aae2233f Author: Ben Greear Date: 2012-08-31 (Fri, 31 Aug 2012) Changed paths: M xorp/fea/mfea_node.cc Log Message: ----------- mfea: Ensure phantom ports can later start. Previous work in this area was incomplete. This fixes the case where interface does not exist when Xorp is started. Signed-off-by: Ben Greear Compare: https://github.com/greearb/xorp.ct/compare/6a1c44115ec0...5c213a6a1be1 From noreply at github.com Fri Aug 31 11:17:45 2012 From: noreply at github.com (GitHub) Date: Fri, 31 Aug 2012 11:17:45 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] 94c9fe: Update release notes for xorp 1.8.6 release. Message-ID: <5040ffc918399_48f14a3ae8333f3@sh3.rs.github.com.mail> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: 94c9feac4efc2e56d9d353654b1f0c5f24f57d0a https://github.com/greearb/xorp.ct/commit/94c9feac4efc2e56d9d353654b1f0c5f24f57d0a Author: Ben Greear Date: 2012-08-31 (Fri, 31 Aug 2012) Changed paths: M xorp/RELEASE_NOTES Log Message: ----------- Update release notes for xorp 1.8.6 release. I probably missed something important..so feel free to improve these. Signed-off-by: Ben Greear From noreply at github.com Fri Aug 31 12:52:38 2012 From: noreply at github.com (GitHub) Date: Fri, 31 Aug 2012 12:52:38 -0700 Subject: [Xorp-hackers] [greearb/xorp.ct] 517d41: mfea: Fix build on systems that do not have VIFF_... Message-ID: <5041160668ace_564bec8aec109079@sh2.rs.github.com.mail> Branch: refs/heads/master Home: https://github.com/greearb/xorp.ct Commit: 517d41f23ae6ebf87403ec4d0ec5ba92ea553988 https://github.com/greearb/xorp.ct/commit/517d41f23ae6ebf87403ec4d0ec5ba92ea553988 Author: Ben Greear Date: 2012-08-31 (Fri, 31 Aug 2012) Changed paths: M xorp/SConstruct Log Message: ----------- mfea: Fix build on systems that do not have VIFF_USE_IFINDEX. SConsruct file had wrong default value. Signed-off-by: Ben Greear