diff --git a/build/Makefile b/build/Makefile index f8e1447..1bf9deb 100644 --- a/build/Makefile +++ b/build/Makefile @@ -48,19 +48,19 @@ cmake_force: SHELL = /bin/sh # The CMake executable. -CMAKE_COMMAND = /storage/home/nschrick/pkg/cmake/3.22.0/bin/cmake +CMAKE_COMMAND = /usr/bin/cmake # The command to remove a file. -RM = /storage/home/nschrick/pkg/cmake/3.22.0/bin/cmake -E rm -f +RM = /usr/bin/cmake -E rm -f # Escaping for special characters. EQUALS = = # The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /home/nschrick/ag_parallel +CMAKE_SOURCE_DIR = "/home/noah/Documents/School/Thesis Work/ag_parallel" # The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /home/nschrick/ag_parallel/build +CMAKE_BINARY_DIR = "/home/noah/Documents/School/Thesis Work/ag_parallel/build" #============================================================================= # Targets provided globally by CMake. @@ -68,7 +68,7 @@ CMAKE_BINARY_DIR = /home/nschrick/ag_parallel/build # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." - /storage/home/nschrick/pkg/cmake/3.22.0/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) + /usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : edit_cache # Special rule for the target edit_cache @@ -78,7 +78,7 @@ edit_cache/fast: edit_cache # Special rule for the target rebuild_cache rebuild_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." - /storage/home/nschrick/pkg/cmake/3.22.0/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) + /usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) .PHONY : rebuild_cache # Special rule for the target rebuild_cache @@ -87,9 +87,9 @@ rebuild_cache/fast: rebuild_cache # The main all target all: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start /home/nschrick/ag_parallel/build/CMakeFiles /home/nschrick/ag_parallel/build//CMakeFiles/progress.marks + $(CMAKE_COMMAND) -E cmake_progress_start "/home/noah/Documents/School/Thesis Work/ag_parallel/build/CMakeFiles" "/home/noah/Documents/School/Thesis Work/ag_parallel/build//CMakeFiles/progress.marks" $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all - $(CMAKE_COMMAND) -E cmake_progress_start /home/nschrick/ag_parallel/build/CMakeFiles 0 + $(CMAKE_COMMAND) -E cmake_progress_start "/home/noah/Documents/School/Thesis Work/ag_parallel/build/CMakeFiles" 0 .PHONY : all # The main clean target @@ -116,6 +116,19 @@ depend: $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 .PHONY : depend +#============================================================================= +# Target rules for targets named doc + +# Build rule for target. +doc: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 doc +.PHONY : doc + +# fast build rule for target. +doc/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/doc.dir/build.make CMakeFiles/doc.dir/build +.PHONY : doc/fast + #============================================================================= # Target rules for targets named ag_gen @@ -129,6 +142,19 @@ ag_gen/fast: $(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/build .PHONY : ag_gen/fast +#============================================================================= +# Target rules for targets named dynstr_test + +# Build rule for target. +dynstr_test: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 dynstr_test +.PHONY : dynstr_test + +# fast build rule for target. +dynstr_test/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/dynstr_test.dir/build.make CMakeFiles/dynstr_test.dir/build +.PHONY : dynstr_test/fast + nm_parser.o: nm_parser.c.o .PHONY : nm_parser.o @@ -465,6 +491,30 @@ src/mpi/tasks.cpp.s: $(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/mpi/tasks.cpp.s .PHONY : src/mpi/tasks.cpp.s +src/tests/mem_test.o: src/tests/mem_test.c.o +.PHONY : src/tests/mem_test.o + +# target to build an object file +src/tests/mem_test.c.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/dynstr_test.dir/build.make CMakeFiles/dynstr_test.dir/src/tests/mem_test.c.o +.PHONY : src/tests/mem_test.c.o + +src/tests/mem_test.i: src/tests/mem_test.c.i +.PHONY : src/tests/mem_test.i + +# target to preprocess a source file +src/tests/mem_test.c.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/dynstr_test.dir/build.make CMakeFiles/dynstr_test.dir/src/tests/mem_test.c.i +.PHONY : src/tests/mem_test.c.i + +src/tests/mem_test.s: src/tests/mem_test.c.s +.PHONY : src/tests/mem_test.s + +# target to generate assembly for a file +src/tests/mem_test.c.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/dynstr_test.dir/build.make CMakeFiles/dynstr_test.dir/src/tests/mem_test.c.s +.PHONY : src/tests/mem_test.c.s + src/util/avail_mem.o: src/util/avail_mem.cpp.o .PHONY : src/util/avail_mem.o @@ -615,6 +665,7 @@ src/util/mem.o: src/util/mem.c.o # target to build an object file src/util/mem.c.o: $(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/util/mem.c.o + $(MAKE) $(MAKESILENT) -f CMakeFiles/dynstr_test.dir/build.make CMakeFiles/dynstr_test.dir/src/util/mem.c.o .PHONY : src/util/mem.c.o src/util/mem.i: src/util/mem.c.i @@ -623,6 +674,7 @@ src/util/mem.i: src/util/mem.c.i # target to preprocess a source file src/util/mem.c.i: $(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/util/mem.c.i + $(MAKE) $(MAKESILENT) -f CMakeFiles/dynstr_test.dir/build.make CMakeFiles/dynstr_test.dir/src/util/mem.c.i .PHONY : src/util/mem.c.i src/util/mem.s: src/util/mem.c.s @@ -631,6 +683,7 @@ src/util/mem.s: src/util/mem.c.s # target to generate assembly for a file src/util/mem.c.s: $(MAKE) $(MAKESILENT) -f CMakeFiles/ag_gen.dir/build.make CMakeFiles/ag_gen.dir/src/util/mem.c.s + $(MAKE) $(MAKESILENT) -f CMakeFiles/dynstr_test.dir/build.make CMakeFiles/dynstr_test.dir/src/util/mem.c.s .PHONY : src/util/mem.c.s src/util/redis_manager.o: src/util/redis_manager.cpp.o @@ -761,7 +814,9 @@ help: @echo "... depend" @echo "... edit_cache" @echo "... rebuild_cache" + @echo "... doc" @echo "... ag_gen" + @echo "... dynstr_test" @echo "... nm_parser.o" @echo "... nm_parser.i" @echo "... nm_parser.s" @@ -804,6 +859,9 @@ help: @echo "... src/mpi/tasks.o" @echo "... src/mpi/tasks.i" @echo "... src/mpi/tasks.s" + @echo "... src/tests/mem_test.o" + @echo "... src/tests/mem_test.i" + @echo "... src/tests/mem_test.s" @echo "... src/util/avail_mem.o" @echo "... src/util/avail_mem.i" @echo "... src/util/avail_mem.s" diff --git a/build/ag_gen b/build/ag_gen index e1cb460..1051e4d 100755 Binary files a/build/ag_gen and b/build/ag_gen differ diff --git a/build/build.sh b/build/build.sh index b098983..b98f003 100755 --- a/build/build.sh +++ b/build/build.sh @@ -10,6 +10,5 @@ if [ "$(dnsdomainname)" = "hammer.esg.utulsa.edu" ]; then module load postgresql fi -make clean cmake -DCMAKE_BUILD_TYPE=Debug ../ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DMPICH_IGNORE_CXX_SEEK=1 make ag_gen diff --git a/build/compile_commands.json b/build/compile_commands.json index 5a4f8b7..0d93d60 100644 --- a/build/compile_commands.json +++ b/build/compile_commands.json @@ -1,132 +1,142 @@ [ { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/main.cpp.o -c /home/nschrick/ag_parallel/src/main.cpp", - "file": "/home/nschrick/ag_parallel/src/main.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/main.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/main.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/main.cpp" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/nm_scanner.c.o -c /home/nschrick/ag_parallel/build/nm_scanner.c", - "file": "/home/nschrick/ag_parallel/build/nm_scanner.c" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -o CMakeFiles/ag_gen.dir/nm_scanner.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/nm_parser.c.o -c /home/nschrick/ag_parallel/build/nm_parser.c", - "file": "/home/nschrick/ag_parallel/build/nm_parser.c" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -o CMakeFiles/ag_gen.dir/nm_parser.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/xp_scanner.c.o -c /home/nschrick/ag_parallel/build/xp_scanner.c", - "file": "/home/nschrick/ag_parallel/build/xp_scanner.c" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -o CMakeFiles/ag_gen.dir/xp_scanner.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/xp_parser.c.o -c /home/nschrick/ag_parallel/build/xp_parser.c", - "file": "/home/nschrick/ag_parallel/build/xp_parser.c" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -o CMakeFiles/ag_gen.dir/xp_parser.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/ag_gen.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/ag_gen.cpp", - "file": "/home/nschrick/ag_parallel/src/ag_gen/ag_gen.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/ag_gen.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/ag_gen.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/ag_gen.cpp" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/asset.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/asset.cpp", - "file": "/home/nschrick/ag_parallel/src/ag_gen/asset.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/asset.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/asset.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/asset.cpp" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/assetgroup.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/assetgroup.cpp", - "file": "/home/nschrick/ag_parallel/src/ag_gen/assetgroup.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/assetgroup.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/assetgroup.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/assetgroup.cpp" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/edge.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/edge.cpp", - "file": "/home/nschrick/ag_parallel/src/ag_gen/edge.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/edge.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/edge.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/edge.cpp" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/exploit.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/exploit.cpp", - "file": "/home/nschrick/ag_parallel/src/ag_gen/exploit.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/exploit.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/exploit.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/exploit.cpp" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/factbase.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/factbase.cpp", - "file": "/home/nschrick/ag_parallel/src/ag_gen/factbase.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/factbase.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/factbase.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/factbase.cpp" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/network_state.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/network_state.cpp", - "file": "/home/nschrick/ag_parallel/src/ag_gen/network_state.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/network_state.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/network_state.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/network_state.cpp" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/quality.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/quality.cpp", - "file": "/home/nschrick/ag_parallel/src/ag_gen/quality.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/quality.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/quality.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/quality.cpp" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/topology.cpp.o -c /home/nschrick/ag_parallel/src/ag_gen/topology.cpp", - "file": "/home/nschrick/ag_parallel/src/ag_gen/topology.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/ag_gen/topology.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/topology.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/ag_gen/topology.cpp" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/util/avail_mem.cpp.o -c /home/nschrick/ag_parallel/src/util/avail_mem.cpp", - "file": "/home/nschrick/ag_parallel/src/util/avail_mem.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/util/avail_mem.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/avail_mem.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/avail_mem.cpp" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/src/util/build_sql.c.o -c /home/nschrick/ag_parallel/src/util/build_sql.c", - "file": "/home/nschrick/ag_parallel/src/util/build_sql.c" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -o CMakeFiles/ag_gen.dir/src/util/build_sql.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/build_sql.c\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/build_sql.c" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/util/common.cpp.o -c /home/nschrick/ag_parallel/src/util/common.cpp", - "file": "/home/nschrick/ag_parallel/src/util/common.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/util/common.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/common.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/common.cpp" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/util/db_functions.cpp.o -c /home/nschrick/ag_parallel/src/util/db_functions.cpp", - "file": "/home/nschrick/ag_parallel/src/util/db_functions.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/util/db_functions.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/db_functions.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/db_functions.cpp" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/src/util/hash.c.o -c /home/nschrick/ag_parallel/src/util/hash.c", - "file": "/home/nschrick/ag_parallel/src/util/hash.c" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -o CMakeFiles/ag_gen.dir/src/util/hash.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/hash.c\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/hash.c" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/src/util/list.c.o -c /home/nschrick/ag_parallel/src/util/list.c", - "file": "/home/nschrick/ag_parallel/src/util/list.c" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -o CMakeFiles/ag_gen.dir/src/util/list.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/list.c\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/list.c" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/src/util/mem.c.o -c /home/nschrick/ag_parallel/src/util/mem.c", - "file": "/home/nschrick/ag_parallel/src/util/mem.c" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -o CMakeFiles/ag_gen.dir/src/util/mem.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/mem.c\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/mem.c" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/util/redis_manager.cpp.o -c /home/nschrick/ag_parallel/src/util/redis_manager.cpp", - "file": "/home/nschrick/ag_parallel/src/util/redis_manager.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/util/redis_manager.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/redis_manager.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/redis_manager.cpp" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/src/util/str_array.c.o -c /home/nschrick/ag_parallel/src/util/str_array.c", - "file": "/home/nschrick/ag_parallel/src/util/str_array.c" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -o CMakeFiles/ag_gen.dir/src/util/str_array.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/str_array.c\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/str_array.c" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/gcc -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -g -pthread -o CMakeFiles/ag_gen.dir/src/util/vector.c.o -c /home/nschrick/ag_parallel/src/util/vector.c", - "file": "/home/nschrick/ag_parallel/src/util/vector.c" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/cc -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -pthread -o CMakeFiles/ag_gen.dir/src/util/vector.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/vector.c\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/vector.c" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/mpi/serialize.cpp.o -c /home/nschrick/ag_parallel/src/mpi/serialize.cpp", - "file": "/home/nschrick/ag_parallel/src/mpi/serialize.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/mpi/serialize.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/mpi/serialize.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/mpi/serialize.cpp" }, { - "directory": "/home/nschrick/ag_parallel/build", - "command": "/opt/apps/gcc/8.2.0/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_MPI_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -I/usr/include/postgresql -I/home/nschrick/ag_parallel/src -isystem /home/nschrick/pkg/boost/1.77.0/include -isystem /storage/home/nschrick/pkg/openmpi/4.1.2/include -isystem /home/nschrick/pkg/openmpi/4.1.2/include -std=c++14 -fopenmp -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/mpi/tasks.cpp.o -c /home/nschrick/ag_parallel/src/mpi/tasks.cpp", - "file": "/home/nschrick/ag_parallel/src/mpi/tasks.cpp" + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/c++ -DBOOST_MPI_DYN_LINK -DBOOST_MPI_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -std=c++14 -fopenmp -DREDIS -g -g -O0 -ggdb -Wall -fopenmp -pedantic -pthread -o CMakeFiles/ag_gen.dir/src/mpi/tasks.cpp.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/mpi/tasks.cpp\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/mpi/tasks.cpp" +}, +{ + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/cc -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/dynstr_test.dir/src/util/mem.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/mem.c\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/util/mem.c" +}, +{ + "directory": "/home/noah/Documents/School/Thesis Work/ag_parallel/build", + "command": "/usr/bin/cc -I/usr/include/postgresql -I\"/home/noah/Documents/School/Thesis Work/ag_parallel/src\" -g -o CMakeFiles/dynstr_test.dir/src/tests/mem_test.c.o -c \"/home/noah/Documents/School/Thesis Work/ag_parallel/src/tests/mem_test.c\"", + "file": "/home/noah/Documents/School/Thesis Work/ag_parallel/src/tests/mem_test.c" } ] \ No newline at end of file diff --git a/build/nm_parser.c b/build/nm_parser.c index 97fe7dd..49cac32 100644 --- a/build/nm_parser.c +++ b/build/nm_parser.c @@ -1,23 +1,22 @@ +/* A Bison parser, made by GNU Bison 3.8.2. */ -/* A Bison parser, made by GNU Bison 2.4.1. */ +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Inc. -/* 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 @@ -28,13 +27,17 @@ 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. @@ -42,11 +45,11 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Identify Bison output. */ -#define YYBISON 1 +/* Identify Bison output, and Bison version. */ +#define YYBISON 30802 -/* Bison version. */ -#define YYBISON_VERSION "2.4.1" +/* Bison version string. */ +#define YYBISON_VERSION "3.8.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -60,23 +63,18 @@ /* 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 yylval nmlval -#define yychar nmchar #define yydebug nmdebug #define yynerrs nmnerrs +#define yylval nmlval +#define yychar nmchar - -/* 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" +/* First part of user prologue. */ +#line 4 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy" #include #include @@ -97,125 +95,168 @@ extern int assetcount; extern int factcount; +#line 99 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c" -/* Line 189 of yacc.c */ -#line 103 "/home/nschrick/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 -/* 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 +#include "nm_parser.tab.h" +/* Symbol kind. */ +enum 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; + 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 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 -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; +/* 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 -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +/* 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; +#else typedef signed char yytype_int8; -#else -typedef short int yytype_int8; #endif -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; +#ifdef __INT_LEAST16_MAX__ +typedef __INT_LEAST16_TYPE__ yytype_int16; +#elif defined YY_STDINT_H +typedef int_least16_t yytype_int16; #else -typedef unsigned short int yytype_uint16; +typedef short yytype_int16; #endif -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; +/* 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 int yytype_int16; +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; +#else +typedef int yytype_uint16; +#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 #endif #ifndef YYSIZE_T @@ -223,55 +264,106 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else -# define YYSIZE_T unsigned int +# define YYSIZE_T unsigned # endif #endif -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) +#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; #ifndef YY_ -# if YYENABLE_NLS +# if defined YYENABLE_NLS && 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 +# 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 # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YY_USE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) +/* 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") #else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#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. */ #endif -#if ! defined yyoverflow || YYERROR_VERBOSE +#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 /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -288,11 +380,11 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # endif @@ -300,8 +392,8 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (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 @@ -315,88 +407,89 @@ YYID (yyi) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined _STDLIB_H \ +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - +#endif /* 1 */ #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 { - yytype_int16 yyss_alloc; + yy_state_t yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) -/* 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 +# define YYCOPY_NEEDED 1 /* 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 \ - { \ - 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)) +# 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) #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. */ @@ -408,18 +501,23 @@ union yyalloc #define YYNNTS 15 /* YYNRULES -- Number of rules. */ #define YYNRULES 30 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 54 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 +/* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 282 -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = +/* 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[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -453,31 +551,7 @@ static const yytype_uint8 yytranslate[] = }; #if YYDEBUG -/* 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. */ +/* 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, @@ -487,72 +561,46 @@ static const yytype_uint8 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/** 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; + /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$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 + "\"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 }; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -# 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_NINF (-13) -/* 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 yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) -/* 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_NINF (-1) -/* 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 -}; +#define yytable_value_is_error(Yyn) \ + 0 /* 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, @@ -563,6 +611,19 @@ 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[] = { @@ -570,12 +631,17 @@ static const yytype_int8 yypgoto[] = -13, -13, -13, -13, -13 }; -/* 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[] = +/* 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[] = { 29, 30, 31, 32, 33, 38, 39, 40, 41, 42, 47, 48, 49, 21, 1, 22, 3, 4, 5, 6, @@ -591,9 +657,9 @@ static const yytype_int8 yycheck[] = 22, 3, 3, 3, 46, 24, 22, -1, 22, 24 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = +/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + state STATE-NUM. */ +static const yytype_int8 yystos[] = { 0, 16, 29, 3, 0, 6, 18, 30, 19, 20, 34, 31, 19, 27, 33, 3, 32, 35, 19, 21, @@ -603,95 +669,59 @@ static const yytype_uint8 yystos[] = 38, 39, 37, 22 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 +/* 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 YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab +/* 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 +}; -/* 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. */ +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 -#define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) -#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)) +#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) +/* 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 @@ -701,83 +731,59 @@ while (YYID (0)) # define YYFPRINTF fprintf # endif -# 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)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) + +# 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. | +`-----------------------------------*/ + static void -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 +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, struct networkmodel* nm) { + FILE *yyoutput = yyo; + YY_USE (yyoutput); + YY_USE (nm); if (!yyvaluep) return; - YYUSE (nm); -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END } -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +/*---------------------------. +| Print this symbol on YYO. | +`---------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -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 +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, struct networkmodel* nm) { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, nm); - YYFPRINTF (yyoutput, ")"); + yy_symbol_value_print (yyo, yykind, yyvaluep, nm); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -785,16 +791,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, nm) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -805,64 +803,56 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (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 (YYSTYPE *yyvsp, int yyrule, struct networkmodel* nm) -#else -static void -yy_reduce_print (yyvsp, yyrule, nm) - YYSTYPE *yyvsp; - int yyrule; - struct networkmodel* nm; -#endif +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, + int yyrule, struct networkmodel* nm) { + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , nm); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], nm); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule, nm); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule, nm); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, 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 @@ -877,49 +867,81 @@ int yydebug; # define YYMAXDEPTH 10000 #endif - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#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 +/* Context of a parse error. */ +typedef struct { - YYSIZE_T yylen; + yy_state_t *yyssp; + yysymbol_kind_t yytoken; +} yypcontext_t; + +/* 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 +/* Return the length of YYSTR. */ +static YYPTRDIFF_T +yystrlen (const char *yystr) +{ + YYPTRDIFF_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; @@ -929,10 +951,10 @@ yystpcpy (yydest, 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 @@ -940,281 +962,254 @@ yystpcpy (yydest, 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 YYSIZE_T +static YYPTRDIFF_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { - YYSIZE_T yyn = 0; + YYPTRDIFF_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; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* 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) -{ - int yyn = yypact[yystate]; - - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; + if (yyres) + return yystpcpy (yyres, yystr) - yyres; else - { - 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 yystrlen (yystr); } -#endif /* YYERROR_VERBOSE */ - +#endif + + +static int +yy_syntax_error_arguments (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) +{ + /* 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; + 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; + } + 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; +} + /*-----------------------------------------------. | 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, 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 +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, struct networkmodel* nm) { - YYUSE (yyvaluep); - YYUSE (nm); - + YY_USE (yyvaluep); + YY_USE (nm); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END } -/* 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 */ - -/* The lookahead symbol. */ +/* Lookahead token kind. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; - /* Number of syntax errors so far. */ int yynerrs; -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ -#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) +/*----------. +| yyparse. | +`----------*/ + int yyparse (struct networkmodel* nm) -#else -int -yyparse (nm) - struct networkmodel* nm; -#endif -#endif { - - - int yystate; + yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; + int yyerrstatus = 0; - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - - Refer to the stacks thru separate pointers, to allow yyoverflow + /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The semantic value stack. */ + /* 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. */ YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; int yyn; + /* The return value of yyparse. */ int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* 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; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) @@ -1222,133 +1217,140 @@ yyparse (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: - *yyssp = yystate; + +/*--------------------------------------------------------------------. +| 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); if (yyss + yystacksize - 1 <= yyssp) +#if !defined yyoverflow && !defined YYSTACK_RELOCATE + YYNOMEM; +#else { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; + YYPTRDIFF_T yysize = yyssp - yyss + 1; -#ifdef yyoverflow +# if defined 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. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; + /* 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; - /* 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; + /* 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; } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else +# else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + YYNOMEM; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - 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); + 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); # 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; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END 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 (yyn == YYPACT_NINF) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (); } if (yychar <= YYEOF) { - yychar = yytoken = YYEOF; + yychar = YYEOF; + yytoken = YYSYMBOL_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); @@ -1363,8 +1365,8 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + if (yytable_value_is_error (yyn)) + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -1376,13 +1378,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; @@ -1397,14 +1399,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 @@ -1417,247 +1419,238 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 2: - -/* Line 1455 of yacc.c */ -#line 52 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy" - {;} + 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" break; - case 3: - -/* Line 1455 of yacc.c */ -#line 55 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy" - {;} + 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" break; - case 4: - -/* Line 1455 of yacc.c */ -#line 58 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy" - {;} + 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" break; - 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)); - ;} + 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" break; - 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); ;} + 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" break; - case 7: - -/* Line 1455 of yacc.c */ -#line 67 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy" - {;} + 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" break; - case 8: - -/* Line 1455 of yacc.c */ -#line 68 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy" - {;} + 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" break; - 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); ;} + 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" break; - case 10: - -/* Line 1455 of yacc.c */ -#line 74 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy" - { (yyval.lst) = NULL; ;} + 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" break; - 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) { + 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) { (yyval.lst) = list_new(); - list_add((yyval.lst), (yyvsp[(2) - (2)].fct)); + list_add((yyval.lst), (yyvsp[0].fct)); } else { - list_add((yyval.lst), (yyvsp[(2) - (2)].fct)); - (yyval.lst) = (yyvsp[(1) - (2)].lst); + list_add((yyval.lst), (yyvsp[0].fct)); + (yyval.lst) = (yyvsp[-1].lst); } - ;} + } +#line 1490 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c" break; - case 12: - -/* Line 1455 of yacc.c */ -#line 86 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy" - { + 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" + { statement *st = getmem(sizeof(struct statement)); - st->obj = (yyvsp[(5) - (6)].st)->obj; - st->op = (yyvsp[(5) - (6)].st)->op; - st->val = (yyvsp[(5) - (6)].st)->val; + st->obj = (yyvsp[-1].st)->obj; + st->op = (yyvsp[-1].st)->op; + st->val = (yyvsp[-1].st)->val; struct fact *fct = getmem(sizeof(struct fact)); fct->type = QUALITY_T; - fct->from = (yyvsp[(3) - (6)].string); + fct->from = (yyvsp[-3].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: - -/* 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; + 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; struct fact *fct = getmem(sizeof(struct fact)); fct->type = TOPOLOGY_T; - fct->from = (yyvsp[(3) - (8)].string); - fct->dir = (yyvsp[(4) - (8)].string); - fct->to = (yyvsp[(5) - (8)].string); + fct->from = (yyvsp[-5].string); + fct->dir = (yyvsp[-4].string); + fct->to = (yyvsp[-3].string); fct->st = st; (yyval.fct) = fct; - ;} + } +#line 1530 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.c" break; - case 14: - -/* Line 1455 of yacc.c */ -#line 119 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy" - { + case 14: /* statement: IDENTIFIER */ +#line 119 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy" + { struct statement* st = getmem(sizeof(struct statement)); - st->obj = (yyvsp[(1) - (1)].string); + st->obj = (yyvsp[0].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: - -/* Line 1455 of yacc.c */ -#line 126 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy" - { + case 15: /* statement: IDENTIFIER operator value */ +#line 126 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy" + { struct statement* st = getmem(sizeof(struct statement)); - st->obj = (yyvsp[(1) - (3)].string); - st->op = (yyvsp[(2) - (3)].string); - st->val = (yyvsp[(3) - (3)].string); + st->obj = (yyvsp[-2].string); + st->op = (yyvsp[-1].string); + st->val = (yyvsp[0].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; } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + /* 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); 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. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; + { + const int yylhs = yyr1[yyn] - YYNTOKENS; + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); + } 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 { - 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; - } + 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; } -#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 @@ -1669,14 +1662,13 @@ 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; - /* 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 + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -1689,39 +1681,42 @@ 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 (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + 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; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp, nm); + YY_ACCESSING_SYMBOL (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", yystos[yyn], yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -1732,55 +1727,58 @@ yyerrlab1: `-------------------------------------*/ yyacceptlab: yyresult = 0; - goto yyreturn; + goto yyreturnlab; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; - goto yyreturn; + goto yyreturnlab; -#if !defined(yyoverflow) || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ + +/*-----------------------------------------------------------. +| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | +`-----------------------------------------------------------*/ yyexhaustedlab: yyerror (nm, YY_("memory exhausted")); yyresult = 2; - /* Fall through. */ -#endif + goto yyreturnlab; -yyreturn: + +/*----------------------------------------------------------. +| yyreturnlab -- parsing is finished, clean up and return. | +`----------------------------------------------------------*/ +yyreturnlab: if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, nm); - /* Do not reclaim the symbols of the rule which action triggered + { + /* 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 this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, nm); + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, nm); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif -#if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - -/* Line 1675 of yacc.c */ -#line 165 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy" +#line 165 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy" /* @@ -1879,4 +1877,3 @@ 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 b2e8fff..ca17fe4 100644 --- a/build/nm_parser.tab.h +++ b/build/nm_parser.tab.h @@ -1,23 +1,22 @@ +/* A Bison parser, made by GNU Bison 3.8.2. */ -/* A Bison parser, made by GNU Bison 2.4.1. */ +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Inc. -/* 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 @@ -28,53 +27,67 @@ 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. */ -/* 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 - }; +#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. */ +#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; +#endif - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +union YYSTYPE { - -/* Line 1676 of yacc.c */ -#line 25 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_parser.yy" +#line 25 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_parser.yy" struct str_array* arr; struct list* lst; @@ -83,16 +96,19 @@ typedef union YYSTYPE struct fact *fct; char* string; +#line 100 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_parser.tab.h" - -/* Line 1676 of yacc.c */ -#line 90 "/home/nschrick/ag_parallel/build/nm_parser.tab.h" -} YYSTYPE; +}; +typedef union YYSTYPE 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 fcf275c..4f96267 100644 --- a/build/nm_scanner.c +++ b/build/nm_scanner.c @@ -1,6 +1,6 @@ -#line 2 "/home/nschrick/ag_parallel/build/nm_scanner.c" +#line 1 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c" -#line 4 "/home/nschrick/ag_parallel/build/nm_scanner.c" +#line 3 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c" #define YY_INT_ALIGNED short int @@ -8,11 +8,17 @@ #define yy_create_buffer nm_create_buffer #define yy_delete_buffer nm_delete_buffer -#define yy_flex_debug nm_flex_debug +#define yy_scan_buffer nm_scan_buffer +#define yy_scan_string nm_scan_string +#define yy_scan_bytes nm_scan_bytes #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 @@ -27,12 +33,246 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 #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. */ @@ -73,7 +313,6 @@ 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 @@ -104,63 +343,61 @@ 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 */ -#ifdef __cplusplus +/* begin standard C++ headers. */ -/* 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 +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* Returned upon end-of-file. */ #define YY_NULL 0 -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +#define YY_SC_TO_UI(c) ((YY_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 nmrestart(nmin ) - +#define YY_NEW_FILE yyrestart( yyin ) #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. @@ -172,50 +409,56 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -extern int nmleng; +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif -extern FILE *nmin, *nmout; +extern int yyleng; + +extern FILE *yyin, *yyout; #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 nmlex. + * existing scanners that call yyless() from OUTSIDE yylex. * One obvious solution it to make yy_act a global. I tried that, and saw - * a 5% performance hit in a non-nmlineno scanner, because yy_act is + * a 5% performance hit in a non-yylineno 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 < nmleng; ++yyl )\ - if ( nmtext[yyl] == '\n' )\ - --nmlineno;\ + 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;\ }while(0) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ - /* Undo effects of setting up nmtext. */ \ + /* Undo effects of setting up yytext. */ \ 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 nmtext again */ \ + YY_DO_BEFORE_ACTION; /* set up yytext 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 @@ -228,7 +471,7 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -256,7 +499,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. */ @@ -273,8 +516,8 @@ struct yy_buffer_state * possible backing-up. * * When we actually see the EOF, we change the status to "new" - * (via nmrestart()), so that the user can continue scanning by - * just pointing nmin at a new input file. + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 @@ -284,7 +527,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 = 0; /**< Stack as an array. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< 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 @@ -295,104 +538,99 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< 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 nmtext is formed. */ +/* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int nmleng; +int yyleng; /* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; +static char *yy_c_buf_p = NULL; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ -/* Flag which is used to allow nmwrap()'s to do buffer switches - * instead of setting up a fresh nmin. A bit of a hack ... +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; -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 ); +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 ); -static void nmensure_buffer_stack (void ); -static void nm_load_buffer_state (void ); -static void nm_init_buffer (YY_BUFFER_STATE b,FILE *file ); +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 ) -#define YY_FLUSH_BUFFER nm_flush_buffer(YY_CURRENT_BUFFER ) +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 ); -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 +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); +#define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ - nmensure_buffer_stack (); \ + yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ - nm_create_buffer(nmin,YY_BUF_SIZE ); \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } - #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ - nmensure_buffer_stack (); \ + yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ - nm_create_buffer(nmin,YY_BUF_SIZE ); \ + yy_create_buffer( yyin, 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(n) 1 +#define nmwrap() (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP +typedef flex_uint8_t YY_CHAR; -typedef unsigned char YY_CHAR; - -FILE *nmin = (FILE *) 0, *nmout = (FILE *) 0; +FILE *yyin = NULL, *yyout = NULL; typedef int yy_state_type; -extern int nmlineno; +extern int yylineno; +int yylineno = 1; -int nmlineno = 1; +extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif +#define yytext_ptr yytext -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[] ); +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 ); /* Done after the current pattern has been matched and before the - * corresponding action - sets up nmtext. + * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ - nmleng = (size_t) (yy_cp - yy_bp); \ + yyleng = (int) (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, @@ -402,7 +640,7 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[72] = +static const 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, @@ -414,7 +652,7 @@ static yyconst flex_int16_t yy_accept[72] = 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, @@ -446,7 +684,7 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[35] = +static const YY_CHAR yy_meta[35] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, @@ -454,7 +692,7 @@ static yyconst flex_int32_t yy_meta[35] = 2, 2, 2, 2 } ; -static yyconst flex_int16_t yy_base[74] = +static const 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, @@ -466,7 +704,7 @@ static yyconst flex_int16_t yy_base[74] = 94, 51, 41 } ; -static yyconst flex_int16_t yy_def[74] = +static const 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, @@ -478,7 +716,7 @@ static yyconst flex_int16_t yy_def[74] = 0, 71, 71 } ; -static yyconst flex_int16_t yy_nxt[129] = +static const 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, @@ -496,7 +734,7 @@ static yyconst flex_int16_t yy_nxt[129] = 71, 71, 71, 71, 71, 71, 71, 71 } ; -static yyconst flex_int16_t yy_chk[129] = +static const 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, @@ -515,7 +753,7 @@ static yyconst flex_int16_t yy_chk[129] = } ; /* Table of booleans, true if rule could match eol. */ -static yyconst flex_int32_t yy_rule_can_match_eol[29] = +static const 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, }; @@ -523,8 +761,8 @@ static yyconst 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 nm_flex_debug; -int nm_flex_debug = 0; +extern int yy_flex_debug; +int yy_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -533,11 +771,12 @@ int nm_flex_debug = 0; #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET -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" +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" #include "nm_parser.tab.h" -#line 541 "/home/nschrick/ag_parallel/build/nm_scanner.c" +#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" #define INITIAL 0 @@ -553,36 +792,36 @@ char *nmtext; #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 nmlex_destroy (void ); +int yylex_destroy ( void ); -int nmget_debug (void ); +int yyget_debug ( void ); -void nmset_debug (int debug_flag ); +void yyset_debug ( int debug_flag ); -YY_EXTRA_TYPE nmget_extra (void ); +YY_EXTRA_TYPE yyget_extra ( void ); -void nmset_extra (YY_EXTRA_TYPE user_defined ); +void yyset_extra ( YY_EXTRA_TYPE user_defined ); -FILE *nmget_in (void ); +FILE *yyget_in ( void ); -void nmset_in (FILE * in_str ); +void yyset_in ( FILE * _in_str ); -FILE *nmget_out (void ); +FILE *yyget_out ( void ); -void nmset_out (FILE * out_str ); +void yyset_out ( FILE * _out_str ); -int nmget_leng (void ); + int yyget_leng ( void ); -char *nmget_text (void ); +char *yyget_text ( void ); -int nmget_lineno (void ); +int yyget_lineno ( void ); -void nmset_lineno (int line_number ); +void yyset_lineno ( int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -590,35 +829,43 @@ void nmset_lineno (int line_number ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int nmwrap (void ); +extern "C" int yywrap ( void ); #else -extern int nmwrap (void ); +extern int yywrap ( void ); #endif #endif - static void yyunput (int c,char *buf_ptr ); +#ifndef YY_NO_UNPUT + static void yyunput ( int c, char *buf_ptr ); + +#endif + #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); +static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); +static int yy_flex_strlen ( const 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. */ @@ -626,7 +873,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( nmtext, nmleng, 1, nmout )) {} } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -637,20 +884,20 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - unsigned n; \ + int n; \ for ( n = 0; n < max_size && \ - (c = getc( nmin )) != EOF && c != '\n'; ++n ) \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ - if ( c == EOF && ferror( nmin ) ) \ + if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ - while ( (result = fread(buf, 1, max_size, nmin))==0 && ferror(nmin)) \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -658,7 +905,7 @@ static int input (void ); break; \ } \ errno=0; \ - clearerr(nmin); \ + clearerr(yyin); \ } \ }\ \ @@ -691,12 +938,12 @@ static int input (void ); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int nmlex (void); +extern int yylex (void); -#define YY_DECL int nmlex (void) +#define YY_DECL int yylex (void) #endif /* !YY_DECL */ -/* Code executed at the beginning of each rule, after nmtext and nmleng +/* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION @@ -705,7 +952,7 @@ extern int nmlex (void); /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ @@ -715,15 +962,10 @@ extern int nmlex (void); */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + 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; @@ -735,26 +977,32 @@ YY_DECL if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ - if ( ! nmin ) - nmin = stdin; + if ( ! yyin ) + yyin = stdin; - if ( ! nmout ) - nmout = stdout; + if ( ! yyout ) + yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { - nmensure_buffer_stack (); + yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = - nm_create_buffer(nmin,YY_BUF_SIZE ); + yy_create_buffer( yyin, YY_BUF_SIZE ); } - nm_load_buffer_state( ); + yy_load_buffer_state( ); } - while ( 1 ) /* loops until end-of-file is reached */ + { +#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 */ { yy_cp = (yy_c_buf_p); - /* Support of nmtext. */ + /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of @@ -766,7 +1014,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + 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; @@ -776,9 +1024,9 @@ yy_match: { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 72 ) - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 94 ); @@ -797,10 +1045,10 @@ yy_find_action: if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { int yyl; - for ( yyl = 0; yyl < nmleng; ++yyl ) - if ( nmtext[yyl] == '\n' ) - - nmlineno++; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + + yylineno++; ; } @@ -818,146 +1066,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/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" +#line 13 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" {} YY_BREAK case 2: YY_RULE_SETUP -#line 15 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" +#line 15 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" { return NETWORK; } YY_BREAK case 3: YY_RULE_SETUP -#line 16 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" +#line 16 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" { return FACTS; } YY_BREAK case 4: YY_RULE_SETUP -#line 17 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" +#line 17 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" { return ASSETS; } YY_BREAK case 5: YY_RULE_SETUP -#line 18 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" +#line 18 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" { return QUALITY; } YY_BREAK case 6: YY_RULE_SETUP -#line 19 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" +#line 19 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" { return TOPOLOGY; } YY_BREAK case 7: YY_RULE_SETUP -#line 20 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" +#line 20 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" { return TAGS; } YY_BREAK case 8: YY_RULE_SETUP -#line 22 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return INT; } +#line 22 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return INT; } YY_BREAK case 9: YY_RULE_SETUP -#line 23 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return FLOAT; } +#line 23 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return FLOAT; } YY_BREAK case 10: YY_RULE_SETUP -#line 24 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return IDENTIFIER; } +#line 24 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return IDENTIFIER; } YY_BREAK case 11: YY_RULE_SETUP -#line 26 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return EQ; } +#line 26 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return EQ; } YY_BREAK case 12: YY_RULE_SETUP -#line 27 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return LT; } +#line 27 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return LT; } YY_BREAK case 13: YY_RULE_SETUP -#line 28 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return GT; } +#line 28 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return GT; } YY_BREAK case 14: YY_RULE_SETUP -#line 29 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return GEQ; } +#line 29 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return GEQ; } YY_BREAK case 15: YY_RULE_SETUP -#line 30 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return LEQ; } +#line 30 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return LEQ; } YY_BREAK case 16: YY_RULE_SETUP -#line 31 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return EQ; } +#line 31 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return EQ; } YY_BREAK case 17: YY_RULE_SETUP -#line 32 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return COLON; } +#line 32 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return COLON; } YY_BREAK case 18: YY_RULE_SETUP -#line 33 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return SEMI; } +#line 33 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return SEMI; } YY_BREAK case 19: YY_RULE_SETUP -#line 34 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return COMMA; } +#line 34 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return COMMA; } YY_BREAK case 20: YY_RULE_SETUP -#line 35 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return PERIOD; } +#line 35 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return PERIOD; } YY_BREAK case 21: YY_RULE_SETUP -#line 36 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return BIDIR; } +#line 36 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return BIDIR; } YY_BREAK case 22: YY_RULE_SETUP -#line 37 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return NOTBIDIR; } +#line 37 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return NOTBIDIR; } YY_BREAK case 23: YY_RULE_SETUP -#line 38 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return ONEDIRBACK; } +#line 38 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return ONEDIRBACK; } YY_BREAK case 24: YY_RULE_SETUP -#line 39 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return ONEDIR; } +#line 39 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return ONEDIR; } YY_BREAK case 25: YY_RULE_SETUP -#line 40 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" -{ nmlval.string = strdup(nmtext); return NOTONEDIR; } +#line 40 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" +{ nmlval.string = strdup(yytext); return NOTONEDIR; } YY_BREAK case 26: /* rule 26 can match eol */ YY_RULE_SETUP -#line 42 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" +#line 42 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" {} YY_BREAK case 27: YY_RULE_SETUP -#line 44 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" +#line 44 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" { return 1; } YY_BREAK case 28: YY_RULE_SETUP -#line 45 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" +#line 45 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" ECHO; YY_BREAK -#line 961 "/home/nschrick/ag_parallel/build/nm_scanner.c" +#line 1208 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/nm_scanner.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -974,15 +1222,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 nmin at a new source and called - * nmlex(). If so, then we have to assure + * just pointed yyin at a new source and called + * yylex(). 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 = nmin; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } @@ -1035,11 +1283,11 @@ case YY_STATE_EOF(INITIAL): { (yy_did_buffer_switch_on_eof) = 0; - if ( nmwrap( ) ) + if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up - * nmtext, we can now set up + * yytext, 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 @@ -1088,7 +1336,8 @@ case YY_STATE_EOF(INITIAL): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ -} /* end of nmlex */ + } /* end of user's declarations */ +} /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * @@ -1099,9 +1348,9 @@ case YY_STATE_EOF(INITIAL): */ static int yy_get_next_buffer (void) { - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) @@ -1130,7 +1379,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++); @@ -1150,7 +1399,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; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); @@ -1166,11 +1415,12 @@ static int yy_get_next_buffer (void) b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - nmrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; + b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -1188,7 +1438,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), (size_t) num_to_read ); + (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1198,7 +1448,7 @@ static int yy_get_next_buffer (void) if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - nmrestart(nmin ); + yyrestart( yyin ); } else @@ -1212,12 +1462,15 @@ static int yy_get_next_buffer (void) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - 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 ); + 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 ); 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; @@ -1233,14 +1486,14 @@ static int yy_get_next_buffer (void) static yy_state_type yy_get_previous_state (void) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + 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; @@ -1250,9 +1503,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[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } return yy_current_state; @@ -1265,10 +1518,10 @@ static int yy_get_next_buffer (void) */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -1278,30 +1531,32 @@ 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[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + 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; } - static void yyunput (int c, register char * yy_bp ) +#ifndef YY_NO_UNPUT + + static void yyunput (int c, char * yy_bp ) { - register char *yy_cp; + char *yy_cp; yy_cp = (yy_c_buf_p); - /* undo effects of setting up nmtext */ + /* undo effects of setting up yytext */ *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. */ - register int number_to_move = (yy_n_chars) + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = + char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -1310,7 +1565,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) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + (yy_n_chars) = (int) 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" ); @@ -1319,7 +1574,7 @@ static int yy_get_next_buffer (void) *--yy_cp = (char) c; if ( c == '\n' ){ - --nmlineno; + --yylineno; } (yytext_ptr) = yy_bp; @@ -1327,6 +1582,8 @@ static int yy_get_next_buffer (void) (yy_c_buf_p) = yy_cp; } +#endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) @@ -1351,7 +1608,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -1368,14 +1625,14 @@ static int yy_get_next_buffer (void) */ /* Reset buffer status. */ - nmrestart(nmin ); + yyrestart( yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( nmwrap( ) ) - return EOF; + if ( yywrap( ) ) + return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -1394,12 +1651,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 nmtext */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); if ( c == '\n' ) - - nmlineno++; + + yylineno++; ; return c; @@ -1411,32 +1668,32 @@ static int yy_get_next_buffer (void) * * @note This function does not reset the start condition to @c INITIAL . */ - void nmrestart (FILE * input_file ) + void yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ - nmensure_buffer_stack (); + yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = - nm_create_buffer(nmin,YY_BUF_SIZE ); + yy_create_buffer( yyin, YY_BUF_SIZE ); } - nm_init_buffer(YY_CURRENT_BUFFER,input_file ); - nm_load_buffer_state( ); + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ - void nm_switch_to_buffer (YY_BUFFER_STATE new_buffer ) + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with - * nmpop_buffer_state(); - * nmpush_buffer_state(new_buffer); + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); */ - nmensure_buffer_stack (); + yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; @@ -1449,21 +1706,21 @@ static int yy_get_next_buffer (void) } YY_CURRENT_BUFFER_LVALUE = new_buffer; - nm_load_buffer_state( ); + yy_load_buffer_state( ); /* We don't actually know whether we did this switch during - * EOF (nmwrap()) processing, but the only time this flag - * is looked at is after nmwrap() is called, so it's safe + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } -static void nm_load_buffer_state (void) +static void yy_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; - nmin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } @@ -1473,35 +1730,35 @@ static void nm_load_buffer_state (void) * * @return the allocated buffer state. */ - YY_BUFFER_STATE nm_create_buffer (FILE * file, int size ) + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) nmalloc(sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in nm_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_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 *) nmalloc(b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in nm_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - nm_init_buffer(b,file ); + yy_init_buffer( b, file ); return b; } /** Destroy the buffer. - * @param b a buffer created with nm_create_buffer() + * @param b a buffer created with yy_create_buffer() * */ - void nm_delete_buffer (YY_BUFFER_STATE b ) + void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) @@ -1511,31 +1768,27 @@ static void nm_load_buffer_state (void) YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - nmfree((void *) b->yy_ch_buf ); + yyfree( (void *) b->yy_ch_buf ); - nmfree((void *) b ); + yyfree( (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 nmrestart() or at EOF. + * such as during a yyrestart() or at EOF. */ - static void nm_init_buffer (YY_BUFFER_STATE b, FILE * file ) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; - nm_flush_buffer(b ); + yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; - /* If b is the current buffer, then nm_init_buffer was _probably_ - * called from nmrestart() or through yy_get_next_buffer. + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ @@ -1552,7 +1805,7 @@ extern int isatty (int ); * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ - void nm_flush_buffer (YY_BUFFER_STATE b ) + void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; @@ -1572,7 +1825,7 @@ extern int isatty (int ); b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) - nm_load_buffer_state( ); + yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes @@ -1581,14 +1834,14 @@ extern int isatty (int ); * @param new_buffer The new state. * */ -void nmpush_buffer_state (YY_BUFFER_STATE new_buffer ) +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; - nmensure_buffer_stack(); + yyensure_buffer_stack(); - /* This block is copied from nm_switch_to_buffer. */ + /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ @@ -1602,8 +1855,8 @@ void nmpush_buffer_state (YY_BUFFER_STATE new_buffer ) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; - /* copied from nm_switch_to_buffer. */ - nm_load_buffer_state( ); + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } @@ -1611,18 +1864,18 @@ void nmpush_buffer_state (YY_BUFFER_STATE new_buffer ) * The next element becomes the new top. * */ -void nmpop_buffer_state (void) +void yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; - nm_delete_buffer(YY_CURRENT_BUFFER ); + yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { - nm_load_buffer_state( ); + yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } @@ -1630,9 +1883,9 @@ void nmpop_buffer_state (void) /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void nmensure_buffer_stack (void) +static void yyensure_buffer_stack (void) { - int num_to_alloc; + yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { @@ -1640,15 +1893,15 @@ static void nmensure_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; - (yy_buffer_stack) = (struct yy_buffer_state**)nmalloc + 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 * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in nmensure_buffer_stack()" ); - + YY_FATAL_ERROR( "out of dynamic memory in yyensure_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; @@ -1657,15 +1910,15 @@ static void nmensure_buffer_stack (void) if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; + yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)nmrealloc + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in nmensure_buffer_stack()" ); + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); @@ -1677,9 +1930,9 @@ static void nmensure_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 nm_scan_buffer (char * base, yy_size_t size ) +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; @@ -1687,49 +1940,49 @@ YY_BUFFER_STATE nm_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 0; + return NULL; - b = (YY_BUFFER_STATE) nmalloc(sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in nm_scan_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = 0; + b->yy_input_file = NULL; 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; - nm_switch_to_buffer(b ); + yy_switch_to_buffer( b ); return b; } -/** Setup the input buffer state to scan a string. The next call to nmlex() will +/** Setup the input buffer state to scan a string. The next call to yylex() 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 - * nm_scan_bytes() instead. + * yy_scan_bytes() instead. */ -YY_BUFFER_STATE nm_scan_string (yyconst char * yystr ) +YY_BUFFER_STATE yy_scan_string (const char * yystr ) { - return nm_scan_bytes(yystr,strlen(yystr) ); + return yy_scan_bytes( yystr, (int) strlen(yystr) ); } -/** Setup the input buffer state to scan the given bytes. The next call to nmlex() will +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE nm_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; @@ -1737,19 +1990,19 @@ YY_BUFFER_STATE nm_scan_bytes (yyconst char * yybytes, int _yybytes_len ) int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) nmalloc(n ); + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n ); if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in nm_scan_bytes()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_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 = nm_scan_buffer(buf,n ); + b = yy_scan_buffer( buf, n ); if ( ! b ) - YY_FATAL_ERROR( "bad buffer in nm_scan_bytes()" ); + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. @@ -1763,9 +2016,9 @@ YY_BUFFER_STATE nm_scan_bytes (yyconst char * yybytes, int _yybytes_len ) #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg ) +static void yynoreturn yy_fatal_error (const char* msg ) { - (void) fprintf( stderr, "%s\n", msg ); + fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -1775,14 +2028,14 @@ static void yy_fatal_error (yyconst char* msg ) #define yyless(n) \ do \ { \ - /* Undo effects of setting up nmtext. */ \ + /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ - nmtext[nmleng] = (yy_hold_char); \ - (yy_c_buf_p) = nmtext + yyless_macro_arg; \ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ - nmleng = yyless_macro_arg; \ + yyleng = yyless_macro_arg; \ } \ while ( 0 ) @@ -1791,129 +2044,129 @@ static void yy_fatal_error (yyconst char* msg ) /** Get the current line number. * */ -int nmget_lineno (void) +int yyget_lineno (void) { - - return nmlineno; + + return yylineno; } /** Get the input stream. * */ -FILE *nmget_in (void) +FILE *yyget_in (void) { - return nmin; + return yyin; } /** Get the output stream. * */ -FILE *nmget_out (void) +FILE *yyget_out (void) { - return nmout; + return yyout; } /** Get the length of the current token. * */ -int nmget_leng (void) +int yyget_leng (void) { - return nmleng; + return yyleng; } /** Get the current token. * */ -char *nmget_text (void) +char *yyget_text (void) { - return nmtext; + return yytext; } /** Set the current line number. - * @param line_number + * @param _line_number line number * */ -void nmset_lineno (int line_number ) +void yyset_lineno (int _line_number ) { - nmlineno = line_number; + yylineno = _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 nm_switch_to_buffer + * @see yy_switch_to_buffer */ -void nmset_in (FILE * in_str ) +void yyset_in (FILE * _in_str ) { - nmin = in_str ; + yyin = _in_str ; } -void nmset_out (FILE * out_str ) +void yyset_out (FILE * _out_str ) { - nmout = out_str ; + yyout = _out_str ; } -int nmget_debug (void) +int yyget_debug (void) { - return nm_flex_debug; + return yy_flex_debug; } -void nmset_debug (int bdebug ) +void yyset_debug (int _bdebug ) { - nm_flex_debug = bdebug ; + yy_flex_debug = _bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. - * This function is called from nmlex_destroy(), so don't allocate here. + * This function is called from yylex_destroy(), so don't allocate here. */ - /* We do not touch nmlineno unless the option is enabled. */ - nmlineno = 1; + /* We do not touch yylineno unless the option is enabled. */ + yylineno = 1; - (yy_buffer_stack) = 0; + (yy_buffer_stack) = NULL; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; + (yy_c_buf_p) = NULL; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT - nmin = stdin; - nmout = stdout; + yyin = stdin; + yyout = stdout; #else - nmin = (FILE *) 0; - nmout = (FILE *) 0; + yyin = NULL; + yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by - * nmlex_init() + * yylex_init() */ return 0; } -/* nmlex_destroy is for both reentrant and non-reentrant scanners. */ -int nmlex_destroy (void) +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ - nm_delete_buffer(YY_CURRENT_BUFFER ); + yy_delete_buffer( YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; - nmpop_buffer_state(); + yypop_buffer_state(); } /* Destroy the stack itself. */ - nmfree((yy_buffer_stack) ); + yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time - * nmlex() is called, initialization will occur. */ + * yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; @@ -1924,18 +2177,19 @@ int nmlex_destroy (void) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +static void yy_flex_strncpy (char* s1, const char * s2, int n ) { - register int i; + + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) +static int yy_flex_strlen (const char * s ) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -1943,13 +2197,14 @@ static int yy_flex_strlen (yyconst char * s ) } #endif -void *nmalloc (yy_size_t size ) +void *yyalloc (yy_size_t size ) { - return (void *) malloc( size ); + return malloc(size); } -void *nmrealloc (void * ptr, yy_size_t size ) +void *yyrealloc (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 @@ -1957,14 +2212,14 @@ void *nmrealloc (void * ptr, yy_size_t size ) * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return realloc(ptr, size); } -void nmfree (void * ptr ) +void yyfree (void * ptr ) { - free( (char *) ptr ); /* see nmrealloc() for (char *) cast */ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 45 "/home/nschrick/ag_parallel/src/parser/nm-parser/nm_scanner.l" +#line 45 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/nm-parser/nm_scanner.l" diff --git a/build/run.sh b/build/run.sh index 1810eda..8cc4309 100755 --- a/build/run.sh +++ b/build/run.sh @@ -55,8 +55,12 @@ if [ "$TYPE" == "$strval1" ]; then #Old #./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 - mpiexec --mca btl_openib_allow_ib 1 --mca btl openib,self,vader --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/10_Exploits/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -t "$NUM_THREADS" -q 1 -p -a 0.6 -z "$DBNAME" + if [ "$(dnsdomainname)" = "hammer.esg.utulsa.edu" ]; then + mpiexec --mca btl_openib_allow_ib 1 --mca btl openib,self,vader --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/10_Exploits/"$NUM_SERV"_Serv/sync_timeline_maintenance.xp -t "$NUM_THREADS" -q 1 -p -a 0.6 -z "$DBNAME" + else + 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 "$NUM_THREADS" -q 1 -p -a 0.6 -z "$DBNAME" + fi # 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" diff --git a/build/xp_parser.c b/build/xp_parser.c index a55256a..fb18e88 100644 --- a/build/xp_parser.c +++ b/build/xp_parser.c @@ -1,23 +1,22 @@ +/* A Bison parser, made by GNU Bison 3.8.2. */ -/* A Bison parser, made by GNU Bison 2.4.1. */ +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Inc. -/* 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 @@ -28,13 +27,17 @@ 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. @@ -42,11 +45,11 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Identify Bison output. */ -#define YYBISON 1 +/* Identify Bison output, and Bison version. */ +#define YYBISON 30802 -/* Bison version. */ -#define YYBISON_VERSION "2.4.1" +/* Bison version string. */ +#define YYBISON_VERSION "3.8.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -60,23 +63,18 @@ /* 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 yylval xplval -#define yychar xpchar #define yydebug xpdebug #define yynerrs xpnerrs +#define yylval xplval +#define yychar xpchar - -/* 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" +/* First part of user prologue. */ +#line 4 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy" #include #include @@ -93,136 +91,184 @@ extern FILE* xpin; extern int xplineno; +#line 95 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c" -/* Line 189 of yacc.c */ -#line 99 "/home/nschrick/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 -/* 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 +#include "xp_parser.tab.h" +/* Symbol kind. */ +enum 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; + 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 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 -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; +/* 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 -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +/* 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; +#else typedef signed char yytype_int8; -#else -typedef short int yytype_int8; #endif -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; +#ifdef __INT_LEAST16_MAX__ +typedef __INT_LEAST16_TYPE__ yytype_int16; +#elif defined YY_STDINT_H +typedef int_least16_t yytype_int16; #else -typedef unsigned short int yytype_uint16; +typedef short yytype_int16; #endif -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; +/* 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 int yytype_int16; +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; +#else +typedef int yytype_uint16; +#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 #endif #ifndef YYSIZE_T @@ -230,55 +276,106 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else -# define YYSIZE_T unsigned int +# define YYSIZE_T unsigned # endif #endif -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) +#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; #ifndef YY_ -# if YYENABLE_NLS +# if defined YYENABLE_NLS && 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 +# 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 # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YY_USE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) +/* 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") #else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#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. */ #endif -#if ! defined yyoverflow || YYERROR_VERBOSE +#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 /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -295,11 +392,11 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # endif @@ -307,8 +404,8 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (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 @@ -322,88 +419,89 @@ YYID (yyi) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined _STDLIB_H \ +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - +#endif /* 1 */ #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 { - yytype_int16 yyss_alloc; + yy_state_t yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) -/* 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 +# define YYCOPY_NEEDED 1 /* 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 \ - { \ - 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)) +# 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) #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. */ @@ -415,18 +513,23 @@ union yyalloc #define YYNNTS 21 /* YYNRULES -- Number of rules. */ #define YYNRULES 47 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 82 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 +/* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 292 -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = +/* 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[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -461,37 +564,7 @@ static const yytype_uint8 yytranslate[] = }; #if YYDEBUG -/* 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. */ +/* 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, @@ -502,83 +575,49 @@ static const yytype_uint8 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/** 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; + /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$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", + "\"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", "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", 0 + "value", "number", "operator", "equality", "relop", "addop", "direction", YY_NULLPTR }; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -# 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_NINF (-16) -/* 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 yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) -/* 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_NINF (-1) -/* 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 -}; +#define yytable_value_is_error(Yyn) \ + 0 /* 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, @@ -592,6 +631,22 @@ 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[] = { @@ -600,12 +655,18 @@ static const yytype_int8 yypgoto[] = -16 }; -/* 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[] = +/* 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[] = { 4, 60, 61, 62, 63, 64, 65, 66, 67, 3, 68, 40, 41, 42, 43, 44, 51, 52, 53, 54, @@ -627,9 +688,9 @@ static const yytype_int8 yycheck[] = 23, -1, -1, -1, -1, -1, -1, 46 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = +/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + state STATE-NUM. */ +static const yytype_int8 yystos[] = { 0, 39, 40, 0, 3, 25, 41, 6, 3, 25, 36, 3, 3, 42, 36, 33, 37, 42, 3, 7, @@ -642,95 +703,61 @@ static const yytype_uint8 yystos[] = 51, 31 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 +/* 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 YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab +/* 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 +}; -/* 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. */ +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 -#define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) -#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)) +#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) +/* 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 @@ -740,83 +767,59 @@ while (YYID (0)) # define YYFPRINTF fprintf # endif -# 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)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) + +# 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. | +`-----------------------------------*/ + static void -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 +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, struct list *xplist) { + FILE *yyoutput = yyo; + YY_USE (yyoutput); + YY_USE (xplist); if (!yyvaluep) return; - YYUSE (xplist); -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END } -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +/*---------------------------. +| Print this symbol on YYO. | +`---------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -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 +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, struct list *xplist) { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyo, "%s %s (", + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, xplist); - YYFPRINTF (yyoutput, ")"); + yy_symbol_value_print (yyo, yykind, yyvaluep, xplist); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -824,16 +827,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, xplist) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -844,64 +839,56 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (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 (YYSTYPE *yyvsp, int yyrule, struct list *xplist) -#else -static void -yy_reduce_print (yyvsp, yyrule, xplist) - YYSTYPE *yyvsp; - int yyrule; - struct list *xplist; -#endif +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, + int yyrule, struct list *xplist) { + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , xplist); + yy_symbol_print (stderr, + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], xplist); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule, xplist); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule, xplist); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, 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 @@ -916,49 +903,81 @@ int yydebug; # define YYMAXDEPTH 10000 #endif - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#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 +/* Context of a parse error. */ +typedef struct { - YYSIZE_T yylen; + yy_state_t *yyssp; + yysymbol_kind_t yytoken; +} yypcontext_t; + +/* 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 +/* Return the length of YYSTR. */ +static YYPTRDIFF_T +yystrlen (const char *yystr) +{ + YYPTRDIFF_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; @@ -968,10 +987,10 @@ yystpcpy (yydest, 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 @@ -979,281 +998,254 @@ yystpcpy (yydest, 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 YYSIZE_T +static YYPTRDIFF_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { - YYSIZE_T yyn = 0; + YYPTRDIFF_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; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + else + goto append; - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + append: + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* 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) -{ - int yyn = yypact[yystate]; - - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; + if (yyres) + return yystpcpy (yyres, yystr) - yyres; else - { - 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 yystrlen (yystr); } -#endif /* YYERROR_VERBOSE */ - +#endif + + +static int +yy_syntax_error_arguments (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) +{ + /* 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; + 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; + } + 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; +} + /*-----------------------------------------------. | 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, 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 +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, struct list *xplist) { - YYUSE (yyvaluep); - YYUSE (xplist); - + YY_USE (yyvaluep); + YY_USE (xplist); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END } -/* 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 */ - -/* The lookahead symbol. */ +/* Lookahead token kind. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; - /* Number of syntax errors so far. */ int yynerrs; -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ -#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) +/*----------. +| yyparse. | +`----------*/ + int yyparse (struct list *xplist) -#else -int -yyparse (xplist) - struct list *xplist; -#endif -#endif { - - - int yystate; + yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; + int yyerrstatus = 0; - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - - Refer to the stacks thru separate pointers, to allow yyoverflow + /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The semantic value stack. */ + /* 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. */ YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; int yyn; + /* The return value of yyparse. */ int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* 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; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) @@ -1261,133 +1253,140 @@ yyparse (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: - *yyssp = yystate; + +/*--------------------------------------------------------------------. +| 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); if (yyss + yystacksize - 1 <= yyssp) +#if !defined yyoverflow && !defined YYSTACK_RELOCATE + YYNOMEM; +#else { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; + YYPTRDIFF_T yysize = yyssp - yyss + 1; -#ifdef yyoverflow +# if defined 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. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; + /* 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; - /* 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; + /* 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; } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else +# else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + YYNOMEM; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - 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); + 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); # 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; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END 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 (yyn == YYPACT_NINF) + if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + YYDPRINTF ((stderr, "Reading a token\n")); + yychar = yylex (); } if (yychar <= YYEOF) { - yychar = yytoken = YYEOF; + yychar = YYEOF; + yytoken = YYSYMBOL_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); @@ -1402,8 +1401,8 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + if (yytable_value_is_error (yyn)) + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -1415,13 +1414,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; @@ -1436,14 +1435,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 @@ -1456,368 +1455,348 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 2: - -/* Line 1455 of yacc.c */ -#line 49 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy" - {;} + 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" break; - case 3: - -/* Line 1455 of yacc.c */ -#line 52 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy" - {;} + 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" break; - 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)); -;} + 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" break; - case 5: - -/* Line 1455 of yacc.c */ -#line 58 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy" - { + 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" + { exploitpattern *xp = getmem(sizeof(exploitpattern)); xp->group = "null"; - xp->name = (yyvsp[(2) - (9)].string); - xp->params = (yyvsp[(4) - (9)].arr); - xp->preconditions = (yyvsp[(7) - (9)].list); - xp->postconditions = (yyvsp[(8) - (9)].list); + xp->name = (yyvsp[-7].string); + xp->params = (yyvsp[-5].arr); + xp->preconditions = (yyvsp[-2].list); + xp->postconditions = (yyvsp[-1].list); (yyval.xp) = xp; -;} +} +#line 1490 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c" break; - case 6: - -/* Line 1455 of yacc.c */ -#line 68 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy" - { + 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" + { exploitpattern *xp = getmem(sizeof(exploitpattern)); - 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); + 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); (yyval.xp) = xp; -;} +} +#line 1504 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c" break; - 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) { + 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) { (yyval.arr) = new_str_array(); - add_str((yyval.arr), (yyvsp[(3) - (3)].string)); + add_str((yyval.arr), (yyvsp[0].string)); } else { - (yyval.arr) = (yyvsp[(1) - (3)].arr); - add_str((yyval.arr), (yyvsp[(3) - (3)].string)); + (yyval.arr) = (yyvsp[-2].arr); + add_str((yyval.arr), (yyvsp[0].string)); } -;} +} +#line 1518 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c" break; - case 8: - -/* Line 1455 of yacc.c */ -#line 88 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy" - { + case 8: /* parameters: IDENTIFIER */ +#line 88 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy" + { (yyval.arr) = new_str_array(); - add_str((yyval.arr), (yyvsp[(1) - (1)].string)); -;} + add_str((yyval.arr), (yyvsp[0].string)); +} +#line 1527 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c" break; - case 9: - -/* Line 1455 of yacc.c */ -#line 92 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy" - { (yyval.arr) = NULL; ;} + 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" break; - 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); ;} + 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" break; - case 11: - -/* Line 1455 of yacc.c */ -#line 98 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy" - { (yyval.list) = NULL; ;} + 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" break; - 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) { + 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) { (yyval.list) = list_new(); - list_add((yyval.list), (yyvsp[(2) - (2)].fct)); + list_add((yyval.list), (yyvsp[0].fct)); } else { - list_add((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].fct)); - (yyval.list) = (yyvsp[(1) - (2)].list); + list_add((yyvsp[-1].list), (yyvsp[0].fct)); + (yyval.list) = (yyvsp[-1].list); } -;} +} +#line 1559 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c" break; - 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); -;} + 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" break; - 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); -;} + 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" break; - case 15: - -/* Line 1455 of yacc.c */ -#line 120 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy" - { (yyval.list) = NULL; ;} + 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" break; - 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) { + 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) { (yyval.list) = list_new(); - list_add((yyval.list), (yyvsp[(2) - (2)].pc)); + list_add((yyval.list), (yyvsp[0].pc)); } else { - list_add((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].pc)); - (yyval.list) = (yyvsp[(1) - (2)].list); + list_add((yyvsp[-1].list), (yyvsp[0].pc)); + (yyval.list) = (yyvsp[-1].list); } -;} +} +#line 1595 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c" break; - case 17: - -/* Line 1455 of yacc.c */ -#line 132 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy" - { + case 17: /* postcondition: operation fact */ +#line 132 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy" + { postcondition *pc = getmem(sizeof(postcondition)); - pc->op = (yyvsp[(1) - (2)].string); - pc->f = (yyvsp[(2) - (2)].fct); + pc->op = (yyvsp[-1].string); + pc->f = (yyvsp[0].fct); (yyval.pc) = pc; -;} +} +#line 1606 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c" break; - 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); ;} + 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" break; - 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); ;} + 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" break; - 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); ;} + 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" break; - 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); ;} + 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" break; - 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); ;} + 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" break; - case 23: - -/* Line 1455 of yacc.c */ -#line 147 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy" - { + 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" + { statement *st = getmem(sizeof(struct statement)); - st->obj = (yyvsp[(5) - (6)].st)->obj; - st->op = (yyvsp[(5) - (6)].st)->op; - st->val = (yyvsp[(5) - (6)].st)->val; + st->obj = (yyvsp[-1].st)->obj; + st->op = (yyvsp[-1].st)->op; + st->val = (yyvsp[-1].st)->val; struct fact *fct = getmem(sizeof(struct fact)); fct->type = QUALITY_T; - fct->from = (yyvsp[(3) - (6)].string); + fct->from = (yyvsp[-3].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: - -/* Line 1455 of yacc.c */ -#line 162 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy" - { + 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" + { statement *st = getmem(sizeof(statement)); - st->obj = (yyvsp[(7) - (8)].st)->obj; - st->op = (yyvsp[(7) - (8)].st)->op; - st->val = (yyvsp[(7) - (8)].st)->val; + st->obj = (yyvsp[-1].st)->obj; + st->op = (yyvsp[-1].st)->op; + st->val = (yyvsp[-1].st)->val; struct fact *fct = getmem(sizeof(struct fact)); fct->type = TOPOLOGY_T; - fct->from = (yyvsp[(3) - (8)].string); - fct->dir = (yyvsp[(4) - (8)].string); - fct->to = (yyvsp[(5) - (8)].string); + fct->from = (yyvsp[-5].string); + fct->dir = (yyvsp[-4].string); + fct->to = (yyvsp[-3].string); fct->st = st; (yyval.fct) = fct; -;} +} +#line 1676 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.c" break; - case 25: - -/* Line 1455 of yacc.c */ -#line 183 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy" - { + case 25: /* statement: IDENTIFIER */ +#line 183 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy" + { statement* st = getmem(sizeof(statement)); - st->obj = (yyvsp[(1) - (1)].string); + st->obj = (yyvsp[0].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: - -/* Line 1455 of yacc.c */ -#line 190 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy" - { + case 26: /* statement: IDENTIFIER operator value */ +#line 190 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy" + { statement* st = getmem(sizeof(statement)); - st->obj = (yyvsp[(1) - (3)].string); - st->op = (yyvsp[(2) - (3)].string); - st->val = (yyvsp[(3) - (3)].string); + st->obj = (yyvsp[-2].string); + st->op = (yyvsp[-1].string); + st->val = (yyvsp[0].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; } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + /* 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); 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. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; + { + const int yylhs = yyr1[yyn] - YYNTOKENS; + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); + } 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 { - 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; - } + 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; } -#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 @@ -1829,14 +1808,13 @@ 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; - /* 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 + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -1849,39 +1827,42 @@ 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 (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + 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; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp, xplist); + YY_ACCESSING_SYMBOL (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", yystos[yyn], yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -1892,55 +1873,58 @@ yyerrlab1: `-------------------------------------*/ yyacceptlab: yyresult = 0; - goto yyreturn; + goto yyreturnlab; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; - goto yyreturn; + goto yyreturnlab; -#if !defined(yyoverflow) || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ + +/*-----------------------------------------------------------. +| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | +`-----------------------------------------------------------*/ yyexhaustedlab: yyerror (xplist, YY_("memory exhausted")); yyresult = 2; - /* Fall through. */ -#endif + goto yyreturnlab; -yyreturn: + +/*----------------------------------------------------------. +| yyreturnlab -- parsing is finished, clean up and return. | +`----------------------------------------------------------*/ +yyreturnlab: if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, xplist); - /* Do not reclaim the symbols of the rule which action triggered + { + /* 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 this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, xplist); + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, xplist); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif -#if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - -/* Line 1675 of yacc.c */ -#line 234 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy" +#line 234 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy" void print_xp_list(struct list *xplist) { @@ -2091,4 +2075,3 @@ 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 e029716..75abfa7 100644 --- a/build/xp_parser.tab.h +++ b/build/xp_parser.tab.h @@ -1,23 +1,22 @@ +/* A Bison parser, made by GNU Bison 3.8.2. */ -/* A Bison parser, made by GNU Bison 2.4.1. */ +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Inc. -/* 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 @@ -28,63 +27,77 @@ 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. */ -/* 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 - }; +#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. */ +#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; +#endif - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +union YYSTYPE { - -/* Line 1676 of yacc.c */ -#line 21 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_parser.yy" +#line 21 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_parser.yy" struct str_array *arr; struct list *list; @@ -94,16 +107,19 @@ typedef union YYSTYPE struct fact *fct; char *string; +#line 111 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_parser.tab.h" - -/* Line 1676 of yacc.c */ -#line 101 "/home/nschrick/ag_parallel/build/xp_parser.tab.h" -} YYSTYPE; +}; +typedef union YYSTYPE 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 f779d64..252c8d2 100644 --- a/build/xp_scanner.c +++ b/build/xp_scanner.c @@ -1,6 +1,6 @@ -#line 2 "/home/nschrick/ag_parallel/build/xp_scanner.c" +#line 1 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c" -#line 4 "/home/nschrick/ag_parallel/build/xp_scanner.c" +#line 3 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c" #define YY_INT_ALIGNED short int @@ -8,11 +8,17 @@ #define yy_create_buffer xp_create_buffer #define yy_delete_buffer xp_delete_buffer -#define yy_flex_debug xp_flex_debug +#define yy_scan_buffer xp_scan_buffer +#define yy_scan_string xp_scan_string +#define yy_scan_bytes xp_scan_bytes #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 @@ -27,12 +33,246 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 #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. */ @@ -73,7 +313,6 @@ 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 @@ -104,63 +343,61 @@ 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 */ -#ifdef __cplusplus +/* begin standard C++ headers. */ -/* 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 +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* Returned upon end-of-file. */ #define YY_NULL 0 -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +#define YY_SC_TO_UI(c) ((YY_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 xprestart(xpin ) - +#define YY_NEW_FILE yyrestart( yyin ) #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. @@ -172,50 +409,56 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -extern int xpleng; +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif -extern FILE *xpin, *xpout; +extern int yyleng; + +extern FILE *yyin, *yyout; #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 xplex. + * existing scanners that call yyless() from OUTSIDE yylex. * One obvious solution it to make yy_act a global. I tried that, and saw - * a 5% performance hit in a non-xplineno scanner, because yy_act is + * a 5% performance hit in a non-yylineno 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 < xpleng; ++yyl )\ - if ( xptext[yyl] == '\n' )\ - --xplineno;\ + 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;\ }while(0) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ - /* Undo effects of setting up xptext. */ \ + /* Undo effects of setting up yytext. */ \ 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 xptext again */ \ + YY_DO_BEFORE_ACTION; /* set up yytext 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 @@ -228,7 +471,7 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -256,7 +499,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. */ @@ -273,8 +516,8 @@ struct yy_buffer_state * possible backing-up. * * When we actually see the EOF, we change the status to "new" - * (via xprestart()), so that the user can continue scanning by - * just pointing xpin at a new input file. + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 @@ -284,7 +527,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 = 0; /**< Stack as an array. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< 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 @@ -295,106 +538,101 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< 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 xptext is formed. */ +/* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int xpleng; +int yyleng; /* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; +static char *yy_c_buf_p = NULL; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ -/* Flag which is used to allow xpwrap()'s to do buffer switches - * instead of setting up a fresh xpin. A bit of a hack ... +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; -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 ); +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 ); -static void xpensure_buffer_stack (void ); -static void xp_load_buffer_state (void ); -static void xp_init_buffer (YY_BUFFER_STATE b,FILE *file ); +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 ) -#define YY_FLUSH_BUFFER xp_flush_buffer(YY_CURRENT_BUFFER ) +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 ); -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 +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); +#define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ - xpensure_buffer_stack (); \ + yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ - xp_create_buffer(xpin,YY_BUF_SIZE ); \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } - #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ - xpensure_buffer_stack (); \ + yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ - xp_create_buffer(xpin,YY_BUF_SIZE ); \ + yy_create_buffer( yyin, 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(n) 1 +#define xpwrap() (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP +typedef flex_uint8_t YY_CHAR; -typedef unsigned char YY_CHAR; - -FILE *xpin = (FILE *) 0, *xpout = (FILE *) 0; +FILE *yyin = NULL, *yyout = NULL; typedef int yy_state_type; -extern int xplineno; +extern int yylineno; +int yylineno = 1; -int xplineno = 1; +extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif +#define yytext_ptr yytext -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[] ); +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 ); /* Done after the current pattern has been matched and before the - * corresponding action - sets up xptext. + * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ - xpleng = (size_t) (yy_cp - yy_bp); \ + yyleng = (int) (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, @@ -404,7 +642,7 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[126] = +static const 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, @@ -422,7 +660,7 @@ static yyconst flex_int16_t yy_accept[126] = 15, 15, 4, 5, 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, @@ -454,7 +692,7 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[39] = +static const YY_CHAR yy_meta[39] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, @@ -462,7 +700,7 @@ static yyconst flex_int32_t yy_meta[39] = 2, 2, 2, 2, 2, 2, 2, 2 } ; -static yyconst flex_int16_t yy_base[128] = +static const 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, @@ -480,7 +718,7 @@ static yyconst flex_int16_t yy_base[128] = 31, 26, 0, 0, 150, 71, 45 } ; -static yyconst flex_int16_t yy_def[128] = +static const 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, @@ -498,7 +736,7 @@ static yyconst flex_int16_t yy_def[128] = 127, 127, 127, 127, 0, 125, 125 } ; -static yyconst flex_int16_t yy_nxt[189] = +static const 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, @@ -522,7 +760,7 @@ static yyconst flex_int16_t yy_nxt[189] = 125, 125, 125, 125, 125, 125, 125, 125 } ; -static yyconst flex_int16_t yy_chk[189] = +static const 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, @@ -547,7 +785,7 @@ static yyconst flex_int16_t yy_chk[189] = } ; /* Table of booleans, true if rule could match eol. */ -static yyconst flex_int32_t yy_rule_can_match_eol[41] = +static const 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, @@ -556,8 +794,8 @@ static yyconst 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 xp_flex_debug; -int xp_flex_debug = 0; +extern int yy_flex_debug; +int yy_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -566,11 +804,12 @@ int xp_flex_debug = 0; #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET -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" +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" #include "xp_parser.tab.h" -#line 574 "/home/nschrick/ag_parallel/build/xp_scanner.c" +#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" #define INITIAL 0 @@ -586,36 +825,36 @@ char *xptext; #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 xplex_destroy (void ); +int yylex_destroy ( void ); -int xpget_debug (void ); +int yyget_debug ( void ); -void xpset_debug (int debug_flag ); +void yyset_debug ( int debug_flag ); -YY_EXTRA_TYPE xpget_extra (void ); +YY_EXTRA_TYPE yyget_extra ( void ); -void xpset_extra (YY_EXTRA_TYPE user_defined ); +void yyset_extra ( YY_EXTRA_TYPE user_defined ); -FILE *xpget_in (void ); +FILE *yyget_in ( void ); -void xpset_in (FILE * in_str ); +void yyset_in ( FILE * _in_str ); -FILE *xpget_out (void ); +FILE *yyget_out ( void ); -void xpset_out (FILE * out_str ); +void yyset_out ( FILE * _out_str ); -int xpget_leng (void ); + int yyget_leng ( void ); -char *xpget_text (void ); +char *yyget_text ( void ); -int xpget_lineno (void ); +int yyget_lineno ( void ); -void xpset_lineno (int line_number ); +void yyset_lineno ( int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -623,35 +862,43 @@ void xpset_lineno (int line_number ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int xpwrap (void ); +extern "C" int yywrap ( void ); #else -extern int xpwrap (void ); +extern int yywrap ( void ); #endif #endif - static void yyunput (int c,char *buf_ptr ); +#ifndef YY_NO_UNPUT + static void yyunput ( int c, char *buf_ptr ); + +#endif + #ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); +static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); +static int yy_flex_strlen ( const 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. */ @@ -659,7 +906,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( xptext, xpleng, 1, xpout )) {} } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -670,20 +917,20 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - unsigned n; \ + int n; \ for ( n = 0; n < max_size && \ - (c = getc( xpin )) != EOF && c != '\n'; ++n ) \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ - if ( c == EOF && ferror( xpin ) ) \ + if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ - while ( (result = fread(buf, 1, max_size, xpin))==0 && ferror(xpin)) \ + while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -691,7 +938,7 @@ static int input (void ); break; \ } \ errno=0; \ - clearerr(xpin); \ + clearerr(yyin); \ } \ }\ \ @@ -724,12 +971,12 @@ static int input (void ); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int xplex (void); +extern int yylex (void); -#define YY_DECL int xplex (void) +#define YY_DECL int yylex (void) #endif /* !YY_DECL */ -/* Code executed at the beginning of each rule, after xptext and xpleng +/* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION @@ -738,7 +985,7 @@ extern int xplex (void); /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ @@ -748,15 +995,10 @@ extern int xplex (void); */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + 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; @@ -768,26 +1010,32 @@ YY_DECL if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ - if ( ! xpin ) - xpin = stdin; + if ( ! yyin ) + yyin = stdin; - if ( ! xpout ) - xpout = stdout; + if ( ! yyout ) + yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { - xpensure_buffer_stack (); + yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = - xp_create_buffer(xpin,YY_BUF_SIZE ); + yy_create_buffer( yyin, YY_BUF_SIZE ); } - xp_load_buffer_state( ); + yy_load_buffer_state( ); } - while ( 1 ) /* loops until end-of-file is reached */ + { +#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 */ { yy_cp = (yy_c_buf_p); - /* Support of xptext. */ + /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of @@ -799,7 +1047,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + 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; @@ -809,9 +1057,9 @@ yy_match: { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 126 ) - yy_c = yy_meta[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 150 ); @@ -830,10 +1078,10 @@ yy_find_action: if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { int yyl; - for ( yyl = 0; yyl < xpleng; ++yyl ) - if ( xptext[yyl] == '\n' ) - - xplineno++; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + + yylineno++; ; } @@ -851,206 +1099,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/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" +#line 13 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" {} YY_BREAK case 2: YY_RULE_SETUP -#line 15 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return GROUP; } +#line 15 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return GROUP; } YY_BREAK case 3: YY_RULE_SETUP -#line 16 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return EXPLOIT; } +#line 16 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return EXPLOIT; } YY_BREAK case 4: YY_RULE_SETUP -#line 17 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return PRECONDITIONS; } +#line 17 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return PRECONDITIONS; } YY_BREAK case 5: YY_RULE_SETUP -#line 18 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return POSTCONDITIONS; } +#line 18 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return POSTCONDITIONS; } YY_BREAK case 6: YY_RULE_SETUP -#line 19 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return QUALITY; } +#line 19 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return QUALITY; } YY_BREAK case 7: YY_RULE_SETUP -#line 20 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return TOPOLOGY; } +#line 20 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return TOPOLOGY; } YY_BREAK case 8: YY_RULE_SETUP -#line 21 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return ADD; } +#line 21 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return ADD; } YY_BREAK case 9: YY_RULE_SETUP -#line 22 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return INSERT; } +#line 22 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return INSERT; } YY_BREAK case 10: YY_RULE_SETUP -#line 23 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return UPDATE; } +#line 23 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return UPDATE; } YY_BREAK case 11: YY_RULE_SETUP -#line 24 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return DELETE; } +#line 24 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return DELETE; } YY_BREAK case 12: YY_RULE_SETUP -#line 25 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return REMOVE; } +#line 25 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return REMOVE; } YY_BREAK case 13: YY_RULE_SETUP -#line 27 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return INT; } +#line 27 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return INT; } YY_BREAK case 14: YY_RULE_SETUP -#line 28 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return FLOAT; } +#line 28 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return FLOAT; } YY_BREAK case 15: YY_RULE_SETUP -#line 29 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return IDENTIFIER; } +#line 29 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return IDENTIFIER; } YY_BREAK case 16: YY_RULE_SETUP -#line 31 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return LPAREN; } +#line 31 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return LPAREN; } YY_BREAK case 17: YY_RULE_SETUP -#line 32 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return RPAREN; } +#line 32 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return RPAREN; } YY_BREAK case 18: YY_RULE_SETUP -#line 33 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return EQ; } +#line 33 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return EQ; } YY_BREAK case 19: YY_RULE_SETUP -#line 34 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return EQ; } +#line 34 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return EQ; } YY_BREAK case 20: YY_RULE_SETUP -#line 35 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return NEQ; } +#line 35 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return NEQ; } YY_BREAK case 21: YY_RULE_SETUP -#line 36 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return LT; } +#line 36 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return LT; } YY_BREAK case 22: YY_RULE_SETUP -#line 37 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return GT; } +#line 37 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return GT; } YY_BREAK case 23: YY_RULE_SETUP -#line 38 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return GEQ; } +#line 38 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return GEQ; } YY_BREAK case 24: YY_RULE_SETUP -#line 39 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return LEQ; } +#line 39 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return LEQ; } YY_BREAK case 25: YY_RULE_SETUP -#line 40 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return EQ; } +#line 40 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return EQ; } YY_BREAK case 26: YY_RULE_SETUP -#line 41 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return NEQ; } +#line 41 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return NEQ; } YY_BREAK case 27: YY_RULE_SETUP -#line 42 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return PLUSEQ; } +#line 42 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return PLUSEQ; } YY_BREAK case 28: YY_RULE_SETUP -#line 43 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return SUBEQ; } +#line 43 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return SUBEQ; } YY_BREAK case 29: YY_RULE_SETUP -#line 44 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return COLON; } +#line 44 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return COLON; } YY_BREAK case 30: YY_RULE_SETUP -#line 45 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return SEMI; } +#line 45 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return SEMI; } YY_BREAK case 31: YY_RULE_SETUP -#line 46 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return COMMA; } +#line 46 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return COMMA; } YY_BREAK case 32: YY_RULE_SETUP -#line 47 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return PERIOD; } +#line 47 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return PERIOD; } YY_BREAK case 33: YY_RULE_SETUP -#line 48 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return BIDIR; } +#line 48 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return BIDIR; } YY_BREAK case 34: YY_RULE_SETUP -#line 49 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return NOTBIDIR; } +#line 49 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return NOTBIDIR; } YY_BREAK case 35: YY_RULE_SETUP -#line 50 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return ONEDIR; } +#line 50 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return ONEDIR; } YY_BREAK case 36: YY_RULE_SETUP -#line 51 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return ONEDIRBACK; } +#line 51 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return ONEDIRBACK; } YY_BREAK case 37: YY_RULE_SETUP -#line 52 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ xplval.string = strdup(xptext); return NOTONEDIR; } +#line 52 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ xplval.string = strdup(yytext); return NOTONEDIR; } YY_BREAK case 38: /* rule 38 can match eol */ YY_RULE_SETUP -#line 53 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" +#line 53 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" {} YY_BREAK case 39: YY_RULE_SETUP -#line 55 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" -{ return xptext[0]; } +#line 55 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" +{ return yytext[0]; } YY_BREAK case 40: YY_RULE_SETUP -#line 57 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" +#line 57 "/home/noah/Documents/School/Thesis Work/ag_parallel/src/parser/xp-parser/xp_scanner.l" ECHO; YY_BREAK -#line 1054 "/home/nschrick/ag_parallel/build/xp_scanner.c" +#line 1301 "/home/noah/Documents/School/Thesis Work/ag_parallel/build/xp_scanner.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1067,15 +1315,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 xpin at a new source and called - * xplex(). If so, then we have to assure + * just pointed yyin at a new source and called + * yylex(). 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 = xpin; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } @@ -1128,11 +1376,11 @@ case YY_STATE_EOF(INITIAL): { (yy_did_buffer_switch_on_eof) = 0; - if ( xpwrap( ) ) + if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up - * xptext, we can now set up + * yytext, 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 @@ -1181,7 +1429,8 @@ case YY_STATE_EOF(INITIAL): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ -} /* end of xplex */ + } /* end of user's declarations */ +} /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * @@ -1192,9 +1441,9 @@ case YY_STATE_EOF(INITIAL): */ static int yy_get_next_buffer (void) { - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) @@ -1223,7 +1472,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++); @@ -1243,7 +1492,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; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); @@ -1259,11 +1508,12 @@ static int yy_get_next_buffer (void) b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - xprealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; + b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -1281,7 +1531,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), (size_t) num_to_read ); + (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1291,7 +1541,7 @@ static int yy_get_next_buffer (void) if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - xprestart(xpin ); + yyrestart( yyin ); } else @@ -1305,12 +1555,15 @@ static int yy_get_next_buffer (void) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - 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 ); + 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 ); 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; @@ -1326,14 +1579,14 @@ static int yy_get_next_buffer (void) static yy_state_type yy_get_previous_state (void) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + 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; @@ -1343,9 +1596,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[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } return yy_current_state; @@ -1358,10 +1611,10 @@ static int yy_get_next_buffer (void) */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -1371,30 +1624,32 @@ 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[(unsigned int) yy_c]; + yy_c = yy_meta[yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + 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; } - static void yyunput (int c, register char * yy_bp ) +#ifndef YY_NO_UNPUT + + static void yyunput (int c, char * yy_bp ) { - register char *yy_cp; + char *yy_cp; yy_cp = (yy_c_buf_p); - /* undo effects of setting up xptext */ + /* undo effects of setting up yytext */ *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. */ - register int number_to_move = (yy_n_chars) + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = + char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -1403,7 +1658,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) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + (yy_n_chars) = (int) 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" ); @@ -1412,7 +1667,7 @@ static int yy_get_next_buffer (void) *--yy_cp = (char) c; if ( c == '\n' ){ - --xplineno; + --yylineno; } (yytext_ptr) = yy_bp; @@ -1420,6 +1675,8 @@ static int yy_get_next_buffer (void) (yy_c_buf_p) = yy_cp; } +#endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) @@ -1444,7 +1701,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -1461,14 +1718,14 @@ static int yy_get_next_buffer (void) */ /* Reset buffer status. */ - xprestart(xpin ); + yyrestart( yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( xpwrap( ) ) - return EOF; + if ( yywrap( ) ) + return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -1487,12 +1744,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 xptext */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); if ( c == '\n' ) - - xplineno++; + + yylineno++; ; return c; @@ -1504,32 +1761,32 @@ static int yy_get_next_buffer (void) * * @note This function does not reset the start condition to @c INITIAL . */ - void xprestart (FILE * input_file ) + void yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ - xpensure_buffer_stack (); + yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = - xp_create_buffer(xpin,YY_BUF_SIZE ); + yy_create_buffer( yyin, YY_BUF_SIZE ); } - xp_init_buffer(YY_CURRENT_BUFFER,input_file ); - xp_load_buffer_state( ); + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ - void xp_switch_to_buffer (YY_BUFFER_STATE new_buffer ) + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with - * xppop_buffer_state(); - * xppush_buffer_state(new_buffer); + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); */ - xpensure_buffer_stack (); + yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; @@ -1542,21 +1799,21 @@ static int yy_get_next_buffer (void) } YY_CURRENT_BUFFER_LVALUE = new_buffer; - xp_load_buffer_state( ); + yy_load_buffer_state( ); /* We don't actually know whether we did this switch during - * EOF (xpwrap()) processing, but the only time this flag - * is looked at is after xpwrap() is called, so it's safe + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } -static void xp_load_buffer_state (void) +static void yy_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; - xpin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } @@ -1566,35 +1823,35 @@ static void xp_load_buffer_state (void) * * @return the allocated buffer state. */ - YY_BUFFER_STATE xp_create_buffer (FILE * file, int size ) + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) xpalloc(sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in xp_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_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 *) xpalloc(b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in xp_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - xp_init_buffer(b,file ); + yy_init_buffer( b, file ); return b; } /** Destroy the buffer. - * @param b a buffer created with xp_create_buffer() + * @param b a buffer created with yy_create_buffer() * */ - void xp_delete_buffer (YY_BUFFER_STATE b ) + void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) @@ -1604,31 +1861,27 @@ static void xp_load_buffer_state (void) YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - xpfree((void *) b->yy_ch_buf ); + yyfree( (void *) b->yy_ch_buf ); - xpfree((void *) b ); + yyfree( (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 xprestart() or at EOF. + * such as during a yyrestart() or at EOF. */ - static void xp_init_buffer (YY_BUFFER_STATE b, FILE * file ) + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; - xp_flush_buffer(b ); + yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; - /* If b is the current buffer, then xp_init_buffer was _probably_ - * called from xprestart() or through yy_get_next_buffer. + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ @@ -1645,7 +1898,7 @@ extern int isatty (int ); * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ - void xp_flush_buffer (YY_BUFFER_STATE b ) + void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; @@ -1665,7 +1918,7 @@ extern int isatty (int ); b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) - xp_load_buffer_state( ); + yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes @@ -1674,14 +1927,14 @@ extern int isatty (int ); * @param new_buffer The new state. * */ -void xppush_buffer_state (YY_BUFFER_STATE new_buffer ) +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; - xpensure_buffer_stack(); + yyensure_buffer_stack(); - /* This block is copied from xp_switch_to_buffer. */ + /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ @@ -1695,8 +1948,8 @@ void xppush_buffer_state (YY_BUFFER_STATE new_buffer ) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; - /* copied from xp_switch_to_buffer. */ - xp_load_buffer_state( ); + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } @@ -1704,18 +1957,18 @@ void xppush_buffer_state (YY_BUFFER_STATE new_buffer ) * The next element becomes the new top. * */ -void xppop_buffer_state (void) +void yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; - xp_delete_buffer(YY_CURRENT_BUFFER ); + yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { - xp_load_buffer_state( ); + yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } @@ -1723,9 +1976,9 @@ void xppop_buffer_state (void) /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void xpensure_buffer_stack (void) +static void yyensure_buffer_stack (void) { - int num_to_alloc; + yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { @@ -1733,15 +1986,15 @@ static void xpensure_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; - (yy_buffer_stack) = (struct yy_buffer_state**)xpalloc + 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 * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in xpensure_buffer_stack()" ); - + YY_FATAL_ERROR( "out of dynamic memory in yyensure_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; @@ -1750,15 +2003,15 @@ static void xpensure_buffer_stack (void) if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; + yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)xprealloc + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in xpensure_buffer_stack()" ); + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); @@ -1770,9 +2023,9 @@ static void xpensure_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 xp_scan_buffer (char * base, yy_size_t size ) +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; @@ -1780,49 +2033,49 @@ YY_BUFFER_STATE xp_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 0; + return NULL; - b = (YY_BUFFER_STATE) xpalloc(sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in xp_scan_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = 0; + b->yy_input_file = NULL; 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; - xp_switch_to_buffer(b ); + yy_switch_to_buffer( b ); return b; } -/** Setup the input buffer state to scan a string. The next call to xplex() will +/** Setup the input buffer state to scan a string. The next call to yylex() 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 - * xp_scan_bytes() instead. + * yy_scan_bytes() instead. */ -YY_BUFFER_STATE xp_scan_string (yyconst char * yystr ) +YY_BUFFER_STATE yy_scan_string (const char * yystr ) { - return xp_scan_bytes(yystr,strlen(yystr) ); + return yy_scan_bytes( yystr, (int) strlen(yystr) ); } -/** Setup the input buffer state to scan the given bytes. The next call to xplex() will +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE xp_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; @@ -1830,19 +2083,19 @@ YY_BUFFER_STATE xp_scan_bytes (yyconst char * yybytes, int _yybytes_len ) int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) xpalloc(n ); + n = (yy_size_t) (_yybytes_len + 2); + buf = (char *) yyalloc( n ); if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in xp_scan_bytes()" ); + YY_FATAL_ERROR( "out of dynamic memory in yy_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 = xp_scan_buffer(buf,n ); + b = yy_scan_buffer( buf, n ); if ( ! b ) - YY_FATAL_ERROR( "bad buffer in xp_scan_bytes()" ); + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. @@ -1856,9 +2109,9 @@ YY_BUFFER_STATE xp_scan_bytes (yyconst char * yybytes, int _yybytes_len ) #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg ) +static void yynoreturn yy_fatal_error (const char* msg ) { - (void) fprintf( stderr, "%s\n", msg ); + fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -1868,14 +2121,14 @@ static void yy_fatal_error (yyconst char* msg ) #define yyless(n) \ do \ { \ - /* Undo effects of setting up xptext. */ \ + /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ - xptext[xpleng] = (yy_hold_char); \ - (yy_c_buf_p) = xptext + yyless_macro_arg; \ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ - xpleng = yyless_macro_arg; \ + yyleng = yyless_macro_arg; \ } \ while ( 0 ) @@ -1884,129 +2137,129 @@ static void yy_fatal_error (yyconst char* msg ) /** Get the current line number. * */ -int xpget_lineno (void) +int yyget_lineno (void) { - - return xplineno; + + return yylineno; } /** Get the input stream. * */ -FILE *xpget_in (void) +FILE *yyget_in (void) { - return xpin; + return yyin; } /** Get the output stream. * */ -FILE *xpget_out (void) +FILE *yyget_out (void) { - return xpout; + return yyout; } /** Get the length of the current token. * */ -int xpget_leng (void) +int yyget_leng (void) { - return xpleng; + return yyleng; } /** Get the current token. * */ -char *xpget_text (void) +char *yyget_text (void) { - return xptext; + return yytext; } /** Set the current line number. - * @param line_number + * @param _line_number line number * */ -void xpset_lineno (int line_number ) +void yyset_lineno (int _line_number ) { - xplineno = line_number; + yylineno = _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 xp_switch_to_buffer + * @see yy_switch_to_buffer */ -void xpset_in (FILE * in_str ) +void yyset_in (FILE * _in_str ) { - xpin = in_str ; + yyin = _in_str ; } -void xpset_out (FILE * out_str ) +void yyset_out (FILE * _out_str ) { - xpout = out_str ; + yyout = _out_str ; } -int xpget_debug (void) +int yyget_debug (void) { - return xp_flex_debug; + return yy_flex_debug; } -void xpset_debug (int bdebug ) +void yyset_debug (int _bdebug ) { - xp_flex_debug = bdebug ; + yy_flex_debug = _bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. - * This function is called from xplex_destroy(), so don't allocate here. + * This function is called from yylex_destroy(), so don't allocate here. */ - /* We do not touch xplineno unless the option is enabled. */ - xplineno = 1; + /* We do not touch yylineno unless the option is enabled. */ + yylineno = 1; - (yy_buffer_stack) = 0; + (yy_buffer_stack) = NULL; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; + (yy_c_buf_p) = NULL; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT - xpin = stdin; - xpout = stdout; + yyin = stdin; + yyout = stdout; #else - xpin = (FILE *) 0; - xpout = (FILE *) 0; + yyin = NULL; + yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by - * xplex_init() + * yylex_init() */ return 0; } -/* xplex_destroy is for both reentrant and non-reentrant scanners. */ -int xplex_destroy (void) +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ - xp_delete_buffer(YY_CURRENT_BUFFER ); + yy_delete_buffer( YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; - xppop_buffer_state(); + yypop_buffer_state(); } /* Destroy the stack itself. */ - xpfree((yy_buffer_stack) ); + yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time - * xplex() is called, initialization will occur. */ + * yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; @@ -2017,18 +2270,19 @@ int xplex_destroy (void) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +static void yy_flex_strncpy (char* s1, const char * s2, int n ) { - register int i; + + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) +static int yy_flex_strlen (const char * s ) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -2036,13 +2290,14 @@ static int yy_flex_strlen (yyconst char * s ) } #endif -void *xpalloc (yy_size_t size ) +void *yyalloc (yy_size_t size ) { - return (void *) malloc( size ); + return malloc(size); } -void *xprealloc (void * ptr, yy_size_t size ) +void *yyrealloc (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 @@ -2050,17 +2305,16 @@ void *xprealloc (void * ptr, yy_size_t size ) * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return realloc(ptr, size); } -void xpfree (void * ptr ) +void yyfree (void * ptr ) { - free( (char *) ptr ); /* see xprealloc() for (char *) cast */ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" -#line 57 "/home/nschrick/ag_parallel/src/parser/xp-parser/xp_scanner.l" - +#line 57 "/home/noah/Documents/School/Thesis Work/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 b80182b..461df32 100755 --- a/src/ag_gen/ag_gen.cpp +++ b/src/ag_gen/ag_gen.cpp @@ -359,6 +359,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd, int mpi_exit = 0; double f_alpha = 0.0; + int zero_queue = 0; auto tot_sys_mem = getTotalSystemMemory(); std::deque localFrontier; localFrontier.emplace_front(frontier[k]); @@ -397,20 +398,15 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd, 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 + while (!localFrontier.empty() || !unex_empty() || world.iprobe(mpi::any_source, 5) || world.rank() > 0 || (world.rank() ==0 && zero_queue > 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++){ - mpi::request dum_req = world.isend(w, 14, dummy); - dum_req.wait(); - } - } - - else { + if (world.rank() != 0) { //If we don't have the go-ahead, check for the Finalize message. //std::cout << "Node " << world.rank() << " is waiting for the go-ahead or finalize message." << std::endl; + if(!world.iprobe(0, 14)){ + //Let Node 0 we're waiting + world.isend(0, 12, 1); + } while(!world.iprobe(0, 14)){ if(world.iprobe(0, 15)){ mpi_exit = 1; @@ -427,11 +423,11 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd, //We need to refill the localFrontier with states from the database if it's empty //TODO: Investigate if it's faster to read from DB directly into Node 0 //Or if faster to have worker node read from DB, then comm to Node 0 - if(localFrontier.empty() && world.rank() == 0) { + if(localFrontier.empty() && world.rank() == 0 && !world.iprobe(mpi::any_source, 5) && zero_queue == 0) { struct timeval t01,t02; gettimeofday(&t01,NULL); task_zero(instance, localFrontier, mem_threshold); - std::cout << "Finished task 0." << std::endl; + //std::cout << "Finished task 0." << std::endl; gettimeofday(&t02,NULL); total_task0+=(t02.tv_sec-t01.tv_sec)*1000.0+(t02.tv_usec-t01.tv_usec)/1000.0; } @@ -439,12 +435,23 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd, //Task 0 to Task 1 Communication if(world.rank() == 0) { - auto current_state = localFrontier.back(); - localFrontier.pop_back(); - for(int l=0; l < alloc; l++){ - mpi::request cs_req = world.isend(send_check(world, l), 20, current_state); - cs_req.wait(); - } + //Send at most 50 states at one time to Task 1, assuming we don't have more state data to add + //if (!world.iprobe(mpi::any_source, 5)){ + for (int f = 0; f < std::min(50, (int)localFrontier.size()); f++){ + auto current_state = localFrontier.back(); + localFrontier.pop_back(); + for(int l=0; l < alloc; l++){ + mpi::request cs_req = world.isend(send_check(world, l), 20, current_state); + cs_req.wait(); + } + //Node 0 needs to tell other nodes to continue the same number of times + int dummy = 1; + for (int w = 1; w < world.size(); w++){ + mpi::request dum_req = world.isend(w, 14, dummy); + dum_req.wait(); + } + zero_queue++; + } } //Execute Task 1 @@ -498,7 +505,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd, //2 Node Edge case if(world.size() == 2){ mpi::request tdone_req = world.isend(1, 2, 1); - tdone_req.wait(); + tdone_req.wait(); //std::cout << "Node " << world.rank() << " sent finished message." << std::endl; break; } @@ -506,7 +513,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd, else if(w < world.rank() || w > alloc+two_alloc) { mpi::request tdone_req = world.isend(w, 2, 1); - tdone_req.wait(); + tdone_req.wait(); } } @@ -542,7 +549,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd, world.recv(mpi::any_source, 2, finished_signal); //std::cout << "Receive message complete." << std::endl; } - } + } //If we get a new fact and new state, update if(world.iprobe(mpi::any_source, 3) && world.iprobe(mpi::any_source, 4)){ @@ -616,7 +623,7 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd, auto rem_state = localFrontier.front(); localFrontier.pop_front(); mpi::request rem_req = world.isend(send_check(world, alloc+two_alloc+1), 50, rem_state); - rem_req.wait(); + rem_req.wait(); } if (!localFrontier.empty()) f_alpha = (static_cast(localFrontier.size()) * (localFrontier.back().get_size()))/tot_sys_mem; @@ -634,14 +641,17 @@ AGGenInstance &AGGen::generate(bool batch_process, int batch_size, int numThrd, } } + if(world.rank() == 0) + zero_queue--; + //std::cout << "Node " << world.rank() << " moving to next iter" << std::endl; } //while ends if(world.rank() == 0){ for (int w = 1; w < world.size(); w++){ mpi::request proc_req = world.isend(w, 15, 1); - proc_req.wait(); - } + proc_req.wait(); + } } if (mpi_exit == 1){