Commit f9ea81c2 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

adding the vqe algorithm


Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent 98b00905
......@@ -20,13 +20,11 @@ endif()
set (XACC_LIBRARY_DIR "${XACC_ROOT}/lib")
link_directories("${XACC_ROOT}/lib")
set(XACC_INCLUDE_ROOT "${XACC_ROOT}/include")
#set (XACC_INCLUDE_DIRS "${XACC_INCLUDE_ROOT}/antlr4-runtime;${XACC_INCLUDE_ROOT}/cppmicroservices4;${XACC_INCLUDE_ROOT}/xacc;${XACC_INCLUDE_ROOT}/quantum/gate;${XACC_INCLUDE_ROOT}/quantum/utils;${XACC_INCLUDE_ROOT}/quantum/aqc;${XACC_INCLUDE_ROOT}/spdlog;${XACC_INCLUDE_ROOT}/exprtk;${XACC_INCLUDE_ROOT}/eigen;${XACC_INCLUDE_ROOT}/rapidjson/include;${XACC_INCLUDE_ROOT};${XACC_INCLUDE_ROOT}/gtest")
#set (XACC_LIBRARIES "xacc;xacc-quantum-gate;xacc-quantum-aqc;xacc-pauli;antlr4-runtime;CppMicroServices")
set (XACC_INCLUDE_DIRS "${XACC_INCLUDE_ROOT}/antlr4-runtime;${XACC_INCLUDE_ROOT}/cppmicroservices4;${XACC_INCLUDE_ROOT}/xacc;${XACC_INCLUDE_ROOT}/quantum/gate;${XACC_INCLUDE_ROOT}/quantum/utils;${XACC_INCLUDE_ROOT}/quantum/aqc;${XACC_INCLUDE_ROOT}/spdlog;${XACC_INCLUDE_ROOT}/exprtk;${XACC_INCLUDE_ROOT}/eigen;${XACC_INCLUDE_ROOT}/rapidjson/include;${XACC_INCLUDE_ROOT};${XACC_INCLUDE_ROOT}/gtest")
set (XACC_LIBRARIES "xacc;xacc-quantum-gate;xacc-quantum-aqc;xacc-pauli;antlr4-runtime;CppMicroServices")
set (XACC_TEST_LIBRARIES "${XACC_LIBRARIES};gtest;gtest_main")
#set (XACC_TEST_LIBRARIES "${XACC_LIBRARIES};gtest;gtest_main")
macro(add_xacc_test _TEST_NAME)
include_directories(${XACC_INCLUDE_ROOT}/gtest)
......@@ -66,7 +64,7 @@ endmacro()
set(XACCLIB "libxacc.so")
set(XACCGATELIB "libxacc-quantum-gate.so")
set(XACCAQCLIB "libxacc-quantum-aqc.so")
set(XACCAQCLIB "libxacc-quantum-annealing.so")
set(XACCPAULILIB "libxacc-pauli.so")
set(XACCFERMIONLIB "libxacc-fermion.so")
set(CPPUSLIB "libCppMicroServices.so.4.0.0")
......@@ -74,7 +72,7 @@ set(CPPUSLIB "libCppMicroServices.so.4.0.0")
if (APPLE)
set(XACCLIB "libxacc.dylib")
set(XACCGATELIB "libxacc-quantum-gate.dylib")
set(XACCAQCLIB "libxacc-quantum-aqc.dylib")
set(XACCAQCLIB "libxacc-quantum-annealing.dylib")
set(XACCPAULILIB "libxacc-pauli.dylib")
set(XACCFERMIONLIB "libxacc-fermion.dylib")
set(CPPUSLIB "libCppMicroServices.4.0.0.dylib")
......@@ -101,9 +99,14 @@ add_library(xacc::xacc SHARED IMPORTED)
set_target_properties(xacc::xacc PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${XACC_INCLUDE_ROOT}/xacc"
INTERFACE_LINK_LIBRARIES "CppMicroServices"
INTERFACE_LINK_LIBRARIES "CppMicroServices::CppMicroServices"
)
target_compile_features(xacc::xacc
INTERFACE
cxx_std_14
cxx_alias_templates)
# Import target "xacc::xacc" for configuration "Release"
set_property(TARGET xacc::xacc APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(xacc::xacc PROPERTIES
......@@ -111,12 +114,11 @@ set_target_properties(xacc::xacc PROPERTIES
IMPORTED_SONAME_RELEASE "${XACCLIB}"
)
add_library(xacc::quantum_gate SHARED IMPORTED)
set_target_properties(xacc::quantum_gate PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${XACC_INCLUDE_ROOT}/xacc;${XACC_INCLUDE_ROOT}/quantum/gate"
INTERFACE_LINK_LIBRARIES "xacc;CppMicroServices"
INTERFACE_LINK_LIBRARIES "xacc::xacc"
)
# Import target "xacc::quantum_gate" for configuration "Release"
......@@ -127,16 +129,16 @@ set_target_properties(xacc::quantum_gate PROPERTIES
)
# Create imported target xacc::quantum_aqc
add_library(xacc::quantum_aqc SHARED IMPORTED)
add_library(xacc::quantum_annealing SHARED IMPORTED)
set_target_properties(xacc::quantum_aqc PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${XACC_INCLUDE_ROOT}/xacc;${XACC_INCLUDE_ROOT}/quantum/aqc"
INTERFACE_LINK_LIBRARIES "xacc;CppMicroServices"
set_target_properties(xacc::quantum_annealing PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${XACC_INCLUDE_ROOT}/xacc;${XACC_INCLUDE_ROOT}/quantum/annealing"
INTERFACE_LINK_LIBRARIES "xacc::xacc"
)
# Import target "xacc::quantum_aqc" for configuration "Release"
set_property(TARGET xacc::quantum_aqc APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(xacc::quantum_aqc PROPERTIES
# Import target "xacc::quantum_annealing" for configuration "Release"
set_property(TARGET xacc::quantum_annealing APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(xacc::quantum_annealing PROPERTIES
IMPORTED_LOCATION_RELEASE "${XACC_ROOT}/lib/${XACCAQCLIB}"
IMPORTED_SONAME_RELEASE "${XACCAQCLIB}"
)
......@@ -147,7 +149,7 @@ add_library(xacc::pauli SHARED IMPORTED)
set_target_properties(xacc::pauli PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${XACC_INCLUDE_ROOT}/xacc;${XACC_INCLUDE_ROOT}/quantum/gate"
INTERFACE_LINK_LIBRARIES "xacc;CppMicroServices"
INTERFACE_LINK_LIBRARIES "xacc::xacc"
)
# Import target "xacc::pauli" for configuration "Release"
......@@ -163,7 +165,7 @@ add_library(xacc::fermion SHARED IMPORTED)
set_target_properties(xacc::fermion PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${XACC_INCLUDE_ROOT}/xacc;${XACC_INCLUDE_ROOT}/quantum/gate"
INTERFACE_LINK_LIBRARIES "xacc;CppMicroServices"
INTERFACE_LINK_LIBRARIES "xacc::xacc"
)
# Import target "xacc::fermion" for configuration "Release"
......
......@@ -210,6 +210,7 @@ public:
const std::vector<std::string> getVariables() override {
return variables;
}
const std::size_t nVariables() override {return variables.size();}
const int depth() override;
......
......@@ -15,6 +15,20 @@
namespace xacc {
namespace quantum {
const int QuantumIRProvider::getNRequiredBits(const std::string name) {
std::shared_ptr<Instruction> inst;
if (xacc::hasService<Instruction>(name)) {
inst = xacc::getService<Instruction>(name);
} else if (xacc::hasContributedService<Instruction>(name)) {
inst = xacc::getContributedService<Instruction>(name);
} else if (xacc::hasCompiled(name)) {
inst = xacc::getCompiled(name);
} else {
xacc::error("Invalid instruction name - " + name);
}
return inst->nRequiredBits();
}
std::shared_ptr<Instruction> QuantumIRProvider::createInstruction(const std::string name,
std::size_t bit) {
return createInstruction(name, std::vector<std::size_t>{bit});
......
......@@ -12,6 +12,8 @@ class QuantumIRProvider : public IRProvider {
public:
QuantumIRProvider() = default;
const int getNRequiredBits(const std::string name) override;
std::shared_ptr<Instruction> createInstruction(const std::string name,
std::size_t bit) override;
std::shared_ptr<Instruction>
......
......@@ -93,7 +93,7 @@ PauliOperator::observe(std::shared_ptr<CompositeInstruction> function) {
Term spinInst = inst.second;
auto gateFunction = gateRegistry->createComposite(
inst.first, {});
inst.first, function->getVariables());
gateFunction->setCoefficient(spinInst.coeff());
......
......@@ -18,12 +18,12 @@ null
'std::vector<double>'
';'
'return'
'pi'
'+'
'-'
'*'
'/'
'^'
'pi'
'sin'
'cos'
'tan'
......@@ -91,7 +91,7 @@ statement
comment
instruction
bufferIndex
bitsType
bitsOrParamType
optionsMap
optionsType
explist
......@@ -103,4 +103,4 @@ string
atn:
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 39, 215, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 3, 2, 3, 2, 5, 2, 47, 10, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 57, 10, 3, 12, 3, 14, 3, 60, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 5, 4, 69, 10, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 7, 4, 77, 10, 4, 12, 4, 14, 4, 80, 11, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 6, 8, 95, 10, 8, 13, 8, 14, 8, 96, 3, 9, 6, 9, 100, 10, 9, 13, 9, 14, 9, 101, 3, 9, 5, 9, 105, 10, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 112, 10, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 5, 12, 121, 10, 12, 3, 12, 3, 12, 5, 12, 125, 10, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 133, 10, 13, 3, 14, 3, 14, 3, 14, 7, 14, 138, 10, 14, 12, 14, 14, 14, 141, 11, 14, 3, 15, 3, 15, 3, 15, 3, 15, 7, 15, 147, 10, 15, 12, 15, 14, 15, 150, 11, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 7, 17, 163, 10, 17, 12, 17, 14, 17, 166, 11, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 5, 18, 185, 10, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 7, 18, 202, 10, 18, 12, 18, 14, 18, 205, 11, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 2, 3, 34, 23, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 2, 5, 3, 2, 12, 13, 3, 2, 15, 18, 3, 2, 27, 32, 2, 219, 2, 46, 3, 2, 2, 2, 4, 48, 3, 2, 2, 2, 6, 66, 3, 2, 2, 2, 8, 86, 3, 2, 2, 2, 10, 89, 3, 2, 2, 2, 12, 91, 3, 2, 2, 2, 14, 94, 3, 2, 2, 2, 16, 104, 3, 2, 2, 2, 18, 111, 3, 2, 2, 2, 20, 113, 3, 2, 2, 2, 22, 115, 3, 2, 2, 2, 24, 128, 3, 2, 2, 2, 26, 134, 3, 2, 2, 2, 28, 142, 3, 2, 2, 2, 30, 153, 3, 2, 2, 2, 32, 159, 3, 2, 2, 2, 34, 184, 3, 2, 2, 2, 36, 206, 3, 2, 2, 2, 38, 208, 3, 2, 2, 2, 40, 210, 3, 2, 2, 2, 42, 212, 3, 2, 2, 2, 44, 47, 5, 4, 3, 2, 45, 47, 5, 6, 4, 2, 46, 44, 3, 2, 2, 2, 46, 45, 3, 2, 2, 2, 47, 3, 3, 2, 2, 2, 48, 49, 7, 3, 2, 2, 49, 50, 7, 4, 2, 2, 50, 51, 5, 38, 20, 2, 51, 52, 7, 5, 2, 2, 52, 53, 7, 6, 2, 2, 53, 58, 5, 38, 20, 2, 54, 55, 7, 7, 2, 2, 55, 57, 5, 8, 5, 2, 56, 54, 3, 2, 2, 2, 57, 60, 3, 2, 2, 2, 58, 56, 3, 2, 2, 2, 58, 59, 3, 2, 2, 2, 59, 61, 3, 2, 2, 2, 60, 58, 3, 2, 2, 2, 61, 62, 7, 8, 2, 2, 62, 63, 7, 9, 2, 2, 63, 64, 5, 12, 7, 2, 64, 65, 7, 10, 2, 2, 65, 5, 3, 2, 2, 2, 66, 68, 7, 11, 2, 2, 67, 69, 9, 2, 2, 2, 68, 67, 3, 2, 2, 2, 68, 69, 3, 2, 2, 2, 69, 70, 3, 2, 2, 2, 70, 71, 7, 14, 2, 2, 71, 72, 7, 5, 2, 2, 72, 73, 7, 6, 2, 2, 73, 78, 5, 38, 20, 2, 74, 75, 7, 7, 2, 2, 75, 77, 5, 8, 5, 2, 76, 74, 3, 2, 2, 2, 77, 80, 3, 2, 2, 2, 78, 76, 3, 2, 2, 2, 78, 79, 3, 2, 2, 2, 79, 81, 3, 2, 2, 2, 80, 78, 3, 2, 2, 2, 81, 82, 7, 8, 2, 2, 82, 83, 7, 9, 2, 2, 83, 84, 5, 12, 7, 2, 84, 85, 7, 10, 2, 2, 85, 7, 3, 2, 2, 2, 86, 87, 5, 10, 6, 2, 87, 88, 5, 38, 20, 2, 88, 9, 3, 2, 2, 2, 89, 90, 9, 3, 2, 2, 90, 11, 3, 2, 2, 2, 91, 92, 5, 14, 8, 2, 92, 13, 3, 2, 2, 2, 93, 95, 5, 16, 9, 2, 94, 93, 3, 2, 2, 2, 95, 96, 3, 2, 2, 2, 96, 94, 3, 2, 2, 2, 96, 97, 3, 2, 2, 2, 97, 15, 3, 2, 2, 2, 98, 100, 5, 18, 10, 2, 99, 98, 3, 2, 2, 2, 100, 101, 3, 2, 2, 2, 101, 99, 3, 2, 2, 2, 101, 102, 3, 2, 2, 2, 102, 105, 3, 2, 2, 2, 103, 105, 5, 20, 11, 2, 104, 99, 3, 2, 2, 2, 104, 103, 3, 2, 2, 2, 105, 17, 3, 2, 2, 2, 106, 107, 5, 22, 12, 2, 107, 108, 7, 19, 2, 2, 108, 112, 3, 2, 2, 2, 109, 110, 7, 20, 2, 2, 110, 112, 7, 19, 2, 2, 111, 106, 3, 2, 2, 2, 111, 109, 3, 2, 2, 2, 112, 19, 3, 2, 2, 2, 113, 114, 7, 33, 2, 2, 114, 21, 3, 2, 2, 2, 115, 116, 5, 38, 20, 2, 116, 117, 7, 5, 2, 2, 117, 120, 5, 26, 14, 2, 118, 119, 7, 7, 2, 2, 119, 121, 5, 32, 17, 2, 120, 118, 3, 2, 2, 2, 120, 121, 3, 2, 2, 2, 121, 124, 3, 2, 2, 2, 122, 123, 7, 7, 2, 2, 123, 125, 5, 28, 15, 2, 124, 122, 3, 2, 2, 2, 124, 125, 3, 2, 2, 2, 125, 126, 3, 2, 2, 2, 126, 127, 7, 8, 2, 2, 127, 23, 3, 2, 2, 2, 128, 132, 5, 38, 20, 2, 129, 130, 7, 11, 2, 2, 130, 131, 7, 36, 2, 2, 131, 133, 7, 14, 2, 2, 132, 129, 3, 2, 2, 2, 132, 133, 3, 2, 2, 2, 133, 25, 3, 2, 2, 2, 134, 139, 5, 24, 13, 2, 135, 136, 7, 7, 2, 2, 136, 138, 5, 24, 13, 2, 137, 135, 3, 2, 2, 2, 138, 141, 3, 2, 2, 2, 139, 137, 3, 2, 2, 2, 139, 140, 3, 2, 2, 2, 140, 27, 3, 2, 2, 2, 141, 139, 3, 2, 2, 2, 142, 143, 7, 9, 2, 2, 143, 148, 5, 30, 16, 2, 144, 145, 7, 7, 2, 2, 145, 147, 5, 30, 16, 2, 146, 144, 3, 2, 2, 2, 147, 150, 3, 2, 2, 2, 148, 146, 3, 2, 2, 2, 148, 149, 3, 2, 2, 2, 149, 151, 3, 2, 2, 2, 150, 148, 3, 2, 2, 2, 151, 152, 7, 10, 2, 2, 152, 29, 3, 2, 2, 2, 153, 154, 7, 9, 2, 2, 154, 155, 5, 42, 22, 2, 155, 156, 7, 7, 2, 2, 156, 157, 5, 34, 18, 2, 157, 158, 7, 10, 2, 2, 158, 31, 3, 2, 2, 2, 159, 164, 5, 34, 18, 2, 160, 161, 7, 7, 2, 2, 161, 163, 5, 34, 18, 2, 162, 160, 3, 2, 2, 2, 163, 166, 3, 2, 2, 2, 164, 162, 3, 2, 2, 2, 164, 165, 3, 2, 2, 2, 165, 33, 3, 2, 2, 2, 166, 164, 3, 2, 2, 2, 167, 168, 8, 18, 1, 2, 168, 185, 5, 40, 21, 2, 169, 185, 7, 36, 2, 2, 170, 185, 7, 21, 2, 2, 171, 185, 5, 38, 20, 2, 172, 173, 7, 23, 2, 2, 173, 185, 5, 34, 18, 7, 174, 175, 7, 5, 2, 2, 175, 176, 5, 34, 18, 2, 176, 177, 7, 8, 2, 2, 177, 185, 3, 2, 2, 2, 178, 179, 5, 36, 19, 2, 179, 180, 7, 5, 2, 2, 180, 181, 5, 34, 18, 2, 181, 182, 7, 8, 2, 2, 182, 185, 3, 2, 2, 2, 183, 185, 5, 42, 22, 2, 184, 167, 3, 2, 2, 2, 184, 169, 3, 2, 2, 2, 184, 170, 3, 2, 2, 2, 184, 171, 3, 2, 2, 2, 184, 172, 3, 2, 2, 2, 184, 174, 3, 2, 2, 2, 184, 178, 3, 2, 2, 2, 184, 183, 3, 2, 2, 2, 185, 203, 3, 2, 2, 2, 186, 187, 12, 11, 2, 2, 187, 188, 7, 22, 2, 2, 188, 202, 5, 34, 18, 12, 189, 190, 12, 10, 2, 2, 190, 191, 7, 23, 2, 2, 191, 202, 5, 34, 18, 11, 192, 193, 12, 9, 2, 2, 193, 194, 7, 24, 2, 2, 194, 202, 5, 34, 18, 10, 195, 196, 12, 8, 2, 2, 196, 197, 7, 25, 2, 2, 197, 202, 5, 34, 18, 9, 198, 199, 12, 6, 2, 2, 199, 200, 7, 26, 2, 2, 200, 202, 5, 34, 18, 7, 201, 186, 3, 2, 2, 2, 201, 189, 3, 2, 2, 2, 201, 192, 3, 2, 2, 2, 201, 195, 3, 2, 2, 2, 201, 198, 3, 2, 2, 2, 202, 205, 3, 2, 2, 2, 203, 201, 3, 2, 2, 2, 203, 204, 3, 2, 2, 2, 204, 35, 3, 2, 2, 2, 205, 203, 3, 2, 2, 2, 206, 207, 9, 4, 2, 2, 207, 37, 3, 2, 2, 2, 208, 209, 7, 34, 2, 2, 209, 39, 3, 2, 2, 2, 210, 211, 7, 35, 2, 2, 211, 41, 3, 2, 2, 2, 212, 213, 7, 37, 2, 2, 213, 43, 3, 2, 2, 2, 19, 46, 58, 68, 78, 96, 101, 104, 111, 120, 124, 132, 139, 148, 164, 184, 201, 203]
\ No newline at end of file
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 39, 219, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 3, 2, 3, 2, 5, 2, 47, 10, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 57, 10, 3, 12, 3, 14, 3, 60, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 5, 4, 69, 10, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 7, 4, 77, 10, 4, 12, 4, 14, 4, 80, 11, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 6, 8, 95, 10, 8, 13, 8, 14, 8, 96, 3, 9, 6, 9, 100, 10, 9, 13, 9, 14, 9, 101, 3, 9, 5, 9, 105, 10, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 112, 10, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 5, 12, 121, 10, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 7, 14, 133, 10, 14, 12, 14, 14, 14, 136, 11, 14, 3, 14, 7, 14, 139, 10, 14, 12, 14, 14, 14, 142, 11, 14, 5, 14, 144, 10, 14, 3, 15, 3, 15, 3, 15, 3, 15, 7, 15, 150, 10, 15, 12, 15, 14, 15, 153, 11, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 7, 17, 166, 10, 17, 12, 17, 14, 17, 169, 11, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 5, 18, 189, 10, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 7, 18, 206, 10, 18, 12, 18, 14, 18, 209, 11, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 2, 3, 34, 23, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 2, 5, 3, 2, 12, 13, 3, 2, 15, 18, 3, 2, 27, 32, 2, 224, 2, 46, 3, 2, 2, 2, 4, 48, 3, 2, 2, 2, 6, 66, 3, 2, 2, 2, 8, 86, 3, 2, 2, 2, 10, 89, 3, 2, 2, 2, 12, 91, 3, 2, 2, 2, 14, 94, 3, 2, 2, 2, 16, 104, 3, 2, 2, 2, 18, 111, 3, 2, 2, 2, 20, 113, 3, 2, 2, 2, 22, 115, 3, 2, 2, 2, 24, 124, 3, 2, 2, 2, 26, 143, 3, 2, 2, 2, 28, 145, 3, 2, 2, 2, 30, 156, 3, 2, 2, 2, 32, 162, 3, 2, 2, 2, 34, 188, 3, 2, 2, 2, 36, 210, 3, 2, 2, 2, 38, 212, 3, 2, 2, 2, 40, 214, 3, 2, 2, 2, 42, 216, 3, 2, 2, 2, 44, 47, 5, 4, 3, 2, 45, 47, 5, 6, 4, 2, 46, 44, 3, 2, 2, 2, 46, 45, 3, 2, 2, 2, 47, 3, 3, 2, 2, 2, 48, 49, 7, 3, 2, 2, 49, 50, 7, 4, 2, 2, 50, 51, 5, 38, 20, 2, 51, 52, 7, 5, 2, 2, 52, 53, 7, 6, 2, 2, 53, 58, 5, 38, 20, 2, 54, 55, 7, 7, 2, 2, 55, 57, 5, 8, 5, 2, 56, 54, 3, 2, 2, 2, 57, 60, 3, 2, 2, 2, 58, 56, 3, 2, 2, 2, 58, 59, 3, 2, 2, 2, 59, 61, 3, 2, 2, 2, 60, 58, 3, 2, 2, 2, 61, 62, 7, 8, 2, 2, 62, 63, 7, 9, 2, 2, 63, 64, 5, 12, 7, 2, 64, 65, 7, 10, 2, 2, 65, 5, 3, 2, 2, 2, 66, 68, 7, 11, 2, 2, 67, 69, 9, 2, 2, 2, 68, 67, 3, 2, 2, 2, 68, 69, 3, 2, 2, 2, 69, 70, 3, 2, 2, 2, 70, 71, 7, 14, 2, 2, 71, 72, 7, 5, 2, 2, 72, 73, 7, 6, 2, 2, 73, 78, 5, 38, 20, 2, 74, 75, 7, 7, 2, 2, 75, 77, 5, 8, 5, 2, 76, 74, 3, 2, 2, 2, 77, 80, 3, 2, 2, 2, 78, 76, 3, 2, 2, 2, 78, 79, 3, 2, 2, 2, 79, 81, 3, 2, 2, 2, 80, 78, 3, 2, 2, 2, 81, 82, 7, 8, 2, 2, 82, 83, 7, 9, 2, 2, 83, 84, 5, 12, 7, 2, 84, 85, 7, 10, 2, 2, 85, 7, 3, 2, 2, 2, 86, 87, 5, 10, 6, 2, 87, 88, 5, 38, 20, 2, 88, 9, 3, 2, 2, 2, 89, 90, 9, 3, 2, 2, 90, 11, 3, 2, 2, 2, 91, 92, 5, 14, 8, 2, 92, 13, 3, 2, 2, 2, 93, 95, 5, 16, 9, 2, 94, 93, 3, 2, 2, 2, 95, 96, 3, 2, 2, 2, 96, 94, 3, 2, 2, 2, 96, 97, 3, 2, 2, 2, 97, 15, 3, 2, 2, 2, 98, 100, 5, 18, 10, 2, 99, 98, 3, 2, 2, 2, 100, 101, 3, 2, 2, 2, 101, 99, 3, 2, 2, 2, 101, 102, 3, 2, 2, 2, 102, 105, 3, 2, 2, 2, 103, 105, 5, 20, 11, 2, 104, 99, 3, 2, 2, 2, 104, 103, 3, 2, 2, 2, 105, 17, 3, 2, 2, 2, 106, 107, 5, 22, 12, 2, 107, 108, 7, 19, 2, 2, 108, 112, 3, 2, 2, 2, 109, 110, 7, 20, 2, 2, 110, 112, 7, 19, 2, 2, 111, 106, 3, 2, 2, 2, 111, 109, 3, 2, 2, 2, 112, 19, 3, 2, 2, 2, 113, 114, 7, 33, 2, 2, 114, 21, 3, 2, 2, 2, 115, 116, 5, 38, 20, 2, 116, 117, 7, 5, 2, 2, 117, 120, 5, 32, 17, 2, 118, 119, 7, 7, 2, 2, 119, 121, 5, 28, 15, 2, 120, 118, 3, 2, 2, 2, 120, 121, 3, 2, 2, 2, 121, 122, 3, 2, 2, 2, 122, 123, 7, 8, 2, 2, 123, 23, 3, 2, 2, 2, 124, 125, 5, 38, 20, 2, 125, 126, 7, 11, 2, 2, 126, 127, 7, 36, 2, 2, 127, 128, 7, 14, 2, 2, 128, 25, 3, 2, 2, 2, 129, 134, 5, 24, 13, 2, 130, 131, 7, 7, 2, 2, 131, 133, 5, 24, 13, 2, 132, 130, 3, 2, 2, 2, 133, 136, 3, 2, 2, 2, 134, 132, 3, 2, 2, 2, 134, 135, 3, 2, 2, 2, 135, 144, 3, 2, 2, 2, 136, 134, 3, 2, 2, 2, 137, 139, 5, 34, 18, 2, 138, 137, 3, 2, 2, 2, 139, 142, 3, 2, 2, 2, 140, 138, 3, 2, 2, 2, 140, 141, 3, 2, 2, 2, 141, 144, 3, 2, 2, 2, 142, 140, 3, 2, 2, 2, 143, 129, 3, 2, 2, 2, 143, 140, 3, 2, 2, 2, 144, 27, 3, 2, 2, 2, 145, 146, 7, 9, 2, 2, 146, 151, 5, 30, 16, 2, 147, 148, 7, 7, 2, 2, 148, 150, 5, 30, 16, 2, 149, 147, 3, 2, 2, 2, 150, 153, 3, 2, 2, 2, 151, 149, 3, 2, 2, 2, 151, 152, 3, 2, 2, 2, 152, 154, 3, 2, 2, 2, 153, 151, 3, 2, 2, 2, 154, 155, 7, 10, 2, 2, 155, 29, 3, 2, 2, 2, 156, 157, 7, 9, 2, 2, 157, 158, 5, 42, 22, 2, 158, 159, 7, 7, 2, 2, 159, 160, 5, 34, 18, 2, 160, 161, 7, 10, 2, 2, 161, 31, 3, 2, 2, 2, 162, 167, 5, 34, 18, 2, 163, 164, 7, 7, 2, 2, 164, 166, 5, 34, 18, 2, 165, 163, 3, 2, 2, 2, 166, 169, 3, 2, 2, 2, 167, 165, 3, 2, 2, 2, 167, 168, 3, 2, 2, 2, 168, 33, 3, 2, 2, 2, 169, 167, 3, 2, 2, 2, 170, 171, 8, 18, 1, 2, 171, 189, 5, 38, 20, 2, 172, 173, 7, 22, 2, 2, 173, 189, 5, 34, 18, 11, 174, 175, 7, 5, 2, 2, 175, 176, 5, 34, 18, 2, 176, 177, 7, 8, 2, 2, 177, 189, 3, 2, 2, 2, 178, 179, 5, 36, 19, 2, 179, 180, 7, 5, 2, 2, 180, 181, 5, 34, 18, 2, 181, 182, 7, 8, 2, 2, 182, 189, 3, 2, 2, 2, 183, 189, 5, 42, 22, 2, 184, 189, 5, 40, 21, 2, 185, 189, 7, 36, 2, 2, 186, 189, 7, 26, 2, 2, 187, 189, 5, 24, 13, 2, 188, 170, 3, 2, 2, 2, 188, 172, 3, 2, 2, 2, 188, 174, 3, 2, 2, 2, 188, 178, 3, 2, 2, 2, 188, 183, 3, 2, 2, 2, 188, 184, 3, 2, 2, 2, 188, 185, 3, 2, 2, 2, 188, 186, 3, 2, 2, 2, 188, 187, 3, 2, 2, 2, 189, 207, 3, 2, 2, 2, 190, 191, 12, 15, 2, 2, 191, 192, 7, 21, 2, 2, 192, 206, 5, 34, 18, 16, 193, 194, 12, 14, 2, 2, 194, 195, 7, 22, 2, 2, 195, 206, 5, 34, 18, 15, 196, 197, 12, 13, 2, 2, 197, 198, 7, 23, 2, 2, 198, 206, 5, 34, 18, 14, 199, 200, 12, 12, 2, 2, 200, 201, 7, 24, 2, 2, 201, 206, 5, 34, 18, 13, 202, 203, 12, 10, 2, 2, 203, 204, 7, 25, 2, 2, 204, 206, 5, 34, 18, 11, 205, 190, 3, 2, 2, 2, 205, 193, 3, 2, 2, 2, 205, 196, 3, 2, 2, 2, 205, 199, 3, 2, 2, 2, 205, 202, 3, 2, 2, 2, 206, 209, 3, 2, 2, 2, 207, 205, 3, 2, 2, 2, 207, 208, 3, 2, 2, 2, 208, 35, 3, 2, 2, 2, 209, 207, 3, 2, 2, 2, 210, 211, 9, 4, 2, 2, 211, 37, 3, 2, 2, 2, 212, 213, 7, 34, 2, 2, 213, 39, 3, 2, 2, 2, 214, 215, 7, 35, 2, 2, 215, 41, 3, 2, 2, 2, 216, 217, 7, 37, 2, 2, 217, 43, 3, 2, 2, 2, 19, 46, 58, 68, 78, 96, 101, 104, 111, 120, 134, 140, 143, 151, 167, 188, 205, 207]
\ No newline at end of file
......@@ -53,12 +53,12 @@ EOL=37
'std::vector<double>'=16
';'=17
'return'=18
'pi'=19
'+'=20
'-'=21
'*'=22
'/'=23
'^'=24
'+'=19
'-'=20
'*'=21
'/'=22
'^'=23
'pi'=24
'sin'=25
'cos'=26
'tan'=27
......
......@@ -54,8 +54,8 @@ public:
virtual void enterBufferIndex(xasmParser::BufferIndexContext * /*ctx*/) override { }
virtual void exitBufferIndex(xasmParser::BufferIndexContext * /*ctx*/) override { }
virtual void enterBitsType(xasmParser::BitsTypeContext * /*ctx*/) override { }
virtual void exitBitsType(xasmParser::BitsTypeContext * /*ctx*/) override { }
virtual void enterBitsOrParamType(xasmParser::BitsOrParamTypeContext * /*ctx*/) override { }
virtual void exitBitsOrParamType(xasmParser::BitsOrParamTypeContext * /*ctx*/) override { }
virtual void enterOptionsMap(xasmParser::OptionsMapContext * /*ctx*/) override { }
virtual void exitOptionsMap(xasmParser::OptionsMapContext * /*ctx*/) override { }
......
......@@ -80,8 +80,8 @@ std::vector<std::string> xasmLexer::_modeNames = {
std::vector<std::string> xasmLexer::_literalNames = {
"", u8"'__qpu__'", u8"'void'", u8"'('", u8"'qbit'", u8"','", u8"')'",
u8"'{'", u8"'}'", u8"'['", u8"'&'", u8"'='", u8"']'", u8"'int'", u8"'double'",
u8"'float'", u8"'std::vector<double>'", u8"';'", u8"'return'", u8"'pi'",
u8"'+'", u8"'-'", u8"'*'", u8"'/'", u8"'^'", u8"'sin'", u8"'cos'", u8"'tan'",
u8"'float'", u8"'std::vector<double>'", u8"';'", u8"'return'", u8"'+'",
u8"'-'", u8"'*'", u8"'/'", u8"'^'", u8"'pi'", u8"'sin'", u8"'cos'", u8"'tan'",
u8"'exp'", u8"'ln'", u8"'sqrt'"
};
......@@ -136,8 +136,8 @@ xasmLexer::Initializer::Initializer() {
0x3, 0x11, 0x3, 0x11, 0x3, 0x11, 0x3, 0x11, 0x3, 0x11, 0x3, 0x11, 0x3,
0x11, 0x3, 0x11, 0x3, 0x12, 0x3, 0x12, 0x3, 0x13, 0x3, 0x13, 0x3, 0x13,
0x3, 0x13, 0x3, 0x13, 0x3, 0x13, 0x3, 0x13, 0x3, 0x14, 0x3, 0x14, 0x3,
0x14, 0x3, 0x15, 0x3, 0x15, 0x3, 0x16, 0x3, 0x16, 0x3, 0x17, 0x3, 0x17,
0x3, 0x18, 0x3, 0x18, 0x3, 0x19, 0x3, 0x19, 0x3, 0x1a, 0x3, 0x1a, 0x3,
0x15, 0x3, 0x15, 0x3, 0x16, 0x3, 0x16, 0x3, 0x17, 0x3, 0x17, 0x3, 0x18,
0x3, 0x18, 0x3, 0x19, 0x3, 0x19, 0x3, 0x19, 0x3, 0x1a, 0x3, 0x1a, 0x3,
0x1a, 0x3, 0x1a, 0x3, 0x1b, 0x3, 0x1b, 0x3, 0x1b, 0x3, 0x1b, 0x3, 0x1c,
0x3, 0x1c, 0x3, 0x1c, 0x3, 0x1c, 0x3, 0x1d, 0x3, 0x1d, 0x3, 0x1d, 0x3,
0x1d, 0x3, 0x1e, 0x3, 0x1e, 0x3, 0x1e, 0x3, 0x1f, 0x3, 0x1f, 0x3, 0x1f,
......@@ -185,9 +185,9 @@ xasmLexer::Initializer::Initializer() {
0x2, 0x2, 0x19, 0x6f, 0x3, 0x2, 0x2, 0x2, 0x1b, 0x71, 0x3, 0x2, 0x2,
0x2, 0x1d, 0x75, 0x3, 0x2, 0x2, 0x2, 0x1f, 0x7c, 0x3, 0x2, 0x2, 0x2,
0x21, 0x82, 0x3, 0x2, 0x2, 0x2, 0x23, 0x96, 0x3, 0x2, 0x2, 0x2, 0x25,
0x98, 0x3, 0x2, 0x2, 0x2, 0x27, 0x9f, 0x3, 0x2, 0x2, 0x2, 0x29, 0xa2,
0x3, 0x2, 0x2, 0x2, 0x2b, 0xa4, 0x3, 0x2, 0x2, 0x2, 0x2d, 0xa6, 0x3,
0x2, 0x2, 0x2, 0x2f, 0xa8, 0x3, 0x2, 0x2, 0x2, 0x31, 0xaa, 0x3, 0x2,
0x98, 0x3, 0x2, 0x2, 0x2, 0x27, 0x9f, 0x3, 0x2, 0x2, 0x2, 0x29, 0xa1,
0x3, 0x2, 0x2, 0x2, 0x2b, 0xa3, 0x3, 0x2, 0x2, 0x2, 0x2d, 0xa5, 0x3,
0x2, 0x2, 0x2, 0x2f, 0xa7, 0x3, 0x2, 0x2, 0x2, 0x31, 0xa9, 0x3, 0x2,
0x2, 0x2, 0x33, 0xac, 0x3, 0x2, 0x2, 0x2, 0x35, 0xb0, 0x3, 0x2, 0x2,
0x2, 0x37, 0xb4, 0x3, 0x2, 0x2, 0x2, 0x39, 0xb8, 0x3, 0x2, 0x2, 0x2,
0x3b, 0xbc, 0x3, 0x2, 0x2, 0x2, 0x3d, 0xbf, 0x3, 0x2, 0x2, 0x2, 0x3f,
......@@ -232,12 +232,12 @@ xasmLexer::Initializer::Initializer() {
0x74, 0x2, 0x2, 0x99, 0x9a, 0x7, 0x67, 0x2, 0x2, 0x9a, 0x9b, 0x7, 0x76,
0x2, 0x2, 0x9b, 0x9c, 0x7, 0x77, 0x2, 0x2, 0x9c, 0x9d, 0x7, 0x74, 0x2,
0x2, 0x9d, 0x9e, 0x7, 0x70, 0x2, 0x2, 0x9e, 0x26, 0x3, 0x2, 0x2, 0x2,
0x9f, 0xa0, 0x7, 0x72, 0x2, 0x2, 0xa0, 0xa1, 0x7, 0x6b, 0x2, 0x2, 0xa1,
0x28, 0x3, 0x2, 0x2, 0x2, 0xa2, 0xa3, 0x7, 0x2d, 0x2, 0x2, 0xa3, 0x2a,
0x3, 0x2, 0x2, 0x2, 0xa4, 0xa5, 0x7, 0x2f, 0x2, 0x2, 0xa5, 0x2c, 0x3,
0x2, 0x2, 0x2, 0xa6, 0xa7, 0x7, 0x2c, 0x2, 0x2, 0xa7, 0x2e, 0x3, 0x2,
0x2, 0x2, 0xa8, 0xa9, 0x7, 0x31, 0x2, 0x2, 0xa9, 0x30, 0x3, 0x2, 0x2,
0x2, 0xaa, 0xab, 0x7, 0x60, 0x2, 0x2, 0xab, 0x32, 0x3, 0x2, 0x2, 0x2,
0x9f, 0xa0, 0x7, 0x2d, 0x2, 0x2, 0xa0, 0x28, 0x3, 0x2, 0x2, 0x2, 0xa1,
0xa2, 0x7, 0x2f, 0x2, 0x2, 0xa2, 0x2a, 0x3, 0x2, 0x2, 0x2, 0xa3, 0xa4,
0x7, 0x2c, 0x2, 0x2, 0xa4, 0x2c, 0x3, 0x2, 0x2, 0x2, 0xa5, 0xa6, 0x7,
0x31, 0x2, 0x2, 0xa6, 0x2e, 0x3, 0x2, 0x2, 0x2, 0xa7, 0xa8, 0x7, 0x60,
0x2, 0x2, 0xa8, 0x30, 0x3, 0x2, 0x2, 0x2, 0xa9, 0xaa, 0x7, 0x72, 0x2,
0x2, 0xaa, 0xab, 0x7, 0x6b, 0x2, 0x2, 0xab, 0x32, 0x3, 0x2, 0x2, 0x2,
0xac, 0xad, 0x7, 0x75, 0x2, 0x2, 0xad, 0xae, 0x7, 0x6b, 0x2, 0x2, 0xae,
0xaf, 0x7, 0x70, 0x2, 0x2, 0xaf, 0x34, 0x3, 0x2, 0x2, 0x2, 0xb0, 0xb1,
0x7, 0x65, 0x2, 0x2, 0xb1, 0xb2, 0x7, 0x71, 0x2, 0x2, 0xb2, 0xb3, 0x7,
......
......@@ -18,12 +18,12 @@ null
'std::vector<double>'
';'
'return'
'pi'
'+'
'-'
'*'
'/'
'^'
'pi'
'sin'
'cos'
'tan'
......@@ -125,4 +125,4 @@ mode names:
DEFAULT_MODE
atn:
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 39, 255, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 7, 32, 199, 10, 32, 12, 32, 14, 32, 202, 11, 32, 3, 32, 3, 32, 3, 33, 3, 33, 7, 33, 208, 10, 33, 12, 33, 14, 33, 211, 11, 33, 3, 33, 3, 33, 7, 33, 215, 10, 33, 12, 33, 14, 33, 218, 11, 33, 3, 33, 3, 33, 7, 33, 222, 10, 33, 12, 33, 14, 33, 225, 11, 33, 5, 33, 227, 10, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 6, 35, 234, 10, 35, 13, 35, 14, 35, 235, 3, 36, 3, 36, 7, 36, 240, 10, 36, 12, 36, 14, 36, 243, 11, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 5, 38, 252, 10, 38, 3, 38, 3, 38, 2, 2, 39, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 3, 2, 9, 4, 2, 12, 12, 15, 15, 3, 2, 99, 124, 6, 2, 50, 59, 67, 92, 97, 97, 99, 124, 3, 2, 67, 92, 4, 2, 67, 92, 99, 124, 3, 2, 36, 36, 5, 2, 11, 12, 15, 15, 34, 34, 2, 263, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 3, 77, 3, 2, 2, 2, 5, 85, 3, 2, 2, 2, 7, 90, 3, 2, 2, 2, 9, 92, 3, 2, 2, 2, 11, 97, 3, 2, 2, 2, 13, 99, 3, 2, 2, 2, 15, 101, 3, 2, 2, 2, 17, 103, 3, 2, 2, 2, 19, 105, 3, 2, 2, 2, 21, 107, 3, 2, 2, 2, 23, 109, 3, 2, 2, 2, 25, 111, 3, 2, 2, 2, 27, 113, 3, 2, 2, 2, 29, 117, 3, 2, 2, 2, 31, 124, 3, 2, 2, 2, 33, 130, 3, 2, 2, 2, 35, 150, 3, 2, 2, 2, 37, 152, 3, 2, 2, 2, 39, 159, 3, 2, 2, 2, 41, 162, 3, 2, 2, 2, 43, 164, 3, 2, 2, 2, 45, 166, 3, 2, 2, 2, 47, 168, 3, 2, 2, 2, 49, 170, 3, 2, 2, 2, 51, 172, 3, 2, 2, 2, 53, 176, 3, 2, 2, 2, 55, 180, 3, 2, 2, 2, 57, 184, 3, 2, 2, 2, 59, 188, 3, 2, 2, 2, 61, 191, 3, 2, 2, 2, 63, 196, 3, 2, 2, 2, 65, 226, 3, 2, 2, 2, 67, 228, 3, 2, 2, 2, 69, 233, 3, 2, 2, 2, 71, 237, 3, 2, 2, 2, 73, 246, 3, 2, 2, 2, 75, 251, 3, 2, 2, 2, 77, 78, 7, 97, 2, 2, 78, 79, 7, 97, 2, 2, 79, 80, 7, 115, 2, 2, 80, 81, 7, 114, 2, 2, 81, 82, 7, 119, 2, 2, 82, 83, 7, 97, 2, 2, 83, 84, 7, 97, 2, 2, 84, 4, 3, 2, 2, 2, 85, 86, 7, 120, 2, 2, 86, 87, 7, 113, 2, 2, 87, 88, 7, 107, 2, 2, 88, 89, 7, 102, 2, 2, 89, 6, 3, 2, 2, 2, 90, 91, 7, 42, 2, 2, 91, 8, 3, 2, 2, 2, 92, 93, 7, 115, 2, 2, 93, 94, 7, 100, 2, 2, 94, 95, 7, 107, 2, 2, 95, 96, 7, 118, 2, 2, 96, 10, 3, 2, 2, 2, 97, 98, 7, 46, 2, 2, 98, 12, 3, 2, 2, 2, 99, 100, 7, 43, 2, 2, 100, 14, 3, 2, 2, 2, 101, 102, 7, 125, 2, 2, 102, 16, 3, 2, 2, 2, 103, 104, 7, 127, 2, 2, 104, 18, 3, 2, 2, 2, 105, 106, 7, 93, 2, 2, 106, 20, 3, 2, 2, 2, 107, 108, 7, 40, 2, 2, 108, 22, 3, 2, 2, 2, 109, 110, 7, 63, 2, 2, 110, 24, 3, 2, 2, 2, 111, 112, 7, 95, 2, 2, 112, 26, 3, 2, 2, 2, 113, 114, 7, 107, 2, 2, 114, 115, 7, 112, 2, 2, 115, 116, 7, 118, 2, 2, 116, 28, 3, 2, 2, 2, 117, 118, 7, 102, 2, 2, 118, 119, 7, 113, 2, 2, 119, 120, 7, 119, 2, 2, 120, 121, 7, 100, 2, 2, 121, 122, 7, 110, 2, 2, 122, 123, 7, 103, 2, 2, 123, 30, 3, 2, 2, 2, 124, 125, 7, 104, 2, 2, 125, 126, 7, 110, 2, 2, 126, 127, 7, 113, 2, 2, 127, 128, 7, 99, 2, 2, 128, 129, 7, 118, 2, 2, 129, 32, 3, 2, 2, 2, 130, 131, 7, 117, 2, 2, 131, 132, 7, 118, 2, 2, 132, 133, 7, 102, 2, 2, 133, 134, 7, 60, 2, 2, 134, 135, 7, 60, 2, 2, 135, 136, 7, 120, 2, 2, 136, 137, 7, 103, 2, 2, 137, 138, 7, 101, 2, 2, 138, 139, 7, 118, 2, 2, 139, 140, 7, 113, 2, 2, 140, 141, 7, 116, 2, 2, 141, 142, 7, 62, 2, 2, 142, 143, 7, 102, 2, 2, 143, 144, 7, 113, 2, 2, 144, 145, 7, 119, 2, 2, 145, 146, 7, 100, 2, 2, 146, 147, 7, 110, 2, 2, 147, 148, 7, 103, 2, 2, 148, 149, 7, 64, 2, 2, 149, 34, 3, 2, 2, 2, 150, 151, 7, 61, 2, 2, 151, 36, 3, 2, 2, 2, 152, 153, 7, 116, 2, 2, 153, 154, 7, 103, 2, 2, 154, 155, 7, 118, 2, 2, 155, 156, 7, 119, 2, 2, 156, 157, 7, 116, 2, 2, 157, 158, 7, 112, 2, 2, 158, 38, 3, 2, 2, 2, 159, 160, 7, 114, 2, 2, 160, 161, 7, 107, 2, 2, 161, 40, 3, 2, 2, 2, 162, 163, 7, 45, 2, 2, 163, 42, 3, 2, 2, 2, 164, 165, 7, 47, 2, 2, 165, 44, 3, 2, 2, 2, 166, 167, 7, 44, 2, 2, 167, 46, 3, 2, 2, 2, 168, 169, 7, 49, 2, 2, 169, 48, 3, 2, 2, 2, 170, 171, 7, 96, 2, 2, 171, 50, 3, 2, 2, 2, 172, 173, 7, 117, 2, 2, 173, 174, 7, 107, 2, 2, 174, 175, 7, 112, 2, 2, 175, 52, 3, 2, 2, 2, 176, 177, 7, 101, 2, 2, 177, 178, 7, 113, 2, 2, 178, 179, 7, 117, 2, 2, 179, 54, 3, 2, 2, 2, 180, 181, 7, 118, 2, 2, 181, 182, 7, 99, 2, 2, 182, 183, 7, 112, 2, 2, 183, 56, 3, 2, 2, 2, 184, 185, 7, 103, 2, 2, 185, 186, 7, 122, 2, 2, 186, 187, 7, 114, 2, 2, 187, 58, 3, 2, 2, 2, 188, 189, 7, 110, 2, 2, 189, 190, 7, 112, 2, 2, 190, 60, 3, 2, 2, 2, 191, 192, 7, 117, 2, 2, 192, 193, 7, 115, 2, 2, 193, 194, 7, 116, 2, 2, 194, 195, 7, 118, 2, 2, 195, 62, 3, 2, 2, 2, 196, 200, 7, 37, 2, 2, 197, 199, 10, 2, 2, 2, 198, 197, 3, 2, 2, 2, 199, 202, 3, 2, 2, 2, 200, 198, 3, 2, 2, 2, 200, 201, 3, 2, 2, 2, 201, 203, 3, 2, 2, 2, 202, 200, 3, 2, 2, 2, 203, 204, 5, 75, 38, 2, 204, 64, 3, 2, 2, 2, 205, 209, 9, 3, 2, 2, 206, 208, 9, 4, 2, 2, 207, 206, 3, 2, 2, 2, 208, 211, 3, 2, 2, 2, 209, 207, 3, 2, 2, 2, 209, 210, 3, 2, 2, 2, 210, 227, 3, 2, 2, 2, 211, 209, 3, 2, 2, 2, 212, 216, 9, 5, 2, 2, 213, 215, 9, 4, 2, 2, 214, 213, 3, 2, 2, 2, 215, 218, 3, 2, 2, 2, 216, 214, 3, 2, 2, 2, 216, 217, 3, 2, 2, 2, 217, 227, 3, 2, 2, 2, 218, 216, 3, 2, 2, 2, 219, 223, 9, 5, 2, 2, 220, 222, 9, 6, 2, 2, 221, 220, 3, 2, 2, 2, 222, 225, 3, 2, 2, 2, 223, 221, 3, 2, 2, 2, 223, 224, 3, 2, 2, 2, 224, 227, 3, 2, 2, 2, 225, 223, 3, 2, 2, 2, 226, 205, 3, 2, 2, 2, 226, 212, 3, 2, 2, 2, 226, 219, 3, 2, 2, 2, 227, 66, 3, 2, 2, 2, 228, 229, 5, 69, 35, 2, 229, 230, 7, 48, 2, 2, 230, 231, 5, 69, 35, 2, 231, 68, 3, 2, 2, 2, 232, 234, 4, 50, 59, 2, 233, 232, 3, 2, 2, 2, 234, 235, 3, 2, 2, 2, 235, 233, 3, 2, 2, 2, 235, 236, 3, 2, 2, 2, 236, 70, 3, 2, 2, 2, 237, 241, 7, 36, 2, 2, 238, 240, 10, 7, 2, 2, 239, 238, 3, 2, 2, 2, 240, 243, 3, 2, 2, 2, 241, 239, 3, 2, 2, 2, 241, 242, 3, 2, 2, 2, 242, 244, 3, 2, 2, 2, 243, 241, 3, 2, 2, 2, 244, 245, 7, 36, 2, 2, 245, 72, 3, 2, 2, 2, 246, 247, 9, 8, 2, 2, 247, 248, 3, 2, 2, 2, 248, 249, 8, 37, 2, 2, 249, 74, 3, 2, 2, 2, 250, 252, 7, 15, 2, 2, 251, 250, 3, 2, 2, 2, 251, 252, 3, 2, 2, 2, 252, 253, 3, 2, 2, 2, 253, 254, 7, 12, 2, 2, 254, 76, 3, 2, 2, 2, 11, 2, 200, 209, 216, 223, 226, 235, 241, 251, 3, 8, 2, 2]
\ No newline at end of file
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 39, 255, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 7, 32, 199, 10, 32, 12, 32, 14, 32, 202, 11, 32, 3, 32, 3, 32, 3, 33, 3, 33, 7, 33, 208, 10, 33, 12, 33, 14, 33, 211, 11, 33, 3, 33, 3, 33, 7, 33, 215, 10, 33, 12, 33, 14, 33, 218, 11, 33, 3, 33, 3, 33, 7, 33, 222, 10, 33, 12, 33, 14, 33, 225, 11, 33, 5, 33, 227, 10, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 6, 35, 234, 10, 35, 13, 35, 14, 35, 235, 3, 36, 3, 36, 7, 36, 240, 10, 36, 12, 36, 14, 36, 243, 11, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 5, 38, 252, 10, 38, 3, 38, 3, 38, 2, 2, 39, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 3, 2, 9, 4, 2, 12, 12, 15, 15, 3, 2, 99, 124, 6, 2, 50, 59, 67, 92, 97, 97, 99, 124, 3, 2, 67, 92, 4, 2, 67, 92, 99, 124, 3, 2, 36, 36, 5, 2, 11, 12, 15, 15, 34, 34, 2, 263, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 3, 77, 3, 2, 2, 2, 5, 85, 3, 2, 2, 2, 7, 90, 3, 2, 2, 2, 9, 92, 3, 2, 2, 2, 11, 97, 3, 2, 2, 2, 13, 99, 3, 2, 2, 2, 15, 101, 3, 2, 2, 2, 17, 103, 3, 2, 2, 2, 19, 105, 3, 2, 2, 2, 21, 107, 3, 2, 2, 2, 23, 109, 3, 2, 2, 2, 25, 111, 3, 2, 2, 2, 27, 113, 3, 2, 2, 2, 29, 117, 3, 2, 2, 2, 31, 124, 3, 2, 2, 2, 33, 130, 3, 2, 2, 2, 35, 150, 3, 2, 2, 2, 37, 152, 3, 2, 2, 2, 39, 159, 3, 2, 2, 2, 41, 161, 3, 2, 2, 2, 43, 163, 3, 2, 2, 2, 45, 165, 3, 2, 2, 2, 47, 167, 3, 2, 2, 2, 49, 169, 3, 2, 2, 2, 51, 172, 3, 2, 2, 2, 53, 176, 3, 2, 2, 2, 55, 180, 3, 2, 2, 2, 57, 184, 3, 2, 2, 2, 59, 188, 3, 2, 2, 2, 61, 191, 3, 2, 2, 2, 63, 196, 3, 2, 2, 2, 65, 226, 3, 2, 2, 2, 67, 228, 3, 2, 2, 2, 69, 233, 3, 2, 2, 2, 71, 237, 3, 2, 2, 2, 73, 246, 3, 2, 2, 2, 75, 251, 3, 2, 2, 2, 77, 78, 7, 97, 2, 2, 78, 79, 7, 97, 2, 2, 79, 80, 7, 115, 2, 2, 80, 81, 7, 114, 2, 2, 81, 82, 7, 119, 2, 2, 82, 83, 7, 97, 2, 2, 83, 84, 7, 97, 2, 2, 84, 4, 3, 2, 2, 2, 85, 86, 7, 120, 2, 2, 86, 87, 7, 113, 2, 2, 87, 88, 7, 107, 2, 2, 88, 89, 7, 102, 2, 2, 89, 6, 3, 2, 2, 2, 90, 91, 7, 42, 2, 2, 91, 8, 3, 2, 2, 2, 92, 93, 7, 115, 2, 2, 93, 94, 7, 100, 2, 2, 94, 95, 7, 107, 2, 2, 95, 96, 7, 118, 2, 2, 96, 10, 3, 2, 2, 2, 97, 98, 7, 46, 2, 2, 98, 12, 3, 2, 2, 2, 99, 100, 7, 43, 2, 2, 100, 14, 3, 2, 2, 2, 101, 102, 7, 125, 2, 2, 102, 16, 3, 2, 2, 2, 103, 104, 7, 127, 2, 2, 104, 18, 3, 2, 2, 2, 105, 106, 7, 93, 2, 2, 106, 20, 3, 2, 2, 2, 107, 108, 7, 40, 2, 2, 108, 22, 3, 2, 2, 2, 109, 110, 7, 63, 2, 2, 110, 24, 3, 2, 2, 2, 111, 112, 7, 95, 2, 2, 112, 26, 3, 2, 2, 2, 113, 114, 7, 107, 2, 2, 114, 115, 7, 112, 2, 2, 115, 116, 7, 118, 2, 2, 116, 28, 3, 2, 2, 2, 117, 118, 7, 102, 2, 2, 118, 119, 7, 113, 2, 2, 119, 120, 7, 119, 2, 2, 120, 121, 7, 100, 2, 2, 121, 122, 7, 110, 2, 2, 122, 123, 7, 103, 2, 2, 123, 30, 3, 2, 2, 2, 124, 125, 7, 104, 2, 2, 125, 126, 7, 110, 2, 2, 126, 127, 7, 113, 2, 2, 127, 128, 7, 99, 2, 2, 128, 129, 7, 118, 2, 2, 129, 32, 3, 2, 2, 2, 130, 131, 7, 117, 2, 2, 131, 132, 7, 118, 2, 2, 132, 133, 7, 102, 2, 2, 133, 134, 7, 60, 2, 2, 134, 135, 7, 60, 2, 2, 135, 136, 7, 120, 2, 2, 136, 137, 7, 103, 2, 2, 137, 138, 7, 101, 2, 2, 138, 139, 7, 118, 2, 2, 139, 140, 7, 113, 2, 2, 140, 141, 7, 116, 2, 2, 141, 142, 7, 62, 2, 2, 142, 143, 7, 102, 2, 2, 143, 144, 7, 113, 2, 2, 144, 145, 7, 119, 2, 2, 145, 146, 7, 100, 2, 2, 146, 147, 7, 110, 2, 2, 147, 148, 7, 103, 2, 2, 148, 149, 7, 64, 2, 2, 149, 34, 3, 2, 2, 2, 150, 151, 7, 61, 2, 2, 151, 36, 3, 2, 2, 2, 152, 153, 7, 116, 2, 2, 153, 154, 7, 103, 2, 2, 154, 155, 7, 118, 2, 2, 155, 156, 7, 119, 2, 2, 156, 157, 7, 116, 2, 2, 157, 158, 7, 112, 2, 2, 158, 38, 3, 2, 2, 2, 159, 160, 7, 45, 2, 2, 160, 40, 3, 2, 2, 2, 161, 162, 7, 47, 2, 2, 162, 42, 3, 2, 2, 2, 163, 164, 7, 44, 2, 2, 164, 44, 3, 2, 2, 2, 165, 166, 7, 49, 2, 2, 166, 46, 3, 2, 2, 2, 167, 168, 7, 96, 2, 2, 168, 48, 3, 2, 2, 2, 169, 170, 7, 114, 2, 2, 170, 171, 7, 107, 2, 2, 171, 50, 3, 2, 2, 2, 172, 173, 7, 117, 2, 2, 173, 174, 7, 107, 2, 2, 174, 175, 7, 112, 2, 2, 175, 52, 3, 2, 2, 2, 176, 177, 7, 101, 2, 2, 177, 178, 7, 113, 2, 2, 178, 179, 7, 117, 2, 2, 179, 54, 3, 2, 2, 2, 180, 181, 7, 118, 2, 2, 181, 182, 7, 99, 2, 2, 182, 183, 7, 112, 2, 2, 183, 56, 3, 2, 2, 2, 184, 185, 7, 103, 2, 2, 185, 186, 7, 122, 2, 2, 186, 187, 7, 114, 2, 2, 187, 58, 3, 2, 2, 2, 188, 189, 7, 110, 2, 2, 189, 190, 7, 112, 2, 2, 190, 60, 3, 2, 2, 2, 191, 192, 7, 117, 2, 2, 192, 193, 7, 115, 2, 2, 193, 194, 7, 116, 2, 2, 194, 195, 7, 118, 2, 2, 195, 62, 3, 2, 2, 2, 196, 200, 7, 37, 2, 2, 197, 199, 10, 2, 2, 2, 198, 197, 3, 2, 2, 2, 199, 202, 3, 2, 2, 2, 200, 198, 3, 2, 2, 2, 200, 201, 3, 2, 2, 2, 201, 203, 3, 2, 2, 2, 202, 200, 3, 2, 2, 2, 203, 204, 5, 75, 38, 2, 204, 64, 3, 2, 2, 2, 205, 209, 9, 3, 2, 2, 206, 208, 9, 4, 2, 2, 207, 206, 3, 2, 2, 2, 208, 211, 3, 2, 2, 2, 209, 207, 3, 2, 2, 2, 209, 210, 3, 2, 2, 2, 210, 227, 3, 2, 2, 2, 211, 209, 3, 2, 2, 2, 212, 216, 9, 5, 2, 2, 213, 215, 9, 4, 2, 2, 214, 213, 3, 2, 2, 2, 215, 218, 3, 2, 2, 2, 216, 214, 3, 2, 2, 2, 216, 217, 3, 2, 2, 2, 217, 227, 3, 2, 2, 2, 218, 216, 3, 2, 2, 2, 219, 223, 9, 5, 2, 2, 220, 222, 9, 6, 2, 2, 221, 220, 3, 2, 2, 2, 222, 225, 3, 2, 2, 2, 223, 221, 3, 2, 2, 2, 223, 224, 3, 2, 2, 2, 224, 227, 3, 2, 2, 2, 225, 223, 3, 2, 2, 2, 226, 205, 3, 2, 2, 2, 226, 212, 3, 2, 2, 2, 226, 219, 3, 2, 2, 2, 227, 66, 3, 2, 2, 2, 228, 229, 5, 69, 35, 2, 229, 230, 7, 48, 2, 2, 230, 231, 5, 69, 35, 2, 231, 68, 3, 2, 2, 2, 232, 234, 4, 50, 59, 2, 233, 232, 3, 2, 2, 2, 234, 235, 3, 2, 2, 2, 235, 233, 3, 2, 2, 2, 235, 236, 3, 2, 2, 2, 236, 70, 3, 2, 2, 2, 237, 241, 7, 36, 2, 2, 238, 240, 10, 7, 2, 2, 239, 238, 3, 2, 2, 2, 240, 243, 3, 2, 2, 2, 241, 239, 3, 2, 2, 2, 241, 242, 3, 2, 2, 2, 242, 244, 3, 2, 2, 2, 243, 241, 3, 2, 2, 2, 244, 245, 7, 36, 2, 2, 245, 72, 3, 2, 2, 2, 246, 247, 9, 8, 2, 2, 247, 248, 3, 2, 2, 2, 248, 249, 8, 37, 2, 2, 249, 74, 3, 2, 2, 2, 250, 252, 7, 15, 2, 2, 251, 250, 3, 2, 2, 2, 251, 252, 3, 2, 2, 2, 252, 253, 3, 2, 2, 2, 253, 254, 7, 12, 2, 2, 254, 76, 3, 2, 2, 2, 11, 2, 200, 209, 216, 223, 226, 235, 241, 251, 3, 8, 2, 2]
\ No newline at end of file
......@@ -53,12 +53,12 @@ EOL=37
'std::vector<double>'=16
';'=17
'return'=18
'pi'=19
'+'=20
'-'=21
'*'=22
'/'=23
'^'=24
'+'=19
'-'=20
'*'=21
'/'=22
'^'=23
'pi'=24
'sin'=25
'cos'=26
'tan'=27
......
......@@ -52,8 +52,8 @@ public:
virtual void enterBufferIndex(xasmParser::BufferIndexContext *ctx) = 0;
virtual void exitBufferIndex(xasmParser::BufferIndexContext *ctx) = 0;
virtual void enterBitsType(xasmParser::BitsTypeContext *ctx) = 0;
virtual void exitBitsType(xasmParser::BitsTypeContext *ctx) = 0;
virtual void enterBitsOrParamType(xasmParser::BitsOrParamTypeContext *ctx) = 0;
virtual void exitBitsOrParamType(xasmParser::BitsOrParamTypeContext *ctx) = 0;
virtual void enterOptionsMap(xasmParser::OptionsMapContext *ctx) = 0;
virtual void exitOptionsMap(xasmParser::OptionsMapContext *ctx) = 0;
......
......@@ -754,10 +754,6 @@ xasmParser::IdContext* xasmParser::InstructionContext::id() {
return getRuleContext<xasmParser::IdContext>(0);
}
xasmParser::BitsTypeContext* xasmParser::InstructionContext::bitsType() {
return getRuleContext<xasmParser::BitsTypeContext>(0);
}
xasmParser::ExplistContext* xasmParser::InstructionContext::explist() {
return getRuleContext<xasmParser::ExplistContext>(0);
}
......@@ -799,31 +795,18 @@ xasmParser::InstructionContext* xasmParser::instruction() {
match(xasmParser::T__2);
setState(115);
dynamic_cast<InstructionContext *>(_localctx)->bits = bitsType();
dynamic_cast<InstructionContext *>(_localctx)->bits_and_params = explist();
setState(118);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 8, _ctx)) {
case 1: {
setState(116);
match(xasmParser::T__4);
setState(117);
dynamic_cast<InstructionContext *>(_localctx)->params = explist();
break;
}
}
setState(122);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == xasmParser::T__4) {
setState(120);
setState(116);
match(xasmParser::T__4);
setState(121);
setState(117);
dynamic_cast<InstructionContext *>(_localctx)->options = optionsMap();
}
setState(124);
setState(120);
match(xasmParser::T__5);
}
......@@ -870,27 +853,21 @@ void xasmParser::BufferIndexContext::exitRule(tree::ParseTreeListener *listener)
xasmParser::BufferIndexContext* xasmParser::bufferIndex() {
BufferIndexContext *_localctx = _tracker.createInstance<BufferIndexContext>(_ctx, getState());
enterRule(_localctx, 22, xasmParser::RuleBufferIndex);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(126);
setState(122);
id();
setState(130);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == xasmParser::T__8) {
setState(127);
match(xasmParser::T__8);
setState(128);
match(xasmParser::INT);
setState(129);
match(xasmParser::T__11);
}
setState(123);
match(xasmParser::T__8);
setState(124);
match(xasmParser::INT);
setState(125);
match(xasmParser::T__11);
}
catch (RecognitionException &e) {
......@@ -902,62 +879,104 @@ xasmParser::BufferIndexContext* xasmParser::bufferIndex() {
return _localctx;
}
//----------------- BitsTypeContext ------------------------------------------------------------------
//----------------- BitsOrParamTypeContext ------------------------------------------------------------------
xasmParser::BitsTypeContext::BitsTypeContext(ParserRuleContext *parent, size_t invokingState)
xasmParser::BitsOrParamTypeContext::BitsOrParamTypeContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
std::vector<xasmParser::BufferIndexContext *> xasmParser::BitsTypeContext::bufferIndex() {
std::vector<xasmParser::BufferIndexContext *> xasmParser::BitsOrParamTypeContext::bufferIndex() {
return getRuleContexts<xasmParser::BufferIndexContext>();
}
xasmParser::BufferIndexContext* xasmParser::BitsTypeContext::bufferIndex(size_t i) {
xasmParser::BufferIndexContext* xasmParser::BitsOrParamTypeContext::bufferIndex(size_t i) {
return getRuleContext<xasmParser::BufferIndexContext>(i);
}
std::vector<xasmParser::ExpContext *> xasmParser::BitsOrParamTypeContext::exp() {
return getRuleContexts<xasmParser::ExpContext>();
}
xasmParser::ExpContext* xasmParser::BitsOrParamTypeContext::exp(size_t i) {
return getRuleContext<xasmParser::ExpContext>(i);
}
size_t xasmParser::BitsTypeContext::getRuleIndex() const {
return xasmParser::RuleBitsType;
size_t xasmParser::BitsOrParamTypeContext::getRuleIndex() const {
return xasmParser::RuleBitsOrParamType;
}
void xasmParser::BitsTypeContext::enterRule(tree::ParseTreeListener *listener) {
void xasmParser::BitsOrParamTypeContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<xasmListener *>(listener);
if (parserListener != nullptr)
parserListener->enterBitsType(this);
parserListener->enterBitsOrParamType(this);
}
void xasmParser::BitsTypeContext::exitRule(tree::ParseTreeListener *listener) {
void xasmParser::BitsOrParamTypeContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<xasmListener *>(listener);
if (parserListener != nullptr)
parserListener->exitBitsType(this);
parserListener->exitBitsOrParamType(this);
}
xasmParser::BitsTypeContext* xasmParser::bitsType() {
BitsTypeContext *_localctx = _tracker.createInstance<BitsTypeContext>(_ctx, getState());
enterRule(_localctx, 24, xasmParser::RuleBitsType);
xasmParser::BitsOrParamTypeContext* xasmParser::bitsOrParamType() {
BitsOrParamTypeContext *_localctx = _tracker.createInstance<BitsOrParamTypeContext>(_ctx, getState());
enterRule(_localctx, 24, xasmParser::RuleBitsOrParamType);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
size_t alt;
enterOuterAlt(_localctx, 1);
setState(132);
bufferIndex();
setState(137);
setState(141);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 11, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
setState(133);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 11, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(127);
bufferIndex();
setState(132);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == xasmParser::T__4) {
setState(128);
match(xasmParser::T__4);
setState(129);
bufferIndex();
setState(134);
bufferIndex();
_errHandler->sync(this);
_la = _input->LA(1);
}
setState(139);
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(138);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 11, _ctx);
_la = _input->LA(1);
while ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & ((1ULL << xasmParser::T__2)
| (1ULL << xasmParser::T__19)
| (1ULL << xasmParser::T__23)
| (1ULL << xasmParser::T__24)
| (1ULL << xasmParser::T__25)
| (1ULL << xasmParser::T__26)
| (1ULL << xasmParser::T__27)
| (1ULL << xasmParser::T__28)
| (1ULL << xasmParser::T__29)
| (1ULL << xasmParser::ID)
| (1ULL << xasmParser::REAL)
| (1ULL << xasmParser::INT)
| (1ULL << xasmParser::STRING))) != 0)) {
setState(135);
exp(0);
setState(140);
_errHandler->sync(this);
_la = _input->LA(1);
}
break;
}
}
}
......@@ -1011,23 +1030,23 @@ xasmParser::OptionsMapContext* xasmParser::optionsMap() {
});
try {
enterOuterAlt(_localctx, 1);
setState(140);
setState(143);
match(xasmParser::T__6);
setState(141);
setState(144);
optionsType();
setState(146);
setState(149);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == xasmParser::T__4) {
setState(142);
setState(145);
match(xasmParser::T__4);
setState(143);
setState(146);
optionsType();
setState(148);
setState(151);
_errHandler->sync(this);
_la = _input->LA(1);
}
setState(149);
setState(152);
match(xasmParser::T__7);
}
......@@ -1080,15 +1099,15 @@ xasmParser::OptionsTypeContext* xasmParser::optionsType() {
});
try {
enterOuterAlt(_localctx, 1);
setState(151);
setState(154);
match(xasmParser::T__6);
setState(152);
setState(155);
dynamic_cast<OptionsTypeContext *>(_localctx)->key = string();
setState(153);
setState(156);