diff --git a/Oct_2021/Sync/10_Exploits/10_Serv/sync_timeline_maintenance.xp b/Oct_2021/Sync/10_Exploits/10_Serv/sync_timeline_maintenance.xp
index 421077e..7391fbe 100644
--- a/Oct_2021/Sync/10_Exploits/10_Serv/sync_timeline_maintenance.xp
+++ b/Oct_2021/Sync/10_Exploits/10_Serv/sync_timeline_maintenance.xp
@@ -48,8 +48,8 @@ exploit engine_oil(a)=
exploit driveshaft_boots(a)=
preconditions:
- quality:car1,driveshaft_odom>=12000;
- quality:car1,driveshaft_vio=false;
+ quality:a,driveshaft_odom>=12000;
+ quality:a,driveshaft_vio=false;
postconditions:
update quality:a,driveshaft_vio=true;
update quality:a,compliance_vio=true;
@@ -57,8 +57,8 @@ exploit driveshaft_boots(a)=
exploit engine_coolant(a)=
preconditions:
- quality:car1,coolant_odom>=24000;
- quality:car1,coolant_vio=false;
+ quality:a,coolant_odom>=24000;
+ quality:a,coolant_vio=false;
postconditions:
update quality:a,coolant_vio=true;
update quality:a,compliance_vio=true;
@@ -66,8 +66,8 @@ exploit engine_coolant(a)=
exploit parking_brake(a)=
preconditions:
- quality:car1,parkingbrake_months>=6;
- quality:car1,parkingbrake_vio=false;
+ quality:a,parkingbrake_months>=6;
+ quality:a,parkingbrake_vio=false;
postconditions:
update quality:a,parkingbrake_vio=true;
update quality:a,compliance_vio=true;
@@ -75,8 +75,8 @@ exploit parking_brake(a)=
exploit brake_pipes(a)=
preconditions:
- quality:car1,brakepipe_months>=12;
- quality:car1,brakepipe_vio=false;
+ quality:a,brakepipe_months>=12;
+ quality:a,brakepipe_vio=false;
postconditions:
update quality:a,brakepipe_vio=true;
update quality:a,compliance_vio=true;
@@ -84,8 +84,8 @@ exploit brake_pipes(a)=
exploit brake_hoses(a)=
preconditions:
- quality:car1,brakehoses_months>=12;
- quality:car1,brakehoses_vio=false;
+ quality:a,brakehoses_months>=12;
+ quality:a,brakehoses_vio=false;
postconditions:
update quality:a,brakehoses_vio=true;
update quality:a,compliance_vio=true;
@@ -138,8 +138,8 @@ exploit oil_service(a)=
exploit driveshaft_service(a)=
preconditions:
- quality:car1,driveshaft_odom>=12000;
- quality:car1,driveshaft_vio=true;
+ quality:a,driveshaft_odom>=12000;
+ quality:a,driveshaft_vio=true;
postconditions:
update quality:a,driveshaft_odom=0;
update quality:a,driveshaft_vio=false;
@@ -147,8 +147,8 @@ exploit driveshaft_service(a)=
exploit coolant_service(a)=
preconditions:
- quality:car1,coolant_odom>=24000;
- quality:car1,coolant_vio=true;
+ quality:a,coolant_odom>=24000;
+ quality:a,coolant_vio=true;
postconditions:
update quality:a,coolant_odom=0;
update quality:a,coolant_vio=false;
@@ -156,8 +156,8 @@ exploit coolant_service(a)=
exploit parkingbrake_service(a)=
preconditions:
- quality:car1,parkingbrake_months>=6;
- quality:car1,parkingbrake_vio=true;
+ quality:a,parkingbrake_months>=6;
+ quality:a,parkingbrake_vio=true;
postconditions:
update quality:a,parkingbrake_months=0;
update quality:a,parkingbrake_months=false;
@@ -165,8 +165,8 @@ exploit parkingbrake_service(a)=
exploit brakepipe_service(a)=
preconditions:
- quality:car1,brakepipe_months>=12;
- quality:car1,brakepipe_vio=true;
+ quality:a,brakepipe_months>=12;
+ quality:a,brakepipe_vio=true;
postconditions:
update quality:a,brakepipe_months=0;
update quality:a,brakepipe_vio=false;
@@ -174,8 +174,8 @@ exploit brakepipe_service(a)=
exploit brakehose_service(a)=
preconditions:
- quality:car1,brakehoses_months>=12;
- quality:car1,brakehoses_vio=true;
+ quality:a,brakehoses_months>=12;
+ quality:a,brakehoses_vio=true;
postconditions:
update quality:a,brakehoses_months=0;
update quality:a,brakehoses_vio=false;
diff --git a/Oct_2021/Sync/10_Exploits/1_Serv/sync_timeline_maintenance.xp b/Oct_2021/Sync/10_Exploits/1_Serv/sync_timeline_maintenance.xp
index 08563aa..0e62ef6 100644
--- a/Oct_2021/Sync/10_Exploits/1_Serv/sync_timeline_maintenance.xp
+++ b/Oct_2021/Sync/10_Exploits/1_Serv/sync_timeline_maintenance.xp
@@ -48,8 +48,8 @@ exploit engine_oil(a)=
exploit driveshaft_boots(a)=
preconditions:
- quality:car1,driveshaft_odom>=12000;
- quality:car1,driveshaft_vio=false;
+ quality:a,driveshaft_odom>=12000;
+ quality:a,driveshaft_vio=false;
postconditions:
update quality:a,driveshaft_vio=true;
update quality:a,compliance_vio=true;
@@ -57,8 +57,8 @@ exploit driveshaft_boots(a)=
exploit engine_coolant(a)=
preconditions:
- quality:car1,coolant_odom>=24000;
- quality:car1,coolant_vio=false;
+ quality:a,coolant_odom>=24000;
+ quality:a,coolant_vio=false;
postconditions:
update quality:a,coolant_vio=true;
update quality:a,compliance_vio=true;
@@ -66,8 +66,8 @@ exploit engine_coolant(a)=
exploit parking_brake(a)=
preconditions:
- quality:car1,parkingbrake_months>=6;
- quality:car1,parkingbrake_vio=false;
+ quality:a,parkingbrake_months>=6;
+ quality:a,parkingbrake_vio=false;
postconditions:
update quality:a,parkingbrake_vio=true;
update quality:a,compliance_vio=true;
@@ -75,8 +75,8 @@ exploit parking_brake(a)=
exploit brake_pipes(a)=
preconditions:
- quality:car1,brakepipe_months>=12;
- quality:car1,brakepipe_vio=false;
+ quality:a,brakepipe_months>=12;
+ quality:a,brakepipe_vio=false;
postconditions:
update quality:a,brakepipe_vio=true;
update quality:a,compliance_vio=true;
@@ -84,8 +84,8 @@ exploit brake_pipes(a)=
exploit brake_hoses(a)=
preconditions:
- quality:car1,brakehoses_months>=12;
- quality:car1,brakehoses_vio=false;
+ quality:a,brakehoses_months>=12;
+ quality:a,brakehoses_vio=false;
postconditions:
update quality:a,brakehoses_vio=true;
update quality:a,compliance_vio=true;
diff --git a/Oct_2021/Sync/10_Exploits/2_Serv/sync_timeline_maintenance.xp b/Oct_2021/Sync/10_Exploits/2_Serv/sync_timeline_maintenance.xp
index 389d85f..4c547d5 100644
--- a/Oct_2021/Sync/10_Exploits/2_Serv/sync_timeline_maintenance.xp
+++ b/Oct_2021/Sync/10_Exploits/2_Serv/sync_timeline_maintenance.xp
@@ -48,8 +48,8 @@ exploit engine_oil(a)=
exploit driveshaft_boots(a)=
preconditions:
- quality:car1,driveshaft_odom>=12000;
- quality:car1,driveshaft_vio=false;
+ quality:a,driveshaft_odom>=12000;
+ quality:a,driveshaft_vio=false;
postconditions:
update quality:a,driveshaft_vio=true;
update quality:a,compliance_vio=true;
@@ -57,8 +57,8 @@ exploit driveshaft_boots(a)=
exploit engine_coolant(a)=
preconditions:
- quality:car1,coolant_odom>=24000;
- quality:car1,coolant_vio=false;
+ quality:a,coolant_odom>=24000;
+ quality:a,coolant_vio=false;
postconditions:
update quality:a,coolant_vio=true;
update quality:a,compliance_vio=true;
@@ -66,8 +66,8 @@ exploit engine_coolant(a)=
exploit parking_brake(a)=
preconditions:
- quality:car1,parkingbrake_months>=6;
- quality:car1,parkingbrake_vio=false;
+ quality:a,parkingbrake_months>=6;
+ quality:a,parkingbrake_vio=false;
postconditions:
update quality:a,parkingbrake_vio=true;
update quality:a,compliance_vio=true;
@@ -75,8 +75,8 @@ exploit parking_brake(a)=
exploit brake_pipes(a)=
preconditions:
- quality:car1,brakepipe_months>=12;
- quality:car1,brakepipe_vio=false;
+ quality:a,brakepipe_months>=12;
+ quality:a,brakepipe_vio=false;
postconditions:
update quality:a,brakepipe_vio=true;
update quality:a,compliance_vio=true;
@@ -84,8 +84,8 @@ exploit brake_pipes(a)=
exploit brake_hoses(a)=
preconditions:
- quality:car1,brakehoses_months>=12;
- quality:car1,brakehoses_vio=false;
+ quality:a,brakehoses_months>=12;
+ quality:a,brakehoses_vio=false;
postconditions:
update quality:a,brakehoses_vio=true;
update quality:a,compliance_vio=true;
diff --git a/Oct_2021/Sync/10_Exploits/3_Serv/sync_timeline_maintenance.xp b/Oct_2021/Sync/10_Exploits/3_Serv/sync_timeline_maintenance.xp
index 70af701..c0ced43 100644
--- a/Oct_2021/Sync/10_Exploits/3_Serv/sync_timeline_maintenance.xp
+++ b/Oct_2021/Sync/10_Exploits/3_Serv/sync_timeline_maintenance.xp
@@ -48,8 +48,8 @@ exploit engine_oil(a)=
exploit driveshaft_boots(a)=
preconditions:
- quality:car1,driveshaft_odom>=12000;
- quality:car1,driveshaft_vio=false;
+ quality:a,driveshaft_odom>=12000;
+ quality:a,driveshaft_vio=false;
postconditions:
update quality:a,driveshaft_vio=true;
update quality:a,compliance_vio=true;
@@ -57,8 +57,8 @@ exploit driveshaft_boots(a)=
exploit engine_coolant(a)=
preconditions:
- quality:car1,coolant_odom>=24000;
- quality:car1,coolant_vio=false;
+ quality:a,coolant_odom>=24000;
+ quality:a,coolant_vio=false;
postconditions:
update quality:a,coolant_vio=true;
update quality:a,compliance_vio=true;
@@ -66,8 +66,8 @@ exploit engine_coolant(a)=
exploit parking_brake(a)=
preconditions:
- quality:car1,parkingbrake_months>=6;
- quality:car1,parkingbrake_vio=false;
+ quality:a,parkingbrake_months>=6;
+ quality:a,parkingbrake_vio=false;
postconditions:
update quality:a,parkingbrake_vio=true;
update quality:a,compliance_vio=true;
@@ -75,8 +75,8 @@ exploit parking_brake(a)=
exploit brake_pipes(a)=
preconditions:
- quality:car1,brakepipe_months>=12;
- quality:car1,brakepipe_vio=false;
+ quality:a,brakepipe_months>=12;
+ quality:a,brakepipe_vio=false;
postconditions:
update quality:a,brakepipe_vio=true;
update quality:a,compliance_vio=true;
@@ -84,8 +84,8 @@ exploit brake_pipes(a)=
exploit brake_hoses(a)=
preconditions:
- quality:car1,brakehoses_months>=12;
- quality:car1,brakehoses_vio=false;
+ quality:a,brakehoses_months>=12;
+ quality:a,brakehoses_vio=false;
postconditions:
update quality:a,brakehoses_vio=true;
update quality:a,compliance_vio=true;
diff --git a/Oct_2021/Sync/10_Exploits/4_Serv/sync_timeline_maintenance.xp b/Oct_2021/Sync/10_Exploits/4_Serv/sync_timeline_maintenance.xp
index c845a98..758c7ba 100644
--- a/Oct_2021/Sync/10_Exploits/4_Serv/sync_timeline_maintenance.xp
+++ b/Oct_2021/Sync/10_Exploits/4_Serv/sync_timeline_maintenance.xp
@@ -48,8 +48,8 @@ exploit engine_oil(a)=
exploit driveshaft_boots(a)=
preconditions:
- quality:car1,driveshaft_odom>=12000;
- quality:car1,driveshaft_vio=false;
+ quality:a,driveshaft_odom>=12000;
+ quality:a,driveshaft_vio=false;
postconditions:
update quality:a,driveshaft_vio=true;
update quality:a,compliance_vio=true;
@@ -57,8 +57,8 @@ exploit driveshaft_boots(a)=
exploit engine_coolant(a)=
preconditions:
- quality:car1,coolant_odom>=24000;
- quality:car1,coolant_vio=false;
+ quality:a,coolant_odom>=24000;
+ quality:a,coolant_vio=false;
postconditions:
update quality:a,coolant_vio=true;
update quality:a,compliance_vio=true;
@@ -66,8 +66,8 @@ exploit engine_coolant(a)=
exploit parking_brake(a)=
preconditions:
- quality:car1,parkingbrake_months>=6;
- quality:car1,parkingbrake_vio=false;
+ quality:a,parkingbrake_months>=6;
+ quality:a,parkingbrake_vio=false;
postconditions:
update quality:a,parkingbrake_vio=true;
update quality:a,compliance_vio=true;
@@ -75,8 +75,8 @@ exploit parking_brake(a)=
exploit brake_pipes(a)=
preconditions:
- quality:car1,brakepipe_months>=12;
- quality:car1,brakepipe_vio=false;
+ quality:a,brakepipe_months>=12;
+ quality:a,brakepipe_vio=false;
postconditions:
update quality:a,brakepipe_vio=true;
update quality:a,compliance_vio=true;
@@ -84,8 +84,8 @@ exploit brake_pipes(a)=
exploit brake_hoses(a)=
preconditions:
- quality:car1,brakehoses_months>=12;
- quality:car1,brakehoses_vio=false;
+ quality:a,brakehoses_months>=12;
+ quality:a,brakehoses_vio=false;
postconditions:
update quality:a,brakehoses_vio=true;
update quality:a,compliance_vio=true;
diff --git a/Oct_2021/Sync/10_Exploits/5_Serv/sync_timeline_maintenance.xp b/Oct_2021/Sync/10_Exploits/5_Serv/sync_timeline_maintenance.xp
index 2e241f0..34dd98d 100644
--- a/Oct_2021/Sync/10_Exploits/5_Serv/sync_timeline_maintenance.xp
+++ b/Oct_2021/Sync/10_Exploits/5_Serv/sync_timeline_maintenance.xp
@@ -48,8 +48,8 @@ exploit engine_oil(a)=
exploit driveshaft_boots(a)=
preconditions:
- quality:car1,driveshaft_odom>=12000;
- quality:car1,driveshaft_vio=false;
+ quality:a,driveshaft_odom>=12000;
+ quality:a,driveshaft_vio=false;
postconditions:
update quality:a,driveshaft_vio=true;
update quality:a,compliance_vio=true;
@@ -57,8 +57,8 @@ exploit driveshaft_boots(a)=
exploit engine_coolant(a)=
preconditions:
- quality:car1,coolant_odom>=24000;
- quality:car1,coolant_vio=false;
+ quality:a,coolant_odom>=24000;
+ quality:a,coolant_vio=false;
postconditions:
update quality:a,coolant_vio=true;
update quality:a,compliance_vio=true;
@@ -66,8 +66,8 @@ exploit engine_coolant(a)=
exploit parking_brake(a)=
preconditions:
- quality:car1,parkingbrake_months>=6;
- quality:car1,parkingbrake_vio=false;
+ quality:a,parkingbrake_months>=6;
+ quality:a,parkingbrake_vio=false;
postconditions:
update quality:a,parkingbrake_vio=true;
update quality:a,compliance_vio=true;
@@ -75,8 +75,8 @@ exploit parking_brake(a)=
exploit brake_pipes(a)=
preconditions:
- quality:car1,brakepipe_months>=12;
- quality:car1,brakepipe_vio=false;
+ quality:a,brakepipe_months>=12;
+ quality:a,brakepipe_vio=false;
postconditions:
update quality:a,brakepipe_vio=true;
update quality:a,compliance_vio=true;
@@ -84,8 +84,8 @@ exploit brake_pipes(a)=
exploit brake_hoses(a)=
preconditions:
- quality:car1,brakehoses_months>=12;
- quality:car1,brakehoses_vio=false;
+ quality:a,brakehoses_months>=12;
+ quality:a,brakehoses_vio=false;
postconditions:
update quality:a,brakehoses_vio=true;
update quality:a,compliance_vio=true;
diff --git a/Oct_2021/Sync/10_Exploits/6_Serv/sync_timeline_maintenance.xp b/Oct_2021/Sync/10_Exploits/6_Serv/sync_timeline_maintenance.xp
index 4214cf4..e83b6a4 100644
--- a/Oct_2021/Sync/10_Exploits/6_Serv/sync_timeline_maintenance.xp
+++ b/Oct_2021/Sync/10_Exploits/6_Serv/sync_timeline_maintenance.xp
@@ -48,8 +48,8 @@ exploit engine_oil(a)=
exploit driveshaft_boots(a)=
preconditions:
- quality:car1,driveshaft_odom>=12000;
- quality:car1,driveshaft_vio=false;
+ quality:a,driveshaft_odom>=12000;
+ quality:a,driveshaft_vio=false;
postconditions:
update quality:a,driveshaft_vio=true;
update quality:a,compliance_vio=true;
@@ -57,8 +57,8 @@ exploit driveshaft_boots(a)=
exploit engine_coolant(a)=
preconditions:
- quality:car1,coolant_odom>=24000;
- quality:car1,coolant_vio=false;
+ quality:a,coolant_odom>=24000;
+ quality:a,coolant_vio=false;
postconditions:
update quality:a,coolant_vio=true;
update quality:a,compliance_vio=true;
@@ -66,8 +66,8 @@ exploit engine_coolant(a)=
exploit parking_brake(a)=
preconditions:
- quality:car1,parkingbrake_months>=6;
- quality:car1,parkingbrake_vio=false;
+ quality:a,parkingbrake_months>=6;
+ quality:a,parkingbrake_vio=false;
postconditions:
update quality:a,parkingbrake_vio=true;
update quality:a,compliance_vio=true;
@@ -75,8 +75,8 @@ exploit parking_brake(a)=
exploit brake_pipes(a)=
preconditions:
- quality:car1,brakepipe_months>=12;
- quality:car1,brakepipe_vio=false;
+ quality:a,brakepipe_months>=12;
+ quality:a,brakepipe_vio=false;
postconditions:
update quality:a,brakepipe_vio=true;
update quality:a,compliance_vio=true;
@@ -84,8 +84,8 @@ exploit brake_pipes(a)=
exploit brake_hoses(a)=
preconditions:
- quality:car1,brakehoses_months>=12;
- quality:car1,brakehoses_vio=false;
+ quality:a,brakehoses_months>=12;
+ quality:a,brakehoses_vio=false;
postconditions:
update quality:a,brakehoses_vio=true;
update quality:a,compliance_vio=true;
diff --git a/Oct_2021/Sync/10_Exploits/7_Serv/sync_timeline_maintenance.xp b/Oct_2021/Sync/10_Exploits/7_Serv/sync_timeline_maintenance.xp
index 194a194..e35b3e6 100644
--- a/Oct_2021/Sync/10_Exploits/7_Serv/sync_timeline_maintenance.xp
+++ b/Oct_2021/Sync/10_Exploits/7_Serv/sync_timeline_maintenance.xp
@@ -48,8 +48,8 @@ exploit engine_oil(a)=
exploit driveshaft_boots(a)=
preconditions:
- quality:car1,driveshaft_odom>=12000;
- quality:car1,driveshaft_vio=false;
+ quality:a,driveshaft_odom>=12000;
+ quality:a,driveshaft_vio=false;
postconditions:
update quality:a,driveshaft_vio=true;
update quality:a,compliance_vio=true;
@@ -57,8 +57,8 @@ exploit driveshaft_boots(a)=
exploit engine_coolant(a)=
preconditions:
- quality:car1,coolant_odom>=24000;
- quality:car1,coolant_vio=false;
+ quality:a,coolant_odom>=24000;
+ quality:a,coolant_vio=false;
postconditions:
update quality:a,coolant_vio=true;
update quality:a,compliance_vio=true;
@@ -66,8 +66,8 @@ exploit engine_coolant(a)=
exploit parking_brake(a)=
preconditions:
- quality:car1,parkingbrake_months>=6;
- quality:car1,parkingbrake_vio=false;
+ quality:a,parkingbrake_months>=6;
+ quality:a,parkingbrake_vio=false;
postconditions:
update quality:a,parkingbrake_vio=true;
update quality:a,compliance_vio=true;
@@ -75,8 +75,8 @@ exploit parking_brake(a)=
exploit brake_pipes(a)=
preconditions:
- quality:car1,brakepipe_months>=12;
- quality:car1,brakepipe_vio=false;
+ quality:a,brakepipe_months>=12;
+ quality:a,brakepipe_vio=false;
postconditions:
update quality:a,brakepipe_vio=true;
update quality:a,compliance_vio=true;
@@ -84,8 +84,8 @@ exploit brake_pipes(a)=
exploit brake_hoses(a)=
preconditions:
- quality:car1,brakehoses_months>=12;
- quality:car1,brakehoses_vio=false;
+ quality:a,brakehoses_months>=12;
+ quality:a,brakehoses_vio=false;
postconditions:
update quality:a,brakehoses_vio=true;
update quality:a,compliance_vio=true;
@@ -138,8 +138,8 @@ exploit oil_service(a)=
exploit driveshaft_service(a)=
preconditions:
- quality:car1,driveshaft_odom>=12000;
- quality:car1,driveshaft_vio=true;
+ quality:a,driveshaft_odom>=12000;
+ quality:a,driveshaft_vio=true;
postconditions:
update quality:a,driveshaft_odom=0;
update quality:a,driveshaft_vio=false;
@@ -147,8 +147,8 @@ exploit driveshaft_service(a)=
exploit coolant_service(a)=
preconditions:
- quality:car1,coolant_odom>=24000;
- quality:car1,coolant_vio=true;
+ quality:a,coolant_odom>=24000;
+ quality:a,coolant_vio=true;
postconditions:
update quality:a,coolant_odom=0;
update quality:a,coolant_vio=false;
diff --git a/Oct_2021/Sync/10_Exploits/8_Serv/sync_timeline_maintenance.xp b/Oct_2021/Sync/10_Exploits/8_Serv/sync_timeline_maintenance.xp
index 79b9cdc..e10cc95 100644
--- a/Oct_2021/Sync/10_Exploits/8_Serv/sync_timeline_maintenance.xp
+++ b/Oct_2021/Sync/10_Exploits/8_Serv/sync_timeline_maintenance.xp
@@ -48,8 +48,8 @@ exploit engine_oil(a)=
exploit driveshaft_boots(a)=
preconditions:
- quality:car1,driveshaft_odom>=12000;
- quality:car1,driveshaft_vio=false;
+ quality:a,driveshaft_odom>=12000;
+ quality:a,driveshaft_vio=false;
postconditions:
update quality:a,driveshaft_vio=true;
update quality:a,compliance_vio=true;
@@ -57,8 +57,8 @@ exploit driveshaft_boots(a)=
exploit engine_coolant(a)=
preconditions:
- quality:car1,coolant_odom>=24000;
- quality:car1,coolant_vio=false;
+ quality:a,coolant_odom>=24000;
+ quality:a,coolant_vio=false;
postconditions:
update quality:a,coolant_vio=true;
update quality:a,compliance_vio=true;
@@ -66,8 +66,8 @@ exploit engine_coolant(a)=
exploit parking_brake(a)=
preconditions:
- quality:car1,parkingbrake_months>=6;
- quality:car1,parkingbrake_vio=false;
+ quality:a,parkingbrake_months>=6;
+ quality:a,parkingbrake_vio=false;
postconditions:
update quality:a,parkingbrake_vio=true;
update quality:a,compliance_vio=true;
@@ -75,8 +75,8 @@ exploit parking_brake(a)=
exploit brake_pipes(a)=
preconditions:
- quality:car1,brakepipe_months>=12;
- quality:car1,brakepipe_vio=false;
+ quality:a,brakepipe_months>=12;
+ quality:a,brakepipe_vio=false;
postconditions:
update quality:a,brakepipe_vio=true;
update quality:a,compliance_vio=true;
@@ -84,8 +84,8 @@ exploit brake_pipes(a)=
exploit brake_hoses(a)=
preconditions:
- quality:car1,brakehoses_months>=12;
- quality:car1,brakehoses_vio=false;
+ quality:a,brakehoses_months>=12;
+ quality:a,brakehoses_vio=false;
postconditions:
update quality:a,brakehoses_vio=true;
update quality:a,compliance_vio=true;
@@ -138,8 +138,8 @@ exploit oil_service(a)=
exploit driveshaft_service(a)=
preconditions:
- quality:car1,driveshaft_odom>=12000;
- quality:car1,driveshaft_vio=true;
+ quality:a,driveshaft_odom>=12000;
+ quality:a,driveshaft_vio=true;
postconditions:
update quality:a,driveshaft_odom=0;
update quality:a,driveshaft_vio=false;
@@ -147,8 +147,8 @@ exploit driveshaft_service(a)=
exploit coolant_service(a)=
preconditions:
- quality:car1,coolant_odom>=24000;
- quality:car1,coolant_vio=true;
+ quality:a,coolant_odom>=24000;
+ quality:a,coolant_vio=true;
postconditions:
update quality:a,coolant_odom=0;
update quality:a,coolant_vio=false;
@@ -156,8 +156,8 @@ exploit coolant_service(a)=
exploit parkingbrake_service(a)=
preconditions:
- quality:car1,parkingbrake_months>=6;
- quality:car1,parkingbrake_vio=true;
+ quality:a,parkingbrake_months>=6;
+ quality:a,parkingbrake_vio=true;
postconditions:
update quality:a,parkingbrake_months=0;
update quality:a,parkingbrake_months=false;
diff --git a/Oct_2021/Sync/10_Exploits/9_Serv/sync_timeline_maintenance.xp b/Oct_2021/Sync/10_Exploits/9_Serv/sync_timeline_maintenance.xp
index 1a33238..f19d96c 100644
--- a/Oct_2021/Sync/10_Exploits/9_Serv/sync_timeline_maintenance.xp
+++ b/Oct_2021/Sync/10_Exploits/9_Serv/sync_timeline_maintenance.xp
@@ -48,8 +48,8 @@ exploit engine_oil(a)=
exploit driveshaft_boots(a)=
preconditions:
- quality:car1,driveshaft_odom>=12000;
- quality:car1,driveshaft_vio=false;
+ quality:a,driveshaft_odom>=12000;
+ quality:a,driveshaft_vio=false;
postconditions:
update quality:a,driveshaft_vio=true;
update quality:a,compliance_vio=true;
@@ -57,8 +57,8 @@ exploit driveshaft_boots(a)=
exploit engine_coolant(a)=
preconditions:
- quality:car1,coolant_odom>=24000;
- quality:car1,coolant_vio=false;
+ quality:a,coolant_odom>=24000;
+ quality:a,coolant_vio=false;
postconditions:
update quality:a,coolant_vio=true;
update quality:a,compliance_vio=true;
@@ -66,8 +66,8 @@ exploit engine_coolant(a)=
exploit parking_brake(a)=
preconditions:
- quality:car1,parkingbrake_months>=6;
- quality:car1,parkingbrake_vio=false;
+ quality:a,parkingbrake_months>=6;
+ quality:a,parkingbrake_vio=false;
postconditions:
update quality:a,parkingbrake_vio=true;
update quality:a,compliance_vio=true;
@@ -75,8 +75,8 @@ exploit parking_brake(a)=
exploit brake_pipes(a)=
preconditions:
- quality:car1,brakepipe_months>=12;
- quality:car1,brakepipe_vio=false;
+ quality:a,brakepipe_months>=12;
+ quality:a,brakepipe_vio=false;
postconditions:
update quality:a,brakepipe_vio=true;
update quality:a,compliance_vio=true;
@@ -84,8 +84,8 @@ exploit brake_pipes(a)=
exploit brake_hoses(a)=
preconditions:
- quality:car1,brakehoses_months>=12;
- quality:car1,brakehoses_vio=false;
+ quality:a,brakehoses_months>=12;
+ quality:a,brakehoses_vio=false;
postconditions:
update quality:a,brakehoses_vio=true;
update quality:a,compliance_vio=true;
@@ -138,8 +138,8 @@ exploit oil_service(a)=
exploit driveshaft_service(a)=
preconditions:
- quality:car1,driveshaft_odom>=12000;
- quality:car1,driveshaft_vio=true;
+ quality:a,driveshaft_odom>=12000;
+ quality:a,driveshaft_vio=true;
postconditions:
update quality:a,driveshaft_odom=0;
update quality:a,driveshaft_vio=false;
@@ -147,8 +147,8 @@ exploit driveshaft_service(a)=
exploit coolant_service(a)=
preconditions:
- quality:car1,coolant_odom>=24000;
- quality:car1,coolant_vio=true;
+ quality:a,coolant_odom>=24000;
+ quality:a,coolant_vio=true;
postconditions:
update quality:a,coolant_odom=0;
update quality:a,coolant_vio=false;
@@ -156,8 +156,8 @@ exploit coolant_service(a)=
exploit parkingbrake_service(a)=
preconditions:
- quality:car1,parkingbrake_months>=6;
- quality:car1,parkingbrake_vio=true;
+ quality:a,parkingbrake_months>=6;
+ quality:a,parkingbrake_vio=true;
postconditions:
update quality:a,parkingbrake_months=0;
update quality:a,parkingbrake_months=false;
@@ -165,8 +165,8 @@ exploit parkingbrake_service(a)=
exploit brakepipe_service(a)=
preconditions:
- quality:car1,brakepipe_months>=12;
- quality:car1,brakepipe_vio=true;
+ quality:a,brakepipe_months>=12;
+ quality:a,brakepipe_vio=true;
postconditions:
update quality:a,brakepipe_months=0;
update quality:a,brakepipe_vio=false;
diff --git a/build/ag_gen b/build/ag_gen
index 89ed10b..e81b399 100755
Binary files a/build/ag_gen and b/build/ag_gen differ
diff --git a/build/ag_run.sh b/build/ag_run.sh
index c176a7c..005a66d 100755
--- a/build/ag_run.sh
+++ b/build/ag_run.sh
@@ -3,24 +3,29 @@
#SBATCH --job-name=ag_parallel_ser
#SBATCH --error=./slurm_reports/job.%J.err
#SBATCH --output=./slurm_reports/job.%J.out
-#SBATCH --nodes=10
+#SBATCH --nodes=6
#SBATCH --mem=0
-#SBATCH --exclude=compute02,compute09
+#SBATCH --exclude=compute02,compute03,compute09
#SBATCH --export=ALL
export LD_LIBRARY_PATH=/home/nschrick/pkg/postgresql/13.4/lib
+MPICH_NEMESIS_NETMOD=ofi
+MPIEXEC_TIMEOUT=129600
#Argument for running test batches
NUM_SERV=${1:-1}
TYPE=${2:-sync}
CARS=${3:-2}
DBNAME=${4:-tmp}
-NODES=${5:-6}
+NODES=${5:-2}
+NOW=`date +"%H:%M"`
module load graphviz
module load gcc
module load openmpi
+#module load mpich
module load cmake
module load postgresql
+#./run.sh 1 sync 2 "$NOW" 2
./run.sh "$NUM_SERV" "$TYPE" "$CARS" "$DBNAME" "$NODES"
diff --git a/build/build.sh b/build/build.sh
index b385b66..b098983 100755
--- a/build/build.sh
+++ b/build/build.sh
@@ -6,8 +6,10 @@ if [ "$(dnsdomainname)" = "hammer.esg.utulsa.edu" ]; then
module load gcc
module load boost
module load openmpi
+ #module load mpich
module load postgresql
fi
-cmake -DCMAKE_BUILD_TYPE=Debug ../ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
+make clean
+cmake -DCMAKE_BUILD_TYPE=Debug ../ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DMPICH_IGNORE_CXX_SEEK=1
make ag_gen
diff --git a/build/nm_parser.c b/build/nm_parser.c
index 49cac32..97fe7dd 100644
--- a/build/nm_parser.c
+++ b/build/nm_parser.c
@@ -1,22 +1,23 @@
-/* A Bison parser, made by GNU Bison 3.8.2. */
-/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
- Inc.
+/* A Bison parser, made by GNU Bison 2.4.1. */
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program. If not, see . */
+ along with this program. If not, see . */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -27,17 +28,13 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
-/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
- especially those whose name start with YY_ or yy_. They are
- private implementation details that can be changed or removed. */
-
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
@@ -45,11 +42,11 @@
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
-/* Identify Bison output, and Bison version. */
-#define YYBISON 30802
+/* Identify Bison output. */
+#define YYBISON 1
-/* Bison version string. */
-#define YYBISON_VERSION "3.8.2"
+/* Bison version. */
+#define YYBISON_VERSION "2.4.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -63,18 +60,23 @@
/* Pull parsers. */
#define YYPULL 1
+/* Using locations. */
+#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */
#define yyparse nmparse
#define yylex nmlex
#define yyerror nmerror
-#define yydebug nmdebug
-#define yynerrs nmnerrs
#define yylval nmlval
#define yychar nmchar
+#define yydebug nmdebug
+#define yynerrs nmnerrs
-/* First part of user prologue. */
-#line 4 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+
+/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
+#line 4 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
#include
#include
@@ -95,168 +97,125 @@
extern int assetcount;
extern int factcount;
-#line 99 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
-# ifndef YY_CAST
-# ifdef __cplusplus
-# define YY_CAST(Type, Val) static_cast (Val)
-# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val)
-# else
-# define YY_CAST(Type, Val) ((Type) (Val))
-# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
-# endif
-# endif
-# ifndef YY_NULLPTR
-# if defined __cplusplus
-# if 201103L <= __cplusplus
-# define YY_NULLPTR nullptr
-# else
-# define YY_NULLPTR 0
-# endif
-# else
-# define YY_NULLPTR ((void*)0)
-# endif
-# endif
+/* Line 189 of yacc.c */
+#line 103 "/home/nschrick/ag_parallel/build/nm_parser.c"
-#include "nm_parser.tab.h"
-/* Symbol kind. */
-enum yysymbol_kind_t
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 1
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ IDENTIFIER = 258,
+ INT = 259,
+ FLOAT = 260,
+ EQ = 261,
+ GT = 262,
+ LT = 263,
+ GEQ = 264,
+ LEQ = 265,
+ ONEDIR = 266,
+ ONEDIRBACK = 267,
+ BIDIR = 268,
+ NOTONEDIR = 269,
+ NOTBIDIR = 270,
+ NETWORK = 271,
+ MODEL = 272,
+ ASSETS = 273,
+ COLON = 274,
+ FACTS = 275,
+ PERIOD = 276,
+ SEMI = 277,
+ QUALITY = 278,
+ COMMA = 279,
+ TOPOLOGY = 280,
+ WHITESPACE = 281,
+ TAGS = 282
+ };
+#endif
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
{
- YYSYMBOL_YYEMPTY = -2,
- YYSYMBOL_YYEOF = 0, /* "end of file" */
- YYSYMBOL_YYerror = 1, /* error */
- YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
- YYSYMBOL_IDENTIFIER = 3, /* IDENTIFIER */
- YYSYMBOL_INT = 4, /* INT */
- YYSYMBOL_FLOAT = 5, /* FLOAT */
- YYSYMBOL_EQ = 6, /* EQ */
- YYSYMBOL_GT = 7, /* GT */
- YYSYMBOL_LT = 8, /* LT */
- YYSYMBOL_GEQ = 9, /* GEQ */
- YYSYMBOL_LEQ = 10, /* LEQ */
- YYSYMBOL_ONEDIR = 11, /* ONEDIR */
- YYSYMBOL_ONEDIRBACK = 12, /* ONEDIRBACK */
- YYSYMBOL_BIDIR = 13, /* BIDIR */
- YYSYMBOL_NOTONEDIR = 14, /* NOTONEDIR */
- YYSYMBOL_NOTBIDIR = 15, /* NOTBIDIR */
- YYSYMBOL_NETWORK = 16, /* NETWORK */
- YYSYMBOL_MODEL = 17, /* MODEL */
- YYSYMBOL_ASSETS = 18, /* ASSETS */
- YYSYMBOL_COLON = 19, /* COLON */
- YYSYMBOL_FACTS = 20, /* FACTS */
- YYSYMBOL_PERIOD = 21, /* PERIOD */
- YYSYMBOL_SEMI = 22, /* SEMI */
- YYSYMBOL_QUALITY = 23, /* QUALITY */
- YYSYMBOL_COMMA = 24, /* COMMA */
- YYSYMBOL_TOPOLOGY = 25, /* TOPOLOGY */
- YYSYMBOL_WHITESPACE = 26, /* WHITESPACE */
- YYSYMBOL_TAGS = 27, /* TAGS */
- YYSYMBOL_YYACCEPT = 28, /* $accept */
- YYSYMBOL_root = 29, /* root */
- YYSYMBOL_assets = 30, /* assets */
- YYSYMBOL_assetlist = 31, /* assetlist */
- YYSYMBOL_asset = 32, /* asset */
- YYSYMBOL_tags = 33, /* tags */
- YYSYMBOL_facts = 34, /* facts */
- YYSYMBOL_factlist = 35, /* factlist */
- YYSYMBOL_f = 36, /* f */
- YYSYMBOL_statement = 37, /* statement */
- YYSYMBOL_value = 38, /* value */
- YYSYMBOL_number = 39, /* number */
- YYSYMBOL_operator = 40, /* operator */
- YYSYMBOL_relop = 41, /* relop */
- YYSYMBOL_direction = 42 /* direction */
-};
-typedef enum yysymbol_kind_t yysymbol_kind_t;
+
+/* Line 214 of yacc.c */
+#line 25 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+
+ struct str_array* arr;
+ struct list* lst;
+ struct networkmodel* model;
+ struct statement* st;
+ struct fact *fct;
+ char* string;
+/* Line 214 of yacc.c */
+#line 177 "/home/nschrick/ag_parallel/build/nm_parser.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+/* Copy the second part of user declarations. */
+
+
+/* Line 264 of yacc.c */
+#line 189 "/home/nschrick/ag_parallel/build/nm_parser.c"
#ifdef short
# undef short
#endif
-/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
- and (if available) are included
- so that the code can choose integer types of a good width. */
-
-#ifndef __PTRDIFF_MAX__
-# include /* INFRINGES ON USER NAME SPACE */
-# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
-# include /* INFRINGES ON USER NAME SPACE */
-# define YY_STDINT_H
-# endif
-#endif
-
-/* Narrow types that promote to a signed type and that can represent a
- signed or unsigned integer of at least N bits. In tables they can
- save space and decrease cache pressure. Promoting to a signed type
- helps avoid bugs in integer arithmetic. */
-
-#ifdef __INT_LEAST8_MAX__
-typedef __INT_LEAST8_TYPE__ yytype_int8;
-#elif defined YY_STDINT_H
-typedef int_least8_t yytype_int8;
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
#else
-typedef signed char yytype_int8;
-#endif
-
-#ifdef __INT_LEAST16_MAX__
-typedef __INT_LEAST16_TYPE__ yytype_int16;
-#elif defined YY_STDINT_H
-typedef int_least16_t yytype_int16;
-#else
-typedef short yytype_int16;
-#endif
-
-/* Work around bug in HP-UX 11.23, which defines these macros
- incorrectly for preprocessor constants. This workaround can likely
- be removed in 2023, as HPE has promised support for HP-UX 11.23
- (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
- . */
-#ifdef __hpux
-# undef UINT_LEAST8_MAX
-# undef UINT_LEAST16_MAX
-# define UINT_LEAST8_MAX 255
-# define UINT_LEAST16_MAX 65535
-#endif
-
-#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
-typedef __UINT_LEAST8_TYPE__ yytype_uint8;
-#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
- && UINT_LEAST8_MAX <= INT_MAX)
-typedef uint_least8_t yytype_uint8;
-#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
typedef unsigned char yytype_uint8;
-#else
-typedef short yytype_uint8;
#endif
-#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
-typedef __UINT_LEAST16_TYPE__ yytype_uint16;
-#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
- && UINT_LEAST16_MAX <= INT_MAX)
-typedef uint_least16_t yytype_uint16;
-#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
-typedef unsigned short yytype_uint16;
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
#else
-typedef int yytype_uint16;
+typedef short int yytype_int8;
#endif
-#ifndef YYPTRDIFF_T
-# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
-# define YYPTRDIFF_T __PTRDIFF_TYPE__
-# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
-# elif defined PTRDIFF_MAX
-# ifndef ptrdiff_t
-# include /* INFRINGES ON USER NAME SPACE */
-# endif
-# define YYPTRDIFF_T ptrdiff_t
-# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
-# else
-# define YYPTRDIFF_T long
-# define YYPTRDIFF_MAXIMUM LONG_MAX
-# endif
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
#endif
#ifndef YYSIZE_T
@@ -264,106 +223,55 @@ typedef int yytype_uint16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
# include /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
-# define YYSIZE_T unsigned
+# define YYSIZE_T unsigned int
# endif
#endif
-#define YYSIZE_MAXIMUM \
- YY_CAST (YYPTRDIFF_T, \
- (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
- ? YYPTRDIFF_MAXIMUM \
- : YY_CAST (YYSIZE_T, -1)))
-
-#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
-
-
-/* Stored state numbers (used for stacks). */
-typedef yytype_int8 yy_state_t;
-
-/* State numbers in computations. */
-typedef int yy_state_fast_t;
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
+# if YYENABLE_NLS
# if ENABLE_NLS
# include /* INFRINGES ON USER NAME SPACE */
-# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
# endif
# endif
# ifndef YY_
-# define YY_(Msgid) Msgid
-# endif
-#endif
-
-
-#ifndef YY_ATTRIBUTE_PURE
-# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
-# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
-# else
-# define YY_ATTRIBUTE_PURE
-# endif
-#endif
-
-#ifndef YY_ATTRIBUTE_UNUSED
-# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
-# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-# else
-# define YY_ATTRIBUTE_UNUSED
+# define YY_(msgid) msgid
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
-# define YY_USE(E) ((void) (E))
+# define YYUSE(e) ((void) (e))
#else
-# define YY_USE(E) /* empty */
+# define YYUSE(e) /* empty */
#endif
-/* Suppress an incorrect diagnostic about yylval being uninitialized. */
-#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
-# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
-# else
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
- _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
-# endif
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
- _Pragma ("GCC diagnostic pop")
+/* Identity function, used to suppress warnings about constant conditions. */
+#ifndef lint
+# define YYID(n) (n)
#else
-# define YY_INITIAL_VALUE(Value) Value
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+ int yyi;
#endif
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
+{
+ return yyi;
+}
#endif
-#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
-# define YY_IGNORE_USELESS_CAST_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
-# define YY_IGNORE_USELESS_CAST_END \
- _Pragma ("GCC diagnostic pop")
-#endif
-#ifndef YY_IGNORE_USELESS_CAST_BEGIN
-# define YY_IGNORE_USELESS_CAST_BEGIN
-# define YY_IGNORE_USELESS_CAST_END
-#endif
-
-
-#define YY_ASSERT(E) ((void) (0 && (E)))
-
-#if 1
+#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -380,11 +288,11 @@ typedef int yy_state_fast_t;
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
# include /* INFRINGES ON USER NAME SPACE */
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
# endif
# endif
# endif
@@ -392,8 +300,8 @@ typedef int yy_state_fast_t;
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's 'empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
@@ -407,89 +315,88 @@ typedef int yy_state_fast_t;
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+# if (defined __cplusplus && ! defined _STDLIB_H \
&& ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+ && (defined YYFREE || defined free)))
# include /* INFRINGES ON USER NAME SPACE */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# endif
-#endif /* 1 */
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yy_state_t yyss_alloc;
+ yytype_int16 yyss_alloc;
YYSTYPE yyvs_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
- ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
-# define YYCOPY_NEEDED 1
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (YYID (0))
+# endif
+# endif
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYPTRDIFF_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / YYSIZEOF (*yyptr); \
- } \
- while (0)
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (YYID (0))
#endif
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from SRC to DST. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(Dst, Src, Count) \
- __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
-# else
-# define YYCOPY(Dst, Src, Count) \
- do \
- { \
- YYPTRDIFF_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (Dst)[yyi] = (Src)[yyi]; \
- } \
- while (0)
-# endif
-# endif
-#endif /* !YYCOPY_NEEDED */
-
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 4
/* YYLAST -- Last index in YYTABLE. */
@@ -501,23 +408,18 @@ union yyalloc
#define YYNNTS 15
/* YYNRULES -- Number of rules. */
#define YYNRULES 30
-/* YYNSTATES -- Number of states. */
+/* YYNRULES -- Number of states. */
#define YYNSTATES 54
-/* YYMAXUTOK -- Last valid token kind. */
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
#define YYMAXUTOK 282
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex, with out-of-bounds checking. */
-#define YYTRANSLATE(YYX) \
- (0 <= (YYX) && (YYX) <= YYMAXUTOK \
- ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
- : YYSYMBOL_YYUNDEF)
-
-/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex. */
-static const yytype_int8 yytranslate[] =
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -551,7 +453,31 @@ static const yytype_int8 yytranslate[] =
};
#if YYDEBUG
-/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const yytype_uint8 yyprhs[] =
+{
+ 0, 0, 3, 11, 15, 16, 19, 22, 23, 26,
+ 30, 31, 34, 41, 50, 52, 56, 58, 60, 62,
+ 64, 66, 68, 70, 72, 74, 76, 78, 80, 82,
+ 84
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yytype_int8 yyrhs[] =
+{
+ 29, 0, -1, 16, 3, 6, 30, 34, 33, 21,
+ -1, 18, 19, 31, -1, -1, 31, 32, -1, 3,
+ 22, -1, -1, 27, 19, -1, 20, 19, 35, -1,
+ -1, 35, 36, -1, 23, 19, 3, 24, 37, 22,
+ -1, 25, 19, 3, 42, 3, 24, 37, 22, -1,
+ 3, -1, 3, 40, 38, -1, 3, -1, 39, -1,
+ 4, -1, 5, -1, 41, -1, 6, -1, 7, -1,
+ 8, -1, 9, -1, 10, -1, 13, -1, 11, -1,
+ 12, -1, 15, -1, 14, -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
0, 52, 52, 55, 58, 59, 64, 67, 68, 71,
@@ -561,46 +487,72 @@ static const yytype_uint8 yyrline[] =
};
#endif
-/** Accessing symbol of state STATE. */
-#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
-
-#if 1
-/* The user-facing name of the symbol whose (internal) number is
- YYSYMBOL. No bounds checking. */
-static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
-
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "\"end of file\"", "error", "\"invalid token\"", "IDENTIFIER", "INT",
- "FLOAT", "EQ", "GT", "LT", "GEQ", "LEQ", "ONEDIR", "ONEDIRBACK", "BIDIR",
- "NOTONEDIR", "NOTBIDIR", "NETWORK", "MODEL", "ASSETS", "COLON", "FACTS",
- "PERIOD", "SEMI", "QUALITY", "COMMA", "TOPOLOGY", "WHITESPACE", "TAGS",
- "$accept", "root", "assets", "assetlist", "asset", "tags", "facts",
- "factlist", "f", "statement", "value", "number", "operator", "relop",
- "direction", YY_NULLPTR
+ "$end", "error", "$undefined", "IDENTIFIER", "INT", "FLOAT", "EQ", "GT",
+ "LT", "GEQ", "LEQ", "ONEDIR", "ONEDIRBACK", "BIDIR", "NOTONEDIR",
+ "NOTBIDIR", "NETWORK", "MODEL", "ASSETS", "COLON", "FACTS", "PERIOD",
+ "SEMI", "QUALITY", "COMMA", "TOPOLOGY", "WHITESPACE", "TAGS", "$accept",
+ "root", "assets", "assetlist", "asset", "tags", "facts", "factlist", "f",
+ "statement", "value", "number", "operator", "relop", "direction", 0
};
-
-static const char *
-yysymbol_name (yysymbol_kind_t yysymbol)
-{
- return yytname[yysymbol];
-}
#endif
-#define YYPACT_NINF (-13)
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282
+};
+# endif
-#define yypact_value_is_default(Yyn) \
- ((Yyn) == YYPACT_NINF)
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 28, 29, 30, 31, 31, 32, 33, 33, 34,
+ 35, 35, 36, 36, 37, 37, 38, 38, 39, 39,
+ 40, 40, 41, 41, 41, 41, 42, 42, 42, 42,
+ 42
+};
-#define YYTABLE_NINF (-1)
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 7, 3, 0, 2, 2, 0, 2, 3,
+ 0, 2, 6, 8, 1, 3, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1
+};
-#define yytable_value_is_error(Yyn) \
- 0
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 0, 0, 0, 0, 1, 0, 0, 0, 4, 0,
+ 7, 3, 10, 0, 0, 0, 5, 9, 8, 2,
+ 6, 0, 0, 11, 0, 0, 0, 0, 0, 27,
+ 28, 26, 30, 29, 0, 14, 0, 0, 21, 22,
+ 23, 24, 25, 0, 20, 12, 0, 16, 18, 19,
+ 15, 17, 0, 13
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
+{
+ -1, 2, 7, 11, 16, 14, 10, 17, 23, 36,
+ 50, 51, 43, 44, 34
+};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
+#define YYPACT_NINF -13
static const yytype_int8 yypact[] =
{
-2, 13, 17, 12, -13, 1, 2, 0, -13, 3,
@@ -611,19 +563,6 @@ static const yytype_int8 yypact[] =
-13, -13, 16, -13
};
-/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE does not specify something else to do. Zero
- means the default is an error. */
-static const yytype_int8 yydefact[] =
-{
- 0, 0, 0, 0, 1, 0, 0, 0, 4, 0,
- 7, 3, 10, 0, 0, 0, 5, 9, 8, 2,
- 6, 0, 0, 11, 0, 0, 0, 0, 0, 27,
- 28, 26, 30, 29, 0, 14, 0, 0, 21, 22,
- 23, 24, 25, 0, 20, 12, 0, 16, 18, 19,
- 15, 17, 0, 13
-};
-
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
@@ -631,17 +570,12 @@ static const yytype_int8 yypgoto[] =
-13, -13, -13, -13, -13
};
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int8 yydefgoto[] =
-{
- 0, 2, 7, 11, 16, 14, 10, 17, 23, 36,
- 50, 51, 43, 44, 34
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule whose
- number is the opposite. If YYTABLE_NINF, syntax error. */
-static const yytype_int8 yytable[] =
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -1
+static const yytype_uint8 yytable[] =
{
29, 30, 31, 32, 33, 38, 39, 40, 41, 42,
47, 48, 49, 21, 1, 22, 3, 4, 5, 6,
@@ -657,9 +591,9 @@ static const yytype_int8 yycheck[] =
22, 3, 3, 3, 46, 24, 22, -1, 22, 24
};
-/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
- state STATE-NUM. */
-static const yytype_int8 yystos[] =
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
{
0, 16, 29, 3, 0, 6, 18, 30, 19, 20,
34, 31, 19, 27, 33, 3, 32, 35, 19, 21,
@@ -669,59 +603,95 @@ static const yytype_int8 yystos[] =
38, 39, 37, 22
};
-/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
-static const yytype_int8 yyr1[] =
-{
- 0, 28, 29, 30, 31, 31, 32, 33, 33, 34,
- 35, 35, 36, 36, 37, 37, 38, 38, 39, 39,
- 40, 40, 41, 41, 41, 41, 42, 42, 42, 42,
- 42
-};
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
-/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
-static const yytype_int8 yyr2[] =
-{
- 0, 2, 7, 3, 0, 2, 2, 0, 2, 3,
- 0, 2, 6, 8, 1, 3, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1
-};
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
-enum { YYENOMEM = -2 };
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-#define YYNOMEM goto yyexhaustedlab
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(Token, Value) \
- do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (nm, YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
- while (0)
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK (1); \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (nm, YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (YYID (0))
-/* Backward compatibility with an undocumented macro.
- Use YYerror or YYUNDEF. */
-#define YYERRCODE YYUNDEF
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (YYID (N)) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
/* Enable debugging if requested. */
#if YYDEBUG
@@ -731,59 +701,83 @@ enum { YYENOMEM = -2 };
# define YYFPRINTF fprintf
# endif
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (0)
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, nm); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (YYID (0))
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
-
-# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Kind, Value, nm); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (0)
-
-
-/*-----------------------------------.
-| Print this symbol's value on YYO. |
-`-----------------------------------*/
-
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_symbol_value_print (FILE *yyo,
- yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, struct networkmodel* nm)
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct networkmodel* nm)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep, nm)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+ struct networkmodel* nm;
+#endif
{
- FILE *yyoutput = yyo;
- YY_USE (yyoutput);
- YY_USE (nm);
if (!yyvaluep)
return;
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- YY_USE (yykind);
- YY_IGNORE_MAYBE_UNINITIALIZED_END
+ YYUSE (nm);
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+ YYUSE (yyoutput);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
}
-/*---------------------------.
-| Print this symbol on YYO. |
-`---------------------------*/
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_symbol_print (FILE *yyo,
- yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, struct networkmodel* nm)
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct networkmodel* nm)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep, nm)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+ struct networkmodel* nm;
+#endif
{
- YYFPRINTF (yyo, "%s %s (",
- yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
- yy_symbol_value_print (yyo, yykind, yyvaluep, nm);
- YYFPRINTF (yyo, ")");
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, nm);
+ YYFPRINTF (yyoutput, ")");
}
/*------------------------------------------------------------------.
@@ -791,8 +785,16 @@ yy_symbol_print (FILE *yyo,
| TOP (included). |
`------------------------------------------------------------------*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+#else
+static void
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
+#endif
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -803,56 +805,64 @@ yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
YYFPRINTF (stderr, "\n");
}
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (0)
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (YYID (0))
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
- int yyrule, struct networkmodel* nm)
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct networkmodel* nm)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule, nm)
+ YYSTYPE *yyvsp;
+ int yyrule;
+ struct networkmodel* nm;
+#endif
{
- int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
- yyrule - 1, yylno);
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr,
- YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
- &yyvsp[(yyi + 1) - (yynrhs)], nm);
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , nm);
YYFPRINTF (stderr, "\n");
}
}
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyssp, yyvsp, Rule, nm); \
-} while (0)
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyvsp, Rule, nm); \
+} while (YYID (0))
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
-# define YYDPRINTF(Args) ((void) 0)
-# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
@@ -867,81 +877,49 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
+
-/* Context of a parse error. */
-typedef struct
-{
- yy_state_t *yyssp;
- yysymbol_kind_t yytoken;
-} yypcontext_t;
+#if YYERROR_VERBOSE
-/* Put in YYARG at most YYARGN of the expected tokens given the
- current YYCTX, and return the number of tokens stored in YYARG. If
- YYARG is null, return the number of expected tokens (guaranteed to
- be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
- Return 0 if there are more than YYARGN expected tokens, yet fill
- YYARG up to YYARGN. */
-static int
-yypcontext_expected_tokens (const yypcontext_t *yyctx,
- yysymbol_kind_t yyarg[], int yyargn)
-{
- /* Actual size of YYARG. */
- int yycount = 0;
- int yyn = yypact[+*yyctx->yyssp];
- if (!yypact_value_is_default (yyn))
- {
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. In other words, skip the first -YYN actions for
- this state because they are default actions. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yyx;
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
- && !yytable_value_is_error (yytable[yyx + yyn]))
- {
- if (!yyarg)
- ++yycount;
- else if (yycount == yyargn)
- return 0;
- else
- yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
- }
- }
- if (yyarg && yycount == 0 && 0 < yyargn)
- yyarg[0] = YYSYMBOL_YYEMPTY;
- return yycount;
-}
-
-
-
-
-#ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
-# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
-# else
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
/* Return the length of YYSTR. */
-static YYPTRDIFF_T
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+ const char *yystr;
+#endif
{
- YYPTRDIFF_T yylen;
+ YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
continue;
return yylen;
}
+# endif
# endif
-#endif
-#ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-# define yystpcpy stpcpy
-# else
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+#endif
{
char *yyd = yydest;
const char *yys = yysrc;
@@ -951,10 +929,10 @@ yystpcpy (char *yydest, const char *yysrc)
return yyd - 1;
}
+# endif
# endif
-#endif
-#ifndef yytnamerr
+# ifndef yytnamerr
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
quotes and backslashes, so that it's suitable for yyerror. The
heuristic is that double-quoting is unnecessary unless the string
@@ -962,254 +940,281 @@ yystpcpy (char *yydest, const char *yysrc)
backslash-backslash). YYSTR is taken from yytname. If YYRES is
null, do not copy; instead, return the length of what the result
would have been. */
-static YYPTRDIFF_T
+static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
if (*yystr == '"')
{
- YYPTRDIFF_T yyn = 0;
+ YYSIZE_T yyn = 0;
char const *yyp = yystr;
+
for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- else
- goto append;
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
- append:
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
do_not_strip_quotes: ;
}
- if (yyres)
- return yystpcpy (yyres, yystr) - yyres;
- else
+ if (! yyres)
return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
}
-#endif
+# endif
-
-static int
-yy_syntax_error_arguments (const yypcontext_t *yyctx,
- yysymbol_kind_t yyarg[], int yyargn)
+/* Copy into YYRESULT an error message about the unexpected token
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
{
- /* Actual size of YYARG. */
- int yycount = 0;
- /* There are many possibilities here to consider:
- - If this state is a consistent state with a default action, then
- the only way this function was invoked is if the default action
- is an error action. In that case, don't check for expected
- tokens because there are none.
- - The only way there can be no lookahead present (in yychar) is if
- this state is a consistent state with a default action. Thus,
- detecting the absence of a lookahead is sufficient to determine
- that there is no unexpected or expected token to report. In that
- case, just report a simple "syntax error".
- - Don't assume there isn't a lookahead just because this state is a
- consistent state with a default action. There might have been a
- previous inconsistent state, consistent state with a non-default
- action, or user semantic action that manipulated yychar.
- - Of course, the expected token list depends on states to have
- correct lookahead information, and it depends on the parser not
- to perform extra reductions after fetching a lookahead from the
- scanner and before detecting a syntax error. Thus, state merging
- (from LALR or IELR) and default reductions corrupt the expected
- token list. However, the list is correct for canonical LR with
- one exception: it will still contain any token that will not be
- accepted due to an error action in a later state.
- */
- if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
+ int yyn = yypact[yystate];
+
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+ return 0;
+ else
{
- int yyn;
- if (yyarg)
- yyarg[yycount] = yyctx->yytoken;
- ++yycount;
- yyn = yypcontext_expected_tokens (yyctx,
- yyarg ? yyarg + 1 : yyarg, yyargn - 1);
- if (yyn == YYENOMEM)
- return YYENOMEM;
- else
- yycount += yyn;
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+
+ if (yysize_overflow)
+ return YYSIZE_MAXIMUM;
+
+ if (yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yyresult;
+ int yyi = 0;
+ while ((*yyp = *yyf) != '\0')
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ }
+ return yysize;
}
- return yycount;
}
-
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
- about the unexpected token YYTOKEN for the state stack whose top is
- YYSSP.
-
- Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
- not large enough to hold the message. In that case, also set
- *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
- required number of bytes is too large to store. */
-static int
-yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
- const yypcontext_t *yyctx)
-{
- enum { YYARGS_MAX = 5 };
- /* Internationalized format string. */
- const char *yyformat = YY_NULLPTR;
- /* Arguments of yyformat: reported tokens (one for the "unexpected",
- one per "expected"). */
- yysymbol_kind_t yyarg[YYARGS_MAX];
- /* Cumulated lengths of YYARG. */
- YYPTRDIFF_T yysize = 0;
-
- /* Actual size of YYARG. */
- int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
- if (yycount == YYENOMEM)
- return YYENOMEM;
-
- switch (yycount)
- {
-#define YYCASE_(N, S) \
- case N: \
- yyformat = S; \
- break
- default: /* Avoid compiler warnings. */
- YYCASE_(0, YY_("syntax error"));
- YYCASE_(1, YY_("syntax error, unexpected %s"));
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-#undef YYCASE_
- }
-
- /* Compute error message size. Don't count the "%s"s, but reserve
- room for the terminator. */
- yysize = yystrlen (yyformat) - 2 * yycount + 1;
- {
- int yyi;
- for (yyi = 0; yyi < yycount; ++yyi)
- {
- YYPTRDIFF_T yysize1
- = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
- yysize = yysize1;
- else
- return YYENOMEM;
- }
- }
-
- if (*yymsg_alloc < yysize)
- {
- *yymsg_alloc = 2 * yysize;
- if (! (yysize <= *yymsg_alloc
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
- return -1;
- }
-
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- {
- char *yyp = *yymsg;
- int yyi = 0;
- while ((*yyp = *yyformat) != '\0')
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
- yyformat += 2;
- }
- else
- {
- ++yyp;
- ++yyformat;
- }
- }
- return 0;
-}
-
+#endif /* YYERROR_VERBOSE */
+
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yydestruct (const char *yymsg,
- yysymbol_kind_t yykind, YYSTYPE *yyvaluep, struct networkmodel* nm)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct networkmodel* nm)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep, nm)
+ const char *yymsg;
+ int yytype;
+ YYSTYPE *yyvaluep;
+ struct networkmodel* nm;
+#endif
{
- YY_USE (yyvaluep);
- YY_USE (nm);
+ YYUSE (yyvaluep);
+ YYUSE (nm);
+
if (!yymsg)
yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- YY_USE (yykind);
- YY_IGNORE_MAYBE_UNINITIALIZED_END
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
}
+/* Prevent warnings from -Wmissing-prototypes. */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (struct networkmodel* nm);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
-/* Lookahead token kind. */
+
+/* The lookahead symbol. */
int yychar;
/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
+
/* Number of syntax errors so far. */
int yynerrs;
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
-/*----------.
-| yyparse. |
-`----------*/
-
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
int
yyparse (struct networkmodel* nm)
+#else
+int
+yyparse (nm)
+ struct networkmodel* nm;
+#endif
+#endif
{
- yy_state_fast_t yystate = 0;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus = 0;
- /* Refer to the stacks through separate pointers, to allow yyoverflow
+
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
- /* Their size. */
- YYPTRDIFF_T yystacksize = YYINITDEPTH;
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
- /* The state stack: array, bottom, top. */
- yy_state_t yyssa[YYINITDEPTH];
- yy_state_t *yyss = yyssa;
- yy_state_t *yyssp = yyss;
-
- /* The semantic value stack: array, bottom, top. */
+ /* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp = yyvs;
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYSIZE_T yystacksize;
int yyn;
- /* The return value of yyparse. */
int yyresult;
- /* Lookahead symbol kind. */
- yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
+#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
char *yymsg = yymsgbuf;
- YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
@@ -1217,140 +1222,133 @@ yyparse (struct networkmodel* nm)
Keep to zero when no symbol should be popped. */
int yylen = 0;
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
YYDPRINTF ((stderr, "Starting parse\n"));
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+ yyssp = yyss;
+ yyvsp = yyvs;
+
goto yysetstate;
-
/*------------------------------------------------------------.
-| yynewstate -- push a new state, which is found in yystate. |
+| yynewstate -- Push a new state, which is found in yystate. |
`------------------------------------------------------------*/
-yynewstate:
+ yynewstate:
/* In all cases, when you get here, the value and location stacks
have just been pushed. So pushing a state here evens the stacks. */
yyssp++;
-
-/*--------------------------------------------------------------------.
-| yysetstate -- set current state (the top of the stack) to yystate. |
-`--------------------------------------------------------------------*/
-yysetstate:
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
- YY_IGNORE_USELESS_CAST_BEGIN
- *yyssp = YY_CAST (yy_state_t, yystate);
- YY_IGNORE_USELESS_CAST_END
- YY_STACK_PRINT (yyss, yyssp);
+ yysetstate:
+ *yyssp = yystate;
if (yyss + yystacksize - 1 <= yyssp)
-#if !defined yyoverflow && !defined YYSTACK_RELOCATE
- YYNOMEM;
-#else
{
/* Get the current used size of the three stacks, in elements. */
- YYPTRDIFF_T yysize = yyssp - yyss + 1;
+ YYSIZE_T yysize = yyssp - yyss + 1;
-# if defined yyoverflow
+#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- yy_state_t *yyss1 = yyss;
- YYSTYPE *yyvs1 = yyvs;
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * YYSIZEOF (*yyssp),
- &yyvs1, yysize * YYSIZEOF (*yyvsp),
- &yystacksize);
- yyss = yyss1;
- yyvs = yyvs1;
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
}
-# else /* defined YYSTACK_RELOCATE */
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- YYNOMEM;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
+ yystacksize = YYMAXDEPTH;
{
- yy_state_t *yyss1 = yyss;
- union yyalloc *yyptr =
- YY_CAST (union yyalloc *,
- YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
- if (! yyptr)
- YYNOMEM;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
}
# endif
+#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
- YY_IGNORE_USELESS_CAST_BEGIN
- YYDPRINTF ((stderr, "Stack size increased to %ld\n",
- YY_CAST (long, yystacksize)));
- YY_IGNORE_USELESS_CAST_END
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ YYABORT;
}
-#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
if (yystate == YYFINAL)
YYACCEPT;
goto yybackup;
-
/*-----------.
| yybackup. |
`-----------*/
yybackup:
+
/* Do appropriate processing given the current state. Read a
lookahead token if we need one and don't already have one. */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
- if (yypact_value_is_default (yyn))
+ if (yyn == YYPACT_NINF)
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
- YYDPRINTF ((stderr, "Reading a token\n"));
- yychar = yylex ();
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
}
if (yychar <= YYEOF)
{
- yychar = YYEOF;
- yytoken = YYSYMBOL_YYEOF;
+ yychar = yytoken = YYEOF;
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
- else if (yychar == YYerror)
- {
- /* The scanner already issued an error message, process directly
- to error recovery. But do not keep the error token as
- lookahead, it is too special and may lead us to an endless
- loop in error recovery. */
- yychar = YYUNDEF;
- yytoken = YYSYMBOL_YYerror;
- goto yyerrlab1;
- }
else
{
yytoken = YYTRANSLATE (yychar);
@@ -1365,8 +1363,8 @@ yybackup:
yyn = yytable[yyn];
if (yyn <= 0)
{
- if (yytable_value_is_error (yyn))
- goto yyerrlab;
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
@@ -1378,13 +1376,13 @@ yybackup:
/* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- yystate = yyn;
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- *++yyvsp = yylval;
- YY_IGNORE_MAYBE_UNINITIALIZED_END
/* Discard the shifted token. */
yychar = YYEMPTY;
+
+ yystate = yyn;
+ *++yyvsp = yylval;
+
goto yynewstate;
@@ -1399,14 +1397,14 @@ yydefault:
/*-----------------------------.
-| yyreduce -- do a reduction. |
+| yyreduce -- Do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
- '$$ = $1'.
+ `$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
@@ -1419,238 +1417,247 @@ yyreduce:
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
- case 2: /* root: NETWORK IDENTIFIER EQ assets facts tags PERIOD */
-#line 52 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
- {}
-#line 1426 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
+ case 2:
+
+/* Line 1455 of yacc.c */
+#line 52 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+ {;}
break;
- case 3: /* assets: ASSETS COLON assetlist */
-#line 55 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
- {}
-#line 1432 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
+ case 3:
+
+/* Line 1455 of yacc.c */
+#line 55 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+ {;}
break;
- case 4: /* assetlist: %empty */
-#line 58 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
- {}
-#line 1438 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
+ case 4:
+
+/* Line 1455 of yacc.c */
+#line 58 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+ {;}
break;
- case 5: /* assetlist: assetlist asset */
-#line 59 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
- {
- list_add(nm->assets, (yyvsp[0].string));
- }
-#line 1446 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
+ case 5:
+
+/* Line 1455 of yacc.c */
+#line 59 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+ {
+ list_add(nm->assets, (yyvsp[(2) - (2)].string));
+ ;}
break;
- case 6: /* asset: IDENTIFIER SEMI */
-#line 64 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
- { (yyval.string) = (yyvsp[-1].string); }
-#line 1452 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
+ case 6:
+
+/* Line 1455 of yacc.c */
+#line 64 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+ { (yyval.string) = (yyvsp[(1) - (2)].string); ;}
break;
- case 7: /* tags: %empty */
-#line 67 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
- {}
-#line 1458 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
+ case 7:
+
+/* Line 1455 of yacc.c */
+#line 67 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+ {;}
break;
- case 8: /* tags: TAGS COLON */
-#line 68 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
- {}
-#line 1464 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
+ case 8:
+
+/* Line 1455 of yacc.c */
+#line 68 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+ {;}
break;
- case 9: /* facts: FACTS COLON factlist */
-#line 71 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
- { nm->facts = (yyvsp[0].lst); }
-#line 1470 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
+ case 9:
+
+/* Line 1455 of yacc.c */
+#line 71 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+ { nm->facts = (yyvsp[(3) - (3)].lst); ;}
break;
- case 10: /* factlist: %empty */
-#line 74 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
- { (yyval.lst) = NULL; }
-#line 1476 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
+ case 10:
+
+/* Line 1455 of yacc.c */
+#line 74 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+ { (yyval.lst) = NULL; ;}
break;
- case 11: /* factlist: factlist f */
-#line 75 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
- {
- if((yyvsp[-1].lst) == NULL) {
+ case 11:
+
+/* Line 1455 of yacc.c */
+#line 75 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+ {
+ if((yyvsp[(1) - (2)].lst) == NULL) {
(yyval.lst) = list_new();
- list_add((yyval.lst), (yyvsp[0].fct));
+ list_add((yyval.lst), (yyvsp[(2) - (2)].fct));
} else {
- list_add((yyval.lst), (yyvsp[0].fct));
- (yyval.lst) = (yyvsp[-1].lst);
+ list_add((yyval.lst), (yyvsp[(2) - (2)].fct));
+ (yyval.lst) = (yyvsp[(1) - (2)].lst);
}
- }
-#line 1490 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
+ ;}
break;
- case 12: /* f: QUALITY COLON IDENTIFIER COMMA statement SEMI */
-#line 86 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
- {
+ case 12:
+
+/* Line 1455 of yacc.c */
+#line 86 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+ {
statement *st = getmem(sizeof(struct statement));
- st->obj = (yyvsp[-1].st)->obj;
- st->op = (yyvsp[-1].st)->op;
- st->val = (yyvsp[-1].st)->val;
+ st->obj = (yyvsp[(5) - (6)].st)->obj;
+ st->op = (yyvsp[(5) - (6)].st)->op;
+ st->val = (yyvsp[(5) - (6)].st)->val;
struct fact *fct = getmem(sizeof(struct fact));
fct->type = QUALITY_T;
- fct->from = (yyvsp[-3].string);
+ fct->from = (yyvsp[(3) - (6)].string);
fct->dir = NULL;
fct->to = NULL;
fct->st = st;
(yyval.fct) = fct;
- }
-#line 1510 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
+ ;}
break;
- case 13: /* f: TOPOLOGY COLON IDENTIFIER direction IDENTIFIER COMMA statement SEMI */
-#line 101 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
- {
- struct statement* st = (yyvsp[-1].st);
- st->obj = (yyvsp[-1].st)->obj;
- st->op = (yyvsp[-1].st)->op;
- st->val = (yyvsp[-1].st)->val;
+ case 13:
+
+/* Line 1455 of yacc.c */
+#line 101 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+ {
+ struct statement* st = (yyvsp[(7) - (8)].st);
+ st->obj = (yyvsp[(7) - (8)].st)->obj;
+ st->op = (yyvsp[(7) - (8)].st)->op;
+ st->val = (yyvsp[(7) - (8)].st)->val;
struct fact *fct = getmem(sizeof(struct fact));
fct->type = TOPOLOGY_T;
- fct->from = (yyvsp[-5].string);
- fct->dir = (yyvsp[-4].string);
- fct->to = (yyvsp[-3].string);
+ fct->from = (yyvsp[(3) - (8)].string);
+ fct->dir = (yyvsp[(4) - (8)].string);
+ fct->to = (yyvsp[(5) - (8)].string);
fct->st = st;
(yyval.fct) = fct;
- }
-#line 1530 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
+ ;}
break;
- case 14: /* statement: IDENTIFIER */
-#line 119 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
- {
+ case 14:
+
+/* Line 1455 of yacc.c */
+#line 119 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+ {
struct statement* st = getmem(sizeof(struct statement));
- st->obj = (yyvsp[0].string);
+ st->obj = (yyvsp[(1) - (1)].string);
st->op = "";
st->val = "";
(yyval.st) = st;
- }
-#line 1542 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
+ ;}
break;
- case 15: /* statement: IDENTIFIER operator value */
-#line 126 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
- {
+ case 15:
+
+/* Line 1455 of yacc.c */
+#line 126 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+ {
struct statement* st = getmem(sizeof(struct statement));
- st->obj = (yyvsp[-2].string);
- st->op = (yyvsp[-1].string);
- st->val = (yyvsp[0].string);
+ st->obj = (yyvsp[(1) - (3)].string);
+ st->op = (yyvsp[(2) - (3)].string);
+ st->val = (yyvsp[(3) - (3)].string);
(yyval.st) = st;
- }
-#line 1554 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
+ ;}
break;
-#line 1558 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c"
+/* Line 1455 of yacc.c */
+#line 1572 "/home/nschrick/ag_parallel/build/nm_parser.c"
default: break;
}
- /* User semantic actions sometimes alter yychar, and that requires
- that yytoken be updated with the new translation. We take the
- approach of translating immediately before every use of yytoken.
- One alternative is translating here after every semantic action,
- but that translation would be missed if the semantic action invokes
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
- incorrect destructor might then be invoked immediately. In the
- case of YYERROR or YYBACKUP, subsequent parser actions might lead
- to an incorrect destructor call or verbose syntax error message
- before the lookahead is translated. */
- YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
- /* Now 'shift' the result of the reduction. Determine what state
+ /* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
- {
- const int yylhs = yyr1[yyn] - YYNTOKENS;
- const int yyi = yypgoto[yylhs] + *yyssp;
- yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
- ? yytable[yyi]
- : yydefgoto[yylhs]);
- }
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
goto yynewstate;
-/*--------------------------------------.
-| yyerrlab -- here on detecting error. |
-`--------------------------------------*/
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
yyerrlab:
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (nm, YY_("syntax error"));
+#else
{
- yypcontext_t yyctx
- = {yyssp, yytoken};
- char const *yymsgp = YY_("syntax error");
- int yysyntax_error_status;
- yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
- if (yysyntax_error_status == 0)
- yymsgp = yymsg;
- else if (yysyntax_error_status == -1)
- {
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = YY_CAST (char *,
- YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
- if (yymsg)
- {
- yysyntax_error_status
- = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
- yymsgp = yymsg;
- }
- else
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- yysyntax_error_status = YYENOMEM;
- }
- }
- yyerror (nm, yymsgp);
- if (yysyntax_error_status == YYENOMEM)
- YYNOMEM;
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+ {
+ YYSIZE_T yyalloc = 2 * yysize;
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+ if (yymsg)
+ yymsg_alloc = yyalloc;
+ else
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ }
+ }
+
+ if (0 < yysize && yysize <= yymsg_alloc)
+ {
+ (void) yysyntax_error (yymsg, yystate, yychar);
+ yyerror (nm, yymsg);
+ }
+ else
+ {
+ yyerror (nm, YY_("syntax error"));
+ if (yysize != 0)
+ goto yyexhaustedlab;
+ }
}
+#endif
}
+
+
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
- error, discard it. */
+ error, discard it. */
if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval, nm);
- yychar = YYEMPTY;
- }
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, nm);
+ yychar = YYEMPTY;
+ }
}
/* Else will try to reuse lookahead token after shifting the error
@@ -1662,13 +1669,14 @@ yyerrlab:
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
yyerrorlab:
- /* Pacify compilers when the user code never invokes YYERROR and the
- label yyerrorlab therefore never appears in user code. */
- if (0)
- YYERROR;
- ++yynerrs;
- /* Do not reclaim the symbols of the rule whose action triggered
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
+
+ /* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
@@ -1681,42 +1689,39 @@ yyerrorlab:
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
- /* Pop stack until we find a state that shifts the error token. */
for (;;)
{
yyn = yypact[yystate];
- if (!yypact_value_is_default (yyn))
- {
- yyn += YYSYMBOL_YYerror;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
- YYABORT;
+ YYABORT;
yydestruct ("Error: popping",
- YY_ACCESSING_SYMBOL (yystate), yyvsp, nm);
+ yystos[yystate], yyvsp, nm);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
- YY_IGNORE_MAYBE_UNINITIALIZED_END
/* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
@@ -1727,58 +1732,55 @@ yyerrlab1:
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
- goto yyreturnlab;
-
+ goto yyreturn;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
yyresult = 1;
- goto yyreturnlab;
+ goto yyreturn;
-
-/*-----------------------------------------------------------.
-| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
-`-----------------------------------------------------------*/
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
yyexhaustedlab:
yyerror (nm, YY_("memory exhausted"));
yyresult = 2;
- goto yyreturnlab;
+ /* Fall through. */
+#endif
-
-/*----------------------------------------------------------.
-| yyreturnlab -- parsing is finished, clean up and return. |
-`----------------------------------------------------------*/
-yyreturnlab:
+yyreturn:
if (yychar != YYEMPTY)
- {
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = YYTRANSLATE (yychar);
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval, nm);
- }
- /* Do not reclaim the symbols of the rule whose action triggered
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, nm);
+ /* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, nm);
+ yystos[*yyssp], yyvsp, nm);
YYPOPSTACK (1);
}
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
+#if YYERROR_VERBOSE
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
- return yyresult;
+#endif
+ /* Make sure YYID is used. */
+ return YYID (yyresult);
}
-#line 165 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+
+
+/* Line 1675 of yacc.c */
+#line 165 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
/*
@@ -1877,3 +1879,4 @@ void yyerror(struct networkmodel* nm, char const *s) {
fprintf(stderr, "Line %d: %s\n", nmlineno, s);
exit(-1);
}
+
diff --git a/build/nm_parser.tab.h b/build/nm_parser.tab.h
index ca17fe4..b2e8fff 100644
--- a/build/nm_parser.tab.h
+++ b/build/nm_parser.tab.h
@@ -1,22 +1,23 @@
-/* A Bison parser, made by GNU Bison 3.8.2. */
-/* Bison interface for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
- Inc.
+/* A Bison parser, made by GNU Bison 2.4.1. */
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program. If not, see . */
+ along with this program. If not, see . */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -27,67 +28,53 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
- especially those whose name start with YY_ or yy_. They are
- private implementation details that can be changed or removed. */
-#ifndef YY_NM_HOME_NOAH_DOCUMENTS_SCHOOL_THESIS_WORK_AG_PARALLEL_BUILD_NM_PARSER_TAB_H_INCLUDED
-# define YY_NM_HOME_NOAH_DOCUMENTS_SCHOOL_THESIS_WORK_AG_PARALLEL_BUILD_NM_PARSER_TAB_H_INCLUDED
-/* Debug traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-#if YYDEBUG
-extern int nmdebug;
-#endif
-
-/* Token kinds. */
+/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- enum yytokentype
- {
- YYEMPTY = -2,
- YYEOF = 0, /* "end of file" */
- YYerror = 256, /* error */
- YYUNDEF = 257, /* "invalid token" */
- IDENTIFIER = 258, /* IDENTIFIER */
- INT = 259, /* INT */
- FLOAT = 260, /* FLOAT */
- EQ = 261, /* EQ */
- GT = 262, /* GT */
- LT = 263, /* LT */
- GEQ = 264, /* GEQ */
- LEQ = 265, /* LEQ */
- ONEDIR = 266, /* ONEDIR */
- ONEDIRBACK = 267, /* ONEDIRBACK */
- BIDIR = 268, /* BIDIR */
- NOTONEDIR = 269, /* NOTONEDIR */
- NOTBIDIR = 270, /* NOTBIDIR */
- NETWORK = 271, /* NETWORK */
- MODEL = 272, /* MODEL */
- ASSETS = 273, /* ASSETS */
- COLON = 274, /* COLON */
- FACTS = 275, /* FACTS */
- PERIOD = 276, /* PERIOD */
- SEMI = 277, /* SEMI */
- QUALITY = 278, /* QUALITY */
- COMMA = 279, /* COMMA */
- TOPOLOGY = 280, /* TOPOLOGY */
- WHITESPACE = 281, /* WHITESPACE */
- TAGS = 282 /* TAGS */
- };
- typedef enum yytokentype yytoken_kind_t;
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ IDENTIFIER = 258,
+ INT = 259,
+ FLOAT = 260,
+ EQ = 261,
+ GT = 262,
+ LT = 263,
+ GEQ = 264,
+ LEQ = 265,
+ ONEDIR = 266,
+ ONEDIRBACK = 267,
+ BIDIR = 268,
+ NOTONEDIR = 269,
+ NOTBIDIR = 270,
+ NETWORK = 271,
+ MODEL = 272,
+ ASSETS = 273,
+ COLON = 274,
+ FACTS = 275,
+ PERIOD = 276,
+ SEMI = 277,
+ QUALITY = 278,
+ COMMA = 279,
+ TOPOLOGY = 280,
+ WHITESPACE = 281,
+ TAGS = 282
+ };
#endif
-/* Value type. */
+
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-union YYSTYPE
+typedef union YYSTYPE
{
-#line 25 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy"
+
+/* Line 1676 of yacc.c */
+#line 25 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy"
struct str_array* arr;
struct list* lst;
@@ -96,19 +83,16 @@ union YYSTYPE
struct fact *fct;
char* string;
-#line 100 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.tab.h"
-};
-typedef union YYSTYPE YYSTYPE;
+
+/* Line 1676 of yacc.c */
+#line 90 "/home/nschrick/ag_parallel/build/nm_parser.tab.h"
+} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
-
extern YYSTYPE nmlval;
-int nmparse (struct networkmodel* nm);
-
-
-#endif /* !YY_NM_HOME_NOAH_DOCUMENTS_SCHOOL_THESIS_WORK_AG_PARALLEL_BUILD_NM_PARSER_TAB_H_INCLUDED */
diff --git a/build/nm_scanner.c b/build/nm_scanner.c
index 4f96267..fcf275c 100644
--- a/build/nm_scanner.c
+++ b/build/nm_scanner.c
@@ -1,6 +1,6 @@
-#line 1 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c"
+#line 2 "/home/nschrick/ag_parallel/build/nm_scanner.c"
-#line 3 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c"
+#line 4 "/home/nschrick/ag_parallel/build/nm_scanner.c"
#define YY_INT_ALIGNED short int
@@ -8,17 +8,11 @@
#define yy_create_buffer nm_create_buffer
#define yy_delete_buffer nm_delete_buffer
-#define yy_scan_buffer nm_scan_buffer
-#define yy_scan_string nm_scan_string
-#define yy_scan_bytes nm_scan_bytes
+#define yy_flex_debug nm_flex_debug
#define yy_init_buffer nm_init_buffer
#define yy_flush_buffer nm_flush_buffer
#define yy_load_buffer_state nm_load_buffer_state
#define yy_switch_to_buffer nm_switch_to_buffer
-#define yypush_buffer_state nmpush_buffer_state
-#define yypop_buffer_state nmpop_buffer_state
-#define yyensure_buffer_stack nmensure_buffer_stack
-#define yy_flex_debug nm_flex_debug
#define yyin nmin
#define yyleng nmleng
#define yylex nmlex
@@ -33,246 +27,12 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 4
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
-#ifdef yy_create_buffer
-#define nm_create_buffer_ALREADY_DEFINED
-#else
-#define yy_create_buffer nm_create_buffer
-#endif
-
-#ifdef yy_delete_buffer
-#define nm_delete_buffer_ALREADY_DEFINED
-#else
-#define yy_delete_buffer nm_delete_buffer
-#endif
-
-#ifdef yy_scan_buffer
-#define nm_scan_buffer_ALREADY_DEFINED
-#else
-#define yy_scan_buffer nm_scan_buffer
-#endif
-
-#ifdef yy_scan_string
-#define nm_scan_string_ALREADY_DEFINED
-#else
-#define yy_scan_string nm_scan_string
-#endif
-
-#ifdef yy_scan_bytes
-#define nm_scan_bytes_ALREADY_DEFINED
-#else
-#define yy_scan_bytes nm_scan_bytes
-#endif
-
-#ifdef yy_init_buffer
-#define nm_init_buffer_ALREADY_DEFINED
-#else
-#define yy_init_buffer nm_init_buffer
-#endif
-
-#ifdef yy_flush_buffer
-#define nm_flush_buffer_ALREADY_DEFINED
-#else
-#define yy_flush_buffer nm_flush_buffer
-#endif
-
-#ifdef yy_load_buffer_state
-#define nm_load_buffer_state_ALREADY_DEFINED
-#else
-#define yy_load_buffer_state nm_load_buffer_state
-#endif
-
-#ifdef yy_switch_to_buffer
-#define nm_switch_to_buffer_ALREADY_DEFINED
-#else
-#define yy_switch_to_buffer nm_switch_to_buffer
-#endif
-
-#ifdef yypush_buffer_state
-#define nmpush_buffer_state_ALREADY_DEFINED
-#else
-#define yypush_buffer_state nmpush_buffer_state
-#endif
-
-#ifdef yypop_buffer_state
-#define nmpop_buffer_state_ALREADY_DEFINED
-#else
-#define yypop_buffer_state nmpop_buffer_state
-#endif
-
-#ifdef yyensure_buffer_stack
-#define nmensure_buffer_stack_ALREADY_DEFINED
-#else
-#define yyensure_buffer_stack nmensure_buffer_stack
-#endif
-
-#ifdef yylex
-#define nmlex_ALREADY_DEFINED
-#else
-#define yylex nmlex
-#endif
-
-#ifdef yyrestart
-#define nmrestart_ALREADY_DEFINED
-#else
-#define yyrestart nmrestart
-#endif
-
-#ifdef yylex_init
-#define nmlex_init_ALREADY_DEFINED
-#else
-#define yylex_init nmlex_init
-#endif
-
-#ifdef yylex_init_extra
-#define nmlex_init_extra_ALREADY_DEFINED
-#else
-#define yylex_init_extra nmlex_init_extra
-#endif
-
-#ifdef yylex_destroy
-#define nmlex_destroy_ALREADY_DEFINED
-#else
-#define yylex_destroy nmlex_destroy
-#endif
-
-#ifdef yyget_debug
-#define nmget_debug_ALREADY_DEFINED
-#else
-#define yyget_debug nmget_debug
-#endif
-
-#ifdef yyset_debug
-#define nmset_debug_ALREADY_DEFINED
-#else
-#define yyset_debug nmset_debug
-#endif
-
-#ifdef yyget_extra
-#define nmget_extra_ALREADY_DEFINED
-#else
-#define yyget_extra nmget_extra
-#endif
-
-#ifdef yyset_extra
-#define nmset_extra_ALREADY_DEFINED
-#else
-#define yyset_extra nmset_extra
-#endif
-
-#ifdef yyget_in
-#define nmget_in_ALREADY_DEFINED
-#else
-#define yyget_in nmget_in
-#endif
-
-#ifdef yyset_in
-#define nmset_in_ALREADY_DEFINED
-#else
-#define yyset_in nmset_in
-#endif
-
-#ifdef yyget_out
-#define nmget_out_ALREADY_DEFINED
-#else
-#define yyget_out nmget_out
-#endif
-
-#ifdef yyset_out
-#define nmset_out_ALREADY_DEFINED
-#else
-#define yyset_out nmset_out
-#endif
-
-#ifdef yyget_leng
-#define nmget_leng_ALREADY_DEFINED
-#else
-#define yyget_leng nmget_leng
-#endif
-
-#ifdef yyget_text
-#define nmget_text_ALREADY_DEFINED
-#else
-#define yyget_text nmget_text
-#endif
-
-#ifdef yyget_lineno
-#define nmget_lineno_ALREADY_DEFINED
-#else
-#define yyget_lineno nmget_lineno
-#endif
-
-#ifdef yyset_lineno
-#define nmset_lineno_ALREADY_DEFINED
-#else
-#define yyset_lineno nmset_lineno
-#endif
-
-#ifdef yywrap
-#define nmwrap_ALREADY_DEFINED
-#else
-#define yywrap nmwrap
-#endif
-
-#ifdef yyalloc
-#define nmalloc_ALREADY_DEFINED
-#else
-#define yyalloc nmalloc
-#endif
-
-#ifdef yyrealloc
-#define nmrealloc_ALREADY_DEFINED
-#else
-#define yyrealloc nmrealloc
-#endif
-
-#ifdef yyfree
-#define nmfree_ALREADY_DEFINED
-#else
-#define yyfree nmfree
-#endif
-
-#ifdef yytext
-#define nmtext_ALREADY_DEFINED
-#else
-#define yytext nmtext
-#endif
-
-#ifdef yyleng
-#define nmleng_ALREADY_DEFINED
-#else
-#define yyleng nmleng
-#endif
-
-#ifdef yyin
-#define nmin_ALREADY_DEFINED
-#else
-#define yyin nmin
-#endif
-
-#ifdef yyout
-#define nmout_ALREADY_DEFINED
-#else
-#define yyout nmout
-#endif
-
-#ifdef yy_flex_debug
-#define nm_flex_debug_ALREADY_DEFINED
-#else
-#define yy_flex_debug nm_flex_debug
-#endif
-
-#ifdef yylineno
-#define nmlineno_ALREADY_DEFINED
-#else
-#define yylineno nmlineno
-#endif
-
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@@ -313,6 +73,7 @@ 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
@@ -343,61 +104,63 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
-#ifndef SIZE_MAX
-#define SIZE_MAX (~(size_t)0)
-#endif
-
-#endif /* ! C99 */
-
#endif /* ! FLEXINT_H */
-/* begin standard C++ headers. */
+#ifdef __cplusplus
-/* TODO: this is always defined, so inline it */
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif /* defined (__STDC__) */
+#endif /* ! __cplusplus */
+
+#ifdef YY_USE_CONST
#define yyconst const
-
-#if defined(__GNUC__) && __GNUC__ >= 3
-#define yynoreturn __attribute__((__noreturn__))
#else
-#define yynoreturn
+#define yyconst
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
-/* Promotes a possibly negative, possibly signed char to an
- * integer in range [0..255] for use as an array index.
+/* 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) ((YY_CHAR) (c))
+#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 yyrestart( yyin )
+#define YY_NEW_FILE nmrestart(nmin )
+
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -409,56 +172,50 @@ typedef unsigned int flex_uint32_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
+extern int nmleng;
-extern int yyleng;
-
-extern FILE *yyin, *yyout;
+extern FILE *nmin, *nmout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
+
/* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
* access to the local variable yy_act. Since yyless() is a macro, it would break
- * existing scanners that call yyless() from OUTSIDE yylex.
+ * existing scanners that call yyless() from OUTSIDE nmlex.
* One obvious solution it to make yy_act a global. I tried that, and saw
- * a 5% performance hit in a non-yylineno scanner, because yy_act is
+ * a 5% performance hit in a non-nmlineno scanner, because yy_act is
* normally declared as a register variable-- so it is not worth it.
*/
#define YY_LESS_LINENO(n) \
do { \
int yyl;\
- for ( yyl = n; yyl < yyleng; ++yyl )\
- if ( yytext[yyl] == '\n' )\
- --yylineno;\
- }while(0)
- #define YY_LINENO_REWIND_TO(dst) \
- do {\
- const char *p;\
- for ( p = yy_cp-1; p >= (dst); --p)\
- if ( *p == '\n' )\
- --yylineno;\
+ for ( yyl = n; yyl < nmleng; ++yyl )\
+ if ( nmtext[yyl] == '\n' )\
+ --nmlineno;\
}while(0)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up yytext. */ \
+ /* Undo effects of setting up nmtext. */ \
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 yytext again */ \
+ YY_DO_BEFORE_ACTION; /* set up nmtext again */ \
} \
while ( 0 )
+
#define unput(c) yyunput( c, (yytext_ptr) )
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -471,7 +228,7 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- int yy_buf_size;
+ yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
@@ -499,7 +256,7 @@ struct yy_buffer_state
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.
*/
@@ -516,8 +273,8 @@ struct yy_buffer_state
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via yyrestart()), so that the user can continue scanning by
- * just pointing yyin at a new input file.
+ * (via nmrestart()), so that the user can continue scanning by
+ * just pointing nmin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -527,7 +284,7 @@ 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 = NULL; /**< Stack as an array. */
+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
@@ -538,99 +295,104 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
#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 yytext is formed. */
+/* yy_hold_char holds the character lost when nmtext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int yyleng;
+int nmleng;
/* Points to current character in buffer. */
-static char *yy_c_buf_p = NULL;
+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 yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin. A bit of a hack ...
+/* Flag which is used to allow nmwrap()'s to do buffer switches
+ * instead of setting up a fresh nmin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart ( FILE *input_file );
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
-void yy_delete_buffer ( YY_BUFFER_STATE b );
-void yy_flush_buffer ( YY_BUFFER_STATE b );
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
-void yypop_buffer_state ( void );
+void nmrestart (FILE *input_file );
+void nm_switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE nm_create_buffer (FILE *file,int size );
+void nm_delete_buffer (YY_BUFFER_STATE b );
+void nm_flush_buffer (YY_BUFFER_STATE b );
+void nmpush_buffer_state (YY_BUFFER_STATE new_buffer );
+void nmpop_buffer_state (void );
-static void yyensure_buffer_stack ( void );
-static void yy_load_buffer_state ( void );
-static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
-#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
+static void nmensure_buffer_stack (void );
+static void nm_load_buffer_state (void );
+static void nm_init_buffer (YY_BUFFER_STATE b,FILE *file );
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
+#define YY_FLUSH_BUFFER nm_flush_buffer(YY_CURRENT_BUFFER )
-void *yyalloc ( yy_size_t );
-void *yyrealloc ( void *, yy_size_t );
-void yyfree ( void * );
+YY_BUFFER_STATE nm_scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE nm_scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE nm_scan_bytes (yyconst char *bytes,int len );
+
+void *nmalloc (yy_size_t );
+void *nmrealloc (void *,yy_size_t );
+void nmfree (void * );
+
+#define yy_new_buffer nm_create_buffer
-#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- yyensure_buffer_stack (); \
+ nmensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ nm_create_buffer(nmin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
+
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- yyensure_buffer_stack (); \
+ nmensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ nm_create_buffer(nmin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
+
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-#define nmwrap() (/*CONSTCOND*/1)
+#define nmwrap(n) 1
#define YY_SKIP_YYWRAP
-typedef flex_uint8_t YY_CHAR;
-FILE *yyin = NULL, *yyout = NULL;
+typedef unsigned char YY_CHAR;
+
+FILE *nmin = (FILE *) 0, *nmout = (FILE *) 0;
typedef int yy_state_type;
-extern int yylineno;
-int yylineno = 1;
+extern int nmlineno;
-extern char *yytext;
-#ifdef yytext_ptr
-#undef yytext_ptr
-#endif
-#define yytext_ptr yytext
+int nmlineno = 1;
-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 yynoreturn yy_fatal_error ( const char* msg );
+extern char *nmtext;
+#define yytext_ptr nmtext
+
+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 yytext.
+ * corresponding action - sets up nmtext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
- yyleng = (int) (yy_cp - yy_bp); \
+ nmleng = (size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
+
#define YY_NUM_RULES 28
#define YY_END_OF_BUFFER 29
/* This struct is not used in this scanner,
@@ -640,7 +402,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static const flex_int16_t yy_accept[72] =
+static yyconst flex_int16_t yy_accept[72] =
{ 0,
0, 0, 29, 27, 26, 26, 27, 27, 19, 27,
20, 8, 17, 18, 12, 11, 13, 10, 10, 10,
@@ -652,7 +414,7 @@ static const flex_int16_t yy_accept[72] =
0
} ;
-static const YY_CHAR yy_ec[256] =
+static yyconst flex_int32_t yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
@@ -684,7 +446,7 @@ static const YY_CHAR yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static const YY_CHAR yy_meta[35] =
+static yyconst flex_int32_t yy_meta[35] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
@@ -692,7 +454,7 @@ static const YY_CHAR yy_meta[35] =
2, 2, 2, 2
} ;
-static const flex_int16_t yy_base[74] =
+static yyconst flex_int16_t yy_base[74] =
{ 0,
0, 0, 93, 94, 33, 35, 78, 88, 94, 76,
80, 31, 75, 94, 37, 94, 74, 0, 56, 68,
@@ -704,7 +466,7 @@ static const flex_int16_t yy_base[74] =
94, 51, 41
} ;
-static const flex_int16_t yy_def[74] =
+static yyconst flex_int16_t yy_def[74] =
{ 0,
71, 1, 71, 71, 71, 71, 71, 72, 71, 71,
71, 71, 71, 71, 71, 71, 71, 73, 73, 73,
@@ -716,7 +478,7 @@ static const flex_int16_t yy_def[74] =
0, 71, 71
} ;
-static const flex_int16_t yy_nxt[129] =
+static yyconst flex_int16_t yy_nxt[129] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 4, 19, 18, 18, 20,
@@ -734,7 +496,7 @@ static const flex_int16_t yy_nxt[129] =
71, 71, 71, 71, 71, 71, 71, 71
} ;
-static const flex_int16_t yy_chk[129] =
+static yyconst flex_int16_t yy_chk[129] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -753,7 +515,7 @@ static const flex_int16_t yy_chk[129] =
} ;
/* Table of booleans, true if rule could match eol. */
-static const flex_int32_t yy_rule_can_match_eol[29] =
+static yyconst flex_int32_t yy_rule_can_match_eol[29] =
{ 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, };
@@ -761,8 +523,8 @@ static const flex_int32_t yy_rule_can_match_eol[29] =
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int yy_flex_debug;
-int yy_flex_debug = 0;
+extern int nm_flex_debug;
+int nm_flex_debug = 0;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -771,12 +533,11 @@ int yy_flex_debug = 0;
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-#line 8 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+char *nmtext;
+#line 1 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+#line 8 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
#include "nm_parser.tab.h"
-#line 778 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c"
-#line 779 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c"
+#line 541 "/home/nschrick/ag_parallel/build/nm_scanner.c"
#define INITIAL 0
@@ -792,36 +553,36 @@ char *yytext;
#define YY_EXTRA_TYPE void *
#endif
-static int yy_init_globals ( void );
+static int yy_init_globals (void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int yylex_destroy ( void );
+int nmlex_destroy (void );
-int yyget_debug ( void );
+int nmget_debug (void );
-void yyset_debug ( int debug_flag );
+void nmset_debug (int debug_flag );
-YY_EXTRA_TYPE yyget_extra ( void );
+YY_EXTRA_TYPE nmget_extra (void );
-void yyset_extra ( YY_EXTRA_TYPE user_defined );
+void nmset_extra (YY_EXTRA_TYPE user_defined );
-FILE *yyget_in ( void );
+FILE *nmget_in (void );
-void yyset_in ( FILE * _in_str );
+void nmset_in (FILE * in_str );
-FILE *yyget_out ( void );
+FILE *nmget_out (void );
-void yyset_out ( FILE * _out_str );
+void nmset_out (FILE * out_str );
- int yyget_leng ( void );
+int nmget_leng (void );
-char *yyget_text ( void );
+char *nmget_text (void );
-int yyget_lineno ( void );
+int nmget_lineno (void );
-void yyset_lineno ( int _line_number );
+void nmset_lineno (int line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -829,43 +590,35 @@ void yyset_lineno ( int _line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap ( void );
+extern "C" int nmwrap (void );
#else
-extern int yywrap ( void );
+extern int nmwrap (void );
#endif
#endif
-#ifndef YY_NO_UNPUT
+ static void yyunput (int c,char *buf_ptr );
- static void yyunput ( int c, char *buf_ptr );
-
-#endif
-
#ifndef yytext_ptr
-static void yy_flex_strncpy ( char *, const char *, int );
+static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen ( const char * );
+static int yy_flex_strlen (yyconst char * );
#endif
#ifndef YY_NO_INPUT
+
#ifdef __cplusplus
-static int yyinput ( void );
+static int yyinput (void );
#else
-static int input ( void );
+static int input (void );
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -873,7 +626,7 @@ static int input ( void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( nmtext, nmleng, 1, nmout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -884,20 +637,20 @@ static int input ( void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ unsigned n; \
for ( n = 0; n < max_size && \
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ (c = getc( nmin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
- if ( c == EOF && ferror( yyin ) ) \
+ if ( c == EOF && ferror( nmin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
- while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
+ while ( (result = fread(buf, 1, max_size, nmin))==0 && ferror(nmin)) \
{ \
if( errno != EINTR) \
{ \
@@ -905,7 +658,7 @@ static int input ( void );
break; \
} \
errno=0; \
- clearerr(yyin); \
+ clearerr(nmin); \
} \
}\
\
@@ -938,12 +691,12 @@ static int input ( void );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int yylex (void);
+extern int nmlex (void);
-#define YY_DECL int yylex (void)
+#define YY_DECL int nmlex (void)
#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after yytext and yyleng
+/* Code executed at the beginning of each rule, after nmtext and nmleng
* have been set up.
*/
#ifndef YY_USER_ACTION
@@ -952,7 +705,7 @@ extern int yylex (void);
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK /*LINTED*/break;
+#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
@@ -962,10 +715,15 @@ extern int yylex (void);
*/
YY_DECL
{
- yy_state_type yy_current_state;
- char *yy_cp, *yy_bp;
- int yy_act;
+ register yy_state_type yy_current_state;
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+#line 11 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+
+
+#line 726 "/home/nschrick/ag_parallel/build/nm_scanner.c"
+
if ( !(yy_init) )
{
(yy_init) = 1;
@@ -977,32 +735,26 @@ YY_DECL
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
- if ( ! yyin )
- yyin = stdin;
+ if ( ! nmin )
+ nmin = stdin;
- if ( ! yyout )
- yyout = stdout;
+ if ( ! nmout )
+ nmout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- yyensure_buffer_stack ();
+ nmensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ nm_create_buffer(nmin,YY_BUF_SIZE );
}
- yy_load_buffer_state( );
+ nm_load_buffer_state( );
}
- {
-#line 11 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-
-
-#line 999 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c"
-
- while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
+ while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
- /* Support of yytext. */
+ /* Support of nmtext. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
@@ -1014,7 +766,7 @@ YY_DECL
yy_match:
do
{
- YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+ 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;
@@ -1024,9 +776,9 @@ yy_match:
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 72 )
- yy_c = yy_meta[yy_c];
+ yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 94 );
@@ -1045,10 +797,10 @@ yy_find_action:
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{
int yyl;
- for ( yyl = 0; yyl < yyleng; ++yyl )
- if ( yytext[yyl] == '\n' )
-
- yylineno++;
+ for ( yyl = 0; yyl < nmleng; ++yyl )
+ if ( nmtext[yyl] == '\n' )
+
+ nmlineno++;
;
}
@@ -1066,146 +818,146 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
/* rule 1 can match eol */
YY_RULE_SETUP
-#line 13 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+#line 13 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
{}
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 15 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+#line 15 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
{ return NETWORK; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 16 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+#line 16 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
{ return FACTS; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 17 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+#line 17 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
{ return ASSETS; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 18 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+#line 18 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
{ return QUALITY; }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 19 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+#line 19 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
{ return TOPOLOGY; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 20 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+#line 20 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
{ return TAGS; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 22 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return INT; }
+#line 22 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return INT; }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 23 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return FLOAT; }
+#line 23 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return FLOAT; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 24 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return IDENTIFIER; }
+#line 24 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return IDENTIFIER; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 26 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return EQ; }
+#line 26 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return EQ; }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 27 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return LT; }
+#line 27 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return LT; }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 28 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return GT; }
+#line 28 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return GT; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 29 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return GEQ; }
+#line 29 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return GEQ; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 30 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return LEQ; }
+#line 30 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return LEQ; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 31 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return EQ; }
+#line 31 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return EQ; }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 32 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return COLON; }
+#line 32 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return COLON; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 33 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return SEMI; }
+#line 33 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return SEMI; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 34 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return COMMA; }
+#line 34 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return COMMA; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 35 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return PERIOD; }
+#line 35 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return PERIOD; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 36 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return BIDIR; }
+#line 36 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return BIDIR; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 37 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return NOTBIDIR; }
+#line 37 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return NOTBIDIR; }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 38 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return ONEDIRBACK; }
+#line 38 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return ONEDIRBACK; }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 39 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return ONEDIR; }
+#line 39 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return ONEDIR; }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 40 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
-{ nmlval.string = strdup(yytext); return NOTONEDIR; }
+#line 40 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+{ nmlval.string = strdup(nmtext); return NOTONEDIR; }
YY_BREAK
case 26:
/* rule 26 can match eol */
YY_RULE_SETUP
-#line 42 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+#line 42 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
{}
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 44 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+#line 44 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
{ return 1; }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 45 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+#line 45 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
ECHO;
YY_BREAK
-#line 1208 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c"
+#line 961 "/home/nschrick/ag_parallel/build/nm_scanner.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1222,15 +974,15 @@ case YY_STATE_EOF(INITIAL):
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
- * just pointed yyin at a new source and called
- * yylex(). If so, then we have to assure
+ * just pointed nmin at a new source and called
+ * nmlex(). 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 = yyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = nmin;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
@@ -1283,11 +1035,11 @@ case YY_STATE_EOF(INITIAL):
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( yywrap( ) )
+ if ( nmwrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * yytext, we can now set up
+ * nmtext, 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
@@ -1336,8 +1088,7 @@ case YY_STATE_EOF(INITIAL):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
- } /* end of user's declarations */
-} /* end of yylex */
+} /* end of nmlex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -1348,9 +1099,9 @@ case YY_STATE_EOF(INITIAL):
*/
static int yy_get_next_buffer (void)
{
- char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- char *source = (yytext_ptr);
- int number_to_move, i;
+ 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] )
@@ -1379,7 +1130,7 @@ static int yy_get_next_buffer (void)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -1399,7 +1150,7 @@ static int yy_get_next_buffer (void)
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
@@ -1415,12 +1166,11 @@ static int yy_get_next_buffer (void)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yyrealloc( (void *) b->yy_ch_buf,
- (yy_size_t) (b->yy_buf_size + 2) );
+ nmrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = NULL;
+ b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
@@ -1438,7 +1188,7 @@ static int yy_get_next_buffer (void)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), num_to_read );
+ (yy_n_chars), (size_t) num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
@@ -1448,7 +1198,7 @@ static int yy_get_next_buffer (void)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
+ nmrestart(nmin );
}
else
@@ -1462,15 +1212,12 @@ static int yy_get_next_buffer (void)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
- (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
+ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) nmrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
- /* "- 2" to take care of EOB's */
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
(yy_n_chars) += number_to_move;
@@ -1486,14 +1233,14 @@ static int yy_get_next_buffer (void)
static yy_state_type yy_get_previous_state (void)
{
- yy_state_type yy_current_state;
- char *yy_cp;
+ 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 )
{
- YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ 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;
@@ -1503,9 +1250,9 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 72 )
- yy_c = yy_meta[yy_c];
+ yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
@@ -1518,10 +1265,10 @@ static int yy_get_next_buffer (void)
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
- int yy_is_jam;
- char *yy_cp = (yy_c_buf_p);
+ register int yy_is_jam;
+ register char *yy_cp = (yy_c_buf_p);
- YY_CHAR yy_c = 1;
+ register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -1531,32 +1278,30 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 72 )
- yy_c = yy_meta[yy_c];
+ yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 71);
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
-#ifndef YY_NO_UNPUT
-
- static void yyunput (int c, char * yy_bp )
+ static void yyunput (int c, register char * yy_bp )
{
- char *yy_cp;
+ register char *yy_cp;
yy_cp = (yy_c_buf_p);
- /* undo effects of setting up yytext */
+ /* undo effects of setting up nmtext */
*yy_cp = (yy_hold_char);
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- int number_to_move = (yy_n_chars) + 2;
- char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ register int number_to_move = (yy_n_chars) + 2;
+ register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- char *source =
+ register char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -1565,7 +1310,7 @@ static int yy_get_next_buffer (void)
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
@@ -1574,7 +1319,7 @@ static int yy_get_next_buffer (void)
*--yy_cp = (char) c;
if ( c == '\n' ){
- --yylineno;
+ --nmlineno;
}
(yytext_ptr) = yy_bp;
@@ -1582,8 +1327,6 @@ static int yy_get_next_buffer (void)
(yy_c_buf_p) = yy_cp;
}
-#endif
-
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void)
@@ -1608,7 +1351,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
- int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
+ int offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -1625,14 +1368,14 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- yyrestart( yyin );
+ nmrestart(nmin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap( ) )
- return 0;
+ if ( nmwrap( ) )
+ return EOF;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
@@ -1651,12 +1394,12 @@ static int yy_get_next_buffer (void)
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ *(yy_c_buf_p) = '\0'; /* preserve nmtext */
(yy_hold_char) = *++(yy_c_buf_p);
if ( c == '\n' )
-
- yylineno++;
+
+ nmlineno++;
;
return c;
@@ -1668,32 +1411,32 @@ static int yy_get_next_buffer (void)
*
* @note This function does not reset the start condition to @c INITIAL .
*/
- void yyrestart (FILE * input_file )
+ void nmrestart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
- yyensure_buffer_stack ();
+ nmensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ nm_create_buffer(nmin,YY_BUF_SIZE );
}
- yy_init_buffer( YY_CURRENT_BUFFER, input_file );
- yy_load_buffer_state( );
+ nm_init_buffer(YY_CURRENT_BUFFER,input_file );
+ nm_load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ void nm_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
- * yypop_buffer_state();
- * yypush_buffer_state(new_buffer);
+ * nmpop_buffer_state();
+ * nmpush_buffer_state(new_buffer);
*/
- yyensure_buffer_stack ();
+ nmensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -1706,21 +1449,21 @@ static int yy_get_next_buffer (void)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- yy_load_buffer_state( );
+ nm_load_buffer_state( );
/* We don't actually know whether we did this switch during
- * EOF (yywrap()) processing, but the only time this flag
- * is looked at is after yywrap() is called, so it's safe
+ * EOF (nmwrap()) processing, but the only time this flag
+ * is looked at is after nmwrap() is called, so it's safe
* to go ahead and always set it.
*/
(yy_did_buffer_switch_on_eof) = 1;
}
-static void yy_load_buffer_state (void)
+static void nm_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;
- yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ nmin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
}
@@ -1730,35 +1473,35 @@ static void yy_load_buffer_state (void)
*
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+ YY_BUFFER_STATE nm_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) nmalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in nm_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 *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
+ b->yy_ch_buf = (char *) nmalloc(b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in nm_create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer( b, file );
+ nm_init_buffer(b,file );
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
+ * @param b a buffer created with nm_create_buffer()
*
*/
- void yy_delete_buffer (YY_BUFFER_STATE b )
+ void nm_delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
@@ -1768,27 +1511,31 @@ static void yy_load_buffer_state (void)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yyfree( (void *) b->yy_ch_buf );
+ nmfree((void *) b->yy_ch_buf );
- yyfree( (void *) b );
+ nmfree((void *) b );
}
+#ifndef __cplusplus
+extern int isatty (int );
+#endif /* __cplusplus */
+
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a yyrestart() or at EOF.
+ * such as during a nmrestart() or at EOF.
*/
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void nm_init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
- yy_flush_buffer( b );
+ nm_flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then yy_init_buffer was _probably_
- * called from yyrestart() or through yy_get_next_buffer.
+ /* If b is the current buffer, then nm_init_buffer was _probably_
+ * called from nmrestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
@@ -1805,7 +1552,7 @@ static void yy_load_buffer_state (void)
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*/
- void yy_flush_buffer (YY_BUFFER_STATE b )
+ void nm_flush_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
@@ -1825,7 +1572,7 @@ static void yy_load_buffer_state (void)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- yy_load_buffer_state( );
+ nm_load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
@@ -1834,14 +1581,14 @@ static void yy_load_buffer_state (void)
* @param new_buffer The new state.
*
*/
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+void nmpush_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
- yyensure_buffer_stack();
+ nmensure_buffer_stack();
- /* This block is copied from yy_switch_to_buffer. */
+ /* This block is copied from nm_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -1855,8 +1602,8 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from yy_switch_to_buffer. */
- yy_load_buffer_state( );
+ /* copied from nm_switch_to_buffer. */
+ nm_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
@@ -1864,18 +1611,18 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
* The next element becomes the new top.
*
*/
-void yypop_buffer_state (void)
+void nmpop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
- yy_delete_buffer(YY_CURRENT_BUFFER );
+ nm_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_load_buffer_state( );
+ nm_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
@@ -1883,9 +1630,9 @@ void yypop_buffer_state (void)
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void yyensure_buffer_stack (void)
+static void nmensure_buffer_stack (void)
{
- yy_size_t num_to_alloc;
+ int num_to_alloc;
if (!(yy_buffer_stack)) {
@@ -1893,15 +1640,15 @@ static void yyensure_buffer_stack (void)
* 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; /* After all that talk, this was set to 1 anyways... */
- (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ num_to_alloc = 1;
+ (yy_buffer_stack) = (struct yy_buffer_state**)nmalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
+ YY_FATAL_ERROR( "out of dynamic memory in nmensure_buffer_stack()" );
+
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;
@@ -1910,15 +1657,15 @@ static void yyensure_buffer_stack (void)
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
- yy_size_t grow_size = 8 /* arbitrary grow size */;
+ int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)nmrealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in nmensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -1930,9 +1677,9 @@ static void yyensure_buffer_stack (void)
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+YY_BUFFER_STATE nm_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
@@ -1940,49 +1687,49 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
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 NULL;
+ return 0;
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) nmalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in nm_scan_buffer()" );
- b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
+ 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 = NULL;
+ 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_switch_to_buffer( b );
+ nm_switch_to_buffer(b );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to yylex() will
+/** Setup the input buffer state to scan a string. The next call to nmlex() will
* scan from a @e copy of @a str.
* @param yystr 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_scan_bytes() instead.
+ * nm_scan_bytes() instead.
*/
-YY_BUFFER_STATE yy_scan_string (const char * yystr )
+YY_BUFFER_STATE nm_scan_string (yyconst char * yystr )
{
- return yy_scan_bytes( yystr, (int) strlen(yystr) );
+ return nm_scan_bytes(yystr,strlen(yystr) );
}
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+/** Setup the input buffer state to scan the given bytes. The next call to nmlex() will
* scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @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_scan_bytes (const char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE nm_scan_bytes (yyconst char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
@@ -1990,19 +1737,19 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = (yy_size_t) (_yybytes_len + 2);
- buf = (char *) yyalloc( n );
+ n = _yybytes_len + 2;
+ buf = (char *) nmalloc(n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in nm_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_scan_buffer( buf, n );
+ b = nm_scan_buffer(buf,n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in nm_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -2016,9 +1763,9 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
#define YY_EXIT_FAILURE 2
#endif
-static void yynoreturn yy_fatal_error (const char* msg )
+static void yy_fatal_error (yyconst char* msg )
{
- fprintf( stderr, "%s\n", msg );
+ (void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -2028,14 +1775,14 @@ static void yynoreturn yy_fatal_error (const char* msg )
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up yytext. */ \
+ /* Undo effects of setting up nmtext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
- yytext[yyleng] = (yy_hold_char); \
- (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ nmtext[nmleng] = (yy_hold_char); \
+ (yy_c_buf_p) = nmtext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
- yyleng = yyless_macro_arg; \
+ nmleng = yyless_macro_arg; \
} \
while ( 0 )
@@ -2044,129 +1791,129 @@ static void yynoreturn yy_fatal_error (const char* msg )
/** Get the current line number.
*
*/
-int yyget_lineno (void)
+int nmget_lineno (void)
{
-
- return yylineno;
+
+ return nmlineno;
}
/** Get the input stream.
*
*/
-FILE *yyget_in (void)
+FILE *nmget_in (void)
{
- return yyin;
+ return nmin;
}
/** Get the output stream.
*
*/
-FILE *yyget_out (void)
+FILE *nmget_out (void)
{
- return yyout;
+ return nmout;
}
/** Get the length of the current token.
*
*/
-int yyget_leng (void)
+int nmget_leng (void)
{
- return yyleng;
+ return nmleng;
}
/** Get the current token.
*
*/
-char *yyget_text (void)
+char *nmget_text (void)
{
- return yytext;
+ return nmtext;
}
/** Set the current line number.
- * @param _line_number line number
+ * @param line_number
*
*/
-void yyset_lineno (int _line_number )
+void nmset_lineno (int line_number )
{
- yylineno = _line_number;
+ nmlineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param _in_str A readable stream.
+ * @param in_str A readable stream.
*
- * @see yy_switch_to_buffer
+ * @see nm_switch_to_buffer
*/
-void yyset_in (FILE * _in_str )
+void nmset_in (FILE * in_str )
{
- yyin = _in_str ;
+ nmin = in_str ;
}
-void yyset_out (FILE * _out_str )
+void nmset_out (FILE * out_str )
{
- yyout = _out_str ;
+ nmout = out_str ;
}
-int yyget_debug (void)
+int nmget_debug (void)
{
- return yy_flex_debug;
+ return nm_flex_debug;
}
-void yyset_debug (int _bdebug )
+void nmset_debug (int bdebug )
{
- yy_flex_debug = _bdebug ;
+ nm_flex_debug = bdebug ;
}
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from yylex_destroy(), so don't allocate here.
+ * This function is called from nmlex_destroy(), so don't allocate here.
*/
- /* We do not touch yylineno unless the option is enabled. */
- yylineno = 1;
+ /* We do not touch nmlineno unless the option is enabled. */
+ nmlineno = 1;
- (yy_buffer_stack) = NULL;
+ (yy_buffer_stack) = 0;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = NULL;
+ (yy_c_buf_p) = (char *) 0;
(yy_init) = 0;
(yy_start) = 0;
/* Defined in main.c */
#ifdef YY_STDINIT
- yyin = stdin;
- yyout = stdout;
+ nmin = stdin;
+ nmout = stdout;
#else
- yyin = NULL;
- yyout = NULL;
+ nmin = (FILE *) 0;
+ nmout = (FILE *) 0;
#endif
/* For future reference: Set errno on error, since we are called by
- * yylex_init()
+ * nmlex_init()
*/
return 0;
}
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy (void)
+/* nmlex_destroy is for both reentrant and non-reentrant scanners. */
+int nmlex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- yy_delete_buffer( YY_CURRENT_BUFFER );
+ nm_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
- yypop_buffer_state();
+ nmpop_buffer_state();
}
/* Destroy the stack itself. */
- yyfree((yy_buffer_stack) );
+ nmfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * yylex() is called, initialization will occur. */
+ * nmlex() is called, initialization will occur. */
yy_init_globals( );
return 0;
@@ -2177,19 +1924,18 @@ int yylex_destroy (void)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, const char * s2, int n )
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{
-
- int i;
+ register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (const char * s )
+static int yy_flex_strlen (yyconst char * s )
{
- int n;
+ register int n;
for ( n = 0; s[n]; ++n )
;
@@ -2197,14 +1943,13 @@ static int yy_flex_strlen (const char * s )
}
#endif
-void *yyalloc (yy_size_t size )
+void *nmalloc (yy_size_t size )
{
- return malloc(size);
+ return (void *) malloc( size );
}
-void *yyrealloc (void * ptr, yy_size_t size )
+void *nmrealloc (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
@@ -2212,14 +1957,14 @@ void *yyrealloc (void * ptr, yy_size_t size )
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return realloc(ptr, size);
+ return (void *) realloc( (char *) ptr, size );
}
-void yyfree (void * ptr )
+void nmfree (void * ptr )
{
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+ free( (char *) ptr ); /* see nmrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
-#line 45 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l"
+#line 45 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l"
diff --git a/build/run.sh b/build/run.sh
index 1e67ae3..0c5941a 100755
--- a/build/run.sh
+++ b/build/run.sh
@@ -55,8 +55,14 @@ if [ "$TYPE" == "$strval1" ]; then
#./ag_gen -n ../Feb_2021/generic_timeline_maintenance.nm -x ../Feb_2021/Sync/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -g DOTFILE.dot -t 1 -q 1 -p -a 0.9
#Curr
#mpirun --mca btl tcp,self --mca btl_tcp_if_include "$ITFC" --mca opal_warn_on_missing_libcuda 0 ./ag_gen -n ../Oct_2021/nm_files/"$CARS"_car_timeline_maintenance.nm -x ../Oct_2021/Sync/4_Exploits/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -t 1 -q 1 -p -a 0.6 -z "$DBNAME"
- #Test
- mpirun --mca btl_openib_allow_ib 1 --mca opal_warn_on_missing_libcuda 0 --mca btl ^uct -np "$NODES" ./ag_gen -n ../Oct_2021/nm_files/"$CARS"_car_timeline_maintenance.nm -x ../Oct_2021/Sync/4_Exploits/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -t 1 -q 1 -p -a 0.6 -z "$DBNAME"
+
+ #Test 36 hour timeout
+# mpiexec --mca btl_openib_allow_ib 1 --mca opal_warn_on_missing_libcuda 0 --mca btl ^uct -np "$NODES" --timeout 129600 ./ag_gen -n ../Oct_2021/nm_files/"$CARS"_car_timeline_maintenance.nm -x ../Oct_2021/Sync/10_Exploits/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -t 1 -q 1 -p -a 0.6 -z "$DBNAME"
+
+ mpiexec --mca btl_openib_allow_ib 1 --mca opal_warn_on_missing_libcuda 0 --bind-to numa --map-by numa -np "$NODES" --timeout 129600 ./ag_gen -n ../Oct_2021/nm_files/"$CARS"_car_timeline_maintenance.nm -x ../Oct_2021/Sync/4_Exploits/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -t 1 -q 1 -p -a 0.6 -z "$DBNAME"
+
+ # 4 Exploit
+ #mpiexec -np "$NODES" --bind-to numa --map-by numa ./ag_gen -n ../Oct_2021/nm_files/"$CARS"_car_timeline_maintenance.nm -x ../Oct_2021/Sync/4_Exploits/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -t 1 -q 1 -p -a 0.6 -z "$DBNAME"
elif [ "$TYPE" == "$strval2" ]; then
@@ -64,11 +70,11 @@ elif [ "$TYPE" == "$strval2" ]; then
#Test
#mpirun --mca btl tcp,self --mca btl_tcp_if_include "$ITFC" --mca opal_warn_on_missing_libcuda 0 ./ag_gen -n ../Oct_2021/nm_files/"$CARS"_car_timeline_maintenance.nm -x ../Oct_2021/Non_Sync/4_Exploits/"$NUM_SERV"_Serv/generic_timeline_maintenance.xp -t 1 -q 1 -p -a 0.6 -z "$DBNAME"
- mpirun --mca btl_openib_allow_ib 1 --mca opal_warn_on_missing_libcuda 0 -np "$NODES" ./ag_gen -n ../Oct_2021/nm_files/"$CARS"_car_timeline_maintenance.nm -x ../Oct_2021/Non_Sync/4_Exploits/"$NUM_SERV"_Serv/generic_timeline_maintenance.xp -t 1 -q 1 -p -a 0.6 -z "$DBNAME"
+ mpiexec --mca btl_openib_allow_ib 1 --mca opal_warn_on_missing_libcuda 0 -np "$NODES" --timeout 129600 ./ag_gen -n ../Oct_2021/nm_files/"$CARS"_car_timeline_maintenance.nm -x ../Oct_2021/Non_Sync/10_Exploits/"$NUM_SERV"_Serv/generic_timeline_maintenance.xp -t 1 -q 1 -p -a 0.6 -z "$DBNAME"
else
echo "Running default."
- mpirun --mca btl_openib_allow_ib 1 --mca opal_warn_on_missing_libcuda 0 ./ag_gen -n ../Oct_2021/nm_files/1_car_timeline_maintenance.nm -x ../Oct_2021/Sync/4_Exploits/1_Serv/sync_timeline_maintenance.xp -t 1 -q 1 -p -a 0.6 -z "$DBNAME"
+ mpiexec --mca btl_openib_allow_ib 1 --mca opal_warn_on_missing_libcuda 0 --timeout 129600 ./ag_gen -n ../Oct_2021/nm_files/1_car_timeline_maintenance.nm -x ../Oct_2021/Sync/10_Exploits/1_Serv/sync_timeline_maintenance.xp -t 1 -q 1 -p -a 0.6 -z "$DBNAME"
fi
diff --git a/build/sync_data_col.sh b/build/sync_data_col.sh
index 0491c8f..49790a5 100755
--- a/build/sync_data_col.sh
+++ b/build/sync_data_col.sh
@@ -14,6 +14,13 @@ pwd=`pwd`
#one=1
#4,8,16,32 thr
thrds=(4 8 16 32)
+
+if [[ "$folder" == serial || "$folder" == serialnosync || "$folder" == mpi ]]; then
+ thrds=(1)
+ else
+ thrds=(4 8 16 32)
+fi
+
QSIZE=1
SKIPSYNC=false
@@ -125,7 +132,7 @@ fi
-thrds=(4 8 16 32)
+#thrds=(4 8 16 32)
for thrd in "${thrds[@]}"
do
diff --git a/build/xp_parser.c b/build/xp_parser.c
index fb18e88..a55256a 100644
--- a/build/xp_parser.c
+++ b/build/xp_parser.c
@@ -1,22 +1,23 @@
-/* A Bison parser, made by GNU Bison 3.8.2. */
-/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
- Inc.
+/* A Bison parser, made by GNU Bison 2.4.1. */
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program. If not, see . */
+ along with this program. If not, see . */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -27,17 +28,13 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
-/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
- especially those whose name start with YY_ or yy_. They are
- private implementation details that can be changed or removed. */
-
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
@@ -45,11 +42,11 @@
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
-/* Identify Bison output, and Bison version. */
-#define YYBISON 30802
+/* Identify Bison output. */
+#define YYBISON 1
-/* Bison version string. */
-#define YYBISON_VERSION "3.8.2"
+/* Bison version. */
+#define YYBISON_VERSION "2.4.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -63,18 +60,23 @@
/* Pull parsers. */
#define YYPULL 1
+/* Using locations. */
+#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */
#define yyparse xpparse
#define yylex xplex
#define yyerror xperror
-#define yydebug xpdebug
-#define yynerrs xpnerrs
#define yylval xplval
#define yychar xpchar
+#define yydebug xpdebug
+#define yynerrs xpnerrs
-/* First part of user prologue. */
-#line 4 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+
+/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
+#line 4 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
#include
#include
@@ -91,184 +93,136 @@
extern FILE* xpin;
extern int xplineno;
-#line 95 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
-# ifndef YY_CAST
-# ifdef __cplusplus
-# define YY_CAST(Type, Val) static_cast (Val)
-# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val)
-# else
-# define YY_CAST(Type, Val) ((Type) (Val))
-# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
-# endif
-# endif
-# ifndef YY_NULLPTR
-# if defined __cplusplus
-# if 201103L <= __cplusplus
-# define YY_NULLPTR nullptr
-# else
-# define YY_NULLPTR 0
-# endif
-# else
-# define YY_NULLPTR ((void*)0)
-# endif
-# endif
+/* Line 189 of yacc.c */
+#line 99 "/home/nschrick/ag_parallel/build/xp_parser.c"
-#include "xp_parser.tab.h"
-/* Symbol kind. */
-enum yysymbol_kind_t
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 1
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ IDENTIFIER = 258,
+ INT = 259,
+ FLOAT = 260,
+ GROUP = 261,
+ EQ = 262,
+ NEQ = 263,
+ GT = 264,
+ LT = 265,
+ GEQ = 266,
+ LEQ = 267,
+ PLUSEQ = 268,
+ SUBEQ = 269,
+ ONEDIR = 270,
+ ONEDIRBACK = 271,
+ BIDIR = 272,
+ NOTONEDIR = 273,
+ NOTBIDIR = 274,
+ ADD = 275,
+ INSERT = 276,
+ UPDATE = 277,
+ DELETE = 278,
+ REMOVE = 279,
+ EXPLOIT = 280,
+ PRECONDITIONS = 281,
+ POSTCONDITIONS = 282,
+ COLON = 283,
+ FACTS = 284,
+ PERIOD = 285,
+ SEMI = 286,
+ QUALITY = 287,
+ COMMA = 288,
+ TOPOLOGY = 289,
+ WHITESPACE = 290,
+ LPAREN = 291,
+ RPAREN = 292
+ };
+#endif
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
{
- YYSYMBOL_YYEMPTY = -2,
- YYSYMBOL_YYEOF = 0, /* "end of file" */
- YYSYMBOL_YYerror = 1, /* error */
- YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
- YYSYMBOL_IDENTIFIER = 3, /* IDENTIFIER */
- YYSYMBOL_INT = 4, /* INT */
- YYSYMBOL_FLOAT = 5, /* FLOAT */
- YYSYMBOL_GROUP = 6, /* GROUP */
- YYSYMBOL_EQ = 7, /* EQ */
- YYSYMBOL_NEQ = 8, /* NEQ */
- YYSYMBOL_GT = 9, /* GT */
- YYSYMBOL_LT = 10, /* LT */
- YYSYMBOL_GEQ = 11, /* GEQ */
- YYSYMBOL_LEQ = 12, /* LEQ */
- YYSYMBOL_PLUSEQ = 13, /* PLUSEQ */
- YYSYMBOL_SUBEQ = 14, /* SUBEQ */
- YYSYMBOL_ONEDIR = 15, /* ONEDIR */
- YYSYMBOL_ONEDIRBACK = 16, /* ONEDIRBACK */
- YYSYMBOL_BIDIR = 17, /* BIDIR */
- YYSYMBOL_NOTONEDIR = 18, /* NOTONEDIR */
- YYSYMBOL_NOTBIDIR = 19, /* NOTBIDIR */
- YYSYMBOL_ADD = 20, /* ADD */
- YYSYMBOL_INSERT = 21, /* INSERT */
- YYSYMBOL_UPDATE = 22, /* UPDATE */
- YYSYMBOL_DELETE = 23, /* DELETE */
- YYSYMBOL_REMOVE = 24, /* REMOVE */
- YYSYMBOL_EXPLOIT = 25, /* EXPLOIT */
- YYSYMBOL_PRECONDITIONS = 26, /* PRECONDITIONS */
- YYSYMBOL_POSTCONDITIONS = 27, /* POSTCONDITIONS */
- YYSYMBOL_COLON = 28, /* COLON */
- YYSYMBOL_FACTS = 29, /* FACTS */
- YYSYMBOL_PERIOD = 30, /* PERIOD */
- YYSYMBOL_SEMI = 31, /* SEMI */
- YYSYMBOL_QUALITY = 32, /* QUALITY */
- YYSYMBOL_COMMA = 33, /* COMMA */
- YYSYMBOL_TOPOLOGY = 34, /* TOPOLOGY */
- YYSYMBOL_WHITESPACE = 35, /* WHITESPACE */
- YYSYMBOL_LPAREN = 36, /* LPAREN */
- YYSYMBOL_RPAREN = 37, /* RPAREN */
- YYSYMBOL_YYACCEPT = 38, /* $accept */
- YYSYMBOL_root = 39, /* root */
- YYSYMBOL_exploitlist = 40, /* exploitlist */
- YYSYMBOL_exploit = 41, /* exploit */
- YYSYMBOL_parameters = 42, /* parameters */
- YYSYMBOL_preconditions = 43, /* preconditions */
- YYSYMBOL_preconditionslist = 44, /* preconditionslist */
- YYSYMBOL_precondition = 45, /* precondition */
- YYSYMBOL_postconditions = 46, /* postconditions */
- YYSYMBOL_postconditionslist = 47, /* postconditionslist */
- YYSYMBOL_postcondition = 48, /* postcondition */
- YYSYMBOL_operation = 49, /* operation */
- YYSYMBOL_fact = 50, /* fact */
- YYSYMBOL_statement = 51, /* statement */
- YYSYMBOL_value = 52, /* value */
- YYSYMBOL_number = 53, /* number */
- YYSYMBOL_operator = 54, /* operator */
- YYSYMBOL_equality = 55, /* equality */
- YYSYMBOL_relop = 56, /* relop */
- YYSYMBOL_addop = 57, /* addop */
- YYSYMBOL_direction = 58 /* direction */
-};
-typedef enum yysymbol_kind_t yysymbol_kind_t;
+
+/* Line 214 of yacc.c */
+#line 21 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+
+ struct str_array *arr;
+ struct list *list;
+ struct exploitpattern *xp;
+ struct statement *st;
+ struct postcondition *pc;
+ struct fact *fct;
+ char *string;
+/* Line 214 of yacc.c */
+#line 184 "/home/nschrick/ag_parallel/build/xp_parser.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+/* Copy the second part of user declarations. */
+
+
+/* Line 264 of yacc.c */
+#line 196 "/home/nschrick/ag_parallel/build/xp_parser.c"
#ifdef short
# undef short
#endif
-/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
- and (if available) are included
- so that the code can choose integer types of a good width. */
-
-#ifndef __PTRDIFF_MAX__
-# include /* INFRINGES ON USER NAME SPACE */
-# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
-# include /* INFRINGES ON USER NAME SPACE */
-# define YY_STDINT_H
-# endif
-#endif
-
-/* Narrow types that promote to a signed type and that can represent a
- signed or unsigned integer of at least N bits. In tables they can
- save space and decrease cache pressure. Promoting to a signed type
- helps avoid bugs in integer arithmetic. */
-
-#ifdef __INT_LEAST8_MAX__
-typedef __INT_LEAST8_TYPE__ yytype_int8;
-#elif defined YY_STDINT_H
-typedef int_least8_t yytype_int8;
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
#else
-typedef signed char yytype_int8;
-#endif
-
-#ifdef __INT_LEAST16_MAX__
-typedef __INT_LEAST16_TYPE__ yytype_int16;
-#elif defined YY_STDINT_H
-typedef int_least16_t yytype_int16;
-#else
-typedef short yytype_int16;
-#endif
-
-/* Work around bug in HP-UX 11.23, which defines these macros
- incorrectly for preprocessor constants. This workaround can likely
- be removed in 2023, as HPE has promised support for HP-UX 11.23
- (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
- . */
-#ifdef __hpux
-# undef UINT_LEAST8_MAX
-# undef UINT_LEAST16_MAX
-# define UINT_LEAST8_MAX 255
-# define UINT_LEAST16_MAX 65535
-#endif
-
-#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
-typedef __UINT_LEAST8_TYPE__ yytype_uint8;
-#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
- && UINT_LEAST8_MAX <= INT_MAX)
-typedef uint_least8_t yytype_uint8;
-#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
typedef unsigned char yytype_uint8;
-#else
-typedef short yytype_uint8;
#endif
-#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
-typedef __UINT_LEAST16_TYPE__ yytype_uint16;
-#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
- && UINT_LEAST16_MAX <= INT_MAX)
-typedef uint_least16_t yytype_uint16;
-#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
-typedef unsigned short yytype_uint16;
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
#else
-typedef int yytype_uint16;
+typedef short int yytype_int8;
#endif
-#ifndef YYPTRDIFF_T
-# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
-# define YYPTRDIFF_T __PTRDIFF_TYPE__
-# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
-# elif defined PTRDIFF_MAX
-# ifndef ptrdiff_t
-# include /* INFRINGES ON USER NAME SPACE */
-# endif
-# define YYPTRDIFF_T ptrdiff_t
-# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
-# else
-# define YYPTRDIFF_T long
-# define YYPTRDIFF_MAXIMUM LONG_MAX
-# endif
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
#endif
#ifndef YYSIZE_T
@@ -276,106 +230,55 @@ typedef int yytype_uint16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
# include /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
-# define YYSIZE_T unsigned
+# define YYSIZE_T unsigned int
# endif
#endif
-#define YYSIZE_MAXIMUM \
- YY_CAST (YYPTRDIFF_T, \
- (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
- ? YYPTRDIFF_MAXIMUM \
- : YY_CAST (YYSIZE_T, -1)))
-
-#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
-
-
-/* Stored state numbers (used for stacks). */
-typedef yytype_int8 yy_state_t;
-
-/* State numbers in computations. */
-typedef int yy_state_fast_t;
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
+# if YYENABLE_NLS
# if ENABLE_NLS
# include /* INFRINGES ON USER NAME SPACE */
-# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
# endif
# endif
# ifndef YY_
-# define YY_(Msgid) Msgid
-# endif
-#endif
-
-
-#ifndef YY_ATTRIBUTE_PURE
-# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
-# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
-# else
-# define YY_ATTRIBUTE_PURE
-# endif
-#endif
-
-#ifndef YY_ATTRIBUTE_UNUSED
-# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
-# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-# else
-# define YY_ATTRIBUTE_UNUSED
+# define YY_(msgid) msgid
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
-# define YY_USE(E) ((void) (E))
+# define YYUSE(e) ((void) (e))
#else
-# define YY_USE(E) /* empty */
+# define YYUSE(e) /* empty */
#endif
-/* Suppress an incorrect diagnostic about yylval being uninitialized. */
-#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
-# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
-# else
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
- _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
-# endif
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
- _Pragma ("GCC diagnostic pop")
+/* Identity function, used to suppress warnings about constant conditions. */
+#ifndef lint
+# define YYID(n) (n)
#else
-# define YY_INITIAL_VALUE(Value) Value
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+ int yyi;
#endif
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
+{
+ return yyi;
+}
#endif
-#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
-# define YY_IGNORE_USELESS_CAST_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
-# define YY_IGNORE_USELESS_CAST_END \
- _Pragma ("GCC diagnostic pop")
-#endif
-#ifndef YY_IGNORE_USELESS_CAST_BEGIN
-# define YY_IGNORE_USELESS_CAST_BEGIN
-# define YY_IGNORE_USELESS_CAST_END
-#endif
-
-
-#define YY_ASSERT(E) ((void) (0 && (E)))
-
-#if 1
+#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -392,11 +295,11 @@ typedef int yy_state_fast_t;
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
# include /* INFRINGES ON USER NAME SPACE */
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
# endif
# endif
# endif
@@ -404,8 +307,8 @@ typedef int yy_state_fast_t;
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's 'empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
@@ -419,89 +322,88 @@ typedef int yy_state_fast_t;
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+# if (defined __cplusplus && ! defined _STDLIB_H \
&& ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
+ && (defined YYFREE || defined free)))
# include /* INFRINGES ON USER NAME SPACE */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# endif
-#endif /* 1 */
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
#if (! defined yyoverflow \
&& (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yy_state_t yyss_alloc;
+ yytype_int16 yyss_alloc;
YYSTYPE yyvs_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
- ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
-# define YYCOPY_NEEDED 1
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (YYID (0))
+# endif
+# endif
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYPTRDIFF_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / YYSIZEOF (*yyptr); \
- } \
- while (0)
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (YYID (0))
#endif
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from SRC to DST. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(Dst, Src, Count) \
- __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
-# else
-# define YYCOPY(Dst, Src, Count) \
- do \
- { \
- YYPTRDIFF_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (Dst)[yyi] = (Src)[yyi]; \
- } \
- while (0)
-# endif
-# endif
-#endif /* !YYCOPY_NEEDED */
-
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 3
/* YYLAST -- Last index in YYTABLE. */
@@ -513,23 +415,18 @@ union yyalloc
#define YYNNTS 21
/* YYNRULES -- Number of rules. */
#define YYNRULES 47
-/* YYNSTATES -- Number of states. */
+/* YYNRULES -- Number of states. */
#define YYNSTATES 82
-/* YYMAXUTOK -- Last valid token kind. */
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
#define YYMAXUTOK 292
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex, with out-of-bounds checking. */
-#define YYTRANSLATE(YYX) \
- (0 <= (YYX) && (YYX) <= YYMAXUTOK \
- ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
- : YYSYMBOL_YYUNDEF)
-
-/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex. */
-static const yytype_int8 yytranslate[] =
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -564,7 +461,37 @@ static const yytype_int8 yytranslate[] =
};
#if YYDEBUG
-/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const yytype_uint8 yyprhs[] =
+{
+ 0, 0, 3, 5, 6, 9, 19, 31, 35, 37,
+ 38, 42, 43, 46, 48, 52, 53, 56, 59, 61,
+ 63, 65, 67, 69, 76, 85, 87, 91, 93, 95,
+ 97, 99, 101, 103, 105, 107, 109, 111, 113, 115,
+ 117, 119, 121, 123, 125, 127, 129, 131
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yytype_int8 yyrhs[] =
+{
+ 39, 0, -1, 40, -1, -1, 40, 41, -1, 25,
+ 3, 36, 42, 37, 7, 43, 46, 30, -1, 3,
+ 6, 25, 3, 36, 42, 37, 7, 43, 46, 30,
+ -1, 42, 33, 3, -1, 3, -1, -1, 26, 28,
+ 44, -1, -1, 44, 45, -1, 50, -1, 27, 28,
+ 47, -1, -1, 47, 48, -1, 49, 50, -1, 20,
+ -1, 21, -1, 22, -1, 23, -1, 24, -1, 32,
+ 28, 3, 33, 51, 31, -1, 34, 28, 3, 58,
+ 3, 33, 51, 31, -1, 3, -1, 3, 54, 52,
+ -1, 3, -1, 53, -1, 4, -1, 5, -1, 56,
+ -1, 57, -1, 55, -1, 16, -1, 7, -1, 8,
+ -1, 9, -1, 10, -1, 11, -1, 12, -1, 13,
+ -1, 14, -1, 17, -1, 19, -1, 18, -1, 15,
+ -1, 16, -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
0, 49, 49, 52, 53, 58, 68, 79, 88, 92,
@@ -575,49 +502,83 @@ static const yytype_uint8 yyrline[] =
};
#endif
-/** Accessing symbol of state STATE. */
-#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
-
-#if 1
-/* The user-facing name of the symbol whose (internal) number is
- YYSYMBOL. No bounds checking. */
-static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
-
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "\"end of file\"", "error", "\"invalid token\"", "IDENTIFIER", "INT",
- "FLOAT", "GROUP", "EQ", "NEQ", "GT", "LT", "GEQ", "LEQ", "PLUSEQ",
- "SUBEQ", "ONEDIR", "ONEDIRBACK", "BIDIR", "NOTONEDIR", "NOTBIDIR", "ADD",
- "INSERT", "UPDATE", "DELETE", "REMOVE", "EXPLOIT", "PRECONDITIONS",
+ "$end", "error", "$undefined", "IDENTIFIER", "INT", "FLOAT", "GROUP",
+ "EQ", "NEQ", "GT", "LT", "GEQ", "LEQ", "PLUSEQ", "SUBEQ", "ONEDIR",
+ "ONEDIRBACK", "BIDIR", "NOTONEDIR", "NOTBIDIR", "ADD", "INSERT",
+ "UPDATE", "DELETE", "REMOVE", "EXPLOIT", "PRECONDITIONS",
"POSTCONDITIONS", "COLON", "FACTS", "PERIOD", "SEMI", "QUALITY", "COMMA",
"TOPOLOGY", "WHITESPACE", "LPAREN", "RPAREN", "$accept", "root",
"exploitlist", "exploit", "parameters", "preconditions",
"preconditionslist", "precondition", "postconditions",
"postconditionslist", "postcondition", "operation", "fact", "statement",
- "value", "number", "operator", "equality", "relop", "addop", "direction", YY_NULLPTR
+ "value", "number", "operator", "equality", "relop", "addop", "direction", 0
};
-
-static const char *
-yysymbol_name (yysymbol_kind_t yysymbol)
-{
- return yytname[yysymbol];
-}
#endif
-#define YYPACT_NINF (-16)
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 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, 288, 289, 290, 291, 292
+};
+# endif
-#define yypact_value_is_default(Yyn) \
- ((Yyn) == YYPACT_NINF)
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 38, 39, 40, 40, 41, 41, 42, 42, 42,
+ 43, 44, 44, 45, 46, 47, 47, 48, 49, 49,
+ 49, 49, 49, 50, 50, 51, 51, 52, 52, 53,
+ 53, 54, 54, 54, 54, 55, 55, 56, 56, 56,
+ 56, 57, 57, 58, 58, 58, 58, 58
+};
-#define YYTABLE_NINF (-1)
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 1, 0, 2, 9, 11, 3, 1, 0,
+ 3, 0, 2, 1, 3, 0, 2, 2, 1, 1,
+ 1, 1, 1, 6, 8, 1, 3, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1
+};
-#define yytable_value_is_error(Yyn) \
- 0
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 3, 0, 2, 1, 0, 0, 4, 0, 0, 0,
+ 9, 0, 8, 0, 9, 0, 0, 0, 7, 0,
+ 0, 0, 0, 0, 11, 0, 0, 0, 10, 15,
+ 5, 0, 0, 0, 12, 13, 14, 6, 0, 0,
+ 18, 19, 20, 21, 22, 16, 0, 0, 0, 17,
+ 0, 46, 47, 43, 45, 44, 0, 25, 0, 0,
+ 35, 36, 37, 38, 39, 40, 41, 42, 34, 0,
+ 33, 31, 32, 23, 0, 27, 29, 30, 26, 28,
+ 0, 24
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
+{
+ -1, 1, 2, 6, 13, 22, 28, 34, 26, 36,
+ 45, 46, 35, 58, 78, 79, 69, 70, 71, 72,
+ 56
+};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
+#define YYPACT_NINF -16
static const yytype_int8 yypact[] =
{
-16, 9, -3, -16, 26, 28, -16, 8, -2, 32,
@@ -631,22 +592,6 @@ static const yytype_int8 yypact[] =
27, -16
};
-/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE does not specify something else to do. Zero
- means the default is an error. */
-static const yytype_int8 yydefact[] =
-{
- 3, 0, 2, 1, 0, 0, 4, 0, 0, 0,
- 9, 0, 8, 0, 9, 0, 0, 0, 7, 0,
- 0, 0, 0, 0, 11, 0, 0, 0, 10, 15,
- 5, 0, 0, 0, 12, 13, 14, 6, 0, 0,
- 18, 19, 20, 21, 22, 16, 0, 0, 0, 17,
- 0, 46, 47, 43, 45, 44, 0, 25, 0, 0,
- 35, 36, 37, 38, 39, 40, 41, 42, 34, 0,
- 33, 31, 32, 23, 0, 27, 29, 30, 26, 28,
- 0, 24
-};
-
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
@@ -655,18 +600,12 @@ static const yytype_int8 yypgoto[] =
-16
};
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int8 yydefgoto[] =
-{
- 0, 1, 2, 6, 13, 22, 28, 34, 26, 36,
- 45, 46, 35, 58, 78, 79, 69, 70, 71, 72,
- 56
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule whose
- number is the opposite. If YYTABLE_NINF, syntax error. */
-static const yytype_int8 yytable[] =
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -1
+static const yytype_uint8 yytable[] =
{
4, 60, 61, 62, 63, 64, 65, 66, 67, 3,
68, 40, 41, 42, 43, 44, 51, 52, 53, 54,
@@ -688,9 +627,9 @@ static const yytype_int8 yycheck[] =
23, -1, -1, -1, -1, -1, -1, 46
};
-/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
- state STATE-NUM. */
-static const yytype_int8 yystos[] =
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
{
0, 39, 40, 0, 3, 25, 41, 6, 3, 25,
36, 3, 3, 42, 36, 33, 37, 42, 3, 7,
@@ -703,61 +642,95 @@ static const yytype_int8 yystos[] =
51, 31
};
-/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
-static const yytype_int8 yyr1[] =
-{
- 0, 38, 39, 40, 40, 41, 41, 42, 42, 42,
- 43, 44, 44, 45, 46, 47, 47, 48, 49, 49,
- 49, 49, 49, 50, 50, 51, 51, 52, 52, 53,
- 53, 54, 54, 54, 54, 55, 55, 56, 56, 56,
- 56, 57, 57, 58, 58, 58, 58, 58
-};
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
-/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
-static const yytype_int8 yyr2[] =
-{
- 0, 2, 1, 0, 2, 9, 11, 3, 1, 0,
- 3, 0, 2, 1, 3, 0, 2, 2, 1, 1,
- 1, 1, 1, 6, 8, 1, 3, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1
-};
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
-enum { YYENOMEM = -2 };
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-#define YYNOMEM goto yyexhaustedlab
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(Token, Value) \
- do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (xplist, YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
- while (0)
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK (1); \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (xplist, YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (YYID (0))
-/* Backward compatibility with an undocumented macro.
- Use YYerror or YYUNDEF. */
-#define YYERRCODE YYUNDEF
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (YYID (N)) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
/* Enable debugging if requested. */
#if YYDEBUG
@@ -767,59 +740,83 @@ enum { YYENOMEM = -2 };
# define YYFPRINTF fprintf
# endif
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (0)
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, xplist); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (YYID (0))
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
-
-# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Kind, Value, xplist); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (0)
-
-
-/*-----------------------------------.
-| Print this symbol's value on YYO. |
-`-----------------------------------*/
-
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_symbol_value_print (FILE *yyo,
- yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, struct list *xplist)
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct list *xplist)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep, xplist)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+ struct list *xplist;
+#endif
{
- FILE *yyoutput = yyo;
- YY_USE (yyoutput);
- YY_USE (xplist);
if (!yyvaluep)
return;
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- YY_USE (yykind);
- YY_IGNORE_MAYBE_UNINITIALIZED_END
+ YYUSE (xplist);
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+ YYUSE (yyoutput);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
}
-/*---------------------------.
-| Print this symbol on YYO. |
-`---------------------------*/
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_symbol_print (FILE *yyo,
- yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, struct list *xplist)
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct list *xplist)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep, xplist)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+ struct list *xplist;
+#endif
{
- YYFPRINTF (yyo, "%s %s (",
- yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
- yy_symbol_value_print (yyo, yykind, yyvaluep, xplist);
- YYFPRINTF (yyo, ")");
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, xplist);
+ YYFPRINTF (yyoutput, ")");
}
/*------------------------------------------------------------------.
@@ -827,8 +824,16 @@ yy_symbol_print (FILE *yyo,
| TOP (included). |
`------------------------------------------------------------------*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+#else
+static void
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
+#endif
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -839,56 +844,64 @@ yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
YYFPRINTF (stderr, "\n");
}
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (0)
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (YYID (0))
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
- int yyrule, struct list *xplist)
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct list *xplist)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule, xplist)
+ YYSTYPE *yyvsp;
+ int yyrule;
+ struct list *xplist;
+#endif
{
- int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
- yyrule - 1, yylno);
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr,
- YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
- &yyvsp[(yyi + 1) - (yynrhs)], xplist);
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , xplist);
YYFPRINTF (stderr, "\n");
}
}
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyssp, yyvsp, Rule, xplist); \
-} while (0)
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyvsp, Rule, xplist); \
+} while (YYID (0))
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
-# define YYDPRINTF(Args) ((void) 0)
-# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
@@ -903,81 +916,49 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
+
-/* Context of a parse error. */
-typedef struct
-{
- yy_state_t *yyssp;
- yysymbol_kind_t yytoken;
-} yypcontext_t;
+#if YYERROR_VERBOSE
-/* Put in YYARG at most YYARGN of the expected tokens given the
- current YYCTX, and return the number of tokens stored in YYARG. If
- YYARG is null, return the number of expected tokens (guaranteed to
- be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
- Return 0 if there are more than YYARGN expected tokens, yet fill
- YYARG up to YYARGN. */
-static int
-yypcontext_expected_tokens (const yypcontext_t *yyctx,
- yysymbol_kind_t yyarg[], int yyargn)
-{
- /* Actual size of YYARG. */
- int yycount = 0;
- int yyn = yypact[+*yyctx->yyssp];
- if (!yypact_value_is_default (yyn))
- {
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. In other words, skip the first -YYN actions for
- this state because they are default actions. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yyx;
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
- && !yytable_value_is_error (yytable[yyx + yyn]))
- {
- if (!yyarg)
- ++yycount;
- else if (yycount == yyargn)
- return 0;
- else
- yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
- }
- }
- if (yyarg && yycount == 0 && 0 < yyargn)
- yyarg[0] = YYSYMBOL_YYEMPTY;
- return yycount;
-}
-
-
-
-
-#ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
-# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
-# else
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
/* Return the length of YYSTR. */
-static YYPTRDIFF_T
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+ const char *yystr;
+#endif
{
- YYPTRDIFF_T yylen;
+ YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
continue;
return yylen;
}
+# endif
# endif
-#endif
-#ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-# define yystpcpy stpcpy
-# else
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+#endif
{
char *yyd = yydest;
const char *yys = yysrc;
@@ -987,10 +968,10 @@ yystpcpy (char *yydest, const char *yysrc)
return yyd - 1;
}
+# endif
# endif
-#endif
-#ifndef yytnamerr
+# ifndef yytnamerr
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
quotes and backslashes, so that it's suitable for yyerror. The
heuristic is that double-quoting is unnecessary unless the string
@@ -998,254 +979,281 @@ yystpcpy (char *yydest, const char *yysrc)
backslash-backslash). YYSTR is taken from yytname. If YYRES is
null, do not copy; instead, return the length of what the result
would have been. */
-static YYPTRDIFF_T
+static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
if (*yystr == '"')
{
- YYPTRDIFF_T yyn = 0;
+ YYSIZE_T yyn = 0;
char const *yyp = yystr;
+
for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- else
- goto append;
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
- append:
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
do_not_strip_quotes: ;
}
- if (yyres)
- return yystpcpy (yyres, yystr) - yyres;
- else
+ if (! yyres)
return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
}
-#endif
+# endif
-
-static int
-yy_syntax_error_arguments (const yypcontext_t *yyctx,
- yysymbol_kind_t yyarg[], int yyargn)
+/* Copy into YYRESULT an error message about the unexpected token
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
{
- /* Actual size of YYARG. */
- int yycount = 0;
- /* There are many possibilities here to consider:
- - If this state is a consistent state with a default action, then
- the only way this function was invoked is if the default action
- is an error action. In that case, don't check for expected
- tokens because there are none.
- - The only way there can be no lookahead present (in yychar) is if
- this state is a consistent state with a default action. Thus,
- detecting the absence of a lookahead is sufficient to determine
- that there is no unexpected or expected token to report. In that
- case, just report a simple "syntax error".
- - Don't assume there isn't a lookahead just because this state is a
- consistent state with a default action. There might have been a
- previous inconsistent state, consistent state with a non-default
- action, or user semantic action that manipulated yychar.
- - Of course, the expected token list depends on states to have
- correct lookahead information, and it depends on the parser not
- to perform extra reductions after fetching a lookahead from the
- scanner and before detecting a syntax error. Thus, state merging
- (from LALR or IELR) and default reductions corrupt the expected
- token list. However, the list is correct for canonical LR with
- one exception: it will still contain any token that will not be
- accepted due to an error action in a later state.
- */
- if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
+ int yyn = yypact[yystate];
+
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+ return 0;
+ else
{
- int yyn;
- if (yyarg)
- yyarg[yycount] = yyctx->yytoken;
- ++yycount;
- yyn = yypcontext_expected_tokens (yyctx,
- yyarg ? yyarg + 1 : yyarg, yyargn - 1);
- if (yyn == YYENOMEM)
- return YYENOMEM;
- else
- yycount += yyn;
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+
+ if (yysize_overflow)
+ return YYSIZE_MAXIMUM;
+
+ if (yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yyresult;
+ int yyi = 0;
+ while ((*yyp = *yyf) != '\0')
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ }
+ return yysize;
}
- return yycount;
}
-
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
- about the unexpected token YYTOKEN for the state stack whose top is
- YYSSP.
-
- Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
- not large enough to hold the message. In that case, also set
- *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
- required number of bytes is too large to store. */
-static int
-yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
- const yypcontext_t *yyctx)
-{
- enum { YYARGS_MAX = 5 };
- /* Internationalized format string. */
- const char *yyformat = YY_NULLPTR;
- /* Arguments of yyformat: reported tokens (one for the "unexpected",
- one per "expected"). */
- yysymbol_kind_t yyarg[YYARGS_MAX];
- /* Cumulated lengths of YYARG. */
- YYPTRDIFF_T yysize = 0;
-
- /* Actual size of YYARG. */
- int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
- if (yycount == YYENOMEM)
- return YYENOMEM;
-
- switch (yycount)
- {
-#define YYCASE_(N, S) \
- case N: \
- yyformat = S; \
- break
- default: /* Avoid compiler warnings. */
- YYCASE_(0, YY_("syntax error"));
- YYCASE_(1, YY_("syntax error, unexpected %s"));
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-#undef YYCASE_
- }
-
- /* Compute error message size. Don't count the "%s"s, but reserve
- room for the terminator. */
- yysize = yystrlen (yyformat) - 2 * yycount + 1;
- {
- int yyi;
- for (yyi = 0; yyi < yycount; ++yyi)
- {
- YYPTRDIFF_T yysize1
- = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
- yysize = yysize1;
- else
- return YYENOMEM;
- }
- }
-
- if (*yymsg_alloc < yysize)
- {
- *yymsg_alloc = 2 * yysize;
- if (! (yysize <= *yymsg_alloc
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
- return -1;
- }
-
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- {
- char *yyp = *yymsg;
- int yyi = 0;
- while ((*yyp = *yyformat) != '\0')
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
- yyformat += 2;
- }
- else
- {
- ++yyp;
- ++yyformat;
- }
- }
- return 0;
-}
-
+#endif /* YYERROR_VERBOSE */
+
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static void
-yydestruct (const char *yymsg,
- yysymbol_kind_t yykind, YYSTYPE *yyvaluep, struct list *xplist)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct list *xplist)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep, xplist)
+ const char *yymsg;
+ int yytype;
+ YYSTYPE *yyvaluep;
+ struct list *xplist;
+#endif
{
- YY_USE (yyvaluep);
- YY_USE (xplist);
+ YYUSE (yyvaluep);
+ YYUSE (xplist);
+
if (!yymsg)
yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- YY_USE (yykind);
- YY_IGNORE_MAYBE_UNINITIALIZED_END
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
}
+/* Prevent warnings from -Wmissing-prototypes. */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (struct list *xplist);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
-/* Lookahead token kind. */
+
+/* The lookahead symbol. */
int yychar;
/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
+
/* Number of syntax errors so far. */
int yynerrs;
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
-/*----------.
-| yyparse. |
-`----------*/
-
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
int
yyparse (struct list *xplist)
+#else
+int
+yyparse (xplist)
+ struct list *xplist;
+#endif
+#endif
{
- yy_state_fast_t yystate = 0;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus = 0;
- /* Refer to the stacks through separate pointers, to allow yyoverflow
+
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
- /* Their size. */
- YYPTRDIFF_T yystacksize = YYINITDEPTH;
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
- /* The state stack: array, bottom, top. */
- yy_state_t yyssa[YYINITDEPTH];
- yy_state_t *yyss = yyssa;
- yy_state_t *yyssp = yyss;
-
- /* The semantic value stack: array, bottom, top. */
+ /* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp = yyvs;
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYSIZE_T yystacksize;
int yyn;
- /* The return value of yyparse. */
int yyresult;
- /* Lookahead symbol kind. */
- yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
+#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
char *yymsg = yymsgbuf;
- YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
@@ -1253,140 +1261,133 @@ yyparse (struct list *xplist)
Keep to zero when no symbol should be popped. */
int yylen = 0;
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
YYDPRINTF ((stderr, "Starting parse\n"));
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+ yyssp = yyss;
+ yyvsp = yyvs;
+
goto yysetstate;
-
/*------------------------------------------------------------.
-| yynewstate -- push a new state, which is found in yystate. |
+| yynewstate -- Push a new state, which is found in yystate. |
`------------------------------------------------------------*/
-yynewstate:
+ yynewstate:
/* In all cases, when you get here, the value and location stacks
have just been pushed. So pushing a state here evens the stacks. */
yyssp++;
-
-/*--------------------------------------------------------------------.
-| yysetstate -- set current state (the top of the stack) to yystate. |
-`--------------------------------------------------------------------*/
-yysetstate:
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
- YY_IGNORE_USELESS_CAST_BEGIN
- *yyssp = YY_CAST (yy_state_t, yystate);
- YY_IGNORE_USELESS_CAST_END
- YY_STACK_PRINT (yyss, yyssp);
+ yysetstate:
+ *yyssp = yystate;
if (yyss + yystacksize - 1 <= yyssp)
-#if !defined yyoverflow && !defined YYSTACK_RELOCATE
- YYNOMEM;
-#else
{
/* Get the current used size of the three stacks, in elements. */
- YYPTRDIFF_T yysize = yyssp - yyss + 1;
+ YYSIZE_T yysize = yyssp - yyss + 1;
-# if defined yyoverflow
+#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- yy_state_t *yyss1 = yyss;
- YYSTYPE *yyvs1 = yyvs;
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * YYSIZEOF (*yyssp),
- &yyvs1, yysize * YYSIZEOF (*yyvsp),
- &yystacksize);
- yyss = yyss1;
- yyvs = yyvs1;
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
}
-# else /* defined YYSTACK_RELOCATE */
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- YYNOMEM;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
+ yystacksize = YYMAXDEPTH;
{
- yy_state_t *yyss1 = yyss;
- union yyalloc *yyptr =
- YY_CAST (union yyalloc *,
- YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
- if (! yyptr)
- YYNOMEM;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
}
# endif
+#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
- YY_IGNORE_USELESS_CAST_BEGIN
- YYDPRINTF ((stderr, "Stack size increased to %ld\n",
- YY_CAST (long, yystacksize)));
- YY_IGNORE_USELESS_CAST_END
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
+ YYABORT;
}
-#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
if (yystate == YYFINAL)
YYACCEPT;
goto yybackup;
-
/*-----------.
| yybackup. |
`-----------*/
yybackup:
+
/* Do appropriate processing given the current state. Read a
lookahead token if we need one and don't already have one. */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
- if (yypact_value_is_default (yyn))
+ if (yyn == YYPACT_NINF)
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
- YYDPRINTF ((stderr, "Reading a token\n"));
- yychar = yylex ();
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
}
if (yychar <= YYEOF)
{
- yychar = YYEOF;
- yytoken = YYSYMBOL_YYEOF;
+ yychar = yytoken = YYEOF;
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
- else if (yychar == YYerror)
- {
- /* The scanner already issued an error message, process directly
- to error recovery. But do not keep the error token as
- lookahead, it is too special and may lead us to an endless
- loop in error recovery. */
- yychar = YYUNDEF;
- yytoken = YYSYMBOL_YYerror;
- goto yyerrlab1;
- }
else
{
yytoken = YYTRANSLATE (yychar);
@@ -1401,8 +1402,8 @@ yybackup:
yyn = yytable[yyn];
if (yyn <= 0)
{
- if (yytable_value_is_error (yyn))
- goto yyerrlab;
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
@@ -1414,13 +1415,13 @@ yybackup:
/* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- yystate = yyn;
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- *++yyvsp = yylval;
- YY_IGNORE_MAYBE_UNINITIALIZED_END
/* Discard the shifted token. */
yychar = YYEMPTY;
+
+ yystate = yyn;
+ *++yyvsp = yylval;
+
goto yynewstate;
@@ -1435,14 +1436,14 @@ yydefault:
/*-----------------------------.
-| yyreduce -- do a reduction. |
+| yyreduce -- Do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
- '$$ = $1'.
+ `$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
@@ -1455,348 +1456,368 @@ yyreduce:
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
- case 2: /* root: exploitlist */
-#line 49 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {}
-#line 1462 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ case 2:
+
+/* Line 1455 of yacc.c */
+#line 49 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {;}
break;
- case 3: /* exploitlist: %empty */
-#line 52 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {}
-#line 1468 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ case 3:
+
+/* Line 1455 of yacc.c */
+#line 52 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {;}
break;
- case 4: /* exploitlist: exploitlist exploit */
-#line 53 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {
- list_add(xplist, (yyvsp[0].xp));
-}
-#line 1476 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ case 4:
+
+/* Line 1455 of yacc.c */
+#line 53 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {
+ list_add(xplist, (yyvsp[(2) - (2)].xp));
+;}
break;
- case 5: /* exploit: EXPLOIT IDENTIFIER LPAREN parameters RPAREN EQ preconditions postconditions PERIOD */
-#line 58 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {
+ case 5:
+
+/* Line 1455 of yacc.c */
+#line 58 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {
exploitpattern *xp = getmem(sizeof(exploitpattern));
xp->group = "null";
- xp->name = (yyvsp[-7].string);
- xp->params = (yyvsp[-5].arr);
- xp->preconditions = (yyvsp[-2].list);
- xp->postconditions = (yyvsp[-1].list);
+ xp->name = (yyvsp[(2) - (9)].string);
+ xp->params = (yyvsp[(4) - (9)].arr);
+ xp->preconditions = (yyvsp[(7) - (9)].list);
+ xp->postconditions = (yyvsp[(8) - (9)].list);
(yyval.xp) = xp;
-}
-#line 1490 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+;}
break;
- case 6: /* exploit: IDENTIFIER GROUP EXPLOIT IDENTIFIER LPAREN parameters RPAREN EQ preconditions postconditions PERIOD */
-#line 68 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {
+ case 6:
+
+/* Line 1455 of yacc.c */
+#line 68 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {
exploitpattern *xp = getmem(sizeof(exploitpattern));
- xp->group = (yyvsp[-10].string);
- xp->name = (yyvsp[-7].string);
- xp->params = (yyvsp[-5].arr);
- xp->preconditions = (yyvsp[-2].list);
- xp->postconditions = (yyvsp[-1].list);
+ xp->group = (yyvsp[(1) - (11)].string);
+ xp->name = (yyvsp[(4) - (11)].string);
+ xp->params = (yyvsp[(6) - (11)].arr);
+ xp->preconditions = (yyvsp[(9) - (11)].list);
+ xp->postconditions = (yyvsp[(10) - (11)].list);
(yyval.xp) = xp;
-}
-#line 1504 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+;}
break;
- case 7: /* parameters: parameters COMMA IDENTIFIER */
-#line 79 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {
- if((yyvsp[-2].arr) == NULL) {
+ case 7:
+
+/* Line 1455 of yacc.c */
+#line 79 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {
+ if((yyvsp[(1) - (3)].arr) == NULL) {
(yyval.arr) = new_str_array();
- add_str((yyval.arr), (yyvsp[0].string));
+ add_str((yyval.arr), (yyvsp[(3) - (3)].string));
} else {
- (yyval.arr) = (yyvsp[-2].arr);
- add_str((yyval.arr), (yyvsp[0].string));
+ (yyval.arr) = (yyvsp[(1) - (3)].arr);
+ add_str((yyval.arr), (yyvsp[(3) - (3)].string));
}
-}
-#line 1518 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+;}
break;
- case 8: /* parameters: IDENTIFIER */
-#line 88 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {
+ case 8:
+
+/* Line 1455 of yacc.c */
+#line 88 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {
(yyval.arr) = new_str_array();
- add_str((yyval.arr), (yyvsp[0].string));
-}
-#line 1527 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ add_str((yyval.arr), (yyvsp[(1) - (1)].string));
+;}
break;
- case 9: /* parameters: %empty */
-#line 92 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- { (yyval.arr) = NULL; }
-#line 1533 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ case 9:
+
+/* Line 1455 of yacc.c */
+#line 92 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ { (yyval.arr) = NULL; ;}
break;
- case 10: /* preconditions: PRECONDITIONS COLON preconditionslist */
-#line 95 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- { (yyval.list) = (yyvsp[0].list); }
-#line 1539 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ case 10:
+
+/* Line 1455 of yacc.c */
+#line 95 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ { (yyval.list) = (yyvsp[(3) - (3)].list); ;}
break;
- case 11: /* preconditionslist: %empty */
-#line 98 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- { (yyval.list) = NULL; }
-#line 1545 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ case 11:
+
+/* Line 1455 of yacc.c */
+#line 98 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ { (yyval.list) = NULL; ;}
break;
- case 12: /* preconditionslist: preconditionslist precondition */
-#line 99 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {
- if((yyvsp[-1].list) == NULL) {
+ case 12:
+
+/* Line 1455 of yacc.c */
+#line 99 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {
+ if((yyvsp[(1) - (2)].list) == NULL) {
(yyval.list) = list_new();
- list_add((yyval.list), (yyvsp[0].fct));
+ list_add((yyval.list), (yyvsp[(2) - (2)].fct));
} else {
- list_add((yyvsp[-1].list), (yyvsp[0].fct));
- (yyval.list) = (yyvsp[-1].list);
+ list_add((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].fct));
+ (yyval.list) = (yyvsp[(1) - (2)].list);
}
-}
-#line 1559 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+;}
break;
- case 13: /* precondition: fact */
-#line 110 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {
- (yyval.fct) = (yyvsp[0].fct);
-}
-#line 1567 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ case 13:
+
+/* Line 1455 of yacc.c */
+#line 110 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {
+ (yyval.fct) = (yyvsp[(1) - (1)].fct);
+;}
break;
- case 14: /* postconditions: POSTCONDITIONS COLON postconditionslist */
-#line 115 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {
- (yyval.list) = (yyvsp[0].list);
-}
-#line 1575 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ case 14:
+
+/* Line 1455 of yacc.c */
+#line 115 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {
+ (yyval.list) = (yyvsp[(3) - (3)].list);
+;}
break;
- case 15: /* postconditionslist: %empty */
-#line 120 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- { (yyval.list) = NULL; }
-#line 1581 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ case 15:
+
+/* Line 1455 of yacc.c */
+#line 120 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ { (yyval.list) = NULL; ;}
break;
- case 16: /* postconditionslist: postconditionslist postcondition */
-#line 121 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {
- if((yyvsp[-1].list) == NULL) {
+ case 16:
+
+/* Line 1455 of yacc.c */
+#line 121 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {
+ if((yyvsp[(1) - (2)].list) == NULL) {
(yyval.list) = list_new();
- list_add((yyval.list), (yyvsp[0].pc));
+ list_add((yyval.list), (yyvsp[(2) - (2)].pc));
} else {
- list_add((yyvsp[-1].list), (yyvsp[0].pc));
- (yyval.list) = (yyvsp[-1].list);
+ list_add((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].pc));
+ (yyval.list) = (yyvsp[(1) - (2)].list);
}
-}
-#line 1595 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+;}
break;
- case 17: /* postcondition: operation fact */
-#line 132 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {
+ case 17:
+
+/* Line 1455 of yacc.c */
+#line 132 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {
postcondition *pc = getmem(sizeof(postcondition));
- pc->op = (yyvsp[-1].string);
- pc->f = (yyvsp[0].fct);
+ pc->op = (yyvsp[(1) - (2)].string);
+ pc->f = (yyvsp[(2) - (2)].fct);
(yyval.pc) = pc;
-}
-#line 1606 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+;}
break;
- case 18: /* operation: ADD */
-#line 140 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- { (yyval.string) = (yyvsp[0].string); }
-#line 1612 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ case 18:
+
+/* Line 1455 of yacc.c */
+#line 140 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); ;}
break;
- case 19: /* operation: INSERT */
-#line 141 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- { (yyval.string) = (yyvsp[0].string); }
-#line 1618 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ case 19:
+
+/* Line 1455 of yacc.c */
+#line 141 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); ;}
break;
- case 20: /* operation: UPDATE */
-#line 142 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- { (yyval.string) = (yyvsp[0].string); }
-#line 1624 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ case 20:
+
+/* Line 1455 of yacc.c */
+#line 142 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); ;}
break;
- case 21: /* operation: DELETE */
-#line 143 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- { (yyval.string) = (yyvsp[0].string); }
-#line 1630 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ case 21:
+
+/* Line 1455 of yacc.c */
+#line 143 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); ;}
break;
- case 22: /* operation: REMOVE */
-#line 144 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- { (yyval.string) = (yyvsp[0].string); }
-#line 1636 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ case 22:
+
+/* Line 1455 of yacc.c */
+#line 144 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); ;}
break;
- case 23: /* fact: QUALITY COLON IDENTIFIER COMMA statement SEMI */
-#line 147 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {
+ case 23:
+
+/* Line 1455 of yacc.c */
+#line 147 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {
statement *st = getmem(sizeof(struct statement));
- st->obj = (yyvsp[-1].st)->obj;
- st->op = (yyvsp[-1].st)->op;
- st->val = (yyvsp[-1].st)->val;
+ st->obj = (yyvsp[(5) - (6)].st)->obj;
+ st->op = (yyvsp[(5) - (6)].st)->op;
+ st->val = (yyvsp[(5) - (6)].st)->val;
struct fact *fct = getmem(sizeof(struct fact));
fct->type = QUALITY_T;
- fct->from = (yyvsp[-3].string);
+ fct->from = (yyvsp[(3) - (6)].string);
fct->dir = NULL;
fct->to = NULL;
fct->st = st;
(yyval.fct) = fct;
-}
-#line 1656 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+;}
break;
- case 24: /* fact: TOPOLOGY COLON IDENTIFIER direction IDENTIFIER COMMA statement SEMI */
-#line 162 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {
+ case 24:
+
+/* Line 1455 of yacc.c */
+#line 162 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {
statement *st = getmem(sizeof(statement));
- st->obj = (yyvsp[-1].st)->obj;
- st->op = (yyvsp[-1].st)->op;
- st->val = (yyvsp[-1].st)->val;
+ st->obj = (yyvsp[(7) - (8)].st)->obj;
+ st->op = (yyvsp[(7) - (8)].st)->op;
+ st->val = (yyvsp[(7) - (8)].st)->val;
struct fact *fct = getmem(sizeof(struct fact));
fct->type = TOPOLOGY_T;
- fct->from = (yyvsp[-5].string);
- fct->dir = (yyvsp[-4].string);
- fct->to = (yyvsp[-3].string);
+ fct->from = (yyvsp[(3) - (8)].string);
+ fct->dir = (yyvsp[(4) - (8)].string);
+ fct->to = (yyvsp[(5) - (8)].string);
fct->st = st;
(yyval.fct) = fct;
-}
-#line 1676 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+;}
break;
- case 25: /* statement: IDENTIFIER */
-#line 183 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {
+ case 25:
+
+/* Line 1455 of yacc.c */
+#line 183 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {
statement* st = getmem(sizeof(statement));
- st->obj = (yyvsp[0].string);
+ st->obj = (yyvsp[(1) - (1)].string);
st->op = "";
st->val = "";
(yyval.st) = st;
- }
-#line 1688 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ ;}
break;
- case 26: /* statement: IDENTIFIER operator value */
-#line 190 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
- {
+ case 26:
+
+/* Line 1455 of yacc.c */
+#line 190 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+ {
statement* st = getmem(sizeof(statement));
- st->obj = (yyvsp[-2].string);
- st->op = (yyvsp[-1].string);
- st->val = (yyvsp[0].string);
+ st->obj = (yyvsp[(1) - (3)].string);
+ st->op = (yyvsp[(2) - (3)].string);
+ st->val = (yyvsp[(3) - (3)].string);
(yyval.st) = st;
- }
-#line 1700 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+ ;}
break;
-#line 1704 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c"
+/* Line 1455 of yacc.c */
+#line 1732 "/home/nschrick/ag_parallel/build/xp_parser.c"
default: break;
}
- /* User semantic actions sometimes alter yychar, and that requires
- that yytoken be updated with the new translation. We take the
- approach of translating immediately before every use of yytoken.
- One alternative is translating here after every semantic action,
- but that translation would be missed if the semantic action invokes
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
- incorrect destructor might then be invoked immediately. In the
- case of YYERROR or YYBACKUP, subsequent parser actions might lead
- to an incorrect destructor call or verbose syntax error message
- before the lookahead is translated. */
- YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
- /* Now 'shift' the result of the reduction. Determine what state
+ /* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
- {
- const int yylhs = yyr1[yyn] - YYNTOKENS;
- const int yyi = yypgoto[yylhs] + *yyssp;
- yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
- ? yytable[yyi]
- : yydefgoto[yylhs]);
- }
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
goto yynewstate;
-/*--------------------------------------.
-| yyerrlab -- here on detecting error. |
-`--------------------------------------*/
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
yyerrlab:
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (xplist, YY_("syntax error"));
+#else
{
- yypcontext_t yyctx
- = {yyssp, yytoken};
- char const *yymsgp = YY_("syntax error");
- int yysyntax_error_status;
- yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
- if (yysyntax_error_status == 0)
- yymsgp = yymsg;
- else if (yysyntax_error_status == -1)
- {
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = YY_CAST (char *,
- YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
- if (yymsg)
- {
- yysyntax_error_status
- = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
- yymsgp = yymsg;
- }
- else
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- yysyntax_error_status = YYENOMEM;
- }
- }
- yyerror (xplist, yymsgp);
- if (yysyntax_error_status == YYENOMEM)
- YYNOMEM;
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+ {
+ YYSIZE_T yyalloc = 2 * yysize;
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+ if (yymsg)
+ yymsg_alloc = yyalloc;
+ else
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ }
+ }
+
+ if (0 < yysize && yysize <= yymsg_alloc)
+ {
+ (void) yysyntax_error (yymsg, yystate, yychar);
+ yyerror (xplist, yymsg);
+ }
+ else
+ {
+ yyerror (xplist, YY_("syntax error"));
+ if (yysize != 0)
+ goto yyexhaustedlab;
+ }
}
+#endif
}
+
+
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
- error, discard it. */
+ error, discard it. */
if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval, xplist);
- yychar = YYEMPTY;
- }
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, xplist);
+ yychar = YYEMPTY;
+ }
}
/* Else will try to reuse lookahead token after shifting the error
@@ -1808,13 +1829,14 @@ yyerrlab:
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
yyerrorlab:
- /* Pacify compilers when the user code never invokes YYERROR and the
- label yyerrorlab therefore never appears in user code. */
- if (0)
- YYERROR;
- ++yynerrs;
- /* Do not reclaim the symbols of the rule whose action triggered
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
+
+ /* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
@@ -1827,42 +1849,39 @@ yyerrorlab:
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
- /* Pop stack until we find a state that shifts the error token. */
for (;;)
{
yyn = yypact[yystate];
- if (!yypact_value_is_default (yyn))
- {
- yyn += YYSYMBOL_YYerror;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
- YYABORT;
+ YYABORT;
yydestruct ("Error: popping",
- YY_ACCESSING_SYMBOL (yystate), yyvsp, xplist);
+ yystos[yystate], yyvsp, xplist);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
- YY_IGNORE_MAYBE_UNINITIALIZED_END
/* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
@@ -1873,58 +1892,55 @@ yyerrlab1:
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
- goto yyreturnlab;
-
+ goto yyreturn;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
yyresult = 1;
- goto yyreturnlab;
+ goto yyreturn;
-
-/*-----------------------------------------------------------.
-| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
-`-----------------------------------------------------------*/
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
yyexhaustedlab:
yyerror (xplist, YY_("memory exhausted"));
yyresult = 2;
- goto yyreturnlab;
+ /* Fall through. */
+#endif
-
-/*----------------------------------------------------------.
-| yyreturnlab -- parsing is finished, clean up and return. |
-`----------------------------------------------------------*/
-yyreturnlab:
+yyreturn:
if (yychar != YYEMPTY)
- {
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = YYTRANSLATE (yychar);
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval, xplist);
- }
- /* Do not reclaim the symbols of the rule whose action triggered
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, xplist);
+ /* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, xplist);
+ yystos[*yyssp], yyvsp, xplist);
YYPOPSTACK (1);
}
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
+#if YYERROR_VERBOSE
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
- return yyresult;
+#endif
+ /* Make sure YYID is used. */
+ return YYID (yyresult);
}
-#line 234 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+
+
+/* Line 1675 of yacc.c */
+#line 234 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
void print_xp_list(struct list *xplist) {
@@ -2075,3 +2091,4 @@ void xperror(struct list *xplist, char const *s) {
fprintf(stderr, "Line %d: %s\n", xplineno, s);
exit(-1);
}
+
diff --git a/build/xp_parser.tab.h b/build/xp_parser.tab.h
index 75abfa7..e029716 100644
--- a/build/xp_parser.tab.h
+++ b/build/xp_parser.tab.h
@@ -1,22 +1,23 @@
-/* A Bison parser, made by GNU Bison 3.8.2. */
-/* Bison interface for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
- Inc.
+/* A Bison parser, made by GNU Bison 2.4.1. */
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program. If not, see . */
+ along with this program. If not, see . */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -27,77 +28,63 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
- especially those whose name start with YY_ or yy_. They are
- private implementation details that can be changed or removed. */
-#ifndef YY_XP_HOME_NOAH_DOCUMENTS_SCHOOL_THESIS_WORK_AG_PARALLEL_BUILD_XP_PARSER_TAB_H_INCLUDED
-# define YY_XP_HOME_NOAH_DOCUMENTS_SCHOOL_THESIS_WORK_AG_PARALLEL_BUILD_XP_PARSER_TAB_H_INCLUDED
-/* Debug traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-#if YYDEBUG
-extern int xpdebug;
-#endif
-
-/* Token kinds. */
+/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
- enum yytokentype
- {
- YYEMPTY = -2,
- YYEOF = 0, /* "end of file" */
- YYerror = 256, /* error */
- YYUNDEF = 257, /* "invalid token" */
- IDENTIFIER = 258, /* IDENTIFIER */
- INT = 259, /* INT */
- FLOAT = 260, /* FLOAT */
- GROUP = 261, /* GROUP */
- EQ = 262, /* EQ */
- NEQ = 263, /* NEQ */
- GT = 264, /* GT */
- LT = 265, /* LT */
- GEQ = 266, /* GEQ */
- LEQ = 267, /* LEQ */
- PLUSEQ = 268, /* PLUSEQ */
- SUBEQ = 269, /* SUBEQ */
- ONEDIR = 270, /* ONEDIR */
- ONEDIRBACK = 271, /* ONEDIRBACK */
- BIDIR = 272, /* BIDIR */
- NOTONEDIR = 273, /* NOTONEDIR */
- NOTBIDIR = 274, /* NOTBIDIR */
- ADD = 275, /* ADD */
- INSERT = 276, /* INSERT */
- UPDATE = 277, /* UPDATE */
- DELETE = 278, /* DELETE */
- REMOVE = 279, /* REMOVE */
- EXPLOIT = 280, /* EXPLOIT */
- PRECONDITIONS = 281, /* PRECONDITIONS */
- POSTCONDITIONS = 282, /* POSTCONDITIONS */
- COLON = 283, /* COLON */
- FACTS = 284, /* FACTS */
- PERIOD = 285, /* PERIOD */
- SEMI = 286, /* SEMI */
- QUALITY = 287, /* QUALITY */
- COMMA = 288, /* COMMA */
- TOPOLOGY = 289, /* TOPOLOGY */
- WHITESPACE = 290, /* WHITESPACE */
- LPAREN = 291, /* LPAREN */
- RPAREN = 292 /* RPAREN */
- };
- typedef enum yytokentype yytoken_kind_t;
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ IDENTIFIER = 258,
+ INT = 259,
+ FLOAT = 260,
+ GROUP = 261,
+ EQ = 262,
+ NEQ = 263,
+ GT = 264,
+ LT = 265,
+ GEQ = 266,
+ LEQ = 267,
+ PLUSEQ = 268,
+ SUBEQ = 269,
+ ONEDIR = 270,
+ ONEDIRBACK = 271,
+ BIDIR = 272,
+ NOTONEDIR = 273,
+ NOTBIDIR = 274,
+ ADD = 275,
+ INSERT = 276,
+ UPDATE = 277,
+ DELETE = 278,
+ REMOVE = 279,
+ EXPLOIT = 280,
+ PRECONDITIONS = 281,
+ POSTCONDITIONS = 282,
+ COLON = 283,
+ FACTS = 284,
+ PERIOD = 285,
+ SEMI = 286,
+ QUALITY = 287,
+ COMMA = 288,
+ TOPOLOGY = 289,
+ WHITESPACE = 290,
+ LPAREN = 291,
+ RPAREN = 292
+ };
#endif
-/* Value type. */
+
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-union YYSTYPE
+typedef union YYSTYPE
{
-#line 21 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy"
+
+/* Line 1676 of yacc.c */
+#line 21 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy"
struct str_array *arr;
struct list *list;
@@ -107,19 +94,16 @@ union YYSTYPE
struct fact *fct;
char *string;
-#line 111 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.tab.h"
-};
-typedef union YYSTYPE YYSTYPE;
+
+/* Line 1676 of yacc.c */
+#line 101 "/home/nschrick/ag_parallel/build/xp_parser.tab.h"
+} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
-
extern YYSTYPE xplval;
-int xpparse (struct list *xplist);
-
-
-#endif /* !YY_XP_HOME_NOAH_DOCUMENTS_SCHOOL_THESIS_WORK_AG_PARALLEL_BUILD_XP_PARSER_TAB_H_INCLUDED */
diff --git a/build/xp_scanner.c b/build/xp_scanner.c
index 252c8d2..f779d64 100644
--- a/build/xp_scanner.c
+++ b/build/xp_scanner.c
@@ -1,6 +1,6 @@
-#line 1 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c"
+#line 2 "/home/nschrick/ag_parallel/build/xp_scanner.c"
-#line 3 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c"
+#line 4 "/home/nschrick/ag_parallel/build/xp_scanner.c"
#define YY_INT_ALIGNED short int
@@ -8,17 +8,11 @@
#define yy_create_buffer xp_create_buffer
#define yy_delete_buffer xp_delete_buffer
-#define yy_scan_buffer xp_scan_buffer
-#define yy_scan_string xp_scan_string
-#define yy_scan_bytes xp_scan_bytes
+#define yy_flex_debug xp_flex_debug
#define yy_init_buffer xp_init_buffer
#define yy_flush_buffer xp_flush_buffer
#define yy_load_buffer_state xp_load_buffer_state
#define yy_switch_to_buffer xp_switch_to_buffer
-#define yypush_buffer_state xppush_buffer_state
-#define yypop_buffer_state xppop_buffer_state
-#define yyensure_buffer_stack xpensure_buffer_stack
-#define yy_flex_debug xp_flex_debug
#define yyin xpin
#define yyleng xpleng
#define yylex xplex
@@ -33,246 +27,12 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 4
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
-#ifdef yy_create_buffer
-#define xp_create_buffer_ALREADY_DEFINED
-#else
-#define yy_create_buffer xp_create_buffer
-#endif
-
-#ifdef yy_delete_buffer
-#define xp_delete_buffer_ALREADY_DEFINED
-#else
-#define yy_delete_buffer xp_delete_buffer
-#endif
-
-#ifdef yy_scan_buffer
-#define xp_scan_buffer_ALREADY_DEFINED
-#else
-#define yy_scan_buffer xp_scan_buffer
-#endif
-
-#ifdef yy_scan_string
-#define xp_scan_string_ALREADY_DEFINED
-#else
-#define yy_scan_string xp_scan_string
-#endif
-
-#ifdef yy_scan_bytes
-#define xp_scan_bytes_ALREADY_DEFINED
-#else
-#define yy_scan_bytes xp_scan_bytes
-#endif
-
-#ifdef yy_init_buffer
-#define xp_init_buffer_ALREADY_DEFINED
-#else
-#define yy_init_buffer xp_init_buffer
-#endif
-
-#ifdef yy_flush_buffer
-#define xp_flush_buffer_ALREADY_DEFINED
-#else
-#define yy_flush_buffer xp_flush_buffer
-#endif
-
-#ifdef yy_load_buffer_state
-#define xp_load_buffer_state_ALREADY_DEFINED
-#else
-#define yy_load_buffer_state xp_load_buffer_state
-#endif
-
-#ifdef yy_switch_to_buffer
-#define xp_switch_to_buffer_ALREADY_DEFINED
-#else
-#define yy_switch_to_buffer xp_switch_to_buffer
-#endif
-
-#ifdef yypush_buffer_state
-#define xppush_buffer_state_ALREADY_DEFINED
-#else
-#define yypush_buffer_state xppush_buffer_state
-#endif
-
-#ifdef yypop_buffer_state
-#define xppop_buffer_state_ALREADY_DEFINED
-#else
-#define yypop_buffer_state xppop_buffer_state
-#endif
-
-#ifdef yyensure_buffer_stack
-#define xpensure_buffer_stack_ALREADY_DEFINED
-#else
-#define yyensure_buffer_stack xpensure_buffer_stack
-#endif
-
-#ifdef yylex
-#define xplex_ALREADY_DEFINED
-#else
-#define yylex xplex
-#endif
-
-#ifdef yyrestart
-#define xprestart_ALREADY_DEFINED
-#else
-#define yyrestart xprestart
-#endif
-
-#ifdef yylex_init
-#define xplex_init_ALREADY_DEFINED
-#else
-#define yylex_init xplex_init
-#endif
-
-#ifdef yylex_init_extra
-#define xplex_init_extra_ALREADY_DEFINED
-#else
-#define yylex_init_extra xplex_init_extra
-#endif
-
-#ifdef yylex_destroy
-#define xplex_destroy_ALREADY_DEFINED
-#else
-#define yylex_destroy xplex_destroy
-#endif
-
-#ifdef yyget_debug
-#define xpget_debug_ALREADY_DEFINED
-#else
-#define yyget_debug xpget_debug
-#endif
-
-#ifdef yyset_debug
-#define xpset_debug_ALREADY_DEFINED
-#else
-#define yyset_debug xpset_debug
-#endif
-
-#ifdef yyget_extra
-#define xpget_extra_ALREADY_DEFINED
-#else
-#define yyget_extra xpget_extra
-#endif
-
-#ifdef yyset_extra
-#define xpset_extra_ALREADY_DEFINED
-#else
-#define yyset_extra xpset_extra
-#endif
-
-#ifdef yyget_in
-#define xpget_in_ALREADY_DEFINED
-#else
-#define yyget_in xpget_in
-#endif
-
-#ifdef yyset_in
-#define xpset_in_ALREADY_DEFINED
-#else
-#define yyset_in xpset_in
-#endif
-
-#ifdef yyget_out
-#define xpget_out_ALREADY_DEFINED
-#else
-#define yyget_out xpget_out
-#endif
-
-#ifdef yyset_out
-#define xpset_out_ALREADY_DEFINED
-#else
-#define yyset_out xpset_out
-#endif
-
-#ifdef yyget_leng
-#define xpget_leng_ALREADY_DEFINED
-#else
-#define yyget_leng xpget_leng
-#endif
-
-#ifdef yyget_text
-#define xpget_text_ALREADY_DEFINED
-#else
-#define yyget_text xpget_text
-#endif
-
-#ifdef yyget_lineno
-#define xpget_lineno_ALREADY_DEFINED
-#else
-#define yyget_lineno xpget_lineno
-#endif
-
-#ifdef yyset_lineno
-#define xpset_lineno_ALREADY_DEFINED
-#else
-#define yyset_lineno xpset_lineno
-#endif
-
-#ifdef yywrap
-#define xpwrap_ALREADY_DEFINED
-#else
-#define yywrap xpwrap
-#endif
-
-#ifdef yyalloc
-#define xpalloc_ALREADY_DEFINED
-#else
-#define yyalloc xpalloc
-#endif
-
-#ifdef yyrealloc
-#define xprealloc_ALREADY_DEFINED
-#else
-#define yyrealloc xprealloc
-#endif
-
-#ifdef yyfree
-#define xpfree_ALREADY_DEFINED
-#else
-#define yyfree xpfree
-#endif
-
-#ifdef yytext
-#define xptext_ALREADY_DEFINED
-#else
-#define yytext xptext
-#endif
-
-#ifdef yyleng
-#define xpleng_ALREADY_DEFINED
-#else
-#define yyleng xpleng
-#endif
-
-#ifdef yyin
-#define xpin_ALREADY_DEFINED
-#else
-#define yyin xpin
-#endif
-
-#ifdef yyout
-#define xpout_ALREADY_DEFINED
-#else
-#define yyout xpout
-#endif
-
-#ifdef yy_flex_debug
-#define xp_flex_debug_ALREADY_DEFINED
-#else
-#define yy_flex_debug xp_flex_debug
-#endif
-
-#ifdef yylineno
-#define xplineno_ALREADY_DEFINED
-#else
-#define yylineno xplineno
-#endif
-
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@@ -313,6 +73,7 @@ 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
@@ -343,61 +104,63 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
-#ifndef SIZE_MAX
-#define SIZE_MAX (~(size_t)0)
-#endif
-
-#endif /* ! C99 */
-
#endif /* ! FLEXINT_H */
-/* begin standard C++ headers. */
+#ifdef __cplusplus
-/* TODO: this is always defined, so inline it */
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif /* defined (__STDC__) */
+#endif /* ! __cplusplus */
+
+#ifdef YY_USE_CONST
#define yyconst const
-
-#if defined(__GNUC__) && __GNUC__ >= 3
-#define yynoreturn __attribute__((__noreturn__))
#else
-#define yynoreturn
+#define yyconst
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
-/* Promotes a possibly negative, possibly signed char to an
- * integer in range [0..255] for use as an array index.
+/* 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) ((YY_CHAR) (c))
+#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 yyrestart( yyin )
+#define YY_NEW_FILE xprestart(xpin )
+
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -409,56 +172,50 @@ typedef unsigned int flex_uint32_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
+extern int xpleng;
-extern int yyleng;
-
-extern FILE *yyin, *yyout;
+extern FILE *xpin, *xpout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
+
/* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
* access to the local variable yy_act. Since yyless() is a macro, it would break
- * existing scanners that call yyless() from OUTSIDE yylex.
+ * existing scanners that call yyless() from OUTSIDE xplex.
* One obvious solution it to make yy_act a global. I tried that, and saw
- * a 5% performance hit in a non-yylineno scanner, because yy_act is
+ * a 5% performance hit in a non-xplineno scanner, because yy_act is
* normally declared as a register variable-- so it is not worth it.
*/
#define YY_LESS_LINENO(n) \
do { \
int yyl;\
- for ( yyl = n; yyl < yyleng; ++yyl )\
- if ( yytext[yyl] == '\n' )\
- --yylineno;\
- }while(0)
- #define YY_LINENO_REWIND_TO(dst) \
- do {\
- const char *p;\
- for ( p = yy_cp-1; p >= (dst); --p)\
- if ( *p == '\n' )\
- --yylineno;\
+ for ( yyl = n; yyl < xpleng; ++yyl )\
+ if ( xptext[yyl] == '\n' )\
+ --xplineno;\
}while(0)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up yytext. */ \
+ /* Undo effects of setting up xptext. */ \
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 yytext again */ \
+ YY_DO_BEFORE_ACTION; /* set up xptext again */ \
} \
while ( 0 )
+
#define unput(c) yyunput( c, (yytext_ptr) )
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -471,7 +228,7 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- int yy_buf_size;
+ yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
@@ -499,7 +256,7 @@ struct yy_buffer_state
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.
*/
@@ -516,8 +273,8 @@ struct yy_buffer_state
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via yyrestart()), so that the user can continue scanning by
- * just pointing yyin at a new input file.
+ * (via xprestart()), so that the user can continue scanning by
+ * just pointing xpin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -527,7 +284,7 @@ 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 = NULL; /**< Stack as an array. */
+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
@@ -538,101 +295,106 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
#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 yytext is formed. */
+/* yy_hold_char holds the character lost when xptext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int yyleng;
+int xpleng;
/* Points to current character in buffer. */
-static char *yy_c_buf_p = NULL;
+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 yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin. A bit of a hack ...
+/* Flag which is used to allow xpwrap()'s to do buffer switches
+ * instead of setting up a fresh xpin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart ( FILE *input_file );
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
-void yy_delete_buffer ( YY_BUFFER_STATE b );
-void yy_flush_buffer ( YY_BUFFER_STATE b );
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
-void yypop_buffer_state ( void );
+void xprestart (FILE *input_file );
+void xp_switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE xp_create_buffer (FILE *file,int size );
+void xp_delete_buffer (YY_BUFFER_STATE b );
+void xp_flush_buffer (YY_BUFFER_STATE b );
+void xppush_buffer_state (YY_BUFFER_STATE new_buffer );
+void xppop_buffer_state (void );
-static void yyensure_buffer_stack ( void );
-static void yy_load_buffer_state ( void );
-static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
-#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
+static void xpensure_buffer_stack (void );
+static void xp_load_buffer_state (void );
+static void xp_init_buffer (YY_BUFFER_STATE b,FILE *file );
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
+#define YY_FLUSH_BUFFER xp_flush_buffer(YY_CURRENT_BUFFER )
-void *yyalloc ( yy_size_t );
-void *yyrealloc ( void *, yy_size_t );
-void yyfree ( void * );
+YY_BUFFER_STATE xp_scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE xp_scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE xp_scan_bytes (yyconst char *bytes,int len );
+
+void *xpalloc (yy_size_t );
+void *xprealloc (void *,yy_size_t );
+void xpfree (void * );
+
+#define yy_new_buffer xp_create_buffer
-#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- yyensure_buffer_stack (); \
+ xpensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ xp_create_buffer(xpin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
+
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- yyensure_buffer_stack (); \
+ xpensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ xp_create_buffer(xpin,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 xpwrap() (/*CONSTCOND*/1)
+#define xpwrap(n) 1
#define YY_SKIP_YYWRAP
-typedef flex_uint8_t YY_CHAR;
-FILE *yyin = NULL, *yyout = NULL;
+typedef unsigned char YY_CHAR;
+
+FILE *xpin = (FILE *) 0, *xpout = (FILE *) 0;
typedef int yy_state_type;
-extern int yylineno;
-int yylineno = 1;
+extern int xplineno;
-extern char *yytext;
-#ifdef yytext_ptr
-#undef yytext_ptr
-#endif
-#define yytext_ptr yytext
+int xplineno = 1;
-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 yynoreturn yy_fatal_error ( const char* msg );
+extern char *xptext;
+#define yytext_ptr xptext
+
+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 yytext.
+ * corresponding action - sets up xptext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
- yyleng = (int) (yy_cp - yy_bp); \
+ xpleng = (size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
+
#define YY_NUM_RULES 40
#define YY_END_OF_BUFFER 41
/* This struct is not used in this scanner,
@@ -642,7 +404,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static const flex_int16_t yy_accept[126] =
+static yyconst flex_int16_t yy_accept[126] =
{ 0,
0, 0, 41, 39, 38, 38, 39, 39, 16, 17,
39, 31, 39, 32, 13, 29, 30, 21, 18, 22,
@@ -660,7 +422,7 @@ static const flex_int16_t yy_accept[126] =
15, 15, 4, 5, 0
} ;
-static const YY_CHAR yy_ec[256] =
+static yyconst flex_int32_t yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
@@ -692,7 +454,7 @@ static const YY_CHAR yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static const YY_CHAR yy_meta[39] =
+static yyconst flex_int32_t yy_meta[39] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 1, 1, 1, 1, 1, 2, 2, 2,
@@ -700,7 +462,7 @@ static const YY_CHAR yy_meta[39] =
2, 2, 2, 2, 2, 2, 2, 2
} ;
-static const flex_int16_t yy_base[128] =
+static yyconst flex_int16_t yy_base[128] =
{ 0,
0, 0, 149, 150, 37, 39, 27, 145, 150, 150,
131, 150, 33, 36, 41, 130, 150, 50, 129, 128,
@@ -718,7 +480,7 @@ static const flex_int16_t yy_base[128] =
31, 26, 0, 0, 150, 71, 45
} ;
-static const flex_int16_t yy_def[128] =
+static yyconst flex_int16_t yy_def[128] =
{ 0,
125, 1, 125, 125, 125, 125, 125, 126, 125, 125,
125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
@@ -736,7 +498,7 @@ static const flex_int16_t yy_def[128] =
127, 127, 127, 127, 0, 125, 125
} ;
-static const flex_int16_t yy_nxt[189] =
+static yyconst flex_int16_t yy_nxt[189] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 4, 22,
@@ -760,7 +522,7 @@ static const flex_int16_t yy_nxt[189] =
125, 125, 125, 125, 125, 125, 125, 125
} ;
-static const flex_int16_t yy_chk[189] =
+static yyconst flex_int16_t yy_chk[189] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -785,7 +547,7 @@ static const flex_int16_t yy_chk[189] =
} ;
/* Table of booleans, true if rule could match eol. */
-static const flex_int32_t yy_rule_can_match_eol[41] =
+static yyconst flex_int32_t yy_rule_can_match_eol[41] =
{ 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
@@ -794,8 +556,8 @@ static const flex_int32_t yy_rule_can_match_eol[41] =
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int yy_flex_debug;
-int yy_flex_debug = 0;
+extern int xp_flex_debug;
+int xp_flex_debug = 0;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -804,12 +566,11 @@ int yy_flex_debug = 0;
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-#line 8 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+char *xptext;
+#line 1 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+#line 8 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
#include "xp_parser.tab.h"
-#line 811 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c"
-#line 812 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c"
+#line 574 "/home/nschrick/ag_parallel/build/xp_scanner.c"
#define INITIAL 0
@@ -825,36 +586,36 @@ char *yytext;
#define YY_EXTRA_TYPE void *
#endif
-static int yy_init_globals ( void );
+static int yy_init_globals (void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int yylex_destroy ( void );
+int xplex_destroy (void );
-int yyget_debug ( void );
+int xpget_debug (void );
-void yyset_debug ( int debug_flag );
+void xpset_debug (int debug_flag );
-YY_EXTRA_TYPE yyget_extra ( void );
+YY_EXTRA_TYPE xpget_extra (void );
-void yyset_extra ( YY_EXTRA_TYPE user_defined );
+void xpset_extra (YY_EXTRA_TYPE user_defined );
-FILE *yyget_in ( void );
+FILE *xpget_in (void );
-void yyset_in ( FILE * _in_str );
+void xpset_in (FILE * in_str );
-FILE *yyget_out ( void );
+FILE *xpget_out (void );
-void yyset_out ( FILE * _out_str );
+void xpset_out (FILE * out_str );
- int yyget_leng ( void );
+int xpget_leng (void );
-char *yyget_text ( void );
+char *xpget_text (void );
-int yyget_lineno ( void );
+int xpget_lineno (void );
-void yyset_lineno ( int _line_number );
+void xpset_lineno (int line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -862,43 +623,35 @@ void yyset_lineno ( int _line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap ( void );
+extern "C" int xpwrap (void );
#else
-extern int yywrap ( void );
+extern int xpwrap (void );
#endif
#endif
-#ifndef YY_NO_UNPUT
+ static void yyunput (int c,char *buf_ptr );
- static void yyunput ( int c, char *buf_ptr );
-
-#endif
-
#ifndef yytext_ptr
-static void yy_flex_strncpy ( char *, const char *, int );
+static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen ( const char * );
+static int yy_flex_strlen (yyconst char * );
#endif
#ifndef YY_NO_INPUT
+
#ifdef __cplusplus
-static int yyinput ( void );
+static int yyinput (void );
#else
-static int input ( void );
+static int input (void );
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -906,7 +659,7 @@ static int input ( void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
+#define ECHO do { if (fwrite( xptext, xpleng, 1, xpout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -917,20 +670,20 @@ static int input ( void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ unsigned n; \
for ( n = 0; n < max_size && \
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ (c = getc( xpin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
- if ( c == EOF && ferror( yyin ) ) \
+ if ( c == EOF && ferror( xpin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
- while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
+ while ( (result = fread(buf, 1, max_size, xpin))==0 && ferror(xpin)) \
{ \
if( errno != EINTR) \
{ \
@@ -938,7 +691,7 @@ static int input ( void );
break; \
} \
errno=0; \
- clearerr(yyin); \
+ clearerr(xpin); \
} \
}\
\
@@ -971,12 +724,12 @@ static int input ( void );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int yylex (void);
+extern int xplex (void);
-#define YY_DECL int yylex (void)
+#define YY_DECL int xplex (void)
#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after yytext and yyleng
+/* Code executed at the beginning of each rule, after xptext and xpleng
* have been set up.
*/
#ifndef YY_USER_ACTION
@@ -985,7 +738,7 @@ extern int yylex (void);
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK /*LINTED*/break;
+#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
@@ -995,10 +748,15 @@ extern int yylex (void);
*/
YY_DECL
{
- yy_state_type yy_current_state;
- char *yy_cp, *yy_bp;
- int yy_act;
+ register yy_state_type yy_current_state;
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+#line 11 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+
+
+#line 759 "/home/nschrick/ag_parallel/build/xp_scanner.c"
+
if ( !(yy_init) )
{
(yy_init) = 1;
@@ -1010,32 +768,26 @@ YY_DECL
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
- if ( ! yyin )
- yyin = stdin;
+ if ( ! xpin )
+ xpin = stdin;
- if ( ! yyout )
- yyout = stdout;
+ if ( ! xpout )
+ xpout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- yyensure_buffer_stack ();
+ xpensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ xp_create_buffer(xpin,YY_BUF_SIZE );
}
- yy_load_buffer_state( );
+ xp_load_buffer_state( );
}
- {
-#line 11 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-
-
-#line 1032 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c"
-
- while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
+ while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
- /* Support of yytext. */
+ /* Support of xptext. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
@@ -1047,7 +799,7 @@ YY_DECL
yy_match:
do
{
- YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+ 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;
@@ -1057,9 +809,9 @@ yy_match:
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 126 )
- yy_c = yy_meta[yy_c];
+ yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 150 );
@@ -1078,10 +830,10 @@ yy_find_action:
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{
int yyl;
- for ( yyl = 0; yyl < yyleng; ++yyl )
- if ( yytext[yyl] == '\n' )
-
- yylineno++;
+ for ( yyl = 0; yyl < xpleng; ++yyl )
+ if ( xptext[yyl] == '\n' )
+
+ xplineno++;
;
}
@@ -1099,206 +851,206 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
/* rule 1 can match eol */
YY_RULE_SETUP
-#line 13 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+#line 13 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
{}
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 15 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return GROUP; }
+#line 15 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return GROUP; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 16 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return EXPLOIT; }
+#line 16 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return EXPLOIT; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 17 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return PRECONDITIONS; }
+#line 17 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return PRECONDITIONS; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 18 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return POSTCONDITIONS; }
+#line 18 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return POSTCONDITIONS; }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 19 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return QUALITY; }
+#line 19 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return QUALITY; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 20 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return TOPOLOGY; }
+#line 20 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return TOPOLOGY; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 21 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return ADD; }
+#line 21 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return ADD; }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 22 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return INSERT; }
+#line 22 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return INSERT; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 23 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return UPDATE; }
+#line 23 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return UPDATE; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 24 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return DELETE; }
+#line 24 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return DELETE; }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 25 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return REMOVE; }
+#line 25 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return REMOVE; }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 27 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return INT; }
+#line 27 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return INT; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 28 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return FLOAT; }
+#line 28 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return FLOAT; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 29 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return IDENTIFIER; }
+#line 29 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return IDENTIFIER; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 31 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return LPAREN; }
+#line 31 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return LPAREN; }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 32 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return RPAREN; }
+#line 32 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return RPAREN; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 33 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return EQ; }
+#line 33 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return EQ; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 34 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return EQ; }
+#line 34 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return EQ; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 35 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return NEQ; }
+#line 35 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return NEQ; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 36 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return LT; }
+#line 36 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return LT; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 37 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return GT; }
+#line 37 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return GT; }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 38 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return GEQ; }
+#line 38 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return GEQ; }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 39 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return LEQ; }
+#line 39 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return LEQ; }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 40 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return EQ; }
+#line 40 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return EQ; }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 41 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return NEQ; }
+#line 41 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return NEQ; }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 42 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return PLUSEQ; }
+#line 42 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return PLUSEQ; }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 43 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return SUBEQ; }
+#line 43 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return SUBEQ; }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 44 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return COLON; }
+#line 44 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return COLON; }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 45 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return SEMI; }
+#line 45 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return SEMI; }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 46 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return COMMA; }
+#line 46 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return COMMA; }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 47 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return PERIOD; }
+#line 47 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return PERIOD; }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 48 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return BIDIR; }
+#line 48 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return BIDIR; }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 49 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return NOTBIDIR; }
+#line 49 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return NOTBIDIR; }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 50 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return ONEDIR; }
+#line 50 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return ONEDIR; }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 51 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return ONEDIRBACK; }
+#line 51 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return ONEDIRBACK; }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 52 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ xplval.string = strdup(yytext); return NOTONEDIR; }
+#line 52 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ xplval.string = strdup(xptext); return NOTONEDIR; }
YY_BREAK
case 38:
/* rule 38 can match eol */
YY_RULE_SETUP
-#line 53 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+#line 53 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
{}
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 55 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
-{ return yytext[0]; }
+#line 55 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+{ return xptext[0]; }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 57 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+#line 57 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
ECHO;
YY_BREAK
-#line 1301 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c"
+#line 1054 "/home/nschrick/ag_parallel/build/xp_scanner.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1315,15 +1067,15 @@ case YY_STATE_EOF(INITIAL):
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
- * just pointed yyin at a new source and called
- * yylex(). If so, then we have to assure
+ * just pointed xpin at a new source and called
+ * xplex(). 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 = yyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = xpin;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
@@ -1376,11 +1128,11 @@ case YY_STATE_EOF(INITIAL):
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( yywrap( ) )
+ if ( xpwrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * yytext, we can now set up
+ * xptext, 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
@@ -1429,8 +1181,7 @@ case YY_STATE_EOF(INITIAL):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
- } /* end of user's declarations */
-} /* end of yylex */
+} /* end of xplex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -1441,9 +1192,9 @@ case YY_STATE_EOF(INITIAL):
*/
static int yy_get_next_buffer (void)
{
- char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- char *source = (yytext_ptr);
- int number_to_move, i;
+ 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] )
@@ -1472,7 +1223,7 @@ static int yy_get_next_buffer (void)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -1492,7 +1243,7 @@ static int yy_get_next_buffer (void)
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
@@ -1508,12 +1259,11 @@ static int yy_get_next_buffer (void)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yyrealloc( (void *) b->yy_ch_buf,
- (yy_size_t) (b->yy_buf_size + 2) );
+ xprealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = NULL;
+ b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
@@ -1531,7 +1281,7 @@ static int yy_get_next_buffer (void)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), num_to_read );
+ (yy_n_chars), (size_t) num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
@@ -1541,7 +1291,7 @@ static int yy_get_next_buffer (void)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
+ xprestart(xpin );
}
else
@@ -1555,15 +1305,12 @@ static int yy_get_next_buffer (void)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
- (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
+ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) xprealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
- /* "- 2" to take care of EOB's */
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
(yy_n_chars) += number_to_move;
@@ -1579,14 +1326,14 @@ static int yy_get_next_buffer (void)
static yy_state_type yy_get_previous_state (void)
{
- yy_state_type yy_current_state;
- char *yy_cp;
+ 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 )
{
- YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ 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;
@@ -1596,9 +1343,9 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 126 )
- yy_c = yy_meta[yy_c];
+ yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
@@ -1611,10 +1358,10 @@ static int yy_get_next_buffer (void)
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
- int yy_is_jam;
- char *yy_cp = (yy_c_buf_p);
+ register int yy_is_jam;
+ register char *yy_cp = (yy_c_buf_p);
- YY_CHAR yy_c = 1;
+ register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -1624,32 +1371,30 @@ static int yy_get_next_buffer (void)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 126 )
- yy_c = yy_meta[yy_c];
+ yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 125);
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
-#ifndef YY_NO_UNPUT
-
- static void yyunput (int c, char * yy_bp )
+ static void yyunput (int c, register char * yy_bp )
{
- char *yy_cp;
+ register char *yy_cp;
yy_cp = (yy_c_buf_p);
- /* undo effects of setting up yytext */
+ /* undo effects of setting up xptext */
*yy_cp = (yy_hold_char);
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- int number_to_move = (yy_n_chars) + 2;
- char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ register int number_to_move = (yy_n_chars) + 2;
+ register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- char *source =
+ register char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -1658,7 +1403,7 @@ static int yy_get_next_buffer (void)
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
@@ -1667,7 +1412,7 @@ static int yy_get_next_buffer (void)
*--yy_cp = (char) c;
if ( c == '\n' ){
- --yylineno;
+ --xplineno;
}
(yytext_ptr) = yy_bp;
@@ -1675,8 +1420,6 @@ static int yy_get_next_buffer (void)
(yy_c_buf_p) = yy_cp;
}
-#endif
-
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void)
@@ -1701,7 +1444,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
- int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
+ int offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -1718,14 +1461,14 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- yyrestart( yyin );
+ xprestart(xpin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap( ) )
- return 0;
+ if ( xpwrap( ) )
+ return EOF;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
@@ -1744,12 +1487,12 @@ static int yy_get_next_buffer (void)
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve yytext */
+ *(yy_c_buf_p) = '\0'; /* preserve xptext */
(yy_hold_char) = *++(yy_c_buf_p);
if ( c == '\n' )
-
- yylineno++;
+
+ xplineno++;
;
return c;
@@ -1761,32 +1504,32 @@ static int yy_get_next_buffer (void)
*
* @note This function does not reset the start condition to @c INITIAL .
*/
- void yyrestart (FILE * input_file )
+ void xprestart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
- yyensure_buffer_stack ();
+ xpensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ xp_create_buffer(xpin,YY_BUF_SIZE );
}
- yy_init_buffer( YY_CURRENT_BUFFER, input_file );
- yy_load_buffer_state( );
+ xp_init_buffer(YY_CURRENT_BUFFER,input_file );
+ xp_load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ void xp_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
- * yypop_buffer_state();
- * yypush_buffer_state(new_buffer);
+ * xppop_buffer_state();
+ * xppush_buffer_state(new_buffer);
*/
- yyensure_buffer_stack ();
+ xpensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -1799,21 +1542,21 @@ static int yy_get_next_buffer (void)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- yy_load_buffer_state( );
+ xp_load_buffer_state( );
/* We don't actually know whether we did this switch during
- * EOF (yywrap()) processing, but the only time this flag
- * is looked at is after yywrap() is called, so it's safe
+ * EOF (xpwrap()) processing, but the only time this flag
+ * is looked at is after xpwrap() is called, so it's safe
* to go ahead and always set it.
*/
(yy_did_buffer_switch_on_eof) = 1;
}
-static void yy_load_buffer_state (void)
+static void xp_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;
- yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ xpin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
}
@@ -1823,35 +1566,35 @@ static void yy_load_buffer_state (void)
*
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+ YY_BUFFER_STATE xp_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) xpalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in xp_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 *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
+ b->yy_ch_buf = (char *) xpalloc(b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in xp_create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer( b, file );
+ xp_init_buffer(b,file );
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
+ * @param b a buffer created with xp_create_buffer()
*
*/
- void yy_delete_buffer (YY_BUFFER_STATE b )
+ void xp_delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
@@ -1861,27 +1604,31 @@ static void yy_load_buffer_state (void)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yyfree( (void *) b->yy_ch_buf );
+ xpfree((void *) b->yy_ch_buf );
- yyfree( (void *) b );
+ xpfree((void *) b );
}
+#ifndef __cplusplus
+extern int isatty (int );
+#endif /* __cplusplus */
+
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a yyrestart() or at EOF.
+ * such as during a xprestart() or at EOF.
*/
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void xp_init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
- yy_flush_buffer( b );
+ xp_flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then yy_init_buffer was _probably_
- * called from yyrestart() or through yy_get_next_buffer.
+ /* If b is the current buffer, then xp_init_buffer was _probably_
+ * called from xprestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
@@ -1898,7 +1645,7 @@ static void yy_load_buffer_state (void)
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*/
- void yy_flush_buffer (YY_BUFFER_STATE b )
+ void xp_flush_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
@@ -1918,7 +1665,7 @@ static void yy_load_buffer_state (void)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- yy_load_buffer_state( );
+ xp_load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
@@ -1927,14 +1674,14 @@ static void yy_load_buffer_state (void)
* @param new_buffer The new state.
*
*/
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+void xppush_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
- yyensure_buffer_stack();
+ xpensure_buffer_stack();
- /* This block is copied from yy_switch_to_buffer. */
+ /* This block is copied from xp_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -1948,8 +1695,8 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from yy_switch_to_buffer. */
- yy_load_buffer_state( );
+ /* copied from xp_switch_to_buffer. */
+ xp_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
@@ -1957,18 +1704,18 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
* The next element becomes the new top.
*
*/
-void yypop_buffer_state (void)
+void xppop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
- yy_delete_buffer(YY_CURRENT_BUFFER );
+ xp_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_load_buffer_state( );
+ xp_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
@@ -1976,9 +1723,9 @@ void yypop_buffer_state (void)
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void yyensure_buffer_stack (void)
+static void xpensure_buffer_stack (void)
{
- yy_size_t num_to_alloc;
+ int num_to_alloc;
if (!(yy_buffer_stack)) {
@@ -1986,15 +1733,15 @@ static void yyensure_buffer_stack (void)
* 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; /* After all that talk, this was set to 1 anyways... */
- (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ num_to_alloc = 1;
+ (yy_buffer_stack) = (struct yy_buffer_state**)xpalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
+ YY_FATAL_ERROR( "out of dynamic memory in xpensure_buffer_stack()" );
+
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;
@@ -2003,15 +1750,15 @@ static void yyensure_buffer_stack (void)
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
- yy_size_t grow_size = 8 /* arbitrary grow size */;
+ int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)xprealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in xpensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -2023,9 +1770,9 @@ static void yyensure_buffer_stack (void)
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+YY_BUFFER_STATE xp_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
@@ -2033,49 +1780,49 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
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 NULL;
+ return 0;
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) xpalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in xp_scan_buffer()" );
- b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
+ 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 = NULL;
+ 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_switch_to_buffer( b );
+ xp_switch_to_buffer(b );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to yylex() will
+/** Setup the input buffer state to scan a string. The next call to xplex() will
* scan from a @e copy of @a str.
* @param yystr 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_scan_bytes() instead.
+ * xp_scan_bytes() instead.
*/
-YY_BUFFER_STATE yy_scan_string (const char * yystr )
+YY_BUFFER_STATE xp_scan_string (yyconst char * yystr )
{
- return yy_scan_bytes( yystr, (int) strlen(yystr) );
+ return xp_scan_bytes(yystr,strlen(yystr) );
}
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+/** Setup the input buffer state to scan the given bytes. The next call to xplex() will
* scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @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_scan_bytes (const char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE xp_scan_bytes (yyconst char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
@@ -2083,19 +1830,19 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = (yy_size_t) (_yybytes_len + 2);
- buf = (char *) yyalloc( n );
+ n = _yybytes_len + 2;
+ buf = (char *) xpalloc(n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in xp_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_scan_buffer( buf, n );
+ b = xp_scan_buffer(buf,n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in xp_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -2109,9 +1856,9 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
#define YY_EXIT_FAILURE 2
#endif
-static void yynoreturn yy_fatal_error (const char* msg )
+static void yy_fatal_error (yyconst char* msg )
{
- fprintf( stderr, "%s\n", msg );
+ (void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -2121,14 +1868,14 @@ static void yynoreturn yy_fatal_error (const char* msg )
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up yytext. */ \
+ /* Undo effects of setting up xptext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
- yytext[yyleng] = (yy_hold_char); \
- (yy_c_buf_p) = yytext + yyless_macro_arg; \
+ xptext[xpleng] = (yy_hold_char); \
+ (yy_c_buf_p) = xptext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
- yyleng = yyless_macro_arg; \
+ xpleng = yyless_macro_arg; \
} \
while ( 0 )
@@ -2137,129 +1884,129 @@ static void yynoreturn yy_fatal_error (const char* msg )
/** Get the current line number.
*
*/
-int yyget_lineno (void)
+int xpget_lineno (void)
{
-
- return yylineno;
+
+ return xplineno;
}
/** Get the input stream.
*
*/
-FILE *yyget_in (void)
+FILE *xpget_in (void)
{
- return yyin;
+ return xpin;
}
/** Get the output stream.
*
*/
-FILE *yyget_out (void)
+FILE *xpget_out (void)
{
- return yyout;
+ return xpout;
}
/** Get the length of the current token.
*
*/
-int yyget_leng (void)
+int xpget_leng (void)
{
- return yyleng;
+ return xpleng;
}
/** Get the current token.
*
*/
-char *yyget_text (void)
+char *xpget_text (void)
{
- return yytext;
+ return xptext;
}
/** Set the current line number.
- * @param _line_number line number
+ * @param line_number
*
*/
-void yyset_lineno (int _line_number )
+void xpset_lineno (int line_number )
{
- yylineno = _line_number;
+ xplineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param _in_str A readable stream.
+ * @param in_str A readable stream.
*
- * @see yy_switch_to_buffer
+ * @see xp_switch_to_buffer
*/
-void yyset_in (FILE * _in_str )
+void xpset_in (FILE * in_str )
{
- yyin = _in_str ;
+ xpin = in_str ;
}
-void yyset_out (FILE * _out_str )
+void xpset_out (FILE * out_str )
{
- yyout = _out_str ;
+ xpout = out_str ;
}
-int yyget_debug (void)
+int xpget_debug (void)
{
- return yy_flex_debug;
+ return xp_flex_debug;
}
-void yyset_debug (int _bdebug )
+void xpset_debug (int bdebug )
{
- yy_flex_debug = _bdebug ;
+ xp_flex_debug = bdebug ;
}
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from yylex_destroy(), so don't allocate here.
+ * This function is called from xplex_destroy(), so don't allocate here.
*/
- /* We do not touch yylineno unless the option is enabled. */
- yylineno = 1;
+ /* We do not touch xplineno unless the option is enabled. */
+ xplineno = 1;
- (yy_buffer_stack) = NULL;
+ (yy_buffer_stack) = 0;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = NULL;
+ (yy_c_buf_p) = (char *) 0;
(yy_init) = 0;
(yy_start) = 0;
/* Defined in main.c */
#ifdef YY_STDINIT
- yyin = stdin;
- yyout = stdout;
+ xpin = stdin;
+ xpout = stdout;
#else
- yyin = NULL;
- yyout = NULL;
+ xpin = (FILE *) 0;
+ xpout = (FILE *) 0;
#endif
/* For future reference: Set errno on error, since we are called by
- * yylex_init()
+ * xplex_init()
*/
return 0;
}
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy (void)
+/* xplex_destroy is for both reentrant and non-reentrant scanners. */
+int xplex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- yy_delete_buffer( YY_CURRENT_BUFFER );
+ xp_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
- yypop_buffer_state();
+ xppop_buffer_state();
}
/* Destroy the stack itself. */
- yyfree((yy_buffer_stack) );
+ xpfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * yylex() is called, initialization will occur. */
+ * xplex() is called, initialization will occur. */
yy_init_globals( );
return 0;
@@ -2270,19 +2017,18 @@ int yylex_destroy (void)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, const char * s2, int n )
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{
-
- int i;
+ register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (const char * s )
+static int yy_flex_strlen (yyconst char * s )
{
- int n;
+ register int n;
for ( n = 0; s[n]; ++n )
;
@@ -2290,14 +2036,13 @@ static int yy_flex_strlen (const char * s )
}
#endif
-void *yyalloc (yy_size_t size )
+void *xpalloc (yy_size_t size )
{
- return malloc(size);
+ return (void *) malloc( size );
}
-void *yyrealloc (void * ptr, yy_size_t size )
+void *xprealloc (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
@@ -2305,16 +2050,17 @@ void *yyrealloc (void * ptr, yy_size_t size )
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return realloc(ptr, size);
+ return (void *) realloc( (char *) ptr, size );
}
-void yyfree (void * ptr )
+void xpfree (void * ptr )
{
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+ free( (char *) ptr ); /* see xprealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
-#line 57 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+#line 57 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l"
+
diff --git a/src/ag_gen/ag_gen.cpp b/src/ag_gen/ag_gen.cpp
index 83c98a2..f167e82 100755
--- a/src/ag_gen/ag_gen.cpp
+++ b/src/ag_gen/ag_gen.cpp
@@ -156,7 +156,7 @@ createPostConditions(std::tuple &group, Keyvalue &facts) {
* 5. Push the new network state onto the frontier to be expanded later.
*/
AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd, int initQSize,\
- double mem_threshold, boost::mpi::communicator &world) {
+ double mem_threshold, mpi::communicator &world) {
//Init all Nodes with these variables
std::vector exploit_list = instance.exploits;
@@ -387,21 +387,25 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd,
std::cout << "World Size: " << world.size() << " Allocated to Task 1: " << alloc << " Allocated to Task 2: " << two_alloc << "Ceil val: " << ceil_val << std::endl;
//Create Communicators
- boost::mpi::communicator tcomm = world.split(world.rank() > 0 && world.rank() <= alloc);
- boost::mpi::communicator ttwo_comm;
+ //Note, these each return 2 handles!
+ mpi::communicator tcomm = world.split(world.rank() > 0 && world.rank() <= alloc);
+ mpi::communicator ttwo_comm;
if(world.size() == 2){
ttwo_comm = world.split(world.rank() == send_check(world, alloc) && world.rank() <= (2*two_alloc));
}
else
- ttwo_comm = world.split(world.rank() >= send_check(world, alloc) && world.rank() <= (2*two_alloc));
-
+ ttwo_comm = world.split(world.rank() >= send_check(world, alloc) && world.rank() <= (alloc+two_alloc));
+ std::cout << "TCOMM SIZE: " << tcomm.size() << std::endl;
+ std::cout << "TTWO_COMM SIZE: " << ttwo_comm.size() << std::endl;
while (!localFrontier.empty() || !unex_empty() || world.rank() > 0){//while starts
//Node 0 needs to tell other nodes to continue
if(world.rank() == 0){
int dummy = 1;
- for (int w = 1; w < world.size(); w++)
- world.isend(w, 14, dummy);
+ for (int w = 1; w < world.size(); w++){
+ mpi::request dum_req = world.isend(w, 14, dummy);
+ dum_req.wait();
+ }
}
else {
@@ -417,7 +421,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd,
break;
//Receive the message so it's not just sitting in the queue.
int dummy;
- world.irecv(0, 14, dummy);
+ world.recv(0, 14, dummy);
}
//We need to refill the localFrontier with states from the database if it's empty
@@ -438,8 +442,9 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd,
auto current_state = localFrontier.back();
localFrontier.pop_back();
for(int l=0; l < alloc; l++){
- world.isend(send_check(world, l), 20, current_state);
- }
+ mpi::request cs_req = world.isend(send_check(world, l), 20, current_state);
+ cs_req.wait();
+ }
}
//Execute Task 1
@@ -460,7 +465,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd,
//Edge case: 2 nodes: This prevents node 1 from accessing the execution of task 2
if((world.size() == 2 && world.rank() == 0) || world.size() > 2)
{
- if(world.rank() >= send_check(world, alloc) && world.rank() <= (2*two_alloc))
+ if(world.rank() >= send_check(world, alloc) && world.rank() <= (alloc+two_alloc))
{
//Execute Task 2
struct timeval t21,t22;
@@ -474,8 +479,8 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd,
NetworkState new_state;
Quality fact;
- ttwo_comm.irecv(mpi::any_source, 3, fact);
- ttwo_comm.irecv(mpi::any_source, 4, new_state);
+ ttwo_comm.recv(mpi::any_source, 3, fact);
+ ttwo_comm.recv(mpi::any_source, 4, new_state);
instance.facts.hash_table[new_state.compound_assign(fact)]=instance.facts.size();
instance.facts.length++;
@@ -492,14 +497,16 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd,
{
//2 Node Edge case
if(world.size() == 2){
- world.isend(1, 2, 1);
+ mpi::request tdone_req = world.isend(1, 2, 1);
+ tdone_req.wait();
std::cout << "Node " << world.rank() << " sent finished message." << std::endl;
break;
}
- else if(w < world.rank() || w > 2*two_alloc)
+ else if(w < world.rank() || w > alloc+two_alloc)
{
- world.isend(w, 2, 1);
+ mpi::request tdone_req = world.isend(w, 2, 1);
+ tdone_req.wait();
}
}
@@ -520,7 +527,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd,
//while(!world.iprobe(1+alloc, 2) && world.iprobe(mpi::any_source, 3) && world.iprobe(mpi::any_source, 4) && world.iprobe(mpi::any_source, 5))
std::cout << "Node " << world.rank() << " is waiting for Task 2 completion." << std::endl;
int finished_signal = 0;
- if(world.iprobe(send_check(world, alloc), 2) || world.iprobe(0, 2)){
+ if(world.iprobe(mpi::any_source, 2)){
world.recv(mpi::any_source, 2, finished_signal);
}
@@ -528,7 +535,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd,
while(!finished_signal || world.iprobe(mpi::any_source, 3) || world.iprobe(mpi::any_source, 4) || world.iprobe(mpi::any_source, 5))
{
//Check for the finished signal
- if(world.iprobe(send_check(world, alloc), 2) || world.iprobe(0, 2)){
+ if(world.iprobe(mpi::any_source, 2)){
//Prevent double-pulling
if(!finished_signal){
std::cout << "Else nodes received task 2 completion message." << std::endl;
@@ -563,7 +570,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd,
struct timeval t31,t32;
gettimeofday(&t31,NULL);
task_three(instance, critical_state, localFrontier, mem_threshold, world,\
- two_alloc, current_state, exploit, assetGroup, hash_map);
+ alloc, two_alloc, current_state, exploit, assetGroup, hash_map);
std::cout << "Task 3 finished." << std::endl;
gettimeofday(&t32,NULL);
total_task3+=(t32.tv_sec-t31.tv_sec)*1000.0+(t32.tv_usec-t31.tv_usec)/1000.0;
@@ -575,7 +582,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd,
}
//Task Four
- if (world.rank() == send_check(world, 2*two_alloc)){
+ if (world.rank() == send_check(world, alloc+two_alloc)){
if(world.iprobe(0, 7) || world.iprobe(0, 8)){
std::cout << "Node " << world.rank() << " is starting Task 4." << std::endl;
std::vector factbases_dump;
@@ -605,10 +612,11 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd,
if (f_alpha >= (mem_threshold/2)) {
//std::cout << "Frontier Alpha prior to database storing: " << f_alpha << std::endl;
int q_eles = localFrontier.size();
- for (int q = 0; q < q_eles; q++) {
+ for (int q = 0; q < (q_eles/2); q++) {
auto rem_state = localFrontier.front();
localFrontier.pop_front();
- world.send(send_check(world, 2*two_alloc+1), 50, rem_state);
+ mpi::request rem_req = world.isend(send_check(world, alloc+two_alloc+1), 50, rem_state);
+ rem_req.wait();
}
if (!localFrontier.empty())
f_alpha = (static_cast(localFrontier.size()) * (localFrontier.back().get_size()))/tot_sys_mem;
@@ -618,7 +626,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd,
}
}
- if(world.rank() == send_check(world, 2*two_alloc+2)){
+ if(world.rank() == send_check(world, alloc+two_alloc+1)){
while(world.iprobe(0, 50)){
NetworkState save_state;
world.recv(0, 50, save_state);
@@ -630,8 +638,10 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd,
} //while ends
if(world.rank() == 0){
- for (int w = 1; w < world.size(); w++)
- world.isend(w, 15, 1);
+ for (int w = 1; w < world.size(); w++){
+ mpi::request proc_req = world.isend(w, 15, 1);
+ proc_req.wait();
+ }
}
if (mpi_exit == 1){
@@ -685,7 +695,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd,
}
AGGenInstance &AGGen::single_generate(bool batch_process, int batch_num, int numThrd,\
- int initQSize, double mem_threshold, boost::mpi::communicator &world){
+ int initQSize, double mem_threshold, mpi::communicator &world){
std::vector exploit_list = instance.exploits;
diff --git a/src/mpi/tasks.cpp b/src/mpi/tasks.cpp
index 9776989..1236004 100644
--- a/src/mpi/tasks.cpp
+++ b/src/mpi/tasks.cpp
@@ -67,8 +67,8 @@ void task_zero(AGGenInstance &instance, std::deque &localFrontier,
void task_one(AGGenInstance &instance, NetworkState ¤t_state,\
std::vector &exploit_list, std::unordered_map> &od_map,\
- int alloc, int two_alloc, int reduc_factor, int num_tasks, boost::mpi::communicator &world,\
- boost::mpi::communicator &tcomm){
+ int alloc, int two_alloc, int reduc_factor, int num_tasks, mpi::communicator &world,\
+ mpi::communicator &tcomm){
std::cout << "Process rank " << world.rank() << " with " << alloc << " node(s) allocated has started Task 1." << std::endl;
std::vector> appl_exploits;
@@ -133,27 +133,68 @@ void task_one(AGGenInstance &instance, NetworkState ¤t_state,\
//Less nodes allocated to task 2 than task 1.
//Distribute the appl_exploit list from the extra node in task 1 to all other nodes in this task
- if (two_alloc < alloc){
- std::vector> partial_appl_exploits;
- mpi::scatter(tcomm, &appl_exploits, partial_appl_exploits, alloc);
+ if (alloc > two_alloc){
+
+ int has_data;
+ //std::tuple data_mod = std::make_tuple(0, 0);
+ if (world.rank() == alloc){
+ if (appl_exploits.size() > 0){
+ //std::get<0>(data_mod) = ceil((double)appl_exploits.size()/((double)tcomm.size()-1));
+ //std::get<1>(data_mod) = appl_exploits.size()%(tcomm.size()-1);
+ //data_mod = std::make_tuple(ceil((double)appl_exploits.size()/((double)tcomm.size()-1)), appl_exploits.size()%(tcomm.size()-1));
+ has_data = 1;
+ }
+ else{
+ has_data = 0;
+ }
+ }
- if(world.rank() < alloc){
- for(auto itr=partial_appl_exploits.begin(); itr!=partial_appl_exploits.end(); itr++){
- auto index_r=std::distance(partial_appl_exploits.begin(),itr);
- appl_exploits.push_back(partial_appl_exploits.at(index_r));
- }
- }
+ //Convert world.rank() of alloc to tcomm rank by -1
+ broadcast(tcomm, has_data, alloc-1);
+
+ if(has_data==1){
+ std::vector>> sub_partials;
+ std::vector> partial_appl_exploits;
+ if (world.rank() == alloc){
+ size_t num_data = appl_exploits.size()/(tcomm.size()-1);
+ size_t remain = appl_exploits.size()%(tcomm.size()-1);
+ int begin = 0;
+ int end = 0;
+ for (int i = 0; i < std::min((int)(tcomm.size()-1), (int)appl_exploits.size()); ++i){
+ end += (remain > 0) ? (num_data + !!(remain--)) : num_data;
+ sub_partials.push_back(std::vector>(appl_exploits.begin()+begin, appl_exploits.begin()+end));
+ begin = end;
+ mpi::request scatter_req = tcomm.isend(i, 21, sub_partials.at(i));
+ std::cout << "PROCESS " << world.rank() << " SENDING APPL EXPLOIT LIST OF SIZE " << sub_partials.at(i).size() << "TO TCOMM RANK " << i << " ORIGINAL LIST WAS SIZE " << appl_exploits.size() << std::endl;
+ scatter_req.wait();
+ }
+ }
+ tcomm.barrier();
+ if(world.rank() < alloc){
+ if(tcomm.iprobe(alloc-1, 21)){
+ tcomm.recv(alloc-1, 21, partial_appl_exploits);
+ std::cout << "PROCESS " << world.rank() << " RECEIVED APPL EXPLOIT LIST OF SIZE " << partial_appl_exploits.size() << " IN TASK 1" << std::endl;
+ appl_exploits.insert(std::end(appl_exploits), std::begin(partial_appl_exploits), std::end(partial_appl_exploits));
+ //for(auto itr=partial_appl_exploits.begin(); itr!=partial_appl_exploits.end(); itr++){
+ // auto index_r=std::distance(partial_appl_exploits.begin(),itr);
+ // appl_exploits.push_back(partial_appl_exploits.at(index_r));
+ //}
+ }
+ }
+ }
}
//Send Applicable Exploit List
int skip_greatest = 0;
- if (two_alloc < alloc)
+ if (alloc > two_alloc)
skip_greatest = 1;
- if(world.rank() <= alloc - skip_greatest){
+ if(world.rank() <= (alloc - skip_greatest)){
std::cout << "Process " << world.rank() << " sending applicable exploit list of size " << appl_exploits.size() <<\
" to Process " << send_check(world, world.rank() + alloc -1) << std::endl;
- world.isend(send_check(world, world.rank() + alloc -1), 30, appl_exploits);
- world.isend(send_check(world, world.rank() + alloc -1), 40, current_state);
+ mpi::request appl_req = world.isend(send_check(world, world.rank() + alloc -1), 30, appl_exploits);
+ mpi::request cs_req = world.isend(send_check(world, world.rank() + alloc -1), 40, current_state);
+ appl_req.wait();
+ cs_req.wait();
}
}
@@ -170,8 +211,7 @@ void task_two(AGGenInstance &instance, int alloc, int two_alloc, boost::mpi::com
world.recv(mpi::any_source, 30, appl_exploits);
world.recv(mpi::any_source, 40, current_state);
- std::cout << "Process " << world.rank() << " received Task 1 data." << std::endl;
- std::cout << "Appl exploit size " << appl_exploits.size() << std::endl;
+ std::cout << "Process " << world.rank() << " received Task 1 data with Appl exploit size " << appl_exploits.size() << std::endl;
//Check for new fact and new state that caused an update in the hash table and facts
while(world.iprobe(mpi::any_source, 3) || world.iprobe(mpi::any_source, 4)){
@@ -206,45 +246,66 @@ void task_two(AGGenInstance &instance, int alloc, int two_alloc, boost::mpi::com
std::string egroup;
//Build up the map of synchronous fire exploits and send to 0th node of task 2
- for(auto itr=appl_exploits.begin(); itr!=appl_exploits.end(); itr++){
+ for(auto itr=appl_exploits.begin(); itr!=appl_exploits.end();){
//auto e = appl_exploits.at(itr);
auto e = *itr;
egroup = std::get<0>(e).get_group();
-
+ int tflag = 0;
if (egroup != "null"){
sync_vectors[egroup].push_back(e);
- }
+ if(ttwo_comm.rank() != 0){
+ std::cout << "NODE " << world.rank() << " HAD A SYNC EXPLOIT " << std::endl;
+ itr = appl_exploits.erase(itr);
+ tflag = 1;
+ }
+ }
+ if(tflag == 0)
+ itr++;
}
if(ttwo_comm.rank() != 0){
for (auto map_group : ex_groups){
- ttwo_comm.isend(0, 6, sync_vectors[egroup]);
- }
+ if(sync_vectors[map_group].size() > 0){
+ mpi::request sync_req = ttwo_comm.isend(0, 9, std::make_tuple(map_group, sync_vectors[map_group]));
+ std::cout << "NODE " << world.rank() << " SENDING SYNC APPL SIZE OF " << sync_vectors[map_group].size() << std::endl;
+ sync_req.wait();
+ sync_vectors[map_group].clear();
+ }
+ }
+ /*
for(auto itr = appl_exploits.begin(); itr != appl_exploits.end();){
egroup = std::get<0>(*itr).get_group();
- if (egroup == "null"){
+ if (egroup != "null"){
itr = appl_exploits.erase(itr);
}
else{
itr++;
}
- }
+ }*/
}
+ ttwo_comm.barrier();
if(ttwo_comm.rank() == 0 && ttwo_comm.size() > 1){
//Attempt to distribute workload evenly has unintended effects since we don't know which Task 1 data goes where: it could all go to this node.
//for(auto itr = appl_exploits.begin(); itr != appl_exploits.end();){
// itr = appl_exploits.erase(itr);
//}
- for (int r = 0; r < ex_groups.size() * (ttwo_comm.size()-1); r++){
- ttwo_comm.irecv(mpi::any_source, 6, partial_appl_exploits);
- for(auto itr=partial_appl_exploits.begin(); itr!=partial_appl_exploits.end(); itr++){
- auto index_r=std::distance(partial_appl_exploits.begin(),itr);
- appl_exploits.push_back(partial_appl_exploits.at(index_r));
- }
- }
+ //for (int r = 0; r < ex_groups.size() * (ttwo_comm.size()-1); r++){
+ while(ttwo_comm.iprobe(mpi::any_source, 9)){
+ std::tuple>> sync_recv;
+ ttwo_comm.recv(mpi::any_source, 9, sync_recv);
+ partial_appl_exploits = std::get<1>(sync_recv);
+ appl_exploits.insert(std::end(appl_exploits), std::begin(partial_appl_exploits), std::end(partial_appl_exploits));
+ std::cout << "TTWO COMM RANK 0 HAS RECEIVED AN APPL EXPLOIT LIST SIZE OF " << partial_appl_exploits.size() << " RESULTING IN A TOTAL SIZE OF " << appl_exploits.size() << std::endl;
+ sync_vectors[std::get<0>(sync_recv)].insert(std::end(sync_vectors[std::get<0>(sync_recv)]), std::begin(partial_appl_exploits), std::end(partial_appl_exploits));
+ //for(auto itr=partial_appl_exploits.begin(); itr!=partial_appl_exploits.end(); itr++){
+ // auto index_r=std::distance(partial_appl_exploits.begin(),itr);
+ // appl_exploits.push_back(partial_appl_exploits.at(index_r));
+ // }
+ }
}
+
//loop through the vector
for(auto itr=appl_exploits.begin(); itr!=appl_exploits.end(); itr++){
@@ -282,7 +343,7 @@ void task_two(AGGenInstance &instance, int alloc, int two_alloc, boost::mpi::com
break;
}
}
- std::cout << "Sync exploit size " << sync_exploits.size() << std::endl;
+ std::cout << "Sync exploit size " << sync_exploits.size() << " at Node " << world.rank() << " out of a total of " << appl_exploits.size() << std::endl;
for(auto sync_itr=sync_exploits.begin(); sync_itr!=sync_exploits.end(); sync_itr++){
e = *sync_itr;
exploit = std::get<0>(e);
@@ -322,8 +383,10 @@ void task_two(AGGenInstance &instance, int alloc, int two_alloc, boost::mpi::com
{
if(w != world.rank())
{
- world.isend(w, 3, new_state);
- world.isend(w, 4, fact);
+ mpi::request ns_req = world.isend(w, 3, new_state);
+ mpi::request fact_req = world.isend(w, 4, fact);
+ ns_req.wait();
+ fact_req.wait();
}
}
}
@@ -362,14 +425,18 @@ void task_two(AGGenInstance &instance, int alloc, int two_alloc, boost::mpi::com
//<6 Node Edge Case Prevention: Node 0 unable to execute task 3
if(world.rank() != 0){
std::cout << "Node " << world.rank() << " sending new state data to Node 0" << std::endl;
- world.isend(0, 5, new_state);
- world.isend(0, 6, current_state);
- world.isend(0, 10, exploit);
- world.isend(0, 11, assetGroup);
- }
+ mpi::request ns_req = world.isend(0, 5, new_state);
+ mpi::request cs_req = world.isend(0, 6, current_state);
+ mpi::request ex_req = world.isend(0, 10, exploit);
+ mpi::request ag_req = world.isend(0, 11, assetGroup);
+ ns_req.wait();
+ cs_req.wait();
+ ex_req.wait();
+ ag_req.wait();
+ }
else {
task_three(instance, new_state, localFrontier, mem_threshold, world,\
- two_alloc, current_state, exploit, assetGroup, hash_map);
+ alloc, two_alloc, current_state, exploit, assetGroup, hash_map);
}
}
else{
@@ -380,7 +447,7 @@ void task_two(AGGenInstance &instance, int alloc, int two_alloc, boost::mpi::com
}
void task_three(AGGenInstance &instance, NetworkState &new_state, std::deque &localFrontier,\
- double mem_threshold, boost::mpi::communicator &world, int two_alloc, NetworkState ¤t_state,\
+ double mem_threshold, boost::mpi::communicator &world, int alloc, int two_alloc, NetworkState ¤t_state,\
Exploit &exploit, AssetGroup &assetGroup, std::unordered_map &hash_map){
std::cout << "Started Task 3." << std::endl;
@@ -410,7 +477,9 @@ void task_three(AGGenInstance &instance, NetworkState &new_state, std::deque= (mem_threshold/2)) {
//std::cout << "Frontier Alpha prior to database storing: " << f_alpha << std::endl;
- save_unexplored_to_db(new_state);
+ mpi::request ns_req = world.isend(send_check(world, alloc+two_alloc+1), 50, new_state);
+ ns_req.wait();
+ //save_unexplored_to_db(new_state);
if (!localFrontier.empty())
f_alpha = (static_cast(localFrontier.size()) * (localFrontier.back().get_size()))/tot_sys_mem;
else
@@ -420,7 +489,9 @@ void task_three(AGGenInstance &instance, NetworkState &new_state, std::deque= mem_threshold/2){
//std::cout << "Instance Alpha prior to database storing: " << i_alpha << std::endl;
- world.isend(send_check(world, 2*two_alloc), 7, instance.factbases);
- world.isend(send_check(world, 2*two_alloc), 8, instance.edges);
+ mpi::request fb_req = world.isend(send_check(world, alloc+two_alloc), 7, instance.factbases);
+ mpi::request ed_req = world.isend(send_check(world, alloc+two_alloc), 8, instance.edges);
//save_ag_to_db(instance, true);
-
+ fb_req.wait();
+ ed_req.wait();
//Clear vectors and free memory
std::vector().swap(instance.factbases);
std::vector().swap(instance.factbase_items);
diff --git a/src/mpi/tasks.h b/src/mpi/tasks.h
index 2a260cc..f1b0191 100644
--- a/src/mpi/tasks.h
+++ b/src/mpi/tasks.h
@@ -16,7 +16,7 @@ void task_two(AGGenInstance &instance, int alloc, int two_alloc, boost::mpi::com
std::vector ex_groups, std::unordered_map &hash_map);
void task_three(AGGenInstance &instance, NetworkState &new_state, std::deque &localFrontier,\
- double mem_threshold, boost::mpi::communicator &world, int two_alloc, NetworkState ¤t_state,\
+ double mem_threshold, boost::mpi::communicator &world, int alloc, int two_alloc, NetworkState ¤t_state,\
Exploit &exploit, AssetGroup &assetGroup, std::unordered_map &hash_map);
void task_four(NetworkState &new_state);