hexsha stringlengths 40 40 | size int64 19 11.4M | ext stringclasses 13
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 270 | max_stars_repo_name stringlengths 5 110 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 9 | max_stars_count float64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 270 | max_issues_repo_name stringlengths 5 116 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 9 | max_issues_count float64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 270 | max_forks_repo_name stringlengths 5 116 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 9 | max_forks_count float64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 19 11.4M | avg_line_length float64 1.93 229k | max_line_length int64 12 688k | alphanum_fraction float64 0.07 0.99 | matches listlengths 1 10 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
502d240e6107c5f045e6ebcee9c875dd3a74e420 | 16,080 | cpp | C++ | src/client_main/graphics/ui/label.cpp | snowmeltarcade/projectfarm | 6a35330f63bff06465c4ee1a0fbc5277c0d22982 | [
"MIT"
] | null | null | null | src/client_main/graphics/ui/label.cpp | snowmeltarcade/projectfarm | 6a35330f63bff06465c4ee1a0fbc5277c0d22982 | [
"MIT"
] | 7 | 2021-05-30T21:52:39.000Z | 2021-06-25T22:35:28.000Z | src/client_main/graphics/ui/label.cpp | snowmeltarcade/projectfarm | 6a35330f63bff06465c4ee1a0fbc5277c0d22982 | [
"MIT"
] | null | null | null | #include <algorithm>
#include "label.h"
#include "graphics/graphics.h"
#include "api/logging/logging.h"
using namespace std::literals;
namespace projectfarm::graphics::ui
{
bool Label::SetText(std::string_view text,
bool forceUpdate) noexcept
{
if (!forceUpdate && text == this->_text)
{
return true;
}
this->Destroy();
if (text.empty())
{
this->_renderDetails = {};
}
else
{
auto font = this->_fontManager->GetFont(this->_style->Font);
if (!font)
{
shared::api::logging::Log("Failed to get font: " + this->_style->Font);
return false;
}
SDL_Color sdlColor { this->_style->TextColor.r,
this->_style->TextColor.g,
this->_style->TextColor.b,
this->_style->TextColor.a };
auto [surface, renderDetails] = font->RenderToSurface(text,
sdlColor,
this->_size.GetWidth(),
this->_characterOverride,
this->_useMarkdown,
this->_maxLines);
if (!surface)
{
shared::api::logging::Log("Failed to render text to surface.");
return false;
}
this->_backgroundTexture = std::make_shared<graphics::Texture>();
this->_backgroundTexture->SetGraphics(this->GetGraphics());
this->_backgroundTexture->SetRenderToWorldSpace(false);
if (!this->_backgroundTexture->LoadFromSurface(surface))
{
shared::api::logging::Log("Failed to load from surface.");
return false;
}
this->_renderDetails = renderDetails;
// the width will never exceed this control due to max width above,
// so we only need to fit if the height is too big
if (this->_fitType == FitTypes::Fit)
{
auto textureHeight = this->_backgroundTexture->GetTextureHeight();
auto controlHeight = this->GetSize().GetHeight();
if (textureHeight > controlHeight)
{
auto delta = textureHeight / controlHeight;
this->_backgroundTexture->SetTextureWidth(this->_backgroundTexture->GetTextureWidth() / delta);
this->_backgroundTexture->SetTextureHeight(controlHeight);
}
}
else if (this->_fitType == FitTypes::Fill)
{
this->_backgroundTexture->SetTextureWidth(this->GetSize().GetWidth());
this->_backgroundTexture->SetTextureHeight(this->GetSize().GetHeight());
}
if (this->_scrollToBottomOnTextAdd)
{
// offset by the difference in height
int32_t delta = this->_backgroundTexture->GetTextureHeight() - this->GetSize().GetHeight();
if (delta > 0)
{
this->_position.SetOffset(0, -delta);
}
}
if (!this->CreateMask(this->_backgroundTexture->GetTextureWidth(),
this->_backgroundTexture->GetTextureHeight()))
{
shared::api::logging::Log("Failed to create mask.");
return false;
}
this->_backgroundTexture->SetMaterialName("single_texture_with_mask");
this->_backgroundTexture->AddMaterialTexture(this->_maskTexture);
}
this->_text = text;
return true;
}
void Label::Clear()
{
this->Destroy();
this->ClearChildren();
}
void Label::Render()
{
if (this->_backgroundTexture)
{
uint32_t x {0};
uint32_t y {0};
this->_position.ResolvePosition(this->shared_from_this(), x, y);
auto w = this->_backgroundTexture->GetTextureWidth();
auto h = this->_backgroundTexture->GetTextureHeight();
auto [offsetX, offsetY] = this->_position.GetOffset();
this->_backgroundTexture->SetRenderDetails(x + offsetX, y + offsetY, w, h,
graphics::RenderOriginPoints::TopLeft);
auto renderLayer = this->GetGraphics()->BumpRenderLayer();
this->_backgroundTexture->Render(renderLayer);
}
this->RenderChildren();
}
void Label::Destroy()
{
if (this->_backgroundTexture)
{
// this is loaded from a surface, not from the pool
// destroy it manually
this->_backgroundTexture->Destroy();
this->_backgroundTexture = nullptr;
}
if (this->_maskSurface)
{
this->_maskSurface->FreeSurface();
this->_maskSurface = nullptr;
}
}
void Label::ReadStylesDataFromJson(const nlohmann::json& controlJson,
const std::shared_ptr<UI>& ui,
const std::vector<std::pair<std::string, std::string>>& parentParameters)
{
auto normalizedJson = ui->NormalizeJson(controlJson, parentParameters);
if (auto cssClass = normalizedJson.find("cssClass"); cssClass != normalizedJson.end())
{
this->_cssClass = cssClass->get<std::string>();
}
}
bool Label::SetupFromJson(const nlohmann::json& controlJson,
const std::shared_ptr<UI>& ui,
const std::vector<std::pair<std::string, std::string>>& parameters)
{
auto normalizedJson = ui->NormalizeJson(controlJson, parameters);
if (!this->SetCommonValuesFromJson(normalizedJson))
{
shared::api::logging::Log("Failed to set common values.");
return false;
}
auto text = normalizedJson["text"].get<std::string>();
if (auto font = normalizedJson.find("font"); font != normalizedJson.end())
{
this->_style->Font = font->get<std::string>();
}
if (auto characterOverride = normalizedJson.find("characterOverride"); characterOverride != normalizedJson.end())
{
this->_characterOverride = characterOverride->get<std::string>();
}
if (auto useMarkdown = normalizedJson.find("useMarkdown"); useMarkdown != normalizedJson.end())
{
// this needs to be a string in json, as this value will be a parameter,
// so will likely be normalized, so we cannot use a pure boolean value
this->_useMarkdown = useMarkdown->get<std::string>() == "true";
}
if (auto allowNewLines = normalizedJson.find("allowNewLines"); allowNewLines != normalizedJson.end())
{
// this needs to be a string in json, as this value will be a parameter,
// so will likely be normalized, so we cannot use a pure boolean value
this->_allowNewLines = allowNewLines->get<std::string>() == "true";
}
if (auto scrollToBottomOnTextAdd = normalizedJson.find("scrollToBottomOnTextAdd"); scrollToBottomOnTextAdd != normalizedJson.end())
{
// this needs to be a string in json, as this value will be a parameter,
// so will likely be normalized, so we cannot use a pure boolean value
this->_scrollToBottomOnTextAdd = scrollToBottomOnTextAdd->get<std::string>() == "true";
}
if (auto maxLines = normalizedJson.find("maxLines"); maxLines != normalizedJson.end())
{
this->_maxLines = maxLines->get<uint32_t>();
}
// we want copies of these values (other than `this`) as they will long be out of scope
// by the time this is invoked
auto binding = [this](const auto& s)
{
if (!this->SetText(s))
{
shared::api::logging::Log("Failed to set text from binding with text: " + s);
}
};
ui->EnableSimpleBindingForParameter(std::make_shared<UI::SimpleBindingType>(binding),
text);
if (!this->SetText(text))
{
shared::api::logging::Log("Failed to set text with json: " + controlJson.dump());
return false;
}
return true;
}
uint32_t Label::Script_GetCustomPropertyInt(std::string_view name,
const std::vector<projectfarm::shared::scripting::FunctionParameter>& parameters) noexcept
{
if (name == "font_line_height")
{
return this->Script_GetCustomPropertyInt_font_line_height();
}
else if (name == "rendered_text_length")
{
return this->Script_GetCustomPropertyInt_rendered_text_length();
}
else if (name == "current_character_position_from_x_y_pos")
{
return this->Script_GetCustomPropertyInt_current_character_position_from_x_y_pos(parameters);
}
return 0;
}
bool Label::Script_GetCustomPropertyBool(std::string_view name,
const std::vector<projectfarm::shared::scripting::FunctionParameter>&) noexcept
{
if (name == "get_use_markdown")
{
return this->_useMarkdown;
}
else if (name == "allow_new_lines")
{
return this->_allowNewLines;
}
return false;
}
shared::math::Vector2D Label::Script_GetCustomPropertyVector2D(std::string_view name,
std::string_view parameter) noexcept
{
if (name == "character_pos")
{
return this->Script_GetCustomProperty_character_pos(parameter);
}
return {};
}
void Label::ApplyStyle(bool isLoading) noexcept
{
// the text is already set when loading
if (!isLoading)
{
if (!this->SetText(this->_text,true))
{
shared::api::logging::Log("Failed to set text when applying style.");
}
}
}
uint32_t Label::Script_GetCustomPropertyInt_font_line_height() noexcept
{
auto font = this->_fontManager->GetFont(this->_style->Font);
if (!font)
{
shared::api::logging::Log("Failed to find font with name: " + this->_style->Font);
return 0;
}
return font->GetLineHeight();
}
shared::math::Vector2D Label::Script_GetCustomProperty_character_pos(std::string_view parameter) noexcept
{
shared::math::Vector2D v;
if (this->_renderDetails._lines.empty())
{
return v;
}
auto characterPosition {0u};
try
{
characterPosition = static_cast<uint32_t>(std::stoi(std::string(parameter)));
}
catch (const std::invalid_argument& ex)
{
shared::api::logging::Log("Failed to convert to character position: " + std::string(parameter) +
" with error: " + ex.what());
return v;
}
auto font = this->_fontManager->GetFont(this->_style->Font);
if (!font)
{
shared::api::logging::Log("Failed to find font with name: " + this->_style->Font);
return v;
}
std::vector<Font::TextRenderPart> lineToCalculate;
for (const auto& line : this->_renderDetails._lines)
{
auto lineLength {0u};
for (const auto& part : line)
{
lineLength += static_cast<uint32_t>(part._text.size());
}
// we need to convert to a signed type, otherwise the needed negative result
// will wrap around to a high positive result
if (static_cast<int32_t>(characterPosition - lineLength) <= 0)
{
lineToCalculate = line;
break;
}
characterPosition -= lineLength;
v.SetY(v.GetY() + font->GetLineHeight());
}
// if the character position is greater than all the characters in all lines,
// default to the last line
if (lineToCalculate.empty())
{
lineToCalculate = this->_renderDetails._lines[this->_renderDetails._lines.size() - 1];
}
// use a lambda so we can easily exit the nested loop
auto getXPos = [&lineToCalculate, characterPosition, &font]() -> uint32_t
{
auto x {0u};
auto positionIndex {0u};
for (const auto& part : lineToCalculate)
{
for (auto c : part._text)
{
if (positionIndex++ >= characterPosition)
{
return x;
}
if (auto details = font->GetCharacterDetails(c, part._style); details)
{
x += details->_w;
}
}
}
return x;
};
v.SetX(getXPos());
return v;
}
uint32_t Label::Script_GetCustomPropertyInt_rendered_text_length() noexcept
{
auto count = 0u;
for (const auto& line : this->_renderDetails._lines)
{
for (const auto& part : line)
{
count += static_cast<uint32_t>(part._text.size());
}
}
return count;
}
uint32_t Label::Script_GetCustomPropertyInt_current_character_position_from_x_y_pos(
const std::vector<projectfarm::shared::scripting::FunctionParameter>& parameters) noexcept
{
if (parameters.size() != 2)
{
shared::api::logging::Log("`current_character_position_from_x_y_pos` expects 2 parameters.");
return 0;
}
auto x = parameters[0].GetAsUInt();
auto y = parameters[1].GetAsUInt();
if (!x || !y)
{
shared::api::logging::Log("Invalid parameters for `current_character_position_from_x_y_pos`: x: " +
parameters[0].GetValue() + " y: " + parameters[1].GetValue());
return 0;
}
auto font = this->_fontManager->GetFont(this->_style->Font);
if (!font)
{
shared::api::logging::Log("Failed to find font with name: " + this->_style->Font);
return 0;
}
auto [ox, oy] = this->GetPosition().GetOffset();
auto position = font->PositionToCharacterIndex(this->_text,
*x - ox, *y - oy,
this->_size.GetWidth(),
this->_characterOverride,
this->_useMarkdown);
return position;
}
void Label::OnDrag(uint32_t, uint32_t, uint32_t dx, uint32_t dy) noexcept
{
auto pos = this->GetPosition();
auto [ox, oy] = pos.GetOffset();
int32_t newX = ox + dx;
int32_t newY = oy + dy;
// clamp the scrolling
if (this->_backgroundTexture)
{
newX = std::clamp(newX, -static_cast<int32_t>(this->_backgroundTexture->GetTextureWidth()), 0);
newY = std::clamp(newY, -static_cast<int32_t>(this->_backgroundTexture->GetTextureHeight()), 0);
}
pos.SetOffset(newX, newY);
this->SetPosition(pos);
}
}
| 33.995772 | 139 | 0.523632 | [
"render",
"vector"
] |
502e7cd52d109f7d5d767e092896148f83857c0d | 5,312 | cpp | C++ | lib/ErriezDS3231/platformio/src/main.cpp | Erriez/ESP8266UbidotsSensors | 498d932aca5c0a4d9f3f2a701e60f22ee068669d | [
"MIT"
] | null | null | null | lib/ErriezDS3231/platformio/src/main.cpp | Erriez/ESP8266UbidotsSensors | 498d932aca5c0a4d9f3f2a701e60f22ee068669d | [
"MIT"
] | null | null | null | lib/ErriezDS3231/platformio/src/main.cpp | Erriez/ESP8266UbidotsSensors | 498d932aca5c0a4d9f3f2a701e60f22ee068669d | [
"MIT"
] | 2 | 2020-01-30T18:35:58.000Z | 2021-12-02T14:22:53.000Z | /*
* MIT License
*
* Copyright (c) 2018 Erriez
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/*!
* \brief DS3231 high accurate RTC getting started example for Arduino
* \details
* Connect the nINT/SQW pin to an Arduino interrupt pin.
* Source: https://github.com/Erriez/ErriezDS3231
*/
#include <Wire.h>
#include <ErriezDS3231.h>
// Create DS3231 RTC object
static DS3231 rtc;
// Create date time object
static DS3231_DateTime dt;
// Define days of the week in flash
const char day_1[] PROGMEM = "Monday";
const char day_2[] PROGMEM = "Tuesday";
const char day_3[] PROGMEM = "Wednesday";
const char day_4[] PROGMEM = "Thursday";
const char day_5[] PROGMEM = "Friday";
const char day_6[] PROGMEM = "Saturday";
const char day_7[] PROGMEM = "Sunday";
const char* const day_week_table[] PROGMEM = {
day_1, day_2, day_3, day_4, day_5, day_6, day_7
};
// Define months in flash
const char month_1[] PROGMEM = "January";
const char month_2[] PROGMEM = "February";
const char month_3[] PROGMEM = "March";
const char month_4[] PROGMEM = "April";
const char month_5[] PROGMEM = "May";
const char month_6[] PROGMEM = "June";
const char month_7[] PROGMEM = "July";
const char month_8[] PROGMEM = "August";
const char month_9[] PROGMEM = "September";
const char month_10[] PROGMEM = "October";
const char month_11[] PROGMEM = "November";
const char month_12[] PROGMEM = "December";
const char* const month_table[] PROGMEM = {
month_1, month_2, month_3, month_4, month_5, month_6,
month_7, month_8, month_9, month_10, month_11, month_12
};
// Function prototypes
static void printDateTime();
static void printTemperature();
void setup()
{
// Initialize serial port
Serial.begin(115200);
while (!Serial) {
;
}
Serial.println(F("DS3231 RTC getting started example\n"));
// Initialize TWI
Wire.begin();
Wire.setClock(400000);
// Initialize RTC
while (rtc.begin()) {
Serial.println(F("Error: Could not detect DS3231 RTC"));
delay(3000);
}
// Check oscillator status
if (rtc.isOscillatorStopped()) {
Serial.println(F("Error: DS3231 RTC oscillator stopped. Program new date/time."));
while (1) {
;
}
}
// Disable 32kHz clock output pin
rtc.outputClockPinEnable(false);
// Disable square wave out
rtc.setSquareWave(SquareWaveDisable);
Serial.println(F("RTC epoch/date/time/temperature:"));
}
void loop()
{
// Read RTC date and time from RTC
if (rtc.getDateTime(&dt)) {
Serial.println(F("Error: Read date time failed"));
return;
}
// Print date time on serial port
printDateTime();
// Print temperature every minute
if (dt.second == 0) {
printTemperature();
}
// Just an example to print the date and time every second. Recommended code is to use the 1Hz
// square wave out pin with an interrupt instead of polling.
delay(1000);
}
static void printDateTime()
{
char buf[32];
// Print Unix Epoch time
snprintf(buf, sizeof(buf), "%lu", rtc.getEpochTime(&dt));
Serial.print(buf);
Serial.print(F(" "));
// Print day of the week, day month, month and year
strncpy_P(buf, (char *)pgm_read_dword(&(day_week_table[dt.dayWeek - 1])), sizeof(buf));
Serial.print(buf);
Serial.print(F(" "));
Serial.print(dt.dayMonth);
Serial.print(F(" "));
strncpy_P(buf, (char *)pgm_read_dword(&(month_table[dt.month - 1])), sizeof(buf));
Serial.print(buf);
Serial.print(F(" "));
Serial.print(dt.year);
Serial.print(F(" "));
// Print time
snprintf(buf, sizeof(buf), "%d:%02d:%02d", dt.hour, dt.minute, dt.second);
Serial.println(buf);
}
static void printTemperature()
{
int8_t temperature;
uint8_t fraction;
#if 0
// Force temperature conversion only when reading temperature faster than 64 seconds
if (rtc.startTemperatureConversion() != Success) {
Serial.println(F("Temperature conversion busy"));
return;
}
#endif
// Read temperature
rtc.getTemperature(&temperature, &fraction);
Serial.print(F("Temperature: "));
Serial.print(temperature);
Serial.print(F("."));
Serial.print(fraction);
Serial.println(F("C"));
}
| 29.027322 | 98 | 0.674322 | [
"object"
] |
5042bb13c65027e0c6595de1dfbae6329938a556 | 1,451 | cpp | C++ | #166_fraction-to-recurring-decimal/fraction-to-recurring-decimal.cpp | o-oppang/lets-solve-algorithm | 9983a112736ce48bbd309a9af16d1fd68b9420da | [
"MIT"
] | null | null | null | #166_fraction-to-recurring-decimal/fraction-to-recurring-decimal.cpp | o-oppang/lets-solve-algorithm | 9983a112736ce48bbd309a9af16d1fd68b9420da | [
"MIT"
] | null | null | null | #166_fraction-to-recurring-decimal/fraction-to-recurring-decimal.cpp | o-oppang/lets-solve-algorithm | 9983a112736ce48bbd309a9af16d1fd68b9420da | [
"MIT"
] | null | null | null | class Solution {
public:
string fractionToDecimal(int numerator, int denominator) {
stringstream ss;
if( numerator / static_cast<float>( denominator ) < 0.0 && numerator / static_cast<float>( denominator ) > -1.0 ) ss << "-";
ss << to_string( numerator / static_cast<long>( denominator ) );
numerator = abs( numerator );
denominator = abs( denominator );
vector<int> remains;
long remain = numerator % denominator;
stringstream fraction{};
while( remain != 0 ) {
remain *= 10;
auto same = find(remains.begin(), remains.end(), remain);
if( same != remains.end() ) {
auto fractionStr = fraction.str();
fraction.str("");
auto index = same - remains.begin();
fraction << fractionStr.substr( 0, index ) << "(" << fractionStr.substr( index, remains.size() - index ) << ")";
break;
}
remains.push_back( remain );
fraction << to_string( remain / denominator );
remain %= denominator;
}
if( !fraction.str().empty() ) ss << "." << fraction.str();
return ss.str();
}
};
// Runtime: 8 ms, faster than 55.57% of C++ online submissions for Fraction to Recurring Decimal.
// Memory Usage: 6.8 MB, less than 46.12% of C++ online submissions for Fraction to Recurring Decimal. | 42.676471 | 133 | 0.548587 | [
"vector"
] |
505e2562057668530d2b8d121c89b1db857ec89e | 8,795 | hpp | C++ | bin/Thread.hpp | xywzwd/VT-Wireless | ec42e742e2be26310df4b25cef9cea873896890b | [
"MIT"
] | 6 | 2019-01-05T08:30:32.000Z | 2022-03-10T08:19:57.000Z | bin/Thread.hpp | xywzwd/VT-Wireless | ec42e742e2be26310df4b25cef9cea873896890b | [
"MIT"
] | 4 | 2019-10-18T14:31:04.000Z | 2020-10-16T16:52:30.000Z | bin/Thread.hpp | xywzwd/VT-Wireless | ec42e742e2be26310df4b25cef9cea873896890b | [
"MIT"
] | 5 | 2017-05-12T21:24:18.000Z | 2022-03-10T08:20:02.000Z |
// This must be a signal that is not caught by the main thread
// in crts_radio.cpp in variable exitSignals[].
//
#define THREAD_EXIT_SIG (SIGUSR2)
// A queue of condition variables.
//
// You might ask why are we writing our on queue and not using
// std:queue<>. The simple answer is that this is much much faster.
// Adding an entry to std::queue requires memory allocation from the heap,
// we get our memory from the function call stack where we push the
// entry on the queue, in Filter::write(). A call to the heap allocator
// has to do a lot of work compared to pretty much none at all here, the
// stack has to be there anyway. Like comparing doing nothing at all to
// doing something. Doing nothing always wins, it's always faster to do
// nothing than something. Doing this is nothing compared to a heap
// allocation (like malloc()), which would be adding a call stack and
// searching a tree or other data structure. This does not even add a
// call on the stack, given these (WriteQueue_push() and WriteQueue_pop())
// are inline functions.
//
struct WriteQueue
{
// This condition variable is paired with the
// Thread::mutex.
pthread_cond_t cond;
struct WriteQueue *next, *prev;
// The request that is queued.
FilterModule *filterModule; // to filter
Input *input;
size_t len;
};
static inline void WriteQueue_push(struct WriteQueue* &queue,
struct WriteQueue *request)
{
DASSERT(!request->next, "");
DASSERT(!request->prev, "");
if(queue && queue->next)
{
// CASE 2: There is 2 or more in the queue
DASSERT(queue->prev, "");
DASSERT(queue->prev != queue, "");
DASSERT(queue->next != queue, "");
request->next = queue;
request->prev = queue->prev;
queue->prev->next = request;
queue->prev = request;
}
else if(queue)
{
// CASE 1: There is 1 in the queue.
DASSERT(!queue->prev, "");
request->next = queue;
request->prev = queue;
queue->next = request;
queue->prev = request;
}
else
{
// CASE 0: There are 0 in the queue
queue = request;
}
}
// Returns a pointer to the WriteQueue that is next in the queue
// or 0 if there is none
static inline struct WriteQueue *WriteQueue_pop(struct WriteQueue* &queue)
{
if(!queue) return 0; // CASE 0: There are 0 in the queue.
struct WriteQueue *ret = queue; // this is returned.
if(queue->next && queue->next != queue->prev)
{
// CASE 3: There are 3 or more in the queue.
// Connect the two adjacent entries.
queue->prev->next = queue->next;
queue->next->prev = queue->prev;
// move to the next in the queue.
queue = queue->next;
// Now we have 1 less in the queue
}
else if(queue->next)
{
// CASE 2: There are just 2 in the queue.
queue = queue->next;
queue->next = 0;
queue->prev = 0;
// Now there is 1 in the queue.
}
else
{
// CASE 1: There is just 1 in the queue.
queue = 0; // We can set a reference.
// Now there are 0 in the queue.
}
return ret;
}
// It groups filters with a running thread. There is
// a current filter that the thread is calling CRTSFilter::write()
// with and may be other filters that will be used.
//
// There can be many filter modules associated with a given Thread.
// This is just a wrapper of a pthread and it's associated thread
// synchronization primitives, and a little more stuff.
class Thread
{
public:
// Launch the pthread via pthread_create()
//
// We separated starting the thread from the constructor so that
// the user can look at the connection and thread topology before
// starting the threads. The thread callback function is called
// and all the threads in all streams will barrier at the top of
// the thread callback.
//
// barrier must be initialized to the correct number of threads
// plus any number of added barrier calls.
//
// This call doe not handle mutex or w/r locking.
//
void launch(pthread_barrier_t *barrier);
inline void addFilterModule(FilterModule *f)
{
DASSERT(f, "");
filterModules.push_back(f);
f->thread = this;
};
// This call doe not handle mutex or w/r locking.
//
inline size_t removeFilterModule(FilterModule *f)
{
DASSERT(f, "");
filterModules.push_back(f);
f->thread = 0;
delete f;
return filterModules.size();
};
// Returns the total number of existing thread objects in all streams.
static inline size_t getTotalNumThreads(void)
{
return totalNumThreads;
}
void join(void);
Thread(Stream *stream);
// This will pthread_join() after setting a running flag.
~Thread();
pthread_t thread;
pthread_cond_t cond;
pthread_mutex_t mutex;
// We let the main thread be 0 and this starts at 1
// This is fixed after the object creation.
// This is mostly so we can see small thread numbers like
// 0, 1, 2, 3, ... 8 whatever, not like 23431, 5634, ...
uint32_t threadNum;
// Number of these objects created.
static uint32_t createCount;
static pthread_t mainThread;
// This barrier gets passed at launch().
pthread_barrier_t *barrier;
// stream is the fixed/associated Stream which contains all filter
// modules, some may not be in the Thread::filtermodules list. A
// stream can have many threads. threads are not shared across
// Streams.
//
Stream &stream;
// At each loop we may reset the input and len,
// to call filterModule->filter->write(len, channel);
/////////////////////////////////////////////////////////////
// All Thread data below here is changing data.
// We must have the mutex just above to access these:
/////////////////////////////////////////////////////////////
// This is set if another thread is blocked by this thread
// and is waiting in a Filtermodule::write() call. The other
// thread will set this flag and call pthread_cond_wait()
// and the thread of this object will signal it.
//
// An ordered queue, first come, first serve.
//std::queue<pthread_cond_t *> writeQueue;
struct WriteQueue *writeQueue;
// We have two cases, blocks of code, when this thread is not
// holding the mutex lock:
//
// 1) in the block that calls CRTSFilter::write()
//
// 2) in the pthread_cond_wait() call
//
// We need this flag so we know which block of code the thread is
// in from the main thread, otherwise we'll call
// pthread_cond_signal() when it is not necessary.
//
//
// TODO: Does calling pthread_cond_signal() when there are no
// listeners make a mode switch, or use much system resources?
// I would think checking a flag uses less resources than
// calling pthread_cond_signal() when there is no listener.
// It adds a function call or two to the stack and that must be
// more work than checking a flag. If it adds a mode switch than
// this flags adds huge resource savings.
//
bool threadWaiting; // thread calling pthread_cond_wait(cond, mutex)
// All the filter modules that this thread can call
// CRTSFilter::write() for. Only this thread pthread is allowed
// to change this list after the startup barrier. This list may
// only be changed if this thread has the stream::mutex lock in
// addition to the this objects Thread mutex lock.
std::list<FilterModule*> filterModules;
bool hasReturned; // the thread returned from its callback
// The Filter module that will have it's CRTSFilter::write() called
// next. Set to 0 if this is none.
FilterModule *filterModule;
// We get buffer from reader that is part of the
// filter that is writing.
// buffer, len, channelNum are for calling
// CRTSFilter::write(buffer, len, channelNum)
//
Input *input; // input channel to get --> buffer
// Buffer length that can be read by filter
size_t len;
private:
static size_t totalNumThreads; // total all threads in all streams.
};
| 33.826923 | 78 | 0.604093 | [
"object"
] |
505f8f75aebaa50b0077df3a97d351eba5a1d794 | 14,461 | cpp | C++ | Modules-old/openni/lua_openni.cpp | ToyotaResearchInstitute/rad-robot | 9a47e4d88382719ab9bf142932fbcc83dcbcd665 | [
"MIT"
] | null | null | null | Modules-old/openni/lua_openni.cpp | ToyotaResearchInstitute/rad-robot | 9a47e4d88382719ab9bf142932fbcc83dcbcd665 | [
"MIT"
] | null | null | null | Modules-old/openni/lua_openni.cpp | ToyotaResearchInstitute/rad-robot | 9a47e4d88382719ab9bf142932fbcc83dcbcd665 | [
"MIT"
] | 2 | 2018-06-04T12:38:54.000Z | 2018-09-22T10:31:27.000Z | /*****************************************************************************
* *
* OpenNI 2.x Alpha *
* Copyright (C) 2012 PrimeSense Ltd. *
* *
* This file is part of OpenNI. *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
* *
*****************************************************************************/
/*
Lua Wrapper for some OpenNI2 functionality
(c) Stephen McGill 2013
*/
//#define DEBUG 1
#define MAX_USERS 2 //10 was used before...
#include <stdio.h>
#include <string>
#include <OpenNI.h>
#include <lua.hpp>
#define SAMPLE_READ_WAIT_TIMEOUT 2000 //2000ms
#ifdef USE_NITE_SKELETON
/* User Tracking information */
#include <NiTE.h>
nite::UserTracker *userTracker;
nite::Status niteRc;
// Keep track of the skeletons
bool g_visibleUsers[MAX_USERS] = {false};
nite::SkeletonState g_skeletonStates[MAX_USERS] = {nite::SKELETON_NONE};
nite::SkeletonJoint g_skeletonJoints[MAX_USERS][NITE_JOINT_COUNT];
unsigned long long g_skeletonTime[MAX_USERS];
int use_skeleton = 0;
#endif
/* Device state variables */
//char init = 0;
// Use the right namespace
using namespace openni;
/* Cloud information */
// Establish the streams
VideoStream* m_streams;
VideoStream* depth;
VideoStream* color;
VideoFrameRef* dframe;
VideoFrameRef* cframe;
Device* device = NULL;
Recorder* recorder = NULL;
#ifdef USE_NITE_SKELETON
// Skeleton Updating function
void updateUserState(const nite::UserData& user, unsigned long long ts) {
int user_id = user.getId();
g_visibleUsers[user_id] = user.isVisible();
g_skeletonStates[user_id] = user.getSkeleton().getState();
g_skeletonTime[user_id] = ts;
for(int jj=0;jj<NITE_JOINT_COUNT;jj++)
g_skeletonJoints[user_id][jj] =
user.getSkeleton().getJoint((nite::JointType)jj);
}
static int lua_update_skeleton(lua_State *L) {
nite::UserTrackerFrameRef userTrackerFrame;
niteRc = userTracker->readFrame(&userTrackerFrame);
if (niteRc != nite::STATUS_OK)
return luaL_error(L, "NiTE readFrame failed!\n" );
const nite::Array<nite::UserData>& users = userTrackerFrame.getUsers();
for (int i = 0; i < users.getSize(); ++i)
{
const nite::UserData& user = users[i];
updateUserState(user,userTrackerFrame.getTimestamp());
if (user.isNew())
{
userTracker->startSkeletonTracking(user.getId());
}
else if (user.getSkeleton().getState() == nite::SKELETON_TRACKED)
{
#ifdef DEBUG
const nite::SkeletonJoint& head = user.getSkeleton().getJoint(nite::JOINT_HEAD);
if (head.getPositionConfidence() > .5)
printf("%d. (%5.2f, %5.2f, %5.2f)\n", user.getId(), head.getPosition().x, head.getPosition().y, head.getPosition().z);
#endif
}
}
// http://lua-users.org/wiki/SimpleLuaApiExample
// Begin to return data
//lua_newtable(L);
lua_createtable(L, MAX_USERS, 0);
for(int u = 1; u <= MAX_USERS; u++) {
//printf("setting %d: %d\n", u, (int)g_visibleUsers[u-1] );
//lua_pushnumber(L, u); /* Push the table index */
lua_pushboolean(L, g_visibleUsers[u-1] ); /* Push the cell value */
//lua_rawset(L, -3); /* Stores the pair in the table */
lua_rawseti(L, -2, u);
}
return 1;
}
static int lua_enable_skeleton(lua_State *L) {
use_skeleton = 1;
return 0;
}
static int lua_disable_skeleton(lua_State *L) {
use_skeleton = 0;
return 0;
}
// Get a single joint
static int lua_retrieve_joint(lua_State *L) {
int user_id = luaL_checkint( L, 1 );
int joint_id = luaL_checkint( L, 2 );
if( joint_id>NITE_JOINT_COUNT || user_id>MAX_USERS ){
#ifdef DEBUG
printf("User %d. Joint %d.\n",user_id,joint_id);
#endif
return luaL_error(L, "Joint or user out of range!\n" );
}
// Get the joint
nite::SkeletonJoint j = g_skeletonJoints[user_id-1][joint_id-1];
nite::Quaternion q = j.getOrientation();
// Return the result as a single table
//lua_newtable(L);
lua_createtable(L, 0, 5);
// Position table (in meters)
lua_pushstring(L, "position");
lua_createtable(L, 3, 0);
lua_pushnumber(L, j.getPosition().x);
lua_rawseti(L, -2, 1);
lua_pushnumber(L, j.getPosition().y);
lua_rawseti(L, -2, 2);
lua_pushnumber(L, j.getPosition().z);
lua_rawseti(L, -2, 3);
lua_settable(L, -3);
// Orientation table (as a quaternion)
lua_pushstring(L, "orientation");
lua_createtable(L, 4, 0);
lua_pushnumber(L, q.w);
lua_rawseti(L, -2, 1);
lua_pushnumber(L, q.x);
lua_rawseti(L, -2, 2);
lua_pushnumber(L, q.y);
lua_rawseti(L, -2, 3);
lua_pushnumber(L, q.z);
lua_rawseti(L, -2, 4);
lua_settable(L, -3);
//lua_rawset(L, -3);
// Confidence
lua_pushnumber(L,j.getPositionConfidence());
lua_setfield(L, -2, "position_confidence");
lua_pushnumber(L, j.getOrientationConfidence());
lua_setfield(L, -2, "orientation_confidence");
// Timestamp
//http://www.lua.org/pil/2.3.html
lua_pushnumber(L,g_skeletonTime[user_id-1]);
lua_setfield(L, -2, "timestamp");
// Returning a single table
return 1;
}
#endif
static int lua_startup(lua_State *L) {
#ifdef DEBUG
fprintf(stdout,"Starting up!\n");
fflush(stdout);
#endif
/*
if(init==1){
return luaL_error(L, "Two OpenNI devices not supported yet.\n" );
}
*/
/* Initialize the device*/
// Should we record? play back? Read from a device?
const char *file_uri = luaL_optstring(L, 1, NULL);
const char *logmode = luaL_optstring(L, 2, NULL); // TODO: Add time and date
#ifdef DEBUG
fprintf(stdout,"Grabbed input...\n");
fflush(stdout);
if(file_uri){
fprintf(stdout,"Accessing a log file...\n");
} else {
fprintf(stdout,"Accessing a physical device...\n");
}
if( logmode ){
fprintf(stdout,"Recording log files...\n");
} else {
fprintf(stdout,"Not recording log file...\n");
}
fflush(stdout);
#endif
// Setup device
Status rc;
#ifdef DEBUG
fprintf(stdout,"Initializing...\n");
fflush(stdout);
#endif
rc = OpenNI::initialize();
#ifdef DEBUG
fprintf(stdout,"New Device...\n");
fflush(stdout);
#endif
device = new Device();
#ifdef DEBUG
fprintf(stdout,"Checking Device status...\n");
fflush(stdout);
#endif
if (rc != STATUS_OK)
return luaL_error(L,"OpenNI failed\n%s\n",OpenNI::getExtendedError());
if( file_uri!=NULL && logmode==NULL )
rc = device->open( file_uri );
else
rc = device->open(ANY_DEVICE);
if (rc != STATUS_OK){
return luaL_error(L,"Device failed\n%s\n",OpenNI::getExtendedError());
}
#ifdef DEBUG
fprintf(stdout,"Starting streams...\n");
fflush(stdout);
#endif
m_streams = new VideoStream[2];
#ifdef DEBUG
printf("Pointer: %x\n", &m_streams);
fflush(stdout);
#endif
depth = &m_streams[0];
color = &m_streams[1];
dframe = new VideoFrameRef;
cframe = new VideoFrameRef;
// Setup depth
#ifdef DEBUG
fprintf(stdout,"Create depth stream...\n");
fflush(stdout);
#endif
if (device->getSensorInfo(SENSOR_DEPTH) == NULL)
return luaL_error(L,"No depth sensor\n%s\n", OpenNI::getExtendedError());
rc = depth->create(*device, SENSOR_DEPTH);
/*
openni::VideoMode mode = Stream.getVideoMode();
mode.setResolution(resolution_x, resolution_y);
mode.setFps(FPS);
Stream.setVideoMode(mode);
Stream.setMirroringEnabled(false);
*/
#ifdef DEBUG
fprintf(stdout,"Start depth stream...\n");
fflush(stdout);
#endif
if (rc != STATUS_OK)
return luaL_error(L,"Depth create\n%s\n", OpenNI::getExtendedError());
rc = depth->start();
if (rc != STATUS_OK){
depth->destroy();
return luaL_error(L,"Depth start\n%s\n", OpenNI::getExtendedError());
}
#ifdef DEBUG
fprintf(stdout,"Create Color stream...\n");
fflush(stdout);
#endif
// Setup color
if (device->getSensorInfo(SENSOR_COLOR) == NULL){
return luaL_error(L,"No color sensor\n%s\n", OpenNI::getExtendedError());
}
rc = color->create( *device, SENSOR_COLOR);
if (rc != STATUS_OK){
return luaL_error(L,"Color create\n%s\n", OpenNI::getExtendedError());
}
#ifdef DEBUG
fprintf(stdout,"Start color stream...\n");
fflush(stdout);
#endif
rc = color->start();
if (rc != STATUS_OK) {
color->destroy();
return luaL_error(L,"Color start\n%s\n", OpenNI::getExtendedError());
}
// Begin recording
if(file_uri!=NULL && logmode!=NULL ){
#ifdef DEBUG
fprintf(stdout,"Create recorder...\n");
fflush(stdout);
#endif
recorder = new Recorder();
recorder->create( file_uri );
#ifdef DEBUG
fprintf(stdout,"Check valid recorder...\n");
fflush(stdout);
#endif
if( recorder->isValid() ){
#ifdef DEBUG
fprintf(stdout,"Attach recorder...\n");
fflush(stdout);
#endif
recorder->attach( *depth );
recorder->attach( *color );
recorder->start();
}
}
#ifdef USE_NITE_SKELETON
#ifdef DEBUG
fprintf(stdout,"Begin NiTE...\n");
fflush(stdout);
#endif
/* Initialize the Skeleton Tracking system */
if(use_skeleton==1){
nite::NiTE::initialize();
userTracker = new nite::UserTracker;
niteRc = userTracker->create( device );
if (niteRc != nite::STATUS_OK)
return luaL_error(L, "Couldn't create user tracker!\n" );
}
// Push the number of users to be tracked
if(use_skeleton==1){
lua_pushinteger( L, MAX_USERS );
} else {
lua_pushinteger( L, 0 );
}
#else
lua_pushinteger( L, 0 );
#endif
#ifdef DEBUG
fprintf(stdout, "%s", OpenNI::getExtendedError());
fflush(stdout);
#endif
//init = 1;
return 1;
}
static int lua_stream_info(lua_State *L) {
// Depth
VideoMode dmode = depth->getVideoMode();
int resX = dmode.getResolutionX();
int resY = dmode.getResolutionY();
int fps = dmode.getFps();
lua_newtable(L);
lua_pushstring(L, "name");
lua_pushstring(L, "depth");
lua_rawset(L, -3);
lua_pushstring(L, "width");
lua_pushnumber(L, resX);
lua_rawset(L, -3);
lua_pushstring(L, "height");
lua_pushnumber(L, resY);
lua_rawset(L, -3);
lua_pushstring(L, "fps");
lua_pushnumber(L, fps);
lua_rawset(L, -3);
lua_pushstring(L, "bpp");
lua_pushnumber(L, 2);
lua_rawset(L, -3);
// Color
VideoMode cmode = color->getVideoMode();
resX = cmode.getResolutionX();
resY = cmode.getResolutionY();
fps = cmode.getFps();
lua_newtable(L);
lua_pushstring(L, "name");
lua_pushstring(L, "color");
lua_rawset(L, -3);
lua_pushstring(L, "width");
lua_pushnumber(L,resX);
lua_rawset(L, -3);
lua_pushstring(L, "height");
lua_pushnumber(L,resY);
lua_rawset(L, -3);
lua_pushstring(L, "fps");
lua_pushnumber(L,fps);
lua_rawset(L, -3);
lua_pushstring(L, "bpp");
lua_pushnumber(L, 3);
lua_rawset(L, -3);
return 2;
}
static int lua_update_rgbd(lua_State *L) {
int readyStream = -1;
Status rc;
#ifdef DEBUG
printf("Pointer: %x\n", &m_streams);
fflush(stdout);
#endif
#ifdef DEBUG
printf("waiting...\n");
#endif
rc = OpenNI::waitForAnyStream( &m_streams, 2, &readyStream);
if (rc != STATUS_OK) {
return luaL_error(L, OpenNI::getExtendedError() );
}
#ifdef DEBUG
printf("reading...\n");
#endif
depth->readFrame( dframe );
color->readFrame( cframe );
lua_pushlightuserdata( L, (void*)(dframe->getData()) );
lua_pushlightuserdata( L, (void*)(cframe->getData()) );
/*
switch (readyStream)
{
case 0:
// Depth
#ifdef DEBUG
printf("read dframe\n");
#endif
depth->readFrame( dframe );
lua_pushlightuserdata( L, (void*)(dframe->getData()) );
lua_pushnumber(L, 0);
break;
case 1:
// Color
#ifdef DEBUG
printf("read cframe\n");
#endif
color->readFrame( cframe );
lua_pushlightuserdata( L, (void*)(cframe->getData()) );
lua_pushnumber(L, 1);
break;
default:
printf("Unxpected stream\n");
}
*/
/*
lua_pushlstring( L, (char*)(dframe->getData()), 320*240*2 );
lua_pushlstring( L, (char*)(cframe->getData()), 320*240*3 );
*/
return 2;
}
static int lua_skeleton_shutdown(lua_State *L) {
//if(init==0) return luaL_error(L, "Cannot shutdown an uninitialized object!\n" );
// Kill the recorder if being used
if( recorder && recorder->isValid()==1 ){
recorder->stop();
recorder->destroy();
}
#ifdef DEBUG
printf("Done shutting down the recorder\n");
fflush(stdout);
#endif
// Shutoff the streams
color->stop();
color->destroy();
#ifdef DEBUG
printf("Done shutting down the color stream\n");
fflush(stdout);
#endif
depth->stop();
depth->destroy();
#ifdef DEBUG
printf("Done shutting down the depth stream\n");
fflush(stdout);
#endif
#ifdef USE_NITE_SKELETON
// Shutdown the NiTE and OpenNI systems
if(use_skeleton==1){ nite::NiTE::shutdown(); }
#endif
#ifdef DEBUG
printf("Done shutting down NiTE\n");
fflush(stdout);
#endif
openni::OpenNI::shutdown();
#ifdef DEBUG
printf("Done shutting down OpenNI\n");
fflush(stdout);
#endif
// Device is closed by the C++ destructor //http://www.openni.org/wp-content/doxygen/html/classopenni_1_1_device.html#a1804e9fe6cd46185f762d01e8d949518
device->close();
#ifdef DEBUG
printf("Done shutting down the device\n");
fflush(stdout);
#endif
//init = 0;
lua_pushboolean(L,1);
return 1;
}
static const struct luaL_Reg openni_lib [] = {
{"startup", lua_startup},
{"stream_info", lua_stream_info},
{"update_rgbd", lua_update_rgbd},
{"shutdown", lua_skeleton_shutdown},
#ifdef USE_NITE_SKELETON
{"enable_skeleton", lua_enable_skeleton},
{"disable_skeleton", lua_disable_skeleton},
{"update_skeleton", lua_update_skeleton},
{"joint", lua_retrieve_joint},
#endif
{NULL, NULL}
};
extern "C" int luaopen_openni(lua_State *L) {
#if LUA_VERSION_NUM == 502
luaL_newlib( L, openni_lib );
#else
luaL_register(L, "openni", openni_lib);
#endif
return 1;
}
| 24.97582 | 152 | 0.644077 | [
"object"
] |
5064d1dadafd0bb47a2f6f9b2d8efc20916e10d3 | 14,638 | hpp | C++ | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_rptiming_tmg_oper.hpp | CiscoDevNet/ydk-cpp | ef7d75970f2ef1154100e0f7b0a2ee823609b481 | [
"ECL-2.0",
"Apache-2.0"
] | 17 | 2016-12-02T05:45:49.000Z | 2022-02-10T19:32:54.000Z | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_rptiming_tmg_oper.hpp | CiscoDevNet/ydk-cpp | ef7d75970f2ef1154100e0f7b0a2ee823609b481 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2017-03-27T15:22:38.000Z | 2019-11-05T08:30:16.000Z | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_rptiming_tmg_oper.hpp | CiscoDevNet/ydk-cpp | ef7d75970f2ef1154100e0f7b0a2ee823609b481 | [
"ECL-2.0",
"Apache-2.0"
] | 11 | 2016-12-02T05:45:52.000Z | 2019-11-07T08:28:17.000Z | #ifndef _CISCO_IOS_XR_RPTIMING_TMG_OPER_
#define _CISCO_IOS_XR_RPTIMING_TMG_OPER_
#include <memory>
#include <vector>
#include <string>
#include <ydk/types.hpp>
#include <ydk/errors.hpp>
namespace cisco_ios_xr {
namespace Cisco_IOS_XR_rptiming_tmg_oper {
class TimingCard : public ydk::Entity
{
public:
TimingCard();
~TimingCard();
bool has_data() const override;
bool has_operation() const override;
std::vector<std::pair<std::string, ydk::LeafData> > get_name_leaf_data() const override;
std::string get_segment_path() const override;
std::shared_ptr<ydk::Entity> get_child_by_name(const std::string & yang_name, const std::string & segment_path) override;
void set_value(const std::string & value_path, const std::string & value, const std::string & name_space, const std::string & name_space_prefix) override;
void set_filter(const std::string & value_path, ydk::YFilter yfliter) override;
std::map<std::string, std::shared_ptr<ydk::Entity>> get_children() const override;
bool has_leaf_or_child_of_name(const std::string & name) const override;
std::shared_ptr<ydk::Entity> clone_ptr() const override;
ydk::augment_capabilities_function get_augment_capabilities_function() const override;
std::string get_bundle_yang_models_location() const override;
std::string get_bundle_name() const override;
std::map<std::pair<std::string, std::string>, std::string> get_namespace_identity_lookup() const override;
class Nodes; //type: TimingCard::Nodes
std::shared_ptr<cisco_ios_xr::Cisco_IOS_XR_rptiming_tmg_oper::TimingCard::Nodes> nodes;
}; // TimingCard
class TimingCard::Nodes : public ydk::Entity
{
public:
Nodes();
~Nodes();
bool has_data() const override;
bool has_operation() const override;
std::vector<std::pair<std::string, ydk::LeafData> > get_name_leaf_data() const override;
std::string get_segment_path() const override;
std::shared_ptr<ydk::Entity> get_child_by_name(const std::string & yang_name, const std::string & segment_path) override;
void set_value(const std::string & value_path, const std::string & value, const std::string & name_space, const std::string & name_space_prefix) override;
void set_filter(const std::string & value_path, ydk::YFilter yfliter) override;
std::map<std::string, std::shared_ptr<ydk::Entity>> get_children() const override;
bool has_leaf_or_child_of_name(const std::string & name) const override;
std::string get_absolute_path() const override;
class Node; //type: TimingCard::Nodes::Node
ydk::YList node;
}; // TimingCard::Nodes
class TimingCard::Nodes::Node : public ydk::Entity
{
public:
Node();
~Node();
bool has_data() const override;
bool has_operation() const override;
std::vector<std::pair<std::string, ydk::LeafData> > get_name_leaf_data() const override;
std::string get_segment_path() const override;
std::shared_ptr<ydk::Entity> get_child_by_name(const std::string & yang_name, const std::string & segment_path) override;
void set_value(const std::string & value_path, const std::string & value, const std::string & name_space, const std::string & name_space_prefix) override;
void set_filter(const std::string & value_path, ydk::YFilter yfliter) override;
std::map<std::string, std::shared_ptr<ydk::Entity>> get_children() const override;
bool has_leaf_or_child_of_name(const std::string & name) const override;
std::string get_absolute_path() const override;
ydk::YLeaf node_name; //type: string
class InputClock; //type: TimingCard::Nodes::Node::InputClock
class Pll; //type: TimingCard::Nodes::Node::Pll
std::shared_ptr<cisco_ios_xr::Cisco_IOS_XR_rptiming_tmg_oper::TimingCard::Nodes::Node::InputClock> input_clock;
std::shared_ptr<cisco_ios_xr::Cisco_IOS_XR_rptiming_tmg_oper::TimingCard::Nodes::Node::Pll> pll;
}; // TimingCard::Nodes::Node
class TimingCard::Nodes::Node::InputClock : public ydk::Entity
{
public:
InputClock();
~InputClock();
bool has_data() const override;
bool has_operation() const override;
std::vector<std::pair<std::string, ydk::LeafData> > get_name_leaf_data() const override;
std::string get_segment_path() const override;
std::shared_ptr<ydk::Entity> get_child_by_name(const std::string & yang_name, const std::string & segment_path) override;
void set_value(const std::string & value_path, const std::string & value, const std::string & name_space, const std::string & name_space_prefix) override;
void set_filter(const std::string & value_path, ydk::YFilter yfliter) override;
std::map<std::string, std::shared_ptr<ydk::Entity>> get_children() const override;
bool has_leaf_or_child_of_name(const std::string & name) const override;
ydk::YLeaf ic1_valid; //type: boolean
ydk::YLeaf ic2_valid; //type: boolean
ydk::YLeaf ic3_valid; //type: boolean
ydk::YLeaf ic4_valid; //type: boolean
ydk::YLeaf ic5_valid; //type: boolean
ydk::YLeaf ic6_valid; //type: boolean
ydk::YLeaf ic7_valid; //type: boolean
ydk::YLeaf ic8_valid; //type: boolean
ydk::YLeaf ic9_valid; //type: boolean
ydk::YLeaf ic10_valid; //type: boolean
ydk::YLeaf ic11_valid; //type: boolean
ydk::YLeaf ic1_slot; //type: string
ydk::YLeaf ic2_slot; //type: string
ydk::YLeaf ic3_slot; //type: string
ydk::YLeaf ic4_slot; //type: string
ydk::YLeaf ic5_slot; //type: string
ydk::YLeaf ic6_slot; //type: string
ydk::YLeaf ic7_slot; //type: string
ydk::YLeaf ic8_slot; //type: string
ydk::YLeaf ic9_slot; //type: string
ydk::YLeaf ic10_slot; //type: string
ydk::YLeaf ic11_slot; //type: string
ydk::YLeaf ic1_split_xom; //type: string
ydk::YLeaf ic2_split_xom; //type: string
ydk::YLeaf ic3_split_xom; //type: string
ydk::YLeaf ic4_split_xom; //type: string
ydk::YLeaf ic5_split_xom; //type: string
ydk::YLeaf ic6_split_xom; //type: string
ydk::YLeaf ic7_split_xom; //type: string
ydk::YLeaf ic8_split_xom; //type: string
ydk::YLeaf ic9_split_xom; //type: string
ydk::YLeaf ic10_split_xom; //type: string
ydk::YLeaf ic11_split_xom; //type: string
ydk::YLeaf ic1_eppsm; //type: string
ydk::YLeaf ic2_eppsm; //type: string
ydk::YLeaf ic3_eppsm; //type: string
ydk::YLeaf ic4_eppsm; //type: string
ydk::YLeaf ic5_eppsm; //type: string
ydk::YLeaf ic6_eppsm; //type: string
ydk::YLeaf ic7_eppsm; //type: string
ydk::YLeaf ic8_eppsm; //type: string
ydk::YLeaf ic9_eppsm; //type: string
ydk::YLeaf ic10_eppsm; //type: string
ydk::YLeaf ic11_eppsm; //type: string
ydk::YLeaf ic1_pfm; //type: string
ydk::YLeaf ic2_pfm; //type: string
ydk::YLeaf ic3_pfm; //type: string
ydk::YLeaf ic4_pfm; //type: string
ydk::YLeaf ic5_pfm; //type: string
ydk::YLeaf ic6_pfm; //type: string
ydk::YLeaf ic7_pfm; //type: string
ydk::YLeaf ic8_pfm; //type: string
ydk::YLeaf ic9_pfm; //type: string
ydk::YLeaf ic10_pfm; //type: string
ydk::YLeaf ic11_pfm; //type: string
ydk::YLeaf ic1_gst; //type: string
ydk::YLeaf ic2_gst; //type: string
ydk::YLeaf ic3_gst; //type: string
ydk::YLeaf ic4_gst; //type: string
ydk::YLeaf ic5_gst; //type: string
ydk::YLeaf ic6_gst; //type: string
ydk::YLeaf ic7_gst; //type: string
ydk::YLeaf ic8_gst; //type: string
ydk::YLeaf ic9_gst; //type: string
ydk::YLeaf ic10_gst; //type: string
ydk::YLeaf ic11_gst; //type: string
ydk::YLeaf ic1_cfm; //type: string
ydk::YLeaf ic2_cfm; //type: string
ydk::YLeaf ic3_cfm; //type: string
ydk::YLeaf ic4_cfm; //type: string
ydk::YLeaf ic5_cfm; //type: string
ydk::YLeaf ic6_cfm; //type: string
ydk::YLeaf ic7_cfm; //type: string
ydk::YLeaf ic8_cfm; //type: string
ydk::YLeaf ic9_cfm; //type: string
ydk::YLeaf ic10_cfm; //type: string
ydk::YLeaf ic11_cfm; //type: string
ydk::YLeaf ic1_scm; //type: string
ydk::YLeaf ic2_scm; //type: string
ydk::YLeaf ic3_scm; //type: string
ydk::YLeaf ic4_scm; //type: string
ydk::YLeaf ic5_scm; //type: string
ydk::YLeaf ic6_scm; //type: string
ydk::YLeaf ic7_scm; //type: string
ydk::YLeaf ic8_scm; //type: string
ydk::YLeaf ic9_scm; //type: string
ydk::YLeaf ic10_scm; //type: string
ydk::YLeaf ic11_scm; //type: string
ydk::YLeaf ic1_los; //type: string
ydk::YLeaf ic2_los; //type: string
ydk::YLeaf ic3_los; //type: string
ydk::YLeaf ic4_los; //type: string
ydk::YLeaf ic5_los; //type: string
ydk::YLeaf ic6_los; //type: string
ydk::YLeaf ic7_los; //type: string
ydk::YLeaf ic8_los; //type: string
ydk::YLeaf ic9_los; //type: string
ydk::YLeaf ic10_los; //type: string
ydk::YLeaf ic11_los; //type: string
}; // TimingCard::Nodes::Node::InputClock
class TimingCard::Nodes::Node::Pll : public ydk::Entity
{
public:
Pll();
~Pll();
bool has_data() const override;
bool has_operation() const override;
std::vector<std::pair<std::string, ydk::LeafData> > get_name_leaf_data() const override;
std::string get_segment_path() const override;
std::shared_ptr<ydk::Entity> get_child_by_name(const std::string & yang_name, const std::string & segment_path) override;
void set_value(const std::string & value_path, const std::string & value, const std::string & name_space, const std::string & name_space_prefix) override;
void set_filter(const std::string & value_path, ydk::YFilter yfliter) override;
std::map<std::string, std::shared_ptr<ydk::Entity>> get_children() const override;
bool has_leaf_or_child_of_name(const std::string & name) const override;
ydk::YLeaf t0_pll_state; //type: string
ydk::YLeaf t4_pll_state; //type: string
ydk::YLeaf ptp_pll_state; //type: string
ydk::YLeaf t0_pll_selected; //type: string
ydk::YLeaf t4_pll_selected; //type: string
ydk::YLeaf ptp_pll_selected; //type: string
ydk::YLeaf t0_pll_mode; //type: string
ydk::YLeaf t4_pll_mode; //type: string
ydk::YLeaf ptp_pll_mode; //type: string
ydk::YLeaf t0_pll_ic1_prio; //type: uint8
ydk::YLeaf t0_pll_ic2_prio; //type: uint8
ydk::YLeaf t0_pll_ic3_prio; //type: uint8
ydk::YLeaf t0_pll_ic4_prio; //type: uint8
ydk::YLeaf t0_pll_ic5_prio; //type: uint8
ydk::YLeaf t0_pll_ic6_prio; //type: uint8
ydk::YLeaf t0_pll_ic7_prio; //type: uint8
ydk::YLeaf t0_pll_ic8_prio; //type: uint8
ydk::YLeaf t0_pll_ic9_prio; //type: uint8
ydk::YLeaf t0_pll_ic10_prio; //type: uint8
ydk::YLeaf t0_pll_ic11_prio; //type: uint8
ydk::YLeaf t4_pll_ic1_prio; //type: uint8
ydk::YLeaf t4_pll_ic2_prio; //type: uint8
ydk::YLeaf t4_pll_ic3_prio; //type: uint8
ydk::YLeaf t4_pll_ic4_prio; //type: uint8
ydk::YLeaf t4_pll_ic5_prio; //type: uint8
ydk::YLeaf t4_pll_ic6_prio; //type: uint8
ydk::YLeaf t4_pll_ic7_prio; //type: uint8
ydk::YLeaf t4_pll_ic8_prio; //type: uint8
ydk::YLeaf t4_pll_ic9_prio; //type: uint8
ydk::YLeaf t4_pll_ic10_prio; //type: uint8
ydk::YLeaf t4_pll_ic11_prio; //type: uint8
ydk::YLeaf ptp_pll_ic1_prio; //type: uint8
ydk::YLeaf ptp_pll_ic2_prio; //type: uint8
ydk::YLeaf ptp_pll_ic3_prio; //type: uint8
ydk::YLeaf ptp_pll_ic4_prio; //type: uint8
ydk::YLeaf ptp_pll_ic5_prio; //type: uint8
ydk::YLeaf ptp_pll_ic6_prio; //type: uint8
ydk::YLeaf ptp_pll_ic7_prio; //type: uint8
ydk::YLeaf ptp_pll_ic8_prio; //type: uint8
ydk::YLeaf ptp_pll_ic9_prio; //type: uint8
ydk::YLeaf ptp_pll_ic10_prio; //type: uint8
ydk::YLeaf ptp_pll_ic11_prio; //type: uint8
ydk::YLeaf ic1_valid; //type: boolean
ydk::YLeaf ic2_valid; //type: boolean
ydk::YLeaf ic3_valid; //type: boolean
ydk::YLeaf ic4_valid; //type: boolean
ydk::YLeaf ic5_valid; //type: boolean
ydk::YLeaf ic6_valid; //type: boolean
ydk::YLeaf ic7_valid; //type: boolean
ydk::YLeaf ic8_valid; //type: boolean
ydk::YLeaf ic9_valid; //type: boolean
ydk::YLeaf ic10_valid; //type: boolean
ydk::YLeaf ic11_valid; //type: boolean
ydk::YLeaf t0_pll_freq_offset; //type: int32
ydk::YLeaf t4_pll_freq_offset; //type: int32
ydk::YLeaf ptp_pll_freq_offset; //type: int32
ydk::YLeaf t0_pll_bandwidth; //type: string
ydk::YLeaf t4_pll_bandwidth; //type: string
ydk::YLeaf ptp_pll_bandwidth; //type: string
ydk::YLeaf t0_pll_psl; //type: string
ydk::YLeaf t4_pll_psl; //type: string
ydk::YLeaf ptp_pll_psl; //type: string
ydk::YLeaf ic1_qual_min; //type: string
ydk::YLeaf ic1_qual_max; //type: string
ydk::YLeaf ic2_qual_min; //type: string
ydk::YLeaf ic2_qual_max; //type: string
ydk::YLeaf ic3_qual_min; //type: string
ydk::YLeaf ic3_qual_max; //type: string
ydk::YLeaf ic4_qual_min; //type: string
ydk::YLeaf ic4_qual_max; //type: string
ydk::YLeaf ic5_qual_min; //type: string
ydk::YLeaf ic5_qual_max; //type: string
ydk::YLeaf ic6_qual_min; //type: string
ydk::YLeaf ic6_qual_max; //type: string
ydk::YLeaf ic7_qual_min; //type: string
ydk::YLeaf ic7_qual_max; //type: string
ydk::YLeaf ic8_qual_min; //type: string
ydk::YLeaf ic8_qual_max; //type: string
ydk::YLeaf ic9_qual_min; //type: string
ydk::YLeaf ic9_qual_max; //type: string
ydk::YLeaf ic10_qual_min; //type: string
ydk::YLeaf ic10_qual_max; //type: string
ydk::YLeaf ic11_qual_min; //type: string
ydk::YLeaf ic11_qual_max; //type: string
}; // TimingCard::Nodes::Node::Pll
}
}
#endif /* _CISCO_IOS_XR_RPTIMING_TMG_OPER_ */
| 45.74375 | 162 | 0.647766 | [
"vector"
] |
506905bba2c15afaa0f1ce5e3fdaf5c8eb46b9e6 | 829 | cpp | C++ | ALGORITHMS/Dynamic Programming/DP_25_Buy_And_Sell_Infi_Transaction_Fee.cpp | compl3xX/ROAD-TO-DSA | 2261c112135a51d9d88c4b57e6f062f6b32550a7 | [
"MIT"
] | null | null | null | ALGORITHMS/Dynamic Programming/DP_25_Buy_And_Sell_Infi_Transaction_Fee.cpp | compl3xX/ROAD-TO-DSA | 2261c112135a51d9d88c4b57e6f062f6b32550a7 | [
"MIT"
] | null | null | null | ALGORITHMS/Dynamic Programming/DP_25_Buy_And_Sell_Infi_Transaction_Fee.cpp | compl3xX/ROAD-TO-DSA | 2261c112135a51d9d88c4b57e6f062f6b32550a7 | [
"MIT"
] | null | null | null | #include <iostream>
#include <vector>
using namespace std;
void transactions(vector<int> arr, int fee)
{
int obsp = -arr[0];
int ossp = 0;
for (int i = 1; i < arr.size(); i++)
{
int nbsp = 0;
int nssp = 0;
if (ossp - arr[i] > obsp)
{
nbsp = ossp - arr[i];
}
else
{
nbsp = obsp;
}
if (obsp + arr[i] - fee > ossp)
{
nssp = obsp + arr[i] - fee;
}
else
{
nssp = ossp;
}
obsp = nbsp;
ossp = nssp;
}
cout << ossp;
}
int main()
{
int n;
cin >> n;
vector<int> arr(n, 0);
for (int i = 0; i < arr.size(); i++)
{
cin >> arr[i];
}
int fee;
cin >> fee;
transactions(arr, fee);
return 0;
}
| 15.942308 | 43 | 0.394451 | [
"vector"
] |
50720bd8a7ca4cce26c0dcf2e63a5b998eaaa74c | 2,580 | cxx | C++ | codes/Algorithm/Measurements/MeasurementFor3D.cxx | wuzhuobin/IADE_Analyzer | fa78f5999c820a7cf6bf740080933d84ef8952ca | [
"Apache-2.0"
] | 2 | 2021-01-09T08:13:23.000Z | 2021-04-28T14:16:50.000Z | codes/Algorithm/Measurements/MeasurementFor3D.cxx | wuzhuobin/IADE_Analyzer | fa78f5999c820a7cf6bf740080933d84ef8952ca | [
"Apache-2.0"
] | 8 | 2017-02-09T11:04:13.000Z | 2017-03-22T03:25:12.000Z | codes/Algorithm/Measurements/MeasurementFor3D.cxx | wuzhuobin/IADE_Analyzer | fa78f5999c820a7cf6bf740080933d84ef8952ca | [
"Apache-2.0"
] | null | null | null | #include "MeasurementFor3D.h"
#include <vtkImageAccumulate.h>
#include <vtkSmartPointer.h>
MeasurementFor3D::MeasurementFor3D()
{
this->overlay = NULL;
this->lookupTable = NULL;
this->volumes = NULL;
}
MeasurementFor3D::~MeasurementFor3D()
{
if (this->volumes != NULL) {
delete volumes;
}
}
void MeasurementFor3D::SetInputData(vtkImageData * overlay)
{
this->overlay = overlay;
}
void MeasurementFor3D::SetLookupTable(vtkLookupTable * lookupTable)
{
this->lookupTable = lookupTable;
}
void MeasurementFor3D::Update()
{
if (this->overlay == NULL)
return;
double spacing[3];
int extent[6];
double pixelSize = 1;
int num = lookupTable->GetNumberOfColors();
int* numberOfPixels = new int[num];
if (volumes == NULL) {
volumes = new double[num];
}
overlay->GetSpacing(spacing);
overlay->GetExtent(extent);
// calculate the volume of a single pixel
for (int i = 0; i < 3; ++i) {
pixelSize *= spacing[i];
}
// initialize the numberOfPixels
for (int i = 0; i < num; ++i) {
numberOfPixels[i] = 0;
}
// iterate an overlay to calculate the number of pixels
//for (int i = extent[0]; i < extent[1]; ++i) {
// for (int j = extent[2]; j < extent[3]; ++j) {
// for (int k = extent[4]; k < extent[5]; ++k) {
// double* val = static_cast<double*>(overlay->GetScalarPointer(i, j, k));
// numberOfPixels[int(*val)]++;
// }
// }
//
//}
// using vtkImageAccumulate instead of for loop
vtkSmartPointer<vtkImageAccumulate> imageAccumulate =
vtkSmartPointer<vtkImageAccumulate>::New();
imageAccumulate->SetInputData(overlay);
imageAccumulate->SetComponentExtent(0, num, 0, 0, 0, 0); // #LookupTable
imageAccumulate->SetComponentOrigin(0, 0, 0);
imageAccumulate->SetComponentSpacing(1, 0, 0);
imageAccumulate->Update();
cerr << "numberOfPixels" << endl;
for (int i = 0; i < num ; ++i) {
numberOfPixels[i] = *static_cast<int*>(
imageAccumulate->GetOutput()->GetScalarPointer(i, 0, 0));
cerr << numberOfPixels[i];
}
volumes[0] = 0;
for (int index = 1; index < num; ++index) {
volumes[index] = numberOfPixels[index] * pixelSize;
cout << "3D Measurement " << index <<": \n";
cout << volumes[index] << endl;
if (index > 2) {
volumes[0] += volumes[index];
}
}
delete[] numberOfPixels;
}
double* MeasurementFor3D::GetVolumes()
{
return this->volumes;
}
void MeasurementFor3D::GetVolumes(double * volumes)
{
if (this->volumes == NULL || this->overlay == NULL || this->lookupTable == NULL) {
volumes = NULL;
}
else {
memcpy(volumes, this->volumes, sizeof(double)*this->lookupTable->GetNumberOfColors());
}
}
| 24.571429 | 88 | 0.665891 | [
"3d"
] |
50739bfc5cc2dc9156e691b8b1757b5a0631f608 | 2,174 | cpp | C++ | plugins/wininput/src/cursor/pixmap.cpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | 2 | 2016-01-27T13:18:14.000Z | 2018-05-11T01:11:32.000Z | plugins/wininput/src/cursor/pixmap.cpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | null | null | null | plugins/wininput/src/cursor/pixmap.cpp | cpreh/spacegameengine | 313a1c34160b42a5135f8223ffaa3a31bc075a01 | [
"BSL-1.0"
] | 3 | 2018-05-11T01:11:34.000Z | 2021-04-24T19:47:45.000Z | // Copyright Carl Philipp Reh 2006 - 2019.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <sge/input/exception.hpp>
#include <sge/wininput/cursor/pixmap.hpp>
#include <awl/backends/windows/module_handle.hpp>
#include <awl/backends/windows/system_metrics.hpp>
#include <awl/backends/windows/windows.hpp>
#include <fcppt/literal.hpp>
#include <fcppt/text.hpp>
#include <fcppt/assert/optional_error.hpp>
#include <fcppt/cast/size.hpp>
#include <fcppt/cast/to_unsigned.hpp>
#include <fcppt/math/ceil_div.hpp>
#include <fcppt/config/external_begin.hpp>
#include <limits>
#include <type_traits>
#include <vector>
#include <fcppt/config/external_end.hpp>
sge::wininput::cursor::pixmap::pixmap()
: cursor_(
[]
{
int const cursor_width(awl::backends::windows::system_metrics(SM_CXCURSOR)),
cursor_height(awl::backends::windows::system_metrics(SM_CYCURSOR));
typedef std::vector<BYTE> byte_vector;
static_assert(std::is_unsigned<BYTE>::value, "BYTE should be unsigned");
byte_vector::size_type const size(FCPPT_ASSERT_OPTIONAL_ERROR(fcppt::math::ceil_div(
fcppt::cast::size<byte_vector::size_type>(
fcppt::cast::to_unsigned(cursor_width * cursor_height)),
fcppt::cast::size<byte_vector::size_type>(std::numeric_limits<BYTE>::digits))));
byte_vector const and_values(size, std::numeric_limits<BYTE>::max()),
xor_values(size, fcppt::literal<BYTE>(0u));
return ::CreateCursor(
awl::backends::windows::module_handle(),
0,
0,
cursor_width,
cursor_height,
and_values.data(),
xor_values.data());
}())
{
if (cursor_ == NULL)
throw sge::input::exception(FCPPT_TEXT("CreateCursor() failed!"));
}
sge::wininput::cursor::pixmap::~pixmap() { ::DestroyCursor(cursor_); }
HCURSOR
sge::wininput::cursor::pixmap::get() const { return cursor_; }
| 36.233333 | 96 | 0.644434 | [
"vector"
] |
50895087908f67e597c272940144ecb2c206b9fc | 3,285 | cpp | C++ | Competitive Programming/Heap/Smallest range in K lists.cpp | shreejitverma/GeeksforGeeks | d7bcb166369fffa9a031a258e925b6aff8d44e6c | [
"MIT"
] | 2 | 2022-02-18T05:14:28.000Z | 2022-03-08T07:00:08.000Z | Competitive Programming/Heap/Smallest range in K lists.cpp | shivaniverma1/Competitive-Programming-1 | d7bcb166369fffa9a031a258e925b6aff8d44e6c | [
"MIT"
] | 6 | 2022-01-13T04:31:04.000Z | 2022-03-12T01:06:16.000Z | Competitive Programming/Heap/Smallest range in K lists.cpp | shivaniverma1/Competitive-Programming-1 | d7bcb166369fffa9a031a258e925b6aff8d44e6c | [
"MIT"
] | 2 | 2022-02-14T19:53:53.000Z | 2022-02-18T05:14:30.000Z | /*
https://practice.geeksforgeeks.org/problems/find-smallest-range-containing-elements-from-k-lists/1
Smallest range in K lists
Hard Accuracy: 50.36% Submissions: 11146 Points: 8
Given K sorted lists of integers, KSortedArray[] of size N each. The task is to find the smallest range that includes at least one element from each of the K lists. If more than one such range's are found, return the first such range found.
Example 1:
Input:
N = 5, K = 3
KSortedArray[][] = {{1 3 5 7 9},
{0 2 4 6 8},
{2 3 5 7 11}}
Output: 1 2
Explanation: K = 3
A:[1 3 5 7 9]
B:[0 2 4 6 8]
C:[2 3 5 7 11]
Smallest range is formed by number 1
present in first list and 2 is present
in both 2nd and 3rd list.
Example 2:
Input:
N = 4, K = 3
KSortedArray[][] = {{1 2 3 4},
{5 6 7 8},
{9 10 11 12}}
Output: 4 9
Your Task :
Complete the function findSmallestRange() that receives array , array size n and k as parameters and returns the output range (as a pair in cpp and array of size 2 in java and python)
Expected Time Complexity : O(n * k *log k)
Expected Auxilliary Space : O(k)
Constraints:
1 <= K,N <= 500
0 <= a[ i ] <= 105
*/
// { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
#define N 1000
// } Driver Code Ends
// you are required to complete this function
// function should print the required range
typedef pair<int, pair<int, int> > p;
class Solution
{
public:
pair<int, int> findSmallestRange(int arr[][N], int n, int k)
{
priority_queue<p, vector<p>, greater<p> > pq; //min heap
int minval = INT_MAX;
int maxval = INT_MIN;
int minRange = INT_MAX;
for (int i = 0; i < k; i++)
{
pq.push({arr[i][0], {i, 0}}); //push first elem of every list
maxval = max(maxval, arr[i][0]); //and update max val
}
int start = 0; //start and end of range
int end = 0;
while (true)
{
auto curr = pq.top(); //pop min(top)
pq.pop();
minval = curr.first; //update min val
if (maxval - minval < minRange) //update range if < diff found
{
start = minval;
end = maxval;
minRange = end - start;
}
int i = curr.second.first; // array no
int j = curr.second.second; //index in array no
if (j + 1 == n) //if list tarversed fully
break;
pq.push({arr[i][j + 1], {i, j + 1}}); //push next elem of this popped elm of same list
if (maxval < arr[i][j + 1])
maxval = arr[i][j + 1]; //keep updating max with next pushing elem
}
pair<int, int> res = {start, end};
return res;
}
};
// { Driver Code Starts.
int main()
{
int t;
cin >> t;
while (t--)
{
int n, k;
cin >> n >> k;
int arr[N][N];
pair<int, int> rangee;
for (int i = 0; i < k; i++)
for (int j = 0; j < n; j++)
cin >> arr[i][j];
Solution obj;
rangee = obj.findSmallestRange(arr, n, k);
cout << rangee.first << " " << rangee.second << "\n";
}
return 0;
}
// } Driver Code Ends | 26.92623 | 240 | 0.542466 | [
"vector"
] |
509dcc7b9202ff3a3f04b8049c42272e3252e955 | 1,151 | cpp | C++ | CPP/Offer/14/CuttingRangeOffer.cpp | Insofan/LeetCode | d6722601886e181745a2e9c31cb146bc0826c906 | [
"Apache-2.0"
] | null | null | null | CPP/Offer/14/CuttingRangeOffer.cpp | Insofan/LeetCode | d6722601886e181745a2e9c31cb146bc0826c906 | [
"Apache-2.0"
] | null | null | null | CPP/Offer/14/CuttingRangeOffer.cpp | Insofan/LeetCode | d6722601886e181745a2e9c31cb146bc0826c906 | [
"Apache-2.0"
] | null | null | null | //
// Created by Insomnia on 18-8-30.
//
#include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
int cuttingRange(int length) {
/*
if (length == 0) {
return 0;
}
*/
if (length <= 1) {
return 0;
}
if (length == 2) {
return 1;
}
if (length == 3) {
return 2;
}
int res = 0;
vector<int> dp(length + 1);
dp[0] = 0;
dp[1] = 1;
dp[2] = 2;
dp[3] = 3;
int temp;
int max;
for (int i = 4; i <= length ; i++) {
max = 0;
for (int j = 1; j <= i / 2 ; j++) {
temp = dp[j] * dp[i - j];
if (temp > max) {
max = temp;
}
}
dp[i] = max;
}
return dp[length];
}
};
int main() {
Solution solution;
cout << "8 : " << solution.cuttingRange(8) << endl;
cout << "6 : " << solution.cuttingRange(6) << endl;
cout << "7 : " << solution.cuttingRange(7) << endl;
return 0;
} | 17.707692 | 55 | 0.372719 | [
"vector"
] |
509fd2c10112c699a7fc417c9b30236408b885a2 | 285 | cpp | C++ | 131-Palindrome-Partitioning/Palindrome-Partitioning.cpp | xta0/LeetCode-Solutions | ab0de97b35fb54c24bcef0398a9d75bdac9ee8b2 | [
"MIT"
] | 4 | 2018-08-07T11:45:32.000Z | 2019-05-19T08:52:19.000Z | 131-Palindrome-Partitioning/Palindrome-Partitioning.cpp | xta0/LeetCode-Solutions | ab0de97b35fb54c24bcef0398a9d75bdac9ee8b2 | [
"MIT"
] | null | null | null | 131-Palindrome-Partitioning/Palindrome-Partitioning.cpp | xta0/LeetCode-Solutions | ab0de97b35fb54c24bcef0398a9d75bdac9ee8b2 | [
"MIT"
] | null | null | null | #include <iostream>
#include <string>
#include <vector>
using namespace std;
class Solution {
private:
vector<string> helper(string& s){
return {};
}
public:
vector<vector<string>> partition(string s) {
return {};
}
};
int main(){
return 0;
} | 12.391304 | 48 | 0.592982 | [
"vector"
] |
50a4fdccbc20f0c5568b056b452d9afb930aa452 | 544 | cpp | C++ | src/stringUtils.cpp | frassom/ini-editor | 43df1942872b18980aca7a855fb4bf6e49d8d9ca | [
"MIT"
] | 1 | 2021-01-26T03:11:27.000Z | 2021-01-26T03:11:27.000Z | src/stringUtils.cpp | frassom/ini-editor | 43df1942872b18980aca7a855fb4bf6e49d8d9ca | [
"MIT"
] | 1 | 2021-01-26T03:14:22.000Z | 2021-01-26T03:14:22.000Z | src/stringUtils.cpp | frassom/ini-editor | 43df1942872b18980aca7a855fb4bf6e49d8d9ca | [
"MIT"
] | null | null | null | #include "stringUtils.h"
namespace ini { namespace StringUtils {
void trimLeft(std::string& s) {
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) { return !std::isspace(ch); }));
}
void trimRight(std::string& s) {
s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) { return !std::isspace(ch); }).base(),
s.end());
}
void trim(std::string& s) {
trimLeft(s);
trimRight(s);
}
void toLowercase(std::string& s) {
std::transform(s.begin(), s.end(), s.begin(), tolower);
}
}} // namespace ini::StringUtils
| 22.666667 | 97 | 0.606618 | [
"transform"
] |
50a6ed79f8c10a14af42ce0fd7bec54b38976273 | 2,281 | cc | C++ | src/sequence.cc | zhanghaicang/COLORS | 9a54a5e870b1b040a7455b93636f15652016c833 | [
"BSD-3-Clause"
] | 1 | 2021-05-26T08:47:47.000Z | 2021-05-26T08:47:47.000Z | src/sequence.cc | zhanghaicang/COLORS | 9a54a5e870b1b040a7455b93636f15652016c833 | [
"BSD-3-Clause"
] | null | null | null | src/sequence.cc | zhanghaicang/COLORS | 9a54a5e870b1b040a7455b93636f15652016c833 | [
"BSD-3-Clause"
] | null | null | null | #include "sequence.h"
#include <algorithm>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <string>
namespace colors {
int read_msa(const char* file_path, std::vector<std::string>& msa) {
std::ifstream fin;
fin.open(file_path);
if (fin.fail()) {
std::cerr << "Failed in open file " << file_path << std::endl;
return -1;
}
std::string line;
while (getline(fin, line, '\n')) {
if (line.size() == 0 || line[0] == '>') {
continue;
}
std::for_each(line.begin(), line.end(), [](char& c) { c = aatoi(c); });
msa.push_back(line);
}
fin.close();
return 0;
}
int calc_seq_weight(const std::vector<std::string>& msa, const double seq_id,
Vector& weight) {
int nrow = msa.size();
weight.setOnes();
for (int i = 0; i < nrow; i++) {
for (int j = i + 1; j < nrow; j++) {
double sim = calc_seq_sim(msa[i], msa[j]);
if (sim >= seq_id) {
weight[i] += 1.0;
weight[j] += 1.0;
}
}
}
weight = weight.cwiseInverse();
return 0;
}
double calc_seq_sim(const std::string& seq1, const std::string& seq2) {
double sim = 0.0;
for (int i = 0; i < seq1.size(); i++) {
sim += seq1[i] == seq2[i];
}
return sim / seq1.size();
}
unsigned char aatoi(const unsigned char aa) {
unsigned char id;
switch (aa) {
case '-':
id = 0;
break;
case 'A':
id = 1;
break;
case 'C':
id = 2;
break;
case 'D':
id = 3;
break;
case 'E':
id = 4;
break;
case 'F':
id = 5;
break;
case 'G':
id = 6;
break;
case 'H':
id = 7;
break;
case 'I':
id = 8;
break;
case 'K':
id = 9;
break;
case 'L':
id = 10;
break;
case 'M':
id = 11;
break;
case 'N':
id = 12;
break;
case 'P':
id = 13;
break;
case 'Q':
id = 14;
break;
case 'R':
id = 15;
break;
case 'S':
id = 16;
break;
case 'T':
id = 17;
break;
case 'V':
id = 18;
break;
case 'W':
id = 19;
break;
case 'Y':
id = 20;
break;
default:
id = 0;
}
return id;
}
} // namespace colors
| 17.150376 | 77 | 0.469093 | [
"vector"
] |
50aa44d2f6486e13865ca132fa656af2c35125c6 | 10,397 | cpp | C++ | myNeat/coevGui/clientGui/mainwindow.cpp | hoodoer/NEAT_Thesis | b61521d1ee6ac0cdaca81971501039b93f0dbf08 | [
"BSD-2-Clause"
] | 3 | 2018-10-28T01:11:09.000Z | 2020-02-10T23:55:04.000Z | myNeat/coevGui/clientGui/mainwindow.cpp | hoodoer/NEAT_Thesis | b61521d1ee6ac0cdaca81971501039b93f0dbf08 | [
"BSD-2-Clause"
] | null | null | null | myNeat/coevGui/clientGui/mainwindow.cpp | hoodoer/NEAT_Thesis | b61521d1ee6ac0cdaca81971501039b93f0dbf08 | [
"BSD-2-Clause"
] | null | null | null | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include <iostream>
using namespace std;
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
blockSize = 0;
connected = false;
systemPaused = false;
blueChampIndex = 0;
blueChampNumNeurons = 0;
blueChampFitnessScore = 0;
blueBestFitnessEver = 0;
blueTeamNumSpecies = 0;
redChampIndex = 0;
redChampNumNeurons = 0;
redChampFitnessScore = 0;
redBestFitnessEver = 0;
redTeamNumSpecies = 0;
tcpSocket = new QTcpSocket(this);
connect(tcpSocket, SIGNAL(error(QAbstractSocket::SocketError)),
this, SLOT(displayError(QAbstractSocket::SocketError)));
connect(tcpSocket, SIGNAL(connected()),
this, SLOT(connectedSlot()));
connect(tcpSocket, SIGNAL(disconnected()),
this, SLOT(disconnectedSlot()));
connect(tcpSocket, SIGNAL(readyRead()),
this, SLOT(receiveMessage()));
ui->setupUi(this);
// Various UI setup thingies...
ui->connectionStatus->setStyleSheet("background-color:red");
ui->tabWidget->setCurrentIndex(0);
ui->timeModeComboBox->setEditable(false);
ui->timeModeComboBox->addItem("Accelerated Time");
ui->timeModeComboBox->addItem("Realtime Mode");
ui->timeModeComboBox->setCurrentIndex(0);
// OpenGL rendering stuff
graphicsView = new QGraphicsView(ui->renderWidget);
graphicsView->setViewport(new QGLWidget);
scene = new QGraphicsScene(this);
scene->setSceneRect(0, 0, 700, 700);
graphicsView->setScene(scene);
// ui->renderWidget->setDisabled(true);
}
MainWindow::~MainWindow()
{
delete graphicsView;
delete scene;
delete tcpSocket;
delete ui;
}
void MainWindow::on_connectButton_clicked()
{
QString hostname;
QString portString;
hostname = ui->hostNameEdit->text();
portString = ui->portEdit->text();
cout<<"Trying to connect to host: "<<hostname.toStdString()<<", port: "<<portString.toStdString()<<endl;
tcpSocket->connectToHost(hostname, portString.toInt());
}
void MainWindow::on_disconnectButton_clicked()
{
tcpSocket->disconnectFromHost();
}
void MainWindow::on_pushButton_clicked()
{
sendMessage(HELLO_MSG);
}
void MainWindow::connectedSlot()
{
cout<<"Client connected to server"<<endl;
ui->connectButton->setEnabled(false);
ui->disconnectButton->setEnabled(true);
ui->connectionStatus->setStyleSheet("background-color:lightgreen");
ui->connectionStatus->setText("Connected");
connected = true;
// Get initial data values
sendMessage(GET_PAUSE_STATUS_MSG);
sendMessage(GET_RENDER_SPEED_MSG);
}
void MainWindow::disconnectedSlot()
{
cout<<"Client disconnected from server"<<endl;
ui->connectButton->setEnabled(true);
ui->disconnectButton->setEnabled(false);
ui->connectionStatus->setStyleSheet("background-color:red");
ui->connectionStatus->setText("Not Connected");
connected = false;
}
void MainWindow::displayError(QAbstractSocket::SocketError socketError)
{
switch (socketError)
{
case QAbstractSocket::RemoteHostClosedError:
break;
case QAbstractSocket::HostNotFoundError:
cout<<"Host not found"<<endl;
break;
case QAbstractSocket::ConnectionRefusedError:
cout<<"Connection refused by peer."<<endl;
break;
default:
cout<<"Connection error"<<endl;
}
}
void MainWindow::receiveMessage()
{
cout<<"Client received message from server..."<<endl;
QDataStream in(tcpSocket);
in.setVersion(QDataStream::Qt_4_7);
while (!in.atEnd())
{
if (blockSize == 0)
{
if (tcpSocket->bytesAvailable() < (int)sizeof(quint16))
{
return;
}
in >> blockSize;
}
if (tcpSocket->bytesAvailable() < blockSize)
{
return;
}
messageId messageType;
quint8 messageNum;
in >> messageNum;
messageType = (messageId)messageNum;
blockSize = 0;
switch (messageType)
{
case ACK_MSG:
cout<<"Got an ACK message"<<endl;
break;
case EXIT_MSG:
cout<<"Got an EXIT message"<<endl;
break;
case RENDER_DATA_MSG:
cout<<"Got a RENDER_DATA message"<<endl;
break;
case GENERATION_DATA_MSG:
cout<<"Got a GENERATION_DATA message"<<endl;
quint16 genCount;
quint16 btChampIndex;
quint16 btChampNumNeurons;
quint16 btChampFitnessScore;
quint16 btBestFitnessEver;
quint16 btNumSpecies;
quint16 rtChampIndex;
quint16 rtChampNumNeurons;
quint16 rtChampFitnessScore;
quint16 rtBestFitnessEver;
quint16 rtNumSpecies;
in >> genCount;
in >> btChampIndex;
in >> btChampNumNeurons;
in >> btChampFitnessScore;
in >> btBestFitnessEver;
in >> btNumSpecies;
in >> rtChampIndex;
in >> rtChampNumNeurons;
in >> rtChampFitnessScore;
in >> rtBestFitnessEver;
in >> rtNumSpecies;
generationCounter = (unsigned int)genCount;
blueChampIndex = (int)btChampIndex;
blueChampNumNeurons = (int)btChampNumNeurons;
blueChampFitnessScore = (int)btChampFitnessScore;
blueBestFitnessEver = (int)btBestFitnessEver;
blueTeamNumSpecies = (int)btNumSpecies;
redChampIndex = (int)rtChampIndex;
redChampNumNeurons = (int)rtChampNumNeurons;
redChampFitnessScore = (int)rtChampFitnessScore;
redBestFitnessEver = (int)rtBestFitnessEver;
redTeamNumSpecies = (int)rtNumSpecies;
ui->genCounterLine->setText(QString::number(generationCounter));
ui->blueChampIndexLine->setText(QString::number(blueChampIndex));
ui->blueNumNeuronsLine->setText(QString::number(blueChampNumNeurons));
ui->blueFitnessLine->setText(QString::number(blueChampFitnessScore));
ui->blueBestFitnessLine->setText(QString::number(blueBestFitnessEver));
ui->blueNumSpeciesLine->setText(QString::number(blueTeamNumSpecies));
ui->redChampIndexLine->setText(QString::number(redChampIndex));
ui->redNumNeuronsLine->setText(QString::number(redChampNumNeurons));
ui->redFitnessLine->setText(QString::number(redChampFitnessScore));
ui->redBestFitnessLine->setText(QString::number(redBestFitnessEver));
ui->redNumSpeciesLine->setText(QString::number(redTeamNumSpecies));
break;
case HELLO_MSG:
cout<<"Got a hello message!"<<endl;
break;
case RETURN_PAUSE_STATUS_MSG:
cout<<"Got a return pause status message!"<<endl;
in >> systemPaused;
if (systemPaused)
{
cout<<"System is paused"<<endl;
ui->pauseStatusLine->setText("Paused");
ui->pausePushButton->setText("Unpause System");
}
else
{
cout<<"System is not paused"<<endl;
ui->pauseStatusLine->setText("Not Paused");
ui->pausePushButton->setText("Pause System");
}
break;
case RETURN_RENDER_SPEED_MSG:
timeType timeMode;
quint16 timeModeInt;
in >> timeModeInt;
timeMode = (timeType)timeModeInt;
if (timeMode == realtime)
{
ui->timeModeComboBox->setCurrentIndex(1);
}
else if (timeMode == accelerated)
{
ui->timeModeComboBox->setCurrentIndex(0);
}
break;
default:
cout<<"In network receiveMessage, invalid message ID"<<endl;
break;
}
}
}
void MainWindow::sendMessage(messageId messageType)
{
if (!connected)
{
cout<<"In MainWindow::sendMessage, trying to send message when not connected!"<<endl;
return;
}
QByteArray messageArray;
QDataStream out(&messageArray, QIODevice::WriteOnly);
out.setVersion(QDataStream::Qt_4_7);
out << (quint16)0; // save space for message size data
out << (quint8)messageType;
// Pack in various extra parameters
switch (messageType)
{
case ACK_MSG:
cout<<"Sending an ACK message"<<endl;
break;
case PAUSE_MSG:
cout<<"Sending a PAUSE message"<<endl;
break;
case EXIT_MSG:
cout<<"Sending an EXIT message"<<endl;
break;
case SWITCH_RENDER_THREAD_MSG:
cout<<"Sending a SWITCH_RENDER_THREAD message"<<endl;
break;
case RENDER_SPEED_MSG:
cout<<"Sending a RENDER_SPEED message"<<endl;
break;
case RENDER_DATA_MSG:
cout<<"Sending a RENDER_DATA message"<<endl;
break;
case GENERATION_DATA_MSG:
cout<<"Sending a GENERATION_DATA message"<<endl;
break;
case HELLO_MSG:
cout<<"Sending a hello message!"<<endl;
break;
case GET_PAUSE_STATUS_MSG:
cout<<"Sending a get pause status message!"<<endl;
break;
case RETURN_PAUSE_STATUS_MSG:
cout<<"Sending a return pause status message!"<<endl;
break;
case GET_RENDER_SPEED_MSG:
cout<<"Sending get render speed msg!"<<endl;
break;
case GET_RENDER_THREAD_MSG:
cout<<"Sending get render thread msg!"<<endl;
break;
default:
cout<<"In network sendMessage, invalid message ID"<<endl;
break;
}
out.device()->seek(0); // Go back to beginning, and write the message size
out << (quint16)(messageArray.size() - sizeof(quint16));
tcpSocket->write(messageArray);
}
void MainWindow::on_pausePushButton_clicked()
{
sendMessage(PAUSE_MSG);
}
void MainWindow::on_exitSimButton_clicked()
{
sendMessage(EXIT_MSG);
}
void MainWindow::on_timeModeComboBox_currentIndexChanged(int index)
{
sendMessage(RENDER_SPEED_MSG);
}
| 25.174334 | 108 | 0.611811 | [
"render"
] |
27054d30f6c43b2e17a5f566763f257511c20932 | 441 | cpp | C++ | leetcode/algorithm/318.cpp | juseongkr/BOJ | 8f10a2bf9a7d695455493fbe7423347a8b648416 | [
"Apache-2.0"
] | 7 | 2020-02-03T10:00:19.000Z | 2021-11-16T11:03:57.000Z | leetcode/algorithm/318.cpp | juseongkr/Algorithm-training | 8f10a2bf9a7d695455493fbe7423347a8b648416 | [
"Apache-2.0"
] | 1 | 2021-01-03T06:58:24.000Z | 2021-01-03T06:58:24.000Z | leetcode/algorithm/318.cpp | juseongkr/Algorithm-training | 8f10a2bf9a7d695455493fbe7423347a8b648416 | [
"Apache-2.0"
] | 1 | 2020-01-22T14:34:03.000Z | 2020-01-22T14:34:03.000Z | class Solution {
public:
int maxProduct(vector<string>& words) {
vector<int> dict(words.size()+1, 0);
for (int i=0; i<words.size(); ++i)
for (int j=0; j<words[i].length(); ++j)
dict[i] |= (1 << (words[i][j]-'a'));
int ans = 0;
for (int i=0; i<words.size(); ++i)
for (int j=i+1; j<words.size(); ++j)
if ((dict[i] & dict[j]) == 0)
ans = max(ans, (int)(words[i].length() * words[j].length()));
return ans;
}
};
| 24.5 | 66 | 0.526077 | [
"vector"
] |
270d2dd3979b6273825e6e6fbd6a031ac78be007 | 1,485 | hpp | C++ | node.hpp | Aleksej10/checkersAI | d696d092023b1f2da85ca3810819bf3765ea8d78 | [
"MIT"
] | null | null | null | node.hpp | Aleksej10/checkersAI | d696d092023b1f2da85ca3810819bf3765ea8d78 | [
"MIT"
] | null | null | null | node.hpp | Aleksej10/checkersAI | d696d092023b1f2da85ca3810819bf3765ea8d78 | [
"MIT"
] | null | null | null | #ifndef NODE_H
#define NODE_H
#include "pos.hpp"
#include "model.hpp"
#include <vector>
#include <cmath>
#include <cstdlib>
#include <map>
#include <torch/torch.h>
#include <queue>
#include <future>
class Node {
private:
Node * father_;
Pos pos_;
std::vector<Move>* moves_;
uint8_t move_n_;
uint8_t arg_max_;
float estimate_;
float score_;
bool leaf_;
bool truly_;
bool visited_; //TODO: obosolete? used only for printing
std::vector<Node *> sons_;
public:
~Node();
Node();
Node(Node *, Pos, Move);
static void delete_tree(Node *&);
void show();
void showTree();
int8_t get_side(); //white 1, black -1
float get_score();
float get_estimate();
bool get_truly();
bool get_leaf();
bool get_visited();
Node * get_father();
Node * get_son(uint8_t);
Pos get_pos();
std::vector<Move> * get_moves();
uint8_t get_move_n();
bool over();
bool treefold();
float result();
uint8_t argmax();
void expand();
void backprop(bool, float);
void trutify();
int8_t monte();
void monte(unsigned);
static void playMove(Node *&, Move);
static Move pick_n_play(Node *&, unsigned);
static void self_play(Node *&, unsigned);
static void self_vs_random(Node *&, unsigned, int);
static std::pair<torch::Tensor, torch::Tensor> get_training_set(Node *&);
static void install_net(Net);
inline static Net net_;
};
#endif
| 20.915493 | 77 | 0.626263 | [
"vector",
"model"
] |
270fe8a772a4c371471c58e7bdadecdd35999d7c | 1,991 | cpp | C++ | leetcode/144.cpp | laiyuling424/LeetCode | afb582026b4d9a4082fdb99fc65b437e55d1f64d | [
"Apache-2.0"
] | null | null | null | leetcode/144.cpp | laiyuling424/LeetCode | afb582026b4d9a4082fdb99fc65b437e55d1f64d | [
"Apache-2.0"
] | null | null | null | leetcode/144.cpp | laiyuling424/LeetCode | afb582026b4d9a4082fdb99fc65b437e55d1f64d | [
"Apache-2.0"
] | null | null | null | //
// Created by 赖於领 on 2021/8/18.
//
#include <vector>
#include <iostream>
using namespace std;
//二叉树的前序遍历
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
* };
*/
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
class Solution {
public:
void preorderTraversal(TreeNode *root, vector<int> *result) {
if (!root) {
return;
}
cout << root->val << endl;
result->push_back(root->val);
preorderTraversal(root->left, result);
preorderTraversal(root->right, result);
}
vector<int> preorderTraversal(TreeNode *root) {
vector<int> result;
preorderTraversal(root, &result);
return result;
}
void levelOrder(TreeNode *root, vector<vector<int>> *result,int level) {
if (!root) {
return;
}
cout << root->val << endl;
vector<int> temp_vector = result->at(level-1);
// if ()
}
vector<vector<int>> levelOrder(TreeNode *root) {
vector<vector<int>> result;
levelOrder(root, &result,1);
return result;
}
};
//int main() {
// Solution *solution = new Solution();
// TreeNode *node5 = new TreeNode(5);
// TreeNode *node4 = new TreeNode(4);
// TreeNode *node3 = new TreeNode(3);
// TreeNode *node2 = new TreeNode(2, node4, node5);
// TreeNode *node1 = new TreeNode(1, node2, node3);
// solution->preorderTraversal(node1);
// return 0;
//} | 22.625 | 93 | 0.579608 | [
"vector"
] |
271178a18b6f0a879bb29e0756a2e69b356f9337 | 662 | cpp | C++ | 10 Leetcode/Medium/longest-substring-without-repeating-characters.cpp | akritisneh/OnAndOn | a14f964c14d6a7a5fbef43db99f61a357b1f52f8 | [
"MIT"
] | 13 | 2021-10-05T15:50:21.000Z | 2022-03-04T19:43:18.000Z | 10 Leetcode/Medium/longest-substring-without-repeating-characters.cpp | akritisneh/OnAndOn | a14f964c14d6a7a5fbef43db99f61a357b1f52f8 | [
"MIT"
] | 18 | 2021-10-05T14:43:14.000Z | 2021-10-21T04:19:34.000Z | 10 Leetcode/Medium/longest-substring-without-repeating-characters.cpp | akritisneh/OnAndOn | a14f964c14d6a7a5fbef43db99f61a357b1f52f8 | [
"MIT"
] | 21 | 2021-10-05T14:34:25.000Z | 2021-10-17T09:07:46.000Z | class Solution {
public:
int lengthOfLongestSubstring(string s) {
vector<int> map(256,-1); //a string can have 256 different characters
//Each character is stored using eight bits of information, giving a total number of 256 different characters (2**8 = 256).
int left=0;
int right=0;
int len=0;
int n = s.size();
while(right<n){
if(map[s[right]]!=-1)
left = max(left,map[s[right]]+1);
map[s[right]] = right;
len = max(len,right-left+1);
right++;
}
return len;
}
};
| 27.583333 | 131 | 0.489426 | [
"vector"
] |
2713f8da97a0b727990e1a2cee5a082afa8fb96c | 446 | cpp | C++ | src/Game.cpp | amoulis/Chessy | 7a31a79ee15eef25037ba316918c6a6f603caf6c | [
"Unlicense"
] | null | null | null | src/Game.cpp | amoulis/Chessy | 7a31a79ee15eef25037ba316918c6a6f603caf6c | [
"Unlicense"
] | null | null | null | src/Game.cpp | amoulis/Chessy | 7a31a79ee15eef25037ba316918c6a6f603caf6c | [
"Unlicense"
] | null | null | null | #include "Game.hpp"
namespace game {
std::vector <std::vector <int> >
Game::is_not_out_of_the_board(std::vector < std::vector <int> >& data_in)
{
for(int i = 0; i < data_in.size(); i++)
{
std::vector<int> vec = data_in[i];
if( vec[0] < 0 || vec[0] > m_board_size)
{
if( vec[1] < 0 || vec[1] > m_board_size)
{
data_in.erase(data_in.begin()+i);
}
}
}
return data_in;
}
} // namespace game
| 17.84 | 73 | 0.547085 | [
"vector"
] |
271440429d560fe4541ae06371c7b975922191ee | 59,750 | cpp | C++ | implementations/ugene/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAView.cpp | r-barnes/sw_comparison | 1ac2c9cc10a32badd6b8fb1e96516c97f7800176 | [
"BSD-Source-Code"
] | null | null | null | implementations/ugene/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAView.cpp | r-barnes/sw_comparison | 1ac2c9cc10a32badd6b8fb1e96516c97f7800176 | [
"BSD-Source-Code"
] | null | null | null | implementations/ugene/src/corelibs/U2View/src/ov_sequence/AnnotatedDNAView.cpp | r-barnes/sw_comparison | 1ac2c9cc10a32badd6b8fb1e96516c97f7800176 | [
"BSD-Source-Code"
] | null | null | null | /**
* UGENE - Integrated Bioinformatics Tools.
* Copyright (C) 2008-2020 UniPro <ugene@unipro.ru>
* http://ugene.net
*
* 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 2
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#include <limits>
#include <QAction>
#include <QMenu>
#include <QMessageBox>
#include <QScrollArea>
#include <QToolBar>
#include <QVBoxLayout>
#include <U2Core/AnnotationSelection.h>
#include <U2Core/AnnotationSettings.h>
#include <U2Core/AnnotationTableObject.h>
#include <U2Core/AppContext.h>
#include <U2Core/AutoAnnotationsSupport.h>
#include <U2Core/ClipboardController.h>
#include <U2Core/DNASequenceObject.h>
#include <U2Core/DNASequenceSelection.h>
#include <U2Core/GObjectUtils.h>
#include <U2Core/L10n.h>
#include <U2Core/ModifySequenceObjectTask.h>
#include <U2Core/ProjectModel.h>
#include <U2Core/QObjectScopedPointer.h>
#include <U2Core/RemoveAnnotationsTask.h>
#include <U2Core/ReverseSequenceTask.h>
#include <U2Core/SelectionUtils.h>
#include <U2Core/SequenceUtils.h>
#include <U2Core/Settings.h>
#include <U2Core/TaskSignalMapper.h>
#include <U2Core/Timer.h>
#include <U2Core/U2AlphabetUtils.h>
#include <U2Core/U2OpStatusUtils.h>
#include <U2Core/U2SequenceUtils.h>
#include <U2Gui/CreateObjectRelationDialogController.h>
#include <U2Gui/EditSequenceDialogController.h>
#include <U2Gui/EditSettingsDialog.h>
#include <U2Gui/GUIUtils.h>
#include <U2Gui/OPWidgetFactoryRegistry.h>
#include <U2Gui/OptionsPanel.h>
#include <U2Gui/PositionSelector.h>
#include <U2Gui/RemovePartFromSequenceDialogController.h>
#include <U2View/CodonTable.h>
#include <U2View/FindPatternWidgetFactory.h>
#include <U2View/SecStructPredictUtils.h>
#include "ADVAnnotationCreation.h"
#include "ADVClipboard.h"
#include "ADVConstants.h"
#include "ADVSequenceObjectContext.h"
#include "ADVSingleSequenceWidget.h"
#include "ADVSyncViewManager.h"
#include "AnnotatedDNAView.h"
#include "AnnotatedDNAViewFactory.h"
#include "AnnotatedDNAViewState.h"
#include "AnnotatedDNAViewTasks.h"
#include "AnnotationsTreeView.h"
#include "AutoAnnotationUtils.h"
#include "DetView.h"
#include "DetViewSequenceEditor.h"
#include "GraphMenu.h"
#ifdef max
# undef max
#endif
namespace U2 {
AnnotatedDNAView::AnnotatedDNAView(const QString &viewName, const QList<U2SequenceObject *> &dnaObjects)
: GObjectView(AnnotatedDNAViewFactory::ID, viewName) {
timerId = 0;
hadExpandableSequenceWidgetsLastResize = false;
annotationSelection = new AnnotationSelection(this);
annotationGroupSelection = new AnnotationGroupSelection(this);
clipb = NULL;
mainSplitter = NULL;
scrollArea = NULL;
posSelector = NULL;
posSelectorWidgetAction = NULL;
annotationsView = NULL;
focusedWidget = NULL;
replacedSeqWidget = NULL;
codonTableView = new CodonTableView(this);
connect(this, SIGNAL(si_focusChanged(ADVSequenceWidget *, ADVSequenceWidget *)), codonTableView, SLOT(sl_onSequenceFocusChanged(ADVSequenceWidget *, ADVSequenceWidget *)));
createCodonTableAction();
createAnnotationAction = (new ADVAnnotationCreation(this))->getCreateAnnotationAction();
posSelectorAction = new QAction(QIcon(":core/images/goto.png"), tr("Go to position..."), this);
posSelectorAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_G));
posSelectorAction->setShortcutContext(Qt::WindowShortcut);
posSelectorAction->setObjectName(ADV_GOTO_ACTION);
connect(posSelectorAction, SIGNAL(triggered()), SLOT(sl_onShowPosSelectorRequest()));
toggleHLAction = new QAction("", this);
connect(toggleHLAction, SIGNAL(triggered()), SLOT(sl_toggleHL()));
removeAnnsAndQsAction = new QAction("", this);
removeAnnsAndQsAction->setShortcut(QKeySequence(Qt::Key_Delete));
removeAnnsAndQsAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
syncViewManager = new ADVSyncViewManager(this);
foreach (U2SequenceObject *dnaObj, dnaObjects) {
addObject(dnaObj);
}
findPatternAction = new ADVGlobalAction(this, QIcon(":core/images/find_dialog.png"), tr("Find pattern..."), 10);
findPatternAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_F));
findPatternAction->setShortcutContext(Qt::WindowShortcut);
connect(findPatternAction, SIGNAL(triggered()), SLOT(sl_onFindPatternClicked()));
editSettingsAction = new QAction(tr("Annotation settings on editing..."), this);
editSettingsAction->setObjectName(ACTION_EDIT_SEQUENCE_SETTINGS);
connect(editSettingsAction, SIGNAL(triggered()), this, SLOT(sl_editSettings()));
addSequencePart = new QAction(tr("Insert subsequence..."), this);
addSequencePart->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_I));
addSequencePart->setObjectName(ACTION_EDIT_INSERT_SUBSEQUENCE);
connect(addSequencePart, SIGNAL(triggered()), this, SLOT(sl_addSequencePart()));
removeSequencePart = new QAction(tr("Remove subsequence..."), this);
removeSequencePart->setObjectName(ACTION_EDIT_REMOVE_SUBSEQUENCE);
connect(removeSequencePart, SIGNAL(triggered()), this, SLOT(sl_removeSequencePart()));
replaceSequencePart = new QAction(tr("Replace subsequence..."), this);
replaceSequencePart->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_R));
replaceSequencePart->setObjectName(ACTION_EDIT_REPLACE_SUBSEQUENCE);
connect(replaceSequencePart, SIGNAL(triggered()), this, SLOT(sl_replaceSequencePart()));
removeSequenceObjectAction = new QAction(tr("Selected sequence from view"), this);
removeSequenceObjectAction->setObjectName(ACTION_EDIT_SELECT_SEQUENCE_FROM_VIEW);
connect(removeSequenceObjectAction, SIGNAL(triggered()), SLOT(sl_removeSelectedSequenceObject()));
reverseComplementSequenceAction = new QAction(tr("Complementary (5'-3') sequence"), this);
reverseComplementSequenceAction->setShortcut(QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_R));
reverseComplementSequenceAction->setObjectName(ACTION_EDIT_RESERVE_COMPLEMENT_SEQUENCE);
connect(reverseComplementSequenceAction, SIGNAL(triggered()), SLOT(sl_reverseComplementSequence()));
reverseSequenceAction = new QAction(tr("Reverse (3'-5') sequence"), this);
reverseSequenceAction->setObjectName(ACTION_EDIT_RESERVE_SEQUENCE);
connect(reverseSequenceAction, SIGNAL(triggered()), SLOT(sl_reverseSequence()));
complementSequenceAction = new QAction(tr("Complementary (3'-5') sequence"), this);
complementSequenceAction->setObjectName(ACTION_EDIT_COMPLEMENT_SEQUENCE);
connect(complementSequenceAction, SIGNAL(triggered()), SLOT(sl_complementSequence()));
SecStructPredictViewAction::createAction(this);
}
QAction *AnnotatedDNAView::createPasteAction() {
QAction *action = ADVClipboard::createPasteSequenceAction(this);
connect(action, SIGNAL(triggered()), this, SLOT(sl_paste()));
return action;
}
QWidget *AnnotatedDNAView::createWidget() {
GTIMER(c1, t1, "AnnotatedDNAView::createWidget");
assert(scrollArea == NULL);
mainSplitter = new QSplitter(Qt::Vertical);
mainSplitter->setObjectName("annotated_DNA_splitter");
connect(mainSplitter, SIGNAL(splitterMoved(int, int)), SLOT(sl_splitterMoved(int, int)));
mainSplitter->addWidget(codonTableView);
mainSplitter->setCollapsible(mainSplitter->indexOf(codonTableView), false);
mainSplitter->setContextMenuPolicy(Qt::CustomContextMenu);
connect(mainSplitter, SIGNAL(customContextMenuRequested(const QPoint &)), SLOT(sl_onContextMenuRequested()));
scrollArea = new QScrollArea();
scrollArea->setObjectName("annotated_DNA_scrollarea");
scrollArea->setWidgetResizable(true);
scrollArea->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
mainSplitter->addWidget(scrollArea);
mainSplitter->setHandleWidth(1); // make smaller the distance between the Annotations Editor and the sequence sub-views
mainSplitter->setCollapsible(mainSplitter->indexOf(scrollArea), false);
scrolledWidget = new QWidget(scrollArea);
scrolledWidgetLayout = new QVBoxLayout();
scrolledWidgetLayout->setContentsMargins(0, 0, 0, 0);
scrolledWidgetLayout->setSpacing(0);
scrolledWidgetLayout->setSizeConstraint(QLayout::SetMinAndMaxSize);
scrolledWidget->setBackgroundRole(QPalette::Light);
scrolledWidget->installEventFilter(this);
scrolledWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
clipb = new ADVClipboard(this);
QAction *pasteAction = clipb->getPasteSequenceAction();
pasteAction->setEnabled(false);
connect(pasteAction, SIGNAL(triggered()), this, SLOT(sl_paste()));
annotationsView = new AnnotationsTreeView(this);
annotationsView->setParent(mainSplitter);
annotationsView->setObjectName("annotations_tree_view");
connect(annotationsView, SIGNAL(si_setCopyQualifierActionStatus(bool, QString)), clipb, SLOT(sl_setCopyQualifierActionStatus(bool, QString)));
connect(clipb->getCopyQualifierAction(), SIGNAL(triggered()), annotationsView, SLOT(sl_onCopyQualifierValue()));
for (int i = 0; i < seqContexts.size(); ++i) {
ADVSequenceObjectContext *seqCtx = seqContexts[i];
ADVSingleSequenceWidget *block = new ADVSingleSequenceWidget(seqCtx, this);
connect(block, SIGNAL(si_titleClicked(ADVSequenceWidget *)), SLOT(sl_onSequenceWidgetTitleClicked(ADVSequenceWidget *)));
connect(seqCtx, SIGNAL(si_aminoTranslationChanged()), SLOT(sl_aminoTranslationChanged()));
block->setObjectName("ADV_single_sequence_widget_" + QString::number(i));
addSequenceWidget(block);
block->addAction(createPasteAction());
}
mainSplitter->addWidget(annotationsView);
mainSplitter->setCollapsible(mainSplitter->indexOf(annotationsView), false);
scrolledWidget->setLayout(scrolledWidgetLayout);
scrolledWidget->setObjectName("scrolled_widget_layout");
//TODO: scroll area does not restore focus for last active child widget after Alt-Tab...
scrollArea->setWidget(scrolledWidget);
mainSplitter->installEventFilter(this);
mainSplitter->setAcceptDrops(true);
if (!seqViews.isEmpty()) {
setFocusedSequenceWidget(seqViews.last());
}
//add view global shortcuts
connect(removeAnnsAndQsAction, SIGNAL(triggered()), annotationsView->removeAnnsAndQsAction, SIGNAL(triggered()));
mainSplitter->addAction(toggleHLAction);
mainSplitter->addAction(removeSequenceObjectAction);
mainSplitter->addAction(removeAnnsAndQsAction);
mainSplitter->setWindowIcon(GObjectTypes::getTypeInfo(GObjectTypes::SEQUENCE).icon);
// Init the Options Panel
optionsPanel = new OptionsPanel(this);
OPWidgetFactoryRegistry *opWidgetFactoryRegistry = AppContext::getOPWidgetFactoryRegistry();
QList<OPFactoryFilterVisitorInterface *> filters;
ADVSequenceObjectContext *ctx;
QList<DNAAlphabetType> alphabets;
for (int i = 0; i < seqViews.size(); i++) {
if (seqViews[i] != NULL) {
ctx = seqViews[i]->getActiveSequenceContext();
if (ctx) {
const DNAAlphabet *alphabet = ctx->getAlphabet();
if (alphabet) {
alphabets.append(alphabet->getType());
}
}
}
}
filters.append(new OPFactoryFilterVisitor(ObjViewType_SequenceView, alphabets));
QList<OPWidgetFactory *> opWidgetFactoriesForSeqView = opWidgetFactoryRegistry->getRegisteredFactories(filters);
foreach (OPWidgetFactory *factory, opWidgetFactoriesForSeqView) {
optionsPanel->addGroup(factory);
}
qDeleteAll(filters);
return mainSplitter;
}
OptionsPanel *AnnotatedDNAView::getOptionsPanel() {
return optionsPanel;
}
void AnnotatedDNAView::sl_splitterMoved(int, int) {
// WORKAROUND: looks like a QT bug:
// ADVSequenceWidgets get paint events as needed, but scrolledWidget is over-painted by splitter's handle
// to reproduce it open any complex (like 3d structure) view and pull the splitter handle upward slowly
// -> workaround: update geometry for scrollArea or repaint main splitter's ares (todo: recheck effect)
mainSplitter->repaint(scrollArea->geometry());
mainSplitter->refresh();
}
void AnnotatedDNAView::sl_onSequenceWidgetTitleClicked(ADVSequenceWidget *seqWidget) {
replacedSeqWidget = seqWidget;
}
void AnnotatedDNAView::timerEvent(QTimerEvent *) {
//see comment for sl_splitterMoved()
assert(timerId != 0);
killTimer(timerId);
timerId = 0;
QWidget *w = scrollArea;
QRect orig = w->geometry();
QRect tmp = orig;
tmp.adjust(0, 0, 1, 1);
w->setGeometry(tmp);
w->setGeometry(orig);
}
void AnnotatedDNAView::updateScrollAreaHeight() {
if (!scrolledWidget->isVisible()) {
return;
}
int newScrollAreaMaxHeight = 0;
foreach (ADVSequenceWidget *v, seqViews) {
int widgetMaxHeight = v->maximumHeight();
if (widgetMaxHeight == QWIDGETSIZE_MAX) {
scrollArea->setMaximumHeight(QWIDGETSIZE_MAX);
return;
}
newScrollAreaMaxHeight += v->maximumHeight();
}
newScrollAreaMaxHeight += 2; // magic '+2' is for the borders, without it unneccessary scroll bar will appear
if (newScrollAreaMaxHeight <= scrollArea->height()) {
scrollArea->setMaximumHeight(newScrollAreaMaxHeight);
}
}
AnnotatedDNAView::~AnnotatedDNAView() {
delete posSelector;
}
bool AnnotatedDNAView::eventFilter(QObject *o, QEvent *e) {
if (o == mainSplitter) {
if (e->type() == QEvent::DragEnter || e->type() == QEvent::Drop) {
QDropEvent *de = (QDropEvent *)e;
const QMimeData *md = de->mimeData();
const GObjectMimeData *gomd = qobject_cast<const GObjectMimeData *>(md);
if (gomd != NULL) {
if (e->type() == QEvent::DragEnter) {
de->acceptProposedAction();
} else {
GObject *obj = gomd->objPtr.data();
if (obj != NULL) {
QString err = tryAddObject(obj);
if (!err.isEmpty()) {
QMessageBox::critical(NULL, tr("Error!"), err);
}
}
}
}
}
} else if (o == scrolledWidget) {
if (replacedSeqWidget && e->type() == QEvent::MouseMove) {
QMouseEvent *event = dynamic_cast<QMouseEvent *>(e);
if (event->buttons() == Qt::LeftButton) {
seqWidgetMove(event->pos());
}
} else if (replacedSeqWidget && e->type() == QEvent::MouseButtonRelease) {
QMouseEvent *event = dynamic_cast<QMouseEvent *>(e);
if (event->buttons() == Qt::LeftButton) {
finishSeqWidgetMove();
}
}
// try to restore mainSplitter state on sequence views fixed <-> expandable state transition. Usually this happens when user toggles sequence views.
if (e->type() == QEvent::Resize) {
bool hasExpandableSequenceWidgetsNow = false; // expandable state: any of the sequence view widgets has unlimited height.
foreach (const ADVSequenceWidget *w, getSequenceWidgets()) {
if (w->maximumHeight() == QWIDGETSIZE_MAX) {
hasExpandableSequenceWidgetsNow = true;
break;
}
}
if (hasExpandableSequenceWidgetsNow != hadExpandableSequenceWidgetsLastResize) { // transition from fixed <-> expandable state
if (hasExpandableSequenceWidgetsNow) { // try restore state from the saved sizes if possible.
if (savedMainSplitterSizes.size() > 0 && savedMainSplitterSizes.size() == mainSplitter->sizes().size()) {
mainSplitter->setSizes(savedMainSplitterSizes);
}
}
hadExpandableSequenceWidgetsLastResize = hasExpandableSequenceWidgetsNow;
}
if (hasExpandableSequenceWidgetsNow) { // update saved sizes for a future use.
savedMainSplitterSizes = mainSplitter->sizes();
}
}
return false;
} else if (e->type() == QEvent::Resize) {
ADVSequenceWidget *v = qobject_cast<ADVSequenceWidget *>(o);
if (v != NULL) {
updateScrollAreaHeight();
}
} else if (e->type() == QEvent::KeyPress) {
sl_selectionChanged();
}
return false;
}
void AnnotatedDNAView::setFocusedSequenceWidget(ADVSequenceWidget *v) {
if (v == focusedWidget) {
return;
}
ADVSequenceWidget *prevFocus = focusedWidget;
focusedWidget = v;
updateMultiViewActions();
sl_updatePasteAction();
emit si_focusChanged(prevFocus, focusedWidget);
}
bool AnnotatedDNAView::onCloseEvent() {
QList<AutoAnnotationObject *> aaList = autoAnnotationsMap.values();
bool waitFinishedRemovedTasks = false;
foreach (AutoAnnotationObject *aa, aaList) {
bool existRemovedTask = false;
cancelAutoAnnotationUpdates(aa, &existRemovedTask);
waitFinishedRemovedTasks = waitFinishedRemovedTasks || existRemovedTask;
}
if (waitFinishedRemovedTasks) {
QMessageBox::information(this->getWidget(), "information", "Can not close view while there are annotations being processed");
return false;
}
foreach (ADVSplitWidget *w, splitWidgets) {
bool canClose = w->onCloseEvent();
if (!canClose) {
return false;
}
}
emit si_onClose(this);
return true;
}
bool AnnotatedDNAView::onObjectRemoved(GObject *o) {
if (o->getGObjectType() == GObjectTypes::ANNOTATION_TABLE) {
AnnotationTableObject *ao = qobject_cast<AnnotationTableObject *>(o);
annotationSelection->removeObjectAnnotations(ao);
foreach (ADVSequenceObjectContext *seqCtx, seqContexts) {
if (seqCtx->getAnnotationObjects().contains(ao)) {
seqCtx->removeAnnotationObject(ao);
break;
}
}
annotations.removeOne(ao);
emit si_annotationObjectRemoved(ao);
} else if (o->getGObjectType() == GObjectTypes::SEQUENCE) {
U2SequenceObject *seqObj = qobject_cast<U2SequenceObject *>(o);
ADVSequenceObjectContext *seqCtx = getSequenceContext(seqObj);
if (seqCtx != NULL) {
foreach (ADVSequenceWidget *w, seqCtx->getSequenceWidgets()) {
removeSequenceWidget(w);
}
QSet<AnnotationTableObject *> aObjs = seqCtx->getAnnotationObjects();
foreach (AnnotationTableObject *ao, aObjs) {
removeObject(ao);
}
emit si_sequenceRemoved(seqCtx);
seqContexts.removeOne(seqCtx);
removeAutoAnnotations(seqCtx);
delete seqCtx;
}
}
GObjectView::onObjectRemoved(o);
return seqContexts.isEmpty();
}
void AnnotatedDNAView::addADVAction(ADVGlobalAction *a1) {
for (int i = 0; i < advActions.size(); i++) {
ADVGlobalAction *a2 = advActions[i];
int p1 = a1->getPosition();
int p2 = a2->getPosition();
if (p1 < p2 || (p1 == p2 && a1->text() < a2->text())) {
advActions.insert(i, a1);
return;
}
}
advActions.append(a1);
}
void AnnotatedDNAView::buildStaticToolbar(QToolBar *tb) {
tb->addAction(createAnnotationAction);
tb->addSeparator();
tb->addAction(clipb->getCopySequenceAction());
tb->addAction(clipb->getCopyComplementAction());
tb->addAction(clipb->getCopyTranslationAction());
tb->addAction(clipb->getCopyComplementTranslationAction());
tb->addAction(clipb->getCopyAnnotationSequenceAction());
tb->addAction(clipb->getCopyComplementAnnotationSequenceAction());
tb->addAction(clipb->getCopyAnnotationSequenceTranslationAction());
tb->addAction(clipb->getCopyComplementAnnotationSequenceTranslationAction());
tb->addAction(clipb->getCopyQualifierAction());
tb->addAction(clipb->getPasteSequenceAction());
tb->addSeparator();
if (posSelector == NULL && !seqContexts.isEmpty()) {
qint64 len = seqContexts.first()->getSequenceLength();
posSelector = new PositionSelector(tb, 1, len);
connect(posSelector, SIGNAL(si_positionChanged(int)), SLOT(sl_onPosChangeRequest(int)));
posSelectorWidgetAction = tb->addWidget(posSelector);
} else {
tb->addAction(posSelectorWidgetAction);
}
tb->addSeparator();
syncViewManager->updateToolbar1(tb);
tb->addSeparator();
foreach (ADVGlobalAction *a, advActions) {
if (a->getFlags().testFlag(ADVGlobalActionFlag_AddToToolbar)) {
tb->addAction(a);
QWidget *w = tb->widgetForAction(a);
if (w) {
w->setObjectName(a->objectName() + "_widget");
}
}
}
GObjectView::buildStaticToolbar(tb);
tb->addSeparator();
syncViewManager->updateToolbar2(tb);
}
void AnnotatedDNAView::buildStaticMenu(QMenu *m) {
m->addAction(posSelectorAction);
clipb->addCopyMenu(m);
m->addSeparator();
addAddMenu(m);
addAnalyseMenu(m);
addAlignMenu(m);
addExportMenu(m);
addEditMenu(m);
addRemoveMenu(m);
m->addSeparator();
annotationsView->adjustStaticMenu(m);
GObjectView::buildStaticMenu(m);
}
void AnnotatedDNAView::addAnalyseMenu(QMenu *m) {
QMenu *am = m->addMenu(tr("Analyze"));
am->menuAction()->setObjectName(ADV_MENU_ANALYSE);
foreach (ADVGlobalAction *a, advActions) {
if (a->getFlags().testFlag(ADVGlobalActionFlag_AddToAnalyseMenu)) {
am->addAction(a);
}
}
}
void AnnotatedDNAView::addAddMenu(QMenu *m) {
QMenu *am = m->addMenu(tr("Add"));
am->menuAction()->setObjectName(ADV_MENU_ADD);
am->addAction(createAnnotationAction);
}
void AnnotatedDNAView::addExportMenu(QMenu *m) {
QMenu *em = m->addMenu(tr("Export"));
em->menuAction()->setObjectName(ADV_MENU_EXPORT);
}
void AnnotatedDNAView::addAlignMenu(QMenu *m) {
QMenu *am = m->addMenu(tr("Align"));
am->menuAction()->setObjectName(ADV_MENU_ALIGN);
}
void AnnotatedDNAView::addRemoveMenu(QMenu *m) {
QMenu *rm = m->addMenu(tr("Remove"));
rm->menuAction()->setObjectName(ADV_MENU_REMOVE);
rm->addAction(removeSequenceObjectAction);
}
void AnnotatedDNAView::addEditMenu(QMenu *m) {
ADVSequenceObjectContext *seqCtx = getSequenceInFocus();
SAFE_POINT(seqCtx != nullptr, "Sequence in focus is NULL", );
U2SequenceObject *seqObj = seqCtx->getSequenceObject();
SAFE_POINT(seqObj != nullptr, "Sequence object in focus is NULL", );
Document *curDoc = seqObj->getDocument();
SAFE_POINT(curDoc != nullptr, "Current document is NULL", );
QMenu *editMenu = m->addMenu(tr("Edit"));
editMenu->setEnabled(!(curDoc->findGObjectByType(GObjectTypes::SEQUENCE).isEmpty() || seqObj->isStateLocked()));
editMenu->menuAction()->setObjectName(ADV_MENU_EDIT);
QAction *editAction = getEditActionFromSequenceWidget(focusedWidget);
if (editAction != nullptr) {
editMenu->addAction(editAction);
}
if (annotationSelection->getAnnotations().size() == 1 && annotationsView->editAction->isEnabled()) {
editMenu->addAction(annotationsView->editAction);
}
editMenu->addAction(editSettingsAction);
editMenu->addSeparator();
editMenu->addAction(addSequencePart);
editMenu->addAction(replaceSequencePart);
sl_selectionChanged();
editMenu->addAction(removeSequencePart);
editMenu->addSeparator();
if (seqObj->getAlphabet()->isNucleic() && seqCtx->getComplementTT() != NULL) {
QMenu *replaceMenu = editMenu->addMenu(tr("Replace the whole sequence by"));
replaceMenu->menuAction()->setObjectName(ADV_MENU_REPLACE_WHOLE_SEQUENCE);
replaceMenu->addAction(reverseComplementSequenceAction);
replaceMenu->addSeparator();
replaceMenu->addAction(complementSequenceAction);
replaceMenu->addAction(reverseSequenceAction);
}
}
Task *AnnotatedDNAView::updateViewTask(const QString &stateName, const QVariantMap &stateData) {
return new UpdateAnnotatedDNAViewTask(this, stateName, stateData);
}
QVariantMap AnnotatedDNAView::saveState() {
if (closing) {
return QVariantMap();
}
QVariantMap state = AnnotatedDNAViewState::saveState(this);
foreach (ADVSequenceWidget *sw, seqViews) {
sw->saveState(state);
}
foreach (ADVSplitWidget *w, splitWidgets) {
w->saveState(state);
}
annotationsView->saveState(state);
return state;
}
void AnnotatedDNAView::saveWidgetState() {
annotationsView->saveWidgetState();
}
bool AnnotatedDNAView::canAddObject(GObject *obj) {
if (GObjectView::canAddObject(obj)) {
return true;
}
if (isChildWidgetObject(obj)) {
return true;
}
if (obj->getGObjectType() == GObjectTypes::SEQUENCE) {
return true;
}
if (obj->getGObjectType() != GObjectTypes::ANNOTATION_TABLE) {
return false;
}
//todo: add annotations related to sequence object not in view (sobj) and add 'sobj' too the view ?
bool hasRelation = false;
foreach (ADVSequenceObjectContext *soc, seqContexts) {
if (obj->hasObjectRelation(soc->getSequenceObject(), ObjectRole_Sequence)) {
hasRelation = true;
break;
}
}
return hasRelation;
}
bool AnnotatedDNAView::isChildWidgetObject(GObject *obj) const {
foreach (ADVSequenceWidget *lv, seqViews) {
SAFE_POINT(lv != NULL, "AnnotatedDNAView::isChildWidgetObject::No sequence widget", false);
if (lv->isWidgetOnlyObject(obj)) {
return true;
}
}
foreach (ADVSplitWidget *sw, splitWidgets) {
SAFE_POINT(sw != NULL, "AnnotatedDNAView::isChildWidgetObject::No split widget", false);
if (sw->acceptsGObject(obj)) {
return true;
}
}
return false;
}
void AnnotatedDNAView::addSequenceWidget(ADVSequenceWidget *v) {
assert(!seqViews.contains(v));
seqViews.append(v);
QAction *editAction = getEditActionFromSequenceWidget(v);
SAFE_POINT(editAction != NULL, "Edit action is not found", );
connect(editAction, SIGNAL(triggered()), SLOT(sl_updatePasteAction()));
QList<ADVSequenceObjectContext *> contexts = v->getSequenceContexts();
foreach (ADVSequenceObjectContext *c, contexts) {
c->addSequenceWidget(v);
addAutoAnnotations(c);
addGraphs(c);
connect(c->getSequenceSelection(), SIGNAL(si_selectionChanged(LRegionsSelection *, QVector<U2Region>, QVector<U2Region>)), SLOT(sl_selectionChanged()));
clipb->connectSequence(c);
}
scrolledWidgetLayout->addWidget(v);
v->setVisible(true);
v->installEventFilter(this);
updateScrollAreaHeight();
updateMultiViewActions();
emit si_sequenceWidgetAdded(v);
}
void AnnotatedDNAView::removeSequenceWidget(ADVSequenceWidget *v) {
assert(seqViews.contains(v));
int idx = seqViews.indexOf(v);
assert(idx >= 0);
//fix focus
if (focusedWidget == v) {
if (idx + 1 < seqViews.size()) {
setFocusedSequenceWidget(seqViews[idx + 1]);
} else if (idx - 1 >= 0) {
setFocusedSequenceWidget(seqViews[idx - 1]);
} else {
setFocusedSequenceWidget(NULL);
}
}
//remove widget
seqViews.removeOne(v);
v->hide();
QList<ADVSequenceObjectContext *> contexts = v->getSequenceContexts();
foreach (ADVSequenceObjectContext *c, contexts) {
c->removeSequenceWidget(v);
disconnect(c->getSequenceSelection(), SIGNAL(si_selectionChanged(LRegionsSelection *, QVector<U2Region>, QVector<U2Region>)));
}
updateMultiViewActions();
emit si_sequenceWidgetRemoved(v);
scrolledWidgetLayout->removeWidget(v);
delete v;
//v->deleteLater(); //problem: updates for 'v' after seqCtx is destroyed
updateScrollAreaHeight();
}
void AnnotatedDNAView::updateMultiViewActions() {
bool canRemoveFocusedSequence = seqViews.size() > 1 && focusedWidget != NULL && focusedWidget->getActiveSequenceContext() != NULL;
removeSequenceObjectAction->setEnabled(canRemoveFocusedSequence);
if (posSelector != NULL) {
qint64 currentSequenceLength = 0;
if (focusedWidget != NULL && focusedWidget->getActiveSequenceContext() != NULL) {
currentSequenceLength = focusedWidget->getActiveSequenceContext()->getSequenceLength();
}
posSelector->updateRange(1, currentSequenceLength);
}
}
void AnnotatedDNAView::sl_updatePasteAction() {
CHECK(focusedWidget != NULL, );
QAction *editAction = getEditActionFromSequenceWidget(focusedWidget);
SAFE_POINT(editAction != NULL, "Edit action is not found", );
const bool isEditModeChecked = editAction->isChecked();
QAction *pasteAction = clipb->getPasteSequenceAction();
SAFE_POINT(pasteAction != NULL, "Paste action is NULL", );
pasteAction->setEnabled(isEditModeChecked);
}
void AnnotatedDNAView::sl_relatedObjectRelationChanged() {
GObject *o = qobject_cast<GObject *>(sender());
CHECK(o != nullptr, );
QList<AnnotationTableObject *> currentAnnotations = getAnnotationObjects(false);
QList<GObject *> objectsToAdd;
QList<GObject *> allObjs = GObjectUtils::findObjectsRelatedToObjectByRole(o, GObjectTypes::ANNOTATION_TABLE, ObjectRole_Sequence, GObjectUtils::findAllObjects(UOF_LoadedOnly, GObjectTypes::ANNOTATION_TABLE), UnloadedObjectFilter::UOF_LoadedOnly);
foreach (GObject *obj, allObjs) {
if (!currentAnnotations.contains(qobject_cast<AnnotationTableObject *>(obj))) {
objectsToAdd << obj;
}
}
foreach (GObject *obj, objectsToAdd) {
QString error = addObject(obj);
if (!error.isEmpty()) {
coreLog.error(error);
}
}
}
void AnnotatedDNAView::sl_onContextMenuRequested() {
QMenu m;
m.addAction(posSelectorAction);
m.addSeparator()->setObjectName("FIRST_SEP");
clipb->addCopyMenu(&m);
m.addSeparator()->setObjectName(ADV_MENU_SECTION1_SEP);
addAddMenu(&m);
addAnalyseMenu(&m);
addAlignMenu(&m);
addExportMenu(&m);
addEditMenu(&m);
addRemoveMenu(&m);
m.addSeparator()->setObjectName(ADV_MENU_SECTION2_SEP);
if (annotationSelection->getAnnotations().size() == 1) {
Annotation *a = annotationSelection->getAnnotations().first();
const SharedAnnotationData &aData = a->getData();
AnnotationSettingsRegistry *registry = AppContext::getAnnotationsSettingsRegistry();
AnnotationSettings *as = registry->getAnnotationSettings(aData);
if (as->visible) {
toggleHLAction->setText(tr("Disable '%1' highlighting").arg(aData->name));
} else {
toggleHLAction->setText(tr("Enable '%1' highlighting").arg(aData->name));
}
const QIcon icon = GUIUtils::createSquareIcon(as->color, 10);
toggleHLAction->setIcon(icon);
toggleHLAction->setObjectName("toggle_HL_action");
m.addAction(toggleHLAction);
}
if (focusedWidget != NULL) {
focusedWidget->buildPopupMenu(m);
}
emit si_buildPopupMenu(this, &m);
m.exec(QCursor::pos());
}
void AnnotatedDNAView::sl_onFindPatternClicked() {
OptionsPanel *optionsPanel = getOptionsPanel();
SAFE_POINT(optionsPanel != NULL, "Internal error: options panel is NULL"
" when pattern search has been initiated!", );
const QString &findPatternGroupId = FindPatternWidgetFactory::getGroupId();
optionsPanel->openGroupById(findPatternGroupId);
}
void AnnotatedDNAView::sl_toggleHL() {
if (annotationSelection->isEmpty()) {
return;
}
const Annotation *a = annotationSelection->getAnnotations().first();
AnnotationSettingsRegistry *registry = AppContext::getAnnotationsSettingsRegistry();
AnnotationSettings *as = registry->getAnnotationSettings(a->getData());
as->visible = !as->visible;
registry->changeSettings(QList<AnnotationSettings *>() << as, true);
}
QString AnnotatedDNAView::tryAddObject(GObject *o) {
if (o->getGObjectType() == GObjectTypes::UNLOADED) {
AppContext::getTaskScheduler()->registerTopLevelTask(new AddToViewTask(this, o));
return "";
}
QList<ADVSequenceObjectContext *> rCtx;
if (o->getGObjectType() == GObjectTypes::ANNOTATION_TABLE) {
rCtx = findRelatedSequenceContexts(o);
if (rCtx.isEmpty()) {
//ask user if to create new association
QObjectScopedPointer<CreateObjectRelationDialogController> d = new CreateObjectRelationDialogController(o, getSequenceGObjectsWithContexts(), ObjectRole_Sequence, true, tr("Select sequence to associate annotations with:"));
d->exec();
CHECK(!d.isNull(), "");
bool objectAlreadyAdded = d->relationIsSet;
rCtx = findRelatedSequenceContexts(o);
if (rCtx.isEmpty() || objectAlreadyAdded) {
return "";
}
}
}
return addObject(o);
}
QString AnnotatedDNAView::addObject(GObject *o) {
QList<ADVSequenceObjectContext *> rCtx;
if (o->getGObjectType() == GObjectTypes::ANNOTATION_TABLE) {
rCtx = findRelatedSequenceContexts(o);
if (rCtx.isEmpty()) {
return tr("No sequence object found for annotations");
}
}
QString res = GObjectView::addObject(o);
if (!res.isEmpty()) {
return res;
}
bool internalViewObject = isChildWidgetObject(o);
if (internalViewObject) {
return "";
}
if (o->getGObjectType() == GObjectTypes::SEQUENCE) {
U2SequenceObject *dnaObj = qobject_cast<U2SequenceObject *>(o);
U2OpStatusImpl status;
if (!dnaObj->isValidDbiObject(status)) {
return "";
}
ADVSequenceObjectContext *sc = new ADVSequenceObjectContext(this, dnaObj);
seqContexts.append(sc);
//if mainSplitter==NULL -> its view initialization and widgets will be added later
if (mainSplitter != NULL && !isChildWidgetObject(dnaObj)) {
ADVSingleSequenceWidget *block = new ADVSingleSequenceWidget(sc, this);
connect(block, SIGNAL(si_titleClicked(ADVSequenceWidget *)), SLOT(sl_onSequenceWidgetTitleClicked(ADVSequenceWidget *)));
block->setObjectName("ADV_single_sequence_widget_" + QString::number(seqViews.count()));
addSequenceWidget(block);
block->addAction(createPasteAction());
setFocusedSequenceWidget(block);
}
addRelatedAnnotations(sc);
emit si_sequenceAdded(sc);
connect(o, SIGNAL(si_relatedObjectRelationChanged()), SLOT(sl_relatedObjectRelationChanged()));
} else if (o->getGObjectType() == GObjectTypes::ANNOTATION_TABLE) {
AnnotationTableObject *ao = qobject_cast<AnnotationTableObject *>(o);
SAFE_POINT(ao != NULL, "Invalid annotation table!", QString::null);
annotations.append(ao);
foreach (ADVSequenceObjectContext *sc, rCtx) {
sc->addAnnotationObject(ao);
}
emit si_annotationObjectAdded(ao);
}
return "";
}
QList<ADVSequenceObjectContext *> AnnotatedDNAView::findRelatedSequenceContexts(GObject *obj) const {
QList<GObject *> relatedObjects = GObjectUtils::selectRelations(obj, GObjectTypes::SEQUENCE, ObjectRole_Sequence, objects, UOF_LoadedOnly);
QList<ADVSequenceObjectContext *> res;
foreach (GObject *seqObj, relatedObjects) {
U2SequenceObject *dnaObj = qobject_cast<U2SequenceObject *>(seqObj);
ADVSequenceObjectContext *ctx = getSequenceContext(dnaObj);
res.append(ctx);
}
return res;
}
void AnnotatedDNAView::sl_onPosChangeRequest(int pos) {
uiLog.trace(QString("ADV: center change request: %1").arg(pos));
ADVSequenceWidget *seqBlock = getSequenceWidgetInFocus();
assert(seqBlock != NULL);
seqBlock->centerPosition(pos - 1);
}
void AnnotatedDNAView::sl_onShowPosSelectorRequest() {
ADVSequenceObjectContext *seqCtx = getSequenceInFocus();
assert(seqCtx != NULL);
QObjectScopedPointer<QDialog> dlg = new QDialog(getWidget());
dlg->setModal(true);
dlg->setWindowTitle(tr("Go to Position"));
PositionSelector *ps = new PositionSelector(dlg.data(), 1, seqCtx->getSequenceLength(), true);
connect(ps, SIGNAL(si_positionChanged(int)), SLOT(sl_onPosChangeRequest(int)));
dlg->exec();
}
void AnnotatedDNAView::insertWidgetIntoSplitter(ADVSplitWidget *splitWidget) {
assert(mainSplitter != NULL);
if (splitWidgets.contains(splitWidget)) {
return;
}
mainSplitter->insertWidget(0, splitWidget);
mainSplitter->setStretchFactor(0, 1);
splitWidgets.append(splitWidget);
}
void AnnotatedDNAView::unregisterSplitWidget(ADVSplitWidget *splitWidget) {
splitWidgets.removeOne(splitWidget);
}
ADVSequenceObjectContext *AnnotatedDNAView::getSequenceContext(AnnotationTableObject *obj) const {
SAFE_POINT(getAnnotationObjects(true).contains(obj),
"Unexpected annotation table detected!",
NULL);
foreach (ADVSequenceObjectContext *seqCtx, seqContexts) {
QSet<AnnotationTableObject *> aObjs = seqCtx->getAnnotationObjects(true);
if (aObjs.contains(obj)) {
return seqCtx;
}
}
return NULL;
}
ADVSequenceObjectContext *AnnotatedDNAView::getSequenceInFocus() const {
ADVSequenceWidget *w = getSequenceWidgetInFocus();
return w == NULL ? NULL : w->getActiveSequenceContext();
}
ADVSequenceObjectContext *AnnotatedDNAView::getSequenceContext(U2SequenceObject *obj) const {
foreach (ADVSequenceObjectContext *seqCtx, seqContexts) {
if (seqCtx->getSequenceObject() == obj) {
return seqCtx;
}
}
return NULL;
}
ADVSequenceObjectContext *AnnotatedDNAView::getSequenceContext(const GObjectReference &r) const {
foreach (ADVSequenceObjectContext *seqCtx, seqContexts) {
GObjectReference ref(seqCtx->getSequenceObject());
if (ref == r) {
return seqCtx;
}
}
return NULL;
}
void AnnotatedDNAView::addRelatedAnnotations(ADVSequenceObjectContext *seqCtx) {
QList<GObject *> allLoadedAnnotations = GObjectUtils::findAllObjects(UOF_LoadedOnly, GObjectTypes::ANNOTATION_TABLE);
QList<GObject *> loadedAndRelatedAnnotations = GObjectUtils::findObjectsRelatedToObjectByRole(
seqCtx->getSequenceObject(),
GObjectTypes::ANNOTATION_TABLE,
ObjectRole_Sequence,
allLoadedAnnotations,
UOF_LoadedOnly);
foreach (GObject *ao, loadedAndRelatedAnnotations) {
if (objects.contains(ao)) {
seqCtx->addAnnotationObject(qobject_cast<AnnotationTableObject *>(ao));
} else {
addObject(ao);
}
}
}
void AnnotatedDNAView::addAutoAnnotations(ADVSequenceObjectContext *seqCtx) {
AutoAnnotationObject *aa = new AutoAnnotationObject(seqCtx->getSequenceObject(), seqCtx->getAminoTT(), seqCtx);
seqCtx->addAutoAnnotationObject(aa->getAnnotationObject());
autoAnnotationsMap.insert(seqCtx, aa);
emit si_annotationObjectAdded(aa->getAnnotationObject());
foreach (ADVSequenceWidget *w, seqCtx->getSequenceWidgets()) {
AutoAnnotationsADVAction *aaAction = new AutoAnnotationsADVAction(w, aa);
w->addADVSequenceWidgetAction(aaAction);
}
}
void AnnotatedDNAView::removeAutoAnnotations(ADVSequenceObjectContext *seqCtx) {
AutoAnnotationObject *aa = autoAnnotationsMap.take(seqCtx);
cancelAutoAnnotationUpdates(aa);
emit si_annotationObjectRemoved(aa->getAnnotationObject());
delete aa;
}
void AnnotatedDNAView::cancelAutoAnnotationUpdates(AutoAnnotationObject *aa, bool *removeTaskExist) {
QList<Task *> tasks = AppContext::getTaskScheduler()->getTopLevelTasks();
foreach (Task *t, tasks) {
AutoAnnotationsUpdateTask *aaUpdateTask = qobject_cast<AutoAnnotationsUpdateTask *>(t);
if (aaUpdateTask != NULL) {
if (aaUpdateTask->getAutoAnnotationObject() == aa && !aaUpdateTask->isFinished()) {
aaUpdateTask->setAutoAnnotationInvalid();
aaUpdateTask->cancel();
if (removeTaskExist) {
*removeTaskExist = false;
foreach (const QPointer<Task> &subTask, aaUpdateTask->getSubtasks()) {
RemoveAnnotationsTask *rTask = qobject_cast<RemoveAnnotationsTask *>(subTask.data());
if (rTask && !rTask->isFinished()) {
*removeTaskExist = true;
}
}
}
}
}
}
}
/**
* Adds common graphs menu to the current for each sequence
*/
void AnnotatedDNAView::addGraphs(ADVSequenceObjectContext *seqCtx) {
foreach (ADVSequenceWidget *seqWidget, seqCtx->getSequenceWidgets()) {
ADVSingleSequenceWidget *singleSeqWidget = qobject_cast<ADVSingleSequenceWidget *>(seqWidget);
SAFE_POINT(singleSeqWidget != NULL, "singleSeqWidget is NULL", );
GraphMenuAction *graphMenuAction = new GraphMenuAction(singleSeqWidget->getSequenceObject()->getAlphabet());
if (singleSeqWidget != NULL) {
singleSeqWidget->addADVSequenceWidgetActionToViewsToolbar(graphMenuAction);
} else {
seqWidget->addADVSequenceWidgetAction(graphMenuAction);
}
}
}
void AnnotatedDNAView::sl_onDocumentAdded(Document *d) {
GObjectView::sl_onDocumentAdded(d);
importDocAnnotations(d);
}
void AnnotatedDNAView::importDocAnnotations(Document *doc) {
QList<GObject *> docObjects = doc->getObjects();
foreach (GObject *obj, objects) {
if (obj->getGObjectType() != GObjectTypes::SEQUENCE) {
continue;
}
QList<GObject *> relatedAnns = GObjectUtils::findObjectsRelatedToObjectByRole(obj, GObjectTypes::ANNOTATION_TABLE, ObjectRole_Sequence, docObjects, UOF_LoadedOnly);
foreach (GObject *annObj, relatedAnns) {
addObject(annObj);
}
}
}
void AnnotatedDNAView::seqWidgetMove(const QPoint &pos) {
SAFE_POINT(replacedSeqWidget, "Moving the NULL widget", );
CHECK_EXT(seqViews.contains(replacedSeqWidget), replacedSeqWidget = NULL, );
int index = seqViews.indexOf(replacedSeqWidget);
QRect replacedWidgetRect = replacedSeqWidget->geometry();
CHECK(!replacedWidgetRect.contains(pos), );
QRect prevWidgetRect;
// If previous widget exists, define its rectangle
if (index > 0) {
prevWidgetRect = seqViews[index - 1]->geometry();
}
QRect nextWidgetRect;
// If next widget exists, define its rectangle
if (index < seqViews.count() - 1) {
nextWidgetRect = seqViews[index + 1]->geometry();
}
if (prevWidgetRect.isValid() && pos.y() < prevWidgetRect.center().y()) {
seqViews.swap(index - 1, index);
scrolledWidgetLayout->insertWidget(index - 1, scrolledWidgetLayout->takeAt(index)->widget());
}
if (nextWidgetRect.isValid() && pos.y() > nextWidgetRect.top()) {
seqViews.swap(index, index + 1);
scrolledWidgetLayout->insertWidget(index, scrolledWidgetLayout->takeAt(index + 1)->widget());
}
}
void AnnotatedDNAView::finishSeqWidgetMove() {
replacedSeqWidget = NULL;
}
void AnnotatedDNAView::createCodonTableAction() {
QAction *showCodonTableAction = new ADVGlobalAction(this, QIcon(":core/images/codon_table.png"), tr("Show codon table"), std::numeric_limits<int>::max() - 1, ADVGlobalActionFlag_AddToToolbar);
showCodonTableAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_B));
showCodonTableAction->setShortcutContext(Qt::WindowShortcut);
connect(showCodonTableAction, SIGNAL(triggered()), codonTableView, SLOT(sl_setVisible()));
showCodonTableAction->setObjectName("Codon table");
showCodonTableAction->setCheckable(true);
}
void AnnotatedDNAView::sl_onDocumentLoadedStateChanged() {
Document *d = qobject_cast<Document *>(sender());
importDocAnnotations(d);
GObjectView::sl_onDocumentLoadedStateChanged();
}
QList<U2SequenceObject *> AnnotatedDNAView::getSequenceObjectsWithContexts() const {
QList<U2SequenceObject *> res;
foreach (ADVSequenceObjectContext *cx, seqContexts) {
res.append(cx->getSequenceObject());
}
return res;
}
QList<GObject *> AnnotatedDNAView::getSequenceGObjectsWithContexts() const {
QList<GObject *> res;
foreach (ADVSequenceObjectContext *cx, seqContexts) {
res.append(cx->getSequenceObject());
}
return res;
}
void AnnotatedDNAView::updateState(const AnnotatedDNAViewState &s) {
if (!s.isValid()) {
return;
}
QList<GObjectReference> objs = s.getSequenceObjects();
QVector<U2Region> regs = s.getSequenceSelections();
assert(objs.size() == regs.size());
//TODO: sync seq object lists
//TODO: sync annotation object lists
for (int i = 0; i < objs.size(); i++) {
const GObjectReference &ref = objs[i];
const U2Region ® = regs[i];
ADVSequenceObjectContext *seqCtx = getSequenceContext(ref);
if (seqCtx == NULL) {
continue;
}
U2Region wholeSeq(0, seqCtx->getSequenceLength());
U2Region finalSel = reg.intersect(wholeSeq);
seqCtx->getSequenceSelection()->setRegion(finalSel);
}
foreach (ADVSequenceWidget *sw, seqViews) {
sw->updateState(s.stateData);
}
foreach (ADVSplitWidget *w, splitWidgets) {
w->updateState(s.stateData);
}
annotationsView->updateState(s.stateData);
}
void AnnotatedDNAView::sl_editSettings() {
Settings *s = AppContext::getSettings();
SAFE_POINT(s != NULL, L10N::nullPointerError("AppContext::settings"), );
EditSettings settings;
settings.annotationStrategy =
(U1AnnotationUtils::AnnotationStrategyForResize)s->getValue(QString(SEQ_EDIT_SETTINGS_ROOT) + SEQ_EDIT_SETTINGS_ANNOTATION_STRATEGY,
U1AnnotationUtils::AnnotationStrategyForResize_Resize)
.toInt();
settings.recalculateQualifiers = s->getValue(QString(SEQ_EDIT_SETTINGS_ROOT) + SEQ_EDIT_SETTINGS_RECALC_QUALIFIERS, false).toBool();
QObjectScopedPointer<EditSettingsDialog> dlg = new EditSettingsDialog(settings, getSequenceWidgetInFocus());
int res = dlg->exec();
SAFE_POINT(!dlg.isNull(), "EditSettingsDialog is null!", );
if (res == QDialog::Accepted) {
const EditSettings &newSettings = dlg->getSettings();
s->setValue(QString(SEQ_EDIT_SETTINGS_ROOT) + SEQ_EDIT_SETTINGS_ANNOTATION_STRATEGY, newSettings.annotationStrategy);
s->setValue(QString(SEQ_EDIT_SETTINGS_ROOT) + SEQ_EDIT_SETTINGS_RECALC_QUALIFIERS, newSettings.recalculateQualifiers);
}
}
void AnnotatedDNAView::sl_addSequencePart() {
ADVSequenceObjectContext *seqCtx = getSequenceInFocus();
U2SequenceObject *seqObj = seqCtx->getSequenceObject();
EditSequencDialogConfig cfg;
cfg.mode = EditSequenceMode_Insert;
cfg.source = U2Region(0, seqObj->getSequenceLength());
cfg.alphabet = seqObj->getAlphabet();
cfg.position = 1;
ADVSingleSequenceWidget *wgt = qobject_cast<ADVSingleSequenceWidget *>(focusedWidget);
if (wgt != NULL) {
QList<GSequenceLineView *> views = wgt->getLineViews();
foreach (GSequenceLineView *v, views) {
if (v->hasFocus()) {
cfg.position = v->getLastPressPos();
break;
}
}
}
const QVector<U2Region> &selection = seqCtx->getSequenceSelection()->getSelectedRegions();
cfg.selectionRegions = selection;
QObjectScopedPointer<EditSequenceDialogController> dialog = new EditSequenceDialogController(cfg, getSequenceWidgetInFocus());
const int result = dialog->exec();
CHECK(!dialog.isNull(), );
CHECK(result == QDialog::Accepted, );
Task *t = new ModifySequenceContentTask(dialog->getDocumentFormatId(), seqObj, U2Region(dialog->getPosToInsert(), 0), dialog->getNewSequence(), dialog->recalculateQualifiers(), dialog->getAnnotationStrategy(), dialog->getDocumentPath(), dialog->mergeAnnotations());
connect(t, SIGNAL(si_stateChanged()), SLOT(sl_sequenceModifyTaskStateChanged()));
AppContext::getTaskScheduler()->registerTopLevelTask(t);
seqCtx->getSequenceSelection()->clear();
}
void AnnotatedDNAView::sl_removeSequencePart() {
ADVSequenceObjectContext *seqCtx = getSequenceInFocus();
U2SequenceObject *seqObj = seqCtx->getSequenceObject();
Document *curDoc = seqObj->getDocument();
U2Region source(0, seqObj->getSequenceLength());
U2Region selection = source;
if (seqCtx->getSequenceSelection()->getSelectedRegions().size() > 0) {
selection = seqCtx->getSequenceSelection()->getSelectedRegions().first();
}
QObjectScopedPointer<RemovePartFromSequenceDialogController> dialog = new RemovePartFromSequenceDialogController(selection, source, curDoc->getURLString(), getSequenceWidgetInFocus());
const int result = dialog->exec();
CHECK(!dialog.isNull(), );
CHECK(result == QDialog::Accepted, );
Task *t = NULL;
if (dialog->modifyCurrentDocument()) {
t = new ModifySequenceContentTask(dialog->getDocumentFormatId(), seqObj, dialog->getRegionToDelete(), DNASequence(), dialog->recalculateQualifiers(), dialog->getStrategy(), seqObj->getDocument()->getURL());
connect(t, SIGNAL(si_stateChanged()), SLOT(sl_sequenceModifyTaskStateChanged()));
} else {
t = new ModifySequenceContentTask(dialog->getDocumentFormatId(), seqObj, dialog->getRegionToDelete(), DNASequence(), dialog->recalculateQualifiers(), dialog->getStrategy(), dialog->getNewDocumentPath(), dialog->mergeAnnotations());
}
SAFE_POINT(t != NULL, L10N::nullPointerError("Edit sequence task"), );
AppContext::getTaskScheduler()->registerTopLevelTask(t);
seqCtx->getSequenceSelection()->clear();
}
void AnnotatedDNAView::sl_replaceSequencePart() {
ADVSequenceObjectContext *seqCtx = getSequenceInFocus();
U2SequenceObject *seqObj = seqCtx->getSequenceObject();
if (seqCtx->getSequenceSelection()->getSelectedRegions().isEmpty()) {
return;
}
EditSequencDialogConfig cfg;
cfg.mode = EditSequenceMode_Replace;
cfg.source = U2Region(0, seqObj->getSequenceLength());
cfg.alphabet = seqObj->getAlphabet();
U2Region selection = seqCtx->getSequenceSelection()->getSelectedRegions().first();
cfg.initialText = seqObj->getSequenceData(selection);
cfg.position = 1;
cfg.selectionRegions.append(selection);
QObjectScopedPointer<EditSequenceDialogController> dlg = new EditSequenceDialogController(cfg, getSequenceWidgetInFocus());
const int result = dlg->exec();
CHECK(!dlg.isNull(), );
CHECK(result == QDialog::Accepted, );
Task *t = new ModifySequenceContentTask(dlg->getDocumentFormatId(), seqObj, selection, dlg->getNewSequence(), dlg->recalculateQualifiers(), dlg->getAnnotationStrategy(), dlg->getDocumentPath(), dlg->mergeAnnotations());
connect(t, SIGNAL(si_stateChanged()), SLOT(sl_sequenceModifyTaskStateChanged()));
AppContext::getTaskScheduler()->registerTopLevelTask(t);
seqCtx->getSequenceSelection()->clear();
}
void AnnotatedDNAView::sl_removeSelectedSequenceObject() {
ADVSequenceWidget *sw = getSequenceWidgetInFocus();
ADVSequenceObjectContext *soc = sw->getActiveSequenceContext();
U2SequenceObject *so = soc->getSequenceObject();
removeObject(so);
}
QList<AnnotationTableObject *> AnnotatedDNAView::getAnnotationObjects(bool includeAutoAnnotations) const {
QList<AnnotationTableObject *> result = annotations;
if (includeAutoAnnotations) {
foreach (AutoAnnotationObject *aa, autoAnnotationsMap.values()) {
result += aa->getAnnotationObject();
}
}
return result;
}
void AnnotatedDNAView::updateAutoAnnotations() {
QList<AutoAnnotationObject *> autoAnnotations = autoAnnotationsMap.values();
foreach (AutoAnnotationObject *aa, autoAnnotations) {
aa->updateAll();
}
}
void AnnotatedDNAView::sl_sequenceModifyTaskStateChanged() {
Task *t = qobject_cast<Task *>(sender());
if (NULL == t) {
return;
}
if (t->getState() == Task::State_Finished && !(t->hasError() || t->isCanceled())) {
updateAutoAnnotations();
// TODO: there must be better way to do this
bool reverseComplementTask = false;
if (qobject_cast<ReverseComplementSequenceTask *>(t) != NULL ||
qobject_cast<ReverseSequenceTask *>(t) != NULL ||
qobject_cast<ComplementSequenceTask *>(t) != NULL) {
reverseComplementTask = true;
}
ADVSequenceObjectContext *seqCtx = getSequenceInFocus();
if (reverseComplementTask && seqCtx != NULL) {
const QVector<U2Region> regions = seqCtx->getSequenceSelection()->getSelectedRegions();
if (regions.count() == 1) {
const U2Region r = regions.first();
foreach (ADVSequenceWidget *w, seqCtx->getSequenceWidgets()) {
w->centerPosition((int)r.startPos);
}
}
}
ModifySequenceContentTask *modifyContentTask = qobject_cast<ModifySequenceContentTask *>(t);
if (modifyContentTask != NULL) {
qint64 seqSizeDelta = modifyContentTask->getSequenceLengthDelta();
if (seqSizeDelta > 0) { // try keeping all maximized zooms in max state
U2Region newMaxRange(0, modifyContentTask->getSequenceObject()->getSequenceLength());
U2Region oldMaxRange(0, newMaxRange.length - seqSizeDelta);
foreach (ADVSequenceObjectContext *ctx, seqContexts) {
if (ctx->getSequenceGObject() == modifyContentTask->getSequenceObject()) {
foreach (ADVSequenceWidget *w, seqCtx->getSequenceWidgets()) {
if (w->getVisibleRange() == oldMaxRange) {
w->setVisibleRange(newMaxRange);
}
}
}
}
}
}
updateMultiViewActions();
emit si_sequenceModified(seqCtx);
}
}
void AnnotatedDNAView::sl_paste() {
PasteFactory *pasteFactory = AppContext::getPasteFactory();
SAFE_POINT(pasteFactory != NULL, "adFactory is null", );
ADVSingleSequenceWidget *wgt = qobject_cast<ADVSingleSequenceWidget *>(focusedWidget);
CHECK(wgt != NULL, );
DetView *detView = wgt->getDetView();
SAFE_POINT(detView, "DetView is unexpectedly NULL", );
CHECK(detView->hasFocus(), );
SAFE_POINT(detView->getEditor(), "DetViewEditor is NULL", );
CHECK(detView->getEditor()->isEditMode(), );
PasteTask *task = pasteFactory->pasteTask(false);
connect(new TaskSignalMapper(task), SIGNAL(si_taskFinished(Task *)), detView->getEditor(), SLOT(sl_paste(Task *)));
AppContext::getTaskScheduler()->registerTopLevelTask(task);
}
void AnnotatedDNAView::onObjectRenamed(GObject *obj, const QString &oldName) {
if (obj->getGObjectType() == GObjectTypes::SEQUENCE) {
// 1. update title
OpenAnnotatedDNAViewTask::updateTitle(this);
// 2. update components
U2SequenceObject *seqObj = qobject_cast<U2SequenceObject *>(obj);
ADVSequenceObjectContext *ctx = getSequenceContext(seqObj);
foreach (ADVSequenceWidget *w, ctx->getSequenceWidgets()) {
w->onSequenceObjectRenamed(oldName);
}
}
}
void AnnotatedDNAView::sl_reverseComplementSequence() {
reverseComplementSequence();
}
void AnnotatedDNAView::sl_reverseSequence() {
reverseComplementSequence(true, false);
}
void AnnotatedDNAView::sl_complementSequence() {
reverseComplementSequence(false, true);
}
void AnnotatedDNAView::sl_selectionChanged() {
ADVSequenceObjectContext *seqCtx = getSequenceInFocus();
CHECK(seqCtx != NULL, );
DNASequenceSelection *selection = qobject_cast<DNASequenceSelection *>(sender());
CHECK(selection != NULL && seqCtx->getSequenceGObject() == selection->getSequenceObject(), );
replaceSequencePart->setEnabled(!seqCtx->getSequenceSelection()->isEmpty());
}
void AnnotatedDNAView::sl_aminoTranslationChanged() {
ADVSequenceObjectContext *seqCtx = getSequenceInFocus();
U2SequenceObject *seqObj = seqCtx->getSequenceObject();
QList<AutoAnnotationObject *> autoAnnotations = autoAnnotationsMap.values();
foreach (AutoAnnotationObject *aa, autoAnnotations) {
if (aa->getSeqObject() == seqObj) {
aa->updateTranslationDependent(seqCtx->getAminoTT());
}
}
}
void AnnotatedDNAView::reverseComplementSequence(bool reverse, bool complement) {
ADVSequenceObjectContext *seqCtx = getSequenceInFocus();
U2SequenceObject *seqObj = seqCtx->getSequenceObject();
QList<AnnotationTableObject *> annotationObjects = seqCtx->getAnnotationObjects(false).toList();
DNATranslation *complTT = NULL;
if (seqObj->getAlphabet()->isNucleic()) {
complTT = seqCtx->getComplementTT();
}
Task *t = NULL;
if (reverse && complement) {
t = new ReverseComplementSequenceTask(seqObj, annotationObjects, seqCtx->getSequenceSelection(), complTT);
} else if (reverse) {
t = new ReverseSequenceTask(seqObj, annotationObjects, seqCtx->getSequenceSelection());
} else if (complement) {
t = new ComplementSequenceTask(seqObj, annotationObjects, seqCtx->getSequenceSelection(), complTT);
}
AppContext::getTaskScheduler()->registerTopLevelTask(t);
connect(t, SIGNAL(si_stateChanged()), SLOT(sl_sequenceModifyTaskStateChanged()));
}
QAction *AnnotatedDNAView::getEditActionFromSequenceWidget(ADVSequenceWidget *seqWgt) {
ADVSingleSequenceWidget *wgt = qobject_cast<ADVSingleSequenceWidget *>(seqWgt);
SAFE_POINT(wgt != NULL, "ADVSingleSequenceWidget is NULL", NULL);
DetView *detView = wgt->getDetView();
SAFE_POINT(detView != NULL, "DetView is NULL", NULL);
DetViewSequenceEditor *editor = detView->getEditor();
SAFE_POINT(editor != NULL, "DetViewSequenceEditor is NULL", NULL);
QAction *editAction = editor->getEditAction();
SAFE_POINT(editAction != NULL, "EditAction is NULL", NULL);
return editAction;
}
bool AnnotatedDNAView::areAnnotationsInRange(const QList<Annotation *> &toCheck) {
foreach (Annotation *a, toCheck) {
QList<ADVSequenceObjectContext *> relatedSeqObjects = findRelatedSequenceContexts(a->getGObject());
foreach (ADVSequenceObjectContext *seq, relatedSeqObjects) {
SAFE_POINT(seq != NULL, "Sequence is NULL", true);
foreach (const U2Region &r, a->getRegions()) {
if (r.endPos() > seq->getSequenceLength()) {
return false;
}
}
}
}
return true;
}
} // namespace U2
| 39.335089 | 269 | 0.686678 | [
"geometry",
"object",
"3d"
] |
2725810676c6c2881ae2a73e0be4a377e8f706ab | 1,153 | cpp | C++ | test/beast/json/allocator.cpp | djarek/BeastLounge | 353b2397cf8507d6e36ed913d6682ae2d827a1ab | [
"BSL-1.0"
] | null | null | null | test/beast/json/allocator.cpp | djarek/BeastLounge | 353b2397cf8507d6e36ed913d6682ae2d827a1ab | [
"BSL-1.0"
] | null | null | null | test/beast/json/allocator.cpp | djarek/BeastLounge | 353b2397cf8507d6e36ed913d6682ae2d827a1ab | [
"BSL-1.0"
] | null | null | null | //
// Copyright (c) 2018-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/vinniefalco/BeastLounge
//
// Test that header file is self-contained.
#include <boost/beast/_experimental/json/allocator.hpp>
#include <boost/beast/_experimental/unit_test/suite.hpp>
#include <vector>
namespace boost {
namespace beast {
namespace json {
class allocator_test : public unit_test::suite
{
public:
void
testAllocator()
{
auto a1 = make_storage_ptr(
std::allocator<void>{});
auto a2 = a1;
auto a3 = std::move(a2);
a2 = a1;
a3 = std::move(a2);
std::vector<char, allocator<char>> v(
allocator<char>(make_storage_ptr(
std::allocator<void>{})));
v.resize(100);
BEAST_EXPECT(v.capacity() >= 100);
}
void
run()
{
testAllocator();
}
};
BEAST_DEFINE_TESTSUITE(beast,json,allocator);
} // json
} // beast
} // boost
| 22.173077 | 79 | 0.629662 | [
"vector"
] |
27262481622cdb7c0add7073bee9b45f7312aa23 | 4,061 | cpp | C++ | src/main.cpp | 0V/raytracer | cbe8f90e7e9a67f0eebd7dac01ea7476b9dc0ca9 | [
"MIT"
] | 1 | 2020-05-28T19:17:45.000Z | 2020-05-28T19:17:45.000Z | src/main.cpp | 0V/raytracer | cbe8f90e7e9a67f0eebd7dac01ea7476b9dc0ca9 | [
"MIT"
] | null | null | null | src/main.cpp | 0V/raytracer | cbe8f90e7e9a67f0eebd7dac01ea7476b9dc0ca9 | [
"MIT"
] | null | null | null | #include <iostream>
#include "photonmap.h"
#include "photonmap_sample.h"
#include "ppm_sample.h"
#include "progressive_photonmapping.h"
#include "raw_ppm.h"
#include "render.h"
#include "simple-mlt.h"
#include "simple-mlt-raw.h"
#include "smallppm_exp.h"
#include "sppm2.h"
#include "stochastic_ppm.h"
int main(int argc, char **argv)
{
// return simple_mlt_raw::render();
return simple_mlt::render();
std::cout << "Path tracing renderer: edupt base raytracer" << std::endl << std::endl;
// 640x480の画像、(2x2) * 4 sample / pixel
// edupt::render(640, 480, 4, 2);
constexpr int width = 320;
constexpr int height = 240;
int samples = 100;
int supersamples = 8;
int photon_num = 50000;
int gather_photon_radius = 32;
int gahter_max_photon_num = 64;
std::string scene_name = "sceneforppm3";
int photonmap_num = 10;
std::stringstream ss;
// return edupt::render_dof(width, height, samples, supersamples, 180, 4);
// return edupt::render(width, height, samples, supersamples);
// for (size_t i = 60; i < 200; i = i + 10)
// {
// edupt::render_dof(width, height, samples, supersamples, i);
// }
// return 0;
// return photonmap::smallppm::render();
// return ppm_sample::render();
// photon_num = 1000000;
// ss << "image_scene6_" << width << "_" << height << "_" << samples << "_" << supersamples << "_" << photon_num <<
// "_"
// << gather_photon_radius << "_" << gahter_max_photon_num << ".hdr";
// return photonmap::standard::render(ss.str(), width, height, samples, supersamples, photon_num,
// gather_photon_radius,
// gahter_max_photon_num);
// ss << "image_scene6_multiple_" << width << "_" << height << "_" << samples << "_" << supersamples << "_" <<
// photon_num << "_"
// << gather_photon_radius << "_" << gahter_max_photon_num << "_" << photonmap_num << ".hdr";
// return photonmap::standard::render_multiple_photonmap(ss.str(), width, height, samples, supersamples, photon_num,
// gather_photon_radius, gahter_max_photon_num,
// photonmap_num);
// return photonmap_sample::render();
//////////////// COMPACT SET ////////////////
// samples = 32;
// supersamples = 1;
// gather_photon_radius = 25;
// photonmap::progressive::InitialRadius = 25;
// gahter_max_photon_num = 10000;
// photon_num = 10000000;
/////////////////////////////////////////////
samples = 100;
supersamples = 1;
gather_photon_radius = 5;
photonmap::progressive::InitialRadius = gather_photon_radius;
gahter_max_photon_num = 10000;
photon_num = 10000000;
ss << "image_" << scene_name << "_ppm101_" << width << "_" << height << "_" << samples << "_" << supersamples << "_"
<< photon_num << "_" << gather_photon_radius << "_" << gahter_max_photon_num << "_" << photonmap_num;
// return photonmap::progressive2::render(ss.str(), width, height, samples, supersamples, photon_num,
// gather_photon_radius, gahter_max_photon_num);
return photonmap::progressive::render(ss.str(), width, height, samples, supersamples, photon_num,
gather_photon_radius, gahter_max_photon_num);
// photonmap::sppm::StochasticPpm<width, height> sppm(samples, supersamples);
photonmap::sppm2::StochasticPpm<width, height> sppm(samples, supersamples);
return sppm.render(ss.str(), width, height, samples, supersamples, photon_num, gather_photon_radius,
gahter_max_photon_num, 100);
// return photonmap::sppm::render(ss.str(), width, height, samples, supersamples, photon_num,
// gather_photon_radius,
// gahter_max_photon_num);
} | 41.438776 | 121 | 0.57769 | [
"render"
] |
272676376705ca4f95af0e15d58f9ad36c4a80d0 | 888 | cpp | C++ | projects/codility/zirconium2019/zirconium2019.cpp | antaljanosbenjamin/miscellaneous | 56d2f0030d1d8ff0dd6dd077c3d1ec981f6c2747 | [
"MIT"
] | 2 | 2021-06-24T21:46:56.000Z | 2021-09-24T07:51:04.000Z | projects/codility/zirconium2019/zirconium2019.cpp | antaljanosbenjamin/miscellaneous | 56d2f0030d1d8ff0dd6dd077c3d1ec981f6c2747 | [
"MIT"
] | null | null | null | projects/codility/zirconium2019/zirconium2019.cpp | antaljanosbenjamin/miscellaneous | 56d2f0030d1d8ff0dd6dd077c3d1ec981f6c2747 | [
"MIT"
] | null | null | null |
int main() {
{
std::vector<int> A{4, 2, 1}; // NOLINT(readability-magic-numbers)
std::vector<int> B{2, 5, 3}; // NOLINT(readability-magic-numbers)
std::cout << "10 == " << solution(A, B, 2) << '\n'; // NOLINT(readability-magic-numbers)
}
{
std::vector<int> A{7, 1, 4, 4}; // NOLINT(readability-magic-numbers)
std::vector<int> B{5, 3, 4, 3}; // NOLINT(readability-magic-numbers)
std::cout << "18 == " << solution(A, B, 2) << '\n'; // NOLINT(readability-magic-numbers)
}
{
std::vector<int> A{5, 5, 5}; // NOLINT(readability-magic-numbers)
std::vector<int> B{5, 5, 5}; // NOLINT(readability-magic-numbers)
std::cout << "15 == " << solution(A, B, 1) << '\n'; // NOLINT(readability-magic-numbers)
}
return 0;
} | 46.736842 | 92 | 0.490991 | [
"vector"
] |
2728923cfaa73f814051136c1c3f4b692c90840e | 191,741 | cpp | C++ | deps/mozjs/src/shell/js.cpp | ktrzeciaknubisa/jxcore-binary-packaging | 5759df084be10a259a4a4f1b38c214c6084a7c0f | [
"Apache-2.0"
] | 2,494 | 2015-02-11T04:34:13.000Z | 2022-03-31T14:21:47.000Z | deps/mozjs/src/shell/js.cpp | ktrzeciaknubisa/jxcore-binary-packaging | 5759df084be10a259a4a4f1b38c214c6084a7c0f | [
"Apache-2.0"
] | 685 | 2015-02-11T17:14:26.000Z | 2021-04-13T09:58:39.000Z | deps/mozjs/src/shell/js.cpp | ktrzeciaknubisa/jxcore-binary-packaging | 5759df084be10a259a4a4f1b38c214c6084a7c0f | [
"Apache-2.0"
] | 442 | 2015-02-12T13:45:46.000Z | 2022-03-21T05:28:05.000Z | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: set ts=8 sts=4 et sw=4 tw=99:
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* JS shell. */
#include "mozilla/ArrayUtils.h"
#include "mozilla/Atomics.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/GuardObjects.h"
#include "mozilla/PodOperations.h"
#ifdef XP_WIN
# include <direct.h>
# include <process.h>
#endif
#include <errno.h>
#include <fcntl.h>
#if defined(XP_WIN)
# include <io.h> /* for isatty() */
#endif
#include <locale.h>
#include <math.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#ifdef XP_UNIX
# include <sys/mman.h>
# include <sys/stat.h>
# include <sys/wait.h>
# include <unistd.h>
#endif
#include "jsapi.h"
#include "jsarray.h"
#include "jsatom.h"
#include "jscntxt.h"
#include "jsfun.h"
#include "jslock.h"
#include "jsobj.h"
#include "jsprf.h"
#include "jsscript.h"
#include "jstypes.h"
#include "jsutil.h"
#ifdef XP_WIN
# include "jswin.h"
#endif
#include "jswrapper.h"
#include "prmjtime.h"
#include "builtin/TestingFunctions.h"
#include "frontend/Parser.h"
#include "jit/arm/Simulator-arm.h"
#include "jit/Ion.h"
#include "js/OldDebugAPI.h"
#include "js/StructuredClone.h"
#include "perf/jsperf.h"
#include "shell/jsheaptools.h"
#include "shell/jsoptparse.h"
#include "vm/ArgumentsObject.h"
#include "vm/Debugger.h"
#include "vm/HelperThreads.h"
#include "vm/Monitor.h"
#include "vm/Shape.h"
#include "vm/TypedArrayObject.h"
#include "vm/WrapperObject.h"
#include "jscompartmentinlines.h"
#include "jsobjinlines.h"
#include "vm/Interpreter-inl.h"
#include "vm/Stack-inl.h"
#ifdef XP_WIN
# define PATH_MAX (MAX_PATH > _MAX_DIR ? MAX_PATH : _MAX_DIR)
#else
# include <libgen.h>
#endif
using namespace js;
using namespace js::cli;
using mozilla::ArrayLength;
using mozilla::MakeUnique;
using mozilla::Maybe;
using mozilla::NumberEqualsInt32;
using mozilla::PodCopy;
using mozilla::PodEqual;
using mozilla::UniquePtr;
enum JSShellExitCode {
EXITCODE_RUNTIME_ERROR = 3,
EXITCODE_FILE_NOT_FOUND = 4,
EXITCODE_OUT_OF_MEMORY = 5,
EXITCODE_TIMEOUT = 6
};
enum PathResolutionMode {
RootRelative,
ScriptRelative
};
static size_t gStackChunkSize = 8192;
/*
* Note: This limit should match the stack limit set by the browser in
* js/xpconnect/src/XPCJSRuntime.cpp
*/
#if defined(MOZ_ASAN) || (defined(DEBUG) && !defined(XP_WIN))
static size_t gMaxStackSize = 2 * 128 * sizeof(size_t) * 1024;
#else
static size_t gMaxStackSize = 128 * sizeof(size_t) * 1024;
#endif
/*
* Limit the timeout to 30 minutes to prevent an overflow on platfoms
* that represent the time internally in microseconds using 32-bit int.
*/
static double MAX_TIMEOUT_INTERVAL = 1800.0;
static double gTimeoutInterval = -1.0;
static volatile bool gServiceInterrupt = false;
static Maybe<JS::PersistentRootedValue> gInterruptFunc;
static bool enableDisassemblyDumps = false;
static bool printTiming = false;
static const char *jsCacheDir = nullptr;
static const char *jsCacheAsmJSPath = nullptr;
static bool jsCachingEnabled = false;
mozilla::Atomic<bool> jsCacheOpened(false);
static bool
SetTimeoutValue(JSContext *cx, double t);
static bool
InitWatchdog(JSRuntime *rt);
static void
KillWatchdog();
static bool
ScheduleWatchdog(JSRuntime *rt, double t);
static void
CancelExecution(JSRuntime *rt);
/*
* Watchdog thread state.
*/
static PRLock *gWatchdogLock = nullptr;
static PRCondVar *gWatchdogWakeup = nullptr;
static PRThread *gWatchdogThread = nullptr;
static bool gWatchdogHasTimeout = false;
static int64_t gWatchdogTimeout = 0;
static PRCondVar *gSleepWakeup = nullptr;
static int gExitCode = 0;
static bool gQuitting = false;
static bool gGotError = false;
static FILE *gErrFile = nullptr;
static FILE *gOutFile = nullptr;
static bool reportWarnings = true;
static bool compileOnly = false;
static bool fuzzingSafe = false;
#ifdef DEBUG
static bool dumpEntrainedVariables = false;
static bool OOM_printAllocationCount = false;
#endif
enum JSShellErrNum {
#define MSG_DEF(name, count, exception, format) \
name,
#include "jsshell.msg"
#undef MSG_DEF
JSShellErr_Limit
};
static JSContext *
NewContext(JSRuntime *rt);
static void
DestroyContext(JSContext *cx, bool withGC);
static JSObject *
NewGlobalObject(JSContext *cx, JS::CompartmentOptions &options,
JSPrincipals *principals);
static const JSErrorFormatString *
my_GetErrorMessage(void *userRef, const unsigned errorNumber);
/*
* A toy principals type for the shell.
*
* In the shell, a principal is simply a 32-bit mask: P subsumes Q if the
* set bits in P are a superset of those in Q. Thus, the principal 0 is
* subsumed by everything, and the principal ~0 subsumes everything.
*
* As a special case, a null pointer as a principal is treated like 0xffff.
*
* The 'newGlobal' function takes an option indicating which principal the
* new global should have; 'evaluate' does for the new code.
*/
class ShellPrincipals: public JSPrincipals {
uint32_t bits;
static uint32_t getBits(JSPrincipals *p) {
if (!p)
return 0xffff;
return static_cast<ShellPrincipals *>(p)->bits;
}
public:
explicit ShellPrincipals(uint32_t bits, int32_t refcount = 0) : bits(bits) {
this->refcount = refcount;
}
static void destroy(JSPrincipals *principals) {
MOZ_ASSERT(principals != &fullyTrusted);
MOZ_ASSERT(principals->refcount == 0);
js_free(static_cast<ShellPrincipals *>(principals));
}
static bool subsumes(JSPrincipals *first, JSPrincipals *second) {
uint32_t firstBits = getBits(first);
uint32_t secondBits = getBits(second);
return (firstBits | secondBits) == firstBits;
}
static JSSecurityCallbacks securityCallbacks;
// Fully-trusted principals singleton.
static ShellPrincipals fullyTrusted;
};
JSSecurityCallbacks ShellPrincipals::securityCallbacks = {
nullptr, // contentSecurityPolicyAllows
subsumes
};
// The fully-trusted principal subsumes all other principals.
ShellPrincipals ShellPrincipals::fullyTrusted(-1, 1);
#ifdef EDITLINE
extern "C" {
extern JS_EXPORT_API(char *) readline(const char *prompt);
extern JS_EXPORT_API(void) add_history(char *line);
} // extern "C"
#endif
static char *
GetLine(FILE *file, const char * prompt)
{
size_t size;
char *buffer;
#ifdef EDITLINE
/*
* Use readline only if file is stdin, because there's no way to specify
* another handle. Are other filehandles interactive?
*/
if (file == stdin) {
char *linep = readline(prompt);
/*
* We set it to zero to avoid complaining about inappropriate ioctl
* for device in the case of EOF. Looks like errno == 251 if line is
* finished with EOF and errno == 25 (EINVAL on Mac) if there is
* nothing left to read.
*/
if (errno == 251 || errno == 25 || errno == EINVAL)
errno = 0;
if (!linep)
return nullptr;
if (linep[0] != '\0')
add_history(linep);
return linep;
}
#endif
size_t len = 0;
if (*prompt != '\0') {
fprintf(gOutFile, "%s", prompt);
fflush(gOutFile);
}
size = 80;
buffer = (char *) malloc(size);
if (!buffer)
return nullptr;
char *current = buffer;
while (fgets(current, size - len, file)) {
len += strlen(current);
char *t = buffer + len - 1;
if (*t == '\n') {
/* Line was read. We remove '\n' and exit. */
*t = '\0';
return buffer;
}
if (len + 1 == size) {
size = size * 2;
char *tmp = (char *) js_realloc(buffer, size);
if (!tmp) {
free(buffer);
return nullptr;
}
buffer = tmp;
}
current = buffer + len;
}
if (len && !ferror(file))
return buffer;
free(buffer);
return nullptr;
}
/* State to store as JSContext private. */
struct JSShellContextData {
/* Creation timestamp, used by the elapsed() shell builtin. */
int64_t startTime;
};
static JSShellContextData *
NewContextData()
{
JSShellContextData *data = (JSShellContextData *)
js_calloc(sizeof(JSShellContextData), 1);
if (!data)
return nullptr;
data->startTime = PRMJ_Now();
return data;
}
static inline JSShellContextData *
GetContextData(JSContext *cx)
{
JSShellContextData *data = (JSShellContextData *) JS_GetContextPrivate(cx);
JS_ASSERT(data);
return data;
}
static bool
ShellInterruptCallback(JSContext *cx)
{
if (!gServiceInterrupt)
return true;
bool result;
RootedValue interruptFunc(cx, *gInterruptFunc);
if (!interruptFunc.isNull()) {
JS::AutoSaveExceptionState savedExc(cx);
JSAutoCompartment ac(cx, &interruptFunc.toObject());
RootedValue rval(cx);
if (!JS_CallFunctionValue(cx, JS::NullPtr(), interruptFunc,
JS::HandleValueArray::empty(), &rval))
{
return false;
}
if (rval.isBoolean())
result = rval.toBoolean();
else
result = false;
} else {
result = false;
}
if (!result && gExitCode == 0)
gExitCode = EXITCODE_TIMEOUT;
// Reset gServiceInterrupt. CancelExecution or InterruptIf will set it to
// true to distinguish watchdog or user triggered interrupts.
gServiceInterrupt = false;
return result;
}
/*
* Some UTF-8 files, notably those written using Notepad, have a Unicode
* Byte-Order-Mark (BOM) as their first character. This is useless (byte-order
* is meaningless for UTF-8) but causes a syntax error unless we skip it.
*/
static void
SkipUTF8BOM(FILE* file)
{
int ch1 = fgetc(file);
int ch2 = fgetc(file);
int ch3 = fgetc(file);
// Skip the BOM
if (ch1 == 0xEF && ch2 == 0xBB && ch3 == 0xBF)
return;
// No BOM - revert
if (ch3 != EOF)
ungetc(ch3, file);
if (ch2 != EOF)
ungetc(ch2, file);
if (ch1 != EOF)
ungetc(ch1, file);
}
static void
RunFile(JSContext *cx, Handle<JSObject*> obj, const char *filename, FILE *file, bool compileOnly)
{
SkipUTF8BOM(file);
// To support the UNIX #! shell hack, gobble the first line if it starts
// with '#'.
int ch = fgetc(file);
if (ch == '#') {
while ((ch = fgetc(file)) != EOF) {
if (ch == '\n' || ch == '\r')
break;
}
}
ungetc(ch, file);
int64_t t1 = PRMJ_Now();
RootedScript script(cx);
{
CompileOptions options(cx);
options.setIntroductionType("js shell file")
.setUTF8(true)
.setFileAndLine(filename, 1)
.setCompileAndGo(true)
.setNoScriptRval(true);
gGotError = false;
(void) JS::Compile(cx, obj, options, file, &script);
JS_ASSERT_IF(!script, gGotError);
}
#ifdef DEBUG
if (dumpEntrainedVariables)
AnalyzeEntrainedVariables(cx, script);
#endif
if (script && !compileOnly) {
if (!JS_ExecuteScript(cx, obj, script)) {
if (!gQuitting && gExitCode != EXITCODE_TIMEOUT)
gExitCode = EXITCODE_RUNTIME_ERROR;
}
int64_t t2 = PRMJ_Now() - t1;
if (printTiming)
printf("runtime = %.3f ms\n", double(t2) / PRMJ_USEC_PER_MSEC);
}
}
static bool
EvalAndPrint(JSContext *cx, Handle<JSObject*> global, const char *bytes, size_t length,
int lineno, bool compileOnly, FILE *out)
{
// Eval.
JS::CompileOptions options(cx);
options.setIntroductionType("js shell interactive")
.setUTF8(true)
.setCompileAndGo(true)
.setFileAndLine("typein", lineno);
RootedScript script(cx);
if (!JS::Compile(cx, global, options, bytes, length, &script))
return false;
if (compileOnly)
return true;
RootedValue result(cx);
if (!JS_ExecuteScript(cx, global, script, &result))
return false;
if (!result.isUndefined()) {
// Print.
RootedString str(cx);
str = JS_ValueToSource(cx, result);
if (!str)
return false;
char *utf8chars = JS_EncodeStringToUTF8(cx, str);
if (!utf8chars)
return false;
fprintf(out, "%s\n", utf8chars);
JS_free(cx, utf8chars);
}
return true;
}
static void
ReadEvalPrintLoop(JSContext *cx, Handle<JSObject*> global, FILE *in, FILE *out, bool compileOnly)
{
int lineno = 1;
bool hitEOF = false;
do {
/*
* Accumulate lines until we get a 'compilable unit' - one that either
* generates an error (before running out of source) or that compiles
* cleanly. This should be whenever we get a complete statement that
* coincides with the end of a line.
*/
int startline = lineno;
typedef Vector<char, 32> CharBuffer;
CharBuffer buffer(cx);
do {
ScheduleWatchdog(cx->runtime(), -1);
gServiceInterrupt = false;
errno = 0;
char *line = GetLine(in, startline == lineno ? "js> " : "");
if (!line) {
if (errno) {
JS_ReportError(cx, strerror(errno));
return;
}
hitEOF = true;
break;
}
if (!buffer.append(line, strlen(line)) || !buffer.append('\n'))
return;
lineno++;
if (!ScheduleWatchdog(cx->runtime(), gTimeoutInterval)) {
hitEOF = true;
break;
}
} while (!JS_BufferIsCompilableUnit(cx, global, buffer.begin(), buffer.length()));
if (hitEOF && buffer.empty())
break;
if (!EvalAndPrint(cx, global, buffer.begin(), buffer.length(), startline, compileOnly,
out))
{
// Catch the error, report it, and keep going.
JS_ReportPendingException(cx);
}
} while (!hitEOF && !gQuitting);
fprintf(out, "\n");
}
class AutoCloseInputFile
{
private:
FILE *f_;
public:
explicit AutoCloseInputFile(FILE *f) : f_(f) {}
~AutoCloseInputFile() {
if (f_ && f_ != stdin)
fclose(f_);
}
};
static void
Process(JSContext *cx, JSObject *obj_, const char *filename, bool forceTTY)
{
RootedObject obj(cx, obj_);
FILE *file;
if (forceTTY || !filename || strcmp(filename, "-") == 0) {
file = stdin;
} else {
file = fopen(filename, "r");
if (!file) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr,
JSSMSG_CANT_OPEN, filename, strerror(errno));
gExitCode = EXITCODE_FILE_NOT_FOUND;
return;
}
}
AutoCloseInputFile autoClose(file);
if (!forceTTY && !isatty(fileno(file))) {
// It's not interactive - just execute it.
RunFile(cx, obj, filename, file, compileOnly);
} else {
// It's an interactive filehandle; drop into read-eval-print loop.
ReadEvalPrintLoop(cx, obj, file, gOutFile, compileOnly);
}
}
static bool
Version(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
JSVersion origVersion = JS_GetVersion(cx);
if (args.length() == 0 || args[0].isUndefined()) {
/* Get version. */
args.rval().setInt32(origVersion);
} else {
/* Set version. */
int32_t v = -1;
if (args[0].isInt32()) {
v = args[0].toInt32();
} else if (args[0].isDouble()) {
double fv = args[0].toDouble();
int32_t fvi;
if (NumberEqualsInt32(fv, &fvi))
v = fvi;
}
if (v < 0 || v > JSVERSION_LATEST) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_INVALID_ARGS, "version");
return false;
}
JS_SetVersionForCompartment(js::GetContextCompartment(cx), JSVersion(v));
args.rval().setInt32(origVersion);
}
return true;
}
/*
* Resolve a (possibly) relative filename to an absolute path. If
* |scriptRelative| is true, then the result will be relative to the directory
* containing the currently-running script, or the current working directory if
* the currently-running script is "-e" (namely, you're using it from the
* command line.) Otherwise, it will be relative to the current working
* directory.
*/
static JSString *
ResolvePath(JSContext *cx, HandleString filenameStr, PathResolutionMode resolveMode)
{
JSAutoByteString filename(cx, filenameStr);
if (!filename)
return nullptr;
const char *pathname = filename.ptr();
if (pathname[0] == '/')
return filenameStr;
#ifdef XP_WIN
// Various forms of absolute paths per http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx
// "\..."
if (pathname[0] == '\\')
return filenameStr;
// "C:\..."
if (strlen(pathname) > 3 && isalpha(pathname[0]) && pathname[1] == ':' && pathname[2] == '\\')
return filenameStr;
// "\\..."
if (strlen(pathname) > 2 && pathname[1] == '\\' && pathname[2] == '\\')
return filenameStr;
#endif
/* Get the currently executing script's name. */
JS::AutoFilename scriptFilename;
if (!DescribeScriptedCaller(cx, &scriptFilename))
return nullptr;
if (!scriptFilename.get())
return nullptr;
if (strcmp(scriptFilename.get(), "-e") == 0 || strcmp(scriptFilename.get(), "typein") == 0)
resolveMode = RootRelative;
static char buffer[PATH_MAX+1];
if (resolveMode == ScriptRelative) {
#ifdef XP_WIN
// The docs say it can return EINVAL, but the compiler says it's void
_splitpath(scriptFilename.get(), nullptr, buffer, nullptr, nullptr);
#else
strncpy(buffer, scriptFilename.get(), PATH_MAX+1);
if (buffer[PATH_MAX] != '\0')
return nullptr;
// dirname(buffer) might return buffer, or it might return a
// statically-allocated string
memmove(buffer, dirname(buffer), strlen(buffer) + 1);
#endif
} else {
const char *cwd = getcwd(buffer, PATH_MAX);
if (!cwd)
return nullptr;
}
size_t len = strlen(buffer);
buffer[len] = '/';
strncpy(buffer + len + 1, pathname, sizeof(buffer) - (len+1));
if (buffer[PATH_MAX] != '\0')
return nullptr;
return JS_NewStringCopyZ(cx, buffer);
}
static bool
CreateMappedArrayBuffer(JSContext *cx, unsigned argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() < 1 || args.length() > 3) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr,
args.length() < 1 ? JSSMSG_NOT_ENOUGH_ARGS : JSSMSG_TOO_MANY_ARGS,
"createMappedArrayBuffer");
return false;
}
RootedString rawFilenameStr(cx, JS::ToString(cx, args[0]));
if (!rawFilenameStr)
return false;
// It's a little bizarre to resolve relative to the script, but for testing
// I need a file at a known location, and the only good way I know of to do
// that right now is to include it in the repo alongside the test script.
// Bug 944164 would introduce an alternative.
JSString *filenameStr = ResolvePath(cx, rawFilenameStr, ScriptRelative);
if (!filenameStr)
return false;
JSAutoByteString filename(cx, filenameStr);
if (!filename)
return false;
uint32_t offset = 0;
if (args.length() >= 2) {
if (!JS::ToUint32(cx, args[1], &offset))
return false;
}
bool sizeGiven = false;
uint32_t size;
if (args.length() >= 3) {
if (!JS::ToUint32(cx, args[2], &size))
return false;
sizeGiven = true;
if (offset > size) {
JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr,
JSMSG_ARG_INDEX_OUT_OF_RANGE, "2");
return false;
}
}
FILE *file = fopen(filename.ptr(), "r");
if (!file) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr,
JSSMSG_CANT_OPEN, filename.ptr(), strerror(errno));
return false;
}
AutoCloseInputFile autoClose(file);
if (!sizeGiven) {
struct stat st;
if (fstat(fileno(file), &st) < 0) {
JS_ReportError(cx, "Unable to stat file");
return false;
}
if (st.st_size < off_t(offset)) {
JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr,
JSMSG_ARG_INDEX_OUT_OF_RANGE, "2");
return false;
}
size = st.st_size - offset;
}
void *contents = JS_CreateMappedArrayBufferContents(fileno(file), offset, size);
if (!contents) {
JS_ReportError(cx, "failed to allocate mapped array buffer contents (possibly due to bad alignment)");
return false;
}
RootedObject obj(cx, JS_NewMappedArrayBufferWithContents(cx, size, contents));
if (!obj)
return false;
args.rval().setObject(*obj);
return true;
}
static bool
Options(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
JS::RuntimeOptions oldRuntimeOptions = JS::RuntimeOptionsRef(cx);
for (unsigned i = 0; i < args.length(); i++) {
JSString *str = JS::ToString(cx, args[i]);
if (!str)
return false;
args[i].setString(str);
JSAutoByteString opt(cx, str);
if (!opt)
return false;
if (strcmp(opt.ptr(), "strict") == 0)
JS::RuntimeOptionsRef(cx).toggleExtraWarnings();
else if (strcmp(opt.ptr(), "werror") == 0)
JS::RuntimeOptionsRef(cx).toggleWerror();
else if (strcmp(opt.ptr(), "strict_mode") == 0)
JS::RuntimeOptionsRef(cx).toggleStrictMode();
else {
JS_ReportError(cx,
"unknown option name '%s'."
" The valid names are strict,"
" werror, and strict_mode.",
opt.ptr());
return false;
}
}
char *names = strdup("");
bool found = false;
if (names && oldRuntimeOptions.extraWarnings()) {
names = JS_sprintf_append(names, "%s%s", found ? "," : "", "strict");
found = true;
}
if (names && oldRuntimeOptions.werror()) {
names = JS_sprintf_append(names, "%s%s", found ? "," : "", "werror");
found = true;
}
if (names && oldRuntimeOptions.strictMode()) {
names = JS_sprintf_append(names, "%s%s", found ? "," : "", "strict_mode");
found = true;
}
if (!names) {
JS_ReportOutOfMemory(cx);
return false;
}
JSString *str = JS_NewStringCopyZ(cx, names);
free(names);
if (!str)
return false;
args.rval().setString(str);
return true;
}
static bool
LoadScript(JSContext *cx, unsigned argc, jsval *vp, bool scriptRelative)
{
CallArgs args = CallArgsFromVp(argc, vp);
RootedObject thisobj(cx, JS_THIS_OBJECT(cx, vp));
if (!thisobj)
return false;
RootedString str(cx);
for (unsigned i = 0; i < args.length(); i++) {
str = JS::ToString(cx, args[i]);
if (!str) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_INVALID_ARGS, "load");
return false;
}
str = ResolvePath(cx, str, scriptRelative ? ScriptRelative : RootRelative);
if (!str) {
JS_ReportError(cx, "unable to resolve path");
return false;
}
JSAutoByteString filename(cx, str);
if (!filename)
return false;
errno = 0;
CompileOptions opts(cx);
opts.setIntroductionType("js shell load")
.setUTF8(true)
.setCompileAndGo(true)
.setNoScriptRval(true);
RootedScript script(cx);
if ((compileOnly && !Compile(cx, thisobj, opts, filename.ptr(), &script)) ||
!Evaluate(cx, thisobj, opts, filename.ptr()))
{
return false;
}
}
args.rval().setUndefined();
return true;
}
static bool
Load(JSContext *cx, unsigned argc, jsval *vp)
{
return LoadScript(cx, argc, vp, false);
}
static bool
LoadScriptRelativeToScript(JSContext *cx, unsigned argc, jsval *vp)
{
return LoadScript(cx, argc, vp, true);
}
// Populate |options| with the options given by |opts|'s properties. If we
// need to convert a filename to a C string, let fileNameBytes own the
// bytes.
static bool
ParseCompileOptions(JSContext *cx, CompileOptions &options, HandleObject opts,
JSAutoByteString &fileNameBytes)
{
RootedValue v(cx);
RootedString s(cx);
if (!JS_GetProperty(cx, opts, "compileAndGo", &v))
return false;
if (!v.isUndefined())
options.setCompileAndGo(ToBoolean(v));
if (!JS_GetProperty(cx, opts, "noScriptRval", &v))
return false;
if (!v.isUndefined())
options.setNoScriptRval(ToBoolean(v));
if (!JS_GetProperty(cx, opts, "fileName", &v))
return false;
if (v.isNull()) {
options.setFile(nullptr);
} else if (!v.isUndefined()) {
s = ToString(cx, v);
if (!s)
return false;
char *fileName = fileNameBytes.encodeLatin1(cx, s);
if (!fileName)
return false;
options.setFile(fileName);
}
if (!JS_GetProperty(cx, opts, "element", &v))
return false;
if (v.isObject())
options.setElement(&v.toObject());
if (!JS_GetProperty(cx, opts, "elementAttributeName", &v))
return false;
if (!v.isUndefined()) {
s = ToString(cx, v);
if (!s)
return false;
options.setElementAttributeName(s);
}
if (!JS_GetProperty(cx, opts, "lineNumber", &v))
return false;
if (!v.isUndefined()) {
uint32_t u;
if (!ToUint32(cx, v, &u))
return false;
options.setLine(u);
}
if (!JS_GetProperty(cx, opts, "sourceIsLazy", &v))
return false;
if (v.isBoolean())
options.setSourceIsLazy(v.toBoolean());
return true;
}
class AutoNewContext
{
private:
JSContext *oldcx;
JSContext *newcx;
Maybe<JSAutoRequest> newRequest;
Maybe<AutoCompartment> newCompartment;
AutoNewContext(const AutoNewContext &) MOZ_DELETE;
public:
AutoNewContext() : oldcx(nullptr), newcx(nullptr) {}
bool enter(JSContext *cx) {
JS_ASSERT(!JS_IsExceptionPending(cx));
oldcx = cx;
newcx = NewContext(JS_GetRuntime(cx));
if (!newcx)
return false;
JS::ContextOptionsRef(newcx).setDontReportUncaught(true);
newRequest.emplace(newcx);
newCompartment.emplace(newcx, JS::CurrentGlobalOrNull(cx));
return true;
}
JSContext *get() { return newcx; }
~AutoNewContext() {
if (newcx) {
RootedValue exc(oldcx);
bool throwing = JS_IsExceptionPending(newcx);
if (throwing)
JS_GetPendingException(newcx, &exc);
newCompartment.reset();
newRequest.reset();
if (throwing)
JS_SetPendingException(oldcx, exc);
DestroyContext(newcx, false);
}
}
};
static const uint32_t CacheEntry_SOURCE = 0;
static const uint32_t CacheEntry_BYTECODE = 1;
static const JSClass CacheEntry_class = {
"CacheEntryObject", JSCLASS_HAS_RESERVED_SLOTS(2),
JS_PropertyStub, /* addProperty */
JS_DeletePropertyStub, /* delProperty */
JS_PropertyStub, /* getProperty */
JS_StrictPropertyStub, /* setProperty */
JS_EnumerateStub,
JS_ResolveStub,
JS_ConvertStub,
nullptr, /* finalize */
nullptr, /* call */
nullptr, /* hasInstance */
nullptr, /* construct */
nullptr, /* trace */
JSCLASS_NO_INTERNAL_MEMBERS
};
static bool
CacheEntry(JSContext* cx, unsigned argc, JS::Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() != 1 || !args[0].isString()) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_INVALID_ARGS, "CacheEntry");
return false;
}
RootedObject obj(cx, JS_NewObject(cx, &CacheEntry_class, JS::NullPtr(), JS::NullPtr()));
if (!obj)
return false;
SetReservedSlot(obj, CacheEntry_SOURCE, args[0]);
SetReservedSlot(obj, CacheEntry_BYTECODE, UndefinedValue());
args.rval().setObject(*obj);
return true;
}
static bool
CacheEntry_isCacheEntry(JSObject *cache)
{
return JS_GetClass(cache) == &CacheEntry_class;
}
static JSString *
CacheEntry_getSource(HandleObject cache)
{
JS_ASSERT(CacheEntry_isCacheEntry(cache));
Value v = JS_GetReservedSlot(cache, CacheEntry_SOURCE);
if (!v.isString())
return nullptr;
return v.toString();
}
static uint8_t *
CacheEntry_getBytecode(HandleObject cache, uint32_t *length)
{
JS_ASSERT(CacheEntry_isCacheEntry(cache));
Value v = JS_GetReservedSlot(cache, CacheEntry_BYTECODE);
if (!v.isObject() || !v.toObject().is<ArrayBufferObject>())
return nullptr;
ArrayBufferObject *arrayBuffer = &v.toObject().as<ArrayBufferObject>();
*length = arrayBuffer->byteLength();
return arrayBuffer->dataPointer();
}
static bool
CacheEntry_setBytecode(JSContext *cx, HandleObject cache, uint8_t *buffer, uint32_t length)
{
JS_ASSERT(CacheEntry_isCacheEntry(cache));
ArrayBufferObject::BufferContents contents =
ArrayBufferObject::BufferContents::create<ArrayBufferObject::PLAIN_BUFFER>(buffer);
Rooted<ArrayBufferObject*> arrayBuffer(cx, ArrayBufferObject::create(cx, length, contents));
if (!arrayBuffer || !ArrayBufferObject::ensureNonInline(cx, arrayBuffer))
return false;
SetReservedSlot(cache, CacheEntry_BYTECODE, OBJECT_TO_JSVAL(arrayBuffer));
return true;
}
class AutoSaveFrameChain
{
JSContext *cx_;
bool saved_;
public:
explicit AutoSaveFrameChain(JSContext *cx)
: cx_(cx),
saved_(false)
{}
bool save() {
if (!JS_SaveFrameChain(cx_))
return false;
saved_ = true;
return true;
}
~AutoSaveFrameChain() {
if (saved_)
JS_RestoreFrameChain(cx_);
}
};
static bool
Evaluate(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() < 1 || args.length() > 2) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr,
args.length() < 1 ? JSSMSG_NOT_ENOUGH_ARGS : JSSMSG_TOO_MANY_ARGS,
"evaluate");
return false;
}
RootedString code(cx, nullptr);
RootedObject cacheEntry(cx, nullptr);
if (args[0].isString()) {
code = args[0].toString();
} else if (args[0].isObject() && CacheEntry_isCacheEntry(&args[0].toObject())) {
cacheEntry = &args[0].toObject();
code = CacheEntry_getSource(cacheEntry);
}
if (!code || (args.length() == 2 && args[1].isPrimitive())) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_INVALID_ARGS, "evaluate");
return false;
}
CompileOptions options(cx);
JSAutoByteString fileNameBytes;
bool newContext = false;
RootedString displayURL(cx);
RootedString sourceMapURL(cx);
RootedObject global(cx, nullptr);
bool catchTermination = false;
bool saveFrameChain = false;
bool loadBytecode = false;
bool saveBytecode = false;
bool assertEqBytecode = false;
RootedObject callerGlobal(cx, cx->global());
options.setIntroductionType("js shell evaluate")
.setFileAndLine("@evaluate", 1);
global = JS_GetGlobalForObject(cx, &args.callee());
if (!global)
return false;
if (args.length() == 2) {
RootedObject opts(cx, &args[1].toObject());
RootedValue v(cx);
if (!ParseCompileOptions(cx, options, opts, fileNameBytes))
return false;
if (!JS_GetProperty(cx, opts, "newContext", &v))
return false;
if (!v.isUndefined())
newContext = ToBoolean(v);
if (!JS_GetProperty(cx, opts, "displayURL", &v))
return false;
if (!v.isUndefined()) {
displayURL = ToString(cx, v);
if (!displayURL)
return false;
}
if (!JS_GetProperty(cx, opts, "sourceMapURL", &v))
return false;
if (!v.isUndefined()) {
sourceMapURL = ToString(cx, v);
if (!sourceMapURL)
return false;
}
if (!JS_GetProperty(cx, opts, "global", &v))
return false;
if (!v.isUndefined()) {
if (v.isObject()) {
global = js::UncheckedUnwrap(&v.toObject());
if (!global)
return false;
}
if (!global || !(JS_GetClass(global)->flags & JSCLASS_IS_GLOBAL)) {
JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, JSMSG_UNEXPECTED_TYPE,
"\"global\" passed to evaluate()", "not a global object");
return false;
}
}
if (!JS_GetProperty(cx, opts, "catchTermination", &v))
return false;
if (!v.isUndefined())
catchTermination = ToBoolean(v);
if (!JS_GetProperty(cx, opts, "saveFrameChain", &v))
return false;
if (!v.isUndefined())
saveFrameChain = ToBoolean(v);
if (!JS_GetProperty(cx, opts, "loadBytecode", &v))
return false;
if (!v.isUndefined())
loadBytecode = ToBoolean(v);
if (!JS_GetProperty(cx, opts, "saveBytecode", &v))
return false;
if (!v.isUndefined())
saveBytecode = ToBoolean(v);
if (!JS_GetProperty(cx, opts, "assertEqBytecode", &v))
return false;
if (!v.isUndefined())
assertEqBytecode = ToBoolean(v);
// We cannot load or save the bytecode if we have no object where the
// bytecode cache is stored.
if (loadBytecode || saveBytecode) {
if (!cacheEntry) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_INVALID_ARGS,
"evaluate");
return false;
}
}
}
AutoStableStringChars codeChars(cx);
if (!codeChars.initTwoByte(cx, code))
return false;
AutoNewContext ancx;
if (newContext) {
if (!ancx.enter(cx))
return false;
cx = ancx.get();
}
uint32_t loadLength = 0;
uint8_t *loadBuffer = nullptr;
uint32_t saveLength = 0;
ScopedJSFreePtr<uint8_t> saveBuffer;
if (loadBytecode) {
loadBuffer = CacheEntry_getBytecode(cacheEntry, &loadLength);
if (!loadBuffer)
return false;
}
{
AutoSaveFrameChain asfc(cx);
if (saveFrameChain && !asfc.save())
return false;
JSAutoCompartment ac(cx, global);
RootedScript script(cx);
{
if (saveBytecode) {
if (!JS::CompartmentOptionsRef(cx).getSingletonsAsTemplates()) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr,
JSSMSG_CACHE_SINGLETON_FAILED);
return false;
}
JS::CompartmentOptionsRef(cx).setCloneSingletons(true);
}
if (loadBytecode) {
script = JS_DecodeScript(cx, loadBuffer, loadLength, options.originPrincipals(cx));
} else {
mozilla::Range<const jschar> chars = codeChars.twoByteRange();
(void) JS::Compile(cx, global, options, chars.start().get(), chars.length(), &script);
}
if (!script)
return false;
}
if (displayURL && !script->scriptSource()->hasDisplayURL()) {
JSFlatString *flat = displayURL->ensureFlat(cx);
if (!flat)
return false;
AutoStableStringChars chars(cx);
if (!chars.initTwoByte(cx, flat))
return false;
const jschar *durl = chars.twoByteRange().start().get();
if (!script->scriptSource()->setDisplayURL(cx, durl))
return false;
}
if (sourceMapURL && !script->scriptSource()->hasSourceMapURL()) {
JSFlatString *flat = sourceMapURL->ensureFlat(cx);
if (!flat)
return false;
AutoStableStringChars chars(cx);
if (!chars.initTwoByte(cx, flat))
return false;
const jschar *smurl = chars.twoByteRange().start().get();
if (!script->scriptSource()->setSourceMapURL(cx, smurl))
return false;
}
if (!JS_ExecuteScript(cx, global, script, args.rval())) {
if (catchTermination && !JS_IsExceptionPending(cx)) {
JSAutoCompartment ac1(cx, callerGlobal);
JSString *str = JS_NewStringCopyZ(cx, "terminated");
if (!str)
return false;
args.rval().setString(str);
return true;
}
return false;
}
if (saveBytecode) {
saveBuffer = reinterpret_cast<uint8_t *>(JS_EncodeScript(cx, script, &saveLength));
if (!saveBuffer)
return false;
}
}
if (saveBytecode) {
// If we are both loading and saving, we assert that we are going to
// replace the current bytecode by the same stream of bytes.
if (loadBytecode && assertEqBytecode) {
if (saveLength != loadLength) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_CACHE_EQ_SIZE_FAILED,
loadLength, saveLength);
} else if (!PodEqual(loadBuffer, saveBuffer.get(), loadLength)) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr,
JSSMSG_CACHE_EQ_CONTENT_FAILED);
}
}
if (!CacheEntry_setBytecode(cx, cacheEntry, saveBuffer, saveLength))
return false;
saveBuffer.forget();
}
return JS_WrapValue(cx, args.rval());
}
static JSString *
FileAsString(JSContext *cx, const char *pathname)
{
FILE *file;
RootedString str(cx);
size_t len, cc;
char *buf;
file = fopen(pathname, "rb");
if (!file) {
JS_ReportError(cx, "can't open %s: %s", pathname, strerror(errno));
return nullptr;
}
AutoCloseInputFile autoClose(file);
if (fseek(file, 0, SEEK_END) != 0) {
JS_ReportError(cx, "can't seek end of %s", pathname);
} else {
len = ftell(file);
if (fseek(file, 0, SEEK_SET) != 0) {
JS_ReportError(cx, "can't seek start of %s", pathname);
} else {
buf = (char*) JS_malloc(cx, len + 1);
if (buf) {
cc = fread(buf, 1, len, file);
if (cc != len) {
JS_ReportError(cx, "can't read %s: %s", pathname,
(ptrdiff_t(cc) < 0) ? strerror(errno) : "short read");
} else {
jschar *ucbuf =
JS::UTF8CharsToNewTwoByteCharsZ(cx, JS::UTF8Chars(buf, len), &len).get();
if (!ucbuf) {
JS_ReportError(cx, "Invalid UTF-8 in file '%s'", pathname);
gExitCode = EXITCODE_RUNTIME_ERROR;
return nullptr;
}
str = JS_NewUCStringCopyN(cx, ucbuf, len);
free(ucbuf);
}
JS_free(cx, buf);
}
}
}
return str;
}
static JSObject *
FileAsTypedArray(JSContext *cx, const char *pathname)
{
FILE *file = fopen(pathname, "rb");
if (!file) {
JS_ReportError(cx, "can't open %s: %s", pathname, strerror(errno));
return nullptr;
}
AutoCloseInputFile autoClose(file);
RootedObject obj(cx);
if (fseek(file, 0, SEEK_END) != 0) {
JS_ReportError(cx, "can't seek end of %s", pathname);
} else {
size_t len = ftell(file);
if (fseek(file, 0, SEEK_SET) != 0) {
JS_ReportError(cx, "can't seek start of %s", pathname);
} else {
obj = JS_NewUint8Array(cx, len);
if (!obj)
return nullptr;
char *buf = (char *) obj->as<TypedArrayObject>().viewData();
size_t cc = fread(buf, 1, len, file);
if (cc != len) {
JS_ReportError(cx, "can't read %s: %s", pathname,
(ptrdiff_t(cc) < 0) ? strerror(errno) : "short read");
obj = nullptr;
}
}
}
return obj;
}
/*
* Function to run scripts and return compilation + execution time. Semantics
* are closely modelled after the equivalent function in WebKit, as this is used
* to produce benchmark timings by SunSpider.
*/
static bool
Run(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() != 1) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_INVALID_ARGS, "run");
return false;
}
RootedObject thisobj(cx, JS_THIS_OBJECT(cx, vp));
if (!thisobj)
return false;
RootedString str(cx, JS::ToString(cx, args[0]));
if (!str)
return false;
args[0].setString(str);
JSAutoByteString filename(cx, str);
if (!filename)
return false;
str = FileAsString(cx, filename.ptr());
if (!str)
return false;
AutoStableStringChars chars(cx);
if (!chars.initTwoByte(cx, str))
return false;
const jschar *ucbuf = chars.twoByteRange().start().get();
size_t buflen = str->length();
JS::Anchor<JSString *> a_str(str);
RootedScript script(cx);
int64_t startClock = PRMJ_Now();
{
JS::CompileOptions options(cx);
options.setIntroductionType("js shell run")
.setFileAndLine(filename.ptr(), 1)
.setCompileAndGo(true)
.setNoScriptRval(true);
if (!JS_CompileUCScript(cx, thisobj, ucbuf, buflen, options, &script))
return false;
}
if (!JS_ExecuteScript(cx, thisobj, script))
return false;
int64_t endClock = PRMJ_Now();
args.rval().setDouble((endClock - startClock) / double(PRMJ_USEC_PER_MSEC));
return true;
}
/*
* function readline()
* Provides a hook for scripts to read a line from stdin.
*/
static bool
ReadLine(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
#define BUFSIZE 256
FILE *from = stdin;
size_t buflength = 0;
size_t bufsize = BUFSIZE;
char *buf = (char *) JS_malloc(cx, bufsize);
if (!buf)
return false;
bool sawNewline = false;
size_t gotlength;
while ((gotlength = js_fgets(buf + buflength, bufsize - buflength, from)) > 0) {
buflength += gotlength;
/* Are we done? */
if (buf[buflength - 1] == '\n') {
buf[buflength - 1] = '\0';
sawNewline = true;
break;
} else if (buflength < bufsize - 1) {
break;
}
/* Else, grow our buffer for another pass. */
char *tmp;
bufsize *= 2;
if (bufsize > buflength) {
tmp = static_cast<char *>(JS_realloc(cx, buf, bufsize / 2, bufsize));
} else {
JS_ReportOutOfMemory(cx);
tmp = nullptr;
}
if (!tmp) {
JS_free(cx, buf);
return false;
}
buf = tmp;
}
/* Treat the empty string specially. */
if (buflength == 0) {
args.rval().set(feof(from) ? NullValue() : JS_GetEmptyStringValue(cx));
JS_free(cx, buf);
return true;
}
/* Shrink the buffer to the real size. */
char *tmp = static_cast<char *>(JS_realloc(cx, buf, bufsize, buflength));
if (!tmp) {
JS_free(cx, buf);
return false;
}
buf = tmp;
/*
* Turn buf into a JSString. Note that buflength includes the trailing null
* character.
*/
JSString *str = JS_NewStringCopyN(cx, buf, sawNewline ? buflength - 1 : buflength);
JS_free(cx, buf);
if (!str)
return false;
args.rval().setString(str);
return true;
}
static bool
PutStr(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() != 0) {
RootedString str(cx, JS::ToString(cx, args[0]));
if (!str)
return false;
char *bytes = JS_EncodeStringToUTF8(cx, str);
if (!bytes)
return false;
fputs(bytes, gOutFile);
JS_free(cx, bytes);
fflush(gOutFile);
}
args.rval().setUndefined();
return true;
}
static bool
Now(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
double now = PRMJ_Now() / double(PRMJ_USEC_PER_MSEC);
args.rval().setDouble(now);
return true;
}
static bool
PrintInternal(JSContext *cx, const CallArgs &args, FILE *file)
{
for (unsigned i = 0; i < args.length(); i++) {
RootedString str(cx, JS::ToString(cx, args[i]));
if (!str)
return false;
char *bytes = JS_EncodeStringToUTF8(cx, str);
if (!bytes)
return false;
fprintf(file, "%s%s", i ? " " : "", bytes);
JS_free(cx, bytes);
}
fputc('\n', file);
fflush(file);
args.rval().setUndefined();
return true;
}
static bool
Print(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
return PrintInternal(cx, args, gOutFile);
}
static bool
PrintErr(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
return PrintInternal(cx, args, gErrFile);
}
static bool
Help(JSContext *cx, unsigned argc, jsval *vp);
static bool
Quit(JSContext *cx, unsigned argc, jsval *vp)
{
#ifdef JS_MORE_DETERMINISTIC
// Print a message to stderr in more-deterministic builds to help jsfunfuzz
// find uncatchable-exception bugs.
fprintf(stderr, "quit called\n");
#endif
CallArgs args = CallArgsFromVp(argc, vp);
JS_ConvertArguments(cx, args, "/ i", &gExitCode);
gQuitting = true;
return false;
}
static const char *
ToSource(JSContext *cx, MutableHandleValue vp, JSAutoByteString *bytes)
{
JSString *str = JS_ValueToSource(cx, vp);
if (str) {
vp.setString(str);
if (bytes->encodeLatin1(cx, str))
return bytes->ptr();
}
JS_ClearPendingException(cx);
return "<<error converting value to string>>";
}
static bool
AssertEq(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (!(args.length() == 2 || (args.length() == 3 && args[2].isString()))) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr,
(args.length() < 2)
? JSSMSG_NOT_ENOUGH_ARGS
: (args.length() == 3)
? JSSMSG_INVALID_ARGS
: JSSMSG_TOO_MANY_ARGS,
"assertEq");
return false;
}
bool same;
if (!JS_SameValue(cx, args[0], args[1], &same))
return false;
if (!same) {
JSAutoByteString bytes0, bytes1;
const char *actual = ToSource(cx, args[0], &bytes0);
const char *expected = ToSource(cx, args[1], &bytes1);
if (args.length() == 2) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_ASSERT_EQ_FAILED,
actual, expected);
} else {
JSAutoByteString bytes2(cx, args[2].toString());
if (!bytes2)
return false;
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_ASSERT_EQ_FAILED_MSG,
actual, expected, bytes2.ptr());
}
return false;
}
args.rval().setUndefined();
return true;
}
static JSScript *
ValueToScript(JSContext *cx, jsval vArg, JSFunction **funp = nullptr)
{
RootedValue v(cx, vArg);
RootedFunction fun(cx, JS_ValueToFunction(cx, v));
if (!fun)
return nullptr;
// Unwrap bound functions.
while (fun->isBoundFunction()) {
JSObject *target = fun->getBoundFunctionTarget();
if (target && target->is<JSFunction>())
fun = &target->as<JSFunction>();
else
break;
}
if (!fun->isInterpreted()) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_SCRIPTS_ONLY);
return nullptr;
}
JSScript *script = fun->getOrCreateScript(cx);
if (!script)
return nullptr;
if (fun && funp)
*funp = fun;
return script;
}
static bool
SetDebug(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() == 0 || !args[0].isBoolean()) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr,
JSSMSG_NOT_ENOUGH_ARGS, "setDebug");
return false;
}
/*
* Debug mode can only be set when there is no JS code executing on the
* stack. Unfortunately, that currently means that this call will fail
* unless debug mode is already set to what you're trying to set it to.
* In the future, this restriction may be lifted.
*/
bool ok = !!JS_SetDebugMode(cx, args[0].toBoolean());
if (ok)
args.rval().setBoolean(true);
return ok;
}
static JSScript *
GetTopScript(JSContext *cx)
{
NonBuiltinScriptFrameIter iter(cx);
return iter.done() ? nullptr : iter.script();
}
static bool
GetScriptAndPCArgs(JSContext *cx, unsigned argc, jsval *argv, MutableHandleScript scriptp,
int32_t *ip)
{
RootedScript script(cx, GetTopScript(cx));
*ip = 0;
if (argc != 0) {
jsval v = argv[0];
unsigned intarg = 0;
if (v.isObject() &&
JS_GetClass(&v.toObject()) == Jsvalify(&JSFunction::class_)) {
script = ValueToScript(cx, v);
if (!script)
return false;
intarg++;
}
if (argc > intarg) {
if (!JS::ToInt32(cx, HandleValue::fromMarkedLocation(&argv[intarg]), ip))
return false;
if ((uint32_t)*ip >= script->length()) {
JS_ReportError(cx, "Invalid PC");
return false;
}
}
}
scriptp.set(script);
return true;
}
static bool
LineToPC(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() == 0) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_LINE2PC_USAGE);
return false;
}
RootedScript script(cx, GetTopScript(cx));
int32_t lineArg = 0;
if (args[0].isObject() && args[0].toObject().is<JSFunction>()) {
script = ValueToScript(cx, args[0]);
if (!script)
return false;
lineArg++;
}
uint32_t lineno;
if (!ToUint32(cx, args.get(lineArg), &lineno))
return false;
jsbytecode *pc = JS_LineNumberToPC(cx, script, lineno);
if (!pc)
return false;
args.rval().setInt32(script->pcToOffset(pc));
return true;
}
static bool
PCToLine(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
RootedScript script(cx);
int32_t i;
unsigned lineno;
if (!GetScriptAndPCArgs(cx, args.length(), args.array(), &script, &i))
return false;
lineno = JS_PCToLineNumber(cx, script, script->offsetToPC(i));
if (!lineno)
return false;
args.rval().setInt32(lineno);
return true;
}
#ifdef DEBUG
static void
UpdateSwitchTableBounds(JSContext *cx, HandleScript script, unsigned offset,
unsigned *start, unsigned *end)
{
jsbytecode *pc;
JSOp op;
ptrdiff_t jmplen;
int32_t low, high, n;
pc = script->offsetToPC(offset);
op = JSOp(*pc);
switch (op) {
case JSOP_TABLESWITCH:
jmplen = JUMP_OFFSET_LEN;
pc += jmplen;
low = GET_JUMP_OFFSET(pc);
pc += JUMP_OFFSET_LEN;
high = GET_JUMP_OFFSET(pc);
pc += JUMP_OFFSET_LEN;
n = high - low + 1;
break;
default:
/* [condswitch] switch does not have any jump or lookup tables. */
JS_ASSERT(op == JSOP_CONDSWITCH);
return;
}
*start = script->pcToOffset(pc);
*end = *start + (unsigned)(n * jmplen);
}
static void
SrcNotes(JSContext *cx, HandleScript script, Sprinter *sp)
{
Sprint(sp, "\nSource notes:\n");
Sprint(sp, "%4s %4s %5s %6s %-8s %s\n",
"ofs", "line", "pc", "delta", "desc", "args");
Sprint(sp, "---- ---- ----- ------ -------- ------\n");
unsigned offset = 0;
unsigned colspan = 0;
unsigned lineno = script->lineno();
jssrcnote *notes = script->notes();
unsigned switchTableEnd = 0, switchTableStart = 0;
for (jssrcnote *sn = notes; !SN_IS_TERMINATOR(sn); sn = SN_NEXT(sn)) {
unsigned delta = SN_DELTA(sn);
offset += delta;
SrcNoteType type = (SrcNoteType) SN_TYPE(sn);
const char *name = js_SrcNoteSpec[type].name;
Sprint(sp, "%3u: %4u %5u [%4u] %-8s", unsigned(sn - notes), lineno, offset, delta, name);
switch (type) {
case SRC_NULL:
case SRC_IF:
case SRC_CONTINUE:
case SRC_BREAK:
case SRC_BREAK2LABEL:
case SRC_SWITCHBREAK:
case SRC_ASSIGNOP:
case SRC_XDELTA:
break;
case SRC_COLSPAN:
colspan = js_GetSrcNoteOffset(sn, 0);
if (colspan >= SN_COLSPAN_DOMAIN / 2)
colspan -= SN_COLSPAN_DOMAIN;
Sprint(sp, "%d", colspan);
break;
case SRC_SETLINE:
lineno = js_GetSrcNoteOffset(sn, 0);
Sprint(sp, " lineno %u", lineno);
break;
case SRC_NEWLINE:
++lineno;
break;
case SRC_FOR:
Sprint(sp, " cond %u update %u tail %u",
unsigned(js_GetSrcNoteOffset(sn, 0)),
unsigned(js_GetSrcNoteOffset(sn, 1)),
unsigned(js_GetSrcNoteOffset(sn, 2)));
break;
case SRC_IF_ELSE:
Sprint(sp, " else %u", unsigned(js_GetSrcNoteOffset(sn, 0)));
break;
case SRC_FOR_IN:
case SRC_FOR_OF:
Sprint(sp, " closingjump %u", unsigned(js_GetSrcNoteOffset(sn, 0)));
break;
case SRC_COND:
case SRC_WHILE:
case SRC_NEXTCASE:
Sprint(sp, " offset %u", unsigned(js_GetSrcNoteOffset(sn, 0)));
break;
case SRC_TABLESWITCH: {
JSOp op = JSOp(script->code()[offset]);
JS_ASSERT(op == JSOP_TABLESWITCH);
Sprint(sp, " length %u", unsigned(js_GetSrcNoteOffset(sn, 0)));
UpdateSwitchTableBounds(cx, script, offset,
&switchTableStart, &switchTableEnd);
break;
}
case SRC_CONDSWITCH: {
JSOp op = JSOp(script->code()[offset]);
JS_ASSERT(op == JSOP_CONDSWITCH);
Sprint(sp, " length %u", unsigned(js_GetSrcNoteOffset(sn, 0)));
unsigned caseOff = (unsigned) js_GetSrcNoteOffset(sn, 1);
if (caseOff)
Sprint(sp, " first case offset %u", caseOff);
UpdateSwitchTableBounds(cx, script, offset,
&switchTableStart, &switchTableEnd);
break;
}
case SRC_TRY:
JS_ASSERT(JSOp(script->code()[offset]) == JSOP_TRY);
Sprint(sp, " offset to jump %u", unsigned(js_GetSrcNoteOffset(sn, 0)));
break;
default:
JS_ASSERT(0);
break;
}
Sprint(sp, "\n");
}
}
static bool
Notes(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
Sprinter sprinter(cx);
if (!sprinter.init())
return false;
for (unsigned i = 0; i < args.length(); i++) {
RootedScript script (cx, ValueToScript(cx, args[i]));
if (!script)
return false;
SrcNotes(cx, script, &sprinter);
}
JSString *str = JS_NewStringCopyZ(cx, sprinter.string());
if (!str)
return false;
args.rval().setString(str);
return true;
}
JS_STATIC_ASSERT(JSTRY_CATCH == 0);
JS_STATIC_ASSERT(JSTRY_FINALLY == 1);
JS_STATIC_ASSERT(JSTRY_ITER == 2);
static const char* const TryNoteNames[] = { "catch", "finally", "iter", "loop" };
static bool
TryNotes(JSContext *cx, HandleScript script, Sprinter *sp)
{
JSTryNote *tn, *tnlimit;
if (!script->hasTrynotes())
return true;
tn = script->trynotes()->vector;
tnlimit = tn + script->trynotes()->length;
Sprint(sp, "\nException table:\nkind stack start end\n");
do {
JS_ASSERT(tn->kind < ArrayLength(TryNoteNames));
Sprint(sp, " %-7s %6u %8u %8u\n",
TryNoteNames[tn->kind], tn->stackDepth,
tn->start, tn->start + tn->length);
} while (++tn != tnlimit);
return true;
}
static bool
DisassembleScript(JSContext *cx, HandleScript script, HandleFunction fun, bool lines,
bool recursive, Sprinter *sp)
{
if (fun) {
Sprint(sp, "flags:");
if (fun->isLambda())
Sprint(sp, " LAMBDA");
if (fun->isHeavyweight())
Sprint(sp, " HEAVYWEIGHT");
if (fun->isExprClosure())
Sprint(sp, " EXPRESSION_CLOSURE");
if (fun->isFunctionPrototype())
Sprint(sp, " Function.prototype");
if (fun->isSelfHostedBuiltin())
Sprint(sp, " SELF_HOSTED");
if (fun->isSelfHostedConstructor())
Sprint(sp, " SELF_HOSTED_CTOR");
if (fun->isArrow())
Sprint(sp, " ARROW");
Sprint(sp, "\n");
}
if (!js_Disassemble(cx, script, lines, sp))
return false;
SrcNotes(cx, script, sp);
TryNotes(cx, script, sp);
if (recursive && script->hasObjects()) {
ObjectArray *objects = script->objects();
for (unsigned i = 0; i != objects->length; ++i) {
JSObject *obj = objects->vector[i];
if (obj->is<JSFunction>()) {
Sprint(sp, "\n");
RootedFunction fun(cx, &obj->as<JSFunction>());
if (fun->isInterpreted()) {
RootedScript script(cx, fun->getOrCreateScript(cx));
if (!script || !DisassembleScript(cx, script, fun, lines, recursive, sp))
return false;
} else {
Sprint(sp, "[native code]\n");
}
}
}
}
return true;
}
namespace {
struct DisassembleOptionParser {
unsigned argc;
jsval *argv;
bool lines;
bool recursive;
DisassembleOptionParser(unsigned argc, jsval *argv)
: argc(argc), argv(argv), lines(false), recursive(false) {}
bool parse(JSContext *cx) {
/* Read options off early arguments */
while (argc > 0 && argv[0].isString()) {
JSString *str = argv[0].toString();
JSFlatString *flatStr = JS_FlattenString(cx, str);
if (!flatStr)
return false;
if (JS_FlatStringEqualsAscii(flatStr, "-l"))
lines = true;
else if (JS_FlatStringEqualsAscii(flatStr, "-r"))
recursive = true;
else
break;
argv++, argc--;
}
return true;
}
};
} /* anonymous namespace */
static bool
DisassembleToSprinter(JSContext *cx, unsigned argc, jsval *vp, Sprinter *sprinter)
{
CallArgs args = CallArgsFromVp(argc, vp);
DisassembleOptionParser p(args.length(), args.array());
if (!p.parse(cx))
return false;
if (p.argc == 0) {
/* Without arguments, disassemble the current script. */
RootedScript script(cx, GetTopScript(cx));
if (script) {
JSAutoCompartment ac(cx, script);
if (!js_Disassemble(cx, script, p.lines, sprinter))
return false;
SrcNotes(cx, script, sprinter);
TryNotes(cx, script, sprinter);
}
} else {
for (unsigned i = 0; i < p.argc; i++) {
RootedFunction fun(cx);
RootedScript script (cx, ValueToScript(cx, p.argv[i], fun.address()));
if (!script)
return false;
if (!DisassembleScript(cx, script, fun, p.lines, p.recursive, sprinter))
return false;
}
}
return true;
}
static bool
DisassembleToString(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
Sprinter sprinter(cx);
if (!sprinter.init())
return false;
if (!DisassembleToSprinter(cx, args.length(), vp, &sprinter))
return false;
JSString *str = JS_NewStringCopyZ(cx, sprinter.string());
if (!str)
return false;
args.rval().setString(str);
return true;
}
static bool
Disassemble(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
Sprinter sprinter(cx);
if (!sprinter.init())
return false;
if (!DisassembleToSprinter(cx, args.length(), vp, &sprinter))
return false;
fprintf(stdout, "%s\n", sprinter.string());
args.rval().setUndefined();
return true;
}
static bool
DisassFile(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
/* Support extra options at the start, just like Disassemble. */
DisassembleOptionParser p(args.length(), args.array());
if (!p.parse(cx))
return false;
if (!p.argc) {
args.rval().setUndefined();
return true;
}
RootedObject thisobj(cx, JS_THIS_OBJECT(cx, vp));
if (!thisobj)
return false;
// We should change DisassembleOptionParser to store CallArgs.
JSString *str = JS::ToString(cx, HandleValue::fromMarkedLocation(&p.argv[0]));
if (!str)
return false;
JSAutoByteString filename(cx, str);
if (!filename)
return false;
RootedScript script(cx);
{
CompileOptions options(cx);
options.setIntroductionType("js shell disFile")
.setUTF8(true)
.setFileAndLine(filename.ptr(), 1)
.setCompileAndGo(true)
.setNoScriptRval(true);
if (!JS::Compile(cx, thisobj, options, filename.ptr(), &script))
return false;
}
Sprinter sprinter(cx);
if (!sprinter.init())
return false;
bool ok = DisassembleScript(cx, script, NullPtr(), p.lines, p.recursive, &sprinter);
if (ok)
fprintf(stdout, "%s\n", sprinter.string());
if (!ok)
return false;
args.rval().setUndefined();
return true;
}
static bool
DisassWithSrc(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
#define LINE_BUF_LEN 512
unsigned len, line1, line2, bupline;
FILE *file;
char linebuf[LINE_BUF_LEN];
jsbytecode *pc, *end;
static const char sep[] = ";-------------------------";
bool ok = true;
RootedScript script(cx);
for (unsigned i = 0; ok && i < args.length(); i++) {
script = ValueToScript(cx, args[i]);
if (!script)
return false;
if (!script->filename()) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr,
JSSMSG_FILE_SCRIPTS_ONLY);
return false;
}
file = fopen(script->filename(), "r");
if (!file) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr,
JSSMSG_CANT_OPEN, script->filename(),
strerror(errno));
return false;
}
pc = script->code();
end = script->codeEnd();
Sprinter sprinter(cx);
if (!sprinter.init()) {
ok = false;
goto bail;
}
/* burn the leading lines */
line2 = JS_PCToLineNumber(cx, script, pc);
for (line1 = 0; line1 < line2 - 1; line1++) {
char *tmp = fgets(linebuf, LINE_BUF_LEN, file);
if (!tmp) {
JS_ReportError(cx, "failed to read %s fully", script->filename());
ok = false;
goto bail;
}
}
bupline = 0;
while (pc < end) {
line2 = JS_PCToLineNumber(cx, script, pc);
if (line2 < line1) {
if (bupline != line2) {
bupline = line2;
Sprint(&sprinter, "%s %3u: BACKUP\n", sep, line2);
}
} else {
if (bupline && line1 == line2)
Sprint(&sprinter, "%s %3u: RESTORE\n", sep, line2);
bupline = 0;
while (line1 < line2) {
if (!fgets(linebuf, LINE_BUF_LEN, file)) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr,
JSSMSG_UNEXPECTED_EOF,
script->filename());
ok = false;
goto bail;
}
line1++;
Sprint(&sprinter, "%s %3u: %s", sep, line1, linebuf);
}
}
len = js_Disassemble1(cx, script, pc, script->pcToOffset(pc), true, &sprinter);
if (!len) {
ok = false;
goto bail;
}
pc += len;
}
bail:
fclose(file);
}
args.rval().setUndefined();
return ok;
#undef LINE_BUF_LEN
}
static bool
DumpHeap(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
JSAutoByteString fileName;
if (args.hasDefined(0) && !args[0].isNull()) {
RootedString str(cx, JS::ToString(cx, args[0]));
if (!str)
return false;
if (!fileName.encodeLatin1(cx, str))
return false;
}
RootedValue startThing(cx);
if (args.hasDefined(1)) {
if (!args[1].isGCThing()) {
JS_ReportError(cx, "dumpHeap: Second argument not a GC thing!");
return false;
}
startThing = args[1];
}
RootedValue thingToFind(cx);
if (args.hasDefined(2)) {
if (!args[2].isGCThing()) {
JS_ReportError(cx, "dumpHeap: Third argument not a GC thing!");
return false;
}
thingToFind = args[2];
}
size_t maxDepth = size_t(-1);
if (args.hasDefined(3)) {
uint32_t depth;
if (!ToUint32(cx, args[3], &depth))
return false;
maxDepth = depth;
}
RootedValue thingToIgnore(cx);
if (args.hasDefined(4)) {
if (!args[2].isGCThing()) {
JS_ReportError(cx, "dumpHeap: Fifth argument not a GC thing!");
return false;
}
thingToIgnore = args[4];
}
FILE *dumpFile = stdout;
if (fileName.length()) {
dumpFile = fopen(fileName.ptr(), "w");
if (!dumpFile) {
JS_ReportError(cx, "dumpHeap: can't open %s: %s\n",
fileName.ptr(), strerror(errno));
return false;
}
}
bool ok = JS_DumpHeap(JS_GetRuntime(cx), dumpFile,
startThing.isUndefined() ? nullptr : startThing.toGCThing(),
startThing.isUndefined() ? JSTRACE_OBJECT : startThing.get().gcKind(),
thingToFind.isUndefined() ? nullptr : thingToFind.toGCThing(),
maxDepth,
thingToIgnore.isUndefined() ? nullptr : thingToIgnore.toGCThing());
if (dumpFile != stdout)
fclose(dumpFile);
if (!ok)
JS_ReportOutOfMemory(cx);
return ok;
}
#endif /* DEBUG */
static bool
BuildDate(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
fprintf(gOutFile, "built on %s at %s\n", __DATE__, __TIME__);
args.rval().setUndefined();
return true;
}
static bool
Intern(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
JSString *str = JS::ToString(cx, args.get(0));
if (!str)
return false;
AutoStableStringChars strChars(cx);
if (!strChars.initTwoByte(cx, str))
return false;
mozilla::Range<const jschar> chars = strChars.twoByteRange();
if (!JS_InternUCStringN(cx, chars.start().get(), chars.length()))
return false;
args.rval().setUndefined();
return true;
}
static bool
Clone(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
RootedObject parent(cx);
RootedObject funobj(cx);
if (!args.length()) {
JS_ReportError(cx, "Invalid arguments to clone");
return false;
}
{
Maybe<JSAutoCompartment> ac;
RootedObject obj(cx, args[0].isPrimitive() ? nullptr : &args[0].toObject());
if (obj && obj->is<CrossCompartmentWrapperObject>()) {
obj = UncheckedUnwrap(obj);
ac.emplace(cx, obj);
args[0].setObject(*obj);
}
if (obj && obj->is<JSFunction>()) {
funobj = obj;
} else {
JSFunction *fun = JS_ValueToFunction(cx, args[0]);
if (!fun)
return false;
funobj = JS_GetFunctionObject(fun);
}
}
if (funobj->compartment() != cx->compartment()) {
JSFunction *fun = &funobj->as<JSFunction>();
if (fun->hasScript() && fun->nonLazyScript()->compileAndGo()) {
JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, JSMSG_UNEXPECTED_TYPE,
"function", "compile-and-go");
return false;
}
}
if (args.length() > 1) {
if (!JS_ValueToObject(cx, args[1], &parent))
return false;
} else {
parent = JS_GetParent(&args.callee());
}
JSObject *clone = JS_CloneFunctionObject(cx, funobj, parent);
if (!clone)
return false;
args.rval().setObject(*clone);
return true;
}
static bool
GetSLX(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
RootedScript script(cx);
script = ValueToScript(cx, args.get(0));
if (!script)
return false;
args.rval().setInt32(js_GetScriptLineExtent(script));
return true;
}
static bool
ThrowError(JSContext *cx, unsigned argc, jsval *vp)
{
JS_ReportError(cx, "This is an error");
return false;
}
#define LAZY_STANDARD_CLASSES
/* A class for easily testing the inner/outer object callbacks. */
typedef struct ComplexObject {
bool isInner;
bool frozen;
JSObject *inner;
JSObject *outer;
} ComplexObject;
static bool
sandbox_enumerate(JSContext *cx, HandleObject obj)
{
RootedValue v(cx);
if (!JS_GetProperty(cx, obj, "lazy", &v))
return false;
if (!ToBoolean(v))
return true;
return JS_EnumerateStandardClasses(cx, obj);
}
static bool
sandbox_resolve(JSContext *cx, HandleObject obj, HandleId id, MutableHandleObject objp)
{
RootedValue v(cx);
if (!JS_GetProperty(cx, obj, "lazy", &v))
return false;
if (ToBoolean(v)) {
bool resolved;
if (!JS_ResolveStandardClass(cx, obj, id, &resolved))
return false;
if (resolved) {
objp.set(obj);
return true;
}
}
objp.set(nullptr);
return true;
}
static const JSClass sandbox_class = {
"sandbox",
JSCLASS_NEW_RESOLVE | JSCLASS_GLOBAL_FLAGS,
JS_PropertyStub, JS_DeletePropertyStub,
JS_PropertyStub, JS_StrictPropertyStub,
sandbox_enumerate, (JSResolveOp)sandbox_resolve,
JS_ConvertStub, nullptr,
nullptr, nullptr, nullptr,
JS_GlobalObjectTraceHook
};
static JSObject *
NewSandbox(JSContext *cx, bool lazy)
{
RootedObject obj(cx, JS_NewGlobalObject(cx, &sandbox_class, nullptr,
JS::DontFireOnNewGlobalHook));
if (!obj)
return nullptr;
{
JSAutoCompartment ac(cx, obj);
if (!lazy && !JS_InitStandardClasses(cx, obj))
return nullptr;
RootedValue value(cx, BooleanValue(lazy));
if (!JS_SetProperty(cx, obj, "lazy", value))
return nullptr;
}
JS_FireOnNewGlobalObject(cx, obj);
if (!cx->compartment()->wrap(cx, &obj))
return nullptr;
return obj;
}
static bool
EvalInContext(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
RootedString str(cx);
RootedObject sobj(cx);
if (!JS_ConvertArguments(cx, args, "S / o", str.address(), sobj.address()))
return false;
AutoStableStringChars strChars(cx);
if (!strChars.initTwoByte(cx, str))
return false;
mozilla::Range<const jschar> chars = strChars.twoByteRange();
size_t srclen = chars.length();
const jschar *src = chars.start().get();
bool lazy = false;
if (srclen == 4) {
if (src[0] == 'l' && src[1] == 'a' && src[2] == 'z' && src[3] == 'y') {
lazy = true;
srclen = 0;
}
}
if (!sobj) {
sobj = NewSandbox(cx, lazy);
if (!sobj)
return false;
}
if (srclen == 0) {
args.rval().setObject(*sobj);
return true;
}
JS::AutoFilename filename;
unsigned lineno;
DescribeScriptedCaller(cx, &filename, &lineno);
{
Maybe<JSAutoCompartment> ac;
unsigned flags;
JSObject *unwrapped = UncheckedUnwrap(sobj, true, &flags);
if (flags & Wrapper::CROSS_COMPARTMENT) {
sobj = unwrapped;
ac.emplace(cx, sobj);
}
sobj = GetInnerObject(sobj);
if (!sobj)
return false;
if (!(sobj->getClass()->flags & JSCLASS_IS_GLOBAL)) {
JS_ReportError(cx, "Invalid scope argument to evalcx");
return false;
}
if (!JS_EvaluateUCScript(cx, sobj, src, srclen,
filename.get(),
lineno,
args.rval())) {
return false;
}
}
if (!cx->compartment()->wrap(cx, args.rval()))
return false;
return true;
}
static bool
EvalInFrame(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (!args.get(0).isInt32() || !args.get(1).isString()) {
JS_ReportError(cx, "Invalid arguments to evalInFrame");
return false;
}
uint32_t upCount = args[0].toInt32();
RootedString str(cx, args[1].toString());
bool saveCurrent = args.get(2).isBoolean() ? args[2].toBoolean() : false;
/* This is a copy of CheckDebugMode. */
if (!JS_GetDebugMode(cx)) {
JS_ReportErrorFlagsAndNumber(cx, JSREPORT_ERROR, js_GetErrorMessage,
nullptr, JSMSG_NEED_DEBUG_MODE);
return false;
}
/* Debug-mode currently disables Ion compilation. */
ScriptFrameIter fi(cx);
for (uint32_t i = 0; i < upCount; ++i, ++fi) {
ScriptFrameIter next(fi);
++next;
if (next.done())
break;
}
AutoStableStringChars stableChars(cx);
if (!stableChars.initTwoByte(cx, str))
return JSTRAP_ERROR;
AbstractFramePtr frame = fi.abstractFramePtr();
RootedScript fpscript(cx, frame.script());
RootedObject scope(cx);
{
RootedObject scopeChain(cx, frame.scopeChain());
AutoCompartment ac(cx, scopeChain);
scope = GetDebugScopeForFrame(cx, frame, fi.pc());
}
Rooted<Env*> env(cx, scope);
if (!env)
return false;
if (!ComputeThis(cx, frame))
return false;
RootedValue thisv(cx, frame.thisValue());
AutoSaveFrameChain sfc(cx);
if (saveCurrent) {
if (!sfc.save())
return false;
}
bool ok;
{
AutoCompartment ac(cx, env);
ok = EvaluateInEnv(cx, env, thisv, frame, stableChars.twoByteRange(), fpscript->filename(),
JS_PCToLineNumber(cx, fpscript, fi.pc()), args.rval());
}
return ok;
}
struct WorkerInput
{
JSRuntime *runtime;
jschar *chars;
size_t length;
WorkerInput(JSRuntime *runtime, jschar *chars, size_t length)
: runtime(runtime), chars(chars), length(length)
{}
~WorkerInput() {
js_free(chars);
}
};
static void
WorkerMain(void *arg)
{
WorkerInput *input = (WorkerInput *) arg;
JSRuntime *rt = JS_NewRuntime(8L * 1024L * 1024L, 2L * 1024L * 1024L, input->runtime);
if (!rt) {
js_delete(input);
return;
}
JSContext *cx = NewContext(rt);
if (!cx) {
JS_DestroyRuntime(rt);
js_delete(input);
return;
}
do {
JSAutoRequest ar(cx);
JS::CompartmentOptions compartmentOptions;
compartmentOptions.setVersion(JSVERSION_LATEST);
RootedObject global(cx, NewGlobalObject(cx, compartmentOptions, nullptr));
if (!global)
break;
JSAutoCompartment ac(cx, global);
JS::CompileOptions options(cx);
options.setFileAndLine("<string>", 1)
.setCompileAndGo(true);
RootedScript script(cx);
if (!JS::Compile(cx, global, options, input->chars, input->length, &script))
break;
RootedValue result(cx);
JS_ExecuteScript(cx, global, script, &result);
} while (0);
DestroyContext(cx, false);
JS_DestroyRuntime(rt);
js_delete(input);
}
Vector<PRThread *, 0, SystemAllocPolicy> workerThreads;
static bool
EvalInWorker(JSContext *cx, unsigned argc, jsval *vp)
{
if (!CanUseExtraThreads()) {
JS_ReportError(cx, "Can't create worker threads with --no-threads");
return false;
}
CallArgs args = CallArgsFromVp(argc, vp);
if (!args.get(0).isString()) {
JS_ReportError(cx, "Invalid arguments to evalInWorker");
return false;
}
if (!args[0].toString()->ensureLinear(cx))
return false;
JSLinearString *str = &args[0].toString()->asLinear();
jschar *chars = (jschar *) js_malloc(str->length() * sizeof(jschar));
if (!chars)
return false;
CopyChars(chars, *str);
WorkerInput *input = js_new<WorkerInput>(cx->runtime(), chars, str->length());
if (!input)
return false;
PRThread *thread = PR_CreateThread(PR_USER_THREAD, WorkerMain, input,
PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, 0);
if (!thread || !workerThreads.append(thread))
return false;
return true;
}
static bool
ShapeOf(JSContext *cx, unsigned argc, JS::Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (!args.get(0).isObject()) {
JS_ReportError(cx, "shapeOf: object expected");
return false;
}
JSObject *obj = &args[0].toObject();
args.rval().set(JS_NumberValue(double(uintptr_t(obj->lastProperty()) >> 3)));
return true;
}
/*
* If referent has an own property named id, copy that property to obj[id].
* Since obj is native, this isn't totally transparent; properties of a
* non-native referent may be simplified to data properties.
*/
static bool
CopyProperty(JSContext *cx, HandleObject obj, HandleObject referent, HandleId id,
MutableHandleObject objp)
{
RootedShape shape(cx);
Rooted<PropertyDescriptor> desc(cx);
RootedObject obj2(cx);
objp.set(nullptr);
if (referent->isNative()) {
if (!LookupNativeProperty(cx, referent, id, &obj2, &shape))
return false;
if (obj2 != referent)
return true;
if (shape->hasSlot()) {
desc.value().set(referent->nativeGetSlot(shape->slot()));
} else {
desc.value().setUndefined();
}
desc.setAttributes(shape->attributes());
desc.setGetter(shape->getter());
if (!desc.getter() && !desc.hasGetterObject())
desc.setGetter(JS_PropertyStub);
desc.setSetter(shape->setter());
if (!desc.setter() && !desc.hasSetterObject())
desc.setSetter(JS_StrictPropertyStub);
} else if (referent->is<ProxyObject>()) {
if (!Proxy::getOwnPropertyDescriptor(cx, referent, id, &desc))
return false;
if (!desc.object())
return true;
} else {
if (!JSObject::lookupGeneric(cx, referent, id, objp, &shape))
return false;
if (objp != referent)
return true;
RootedValue value(cx);
if (!JSObject::getGeneric(cx, referent, referent, id, &value) ||
!JSObject::getGenericAttributes(cx, referent, id, &desc.attributesRef()))
{
return false;
}
desc.value().set(value);
desc.attributesRef() &= JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT;
desc.setGetter(JS_PropertyStub);
desc.setSetter(JS_StrictPropertyStub);
}
objp.set(obj);
return DefineNativeProperty(cx, obj, id, desc.value(), desc.getter(), desc.setter(),
desc.attributes());
}
static bool
resolver_resolve(JSContext *cx, HandleObject obj, HandleId id, MutableHandleObject objp)
{
jsval v = JS_GetReservedSlot(obj, 0);
Rooted<JSObject*> vobj(cx, &v.toObject());
return CopyProperty(cx, obj, vobj, id, objp);
}
static bool
resolver_enumerate(JSContext *cx, HandleObject obj)
{
jsval v = JS_GetReservedSlot(obj, 0);
RootedObject referent(cx, v.toObjectOrNull());
AutoIdArray ida(cx, JS_Enumerate(cx, referent));
bool ok = !!ida;
RootedObject ignore(cx);
for (size_t i = 0; ok && i < ida.length(); i++) {
Rooted<jsid> id(cx, ida[i]);
ok = CopyProperty(cx, obj, referent, id, &ignore);
}
return ok;
}
static const JSClass resolver_class = {
"resolver",
JSCLASS_NEW_RESOLVE | JSCLASS_HAS_RESERVED_SLOTS(1),
JS_PropertyStub, JS_DeletePropertyStub,
JS_PropertyStub, JS_StrictPropertyStub,
resolver_enumerate, (JSResolveOp)resolver_resolve,
JS_ConvertStub
};
static bool
Resolver(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
RootedObject referent(cx);
if (!JS_ValueToObject(cx, args.get(0), &referent))
return false;
if (!referent) {
JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, JSMSG_CANT_CONVERT_TO,
args.get(0).isNull() ? "null" : "undefined", "object");
return false;
}
RootedObject proto(cx, nullptr);
if (!args.get(1).isNullOrUndefined()) {
if (!JS_ValueToObject(cx, args.get(1), &proto))
return false;
}
RootedObject parent(cx, JS_GetParent(referent));
JSObject *result = (args.length() > 1
? JS_NewObjectWithGivenProto
: JS_NewObject)(cx, &resolver_class, proto, parent);
if (!result)
return false;
JS_SetReservedSlot(result, 0, ObjectValue(*referent));
args.rval().setObject(*result);
return true;
}
/*
* Check that t1 comes strictly before t2. The function correctly deals with
* wrap-around between t2 and t1 assuming that t2 and t1 stays within INT32_MAX
* from each other. We use MAX_TIMEOUT_INTERVAL to enforce this restriction.
*/
static bool
IsBefore(int64_t t1, int64_t t2)
{
return int32_t(t1 - t2) < 0;
}
static bool
Sleep_fn(JSContext *cx, unsigned argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
int64_t t_ticks;
if (args.length() == 0) {
t_ticks = 0;
} else {
double t_secs;
if (!ToNumber(cx, args[0], &t_secs))
return false;
/* NB: The next condition also filter out NaNs. */
if (!(t_secs <= MAX_TIMEOUT_INTERVAL)) {
JS_ReportError(cx, "Excessive sleep interval");
return false;
}
t_ticks = (t_secs <= 0.0)
? 0
: int64_t(PRMJ_USEC_PER_SEC * t_secs);
}
PR_Lock(gWatchdogLock);
int64_t to_wakeup = PRMJ_Now() + t_ticks;
for (;;) {
PR_WaitCondVar(gSleepWakeup, t_ticks);
if (gServiceInterrupt)
break;
int64_t now = PRMJ_Now();
if (!IsBefore(now, to_wakeup))
break;
t_ticks = to_wakeup - now;
}
PR_Unlock(gWatchdogLock);
return !gServiceInterrupt;
}
static bool
InitWatchdog(JSRuntime *rt)
{
JS_ASSERT(!gWatchdogThread);
gWatchdogLock = PR_NewLock();
if (gWatchdogLock) {
gWatchdogWakeup = PR_NewCondVar(gWatchdogLock);
if (gWatchdogWakeup) {
gSleepWakeup = PR_NewCondVar(gWatchdogLock);
if (gSleepWakeup)
return true;
PR_DestroyCondVar(gWatchdogWakeup);
}
PR_DestroyLock(gWatchdogLock);
}
return false;
}
static void
KillWatchdog()
{
PRThread *thread;
PR_Lock(gWatchdogLock);
thread = gWatchdogThread;
if (thread) {
/*
* The watchdog thread is running, tell it to terminate waking it up
* if necessary.
*/
gWatchdogThread = nullptr;
PR_NotifyCondVar(gWatchdogWakeup);
}
PR_Unlock(gWatchdogLock);
if (thread)
PR_JoinThread(thread);
PR_DestroyCondVar(gSleepWakeup);
PR_DestroyCondVar(gWatchdogWakeup);
PR_DestroyLock(gWatchdogLock);
}
static void
WatchdogMain(void *arg)
{
PR_SetCurrentThreadName("JS Watchdog");
JSRuntime *rt = (JSRuntime *) arg;
PR_Lock(gWatchdogLock);
while (gWatchdogThread) {
int64_t now = PRMJ_Now();
if (gWatchdogHasTimeout && !IsBefore(now, gWatchdogTimeout)) {
/*
* The timeout has just expired. Request an interrupt callback
* outside the lock.
*/
gWatchdogHasTimeout = false;
PR_Unlock(gWatchdogLock);
CancelExecution(rt);
PR_Lock(gWatchdogLock);
/* Wake up any threads doing sleep. */
PR_NotifyAllCondVar(gSleepWakeup);
} else {
if (gWatchdogHasTimeout) {
/*
* Time hasn't expired yet. Simulate an interrupt callback
* which doesn't abort execution.
*/
JS_RequestInterruptCallback(rt);
}
uint64_t sleepDuration = PR_INTERVAL_NO_TIMEOUT;
if (gWatchdogHasTimeout)
sleepDuration = PR_TicksPerSecond() / 10;
mozilla::DebugOnly<PRStatus> status =
PR_WaitCondVar(gWatchdogWakeup, sleepDuration);
JS_ASSERT(status == PR_SUCCESS);
}
}
PR_Unlock(gWatchdogLock);
}
static bool
ScheduleWatchdog(JSRuntime *rt, double t)
{
if (t <= 0) {
PR_Lock(gWatchdogLock);
gWatchdogHasTimeout = false;
PR_Unlock(gWatchdogLock);
return true;
}
int64_t interval = int64_t(ceil(t * PRMJ_USEC_PER_SEC));
int64_t timeout = PRMJ_Now() + interval;
PR_Lock(gWatchdogLock);
if (!gWatchdogThread) {
JS_ASSERT(!gWatchdogHasTimeout);
gWatchdogThread = PR_CreateThread(PR_USER_THREAD,
WatchdogMain,
rt,
PR_PRIORITY_NORMAL,
PR_GLOBAL_THREAD,
PR_JOINABLE_THREAD,
0);
if (!gWatchdogThread) {
PR_Unlock(gWatchdogLock);
return false;
}
} else if (!gWatchdogHasTimeout || IsBefore(timeout, gWatchdogTimeout)) {
PR_NotifyCondVar(gWatchdogWakeup);
}
gWatchdogHasTimeout = true;
gWatchdogTimeout = timeout;
PR_Unlock(gWatchdogLock);
return true;
}
static void
CancelExecution(JSRuntime *rt)
{
gServiceInterrupt = true;
JS_RequestInterruptCallback(rt);
if (!gInterruptFunc->get().isNull()) {
static const char msg[] = "Script runs for too long, terminating.\n";
fputs(msg, stderr);
}
}
static bool
SetTimeoutValue(JSContext *cx, double t)
{
/* NB: The next condition also filter out NaNs. */
if (!(t <= MAX_TIMEOUT_INTERVAL)) {
JS_ReportError(cx, "Excessive timeout value");
return false;
}
gTimeoutInterval = t;
if (!ScheduleWatchdog(cx->runtime(), t)) {
JS_ReportError(cx, "Failed to create the watchdog");
return false;
}
return true;
}
static bool
Timeout(JSContext *cx, unsigned argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() == 0) {
args.rval().setNumber(gTimeoutInterval);
return true;
}
if (args.length() > 2) {
JS_ReportError(cx, "Wrong number of arguments");
return false;
}
double t;
if (!ToNumber(cx, args[0], &t))
return false;
if (args.length() > 1) {
RootedValue value(cx, args[1]);
if (!value.isObject() || !value.toObject().is<JSFunction>()) {
JS_ReportError(cx, "Second argument must be a timeout function");
return false;
}
*gInterruptFunc = value;
}
args.rval().setUndefined();
return SetTimeoutValue(cx, t);
}
static bool
InterruptIf(JSContext *cx, unsigned argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() != 1) {
JS_ReportError(cx, "Wrong number of arguments");
return false;
}
if (ToBoolean(args[0])) {
gServiceInterrupt = true;
JS_RequestInterruptCallback(cx->runtime());
}
args.rval().setUndefined();
return true;
}
static bool
InvokeInterruptCallbackWrapper(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() != 1) {
JS_ReportError(cx, "Wrong number of arguments");
return false;
}
gServiceInterrupt = true;
JS_RequestInterruptCallback(cx->runtime());
bool interruptRv = CheckForInterrupt(cx);
// The interrupt handler could have set a pending exception. Since we call
// back into JS, don't have it see the pending exception. If we have an
// uncatchable exception that's not propagating a debug mode forced
// return, return.
if (!interruptRv && !cx->isExceptionPending() && !cx->isPropagatingForcedReturn())
return false;
JS::AutoSaveExceptionState savedExc(cx);
Value argv[1] = { BooleanValue(interruptRv) };
RootedValue rv(cx);
if (!Invoke(cx, UndefinedValue(), args[0], 1, argv, &rv))
return false;
args.rval().setUndefined();
return interruptRv;
}
static bool
SetInterruptCallback(JSContext *cx, unsigned argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() != 1) {
JS_ReportError(cx, "Wrong number of arguments");
return false;
}
RootedValue value(cx, args[0]);
if (!value.isObject() || !value.toObject().is<JSFunction>()) {
JS_ReportError(cx, "Argument must be a function");
return false;
}
*gInterruptFunc = value;
args.rval().setUndefined();
return true;
}
static bool
StackDump(JSContext *cx, unsigned argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
bool showArgs = ToBoolean(args.get(0));
bool showLocals = ToBoolean(args.get(1));
bool showThisProps = ToBoolean(args.get(2));
char *buf = JS::FormatStackDump(cx, nullptr, showArgs, showLocals, showThisProps);
if (!buf) {
fputs("Failed to format JavaScript stack for dump\n", gOutFile);
} else {
fputs(buf, gOutFile);
JS_smprintf_free(buf);
}
args.rval().setUndefined();
return true;
}
static bool
Elapsed(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() == 0) {
double d = 0.0;
JSShellContextData *data = GetContextData(cx);
if (data)
d = PRMJ_Now() - data->startTime;
args.rval().setDouble(d);
return true;
}
JS_ReportError(cx, "Wrong number of arguments");
return false;
}
static bool
Parent(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() != 1) {
JS_ReportError(cx, "Wrong number of arguments");
return false;
}
Value v = args[0];
if (v.isPrimitive()) {
JS_ReportError(cx, "Only objects have parents!");
return false;
}
Rooted<JSObject*> parent(cx, JS_GetParent(&v.toObject()));
/* Outerize if necessary. */
if (parent) {
parent = GetOuterObject(cx, parent);
if (!parent)
return false;
}
args.rval().setObjectOrNull(parent);
return true;
}
static bool
Compile(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() < 1) {
JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, JSMSG_MORE_ARGS_NEEDED,
"compile", "0", "s");
return false;
}
if (!args[0].isString()) {
const char *typeName = InformalValueTypeName(args[0]);
JS_ReportError(cx, "expected string to compile, got %s", typeName);
return false;
}
RootedObject global(cx, JS::CurrentGlobalOrNull(cx));
JSFlatString *scriptContents = args[0].toString()->ensureFlat(cx);
if (!scriptContents)
return false;
AutoStableStringChars stableChars(cx);
if (!stableChars.initTwoByte(cx, scriptContents))
return false;
JS::CompileOptions options(cx);
options.setIntroductionType("js shell compile")
.setFileAndLine("<string>", 1)
.setCompileAndGo(true)
.setNoScriptRval(true);
RootedScript script(cx);
const jschar *chars = stableChars.twoByteRange().start().get();
bool ok = JS_CompileUCScript(cx, global, chars,
scriptContents->length(), options, &script);
args.rval().setUndefined();
return ok;
}
static bool
Parse(JSContext *cx, unsigned argc, jsval *vp)
{
using namespace js::frontend;
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() < 1) {
JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, JSMSG_MORE_ARGS_NEEDED,
"parse", "0", "s");
return false;
}
if (!args[0].isString()) {
const char *typeName = InformalValueTypeName(args[0]);
JS_ReportError(cx, "expected string to parse, got %s", typeName);
return false;
}
JSFlatString *scriptContents = args[0].toString()->ensureFlat(cx);
if (!scriptContents)
return false;
AutoStableStringChars stableChars(cx);
if (!stableChars.initTwoByte(cx, scriptContents))
return false;
size_t length = scriptContents->length();
const jschar *chars = stableChars.twoByteRange().start().get();
CompileOptions options(cx);
options.setIntroductionType("js shell parse")
.setFileAndLine("<string>", 1)
.setCompileAndGo(false);
Parser<FullParseHandler> parser(cx, &cx->tempLifoAlloc(), options, chars, length,
/* foldConstants = */ true, nullptr, nullptr);
ParseNode *pn = parser.parse(nullptr);
if (!pn)
return false;
#ifdef DEBUG
DumpParseTree(pn);
fputc('\n', stderr);
#endif
args.rval().setUndefined();
return true;
}
static bool
SyntaxParse(JSContext *cx, unsigned argc, jsval *vp)
{
using namespace js::frontend;
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() < 1) {
JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, JSMSG_MORE_ARGS_NEEDED,
"parse", "0", "s");
return false;
}
if (!args[0].isString()) {
const char *typeName = InformalValueTypeName(args[0]);
JS_ReportError(cx, "expected string to parse, got %s", typeName);
return false;
}
JSFlatString *scriptContents = args[0].toString()->ensureFlat(cx);
if (!scriptContents)
return false;
CompileOptions options(cx);
options.setIntroductionType("js shell syntaxParse")
.setFileAndLine("<string>", 1)
.setCompileAndGo(false);
AutoStableStringChars stableChars(cx);
if (!stableChars.initTwoByte(cx, scriptContents))
return false;
const jschar *chars = stableChars.twoByteRange().start().get();
size_t length = scriptContents->length();
Parser<frontend::SyntaxParseHandler> parser(cx, &cx->tempLifoAlloc(),
options, chars, length, false, nullptr, nullptr);
bool succeeded = parser.parse(nullptr);
if (cx->isExceptionPending())
return false;
if (!succeeded && !parser.hadAbortedSyntaxParse()) {
// If no exception is posted, either there was an OOM or a language
// feature unhandled by the syntax parser was encountered.
JS_ASSERT(cx->runtime()->hadOutOfMemory);
return false;
}
args.rval().setBoolean(succeeded);
return true;
}
class OffThreadState {
public:
enum State {
IDLE, /* ready to work; no token, no source */
COMPILING, /* working; no token, have source */
DONE /* compilation done: have token and source */
};
OffThreadState() : monitor(), state(IDLE), token(), source(nullptr) { }
bool init() { return monitor.init(); }
bool startIfIdle(JSContext *cx, ScopedJSFreePtr<jschar> &newSource) {
AutoLockMonitor alm(monitor);
if (state != IDLE)
return false;
JS_ASSERT(!token);
source = newSource.forget();
state = COMPILING;
return true;
}
void abandon(JSContext *cx) {
AutoLockMonitor alm(monitor);
JS_ASSERT(state == COMPILING);
JS_ASSERT(!token);
JS_ASSERT(source);
js_free(source);
source = nullptr;
state = IDLE;
}
void markDone(void *newToken) {
AutoLockMonitor alm(monitor);
JS_ASSERT(state == COMPILING);
JS_ASSERT(!token);
JS_ASSERT(source);
JS_ASSERT(newToken);
token = newToken;
state = DONE;
alm.notify();
}
void *waitUntilDone(JSContext *cx) {
AutoLockMonitor alm(monitor);
if (state == IDLE)
return nullptr;
if (state == COMPILING) {
while (state != DONE)
alm.wait();
}
JS_ASSERT(source);
js_free(source);
source = nullptr;
JS_ASSERT(token);
void *holdToken = token;
token = nullptr;
state = IDLE;
return holdToken;
}
private:
Monitor monitor;
State state;
void *token;
jschar *source;
};
static OffThreadState offThreadState;
static void
OffThreadCompileScriptCallback(void *token, void *callbackData)
{
offThreadState.markDone(token);
}
static bool
OffThreadCompileScript(JSContext *cx, unsigned argc, jsval *vp)
{
if (!CanUseExtraThreads()) {
JS_ReportError(cx, "Can't use offThreadCompileScript with --no-threads");
return false;
}
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() < 1) {
JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, JSMSG_MORE_ARGS_NEEDED,
"offThreadCompileScript", "0", "s");
return false;
}
if (!args[0].isString()) {
const char *typeName = InformalValueTypeName(args[0]);
JS_ReportError(cx, "expected string to parse, got %s", typeName);
return false;
}
JSAutoByteString fileNameBytes;
CompileOptions options(cx);
options.setIntroductionType("js shell offThreadCompileScript")
.setFileAndLine("<string>", 1);
if (args.length() >= 2) {
if (args[1].isPrimitive()) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_INVALID_ARGS, "evaluate");
return false;
}
RootedObject opts(cx, &args[1].toObject());
if (!ParseCompileOptions(cx, options, opts, fileNameBytes))
return false;
}
// These option settings must override whatever the caller requested.
options.setCompileAndGo(true)
.setSourceIsLazy(false);
// We assume the caller wants caching if at all possible, ignoring
// heuristics that make sense for a real browser.
options.forceAsync = true;
JSString *scriptContents = args[0].toString();
AutoStableStringChars stableChars(cx);
if (!stableChars.initTwoByte(cx, scriptContents))
return false;
size_t length = scriptContents->length();
const jschar *chars = stableChars.twoByteRange().start().get();
// Make sure we own the string's chars, so that they are not freed before
// the compilation is finished.
ScopedJSFreePtr<jschar> ownedChars;
if (stableChars.maybeGiveOwnershipToCaller()) {
ownedChars = const_cast<jschar*>(chars);
} else {
jschar *copy = cx->pod_malloc<jschar>(length);
if (!copy)
return false;
mozilla::PodCopy(copy, chars, length);
ownedChars = copy;
chars = copy;
}
if (!JS::CanCompileOffThread(cx, options, length)) {
JS_ReportError(cx, "cannot compile code on worker thread");
return false;
}
if (!offThreadState.startIfIdle(cx, ownedChars)) {
JS_ReportError(cx, "called offThreadCompileScript without calling runOffThreadScript"
" to receive prior off-thread compilation");
return false;
}
if (!JS::CompileOffThread(cx, options, chars, length,
OffThreadCompileScriptCallback, nullptr))
{
offThreadState.abandon(cx);
return false;
}
args.rval().setUndefined();
return true;
}
static bool
runOffThreadScript(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
void *token = offThreadState.waitUntilDone(cx);
if (!token) {
JS_ReportError(cx, "called runOffThreadScript when no compilation is pending");
return false;
}
RootedScript script(cx, JS::FinishOffThreadScript(cx, cx->runtime(), token));
if (!script)
return false;
return JS_ExecuteScript(cx, cx->global(), script, args.rval());
}
struct FreeOnReturn
{
JSContext *cx;
const char *ptr;
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
explicit FreeOnReturn(JSContext *cx, const char *ptr = nullptr
MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: cx(cx), ptr(ptr)
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
}
void init(const char *ptr) {
JS_ASSERT(!this->ptr);
this->ptr = ptr;
}
~FreeOnReturn() {
JS_free(cx, (void*)ptr);
}
};
static bool
ReadFile(JSContext *cx, unsigned argc, jsval *vp, bool scriptRelative)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() < 1 || args.length() > 2) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr,
args.length() < 1 ? JSSMSG_NOT_ENOUGH_ARGS : JSSMSG_TOO_MANY_ARGS,
"snarf");
return false;
}
if (!args[0].isString() || (args.length() == 2 && !args[1].isString())) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_INVALID_ARGS, "snarf");
return false;
}
RootedString givenPath(cx, args[0].toString());
RootedString str(cx, ResolvePath(cx, givenPath, scriptRelative ? ScriptRelative : RootRelative));
if (!str)
return false;
JSAutoByteString filename(cx, str);
if (!filename)
return false;
if (args.length() > 1) {
JSString *opt = JS::ToString(cx, args[1]);
if (!opt)
return false;
bool match;
if (!JS_StringEqualsAscii(cx, opt, "binary", &match))
return false;
if (match) {
JSObject *obj;
if (!(obj = FileAsTypedArray(cx, filename.ptr())))
return false;
args.rval().setObject(*obj);
return true;
}
}
if (!(str = FileAsString(cx, filename.ptr())))
return false;
args.rval().setString(str);
return true;
}
static bool
Snarf(JSContext *cx, unsigned argc, jsval *vp)
{
return ReadFile(cx, argc, vp, false);
}
static bool
ReadRelativeToScript(JSContext *cx, unsigned argc, jsval *vp)
{
return ReadFile(cx, argc, vp, true);
}
static bool
redirect(JSContext *cx, FILE* fp, HandleString relFilename)
{
RootedString filename(cx, ResolvePath(cx, relFilename, RootRelative));
if (!filename)
return false;
JSAutoByteString filenameABS(cx, filename);
if (!filenameABS)
return false;
if (freopen(filenameABS.ptr(), "wb", fp) == nullptr) {
JS_ReportError(cx, "cannot redirect to %s: %s", filenameABS.ptr(), strerror(errno));
return false;
}
return true;
}
static bool
RedirectOutput(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() < 1 || args.length() > 2) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_INVALID_ARGS, "redirect");
return false;
}
if (args[0].isString()) {
RootedString stdoutPath(cx, args[0].toString());
if (!stdoutPath)
return false;
if (!redirect(cx, stdout, stdoutPath))
return false;
}
if (args.length() > 1 && args[1].isString()) {
RootedString stderrPath(cx, args[1].toString());
if (!stderrPath)
return false;
if (!redirect(cx, stderr, stderrPath))
return false;
}
args.rval().setUndefined();
return true;
}
static bool
System(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() == 0) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_INVALID_ARGS,
"system");
return false;
}
JSString *str = JS::ToString(cx, args[0]);
if (!str)
return false;
JSAutoByteString command(cx, str);
if (!command)
return false;
int result = system(command.ptr());
args.rval().setInt32(result);
return true;
}
static int sArgc;
static char **sArgv;
class AutoCStringVector
{
Vector<char *> argv_;
public:
explicit AutoCStringVector(JSContext *cx) : argv_(cx) {}
~AutoCStringVector() {
for (size_t i = 0; i < argv_.length(); i++)
js_free(argv_[i]);
}
bool append(char *arg) {
if (!argv_.append(arg)) {
js_free(arg);
return false;
}
return true;
}
char* const* get() const {
return argv_.begin();
}
size_t length() const {
return argv_.length();
}
char *operator[](size_t i) const {
return argv_[i];
}
void replace(size_t i, char *arg) {
js_free(argv_[i]);
argv_[i] = arg;
}
char *back() const {
return argv_.back();
}
void replaceBack(char *arg) {
js_free(argv_.back());
argv_.back() = arg;
}
};
#if defined(XP_WIN)
static bool
EscapeForShell(AutoCStringVector &argv)
{
// Windows will break arguments in argv by various spaces, so we wrap each
// argument in quotes and escape quotes within. Even with quotes, \ will be
// treated like an escape character, so inflate each \ to \\.
for (size_t i = 0; i < argv.length(); i++) {
if (!argv[i])
continue;
size_t newLen = 3; // quotes before and after and null-terminator
for (char *p = argv[i]; *p; p++) {
newLen++;
if (*p == '\"' || *p == '\\')
newLen++;
}
char *escaped = (char *)js_malloc(newLen);
if (!escaped)
return false;
char *src = argv[i];
char *dst = escaped;
*dst++ = '\"';
while (*src) {
if (*src == '\"' || *src == '\\')
*dst++ = '\\';
*dst++ = *src++;
}
*dst++ = '\"';
*dst++ = '\0';
JS_ASSERT(escaped + newLen == dst);
argv.replace(i, escaped);
}
return true;
}
#endif
static Vector<const char*, 4, js::SystemAllocPolicy> sPropagatedFlags;
#if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)
static bool
PropagateFlagToNestedShells(const char *flag)
{
return sPropagatedFlags.append(flag);
}
#endif
static bool
NestedShell(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
AutoCStringVector argv(cx);
// The first argument to the shell is its path, which we assume is our own
// argv[0].
if (sArgc < 1) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_NESTED_FAIL);
return false;
}
if (!argv.append(strdup(sArgv[0])))
return false;
// Propagate selected flags from the current shell
for (unsigned i = 0; i < sPropagatedFlags.length(); i++) {
char *cstr = strdup(sPropagatedFlags[i]);
if (!cstr || !argv.append(cstr))
return false;
}
// The arguments to nestedShell are stringified and append to argv.
RootedString str(cx);
for (unsigned i = 0; i < args.length(); i++) {
str = ToString(cx, args[i]);
if (!str || !argv.append(JS_EncodeString(cx, str)))
return false;
// As a special case, if the caller passes "--js-cache", replace that
// with "--js-cache=$(jsCacheDir)"
if (!strcmp(argv.back(), "--js-cache") && jsCacheDir) {
char *newArg = JS_smprintf("--js-cache=%s", jsCacheDir);
if (!newArg)
return false;
argv.replaceBack(newArg);
}
}
// execv assumes argv is null-terminated
if (!argv.append(nullptr))
return false;
int status = 0;
#if defined(XP_WIN)
if (!EscapeForShell(argv))
return false;
status = _spawnv(_P_WAIT, sArgv[0], argv.get());
#else
pid_t pid = fork();
switch (pid) {
case -1:
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_NESTED_FAIL);
return false;
case 0:
(void)execv(sArgv[0], argv.get());
exit(-1);
default: {
while (waitpid(pid, &status, 0) < 0 && errno == EINTR)
continue;
break;
}
}
#endif
if (status != 0) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_NESTED_FAIL);
return false;
}
args.rval().setUndefined();
return true;
}
static bool
DecompileFunctionSomehow(JSContext *cx, unsigned argc, Value *vp,
JSString *(*decompiler)(JSContext *, HandleFunction, unsigned))
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() < 1 || !args[0].isObject() || !args[0].toObject().is<JSFunction>()) {
args.rval().setUndefined();
return true;
}
RootedFunction fun(cx, &args[0].toObject().as<JSFunction>());
JSString *result = decompiler(cx, fun, 0);
if (!result)
return false;
args.rval().setString(result);
return true;
}
static bool
DecompileBody(JSContext *cx, unsigned argc, Value *vp)
{
return DecompileFunctionSomehow(cx, argc, vp, JS_DecompileFunctionBody);
}
static bool
DecompileFunction(JSContext *cx, unsigned argc, Value *vp)
{
return DecompileFunctionSomehow(cx, argc, vp, JS_DecompileFunction);
}
static bool
DecompileThisScript(JSContext *cx, unsigned argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
NonBuiltinScriptFrameIter iter(cx);
if (iter.done()) {
args.rval().setString(cx->runtime()->emptyString);
return true;
}
{
JSAutoCompartment ac(cx, iter.script());
RootedScript script(cx, iter.script());
JSString *result = JS_DecompileScript(cx, script, "test", 0);
if (!result)
return false;
args.rval().setString(result);
}
return JS_WrapValue(cx, args.rval());
}
static bool
ThisFilename(JSContext *cx, unsigned argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
JS::AutoFilename filename;
if (!DescribeScriptedCaller(cx, &filename) || !filename.get()) {
args.rval().setString(cx->runtime()->emptyString);
return true;
}
JSString *str = JS_NewStringCopyZ(cx, filename.get());
if (!str)
return false;
args.rval().setString(str);
return true;
}
static bool
Wrap(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
Value v = args.get(0);
if (v.isPrimitive()) {
args.rval().set(v);
return true;
}
RootedObject obj(cx, v.toObjectOrNull());
JSObject *wrapped = Wrapper::New(cx, obj, &obj->global(),
&Wrapper::singleton);
if (!wrapped)
return false;
args.rval().setObject(*wrapped);
return true;
}
static bool
WrapWithProto(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
Value obj = UndefinedValue(), proto = UndefinedValue();
if (args.length() == 2) {
obj = args[0];
proto = args[1];
}
if (!obj.isObject() || !proto.isObjectOrNull()) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_INVALID_ARGS,
"wrapWithProto");
return false;
}
WrapperOptions options(cx);
options.setProto(proto.toObjectOrNull());
options.selectDefaultClass(obj.toObject().isCallable());
JSObject *wrapped = Wrapper::New(cx, &obj.toObject(), &obj.toObject().global(),
&Wrapper::singletonWithPrototype, &options);
if (!wrapped)
return false;
args.rval().setObject(*wrapped);
return true;
}
static bool
NewGlobal(JSContext *cx, unsigned argc, jsval *vp)
{
JSPrincipals *principals = nullptr;
JS::CompartmentOptions options;
options.setVersion(JSVERSION_LATEST);
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() == 1 && args[0].isObject()) {
RootedObject opts(cx, &args[0].toObject());
RootedValue v(cx);
if (!JS_GetProperty(cx, opts, "sameZoneAs", &v))
return false;
if (v.isObject())
options.setSameZoneAs(UncheckedUnwrap(&v.toObject()));
if (!JS_GetProperty(cx, opts, "invisibleToDebugger", &v))
return false;
if (v.isBoolean())
options.setInvisibleToDebugger(v.toBoolean());
if (!JS_GetProperty(cx, opts, "principal", &v))
return false;
if (!v.isUndefined()) {
uint32_t bits;
if (!ToUint32(cx, v, &bits))
return false;
principals = cx->new_<ShellPrincipals>(bits);
if (!principals)
return false;
JS_HoldPrincipals(principals);
}
}
RootedObject global(cx, NewGlobalObject(cx, options, principals));
if (principals)
JS_DropPrincipals(cx->runtime(), principals);
if (!global)
return false;
if (!JS_WrapObject(cx, &global))
return false;
args.rval().setObject(*global);
return true;
}
static bool
GetMaxArgs(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setInt32(ARGS_LENGTH_MAX);
return true;
}
static bool
ObjectEmulatingUndefined(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
static const JSClass cls = {
"ObjectEmulatingUndefined",
JSCLASS_EMULATES_UNDEFINED,
JS_PropertyStub,
JS_DeletePropertyStub,
JS_PropertyStub,
JS_StrictPropertyStub,
JS_EnumerateStub,
JS_ResolveStub,
JS_ConvertStub
};
RootedObject obj(cx, JS_NewObject(cx, &cls, JS::NullPtr(), JS::NullPtr()));
if (!obj)
return false;
args.rval().setObject(*obj);
return true;
}
static bool
GetSelfHostedValue(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() != 1 || !args[0].isString()) {
JS_ReportErrorNumber(cx, my_GetErrorMessage, nullptr, JSSMSG_INVALID_ARGS,
"getSelfHostedValue");
return false;
}
RootedAtom srcAtom(cx, ToAtom<CanGC>(cx, args[0]));
if (!srcAtom)
return false;
RootedPropertyName srcName(cx, srcAtom->asPropertyName());
return cx->runtime()->cloneSelfHostedValue(cx, srcName, args.rval());
}
class ShellSourceHook: public SourceHook {
// The function we should call to lazily retrieve source code.
PersistentRootedFunction fun;
public:
ShellSourceHook(JSContext *cx, JSFunction &fun) : fun(cx, &fun) {}
bool load(JSContext *cx, const char *filename, jschar **src, size_t *length) {
RootedString str(cx, JS_NewStringCopyZ(cx, filename));
if (!str)
return false;
RootedValue filenameValue(cx, StringValue(str));
RootedValue result(cx);
if (!Call(cx, UndefinedHandleValue, fun, HandleValueArray(filenameValue), &result))
return false;
str = JS::ToString(cx, result);
if (!str)
return false;
*length = JS_GetStringLength(str);
*src = cx->pod_malloc<jschar>(*length);
if (!*src)
return false;
JSLinearString *linear = str->ensureLinear(cx);
if (!linear)
return false;
CopyChars(*src, *linear);
return true;
}
};
static bool
WithSourceHook(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
RootedObject callee(cx, &args.callee());
if (args.length() != 2) {
ReportUsageError(cx, callee, "Wrong number of arguments.");
return false;
}
if (!args[0].isObject() || !args[0].toObject().is<JSFunction>()
|| !args[1].isObject() || !args[1].toObject().is<JSFunction>()) {
ReportUsageError(cx, callee, "First and second arguments must be functions.");
return false;
}
UniquePtr<ShellSourceHook> hook =
MakeUnique<ShellSourceHook>(cx, args[0].toObject().as<JSFunction>());
if (!hook)
return false;
UniquePtr<SourceHook> savedHook = js::ForgetSourceHook(cx->runtime());
js::SetSourceHook(cx->runtime(), Move(hook));
RootedObject fun(cx, &args[1].toObject());
bool result = Call(cx, UndefinedHandleValue, fun, JS::HandleValueArray::empty(), args.rval());
js::SetSourceHook(cx->runtime(), Move(savedHook));
return result;
}
static bool
IsCachingEnabled(JSContext *cx, unsigned argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
args.rval().setBoolean(jsCachingEnabled && jsCacheAsmJSPath != nullptr);
return true;
}
static bool
SetCachingEnabled(JSContext *cx, unsigned argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
jsCachingEnabled = ToBoolean(args.get(0));
args.rval().setUndefined();
return true;
}
static void
PrintProfilerEvents_Callback(const char *msg)
{
fprintf(stderr, "PROFILER EVENT: %s\n", msg);
}
static bool
PrintProfilerEvents(JSContext *cx, unsigned argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (cx->runtime()->spsProfiler.enabled())
js::RegisterRuntimeProfilingEventMarker(cx->runtime(), &PrintProfilerEvents_Callback);
args.rval().setUndefined();
return true;
}
#if defined(JS_ARM_SIMULATOR)
typedef Vector<jschar, 0, SystemAllocPolicy> StackChars;
Vector<StackChars, 0, SystemAllocPolicy> stacks;
static void
SingleStepCallback(void *arg, jit::Simulator *sim, void *pc)
{
JSRuntime *rt = reinterpret_cast<JSRuntime*>(arg);
JS::ProfilingFrameIterator::RegisterState state;
state.pc = pc;
state.sp = (void*)sim->get_register(jit::Simulator::sp);
state.lr = (void*)sim->get_register(jit::Simulator::lr);
DebugOnly<void*> lastStackAddress = nullptr;
StackChars stack;
for (JS::ProfilingFrameIterator i(rt, state); !i.done(); ++i) {
JS_ASSERT(i.stackAddress() != nullptr);
JS_ASSERT(lastStackAddress <= i.stackAddress());
lastStackAddress = i.stackAddress();
const char *label = i.label();
stack.append(label, strlen(label));
}
// Only append the stack if it differs from the last stack.
if (stacks.empty() ||
stacks.back().length() != stack.length() ||
!PodEqual(stacks.back().begin(), stack.begin(), stack.length()))
{
stacks.append(Move(stack));
}
}
#endif
static bool
EnableSingleStepProfiling(JSContext *cx, unsigned argc, Value *vp)
{
#if defined(JS_ARM_SIMULATOR)
CallArgs args = CallArgsFromVp(argc, vp);
jit::Simulator *sim = cx->runtime()->mainThread.simulator();
sim->enable_single_stepping(SingleStepCallback, cx->runtime());
args.rval().setUndefined();
return true;
#else
JS_ReportError(cx, "single-step profiling not enabled on this platform");
return false;
#endif
}
static bool
DisableSingleStepProfiling(JSContext *cx, unsigned argc, Value *vp)
{
#if defined(JS_ARM_SIMULATOR)
CallArgs args = CallArgsFromVp(argc, vp);
jit::Simulator *sim = cx->runtime()->mainThread.simulator();
sim->disable_single_stepping();
AutoValueVector elems(cx);
for (size_t i = 0; i < stacks.length(); i++) {
JSString *stack = JS_NewUCStringCopyN(cx, stacks[i].begin(), stacks[i].length());
if (!stack)
return false;
if (!elems.append(StringValue(stack)))
return false;
}
JSObject *array = JS_NewArrayObject(cx, elems);
if (!array)
return false;
stacks.clear();
args.rval().setObject(*array);
return true;
#else
JS_ReportError(cx, "single-step profiling not enabled on this platform");
return false;
#endif
}
static bool
IsLatin1(JSContext *cx, unsigned argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
bool isLatin1 = args.get(0).isString() && args[0].toString()->hasLatin1Chars();
args.rval().setBoolean(isLatin1);
return true;
}
static const JSFunctionSpecWithHelp shell_functions[] = {
JS_FN_HELP("version", Version, 0, 0,
"version([number])",
" Get or force a script compilation version number."),
JS_FN_HELP("options", Options, 0, 0,
"options([option ...])",
" Get or toggle JavaScript options."),
JS_FN_HELP("load", Load, 1, 0,
"load(['foo.js' ...])",
" Load files named by string arguments. Filename is relative to the\n"
" current working directory."),
JS_FN_HELP("loadRelativeToScript", LoadScriptRelativeToScript, 1, 0,
"loadRelativeToScript(['foo.js' ...])",
" Load files named by string arguments. Filename is relative to the\n"
" calling script."),
JS_FN_HELP("evaluate", Evaluate, 2, 0,
"evaluate(code[, options])",
" Evaluate code as though it were the contents of a file.\n"
" options is an optional object that may have these properties:\n"
" compileAndGo: use the compile-and-go compiler option (default: true)\n"
" noScriptRval: use the no-script-rval compiler option (default: false)\n"
" fileName: filename for error messages and debug info\n"
" lineNumber: starting line number for error messages and debug info\n"
" global: global in which to execute the code\n"
" newContext: if true, create and use a new cx (default: false)\n"
" saveFrameChain: if true, save the frame chain before evaluating code\n"
" and restore it afterwards\n"
" catchTermination: if true, catch termination (failure without\n"
" an exception value, as for slow scripts or out-of-memory)\n"
" and return 'terminated'\n"
" element: if present with value |v|, convert |v| to an object |o| and\n"
" mark the source as being attached to the DOM element |o|. If the\n"
" property is omitted or |v| is null, don't attribute the source to\n"
" any DOM element.\n"
" elementAttributeName: if present and not undefined, the name of\n"
" property of 'element' that holds this code. This is what\n"
" Debugger.Source.prototype.elementAttributeName returns.\n"
" sourceMapURL: if present with value |v|, convert |v| to a string, and\n"
" provide that as the code's source map URL. If omitted, attach no\n"
" source map URL to the code (although the code may provide one itself,\n"
" via a //#sourceMappingURL comment).\n"
" sourceIsLazy: if present and true, indicates that, after compilation, \n"
"script source should not be cached by the JS engine and should be \n"
"lazily loaded from the embedding as-needed.\n"
" loadBytecode: if true, and if the source is a CacheEntryObject,\n"
" the bytecode would be loaded and decoded from the cache entry instead\n"
" of being parsed, then it would be executed as usual.\n"
" saveBytecode: if true, and if the source is a CacheEntryObject,\n"
" the bytecode would be encoded and saved into the cache entry after\n"
" the script execution.\n"
" assertEqBytecode: if true, and if both loadBytecode and saveBytecode are \n"
" true, then the loaded bytecode and the encoded bytecode are compared.\n"
" and an assertion is raised if they differ.\n"
),
JS_FN_HELP("run", Run, 1, 0,
"run('foo.js')",
" Run the file named by the first argument, returning the number of\n"
" of milliseconds spent compiling and executing it."),
JS_FN_HELP("readline", ReadLine, 0, 0,
"readline()",
" Read a single line from stdin."),
JS_FN_HELP("print", Print, 0, 0,
"print([exp ...])",
" Evaluate and print expressions to stdout."),
JS_FN_HELP("printErr", PrintErr, 0, 0,
"printErr([exp ...])",
" Evaluate and print expressions to stderr."),
JS_FN_HELP("putstr", PutStr, 0, 0,
"putstr([exp])",
" Evaluate and print expression without newline."),
JS_FN_HELP("dateNow", Now, 0, 0,
"dateNow()",
" Return the current time with sub-ms precision."),
JS_FN_HELP("help", Help, 0, 0,
"help([name ...])",
" Display usage and help messages."),
JS_FN_HELP("quit", Quit, 0, 0,
"quit()",
" Quit the shell."),
JS_FN_HELP("assertEq", AssertEq, 2, 0,
"assertEq(actual, expected[, msg])",
" Throw if the first two arguments are not the same (both +0 or both -0,\n"
" both NaN, or non-zero and ===)."),
JS_FN_HELP("setDebug", SetDebug, 1, 0,
"setDebug(debug)",
" Set debug mode."),
JS_FN_HELP("throwError", ThrowError, 0, 0,
"throwError()",
" Throw an error from JS_ReportError."),
#ifdef DEBUG
JS_FN_HELP("disassemble", DisassembleToString, 1, 0,
"disassemble([fun])",
" Return the disassembly for the given function."),
JS_FN_HELP("dis", Disassemble, 1, 0,
"dis([fun])",
" Disassemble functions into bytecodes."),
JS_FN_HELP("disfile", DisassFile, 1, 0,
"disfile('foo.js')",
" Disassemble script file into bytecodes.\n"
" dis and disfile take these options as preceeding string arguments:\n"
" \"-r\" (disassemble recursively)\n"
" \"-l\" (show line numbers)"),
JS_FN_HELP("dissrc", DisassWithSrc, 1, 0,
"dissrc([fun])",
" Disassemble functions with source lines."),
JS_FN_HELP("notes", Notes, 1, 0,
"notes([fun])",
" Show source notes for functions."),
JS_FN_HELP("stackDump", StackDump, 3, 0,
"stackDump(showArgs, showLocals, showThisProps)",
" Tries to print a lot of information about the current stack. \n"
" Similar to the DumpJSStack() function in the browser."),
JS_FN_HELP("findReferences", FindReferences, 1, 0,
"findReferences(target)",
" Walk the entire heap, looking for references to |target|, and return a\n"
" \"references object\" describing what we found.\n"
"\n"
" Each property of the references object describes one kind of reference. The\n"
" property's name is the label supplied to MarkObject, JS_CALL_TRACER, or what\n"
" have you, prefixed with \"edge: \" to avoid collisions with system properties\n"
" (like \"toString\" and \"__proto__\"). The property's value is an array of things\n"
" that refer to |thing| via that kind of reference. Ordinary references from\n"
" one object to another are named after the property name (with the \"edge: \"\n"
" prefix).\n"
"\n"
" Garbage collection roots appear as references from 'null'. We use the name\n"
" given to the root (with the \"edge: \" prefix) as the name of the reference.\n"
"\n"
" Note that the references object does record references from objects that are\n"
" only reachable via |thing| itself, not just the references reachable\n"
" themselves from roots that keep |thing| from being collected. (We could make\n"
" this distinction if it is useful.)\n"
"\n"
" If any references are found by the conservative scanner, the references\n"
" object will have a property named \"edge: machine stack\"; the referrers will\n"
" be 'null', because they are roots."),
#endif
JS_FN_HELP("build", BuildDate, 0, 0,
"build()",
" Show build date and time."),
JS_FN_HELP("intern", Intern, 1, 0,
"intern(str)",
" Internalize str in the atom table."),
JS_FN_HELP("getslx", GetSLX, 1, 0,
"getslx(obj)",
" Get script line extent."),
JS_FN_HELP("evalcx", EvalInContext, 1, 0,
"evalcx(s[, o])",
" Evaluate s in optional sandbox object o.\n"
" if (s == '' && !o) return new o with eager standard classes\n"
" if (s == 'lazy' && !o) return new o with lazy standard classes"),
JS_FN_HELP("evalInFrame", EvalInFrame, 2, 0,
"evalInFrame(n,str,save)",
" Evaluate 'str' in the nth up frame.\n"
" If 'save' (default false), save the frame chain."),
JS_FN_HELP("evalInWorker", EvalInWorker, 1, 0,
"evalInWorker(str)",
" Evaluate 'str' in a separate thread with its own runtime.\n"),
JS_FN_HELP("shapeOf", ShapeOf, 1, 0,
"shapeOf(obj)",
" Get the shape of obj (an implementation detail)."),
JS_FN_HELP("resolver", Resolver, 1, 0,
"resolver(src[, proto])",
" Create object with resolve hook that copies properties\n"
" from src. If proto is omitted, use Object.prototype."),
#ifdef DEBUG
JS_FN_HELP("arrayInfo", js_ArrayInfo, 1, 0,
"arrayInfo(a1, a2, ...)",
" Report statistics about arrays."),
#endif
JS_FN_HELP("sleep", Sleep_fn, 1, 0,
"sleep(dt)",
" Sleep for dt seconds."),
JS_FN_HELP("snarf", Snarf, 1, 0,
"snarf(filename, [\"binary\"])",
" Read filename into returned string. Filename is relative to the current\n"
" working directory."),
JS_FN_HELP("read", Snarf, 1, 0,
"read(filename, [\"binary\"])",
" Synonym for snarf."),
JS_FN_HELP("readRelativeToScript", ReadRelativeToScript, 1, 0,
"readRelativeToScript(filename, [\"binary\"])",
" Read filename into returned string. Filename is relative to the directory\n"
" containing the current script."),
JS_FN_HELP("compile", Compile, 1, 0,
"compile(code)",
" Compiles a string to bytecode, potentially throwing."),
JS_FN_HELP("parse", Parse, 1, 0,
"parse(code)",
" Parses a string, potentially throwing."),
JS_FN_HELP("syntaxParse", SyntaxParse, 1, 0,
"syntaxParse(code)",
" Check the syntax of a string, returning success value"),
JS_FN_HELP("offThreadCompileScript", OffThreadCompileScript, 1, 0,
"offThreadCompileScript(code[, options])",
" Compile |code| on a helper thread. To wait for the compilation to finish\n"
" and run the code, call |runOffThreadScript|. If present, |options| may\n"
" have properties saying how the code should be compiled:\n"
" noScriptRval: use the no-script-rval compiler option (default: false)\n"
" fileName: filename for error messages and debug info\n"
" lineNumber: starting line number for error messages and debug info\n"
" element: if present with value |v|, convert |v| to an object |o| and\n"
" mark the source as being attached to the DOM element |o|. If the\n"
" property is omitted or |v| is null, don't attribute the source to\n"
" any DOM element.\n"
" elementAttributeName: if present and not undefined, the name of\n"
" property of 'element' that holds this code. This is what\n"
" Debugger.Source.prototype.elementAttributeName returns.\n"),
JS_FN_HELP("runOffThreadScript", runOffThreadScript, 0, 0,
"runOffThreadScript()",
" Wait for off-thread compilation to complete. If an error occurred,\n"
" throw the appropriate exception; otherwise, run the script and return\n"
" its value."),
JS_FN_HELP("timeout", Timeout, 1, 0,
"timeout([seconds], [func])",
" Get/Set the limit in seconds for the execution time for the current context.\n"
" A negative value (default) means that the execution time is unlimited.\n"
" If a second argument is provided, it will be invoked when the timer elapses.\n"
" Calling this function will replace any callback set by |setInterruptCallback|.\n"),
JS_FN_HELP("interruptIf", InterruptIf, 1, 0,
"interruptIf(cond)",
" Requests interrupt callback if cond is true. If a callback function is set via\n"
" |timeout| or |setInterruptCallback|, it will be called. No-op otherwise."),
JS_FN_HELP("invokeInterruptCallback", InvokeInterruptCallbackWrapper, 0, 0,
"invokeInterruptCallback(fun)",
" Forcefully set the interrupt flag and invoke the interrupt handler. If a\n"
" callback function is set via |timeout| or |setInterruptCallback|, it will\n"
" be called. Before returning, fun is called with the return value of the\n"
" interrupt handler."),
JS_FN_HELP("setInterruptCallback", SetInterruptCallback, 1, 0,
"setInterruptCallback(func)",
" Sets func as the interrupt callback function.\n"
" Calling this function will replace any callback set by |timeout|.\n"),
JS_FN_HELP("elapsed", Elapsed, 0, 0,
"elapsed()",
" Execution time elapsed for the current context."),
JS_FN_HELP("decompileFunction", DecompileFunction, 1, 0,
"decompileFunction(func)",
" Decompile a function."),
JS_FN_HELP("decompileBody", DecompileBody, 1, 0,
"decompileBody(func)",
" Decompile a function's body."),
JS_FN_HELP("decompileThis", DecompileThisScript, 0, 0,
"decompileThis()",
" Decompile the currently executing script."),
JS_FN_HELP("thisFilename", ThisFilename, 0, 0,
"thisFilename()",
" Return the filename of the current script"),
JS_FN_HELP("wrap", Wrap, 1, 0,
"wrap(obj)",
" Wrap an object into a noop wrapper."),
JS_FN_HELP("wrapWithProto", WrapWithProto, 2, 0,
"wrapWithProto(obj)",
" Wrap an object into a noop wrapper with prototype semantics."),
JS_FN_HELP("newGlobal", NewGlobal, 1, 0,
"newGlobal([options])",
" Return a new global object in a new compartment. If options\n"
" is given, it may have any of the following properties:\n"
" sameZoneAs: the compartment will be in the same zone as the given object (defaults to a new zone)\n"
" invisibleToDebugger: the global will be invisible to the debugger (default false)\n"
" principal: if present, its value converted to a number must be an\n"
" integer that fits in 32 bits; use that as the new compartment's\n"
" principal. Shell principals are toys, meant only for testing; one\n"
" shell principal subsumes another if its set bits are a superset of\n"
" the other's. Thus, a principal of 0 subsumes nothing, while a\n"
" principals of ~0 subsumes all other principals. The absence of a\n"
" principal is treated as if its bits were 0xffff, for subsumption\n"
" purposes. If this property is omitted, supply no principal."),
JS_FN_HELP("createMappedArrayBuffer", CreateMappedArrayBuffer, 1, 0,
"createMappedArrayBuffer(filename, [offset, [size]])",
" Create an array buffer that mmaps the given file."),
JS_FN_HELP("getMaxArgs", GetMaxArgs, 0, 0,
"getMaxArgs()",
" Return the maximum number of supported args for a call."),
JS_FN_HELP("objectEmulatingUndefined", ObjectEmulatingUndefined, 0, 0,
"objectEmulatingUndefined()",
" Return a new object obj for which typeof obj === \"undefined\", obj == null\n"
" and obj == undefined (and vice versa for !=), and ToBoolean(obj) === false.\n"),
JS_FN_HELP("isCachingEnabled", IsCachingEnabled, 0, 0,
"isCachingEnabled()",
" Return whether JS caching is enabled."),
JS_FN_HELP("setCachingEnabled", SetCachingEnabled, 1, 0,
"setCachingEnabled(b)",
" Enable or disable JS caching."),
JS_FN_HELP("cacheEntry", CacheEntry, 1, 0,
"cacheEntry(code)",
" Return a new opaque object which emulates a cache entry of a script. This\n"
" object encapsulates the code and its cached content. The cache entry is filled\n"
" and read by the \"evaluate\" function by using it in place of the source, and\n"
" by setting \"saveBytecode\" and \"loadBytecode\" options."),
JS_FN_HELP("printProfilerEvents", PrintProfilerEvents, 0, 0,
"printProfilerEvents()",
" Register a callback with the profiler that prints javascript profiler events\n"
" to stderr. Callback is only registered if profiling is enabled."),
JS_FN_HELP("enableSingleStepProfiling", EnableSingleStepProfiling, 0, 0,
"enableSingleStepProfiling()",
" This function will fail on platforms that don't support single-step profiling\n"
" (currently everything but ARM-simulator). When enabled, at every instruction a\n"
" backtrace will be recorded and stored in an array. Adjacent duplicate backtraces\n"
" are discarded."),
JS_FN_HELP("disableSingleStepProfiling", DisableSingleStepProfiling, 0, 0,
"disableSingleStepProfiling()",
" Return the array of backtraces recorded by enableSingleStepProfiling."),
JS_FN_HELP("isLatin1", IsLatin1, 1, 0,
"isLatin1(s)",
" Return true iff the string's characters are stored as Latin1."),
JS_FS_HELP_END
};
static const JSFunctionSpecWithHelp fuzzing_unsafe_functions[] = {
JS_FN_HELP("clone", Clone, 1, 0,
"clone(fun[, scope])",
" Clone function object."),
JS_FN_HELP("getSelfHostedValue", GetSelfHostedValue, 1, 0,
"getSelfHostedValue()",
" Get a self-hosted value by its name. Note that these values don't get \n"
" cached, so repeatedly getting the same value creates multiple distinct clones."),
#ifdef DEBUG
JS_FN_HELP("dumpHeap", DumpHeap, 0, 0,
"dumpHeap([fileName[, start[, toFind[, maxDepth[, toIgnore]]]]])",
" Interface to JS_DumpHeap with output sent to file."),
#endif
JS_FN_HELP("parent", Parent, 1, 0,
"parent(obj)",
" Returns the parent of obj."),
JS_FN_HELP("line2pc", LineToPC, 0, 0,
"line2pc([fun,] line)",
" Map line number to PC."),
JS_FN_HELP("pc2line", PCToLine, 0, 0,
"pc2line(fun[, pc])",
" Map PC to line number."),
JS_FN_HELP("redirect", RedirectOutput, 2, 0,
"redirect(stdoutFilename[, stderrFilename])",
" Redirect stdout and/or stderr to the named file. Pass undefined to avoid\n"
" redirecting. Filenames are relative to the current working directory."),
JS_FN_HELP("system", System, 1, 0,
"system(command)",
" Execute command on the current host, returning result code."),
JS_FN_HELP("nestedShell", NestedShell, 0, 0,
"nestedShell(shellArgs...)",
" Execute the given code in a new JS shell process, passing this nested shell\n"
" the arguments passed to nestedShell. argv[0] of the nested shell will be argv[0]\n"
" of the current shell (which is assumed to be the actual path to the shell.\n"
" arguments[0] (of the call to nestedShell) will be argv[1], arguments[1] will\n"
" be argv[2], etc."),
JS_FN_HELP("assertFloat32", testingFunc_assertFloat32, 2, 0,
"assertFloat32(value, isFloat32)",
" In IonMonkey only, asserts that value has (resp. hasn't) the MIRType_Float32 if isFloat32 is true (resp. false)."),
JS_FN_HELP("withSourceHook", WithSourceHook, 1, 0,
"withSourceHook(hook, fun)",
" Set this JS runtime's lazy source retrieval hook (that is, the hook\n"
" used to find sources compiled with |CompileOptions::LAZY_SOURCE|) to\n"
" |hook|; call |fun| with no arguments; and then restore the runtime's\n"
" original hook. Return or throw whatever |fun| did. |hook| gets\n"
" passed the requested code's URL, and should return a string.\n"
"\n"
" Notes:\n"
"\n"
" 1) SpiderMonkey may assert if the returned code isn't close enough\n"
" to the script's real code, so this function is not fuzzer-safe.\n"
"\n"
" 2) The runtime can have only one source retrieval hook active at a\n"
" time. If |fun| is not careful, |hook| could be asked to retrieve the\n"
" source code for compilations that occurred long before it was set,\n"
" and that it knows nothing about. The reverse applies as well: the\n"
" original hook, that we reinstate after the call to |fun| completes,\n"
" might be asked for the source code of compilations that |fun|\n"
" performed, and which, presumably, only |hook| knows how to find.\n"),
JS_FS_HELP_END
};
#ifdef MOZ_PROFILING
# define PROFILING_FUNCTION_COUNT 5
# ifdef MOZ_CALLGRIND
# define CALLGRIND_FUNCTION_COUNT 3
# else
# define CALLGRIND_FUNCTION_COUNT 0
# endif
# ifdef MOZ_VTUNE
# define VTUNE_FUNCTION_COUNT 4
# else
# define VTUNE_FUNCTION_COUNT 0
# endif
# define EXTERNAL_FUNCTION_COUNT (PROFILING_FUNCTION_COUNT + CALLGRIND_FUNCTION_COUNT + VTUNE_FUNCTION_COUNT)
#else
# define EXTERNAL_FUNCTION_COUNT 0
#endif
#undef PROFILING_FUNCTION_COUNT
#undef CALLGRIND_FUNCTION_COUNT
#undef VTUNE_FUNCTION_COUNT
#undef EXTERNAL_FUNCTION_COUNT
static bool
PrintHelpString(JSContext *cx, jsval v)
{
JSString *str = v.toString();
JS::Anchor<JSString *> a_str(str);
JSLinearString *linear = str->ensureLinear(cx);
if (!linear)
return false;
JS::AutoCheckCannotGC nogc;
if (linear->hasLatin1Chars()) {
for (const Latin1Char *p = linear->latin1Chars(nogc); *p; p++)
fprintf(gOutFile, "%c", char(*p));
} else {
for (const jschar *p = linear->twoByteChars(nogc); *p; p++)
fprintf(gOutFile, "%c", char(*p));
}
fprintf(gOutFile, "\n");
return true;
}
static bool
PrintHelp(JSContext *cx, HandleObject obj)
{
RootedValue usage(cx);
if (!JS_LookupProperty(cx, obj, "usage", &usage))
return false;
RootedValue help(cx);
if (!JS_LookupProperty(cx, obj, "help", &help))
return false;
if (usage.isUndefined() || help.isUndefined())
return true;
return PrintHelpString(cx, usage) && PrintHelpString(cx, help);
}
static bool
Help(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
fprintf(gOutFile, "%s\n", JS_GetImplementationVersion());
RootedObject obj(cx);
if (args.length() == 0) {
RootedObject global(cx, JS::CurrentGlobalOrNull(cx));
AutoIdArray ida(cx, JS_Enumerate(cx, global));
if (!ida)
return false;
for (size_t i = 0; i < ida.length(); i++) {
RootedValue v(cx);
RootedId id(cx, ida[i]);
if (!JS_LookupPropertyById(cx, global, id, &v))
return false;
if (v.isPrimitive()) {
JS_ReportError(cx, "primitive arg");
return false;
}
obj = v.toObjectOrNull();
if (!PrintHelp(cx, obj))
return false;
}
} else {
for (unsigned i = 0; i < args.length(); i++) {
if (args[i].isPrimitive()) {
JS_ReportError(cx, "primitive arg");
return false;
}
obj = args[i].toObjectOrNull();
if (!PrintHelp(cx, obj))
return false;
}
}
args.rval().setUndefined();
return true;
}
static const JSErrorFormatString jsShell_ErrorFormatString[JSShellErr_Limit] = {
#define MSG_DEF(name, count, exception, format) \
{ format, count, JSEXN_ERR } ,
#include "jsshell.msg"
#undef MSG_DEF
};
static const JSErrorFormatString *
my_GetErrorMessage(void *userRef, const unsigned errorNumber)
{
if (errorNumber == 0 || errorNumber >= JSShellErr_Limit)
return nullptr;
return &jsShell_ErrorFormatString[errorNumber];
}
static void
my_ErrorReporter(JSContext *cx, const char *message, JSErrorReport *report)
{
gGotError = PrintError(cx, gErrFile, message, report, reportWarnings);
if (report->exnType != JSEXN_NONE && !JSREPORT_IS_WARNING(report->flags)) {
if (report->errorNumber == JSMSG_OUT_OF_MEMORY) {
gExitCode = EXITCODE_OUT_OF_MEMORY;
} else {
gExitCode = EXITCODE_RUNTIME_ERROR;
}
}
}
static void
my_OOMCallback(JSContext *cx, void *data)
{
// If a script is running, the engine is about to throw the string "out of
// memory", which may or may not be caught. Otherwise the engine will just
// unwind and return null/false, with no exception set.
if (!JS_IsRunning(cx))
gGotError = true;
}
static bool
global_enumerate(JSContext *cx, HandleObject obj)
{
#ifdef LAZY_STANDARD_CLASSES
return JS_EnumerateStandardClasses(cx, obj);
#else
return true;
#endif
}
static bool
global_resolve(JSContext *cx, HandleObject obj, HandleId id, MutableHandleObject objp)
{
#ifdef LAZY_STANDARD_CLASSES
bool resolved;
if (!JS_ResolveStandardClass(cx, obj, id, &resolved))
return false;
if (resolved) {
objp.set(obj);
return true;
}
#endif
return true;
}
static const JSClass global_class = {
"global", JSCLASS_NEW_RESOLVE | JSCLASS_GLOBAL_FLAGS,
JS_PropertyStub, JS_DeletePropertyStub,
JS_PropertyStub, JS_StrictPropertyStub,
global_enumerate, (JSResolveOp) global_resolve,
JS_ConvertStub, nullptr,
nullptr, nullptr, nullptr,
JS_GlobalObjectTraceHook
};
static bool
env_setProperty(JSContext *cx, HandleObject obj, HandleId id, bool strict, MutableHandleValue vp)
{
/* XXX porting may be easy, but these don't seem to supply setenv by default */
#if !defined SOLARIS
int rv;
RootedValue idvalue(cx, IdToValue(id));
RootedString idstring(cx, ToString(cx, idvalue));
JSAutoByteString idstr;
if (!idstr.encodeLatin1(cx, idstring))
return false;
RootedString value(cx, ToString(cx, vp));
if (!value)
return false;
JSAutoByteString valstr;
if (!valstr.encodeLatin1(cx, value))
return false;
#if defined XP_WIN || defined HPUX || defined OSF1
{
char *waste = JS_smprintf("%s=%s", idstr.ptr(), valstr.ptr());
if (!waste) {
JS_ReportOutOfMemory(cx);
return false;
}
rv = putenv(waste);
#ifdef XP_WIN
/*
* HPUX9 at least still has the bad old non-copying putenv.
*
* Per mail from <s.shanmuganathan@digital.com>, OSF1 also has a putenv
* that will crash if you pass it an auto char array (so it must place
* its argument directly in the char *environ[] array).
*/
JS_smprintf_free(waste);
#endif
}
#else
rv = setenv(idstr.ptr(), valstr.ptr(), 1);
#endif
if (rv < 0) {
JS_ReportError(cx, "can't set env variable %s to %s", idstr.ptr(), valstr.ptr());
return false;
}
vp.set(StringValue(value));
#endif /* !defined SOLARIS */
return true;
}
static bool
env_enumerate(JSContext *cx, HandleObject obj)
{
static bool reflected;
char **evp, *name, *value;
RootedString valstr(cx);
bool ok;
if (reflected)
return true;
for (evp = (char **)JS_GetPrivate(obj); (name = *evp) != nullptr; evp++) {
value = strchr(name, '=');
if (!value)
continue;
*value++ = '\0';
valstr = JS_NewStringCopyZ(cx, value);
ok = valstr && JS_DefineProperty(cx, obj, name, valstr, JSPROP_ENUMERATE);
value[-1] = '=';
if (!ok)
return false;
}
reflected = true;
return true;
}
static bool
env_resolve(JSContext *cx, HandleObject obj, HandleId id, MutableHandleObject objp)
{
if (JSID_IS_SYMBOL(id))
return true;
RootedString idstring(cx, IdToString(cx, id));
if (!idstring)
return false;
JSAutoByteString idstr;
if (!idstr.encodeLatin1(cx, idstring))
return false;
const char *name = idstr.ptr();
const char *value = getenv(name);
if (value) {
RootedString valstr(cx, JS_NewStringCopyZ(cx, value));
if (!valstr)
return false;
if (!JS_DefineProperty(cx, obj, name, valstr, JSPROP_ENUMERATE))
return false;
objp.set(obj);
}
return true;
}
static const JSClass env_class = {
"environment", JSCLASS_HAS_PRIVATE | JSCLASS_NEW_RESOLVE,
JS_PropertyStub, JS_DeletePropertyStub,
JS_PropertyStub, env_setProperty,
env_enumerate, (JSResolveOp) env_resolve,
JS_ConvertStub
};
/*
* Define a FakeDOMObject constructor. It returns an object with a getter,
* setter and method with attached JitInfo. This object can be used to test
* IonMonkey DOM optimizations in the shell.
*/
static const uint32_t DOM_OBJECT_SLOT = 0;
static bool
dom_genericGetter(JSContext* cx, unsigned argc, JS::Value *vp);
static bool
dom_genericSetter(JSContext* cx, unsigned argc, JS::Value *vp);
static bool
dom_genericMethod(JSContext *cx, unsigned argc, JS::Value *vp);
#ifdef DEBUG
static const JSClass *GetDomClass();
#endif
static bool
dom_get_x(JSContext* cx, HandleObject obj, void *self, JSJitGetterCallArgs args)
{
JS_ASSERT(JS_GetClass(obj) == GetDomClass());
JS_ASSERT(self == (void *)0x1234);
args.rval().set(JS_NumberValue(double(3.14)));
return true;
}
static bool
dom_set_x(JSContext* cx, HandleObject obj, void *self, JSJitSetterCallArgs args)
{
JS_ASSERT(JS_GetClass(obj) == GetDomClass());
JS_ASSERT(self == (void *)0x1234);
return true;
}
static bool
dom_doFoo(JSContext* cx, HandleObject obj, void *self, const JSJitMethodCallArgs& args)
{
JS_ASSERT(JS_GetClass(obj) == GetDomClass());
JS_ASSERT(self == (void *)0x1234);
/* Just return args.length(). */
args.rval().setInt32(args.length());
return true;
}
static const JSJitInfo dom_x_getterinfo = {
{ (JSJitGetterOp)dom_get_x },
0, /* protoID */
0, /* depth */
JSJitInfo::AliasNone, /* aliasSet */
JSJitInfo::Getter,
JSVAL_TYPE_UNKNOWN, /* returnType */
true, /* isInfallible. False in setters. */
true, /* isMovable */
false, /* isAlwaysInSlot */
false, /* isLazilyCachedInSlot */
false, /* isTypedMethod */
0 /* slotIndex */
};
static const JSJitInfo dom_x_setterinfo = {
{ (JSJitGetterOp)dom_set_x },
0, /* protoID */
0, /* depth */
JSJitInfo::Setter,
JSJitInfo::AliasEverything, /* aliasSet */
JSVAL_TYPE_UNKNOWN, /* returnType */
false, /* isInfallible. False in setters. */
false, /* isMovable. */
false, /* isAlwaysInSlot */
false, /* isLazilyCachedInSlot */
false, /* isTypedMethod */
0 /* slotIndex */
};
static const JSJitInfo doFoo_methodinfo = {
{ (JSJitGetterOp)dom_doFoo },
0, /* protoID */
0, /* depth */
JSJitInfo::Method,
JSJitInfo::AliasEverything, /* aliasSet */
JSVAL_TYPE_UNKNOWN, /* returnType */
false, /* isInfallible. False in setters. */
false, /* isMovable */
false, /* isAlwaysInSlot */
false, /* isLazilyCachedInSlot */
false, /* isTypedMethod */
0 /* slotIndex */
};
static const JSPropertySpec dom_props[] = {
{"x",
JSPROP_SHARED | JSPROP_ENUMERATE | JSPROP_NATIVE_ACCESSORS,
{ { (JSPropertyOp)dom_genericGetter, &dom_x_getterinfo } },
{ { (JSStrictPropertyOp)dom_genericSetter, &dom_x_setterinfo } }
},
JS_PS_END
};
static const JSFunctionSpec dom_methods[] = {
JS_FNINFO("doFoo", dom_genericMethod, &doFoo_methodinfo, 3, JSPROP_ENUMERATE),
JS_FS_END
};
static const JSClass dom_class = {
"FakeDOMObject", JSCLASS_IS_DOMJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(2),
JS_PropertyStub, /* addProperty */
JS_DeletePropertyStub, /* delProperty */
JS_PropertyStub, /* getProperty */
JS_StrictPropertyStub, /* setProperty */
JS_EnumerateStub,
JS_ResolveStub,
JS_ConvertStub,
nullptr, /* finalize */
nullptr, /* call */
nullptr, /* hasInstance */
nullptr, /* construct */
nullptr, /* trace */
JSCLASS_NO_INTERNAL_MEMBERS
};
#ifdef DEBUG
static const JSClass *GetDomClass() {
return &dom_class;
}
#endif
static bool
dom_genericGetter(JSContext *cx, unsigned argc, JS::Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
if (!obj)
return false;
if (JS_GetClass(obj) != &dom_class) {
args.rval().set(UndefinedValue());
return true;
}
JS::Value val = js::GetReservedSlot(obj, DOM_OBJECT_SLOT);
const JSJitInfo *info = FUNCTION_VALUE_TO_JITINFO(args.calleev());
MOZ_ASSERT(info->type() == JSJitInfo::Getter);
JSJitGetterOp getter = info->getter;
return getter(cx, obj, val.toPrivate(), JSJitGetterCallArgs(args));
}
static bool
dom_genericSetter(JSContext* cx, unsigned argc, JS::Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
if (!obj)
return false;
JS_ASSERT(args.length() == 1);
if (JS_GetClass(obj) != &dom_class) {
args.rval().set(UndefinedValue());
return true;
}
JS::Value val = js::GetReservedSlot(obj, DOM_OBJECT_SLOT);
const JSJitInfo *info = FUNCTION_VALUE_TO_JITINFO(args.calleev());
MOZ_ASSERT(info->type() == JSJitInfo::Setter);
JSJitSetterOp setter = info->setter;
if (!setter(cx, obj, val.toPrivate(), JSJitSetterCallArgs(args)))
return false;
args.rval().set(UndefinedValue());
return true;
}
static bool
dom_genericMethod(JSContext* cx, unsigned argc, JS::Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));
if (!obj)
return false;
if (JS_GetClass(obj) != &dom_class) {
args.rval().set(UndefinedValue());
return true;
}
JS::Value val = js::GetReservedSlot(obj, DOM_OBJECT_SLOT);
const JSJitInfo *info = FUNCTION_VALUE_TO_JITINFO(args.calleev());
MOZ_ASSERT(info->type() == JSJitInfo::Method);
JSJitMethodOp method = info->method;
return method(cx, obj, val.toPrivate(), JSJitMethodCallArgs(args));
}
static void
InitDOMObject(HandleObject obj)
{
/* Fow now just initialize to a constant we can check. */
SetReservedSlot(obj, DOM_OBJECT_SLOT, PRIVATE_TO_JSVAL((void *)0x1234));
}
static bool
dom_constructor(JSContext* cx, unsigned argc, JS::Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
RootedObject callee(cx, &args.callee());
RootedValue protov(cx);
if (!JSObject::getProperty(cx, callee, callee, cx->names().prototype, &protov))
return false;
if (!protov.isObject()) {
JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, JSMSG_BAD_PROTOTYPE, "FakeDOMObject");
return false;
}
RootedObject proto(cx, &protov.toObject());
RootedObject domObj(cx, JS_NewObject(cx, &dom_class, proto, JS::NullPtr()));
if (!domObj)
return false;
InitDOMObject(domObj);
args.rval().setObject(*domObj);
return true;
}
static bool
InstanceClassHasProtoAtDepth(const Class *clasp, uint32_t protoID, uint32_t depth)
{
/* There's only a single (fake) DOM object in the shell, so just return true. */
return true;
}
class ScopedFileDesc
{
intptr_t fd_;
public:
enum LockType { READ_LOCK, WRITE_LOCK };
ScopedFileDesc(int fd, LockType lockType)
: fd_(fd)
{
if (fd == -1)
return;
if (!jsCacheOpened.compareExchange(false, true)) {
close(fd_);
fd_ = -1;
return;
}
}
~ScopedFileDesc() {
if (fd_ == -1)
return;
JS_ASSERT(jsCacheOpened == true);
jsCacheOpened = false;
close(fd_);
}
operator intptr_t() const {
return fd_;
}
intptr_t forget() {
intptr_t ret = fd_;
fd_ = -1;
return ret;
}
};
// To guard against corrupted cache files generated by previous crashes, write
// asmJSCacheCookie to the first uint32_t of the file only after the file is
// fully serialized and flushed to disk.
static const uint32_t asmJSCacheCookie = 0xabbadaba;
static bool
ShellOpenAsmJSCacheEntryForRead(HandleObject global, const jschar *begin, const jschar *limit,
size_t *serializedSizeOut, const uint8_t **memoryOut,
intptr_t *handleOut)
{
if (!jsCachingEnabled || !jsCacheAsmJSPath)
return false;
ScopedFileDesc fd(open(jsCacheAsmJSPath, O_RDWR), ScopedFileDesc::READ_LOCK);
if (fd == -1)
return false;
// Get the size and make sure we can dereference at least one uint32_t.
off_t off = lseek(fd, 0, SEEK_END);
if (off == -1 || off < (off_t)sizeof(uint32_t))
return false;
// Map the file into memory.
void *memory;
#ifdef XP_WIN
HANDLE fdOsHandle = (HANDLE)_get_osfhandle(fd);
HANDLE fileMapping = CreateFileMapping(fdOsHandle, nullptr, PAGE_READWRITE, 0, 0, nullptr);
if (!fileMapping)
return false;
memory = MapViewOfFile(fileMapping, FILE_MAP_READ, 0, 0, 0);
CloseHandle(fileMapping);
if (!memory)
return false;
#else
memory = mmap(nullptr, off, PROT_READ, MAP_SHARED, fd, 0);
if (memory == MAP_FAILED)
return false;
#endif
// Perform check described by asmJSCacheCookie comment.
if (*(uint32_t *)memory != asmJSCacheCookie) {
#ifdef XP_WIN
UnmapViewOfFile(memory);
#else
munmap(memory, off);
#endif
return false;
}
// The embedding added the cookie so strip it off of the buffer returned to
// the JS engine.
*serializedSizeOut = off - sizeof(uint32_t);
*memoryOut = (uint8_t *)memory + sizeof(uint32_t);
*handleOut = fd.forget();
return true;
}
static void
ShellCloseAsmJSCacheEntryForRead(size_t serializedSize, const uint8_t *memory, intptr_t handle)
{
// Undo the cookie adjustment done when opening the file.
memory -= sizeof(uint32_t);
serializedSize += sizeof(uint32_t);
// Release the memory mapping and file.
#ifdef XP_WIN
UnmapViewOfFile(const_cast<uint8_t*>(memory));
#else
munmap(const_cast<uint8_t*>(memory), serializedSize);
#endif
JS_ASSERT(jsCacheOpened == true);
jsCacheOpened = false;
close(handle);
}
static bool
ShellOpenAsmJSCacheEntryForWrite(HandleObject global, bool installed,
const jschar *begin, const jschar *end,
size_t serializedSize, uint8_t **memoryOut, intptr_t *handleOut)
{
if (!jsCachingEnabled || !jsCacheAsmJSPath)
return false;
// Create the cache directory if it doesn't already exist.
struct stat dirStat;
if (stat(jsCacheDir, &dirStat) == 0) {
if (!(dirStat.st_mode & S_IFDIR))
return false;
} else {
#ifdef XP_WIN
if (mkdir(jsCacheDir) != 0)
return false;
#else
if (mkdir(jsCacheDir, 0777) != 0)
return false;
#endif
}
ScopedFileDesc fd(open(jsCacheAsmJSPath, O_CREAT|O_RDWR, 0660), ScopedFileDesc::WRITE_LOCK);
if (fd == -1)
return false;
// Include extra space for the asmJSCacheCookie.
serializedSize += sizeof(uint32_t);
// Resize the file to the appropriate size after zeroing their contents.
#ifdef XP_WIN
if (chsize(fd, 0))
return false;
if (chsize(fd, serializedSize))
return false;
#else
if (ftruncate(fd, 0))
return false;
if (ftruncate(fd, serializedSize))
return false;
#endif
// Map the file into memory.
void *memory;
#ifdef XP_WIN
HANDLE fdOsHandle = (HANDLE)_get_osfhandle(fd);
HANDLE fileMapping = CreateFileMapping(fdOsHandle, nullptr, PAGE_READWRITE, 0, 0, nullptr);
if (!fileMapping)
return false;
memory = MapViewOfFile(fileMapping, FILE_MAP_WRITE, 0, 0, 0);
CloseHandle(fileMapping);
if (!memory)
return false;
#else
memory = mmap(nullptr, serializedSize, PROT_WRITE, MAP_SHARED, fd, 0);
if (memory == MAP_FAILED)
return false;
#endif
// The embedding added the cookie so strip it off of the buffer returned to
// the JS engine. The asmJSCacheCookie will be written on close, below.
JS_ASSERT(*(uint32_t *)memory == 0);
*memoryOut = (uint8_t *)memory + sizeof(uint32_t);
*handleOut = fd.forget();
return true;
}
static void
ShellCloseAsmJSCacheEntryForWrite(size_t serializedSize, uint8_t *memory, intptr_t handle)
{
// Undo the cookie adjustment done when opening the file.
memory -= sizeof(uint32_t);
serializedSize += sizeof(uint32_t);
// Write the magic cookie value after flushing the entire cache entry.
#ifdef XP_WIN
FlushViewOfFile(memory, serializedSize);
FlushFileBuffers(HANDLE(_get_osfhandle(handle)));
#else
msync(memory, serializedSize, MS_SYNC);
#endif
JS_ASSERT(*(uint32_t *)memory == 0);
*(uint32_t *)memory = asmJSCacheCookie;
// Free the memory mapping and file.
#ifdef XP_WIN
UnmapViewOfFile(const_cast<uint8_t*>(memory));
#else
munmap(memory, serializedSize);
#endif
JS_ASSERT(jsCacheOpened == true);
jsCacheOpened = false;
close(handle);
}
static bool
ShellBuildId(JS::BuildIdCharVector *buildId)
{
// The browser embeds the date into the buildid and the buildid is embedded
// in the binary, so every 'make' necessarily builds a new firefox binary.
// Fortunately, the actual firefox executable is tiny -- all the code is in
// libxul.so and other shared modules -- so this isn't a big deal. Not so
// for the statically-linked JS shell. To avoid recompmiling js.cpp and
// re-linking 'js' on every 'make', we use a constant buildid and rely on
// the shell user to manually clear the cache (deleting the dir passed to
// --js-cache) between cache-breaking updates. Note: jit_tests.py does this
// on every run).
const char buildid[] = "JS-shell";
return buildId->append(buildid, sizeof(buildid));
}
static const JS::AsmJSCacheOps asmJSCacheOps = {
ShellOpenAsmJSCacheEntryForRead,
ShellCloseAsmJSCacheEntryForRead,
ShellOpenAsmJSCacheEntryForWrite,
ShellCloseAsmJSCacheEntryForWrite,
ShellBuildId
};
static JSContext *
NewContext(JSRuntime *rt)
{
JSContext *cx = JS_NewContext(rt, gStackChunkSize);
if (!cx)
return nullptr;
JSShellContextData *data = NewContextData();
if (!data) {
DestroyContext(cx, false);
return nullptr;
}
JS_SetContextPrivate(cx, data);
JS_SetErrorReporter(cx, my_ErrorReporter);
return cx;
}
static void
DestroyContext(JSContext *cx, bool withGC)
{
// Don't use GetContextData as |data| could be a nullptr in the case of
// destroying a context precisely because we couldn't create its private
// data.
JSShellContextData *data = (JSShellContextData *) JS_GetContextPrivate(cx);
JS_SetContextPrivate(cx, nullptr);
free(data);
withGC ? JS_DestroyContext(cx) : JS_DestroyContextNoGC(cx);
}
static JSObject *
NewGlobalObject(JSContext *cx, JS::CompartmentOptions &options,
JSPrincipals *principals)
{
RootedObject glob(cx, JS_NewGlobalObject(cx, &global_class, principals,
JS::DontFireOnNewGlobalHook, options));
if (!glob)
return nullptr;
{
JSAutoCompartment ac(cx, glob);
#ifndef LAZY_STANDARD_CLASSES
if (!JS_InitStandardClasses(cx, glob))
return nullptr;
#endif
#ifdef JS_HAS_CTYPES
if (!JS_InitCTypesClass(cx, glob))
return nullptr;
#endif
if (!JS_InitReflect(cx, glob))
return nullptr;
if (!JS_DefineDebuggerObject(cx, glob))
return nullptr;
if (!JS::RegisterPerfMeasurement(cx, glob))
return nullptr;
if (!JS_DefineFunctionsWithHelp(cx, glob, shell_functions) ||
!JS_DefineProfilingFunctions(cx, glob))
{
return nullptr;
}
if (!js::DefineTestingFunctions(cx, glob, fuzzingSafe))
return nullptr;
if (!fuzzingSafe && !JS_DefineFunctionsWithHelp(cx, glob, fuzzing_unsafe_functions))
return nullptr;
/* Initialize FakeDOMObject. */
static const js::DOMCallbacks DOMcallbacks = {
InstanceClassHasProtoAtDepth
};
SetDOMCallbacks(cx->runtime(), &DOMcallbacks);
RootedObject domProto(cx, JS_InitClass(cx, glob, js::NullPtr(), &dom_class, dom_constructor,
0, dom_props, dom_methods, nullptr, nullptr));
if (!domProto)
return nullptr;
/* Initialize FakeDOMObject.prototype */
InitDOMObject(domProto);
}
JS_FireOnNewGlobalObject(cx, glob);
return glob;
}
static bool
BindScriptArgs(JSContext *cx, JSObject *obj_, OptionParser *op)
{
RootedObject obj(cx, obj_);
MultiStringRange msr = op->getMultiStringArg("scriptArgs");
RootedObject scriptArgs(cx);
scriptArgs = JS_NewArrayObject(cx, 0);
if (!scriptArgs)
return false;
if (!JS_DefineProperty(cx, obj, "scriptArgs", scriptArgs, 0))
return false;
for (size_t i = 0; !msr.empty(); msr.popFront(), ++i) {
const char *scriptArg = msr.front();
JS::RootedString str(cx, JS_NewStringCopyZ(cx, scriptArg));
if (!str ||
!JS_DefineElement(cx, scriptArgs, i, str, JSPROP_ENUMERATE))
{
return false;
}
}
return true;
}
static bool
OptionFailure(const char *option, const char *str)
{
fprintf(stderr, "Unrecognized option for %s: %s\n", option, str);
return false;
}
static int
ProcessArgs(JSContext *cx, JSObject *obj_, OptionParser *op)
{
RootedObject obj(cx, obj_);
if (op->getBoolOption('s'))
JS::RuntimeOptionsRef(cx).toggleExtraWarnings();
if (op->getBoolOption('d')) {
JS_SetRuntimeDebugMode(JS_GetRuntime(cx), true);
JS_SetDebugMode(cx, true);
}
/* |scriptArgs| gets bound on the global before any code is run. */
if (!BindScriptArgs(cx, obj, op))
return EXIT_FAILURE;
MultiStringRange filePaths = op->getMultiStringOption('f');
MultiStringRange codeChunks = op->getMultiStringOption('e');
if (filePaths.empty() && codeChunks.empty() && !op->getStringArg("script")) {
Process(cx, obj, nullptr, true); /* Interactive. */
return gExitCode;
}
while (!filePaths.empty() || !codeChunks.empty()) {
size_t fpArgno = filePaths.empty() ? -1 : filePaths.argno();
size_t ccArgno = codeChunks.empty() ? -1 : codeChunks.argno();
if (fpArgno < ccArgno) {
char *path = filePaths.front();
Process(cx, obj, path, false);
if (gExitCode)
return gExitCode;
filePaths.popFront();
} else {
const char *code = codeChunks.front();
RootedValue rval(cx);
if (!JS_EvaluateScript(cx, obj, code, strlen(code), "-e", 1, &rval))
return gExitCode ? gExitCode : EXITCODE_RUNTIME_ERROR;
codeChunks.popFront();
}
}
/* The |script| argument is processed after all options. */
if (const char *path = op->getStringArg("script")) {
Process(cx, obj, path, false);
if (gExitCode)
return gExitCode;
}
if (op->getBoolOption('i'))
Process(cx, obj, nullptr, true);
return gExitCode ? gExitCode : EXIT_SUCCESS;
}
static bool
SetRuntimeOptions(JSRuntime *rt, const OptionParser &op)
{
bool enableBaseline = !op.getBoolOption("no-baseline");
bool enableIon = !op.getBoolOption("no-ion");
bool enableAsmJS = !op.getBoolOption("no-asmjs");
bool enableNativeRegExp = !op.getBoolOption("no-native-regexp");
JS::RuntimeOptionsRef(rt).setBaseline(enableBaseline)
.setIon(enableIon)
.setAsmJS(enableAsmJS)
.setNativeRegExp(enableNativeRegExp);
if (const char *str = op.getStringOption("ion-scalar-replacement")) {
if (strcmp(str, "on") == 0)
jit::js_JitOptions.disableScalarReplacement = false;
else if (strcmp(str, "off") == 0)
jit::js_JitOptions.disableScalarReplacement = true;
else
return OptionFailure("ion-scalar-replacement", str);
}
if (const char *str = op.getStringOption("ion-gvn")) {
if (strcmp(str, "off") == 0) {
jit::js_JitOptions.disableGvn = true;
} else if (strcmp(str, "on") != 0 &&
strcmp(str, "optimistic") != 0 &&
strcmp(str, "pessimistic") != 0)
{
// We accept "pessimistic" and "optimistic" as synonyms for "on"
// for backwards compatibility.
return OptionFailure("ion-gvn", str);
}
}
if (const char *str = op.getStringOption("ion-licm")) {
if (strcmp(str, "on") == 0)
jit::js_JitOptions.disableLicm = false;
else if (strcmp(str, "off") == 0)
jit::js_JitOptions.disableLicm = true;
else
return OptionFailure("ion-licm", str);
}
if (const char *str = op.getStringOption("ion-edgecase-analysis")) {
if (strcmp(str, "on") == 0)
jit::js_JitOptions.disableEdgeCaseAnalysis = false;
else if (strcmp(str, "off") == 0)
jit::js_JitOptions.disableEdgeCaseAnalysis = true;
else
return OptionFailure("ion-edgecase-analysis", str);
}
if (const char *str = op.getStringOption("ion-range-analysis")) {
if (strcmp(str, "on") == 0)
jit::js_JitOptions.disableRangeAnalysis = false;
else if (strcmp(str, "off") == 0)
jit::js_JitOptions.disableRangeAnalysis = true;
else
return OptionFailure("ion-range-analysis", str);
}
if (const char *str = op.getStringOption("ion-loop-unrolling")) {
if (strcmp(str, "on") == 0)
jit::js_JitOptions.disableLoopUnrolling = false;
else if (strcmp(str, "off") == 0)
jit::js_JitOptions.disableLoopUnrolling = true;
else
return OptionFailure("ion-loop-unrolling", str);
}
if (op.getBoolOption("ion-check-range-analysis"))
jit::js_JitOptions.checkRangeAnalysis = true;
if (const char *str = op.getStringOption("ion-inlining")) {
if (strcmp(str, "on") == 0)
jit::js_JitOptions.disableInlining = false;
else if (strcmp(str, "off") == 0)
jit::js_JitOptions.disableInlining = true;
else
return OptionFailure("ion-inlining", str);
}
if (const char *str = op.getStringOption("ion-osr")) {
if (strcmp(str, "on") == 0)
jit::js_JitOptions.osr = true;
else if (strcmp(str, "off") == 0)
jit::js_JitOptions.osr = false;
else
return OptionFailure("ion-osr", str);
}
if (const char *str = op.getStringOption("ion-limit-script-size")) {
if (strcmp(str, "on") == 0)
jit::js_JitOptions.limitScriptSize = true;
else if (strcmp(str, "off") == 0)
jit::js_JitOptions.limitScriptSize = false;
else
return OptionFailure("ion-limit-script-size", str);
}
int32_t useCount = op.getIntOption("ion-uses-before-compile");
if (useCount >= 0)
jit::js_JitOptions.setUsesBeforeCompile(useCount);
useCount = op.getIntOption("baseline-uses-before-compile");
if (useCount >= 0)
jit::js_JitOptions.baselineUsesBeforeCompile = useCount;
if (op.getBoolOption("baseline-eager"))
jit::js_JitOptions.baselineUsesBeforeCompile = 0;
if (const char *str = op.getStringOption("ion-regalloc")) {
if (strcmp(str, "lsra") == 0) {
jit::js_JitOptions.forceRegisterAllocator = true;
jit::js_JitOptions.forcedRegisterAllocator = jit::RegisterAllocator_LSRA;
} else if (strcmp(str, "backtracking") == 0) {
jit::js_JitOptions.forceRegisterAllocator = true;
jit::js_JitOptions.forcedRegisterAllocator = jit::RegisterAllocator_Backtracking;
} else if (strcmp(str, "stupid") == 0) {
jit::js_JitOptions.forceRegisterAllocator = true;
jit::js_JitOptions.forcedRegisterAllocator = jit::RegisterAllocator_Stupid;
} else {
return OptionFailure("ion-regalloc", str);
}
}
if (op.getBoolOption("ion-eager"))
jit::js_JitOptions.setEagerCompilation();
if (op.getBoolOption("ion-compile-try-catch"))
jit::js_JitOptions.compileTryCatch = true;
bool offthreadCompilation = true;
if (const char *str = op.getStringOption("ion-offthread-compile")) {
if (strcmp(str, "off") == 0)
offthreadCompilation = false;
else if (strcmp(str, "on") != 0)
return OptionFailure("ion-offthread-compile", str);
}
rt->setOffthreadIonCompilationEnabled(offthreadCompilation);
if (op.getStringOption("ion-parallel-compile")) {
fprintf(stderr, "--ion-parallel-compile is deprecated. Please use --ion-offthread-compile instead.\n");
return false;
}
#if defined(JS_CODEGEN_ARM)
if (const char *str = op.getStringOption("arm-hwcap"))
jit::ParseARMHwCapFlags(str);
int32_t fill = op.getIntOption("arm-asm-nop-fill");
if (fill >= 0)
jit::Assembler::NopFill = fill;
int32_t poolMaxOffset = op.getIntOption("asm-pool-max-offset");
if (poolMaxOffset >= 5 && poolMaxOffset <= 1024)
jit::Assembler::AsmPoolMaxOffset = poolMaxOffset;
#endif
#if defined(JS_ARM_SIMULATOR)
if (op.getBoolOption("arm-sim-icache-checks"))
jit::Simulator::ICacheCheckingEnabled = true;
int32_t stopAt = op.getIntOption("arm-sim-stop-at");
if (stopAt >= 0)
jit::Simulator::StopSimAt = stopAt;
#elif defined(JS_MIPS_SIMULATOR)
if (op.getBoolOption("mips-sim-icache-checks"))
jit::Simulator::ICacheCheckingEnabled = true;
int32_t stopAt = op.getIntOption("mips-sim-stop-at");
if (stopAt >= 0)
jit::Simulator::StopSimAt = stopAt;
#endif
reportWarnings = op.getBoolOption('w');
compileOnly = op.getBoolOption('c');
printTiming = op.getBoolOption('b');
rt->profilingScripts = enableDisassemblyDumps = op.getBoolOption('D');
jsCacheDir = op.getStringOption("js-cache");
if (jsCacheDir) {
if (!op.getBoolOption("no-js-cache-per-process"))
jsCacheDir = JS_smprintf("%s/%u", jsCacheDir, (unsigned)getpid());
else
jsCacheDir = JS_strdup(rt, jsCacheDir);
jsCacheAsmJSPath = JS_smprintf("%s/asmjs.cache", jsCacheDir);
}
#ifdef DEBUG
dumpEntrainedVariables = op.getBoolOption("dump-entrained-variables");
#endif
return true;
}
static int
Shell(JSContext *cx, OptionParser *op, char **envp)
{
JSAutoRequest ar(cx);
if (op->getBoolOption("fuzzing-safe"))
fuzzingSafe = true;
else
fuzzingSafe = (getenv("MOZ_FUZZING_SAFE") && getenv("MOZ_FUZZING_SAFE")[0] != '0');
RootedObject glob(cx);
JS::CompartmentOptions options;
options.setVersion(JSVERSION_LATEST);
glob = NewGlobalObject(cx, options, nullptr);
if (!glob)
return 1;
JSAutoCompartment ac(cx, glob);
JSObject *envobj = JS_DefineObject(cx, glob, "environment", &env_class);
if (!envobj)
return 1;
JS_SetPrivate(envobj, envp);
int result = ProcessArgs(cx, glob, op);
if (enableDisassemblyDumps)
JS_DumpCompartmentPCCounts(cx);
if (!op->getBoolOption("no-js-cache-per-process")) {
if (jsCacheAsmJSPath) {
unlink(jsCacheAsmJSPath);
JS_free(cx, const_cast<char *>(jsCacheAsmJSPath));
}
if (jsCacheDir) {
rmdir(jsCacheDir);
JS_free(cx, const_cast<char *>(jsCacheDir));
}
}
return result;
}
static void
MaybeOverrideOutFileFromEnv(const char* const envVar,
FILE* defaultOut,
FILE** outFile)
{
const char* outPath = getenv(envVar);
if (!outPath || !*outPath || !(*outFile = fopen(outPath, "w"))) {
*outFile = defaultOut;
}
}
/* Pretend we can always preserve wrappers for dummy DOM objects. */
static bool
DummyPreserveWrapperCallback(JSContext *cx, JSObject *obj)
{
return true;
}
int
main(int argc, char **argv, char **envp)
{
sArgc = argc;
sArgv = argv;
JSRuntime *rt;
JSContext *cx;
int result;
#ifdef XP_WIN
{
const char *crash_option = getenv("XRE_NO_WINDOWS_CRASH_DIALOG");
if (crash_option && strncmp(crash_option, "1", 1)) {
DWORD oldmode = SetErrorMode(SEM_NOGPFAULTERRORBOX);
SetErrorMode(oldmode | SEM_NOGPFAULTERRORBOX);
}
}
#endif
#ifdef HAVE_SETLOCALE
setlocale(LC_ALL, "");
#endif
MaybeOverrideOutFileFromEnv("JS_STDERR", stderr, &gErrFile);
MaybeOverrideOutFileFromEnv("JS_STDOUT", stdout, &gOutFile);
OptionParser op("Usage: {progname} [options] [[script] scriptArgs*]");
op.setDescription("The SpiderMonkey shell provides a command line interface to the "
"JavaScript engine. Code and file options provided via the command line are "
"run left to right. If provided, the optional script argument is run after "
"all options have been processed. Just-In-Time compilation modes may be enabled via "
"command line options.");
op.setDescriptionWidth(72);
op.setHelpWidth(80);
op.setVersion(JS_GetImplementationVersion());
if (!op.addMultiStringOption('f', "file", "PATH", "File path to run")
|| !op.addMultiStringOption('e', "execute", "CODE", "Inline code to run")
|| !op.addBoolOption('i', "shell", "Enter prompt after running code")
|| !op.addBoolOption('c', "compileonly", "Only compile, don't run (syntax checking mode)")
|| !op.addBoolOption('w', "warnings", "Emit warnings")
|| !op.addBoolOption('W', "nowarnings", "Don't emit warnings")
|| !op.addBoolOption('s', "strict", "Check strictness")
|| !op.addBoolOption('d', "debugjit", "Enable runtime debug mode for method JIT code")
|| !op.addBoolOption('D', "dump-bytecode", "Dump bytecode with exec count for all scripts")
|| !op.addBoolOption('b', "print-timing", "Print sub-ms runtime for each file that's run")
|| !op.addStringOption('\0', "js-cache", "[path]",
"Enable the JS cache by specifying the path of the directory to use "
"to hold cache files")
|| !op.addBoolOption('\0', "no-js-cache-per-process",
"Deactivates cache per process. Otherwise, generate a separate cache"
"sub-directory for this process inside the cache directory"
"specified by --js-cache. This cache directory will be removed"
"when the js shell exits. This is useful for running tests in"
"parallel.")
#ifdef DEBUG
|| !op.addBoolOption('O', "print-alloc", "Print the number of allocations at exit")
#endif
|| !op.addOptionalStringArg("script", "A script to execute (after all options)")
|| !op.addOptionalMultiStringArg("scriptArgs",
"String arguments to bind as |scriptArgs| in the "
"shell's global")
|| !op.addIntOption('\0', "thread-count", "COUNT", "Use COUNT auxiliary threads "
"(default: # of cores - 1)", -1)
|| !op.addBoolOption('\0', "ion", "Enable IonMonkey (default)")
|| !op.addBoolOption('\0', "no-ion", "Disable IonMonkey")
|| !op.addBoolOption('\0', "no-asmjs", "Disable asm.js compilation")
|| !op.addBoolOption('\0', "no-native-regexp", "Disable native regexp compilation")
|| !op.addStringOption('\0', "ion-scalar-replacement", "on/off",
"Scalar Replacement (default: off, on to enable)")
|| !op.addStringOption('\0', "ion-gvn", "[mode]",
"Specify Ion global value numbering:\n"
" off: disable GVN\n"
" on: enable GVN (default)\n")
|| !op.addStringOption('\0', "ion-licm", "on/off",
"Loop invariant code motion (default: on, off to disable)")
|| !op.addStringOption('\0', "ion-edgecase-analysis", "on/off",
"Find edge cases where Ion can avoid bailouts (default: on, off to disable)")
|| !op.addStringOption('\0', "ion-range-analysis", "on/off",
"Range analysis (default: on, off to disable)")
|| !op.addStringOption('\0', "ion-loop-unrolling", "on/off",
"Loop unrolling (default: off, on to enable)")
|| !op.addBoolOption('\0', "ion-check-range-analysis",
"Range analysis checking")
|| !op.addStringOption('\0', "ion-inlining", "on/off",
"Inline methods where possible (default: on, off to disable)")
|| !op.addStringOption('\0', "ion-osr", "on/off",
"On-Stack Replacement (default: on, off to disable)")
|| !op.addStringOption('\0', "ion-limit-script-size", "on/off",
"Don't compile very large scripts (default: on, off to disable)")
|| !op.addIntOption('\0', "ion-uses-before-compile", "COUNT",
"Wait for COUNT calls or iterations before compiling "
"(default: 1000)", -1)
|| !op.addStringOption('\0', "ion-regalloc", "[mode]",
"Specify Ion register allocation:\n"
" lsra: Linear Scan register allocation (default)\n"
" backtracking: Priority based backtracking register allocation\n"
" stupid: Simple block local register allocation")
|| !op.addBoolOption('\0', "ion-eager", "Always ion-compile methods (implies --baseline-eager)")
|| !op.addBoolOption('\0', "ion-compile-try-catch", "Ion-compile try-catch statements")
|| !op.addStringOption('\0', "ion-offthread-compile", "on/off",
"Compile scripts off thread (default: on)")
|| !op.addStringOption('\0', "ion-parallel-compile", "on/off",
"--ion-parallel compile is deprecated. Use --ion-offthread-compile.")
|| !op.addBoolOption('\0', "baseline", "Enable baseline compiler (default)")
|| !op.addBoolOption('\0', "no-baseline", "Disable baseline compiler")
|| !op.addBoolOption('\0', "baseline-eager", "Always baseline-compile methods")
|| !op.addIntOption('\0', "baseline-uses-before-compile", "COUNT",
"Wait for COUNT calls or iterations before baseline-compiling "
"(default: 10)", -1)
|| !op.addBoolOption('\0', "no-fpu", "Pretend CPU does not support floating-point operations "
"to test JIT codegen (no-op on platforms other than x86).")
|| !op.addBoolOption('\0', "no-sse3", "Pretend CPU does not support SSE3 instructions and above "
"to test JIT codegen (no-op on platforms other than x86 and x64).")
|| !op.addBoolOption('\0', "no-sse4", "Pretend CPU does not support SSE4 instructions"
"to test JIT codegen (no-op on platforms other than x86 and x64).")
|| !op.addBoolOption('\0', "fuzzing-safe", "Don't expose functions that aren't safe for "
"fuzzers to call")
|| !op.addBoolOption('\0', "no-threads", "Disable helper threads and PJS threads")
#ifdef DEBUG
|| !op.addBoolOption('\0', "dump-entrained-variables", "Print variables which are "
"unnecessarily entrained by inner functions")
#endif
#ifdef JSGC_GENERATIONAL
|| !op.addBoolOption('\0', "no-ggc", "Disable Generational GC")
#endif
|| !op.addIntOption('\0', "available-memory", "SIZE",
"Select GC settings based on available memory (MB)", 0)
#if defined(JS_CODEGEN_ARM)
|| !op.addStringOption('\0', "arm-hwcap", "[features]",
"Specify ARM code generation features, or 'help' to list all features.")
|| !op.addIntOption('\0', "arm-asm-nop-fill", "SIZE",
"Insert the given number of NOP instructions at all possible pool locations.", 0)
|| !op.addIntOption('\0', "asm-pool-max-offset", "OFFSET",
"The maximum pc relative OFFSET permitted in pool reference instructions.", 1024)
#endif
#if defined(JS_ARM_SIMULATOR)
|| !op.addBoolOption('\0', "arm-sim-icache-checks", "Enable icache flush checks in the ARM "
"simulator.")
|| !op.addIntOption('\0', "arm-sim-stop-at", "NUMBER", "Stop the ARM simulator after the given "
"NUMBER of instructions.", -1)
#elif defined(JS_MIPS_SIMULATOR)
|| !op.addBoolOption('\0', "mips-sim-icache-checks", "Enable icache flush checks in the MIPS "
"simulator.")
|| !op.addIntOption('\0', "mips-sim-stop-at", "NUMBER", "Stop the MIPS simulator after the given "
"NUMBER of instructions.", -1)
#endif
#ifdef JSGC_GENERATIONAL
|| !op.addIntOption('\0', "nursery-size", "SIZE-MB", "Set the maximum nursery size in MB", 16)
#endif
)
{
return EXIT_FAILURE;
}
op.setArgTerminatesOptions("script", true);
op.setArgCapturesRest("scriptArgs");
switch (op.parseArgs(argc, argv)) {
case OptionParser::ParseHelp:
return EXIT_SUCCESS;
case OptionParser::ParseError:
op.printHelp(argv[0]);
return EXIT_FAILURE;
case OptionParser::Fail:
return EXIT_FAILURE;
case OptionParser::Okay:
break;
}
if (op.getHelpOption())
return EXIT_SUCCESS;
#ifdef DEBUG
/*
* Process OOM options as early as possible so that we can observe as many
* allocations as possible.
*/
OOM_printAllocationCount = op.getBoolOption('O');
#endif
#ifdef JS_CODEGEN_X86
if (op.getBoolOption("no-fpu"))
js::jit::CPUInfo::SetFloatingPointDisabled();
#endif
#if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)
if (op.getBoolOption("no-sse3")) {
js::jit::CPUInfo::SetSSE3Disabled();
PropagateFlagToNestedShells("--no-sse3");
}
if (op.getBoolOption("no-sse4")) {
js::jit::CPUInfo::SetSSE4Disabled();
PropagateFlagToNestedShells("--no-sse4");
}
#endif
if (op.getBoolOption("no-threads"))
js::DisableExtraThreads();
// The fake thread count must be set before initializing the Runtime,
// which spins up the thread pool.
int32_t threadCount = op.getIntOption("thread-count");
if (threadCount >= 0)
SetFakeCPUCount(threadCount);
// Start the engine.
if (!JS_Init())
return 1;
size_t nurseryBytes = JS::DefaultNurseryBytes;
#ifdef JSGC_GENERATIONAL
nurseryBytes = op.getIntOption("nursery-size") * 1024L * 1024L;
#endif
/* Use the same parameters as the browser in xpcjsruntime.cpp. */
rt = JS_NewRuntime(JS::DefaultHeapMaxBytes, nurseryBytes);
if (!rt)
return 1;
JS::SetOutOfMemoryCallback(rt, my_OOMCallback, nullptr);
if (!SetRuntimeOptions(rt, op))
return 1;
gInterruptFunc.emplace(rt, NullValue());
JS_SetGCParameter(rt, JSGC_MAX_BYTES, 0xffffffff);
#ifdef JSGC_GENERATIONAL
Maybe<JS::AutoDisableGenerationalGC> noggc;
if (op.getBoolOption("no-ggc"))
noggc.emplace(rt);
#endif
size_t availMem = op.getIntOption("available-memory");
if (availMem > 0)
JS_SetGCParametersBasedOnAvailableMemory(rt, availMem);
JS_SetTrustedPrincipals(rt, &ShellPrincipals::fullyTrusted);
JS_SetSecurityCallbacks(rt, &ShellPrincipals::securityCallbacks);
JS_InitDestroyPrincipalsCallback(rt, ShellPrincipals::destroy);
JS_SetInterruptCallback(rt, ShellInterruptCallback);
JS::SetAsmJSCacheOps(rt, &asmJSCacheOps);
JS_SetNativeStackQuota(rt, gMaxStackSize);
if (!offThreadState.init())
return 1;
if (!InitWatchdog(rt))
return 1;
cx = NewContext(rt);
if (!cx)
return 1;
JS_SetGCParameter(rt, JSGC_MODE, JSGC_MODE_INCREMENTAL);
JS_SetGCParameterForThread(cx, JSGC_MAX_CODE_CACHE_BYTES, 16 * 1024 * 1024);
js::SetPreserveWrapperCallback(rt, DummyPreserveWrapperCallback);
result = Shell(cx, &op, envp);
#ifdef DEBUG
if (OOM_printAllocationCount)
printf("OOM max count: %u\n", OOM_counter);
#endif
DestroyContext(cx, true);
KillWatchdog();
gInterruptFunc.reset();
MOZ_ASSERT_IF(!CanUseExtraThreads(), workerThreads.empty());
for (size_t i = 0; i < workerThreads.length(); i++)
PR_JoinThread(workerThreads[i]);
#ifdef JSGC_GENERATIONAL
noggc.reset();
#endif
JS_DestroyRuntime(rt);
JS_ShutDown();
return result;
}
| 30.507717 | 125 | 0.6071 | [
"object",
"shape",
"vector"
] |
27306396d37abbabf8c7e94f1d0044ac31570408 | 5,732 | cpp | C++ | src/standingpoint.cpp | zhenyushi/vrui_mdf | f1144ac11b678623cfeea0ae90bd9c2703cca9a1 | [
"BSD-3-Clause"
] | 8 | 2018-08-29T14:47:04.000Z | 2021-09-28T23:54:51.000Z | archive/src/standingpoint.cpp | ConradKent/vrui_mdf | 33c07a3e693d061bcd8a9566ce9667166ecbb3fa | [
"BSD-3-Clause"
] | 1 | 2019-03-04T23:56:50.000Z | 2021-01-01T03:41:49.000Z | archive/src/standingpoint.cpp | ConradKent/vrui_mdf | 33c07a3e693d061bcd8a9566ce9667166ecbb3fa | [
"BSD-3-Clause"
] | 3 | 2019-07-23T17:26:56.000Z | 2021-06-25T18:58:12.000Z | /*
*/
#include <stdlib.h>
#include<iostream>
#include<fstream>
#include <ros/ros.h>
#include <vrui_mdf/Vive.h>
#include "std_msgs/String.h"
#include <tf/transform_broadcaster.h> // translation between Eular angle and Quaternion, unnecessary for tracking since Quaternion can be received directly
#include "tf/transform_datatypes.h"
#include <geometry_msgs/Twist.h>
#include <gazebo_msgs/SetModelState.h>
#include "gazebo_msgs/GetModelState.h"
#include "gazebo_msgs/DeleteModel.h"
#include "gazebo_msgs/SpawnModel.h"
// define callback function in a class so that data running inside the class can be used globally
class Vive_Listener
{
public:
vrui_mdf::Vive vive;
void callback(const vrui_mdf::Vive& msg)
{
vive = msg;
}
};
class ThrowMethod
{
public:
gazebo_msgs::ModelState throw_state;
gazebo_msgs::ModelState standingpoint;
gazebo_msgs::ModelState base_point;
gazebo_msgs::SpawnModel sm;
gazebo_msgs::DeleteModel deletemodel;
int trigger;// 0
std::string standingpoint_name;//"standingpoint"
std::string model_name; //"mobile_base"
bool once;
ros::ServiceClient delete_model;
ros::ServiceClient spawn_model;
void readmodel(const char* path)
{
std::ifstream ifs;
ifs.open(path);
std::stringstream stringstream;
stringstream << ifs.rdbuf();
sm.request.model_name = standingpoint_name;
sm.request.model_xml = stringstream.str();
sm.request.robot_namespace = ros::this_node::getNamespace();
sm.request.reference_frame = "world";
}
void controller(const vrui_mdf::Vive& vive)
{
if(trigger==0 & (int)vive.ctrl_left.buttons.trigger == 1)
{
spawn_model.call(sm);
trigger = 1;
}
if((int)vive.ctrl_left.buttons.trigger == 1)
{
double roll, pitch, yaw;
tf::Quaternion Qua(vive.ctrl_left.pose.orientation.x,vive.ctrl_left.pose.orientation.y,vive.ctrl_left.pose.orientation.z,vive.ctrl_left.pose.orientation.w);
tf::Matrix3x3 m(Qua); //rotation matrix from Quaternion
m.getRPY(roll, pitch, yaw); //eular angle form rotation matrix
standingpoint.model_name = standingpoint_name;
standingpoint.reference_frame="world";
standingpoint.pose.position.x = vive.ctrl_left.pose.position.x - 2*(m[0][0]*vive.ctrl_left.pose.position.z);
standingpoint.pose.position.y = vive.ctrl_left.pose.position.y - 2*(m[1][0]*vive.ctrl_left.pose.position.z);
standingpoint.pose.position.z = 0;
standingpoint.pose.orientation.x = 0;
standingpoint.pose.orientation.y = 0;
standingpoint.pose.orientation.z = 0;
standingpoint.pose.orientation.w = 1;
}
if(trigger==1 & (int)vive.ctrl_left.buttons.trigger == 0)
{
throw_state.pose.position.x = standingpoint.pose.position.x + base_point.pose.position.x - vive.headset.position.x;
throw_state.pose.position.y = standingpoint.pose.position.y + base_point.pose.position.y - vive.headset.position.y;
throw_state.pose.position.z = 0;
throw_state.model_name = model_name;
once = true;
trigger=0;
deletemodel.request.model_name = standingpoint_name;
//delete_model.call(deletemodel);
}
}
};
int main(int argc, char **argv)
{
// setup ros node
ros::init(argc, argv, "standingpoint");
ros::NodeHandle nh;
ros::Rate r(90);
ros::service::waitForService("/gazebo/spawn_urdf_model", -1);
//define class for callback class and subscriber
Vive_Listener vive_data;
ros::Subscriber sub_vive = nh.subscribe("vrui/vive", 1, &Vive_Listener::callback, &vive_data);
ros::Publisher gazebo_pub = nh.advertise<gazebo_msgs::ModelState>("gazebo/set_model_state", 10);
gazebo_msgs::ModelState controller_left,controller_right,controller_throw,controller_line;
controller_left.model_name = "Vive_Controller_left";
controller_left.reference_frame="world";
controller_right.model_name = "Vive_Controller_right";
controller_right.reference_frame="world";
ros::ServiceClient client = nh.serviceClient<gazebo_msgs::GetModelState>("/gazebo/get_model_state");
gazebo_msgs::GetModelState getmodelstate;
getmodelstate.request.model_name = "base_test";
/* previous value */
vrui_mdf::Vive vive_previ;
/* controller 3 */
ThrowMethod ThrowTo;
ThrowTo.trigger = 0;
ThrowTo.standingpoint_name = "standingpoint";
ThrowTo.model_name = "base_test";
ThrowTo.once = false;
ThrowTo.delete_model = nh.serviceClient<gazebo_msgs::DeleteModel>("/gazebo/delete_model");
ThrowTo.spawn_model = nh.serviceClient<gazebo_msgs::SpawnModel>("/gazebo/spawn_sdf_model");
ThrowTo.readmodel("/home/zhenyushi/.gazebo/models/controller/model.sdf");
system("rosrun gazebo_ros spawn_model -file ~/.gazebo/models/Vive_Controller/model.sdf -sdf -model Vive_Controller_left -y 0 -x 0 -z 3");
system("rosrun gazebo_ros spawn_model -file ~/.gazebo/models/Vive_Controller/model.sdf -sdf -model Vive_Controller_right -y 0 -x 0 -z 3");
while(ros::ok())
{
ros::spinOnce();
// ros::spin() works too, but extra code can run outside the callback function between each spinning if spinOnce() is used
controller_left.pose = vive_data.vive.ctrl_left.pose;
controller_right.pose = vive_data.vive.ctrl_right.pose;
gazebo_pub.publish(controller_left);
gazebo_pub.publish(controller_right);
client.call(getmodelstate);
ThrowTo.base_point.pose = getmodelstate.response.pose;
ThrowTo.controller(vive_data.vive);
if(ThrowTo.trigger){gazebo_pub.publish(ThrowTo.standingpoint);}
if(ThrowTo.once)
{
gazebo_pub.publish(ThrowTo.throw_state);
ThrowTo.once = false;
}
/* over write previous value */
vive_previ = vive_data.vive;
r.sleep();
}
return 0;
}
| 25.362832 | 180 | 0.720865 | [
"model"
] |
2737518b6a624315891517c4cfd61c512b16ad3b | 10,447 | cxx | C++ | repro/plugins/pyroute/PyRouteWorker.cxx | dulton/reSipServer | ac4241df81c1e3eef2e678271ffef4dda1fc6747 | [
"Apache-2.0"
] | 1 | 2019-04-15T14:10:58.000Z | 2019-04-15T14:10:58.000Z | repro/plugins/pyroute/PyRouteWorker.cxx | dulton/reSipServer | ac4241df81c1e3eef2e678271ffef4dda1fc6747 | [
"Apache-2.0"
] | null | null | null | repro/plugins/pyroute/PyRouteWorker.cxx | dulton/reSipServer | ac4241df81c1e3eef2e678271ffef4dda1fc6747 | [
"Apache-2.0"
] | 2 | 2019-10-31T09:11:09.000Z | 2021-09-17T01:00:49.000Z |
#include <memory>
/* Using the PyCXX API for C++ Python integration
* It is extremely convenient and avoids the need to write boilerplate
* code for handling the Python reference counts.
* It is licensed under BSD terms compatible with reSIProcate */
#include <Python.h>
#include <CXX/Objects.hxx>
#include "rutil/Logger.hxx"
#include "resip/stack/Cookie.hxx"
#include "resip/stack/ExtensionHeader.hxx"
#include "resip/stack/Headers.hxx"
#include "resip/stack/HeaderFieldValueList.hxx"
#include "resip/stack/Helper.hxx"
#include "resip/stack/SipMessage.hxx"
#include "resip/stack/UnknownHeaderType.hxx"
#include "repro/Plugin.hxx"
#include "repro/Processor.hxx"
#include "repro/ProcessorMessage.hxx"
#include "repro/RequestContext.hxx"
#include "repro/Worker.hxx"
#include "PyRouteWorker.hxx"
#include "PyThreadSupport.hxx"
#define RESIPROCATE_SUBSYSTEM resip::Subsystem::REPRO
using namespace repro;
PyRouteWork::PyRouteWork(Processor& proc,
const resip::Data& tid,
resip::TransactionUser* passedtu,
resip::SipMessage& message)
: ProcessorMessage(proc,tid,passedtu),
mMessage(message),
mResponseCode(-1)
{
}
PyRouteWork::~PyRouteWork()
{
}
PyRouteWork*
PyRouteWork::clone() const
{
return new PyRouteWork(*this);
}
EncodeStream&
PyRouteWork::encode(EncodeStream& ostr) const
{
ostr << "PyRouteWork(tid="<<mTid<<")";
return ostr;
}
EncodeStream&
PyRouteWork::encodeBrief(EncodeStream& ostr) const
{
return encode(ostr);
}
PyRouteWorker::PyRouteWorker(PyInterpreterState* interpreterState, Py::Callable& action)
: mInterpreterState(interpreterState),
mPyUser(0),
mAction(action)
{
}
PyRouteWorker::~PyRouteWorker()
{
if(mPyUser)
{
delete mPyUser;
}
}
PyRouteWorker*
PyRouteWorker::clone() const
{
PyRouteWorker* worker = new PyRouteWorker(*this);
worker->mPyUser = 0;
return worker;
}
void
PyRouteWorker::onStart()
{
DebugLog(<< "creating new PyThreadState");
mPyUser = new PyExternalUser(mInterpreterState);
}
bool
PyRouteWorker::process(resip::ApplicationMessage* msg)
{
PyRouteWork* work = dynamic_cast<PyRouteWork*>(msg);
if(!work)
{
WarningLog(<< "received unexpected message");
return false;
}
DebugLog(<<"handling a message");
resip::SipMessage& message = work->mMessage;
// Get the Global Interpreter Lock
StackLog(<< "getting lock...");
assert(mPyUser);
PyExternalUser::Use use(*mPyUser);
// arg 1: SIP method
Py::String reqMethod(getMethodName(message.header(resip::h_RequestLine).method()).c_str());
// arg 2: request URI
Py::String reqUri(message.header(resip::h_RequestLine).uri().toString().c_str());
// arg 3: a subset of the SIP headers
Py::Dict headers;
headers["From"] = Py::String(message.header(resip::h_From).uri().toString().c_str());
headers["To"] = Py::String(message.header(resip::h_To).uri().toString().c_str());
if(message.exists(resip::h_ContentType))
{
const resip::HeaderFieldValue hfv = message.header(resip::h_ContentType).getHeaderField();
headers["Content-Type"] = Py::String(hfv.getBuffer(), hfv.getLength(), "utf8");
}
const resip::SipMessage::UnknownHeaders& unknowns = message.getRawUnknownHeaders();
resip::SipMessage::UnknownHeaders::const_iterator it = unknowns.begin();
for( ; it != unknowns.end(); it++)
{
const resip::Data& name = it->first;
StackLog(<<"found unknown header: " << name);
resip::HeaderFieldValueList* hfvl = it->second;
if(!hfvl->empty())
{
resip::HeaderFieldValue* hfv = hfvl->front();
headers[name.c_str()] = Py::String(hfv->getBuffer(), hfv->getLength(), "utf8");
}
if(hfvl->size() > 1)
{
// TODO - if multiple values exist, put them in a Py::List
WarningLog(<<"ignoring additional values for header " << name);
}
}
// arg 4: transport type
Py::String transportType("");
if(message.getReceivedTransport())
{
transportType = getTransportNameFromType(message.getReceivedTransport()->transport());
}
// arg 5: body
Py::String body("");
const resip::HeaderFieldValue& bodyHfv = message.getRawBody();
if(bodyHfv.getLength() > 0)
{
// FIXME: do we always need to copy the whole body?
// could we give Python a read-only pointer to the body data?
body = Py::String(bodyHfv.getBuffer(), bodyHfv.getLength(), "utf8");
}
// arg 6: cookies (if the message was received over a WebSocket transport)
const resip::CookieList& _cookies = message.getWsCookies();
Py::Dict cookies;
for(
resip::CookieList::const_iterator it = _cookies.begin();
it != _cookies.end();
it++)
{
ErrLog(<<"adding cookie: " << it->name());
cookies[Py::String(it->name().c_str())] = Py::String(it->value().c_str());
}
// arg 7: For new headers that come back from the script
Py::Dict newHeaders;
Py::Tuple args(7);
args[0] = reqMethod;
args[1] = reqUri;
args[2] = headers;
args[3] = transportType;
args[4] = body;
args[5] = cookies;
args[6] = newHeaders;
Py::Object response;
try
{
StackLog(<< "invoking mAction");
response = mAction.apply(args);
}
catch (const Py::Exception& ex)
{
WarningLog(<< "PyRoute mAction failed: " << Py::value(ex));
WarningLog(<< Py::trace(ex));
work->mResponseCode = 500;
return true;
}
// Did the script return a single numeric value?
// If so, it is a SIP response code, the default SIP error string
// will be selected by the stack
if(response.isNumeric())
{
Py::Int responseCode(response);
work->mResponseCode = responseCode;
work->mResponseMessage = "";
return true;
}
// Did the script return a tuple?
// If so, it is a SIP response code and optionally a response string
// to be used in the SIP response message
// If no response string is present in the tuple, the default SIP
// error string will be selected by the stack
if(response.isTuple())
{
// Error response
Py::Tuple err(response);
if(err.size() < 1)
{
ErrLog(<<"Incomplete response object from PyRoute script");
work->mResponseCode = 500;
return true;
}
if(err.size() > 2)
{
WarningLog(<<"Excessive values in response from PyRoute script");
}
if(!err[0].isNumeric())
{
ErrLog(<<"First value in response tuple must be numeric");
work->mResponseCode = 500;
return true;
}
Py::Int responseCode(err[0]);
Py::String responseMessage;
if(err.size() > 1)
{
if(!err[1].isString())
{
ErrLog(<<"Second value in response tuple must be a string, ignoring it");
}
responseMessage = err[1];
}
work->mResponseCode = responseCode;
work->mResponseMessage = resip::Data(responseMessage.as_std_string());
return true;
}
// If we get this far, the response should be a list of target URIs
if(!response.isList())
{
ErrLog(<<"Unexpected response object from PyRoute script");
work->mResponseCode = 500;
return true;
}
Py::List routes(response);
DebugLog(<< "got " << routes.size() << " result(s).");
for(
Py::Sequence::iterator i = routes.begin();
i != routes.end();
i++)
{
Py::String target(*i);
resip::Data target_s(target.as_std_string());
DebugLog(<< "processing result: " << target_s);
work->mTargets.push_back(target_s);
}
int newHeaderCount = newHeaders.size();
DebugLog(<<"got " << newHeaderCount << " new/changed header(s)");
for(Py::Dict::iterator it = newHeaders.begin();
it != newHeaders.end();
it++)
{
const Py::Dict::value_type vt(*it);
resip::Data headerName(vt.first.str());
resip::Data value(vt.second.str());
DebugLog(<<"processing a header: " << headerName << ": " << value);
resip::Headers::Type hType = resip::Headers::getType(headerName.data(), (int)headerName.size());
if(hType == resip::Headers::UNKNOWN)
{
resip::ExtensionHeader h_Tmp(headerName.c_str());
resip::ParserContainer<resip::StringCategory>& pc = message.header(h_Tmp);
while(pc.begin() != pc.end())
{
pc.erase(pc.begin());
}
resip::StringCategory sc(value);
pc.push_back(sc);
}
else
{
WarningLog(<<"Discarding header '"<<headerName<<"' from pyroute script, only extension headers permitted");
}
}
return true;
}
/* ====================================================================
*
* Copyright 2013 Daniel Pocock http://danielpocock.com All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. Neither the name of the author(s) nor the names of any contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* ====================================================================
*
*
*/
| 30.457726 | 116 | 0.641907 | [
"object"
] |
2739d628cc3e3e035fe1a1a01fcf4c62e07fa43c | 4,025 | cc | C++ | src/kudu/master/mini_master.cc | AnupamaGupta01/kudu-1 | 79ee29db5ac1b458468b11f16f57f124601788e6 | [
"Apache-2.0"
] | 2 | 2016-09-12T06:53:49.000Z | 2016-09-12T15:47:46.000Z | src/kudu/master/mini_master.cc | AnupamaGupta01/kudu-1 | 79ee29db5ac1b458468b11f16f57f124601788e6 | [
"Apache-2.0"
] | null | null | null | src/kudu/master/mini_master.cc | AnupamaGupta01/kudu-1 | 79ee29db5ac1b458468b11f16f57f124601788e6 | [
"Apache-2.0"
] | 2 | 2018-04-03T05:49:03.000Z | 2020-05-29T21:18:46.000Z | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
#include "kudu/master/mini_master.h"
#include <string>
#include <glog/logging.h>
#include "kudu/fs/fs_manager.h"
#include "kudu/gutil/strings/substitute.h"
#include "kudu/server/rpc_server.h"
#include "kudu/server/webserver.h"
#include "kudu/master/master.h"
#include "kudu/util/net/sockaddr.h"
#include "kudu/util/status.h"
using strings::Substitute;
DECLARE_bool(rpc_server_allow_ephemeral_ports);
namespace kudu {
namespace master {
MiniMaster::MiniMaster(Env* env, string fs_root, uint16_t rpc_port)
: running_(false),
env_(env),
fs_root_(std::move(fs_root)),
rpc_port_(rpc_port) {}
MiniMaster::~MiniMaster() {
CHECK(!running_);
}
Status MiniMaster::Start() {
CHECK(!running_);
FLAGS_rpc_server_allow_ephemeral_ports = true;
RETURN_NOT_OK(StartOnPorts(rpc_port_, 0));
return master_->WaitForCatalogManagerInit();
}
Status MiniMaster::StartDistributedMaster(const vector<uint16_t>& peer_ports) {
CHECK(!running_);
return StartDistributedMasterOnPorts(rpc_port_, 0, peer_ports);
}
void MiniMaster::Shutdown() {
if (running_) {
master_->Shutdown();
}
running_ = false;
master_.reset();
}
Status MiniMaster::StartOnPorts(uint16_t rpc_port, uint16_t web_port) {
CHECK(!running_);
CHECK(!master_);
MasterOptions opts;
return StartOnPorts(rpc_port, web_port, &opts);
}
Status MiniMaster::StartOnPorts(uint16_t rpc_port, uint16_t web_port,
MasterOptions* opts) {
opts->rpc_opts.rpc_bind_addresses = Substitute("127.0.0.1:$0", rpc_port);
opts->webserver_opts.port = web_port;
opts->fs_opts.wal_path = fs_root_;
opts->fs_opts.data_paths = { fs_root_ };
gscoped_ptr<Master> server(new Master(*opts));
RETURN_NOT_OK(server->Init());
RETURN_NOT_OK(server->StartAsync());
master_.swap(server);
running_ = true;
return Status::OK();
}
Status MiniMaster::StartDistributedMasterOnPorts(uint16_t rpc_port, uint16_t web_port,
const vector<uint16_t>& peer_ports) {
CHECK(!running_);
CHECK(!master_);
MasterOptions opts;
vector<HostPort> peer_addresses;
for (uint16_t peer_port : peer_ports) {
HostPort peer_address("127.0.0.1", peer_port);
peer_addresses.push_back(peer_address);
}
opts.master_addresses = peer_addresses;
return StartOnPorts(rpc_port, web_port, &opts);
}
Status MiniMaster::Restart() {
CHECK(running_);
Sockaddr prev_rpc = bound_rpc_addr();
Sockaddr prev_http = bound_http_addr();
Shutdown();
RETURN_NOT_OK(StartOnPorts(prev_rpc.port(), prev_http.port()));
CHECK(running_);
return WaitForCatalogManagerInit();
}
Status MiniMaster::WaitForCatalogManagerInit() {
return master_->WaitForCatalogManagerInit();
}
const Sockaddr MiniMaster::bound_rpc_addr() const {
CHECK(running_);
return master_->first_rpc_address();
}
const Sockaddr MiniMaster::bound_http_addr() const {
CHECK(running_);
return master_->first_http_address();
}
std::string MiniMaster::permanent_uuid() const {
CHECK(master_);
return DCHECK_NOTNULL(master_->fs_manager())->uuid();
}
std::string MiniMaster::bound_rpc_addr_str() const {
return bound_rpc_addr().ToString();
}
} // namespace master
} // namespace kudu
| 27.013423 | 86 | 0.727453 | [
"vector"
] |
2751b512eb6b2015d129c7366cfe4a3886ba4b82 | 1,985 | cpp | C++ | src/xrGame/actor_mp_client.cpp | acidicMercury8/xray-1.6 | 52fba7348a93a52ff9694f2c9dd40c0d090e791e | [
"Linux-OpenIB"
] | 10 | 2021-05-04T06:40:27.000Z | 2022-01-20T20:24:28.000Z | src/xrGame/actor_mp_client.cpp | acidicMercury8/xray-1.6 | 52fba7348a93a52ff9694f2c9dd40c0d090e791e | [
"Linux-OpenIB"
] | null | null | null | src/xrGame/actor_mp_client.cpp | acidicMercury8/xray-1.6 | 52fba7348a93a52ff9694f2c9dd40c0d090e791e | [
"Linux-OpenIB"
] | 2 | 2020-05-17T10:01:14.000Z | 2020-09-11T20:17:27.000Z | #include "stdafx.h"
#include "actor_mp_client.h"
#include "actorcondition.h"
#include "../xrEngine/CameraBase.h"
#include "../xrEngine/CameraManager.h"
#include "game_cl_base.h"
#include "ui/UIActorMenu.h"
#include "ui/UIDragDropReferenceList.h"
#include "uigamecustom.h"
#include "eatable_item.h"
//if we are not current control entity we use this value
const float CActorMP::cam_inert_value = 0.7f;
CActorMP::CActorMP ()
{
//m_i_am_dead = false;
}
void CActorMP::OnEvent ( NET_Packet &P, u16 type)
{
if (type == GEG_PLAYER_USE_BOOSTER)
{
use_booster(P);
return;
}
inherited::OnEvent(P,type);
}
void CActorMP::Die (CObject *killer)
{
//m_i_am_dead = true;
//conditions().health() = 0.f;
conditions().SetHealth( 0.f );
inherited::Die (killer);
}
void CActorMP::cam_Set (EActorCameras style)
{
#ifndef DEBUG
if (style != eacFirstEye)
return;
#endif
CCameraBase* old_cam = cam_Active();
cam_active = style;
old_cam->OnDeactivate();
cam_Active()->OnActivate(old_cam);
}
void CActorMP::use_booster(NET_Packet &packet)
{
if (OnServer())
return;
u16 tmp_booster_id;
packet.r_u16 (tmp_booster_id);
CObject* tmp_booster = Level().Objects.net_Find(tmp_booster_id);
VERIFY2(tmp_booster, "using unknown or deleted booster");
if (!tmp_booster)
{
Msg("! ERROR: trying to use unkown booster object, ID = %d", tmp_booster_id);
return;
}
CEatableItem* tmp_eatable = smart_cast<CEatableItem*>(tmp_booster);
VERIFY2(tmp_eatable, "using not eatable object");
if (!tmp_eatable)
{
Msg("! ERROR: trying to use not eatable object, ID = %d", tmp_booster_id);
return;
}
tmp_eatable->UseBy(this);
}
void CActorMP::On_SetEntity()
{
prev_cam_inert_value = psCamInert;
if (this != Level().CurrentControlEntity())
{
psCamInert = cam_inert_value;
}
inherited::On_SetEntity();
}
void CActorMP::On_LostEntity()
{
psCamInert = prev_cam_inert_value;
}
| 22.055556 | 80 | 0.680605 | [
"object"
] |
2752081e2492f87877d8704e66de9b97b3de6168 | 975 | cpp | C++ | problems/162.Find_Peak_Element/AC_binary_search.cpp | subramp-prep/leetcode | d125201d9021ab9b1eea5e5393c2db4edd84e740 | [
"Unlicense"
] | null | null | null | problems/162.Find_Peak_Element/AC_binary_search.cpp | subramp-prep/leetcode | d125201d9021ab9b1eea5e5393c2db4edd84e740 | [
"Unlicense"
] | null | null | null | problems/162.Find_Peak_Element/AC_binary_search.cpp | subramp-prep/leetcode | d125201d9021ab9b1eea5e5393c2db4edd84e740 | [
"Unlicense"
] | null | null | null | /*
* Author: illuz <iilluzen[at]gmail.com>
* File: AC_binary_search.cpp
* Create Date: 2015-02-14 09:18:02
* Descripton: Binary search
*/
#include <bits/stdc++.h>
using namespace std;
const int N = 0;
class Solution {
private:
int findPeakInRange(const vector<int> &num, int lhs, int rhs) {
int mid = (lhs + rhs) / 2;
if ((mid == lhs || num[mid] > num[mid - 1]) &&
(mid == rhs || num[mid] > num[mid + 1]))
return mid;
if (num[mid + 1] > num[mid])
return findPeakInRange(num, mid + 1, rhs);
else
return findPeakInRange(num, lhs, mid);
}
public:
int findPeakElement(const vector<int> &num) {
int sz = num.size();
return findPeakInRange(num, 0, sz - 1);
}
};
int main() {
int n;
Solution s;
cin >> n;
vector<int> num(n);
for (auto &i : num)
cin >> i;
cout << s.findPeakElement(num) << endl;
return 0;
}
| 22.159091 | 67 | 0.530256 | [
"vector"
] |
275532ab92140c639fa8aa5513e246339e5a2cb7 | 6,522 | cpp | C++ | editor/core/src/Log.cpp | lizardkinger/blacksun | 0119948726d2a057c13d208044c7664a8348a1ea | [
"Linux-OpenIB"
] | null | null | null | editor/core/src/Log.cpp | lizardkinger/blacksun | 0119948726d2a057c13d208044c7664a8348a1ea | [
"Linux-OpenIB"
] | null | null | null | editor/core/src/Log.cpp | lizardkinger/blacksun | 0119948726d2a057c13d208044c7664a8348a1ea | [
"Linux-OpenIB"
] | null | null | null | /***************************************************************************
* Copyright (C) 2006 by Philipp Gruber
* pgruber@fh-landshut.de
*
* 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 2 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, write to the
* Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* (See COPYING for details.)
***************************************************************************
*
* Module: Logger (BlackSun)
* File: Log.cpp
* Created: 15.11.2006
* Author: Philipp Gruber (Psirus)
*
**************************************************************************/
#include "./../include/Log.h"
namespace BSCore
{
//Clear instance
Log* Log::_instance = NULL;
//Set version
BSPlgMgr::Version Log::version(1,0,0);
//Constructor
Log::Log()
{
initialized = false;
}
//Destructor
Log::~Log()
{
log << "</table>\n\n";
log << "<p align=\"center\"> </p>\n";
log.flush();
log.close();
initialized = false;
}
//Initialize the Logfile
void Log::init()
{
//Open the filestream
log.open("Logfile.html");
//Write header into the logfile
log << "<p align=\"center\"><font size=\"7\" ";
log << "color=\"#000000\"><b><u>BlackSun Logfile</u></b></font></p>\n";
log << "<p align='center'><a target='_new 'href=\'";
log << "http://sourceforge.net/projects/blacksun/'>Homepage</a></p>\n";
log << "<p align=\"center\"> </p>\n";
log << "<p align=\"center\"> </p>\n";
log << "<table cellspacing=\"1\" align=\"none\" border=\"1\" ";
log << "width=\"100%\"cellpadding=\"1\">";
log << "<tr>";
log << "<td align=\"center\" width=\"11%\"><b><font ";
log << "color=\"#000000\">STATE</font></b></td>";
log << "<td align=\"center\" width=\"30%\"><b><font ";
log << "color=\"#000000\">MESSAGE</font></td>";
log << "<td align=\"center\" width=\"5%\"><b><font ";
log << "color=\"#000000\">LINE</font></td>";
log << "<td align=\"center\" width=\"16%\"><b><font ";
log << "color=\"#000000\">FILE</font></td>";
log << "<td align=\"center\" width=\"28%\"><b><font ";
log << "color=\"#000000\">FUNCTION</font></td>";
log << "<td align=\"center\" width=\"10%\"><b><font ";
log << "color=\"#000000\">TIME</font></td>";
log << "<tr>";
log.flush();
//Set check variable "initialized" true
initialized = true;
}
//Create instance if it doesn´t exist an retrun it
Log* Log::getInstance()
{
if(_instance == NULL)
{
_instance = new Log();
_instance->init();
}
return _instance;
}
//Evaluate the messagetype and call function "writeToLog" with the write
//parameters.
void Log::message(Types msgType, const string& msg, int line,
const string& file, const string& fun)
{
switch(msgType)
{
case LOG_Ok:
{
writeToLog("OK", msg, line, file, fun, "#008000");
}break;
case LOG_Warning:
{
writeToLog("WARNING", msg, line, file, fun, "#FFA500");
}break;
case LOG_Error:
{
writeToLog("ERROR", msg, line, file, fun, "#FF0000");
}break;
case LOG_Other:
{
writeToLog("OTHER", msg, line, file, fun, " #0000FF");
}break;
default:
{
log << "<br> An error appeared while logging! <br>";
log.flush();
}break;
}
}
//Write the message into the log and stores it
void Log::writeToLog(const string& type, const string& msg, int line,
const string& file, const string& fun, const string& color)
{
//If there is no message
string wMsg;
if(msg == "" || msg == " ")
{
wMsg = "-/-";
}
else
{
wMsg = msg;
}
//get the current systemtime
string time = getTime();
//write into the logfile
log << "<tr>\n";
log << "<td align=\"center\" width=\"11%\"><b><font color=\"" << color;
log << "\">" << type << "</font></b></td>\n";
log << "<td align=\"center\" width=\"30%\"><font color=\"" << color;
log << "\">" << wMsg << "</font></td>\n";
log << "<td align=\"center\" width=\"5%\"><font color=\"" << color;
log << "\">" << line << "</font></td>\n";
log << "<td align=\"center\" width=\"16%\"><font color=\"" << color;
log << "\">" << file << "</font></td>\n";
log << "<td align=\"center\" width=\"28%\"><font color=\"" << color;
log << "\">" << fun << "()</font></td>\n";
log << "<td align=\"center\" width=\"10%\"><font color=\"" << color;
log << "\">" << time << "</font></td>\n";
log << "<tr>\n\n";
log.flush();
//store the logmessage
LogContents temp;
temp.state = type.c_str();
temp.message = msg.c_str();
temp.line = line;
temp.file = file.c_str();
temp.function = fun.c_str();
temp.time = time.c_str();
logList.push_back(temp);
emit logChanged(&temp);
}
//writes a topic into the logfile
void Log::writeTopic(const string& topic)
{
//write the topic into the logfile
log << "</table>\n\n";
log << "<br><table cellspacing=\"1\" cellpadding=\"1\" ";
log << "border=\"1\" width=\"100%%\" ";
log << "bgcolor=\"#DFDFE5\">\n<td>\n<p align=\"center\">\n<font ";
log << "size=\"+2\" ><b>";
log << topic;
log << "</font>\n</td>\n</tr>\n</table>\n";
log << "<table cellspacing=\"1\" align=\"none\" border=\"1\" ";
log << "width=\"100%\"cellpadding=\"1\">";
log.flush();
}
//get the systemtime
string Log::getTime()
{
//outputstring
stringstream sTime;
//timestamp in seconds
time_t Zeitstempel;
//timestamp as date
tm *nun;
//current time
Zeitstempel = time(0);
//transform into date
nun = localtime(&Zeitstempel);
//write time from date into outputstring
if(nun->tm_min < 10)
{
sTime << nun->tm_hour << ":0" << nun->tm_min;
}
else
{
sTime << nun->tm_hour << ":" << nun->tm_min;
}
return sTime.str();
}
//cancel logging
void Log::kill()
{
_instance->~Log();
delete _instance;
}
//retrun the loglist
vector<LogContents>* Log::getLogList()
{
return &logList;
}
}
| 26.512195 | 76 | 0.549525 | [
"vector",
"transform"
] |
275589a368330747723674b136619d499550d332 | 5,300 | cpp | C++ | SuperCap.cpp | eroicaleo/HEES | bfc1e297d6b0b7f928e590cdb97d9ccda069f483 | [
"MIT"
] | null | null | null | SuperCap.cpp | eroicaleo/HEES | bfc1e297d6b0b7f928e590cdb97d9ccda069f483 | [
"MIT"
] | null | null | null | SuperCap.cpp | eroicaleo/HEES | bfc1e297d6b0b7f928e590cdb97d9ccda069f483 | [
"MIT"
] | null | null | null | #include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <stdio.h>
#include <math.h>
#include "SuperCap.hpp"
#include "main.hpp"
#include <vector>
using namespace std;
supcapacitor::supcapacitor() :
m_p(1),
m_s(4),
m_Totl(4),
m_Racc(0.0), m_Racc1(34e-3),
m_Rs(10e-3), m_Rp(10e-3),
m_Rbank(0),
m_Qacc(0.0),
m_Cacc1(100.0), m_Cacc(m_p / m_s * m_Cacc1) {
}
void supcapacitor::SupCapCharge(double Iin, double Vin, double Tdur, double &Vs, double &Qacc) {
// Recalculate the charge
m_Qacc = m_Qacc + Iin * Tdur;
// Recalculate the energy
m_Energy = (0.5)*(m_Qacc*m_Qacc)/m_Cacc;
Qacc = m_Qacc;
Vs = m_Qacc / m_Cacc + Iin * m_Rbank;
}
double supcapacitor::ComputeRbank(double Rs, double Rp) {
return m_Rbank = (2.0/3.0*m_p - 1.0 + 1.0/(3.0*m_p)) * m_s * Rp + m_Racc + (m_s - 1.0) * Rs;
}
void supcapacitor::SupCapSetCellRes(double Rs, double Rp) {
m_Rs = Rs;
m_Rp = Rp;
m_Rbank = ComputeRbank(Rs, Rp);
}
void supcapacitor::SupCapSetCellCap(double Cap) {
m_Cacc1 = Cap;
m_Cacc = m_p / m_s * m_Cacc1;
}
bool supcapacitor::SupCapOperating(double Iin, double VCTI, double delVCTI){
double m_Vs = 0.0;
double m_R = 0.0;
double m_C = 0.0;
double m_del = 0;
double m_Combp = m_p;
double m_Combs = m_s;
double m_vsdel = -100.0;
double voc_orig = m_Qacc / this->m_Cacc;
bool flag = false;
vector<double>m_comb;
for(int i = 1; i <= m_Totl; i++){
if((int)m_Totl % i == 0){
m_comb.push_back((double)i);
}
}
while(m_comb.size() > 0){
double p = 0, s =0;
p = m_comb.back();
s = m_Totl / p;
m_R = ComputeRbank(m_Rs, m_Rp);
m_C = p / s * m_Cacc1;//m_Cacc
m_Vs = m_Qacc * sqrt(m_C/m_Cacc) / m_C;
m_del = m_Vs - VCTI;
// Choose the V_cap such that it is smaller and close to V_cti
// but less than the current V_oc
if((m_del > m_vsdel) && (m_del < 0) && (m_Vs < voc_orig)){
m_Combp = p;
m_Combs = s;
m_vsdel = m_del;
flag = true;
}
m_comb.pop_back();
}
if (flag) {
cout<<"------p------"<<m_Combp<<"----s----"<<m_Combs<<endl;
// Make the reconfiguration here!
SupCapReconfig(m_Combs, m_Combp);
}
return flag;
}
bool supcapacitor::SupCapMoreSeriesReconfig() {
int new_s = (int)m_s + 1;
do {
if ((int)m_Totl % new_s == 0) {
SupCapReconfig(new_s, m_Totl/new_s);
return true;
}
} while (new_s++ < m_Totl);
return false;
}
double supcapacitor::SupCapReconfig(double new_s, double new_p) {
double new_C = new_p / new_s * m_Cacc1;
this->m_Totl = new_s * new_p;
// E_sup = (1/2)*Q^2/C
// After reconfiguration, the energy is same
double new_Q = m_Qacc * sqrt(new_C / m_Cacc);
m_Qacc = new_Q;
m_Cacc = new_C;
m_p = new_p;
m_s = new_s;
m_Rbank = ComputeRbank(m_Rs, m_Rp);
m_Racc = m_s / m_p * m_Racc1;
return new_Q;
}
bool supcapacitor::SupCapReconfiguration(double Iin, double VCTI, dcconvertOUT *dc_super_cap) {
/*
* We start from the most serial config
*/
int total = (int)m_Totl, s = total, p = 1;
bool flag = false;
/*
* If there is no energy stored in the bank, just set most serial config
*/
if (SupCapGetEnergy() < near_zero) {
SupCapReconfig(s, p);
return true;
}
for (; s > 0; --s) {
if (total % s == 0) {
p = total / s;
SupCapReconfig(s, p);
double Iout, Vout, Power;
dc_super_cap->ConverterModel_EESBank(VCTI, Iin, Vout, Iout, Power, this);
/*
* If we found the Vout < Vin,
* this means we found the current best config
* because we start from the most serial config
*/
if (Vout < VCTI) {
flag = true;
break;
}
}
}
return true;
}
double supcapacitor::SupCapGetRacc() const {
return m_Rbank;
}
double supcapacitor::SupCapGetCacc() const {
return m_Cacc;
}
double supcapacitor::SupCapGetQacc() const {
return m_Qacc;
}
void supcapacitor::SupCapReset(){
m_Qacc = 0;
m_Cacc = m_p / m_s * m_Cacc1;
m_Racc = m_s / m_p * m_Racc1;
m_Rbank = ComputeRbank(m_Rs, m_Rp);
m_Energy = (0.5)*(m_Qacc*m_Qacc)/m_Cacc;
}
void supcapacitor::SupCapSetQacc(double Qacc){
m_Qacc = Qacc;
m_Energy = (0.5)*(m_Qacc*m_Qacc)/m_Cacc;
}
double supcapacitor::SupCapGetEnergy(void) const {
if (m_Qacc < 0)
return -1.0;
return m_Energy;
}
double supcapacitor::SupCapGetVoc(void) const {
return (m_Qacc/m_Cacc);
}
bool supcapacitor::SupCapIsFullySerial(void) const {
return (m_p == 1);
}
bool supcapacitor::SupCapIsFullyParallel(void) const {
return (m_s == 1);
}
/* Implement the interface inherited from base class ees_bank */
double supcapacitor::EESBankGetCacc() const {
return SupCapGetCacc();
}
double supcapacitor::EESBankGetVoc() const {
return SupCapGetVoc();
}
double supcapacitor::EESBankGetQacc() const {
return SupCapGetQacc();
}
double supcapacitor::EESBankGetRacc() const {
return SupCapGetRacc();
}
double supcapacitor::EESBankGetEnergy() const {
return SupCapGetEnergy();
}
bool supcapacitor::EESBankOperating(double Iin, double VCTI, double delVCTI) {
return SupCapOperating(Iin, VCTI, delVCTI);
}
bool supcapacitor::EESBankReconfiguration(double Iin, double VCTI, dcconvertOUT *dc_super_cap) {
return SupCapReconfiguration(Iin, VCTI, dc_super_cap);
}
void supcapacitor::EESBankCharge(double Iin, double Vin, double Tdur, double &Vs, double &Qacc) {
return SupCapCharge(Iin, Vin, Tdur, Vs, Qacc);
}
| 22.649573 | 97 | 0.663208 | [
"vector"
] |
275e7ed0da93517eb324bf74004f97e95b9f9f4a | 530 | cc | C++ | cpp/p021.cc | tlming16/Projec_Euler | 797824c5159fae67493de9eba24c22cc7512d95d | [
"MIT"
] | 4 | 2018-11-14T12:03:05.000Z | 2019-09-03T14:33:28.000Z | cpp/p021.cc | tlming16/Projec_Euler | 797824c5159fae67493de9eba24c22cc7512d95d | [
"MIT"
] | null | null | null | cpp/p021.cc | tlming16/Projec_Euler | 797824c5159fae67493de9eba24c22cc7512d95d | [
"MIT"
] | 1 | 2018-11-17T14:39:22.000Z | 2018-11-17T14:39:22.000Z | # include <iostream>
# include <vector>
int compute();
int main(){
using std::cout;
using std::endl;
cout<<compute()<<endl;
}
int compute(){
const int N=10000;
std::vector<int> divisornum(N,0);
divisornum[1]=1;
for( int i=1;i<divisornum.size();i++){
for (int j=2*i;j<divisornum.size();j+=i){
divisornum[j]+=i;
}
}
int ans=0;
for(int i=1;i<divisornum.size();i++){
int j=divisornum[i];
if( j!=i &&j<divisornum.size() &&divisornum[j]==i){
ans+=i;
}
}
return ans;
} | 16.5625 | 54 | 0.558491 | [
"vector"
] |
27606f8bf5b73bd4c59ed71119f7b8d1cb1b5d95 | 12,993 | cpp | C++ | src/main.cpp | Skngg/pkss-data-log-service | 2904a6678048eac02da7184a49c397c0d13fdc6f | [
"MIT"
] | null | null | null | src/main.cpp | Skngg/pkss-data-log-service | 2904a6678048eac02da7184a49c397c0d13fdc6f | [
"MIT"
] | null | null | null | src/main.cpp | Skngg/pkss-data-log-service | 2904a6678048eac02da7184a49c397c0d13fdc6f | [
"MIT"
] | null | null | null | #include <iostream>
#include <pistache/endpoint.h>
#include <rapidjson/document.h>
#include <rapidjson/writer.h>
#include <rapidjson/stringbuffer.h>
#include <pqxx/pqxx>
#include "BuildingData.hpp"
#include "ProviderData.hpp"
#include "HeatExchangerData.hpp"
#include "ControllerData.hpp"
using namespace Pistache;
using namespace rapidjson;
BuildingData buildings;
ProviderData provider;
HeatExchangerData heatex;
ControllerData controller;
void clearMem() {
buildings.purgeAll();
provider.purgeAll();
heatex.purgeAll();
controller.purgeAll();
}
std::string processPOST(JSONData* instance, std::string body) {
instance->acquireData(body.c_str());
std::string ret;
try {
instance->insertLastIntoDB();
} catch (const pqxx::sql_error &ex) {
std::cerr << "Exception thrown: " << ex.what() << std::endl;
if ( std::string(ex.what()).find("INSERT has more expressions than target columns") != std::string::npos ) {
instance->purgeAll();
ret = "Error while parsing JSON. Entry not logged";
return ret;
} else {
try {
instance->initDBTable();
} catch (...) {}
instance->insertLastIntoDB();
}
}
ret = "Data logged with timestamp: " + instance->getTimestamp();
instance->purgeAll();
return ret;
}
void processGETOne(StringBuffer* s, pqxx::result* row_data) {
Writer<StringBuffer> writer(*s);
std::vector<std::string> names, values;
for(int i = 1; i<row_data->columns(); i++) {
names.push_back(row_data->column_name(i));
values.push_back(row_data->at(0).at(i).as<std::string>());
}
writer.StartObject();
for(int i = 0;i<names.size();i++) {
writer.String(names[i].c_str(),names[i].length());
writer.String(values[i].c_str(),values[i].length());
}
writer.EndObject();
}
void processGETMany(StringBuffer* s, pqxx::result* res_data) {
Writer<StringBuffer> writer(*s);
std::vector<std::string> names, values;
writer.StartArray();
for(int i = res_data->size()-1; i>=0 ; i--) {
for(int j = 1; j<res_data->columns(); j++) {
names.push_back(res_data->column_name(j));
values.push_back(res_data->at(i).at(j).as<std::string>());
}
writer.StartObject();
for(int j = 0;j<names.size();j++) {
writer.String(names[j].c_str(),names[j].length());
writer.String(values[j].c_str(),values[j].length());
}
writer.EndObject();
names.clear();
values.clear();
}
writer.EndArray();
}
int getIntFromRequest(std::string request) {
int length = 0;
for(int i=request.length();request.c_str()[i]!='/';i--) {
length++;
}
return std::stoi(request.substr(request.length()-length+1, length-1));
}
std::string getStrFromRequest(std::string request) {
int length = 0;
for(int i=request.length();request.c_str()[i]!='/';i--) {
length++;
}
return request.substr(request.length()-length+1, length-1);
}
void clearTableDB(pqxx::work* W,const std::string table) {
std::string cmd = "TRUNCATE " + table + " RESTART IDENTITY;";
W->exec(cmd);
}
class TestHandler : public Http::Handler {
private:
std::string body;
public:
HTTP_PROTOTYPE(TestHandler)
void onRequest(const Http::Request& request, Http::ResponseWriter response) override {
if (request.method() == Http::Method::Post) {
if (request.resource().find("/exchanger/log") != std::string::npos ) {
try {
body = request.body();
if (body == "")
throw "JSON error";
} catch (...){
auto res = response.send(Http::Code::Unprocessable_Entity,"Error while parsing JSON");
return;
}
const std::string s_response = processPOST(&heatex, body);
auto res = response.send(Http::Code::Ok,s_response.c_str());
} else if (request.resource().find("/controler/log") != std::string::npos ) {
try {
body = request.body();
if (body == "")
throw "JSON error";
} catch (...){
auto res = response.send(Http::Code::Unprocessable_Entity,"Error while parsing JSON");
return;
}
const std::string s_response = processPOST(&controller, body);
auto res = response.send(Http::Code::Ok,s_response.c_str());
} else if (request.resource().find("/building/log") != std::string::npos) {
try {
body = request.body();
if (body == "")
throw "JSON error";
} catch (...){
auto res = response.send(Http::Code::Unprocessable_Entity,"Error while parsing JSON");
return;
}
const std::string s_response = processPOST(&buildings, body);
auto res = response.send(Http::Code::Ok,s_response.c_str());
} else if (request.resource().find("/provider/log") != std::string::npos ) {
try {
body = request.body();
if (body == "")
throw "JSON error";
} catch (...){
auto res = response.send(Http::Code::Unprocessable_Entity,"Error while parsing JSON");
return;
}
const std::string s_response = processPOST(&provider, body);
auto res = response.send(Http::Code::Ok,s_response.c_str());
} else {
response.send(Pistache::Http::Code::Not_Found,"Error 404: Called nonexistent resource");
}
} else if (request.method() == Http::Method::Get) {
if(request.resource().find("/exchanger") != std::string::npos ) {
if(request.resource().find("/id") != std::string::npos) {
int id = getIntFromRequest(request.resource());
pqxx::connection C(params.c_str());
pqxx::work W(C);
pqxx::result row_data = W.exec(
"SELECT * FROM exchanger WHERE id = "
+ W.quote(id));
W.commit();
StringBuffer s;
processGETOne(&s, &row_data);
auto mimeType = MIME(Application, Json);
response.send(Http::Code::Ok, s.GetString(), mimeType);
} else if ((request.resource().find("/last") != std::string::npos)) {
int num = getIntFromRequest(request.resource());
pqxx::connection C(params.c_str());
pqxx::work W(C);
pqxx::result res = W.exec(
"SELECT * FROM exchanger ORDER BY id DESC LIMIT "
+ W.quote(num));
W.commit();
StringBuffer s;
processGETMany(&s, &res);
auto mimeType = MIME(Application, Json);
response.send(Http::Code::Ok, s.GetString(), mimeType);
} else { // GET FULL LOG
pqxx::connection C(params.c_str());
pqxx::work W(C);
pqxx::result res = W.exec(
"SELECT * FROM exchanger ORDER BY id DESC");
W.commit();
StringBuffer s;
processGETMany(&s, &res);
auto mimeType = MIME(Application, Json);
response.send(Http::Code::Ok, s.GetString(), mimeType);
}
} else if(request.resource().find("/controler") != std::string::npos ) {
if(request.resource().find("/id") != std::string::npos) {
int id = getIntFromRequest(request.resource());
pqxx::connection C(params.c_str());
pqxx::work W(C);
pqxx::result row_data = W.exec(
"SELECT * FROM controler WHERE id = "
+ W.quote(id));
W.commit();
StringBuffer s;
processGETOne(&s, &row_data);
auto mimeType = MIME(Application, Json);
response.send(Http::Code::Ok, s.GetString(), mimeType);
} else if ((request.resource().find("/last") != std::string::npos)) {
int num = getIntFromRequest(request.resource());
pqxx::connection C(params.c_str());
pqxx::work W(C);
pqxx::result res = W.exec(
"SELECT * FROM controler ORDER BY id DESC LIMIT "
+ W.quote(num));
W.commit();
StringBuffer s;
processGETMany(&s, &res);
auto mimeType = MIME(Application, Json);
response.send(Http::Code::Ok, s.GetString(), mimeType);
} else { // GET FULL LOG
pqxx::connection C(params.c_str());
pqxx::work W(C);
pqxx::result res = W.exec(
"SELECT * FROM controler ORDER BY id DESC");
W.commit();
StringBuffer s;
processGETMany(&s, &res);
auto mimeType = MIME(Application, Json);
response.send(Http::Code::Ok, s.GetString(), mimeType);
}
} else if(request.resource().find("/building") != std::string::npos ) {
if(request.resource().find("/id") != std::string::npos) {
int id = getIntFromRequest(request.resource());
pqxx::connection C(params.c_str());
pqxx::work W(C);
pqxx::result row_data = W.exec(
"SELECT * FROM building WHERE id = "
+ W.quote(id));
W.commit();
StringBuffer s;
processGETOne(&s, &row_data);
auto mimeType = MIME(Application, Json);
response.send(Http::Code::Ok, s.GetString(), mimeType);
} else if ((request.resource().find("/last") != std::string::npos)) {
int num = getIntFromRequest(request.resource());
pqxx::connection C(params.c_str());
pqxx::work W(C);
pqxx::result res = W.exec(
"SELECT * FROM building ORDER BY id DESC LIMIT "
+ W.quote(num));
W.commit();
StringBuffer s;
processGETMany(&s, &res);
auto mimeType = MIME(Application, Json);
response.send(Http::Code::Ok, s.GetString(), mimeType);
} else if ((request.resource().find("/tag") != std::string::npos)) {
std::string tag = getStrFromRequest(request.resource());
pqxx::connection C(params.c_str());
pqxx::work W(C);
pqxx::result res = W.exec(
"SELECT * FROM building "
"WHERE tag_name = " + W.quote(tag) +
" ORDER BY id DESC" );
W.commit();
StringBuffer s;
processGETMany(&s, &res);
auto mimeType = MIME(Application, Json);
response.send(Http::Code::Ok, s.GetString(), mimeType);
} else if ((request.resource().find("/taglast") != std::string::npos)) {
int num = getIntFromRequest(request.resource());
const std::string numS = std::to_string(num),
req_mod = request.resource().substr(0,
request.resource().length() - numS.length()-1);
std::string tag = getStrFromRequest(req_mod);
pqxx::connection C(params.c_str());
pqxx::work W(C);
pqxx::result res = W.exec(
"SELECT * FROM building "
"WHERE tag_name = " + W.quote(tag) +
" ORDER BY id DESC "
"LIMIT " + W.quote(num));
W.commit();
StringBuffer s;
processGETMany(&s, &res);
auto mimeType = MIME(Application, Json);
response.send(Http::Code::Ok, s.GetString(), mimeType);
} else { // GET FULL LOG
pqxx::connection C(params.c_str());
pqxx::work W(C);
pqxx::result res = W.exec(
"SELECT * FROM building ORDER BY id DESC");
W.commit();
StringBuffer s;
processGETMany(&s, &res);
auto mimeType = MIME(Application, Json);
response.send(Http::Code::Ok, s.GetString(), mimeType);
}
} else if(request.resource().find("/provider") != std::string::npos ) {
if(request.resource().find("/id") != std::string::npos) {
int id = getIntFromRequest(request.resource());
pqxx::connection C(params.c_str());
pqxx::work W(C);
pqxx::result row_data = W.exec(
"SELECT * FROM provider WHERE id = "
+ W.quote(id));
W.commit();
StringBuffer s;
processGETOne(&s, &row_data);
auto mimeType = MIME(Application, Json);
response.send(Http::Code::Ok, s.GetString(), mimeType);
} else if ((request.resource().find("/last") != std::string::npos)) {
int num = getIntFromRequest(request.resource());
pqxx::connection C(params.c_str());
pqxx::work W(C);
pqxx::result res = W.exec(
"SELECT * FROM provider ORDER BY id DESC LIMIT "
+ W.quote(num));
W.commit();
StringBuffer s;
processGETMany(&s, &res);
auto mimeType = MIME(Application, Json);
response.send(Http::Code::Ok, s.GetString(), mimeType);
} else { // GET FULL LOG
pqxx::connection C(params.c_str());
pqxx::work W(C);
pqxx::result res = W.exec(
"SELECT * FROM provider ORDER BY id DESC");
W.commit();
StringBuffer s;
processGETMany(&s, &res);
auto mimeType = MIME(Application, Json);
response.send(Http::Code::Ok, s.GetString(), mimeType);
}
} else if (request.resource() == "/reset") {
pqxx::connection C(params.c_str());
pqxx::work W(C);
clearMem();
clearTableDB(&W,"controler");
clearTableDB(&W,"exchanger");
clearTableDB(&W,"building");
clearTableDB(&W,"provider");
W.commit();
response.send(Http::Code::Ok, "All tables cleared and reset");
} else {
response.send(Http::Code::Not_Found, "Error 404: Called nonexistent resource");
}
} else {
response.send(Http::Code::Method_Not_Allowed,"Access denied");
}
}
};
int main() {
Address addr(IP(0,0,0,0),Port(8080));
auto opts = Http::Endpoint::options()
.threads(2)
.flags(Tcp::Options::ReuseAddr);
pqxx::connection c(params.c_str());
if(c.is_open())
std::cout << "DB Succesfull" << std::endl;
Http::Endpoint server(addr);
server.init(opts);
std::cout << "SERVICE STARTED" << std::endl;
server.setHandler(Http::make_handler<TestHandler>());
server.serve();
}
| 25.831014 | 110 | 0.608943 | [
"vector"
] |
27661511da1e2e94dbae1b5581be6c0859d524d0 | 1,212 | hh | C++ | src/GPU/gpu_data_allocator.hh | nandofioretto/GpuDBE | 0722f1f6f0e850795f76825cfaf833997f7fe4af | [
"MIT"
] | null | null | null | src/GPU/gpu_data_allocator.hh | nandofioretto/GpuDBE | 0722f1f6f0e850795f76825cfaf833997f7fe4af | [
"MIT"
] | null | null | null | src/GPU/gpu_data_allocator.hh | nandofioretto/GpuDBE | 0722f1f6f0e850795f76825cfaf833997f7fe4af | [
"MIT"
] | null | null | null | #ifndef ULYSSES_GPU_DATA_ALLOCATOR_H
#define ULYSSES_GPU_DATA_ALLOCATOR_H
#include <vector>
#include <utility> // std::pair, std::make_pair
#include <iostream>
#include <cuda_runtime.h>
#include "Kernel/types.hh"
class DCOPinstance;
namespace CUDA {
class GPU_allocator {
public:
static void allocate_data(int nb_agents, int nb_variables,
int nb_constraints, int dom_size);
static void init_agent(int cuda_ai_id, int cuda_xi_id, int cuda_dom_min,
int cuda_dom_max, std::vector<util_t> unary,
std::vector<int> binary_constraints, size_t cuda_util_table_rows,
std::vector<int> sep, std::vector<int> children,
int max_ch_sep_size);
static void init_constraint(int cuda_id, std::vector<int> scope,
std::vector<util_t> utils);
static void dump_util_table(int agentID);
//template<class T*>
static int* allocate_PinnedHostArray(size_t bytes) {
int* pinnedHost;
cudaMallocHost((void**)&pinnedHost, bytes); // host pinned
return pinnedHost;
}
template<class T>
static void allocate_PinnedHostArray(T* array, size_t bytes) {
cudaMallocHost((void**)&array, bytes); // host pinned
}
};
};
#endif // ULYSSES_GPU_DATA_ALLOCATOR_H
| 24.734694 | 73 | 0.725248 | [
"vector"
] |
276b3cf86b1b94e1fa98e8f754154d8a9b089059 | 6,943 | hpp | C++ | CT_Recon/hf_texture_helper.hpp | hfan36/recon | a28e5adeb2d1571d466e0e7a58e662be7e645399 | [
"MIT"
] | 1 | 2020-05-28T18:31:34.000Z | 2020-05-28T18:31:34.000Z | CT_Recon/hf_texture_helper.hpp | hfan36/recon | a28e5adeb2d1571d466e0e7a58e662be7e645399 | [
"MIT"
] | null | null | null | CT_Recon/hf_texture_helper.hpp | hfan36/recon | a28e5adeb2d1571d466e0e7a58e662be7e645399 | [
"MIT"
] | null | null | null | //Written by Helen Fan
//Uses Danny Ruijters cubic b-spline interpolation code
//it helps me bind texture memory, allocate memory for binding and unallocate and unbind
//so I know what's being created and destroyed. Just something to use as little memory as possible
//and prevent code from allocating and deallocating over and over (hopefully speed things up a bit)
#ifndef TEXTURE_HELPER_HF_HPP_
#define TEXTURE_HELPER_HF_HPP_
#include <memcpy.cu>
#include <cubicPrefilter3D.cu>
#include <cubicPrefilter2D.cu>
#include <cubicTex2D.cu>
#include <cubicTex3D.cu>
texture<float, 2, cudaReadModeElementType> tex2_float; //2D texture
texture<float, 3, cudaReadModeElementType> tex3_float; //3D texture
//aid to bind 2d texture memory
//don't use any of the variables inside, juse use the functions in order (1,2,3)
//1 for allocate space necessary for binding
//2 is where you put the arrays you want inside,
//I use it to stick different arrays in over and over in a loop so I don't have to
//allocate and deallocate in every single loop
//3 finally destroy what 1 allocated and unbinds tex2_float
//probably making a class would be better, but I don't feel like it.
struct texture_helper2D
{
cudaPitchedPtr m_bsplineCoeffs;
cudaArray *m_coeffArray;
cudaExtent m_extent;
cudaChannelFormatDesc m_desc;
int a1_allocate(uint width, uint height)
{
this->m_extent = make_cudaExtent(width*sizeof(float), height, 1);
this->m_desc = cudaCreateChannelDesc<float>();
CUDA_SAFE_CALL( cudaMalloc3D(&this->m_bsplineCoeffs, this->m_extent) );
this->m_coeffArray = 0;
//tex2_float.normalized = true; //I would not change this, since it's what Danny Ruijters uses in his codes; original code;
tex2_float.normalized = false;
//Change address mode here to whatever you want. might not be wise
tex2_float.addressMode[0] = cudaAddressModeClamp; //used to be Clamp
tex2_float.addressMode[1] = cudaAddressModeClamp; //used to be Clamp
//tex2_float.filterMode = cudaFilterModeLinear; //I would not change this, since it's what Danny Ruijters uses in his codes; original code;
tex2_float.filterMode = cudaFilterModePoint; //temporarily changed for siddon's algorithm
return 0;
}
int a2_input(float *data, uint width, uint height, bool pre_filter, cudaMemcpyKind kind)
{
cudaMemcpy3DParms p = {0};
p.srcPtr = make_cudaPitchedPtr( (void*)data, width*sizeof(float), width, height );
p.dstPtr = this->m_bsplineCoeffs;
p.extent = this->m_extent;
p.kind = kind;
CUDA_SAFE_CALL( cudaMemcpy3D(&p) );
if (pre_filter)
{
CubicBSplinePrefilter2D( (float*)this->m_bsplineCoeffs.ptr, (uint)this->m_bsplineCoeffs.pitch, width, height);
}
CUDA_SAFE_CALL( cudaMallocArray( &this->m_coeffArray, &this->m_desc, width, height ) );
CUDA_SAFE_CALL( cudaMemcpy2DToArray( this->m_coeffArray, 0, 0, this->m_bsplineCoeffs.ptr, this->m_bsplineCoeffs.pitch, width*sizeof(float), height, cudaMemcpyDeviceToDevice ) );
CUDA_SAFE_CALL( cudaBindTextureToArray( tex2_float, this->m_coeffArray, this->m_desc ) );
return 0;
}
int a3_destroy()
{
CUDA_SAFE_CALL( cudaFree(m_bsplineCoeffs.ptr) );
CUDA_SAFE_CALL( cudaFreeArray( m_coeffArray ) );
CUDA_SAFE_CALL( cudaUnbindTexture( tex2_float ) );
std::cout << "2D texture cleared! " << std::endl;
return 0;
}
};
//aids in binding 3d texture memory
//don't use any of the variables inside
// use functions in order, 1,2,3,4
// same as texture_helper2D, except I added 3_output function just coz
// I want to make sure it's done the way Dannny Ruijters did, probably don't really need it,
// if you just use straight cudaMemcpy to copy the memory out but since I wrote it, so deal with it.
// 4 is to destroy everything I've created in 1.
// probably should've also made a class for it? but I don't feel like it
struct texture_helper3D
{
cudaPitchedPtr m_bsplineCoeffs;
cudaArray *m_coeffArray;
cudaExtent m_extent;
cudaChannelFormatDesc m_desc;
int a1_allocate(uint dimx, uint dimy, uint dimz)
{
this->m_extent = make_cudaExtent(dimx*sizeof(float), dimy, dimz);
this->m_desc = cudaCreateChannelDesc<float>();
CUDA_SAFE_CALL( cudaMalloc3D(&this->m_bsplineCoeffs, this->m_extent) );
//tex3_float.normalized = true; //I would not change this, since it's what Danny Ruijters uses in his codes
tex3_float.normalized = false; //temporary for siddon's algorithm, used to true;
//Change address mode here to whatever you want. might not be wise
tex3_float.addressMode[0] = cudaAddressModeBorder; //don't use clamp for forward projection! holy crap! no wrap for forward projection, use border for fp
tex3_float.addressMode[1] = cudaAddressModeBorder;
tex3_float.addressMode[2] = cudaAddressModeBorder;
//tex3_float.filterMode = cudaFilterModeLinear; //I would not change this, since it's what Danny Ruijters uses in his codes
tex3_float.filterMode = cudaFilterModePoint; //temporary for siddons's algorithm, used to be cudaFilterModeLinear;
return 0;
}
int a2_input(float *data, uint dimx, uint dimy, uint dimz, bool pre_filter, cudaMemcpyKind kind)
{
cudaMemcpy3DParms p = {0};
p.srcPtr = make_cudaPitchedPtr( (void*)data, dimx*sizeof(float), dimx, dimy );
p.dstPtr = this->m_bsplineCoeffs;
p.extent = this->m_extent;
p.kind = kind;
CUDA_SAFE_CALL( cudaMemcpy3D(&p) );
if (pre_filter)
{
CubicBSplinePrefilter3D( (float*)this->m_bsplineCoeffs.ptr, (uint)this->m_bsplineCoeffs.pitch, dimx, dimy, dimz);
}
cudaMemcpy3DParms p1 = {0};
cudaExtent volumeExtent = make_cudaExtent(dimx, dimy, dimz);
CUDA_SAFE_CALL( cudaMalloc3DArray(&this->m_coeffArray, &this->m_desc, volumeExtent) );
p1.srcPtr = this->m_bsplineCoeffs;
p1.dstArray = this->m_coeffArray;
p1.extent = volumeExtent;
p1.kind = cudaMemcpyDeviceToDevice;
CUDA_SAFE_CALL( cudaMemcpy3D(&p1) );
CUDA_SAFE_CALL( cudaBindTextureToArray( tex3_float, this->m_coeffArray, this->m_desc) );
return 0;
}
//dimx_device, dimy_device and dimz_device doesn't have to be the same size as dimx, dimy and dimz since
//these values are interpolated from array they can be anysize, all depends on your cuda kernel
//I dont' think i use it????
int a_optional_output(float *host, float *device, uint dimx_device, uint dimy_device, uint dimz_device)
{
cudaMemcpy3DParms p2 = {0};
p2.srcPtr = make_cudaPitchedPtr( (void*)device, dimx_device*sizeof(float), dimx_device, dimy_device );
p2.dstPtr = make_cudaPitchedPtr( (void*)host, dimx_device*sizeof(float), dimx_device, dimy_device );
p2.extent = make_cudaExtent(dimx_device*sizeof(float), dimy_device, dimz_device);
p2.kind = cudaMemcpyDeviceToHost;
CUDA_SAFE_CALL( cudaMemcpy3D(&p2) );
return 0;
}
int a3_destroy()
{
CUDA_SAFE_CALL( cudaFree(this->m_bsplineCoeffs.ptr) );
CUDA_SAFE_CALL( cudaFreeArray(this->m_coeffArray) );
CUDA_SAFE_CALL( cudaUnbindTexture( tex3_float) );
std::cout << "3D texture cleared! " << std::endl;
return 0;
}
};
#endif | 38.359116 | 179 | 0.749532 | [
"3d"
] |
27721ca6e4dc6b1918fb4af19712ae382c317abe | 1,796 | cpp | C++ | solve.cpp | Jackie890621/Combinational-Sum | 3389cae4b98201c0f75195ea7262ba3287c63627 | [
"MIT"
] | null | null | null | solve.cpp | Jackie890621/Combinational-Sum | 3389cae4b98201c0f75195ea7262ba3287c63627 | [
"MIT"
] | null | null | null | solve.cpp | Jackie890621/Combinational-Sum | 3389cae4b98201c0f75195ea7262ba3287c63627 | [
"MIT"
] | null | null | null | //
// set.cpp
// DS_hw3_Stack_and_queue
//
#include <algorithm>
#include "solve.h"
#include <stdio.h>
#include <stdlib.h>
void combinationSum2(vector<int> &candidates, int target, vector< vector<int> > &sol, vector<int> &combination, int begin, int limit, int *count)
{
if (count[0] > limit) {
count[0]--;
return;
}
if (!target) {
sol.push_back(combination);
return;
}
for (int i = begin; i < candidates.size() && target >= candidates[i]; i++) {
combination.push_back(candidates[i]);
if (candidates[i] < 0) {
count[0]++;
}
combinationSum2(candidates, target - candidates[i], sol, combination, i, limit, count);
if (combination.back() < 0 && combination.size() == 1) {
count[0]--;
}
combination.pop_back();
}
}
void combinationSum(vector<int> &candidates, int target, vector< vector<int> > &sol, vector<int> &combination, int begin)
{
if (!target) {
sol.push_back(combination);
return;
}
for (int i = begin; i < candidates.size() && target >= candidates[i] && candidates[i] > 0; i++) {
combination.push_back(candidates[i]);
combinationSum(candidates, target - candidates[i], sol, combination, i);
combination.pop_back();
}
}
void solve::calculate(int target, int limit, int candidates_num, vector<int> candidates, vector< vector<int> > &solutions) {
vector <int> combination;
int *count = (int *)calloc(1, sizeof(int));
sort(candidates.begin(), candidates.end());
if (limit == 0) {
combinationSum(candidates, target, solutions, combination, 0);
} else {
combinationSum2(candidates, target, solutions, combination, 0, limit, count);
}
combination.clear();
free(count);
}
| 29.933333 | 147 | 0.608575 | [
"vector"
] |
2778cfadd3a77b513614c3aefc520d6a07de61ad | 3,328 | cpp | C++ | Entry/entry.cpp | themonsterdev/Modding | f2711ff6f46981e96b97d193f9dd917e160b1b98 | [
"MIT"
] | null | null | null | Entry/entry.cpp | themonsterdev/Modding | f2711ff6f46981e96b97d193f9dd917e160b1b98 | [
"MIT"
] | null | null | null | Entry/entry.cpp | themonsterdev/Modding | f2711ff6f46981e96b97d193f9dd917e160b1b98 | [
"MIT"
] | null | null | null | #include "pch.h"
Entry::Entry(char* name)
: m_processName (name)
, m_processId (0)
, m_baseAddress (nullptr)
, m_baseSize (0)
{}
// Process Id
DWORD Entry::GetProcessId(DWORD th32ProcessID)
{
if (m_processId == 0)
{
PROCESSENTRY32 pe32{ 0 };
// Take a snapshot of all processes in the system.
HANDLE hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, th32ProcessID);
if (hProcessSnap == INVALID_HANDLE_VALUE)
{
LOGGER_ERROR("CreateToolhelp32Snapshot (of processes)");
return 0;
}
// Set the size of the structure before using it.
pe32.dwSize = sizeof(PROCESSENTRY32);
// Retrieve information about the first process
if (Process32First(hProcessSnap, &pe32) == 0)
{
LOGGER_ERROR("Failed to gather information on system processes!"); // show cause of failure
CloseHandle(hProcessSnap); // clean the snapshot object
return 0;
}
// Now walk the snapshot of processes
do
{
if (strcmp(m_processName, pe32.szExeFile) == 0)
{
m_processId = pe32.th32ProcessID; // this process
// display information about each process in turn
LOGGER_DEBUG("PROCESS NAME: %s", pe32.szExeFile);
LOGGER_DEBUG("\t- Process ID = 0x%08X", m_processId);
LOGGER_DEBUG("\t- Module ID = 0x%08X", pe32.th32ModuleID);
LOGGER_DEBUG("\t- Thread count = %d", pe32.cntThreads);
LOGGER_DEBUG("\t- Parent process ID = 0x%08X", pe32.th32ParentProcessID);
LOGGER_DEBUG("\t- Priority base = %d", pe32.pcPriClassBase);
break;
}
} while (Process32Next(hProcessSnap, &pe32));
if (m_processId == 0)
LOGGER_ERROR("Unable to find Process ID");
CloseHandle(hProcessSnap);
}
return m_processId;
}
// Base
LPBYTE Entry::GetBaseAddress(DWORD th32ProcessID)
{
if (m_baseAddress == nullptr)
{
MODULEENTRY32 me32{ 0 };
// Take a snapshot of all modules in the specified process.
HANDLE hModuleSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, th32ProcessID);
if (hModuleSnap == INVALID_HANDLE_VALUE)
{
LOGGER_ERROR("CreateToolhelp32Snapshot (of modules)");
return nullptr;
}
// Set the size of the structure before using it.
me32.dwSize = sizeof(MODULEENTRY32);
// Retrieve information about the first module.
if (Module32First(hModuleSnap, &me32) == 0)
{
LOGGER_ERROR("Failed to gather information on system modules"); // show cause of failure
CloseHandle(hModuleSnap); // Must clean up the snapshot object!
return nullptr;
}
// Now walk the module list of the process.
do
{
if (strcmp(m_processName, me32.szModule) == 0)
{
m_baseAddress = me32.modBaseAddr;
m_baseSize = me32.modBaseSize;
// display information about each module
LOGGER_DEBUG("MODULE NAME: %s", me32.szModule);
LOGGER_DEBUG("\t- Executable = %s", me32.szExePath);
LOGGER_DEBUG("\t- Process ID = 0x%08X", me32.th32ProcessID);
LOGGER_DEBUG("\t- Base address = 0x%p", m_baseAddress);
LOGGER_DEBUG("\t- Base size = %d", m_baseSize);
break;
}
} while (Module32Next(hModuleSnap, &me32));
if (m_baseAddress == nullptr)
LOGGER_ERROR("Unable to find module base address ID");
// Do not forget to clean up the snapshot object.
CloseHandle(hModuleSnap);
}
return m_baseAddress;
}
DWORD Entry::GetBaseSize()
{
return m_baseSize;
}
| 27.278689 | 94 | 0.685697 | [
"object"
] |
277c12978db17f2437a651d0a020a11761517375 | 1,748 | cpp | C++ | Day 10/Prims-Algorithm-Implementation.cpp | AnanyaDas162/4-th-Semester-DSA-Lab | 4cd343ec9f822da97c1daa01cb05191681a82e50 | [
"MIT"
] | null | null | null | Day 10/Prims-Algorithm-Implementation.cpp | AnanyaDas162/4-th-Semester-DSA-Lab | 4cd343ec9f822da97c1daa01cb05191681a82e50 | [
"MIT"
] | null | null | null | Day 10/Prims-Algorithm-Implementation.cpp | AnanyaDas162/4-th-Semester-DSA-Lab | 4cd343ec9f822da97c1daa01cb05191681a82e50 | [
"MIT"
] | null | null | null | #include <bits/stdc++.h>
#include <fstream>
#define m 10
using namespace std;
int n, i, j;
int g[m][m];
int parent[m], dist[m], mstSet[m];
typedef pair < int,pair < char,char > > p;
priority_queue<p, vector<p>, greater<p> > pq;
void initialize (){
for (i = 0; i < n; i ++){
parent[i] = -1;
dist[i] = INT_MAX;
mstSet[i] = false;
}
}
void prims (){
initialize();
cout << "Enter the starting vertex :: " << endl;
char y;
cin >> y;
dist[y-65] = 0;
pq.push(make_pair(0,make_pair(y, y)));
int edges = 0, min_weight = 0;
while (!pq.empty() && edges <= n-1){
int u = pq.top().second.second;
mstSet[u-65] = true;
min_weight += pq.top().first;
cout << "Weight :: "<< pq.top().first << "\t" << pq.top().second.first << " <--> " << pq.top().second.second << endl;
pq.pop();
for (j = 0; j < n; j ++){
if (g[u-65][j] > 0){
if (mstSet[j] == false && g[u-65][j] < dist[j]){
dist[j] = g[u-65][j];
pq.push(make_pair(dist[j], make_pair(u, j+65)));
parent[j] = u;
}
}
}
edges ++;
}
cout << "The min weight is = " << min_weight << endl;
}
void print (int arr[m][m]){
for (i = 0; i < n; i ++){
for (j = 0; j < n; j ++){
cout << arr[i][j] << "\t";
}
cout << endl;
}
}
void input(){
int x;
ifstream in ("abc.txt");
in >> n;
cout << "The number of vertices = " << n << endl;
for (i = 0; i < n; i ++){
for (j = 0; j < n; j ++){
in >> x;
g[i][j] = x;
}
}
}
int main(){
input();
print(g);
prims();
return 0;
}
| 23 | 125 | 0.425629 | [
"vector"
] |
9597fb47e3673fb5754c09a7d7a4c9d7f9983471 | 751 | cpp | C++ | crypto/src/main/native/dpf/test.cpp | arimitx/vizard | 1d40c26533705b48b638eb1491c18903020af4d7 | [
"MIT"
] | null | null | null | crypto/src/main/native/dpf/test.cpp | arimitx/vizard | 1d40c26533705b48b638eb1491c18903020af4d7 | [
"MIT"
] | null | null | null | crypto/src/main/native/dpf/test.cpp | arimitx/vizard | 1d40c26533705b48b638eb1491c18903020af4d7 | [
"MIT"
] | null | null | null | #include "common/DPF.h"
#include <iostream>
int dpfEval(DPF &dpf, std::pair<std::vector<uint8_t>, std::vector<uint8_t>> &keys, uint64_t x, int n) {
auto a = keys.first;
auto b = keys.second;
int ans0 = dpf.Eval(a, 0, x, n);
int ans1 = dpf.Eval(b, 1, x, n);
std::cout << "Ans0: " << ans0 << std::endl;
std::cout << "Ans1: " << ans1 << std::endl;
return ans0 + ans1;
}
int main(int argc, char** argv) {
int N = 24;
DPF dpf = DPF();
auto keys = dpf.Gen(114514, N);
std::cout << dpfEval(dpf, keys, 114514, N) << std::endl;
std::cout << dpfEval(dpf, keys, 255, N) << std::endl;
std::cout << dpfEval(dpf, keys, 1, N) << std::endl;
std::cout << dpfEval(dpf, keys, 0, N) << std::endl;
return 0;
} | 31.291667 | 103 | 0.557923 | [
"vector"
] |
959a0324d221b0ec2072fdf1d465641e30aabe1e | 2,344 | cc | C++ | public/util/index/index_test.cc | room77/77up | 736806fbf52a5e722e8e57ef5c248823b067175d | [
"MIT"
] | 3 | 2015-05-18T14:52:47.000Z | 2018-11-12T07:51:00.000Z | public/util/index/index_test.cc | room77/77up | 736806fbf52a5e722e8e57ef5c248823b067175d | [
"MIT"
] | null | null | null | public/util/index/index_test.cc | room77/77up | 736806fbf52a5e722e8e57ef5c248823b067175d | [
"MIT"
] | 3 | 2015-08-04T05:58:18.000Z | 2018-11-12T07:51:01.000Z | // Copyright 2012 Room77, Inc.
// Author: pramodg@room77.com (Pramod Gupta)
#include <memory>
#include <vector>
#include "util/index/index.h"
#include "util/memory/stringstorage_unlock.h"
#include "util/string/strutil.h"
#include "test/cc/test_main.h"
namespace test {
struct tIndexTestStr {
string value;
tIndexTestStr() {}
explicit tIndexTestStr(const string& str): value(str) {}
};
class IndexTest : public testing::Test {
protected:
virtual void SetUp() {
keys_.push_back("");
keys_.push_back("Ab Cd e");
keys_.push_back("ab Cde");
keys_.push_back("aB Pq");
}
void AddDefaultValues() {
for (const string& key : keys_)
AddToStorage(key);
}
void AddToStorage(const string& str) {
storage_.push_back(shared_ptr<tIndexTestStr>(new tIndexTestStr(str)));
}
vector<shared_ptr<tIndexTestStr> > storage_;
Index<const char*, shared_ptr<tIndexTestStr> > index_;
vector<string> keys_;
};
TEST_F(IndexTest, Sanity) {
AddDefaultValues();
BUILD_UNIQUE_INDEX_ON_FIELD(storage_, value, index_);
ASSERT_EQ(keys_.size(), index_.size());
for (const string& key : keys_) {
vector<string> lookup_keys;
lookup_keys.push_back(key);
lookup_keys.push_back(strutil::ToUpper(key));
lookup_keys.push_back(strutil::ToLower(key));
for (const string& lookup_key : lookup_keys) {
const shared_ptr<tIndexTestStr>& val =
index_.RetrieveUnique(lookup_key);
ASSERT_NOTNULL(val);
ASSERT_EQ(key, val->value);
}
}
}
TEST_F(IndexTest, DuplicateKey) {
AddDefaultValues();
BUILD_UNIQUE_INDEX_ON_FIELD(storage_, value, index_);
ASSERT_EQ(keys_.size(), index_.size());
const shared_ptr<tIndexTestStr>& val = index_.RetrieveUnique(keys_[1]);
ASSERT_NOTNULL(val);
ASSERT_EQ(keys_[1], val->value);
shared_ptr<tIndexTestStr> new_val(new tIndexTestStr(keys_[1] + " New val"));
ASSERT_DEATH(index_.AddToIndex(strutil::ToLower(keys_[1]), new_val, true),
"");
}
TEST_F(IndexTest, PrefixKeys) {
AddDefaultValues();
BUILD_PREFIX_INDEX_ON_FIELD(storage_, value, index_);
ASSERT_LT(keys_.size(), index_.size());
vector<shared_ptr<tIndexTestStr> > vals;
int num_vals = index_.Retrieve("a", &vals);
ASSERT_EQ(3, num_vals);
num_vals = index_.Retrieve("abcde", &vals);
ASSERT_EQ(2, num_vals);
}
} // namespace test
| 24.93617 | 78 | 0.696246 | [
"vector"
] |
959f1f70f6f990b37a48ff5812f01f07ad1ca373 | 1,740 | hpp | C++ | include/lug/Graphics/Vulkan/Render/Queue.hpp | Lugdunum3D/Lugdunum3D | b6d6907d034fdba1ffc278b96598eba1d860f0d4 | [
"MIT"
] | 275 | 2016-10-08T15:33:17.000Z | 2022-03-30T06:11:56.000Z | include/lug/Graphics/Vulkan/Render/Queue.hpp | Lugdunum3D/Lugdunum3D | b6d6907d034fdba1ffc278b96598eba1d860f0d4 | [
"MIT"
] | 24 | 2016-09-29T20:51:20.000Z | 2018-05-09T21:41:36.000Z | include/lug/Graphics/Vulkan/Render/Queue.hpp | Lugdunum3D/Lugdunum3D | b6d6907d034fdba1ffc278b96598eba1d860f0d4 | [
"MIT"
] | 37 | 2017-02-25T05:03:48.000Z | 2021-05-10T19:06:29.000Z | #pragma once
#include <map>
#include <vector>
#include <lug/Graphics/Export.hpp>
#include <lug/Graphics/Render/Queue.hpp>
#include <lug/Graphics/Vulkan/Render/Material.hpp>
#include <lug/Graphics/Vulkan/Render/Mesh.hpp>
#include <lug/Graphics/Vulkan/Render/SkyBox.hpp>
namespace lug {
namespace Graphics {
namespace Vulkan {
namespace Render {
class LUG_GRAPHICS_API Queue final : public ::lug::Graphics::Render::Queue {
public:
struct PrimitiveSetInstance {
Scene::Node* node;
const Render::Mesh::PrimitiveSet* primitiveSet;
Render::Material* material;
};
public:
Queue() = default;
Queue(const Queue&) = delete;
Queue(Queue&&) = delete;
Queue& operator=(const Queue&) = delete;
Queue& operator=(Queue&&) = delete;
~Queue() = default;
void addMeshInstance(Scene::Node& node, const lug::Graphics::Renderer& renderer) override final;
void addLight(Scene::Node& node) override final;
void addSkyBox(Resource::SharedPtr<::lug::Graphics::Render::SkyBox> skyBox) override final;
void clear() override final;
const std::map<Render::Pipeline::Id, std::vector<PrimitiveSetInstance>> getPrimitiveSets() const;
const std::vector<Scene::Node*> getLights() const;
std::size_t getLightsCount() const;
const Resource::SharedPtr<Render::SkyBox> getSkyBox() const;
private:
// TODO: Use a custom frame allocator for the content of the queue
// TODO: Also sort by material ?
std::map<Render::Pipeline::Id, std::vector<PrimitiveSetInstance>> _primitiveSets;
std::vector<Scene::Node*> _lights{50};
std::size_t _lightsCount{0};
Resource::SharedPtr<Render::SkyBox> _skyBox{nullptr};
};
} // Render
} // Vulkan
} // Graphics
} // lug
| 27.619048 | 101 | 0.696552 | [
"mesh",
"render",
"vector"
] |
95a17d43b58cae99909abfcb2cc5019ae8cc8a66 | 7,423 | cpp | C++ | src/lib/operators/jit_operator/jit_types.cpp | cmfcmf/hyrise | d3465dfc83039876c1800bf245e73874947da114 | [
"MIT"
] | null | null | null | src/lib/operators/jit_operator/jit_types.cpp | cmfcmf/hyrise | d3465dfc83039876c1800bf245e73874947da114 | [
"MIT"
] | 17 | 2018-11-28T10:31:31.000Z | 2019-03-06T10:28:12.000Z | src/lib/operators/jit_operator/jit_types.cpp | cmfcmf/hyrise | d3465dfc83039876c1800bf245e73874947da114 | [
"MIT"
] | null | null | null | #include "jit_types.hpp"
namespace opossum {
#define JIT_VARIANT_VECTOR_GET(r, d, type) \
template <> \
BOOST_PP_TUPLE_ELEM(3, 0, type) \
JitVariantVector::get<BOOST_PP_TUPLE_ELEM(3, 0, type)>(const size_t index) const { \
return BOOST_PP_TUPLE_ELEM(3, 1, type)[index]; \
}
#define JIT_VARIANT_VECTOR_SET(r, d, type) \
template <> \
void JitVariantVector::set<BOOST_PP_TUPLE_ELEM(3, 0, type)>(const size_t index, \
const BOOST_PP_TUPLE_ELEM(3, 0, type) & value) { \
BOOST_PP_TUPLE_ELEM(3, 1, type)[index] = value; \
}
#define JIT_VARIANT_VECTOR_RESIZE(r, d, type) BOOST_PP_TUPLE_ELEM(3, 1, type).resize(new_size);
#define JIT_VARIANT_VECTOR_GROW_BY_ONE(r, d, type) \
template <> \
size_t JitVariantVector::grow_by_one<BOOST_PP_TUPLE_ELEM(3, 0, type)>(const InitialValue initial_value) { \
_is_null.emplace_back(true); \
\
switch (initial_value) { \
case InitialValue::Zero: \
BOOST_PP_TUPLE_ELEM(3, 1, type).emplace_back(BOOST_PP_TUPLE_ELEM(3, 0, type)()); \
break; \
case InitialValue::MaxValue: \
BOOST_PP_TUPLE_ELEM(3, 1, type).emplace_back(std::numeric_limits<BOOST_PP_TUPLE_ELEM(3, 0, type)>::max()); \
break; \
case InitialValue::MinValue: \
BOOST_PP_TUPLE_ELEM(3, 1, type).emplace_back(std::numeric_limits<BOOST_PP_TUPLE_ELEM(3, 0, type)>::min()); \
break; \
} \
return BOOST_PP_TUPLE_ELEM(3, 1, type).size() - 1; \
}
#define JIT_VARIANT_VECTOR_GET_VECTOR(r, d, type) \
template <> \
std::vector<BOOST_PP_TUPLE_ELEM(3, 0, type)>& JitVariantVector::get_vector<BOOST_PP_TUPLE_ELEM(3, 0, type)>() { \
return BOOST_PP_TUPLE_ELEM(3, 1, type); \
}
void JitVariantVector::resize(const size_t new_size) {
BOOST_PP_SEQ_FOR_EACH(JIT_VARIANT_VECTOR_RESIZE, _, JIT_DATA_TYPE_INFO)
_is_null.resize(new_size);
}
bool JitVariantVector::is_null(const size_t index) { return _is_null[index]; }
void JitVariantVector::set_is_null(const size_t index, const bool is_null) { _is_null[index] = is_null; }
std::vector<bool>& JitVariantVector::get_is_null_vector() { return _is_null; }
// Generate get, set, grow_by_one, and get_vector methods for all data types defined in JIT_DATA_TYPE_INFO
BOOST_PP_SEQ_FOR_EACH(JIT_VARIANT_VECTOR_GET, _, JIT_DATA_TYPE_INFO)
BOOST_PP_SEQ_FOR_EACH(JIT_VARIANT_VECTOR_SET, _, JIT_DATA_TYPE_INFO)
BOOST_PP_SEQ_FOR_EACH(JIT_VARIANT_VECTOR_GROW_BY_ONE, _, JIT_DATA_TYPE_INFO)
BOOST_PP_SEQ_FOR_EACH(JIT_VARIANT_VECTOR_GET_VECTOR, _, JIT_DATA_TYPE_INFO)
JitTupleEntry::JitTupleEntry(const DataType data_type, const bool is_nullable, const size_t tuple_index)
: _data_type{data_type}, _is_nullable{is_nullable}, _tuple_index{tuple_index} {}
JitTupleEntry::JitTupleEntry(const std::pair<const DataType, const bool> data_type, const size_t tuple_index)
: _data_type{data_type.first}, _is_nullable{data_type.second}, _tuple_index{tuple_index} {}
DataType JitTupleEntry::data_type() const { return _data_type; }
bool JitTupleEntry::is_nullable() const { return _is_nullable; }
size_t JitTupleEntry::tuple_index() const { return _tuple_index; }
bool JitTupleEntry::is_null(JitRuntimeContext& context) const {
return _is_nullable && context.tuple.is_null(_tuple_index);
}
void JitTupleEntry::set_is_null(const bool is_null, JitRuntimeContext& context) const {
context.tuple.set_is_null(_tuple_index, is_null);
}
bool JitTupleEntry::operator==(const JitTupleEntry& other) const {
return data_type() == other.data_type() && is_nullable() == other.is_nullable() &&
tuple_index() == other.tuple_index();
}
JitHashmapEntry::JitHashmapEntry(const DataType data_type, const bool is_nullable, const size_t column_index)
: _data_type{data_type}, _is_nullable{is_nullable}, _column_index{column_index} {}
DataType JitHashmapEntry::data_type() const { return _data_type; }
bool JitHashmapEntry::is_nullable() const { return _is_nullable; }
size_t JitHashmapEntry::column_index() const { return _column_index; }
bool JitHashmapEntry::is_null(const size_t index, JitRuntimeContext& context) const {
return _is_nullable && context.hashmap.columns[_column_index].is_null(index);
}
void JitHashmapEntry::set_is_null(const bool is_null, const size_t index, JitRuntimeContext& context) const {
context.hashmap.columns[_column_index].set_is_null(index, is_null);
}
bool jit_expression_is_binary(const JitExpressionType expression_type) {
switch (expression_type) {
case JitExpressionType::Addition:
case JitExpressionType::Subtraction:
case JitExpressionType::Multiplication:
case JitExpressionType::Division:
case JitExpressionType::Modulo:
case JitExpressionType::Power:
case JitExpressionType::Equals:
case JitExpressionType::NotEquals:
case JitExpressionType::GreaterThan:
case JitExpressionType::GreaterThanEquals:
case JitExpressionType::LessThan:
case JitExpressionType::LessThanEquals:
case JitExpressionType::Like:
case JitExpressionType::NotLike:
case JitExpressionType::And:
case JitExpressionType::Or:
return true;
case JitExpressionType::Column:
case JitExpressionType::Value:
case JitExpressionType::Between:
case JitExpressionType::Not:
case JitExpressionType::IsNull:
case JitExpressionType::IsNotNull:
return false;
}
}
// cleanup
#undef JIT_VARIANT_VECTOR_GET
#undef JIT_VARIANT_VECTOR_SET
#undef JIT_VARIANT_VECTOR_GROW_BY_ONE
#undef JIT_VARIANT_VECTOR_GET_VECTOR
} // namespace opossum
| 52.274648 | 116 | 0.559612 | [
"vector"
] |
95a3fa468ac0f3b8a86b7dc0424761ed52361650 | 10,857 | cxx | C++ | main/connectivity/source/drivers/ado/ADriver.cxx | Grosskopf/openoffice | 93df6e8a695d5e3eac16f3ad5e9ade1b963ab8d7 | [
"Apache-2.0"
] | 679 | 2015-01-06T06:34:58.000Z | 2022-03-30T01:06:03.000Z | main/connectivity/source/drivers/ado/ADriver.cxx | Grosskopf/openoffice | 93df6e8a695d5e3eac16f3ad5e9ade1b963ab8d7 | [
"Apache-2.0"
] | 102 | 2017-11-07T08:51:31.000Z | 2022-03-17T12:13:49.000Z | main/connectivity/source/drivers/ado/ADriver.cxx | Grosskopf/openoffice | 93df6e8a695d5e3eac16f3ad5e9ade1b963ab8d7 | [
"Apache-2.0"
] | 331 | 2015-01-06T11:40:55.000Z | 2022-03-14T04:07:51.000Z | /**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_connectivity.hxx"
#include "ado/ADriver.hxx"
#include "ado/AConnection.hxx"
#include "ado/Awrapadox.hxx"
#include "ado/ACatalog.hxx"
#include "ado/Awrapado.hxx"
#include "ado/adoimp.hxx"
#include <com/sun/star/lang/DisposedException.hpp>
#include "connectivity/dbexception.hxx"
#include "resource/ado_res.hrc"
#include <Objbase.h>
#include "resource/sharedresources.hxx"
using namespace connectivity;
using namespace connectivity::ado;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::sdbc;
using namespace com::sun::star::sdbcx;
using namespace com::sun::star::lang;
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
ODriver::ODriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB)
: ODriver_BASE(m_aMutex)
,m_xORB(_xORB)
{
if ( FAILED(CoInitializeEx(NULL, COINIT_APARTMENTTHREADED)) )
{
CoUninitialize();
int h = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
(void)h;
++h;
}
}
// -------------------------------------------------------------------------
ODriver::~ODriver()
{
CoUninitialize();
CoInitialize(NULL);
}
//------------------------------------------------------------------------------
void ODriver::disposing()
{
::osl::MutexGuard aGuard(m_aMutex);
for (OWeakRefArray::iterator i = m_xConnections.begin(); m_xConnections.end() != i; ++i)
{
Reference< XComponent > xComp(i->get(), UNO_QUERY);
if (xComp.is())
xComp->dispose();
}
m_xConnections.clear();
ODriver_BASE::disposing();
}
// static ServiceInfo
//------------------------------------------------------------------------------
rtl::OUString ODriver::getImplementationName_Static( ) throw(RuntimeException)
{
return rtl::OUString::createFromAscii("com.sun.star.comp.sdbc.ado.ODriver");
}
//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ODriver::getSupportedServiceNames_Static( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
aSNS[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.Driver");
aSNS[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.Driver");
return aSNS;
}
//------------------------------------------------------------------
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL connectivity::ado::ODriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception )
{
return *(new ODriver(_rxFactory));
}
// --------------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODriver::getImplementationName( ) throw(RuntimeException)
{
return getImplementationName_Static();
}
// --------------------------------------------------------------------------------
sal_Bool SAL_CALL ODriver::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aSupported(getSupportedServiceNames());
const ::rtl::OUString* pSupported = aSupported.getConstArray();
const ::rtl::OUString* pEnd = pSupported + aSupported.getLength();
for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
;
return pSupported != pEnd;
}
// --------------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL ODriver::getSupportedServiceNames( ) throw(RuntimeException)
{
return getSupportedServiceNames_Static();
}
// --------------------------------------------------------------------------------
Reference< XConnection > SAL_CALL ODriver::connect( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException)
{
if ( ! acceptsURL(url) )
return NULL;
OConnection* pCon = new OConnection(this);
pCon->construct(url,info);
Reference< XConnection > xCon = pCon;
m_xConnections.push_back(WeakReferenceHelper(*pCon));
return xCon;
}
// --------------------------------------------------------------------------------
sal_Bool SAL_CALL ODriver::acceptsURL( const ::rtl::OUString& url )
throw(SQLException, RuntimeException)
{
return (!url.compareTo(::rtl::OUString::createFromAscii("sdbc:ado:"),9));
}
// -----------------------------------------------------------------------------
void ODriver::impl_checkURL_throw(const ::rtl::OUString& _sUrl)
{
if ( !acceptsURL(_sUrl) )
{
SharedResources aResources;
const ::rtl::OUString sMessage = aResources.getResourceString(STR_URI_SYNTAX_ERROR);
::dbtools::throwGenericSQLException(sMessage ,*this);
} // if ( !acceptsURL(_sUrl) )
}
// --------------------------------------------------------------------------------
Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException)
{
impl_checkURL_throw(url);
if ( acceptsURL(url) )
{
::std::vector< DriverPropertyInfo > aDriverInfo;
Sequence< ::rtl::OUString > aBooleanValues(2);
aBooleanValues[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "false" ) );
aBooleanValues[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) );
aDriverInfo.push_back(DriverPropertyInfo(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IgnoreDriverPrivileges"))
,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Ignore the privileges from the database driver."))
,sal_False
,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "false" ) )
,aBooleanValues)
);
aDriverInfo.push_back(DriverPropertyInfo(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EscapeDateTime"))
,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Escape date time format."))
,sal_False
,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) )
,aBooleanValues)
);
aDriverInfo.push_back(DriverPropertyInfo(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TypeInfoSettings"))
,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Defines how the type info of the database metadata should be manipulated."))
,sal_False
,::rtl::OUString( )
,Sequence< ::rtl::OUString > ())
);
return Sequence< DriverPropertyInfo >(&aDriverInfo[0],aDriverInfo.size());
}
return Sequence< DriverPropertyInfo >();
}
// --------------------------------------------------------------------------------
sal_Int32 SAL_CALL ODriver::getMajorVersion( ) throw(RuntimeException)
{
return 1;
}
// --------------------------------------------------------------------------------
sal_Int32 SAL_CALL ODriver::getMinorVersion( ) throw(RuntimeException)
{
return 0;
}
// --------------------------------------------------------------------------------
// XDataDefinitionSupplier
Reference< XTablesSupplier > SAL_CALL ODriver::getDataDefinitionByConnection( const Reference< ::com::sun::star::sdbc::XConnection >& connection ) throw(::com::sun::star::sdbc::SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
if (ODriver_BASE::rBHelper.bDisposed)
throw DisposedException();
OConnection* pConnection = NULL;
Reference< ::com::sun::star::lang::XUnoTunnel> xTunnel(connection,UNO_QUERY);
if(xTunnel.is())
{
OConnection* pSearchConnection = reinterpret_cast< OConnection* >( xTunnel->getSomething(OConnection::getUnoTunnelImplementationId()) );
for (OWeakRefArray::iterator i = m_xConnections.begin(); m_xConnections.end() != i; ++i)
{
if ((OConnection*) Reference< XConnection >::query(i->get().get()).get() == pSearchConnection)
{
pConnection = pSearchConnection;
break;
}
}
}
Reference< XTablesSupplier > xTab = NULL;
if(pConnection)
{
WpADOCatalog aCatalog;
aCatalog.Create();
if(aCatalog.IsValid())
{
aCatalog.putref_ActiveConnection(*pConnection->getConnection());
OCatalog* pCatalog = new OCatalog(aCatalog,pConnection);
xTab = pCatalog;
pConnection->setCatalog(xTab);
pConnection->setCatalog(pCatalog);
}
}
return xTab;
}
// --------------------------------------------------------------------------------
Reference< XTablesSupplier > SAL_CALL ODriver::getDataDefinitionByURL( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, RuntimeException)
{
impl_checkURL_throw(url);
return getDataDefinitionByConnection(connect(url,info));
}
// -----------------------------------------------------------------------------
void ADOS::ThrowException(ADOConnection* _pAdoCon,const Reference< XInterface >& _xInterface) throw(SQLException, RuntimeException)
{
ADOErrors *pErrors = NULL;
_pAdoCon->get_Errors(&pErrors);
if(!pErrors)
return; // no error found
pErrors->AddRef( );
// alle aufgelaufenen Fehler auslesen und ausgeben
sal_Int32 nLen;
pErrors->get_Count(&nLen);
if (nLen)
{
::rtl::OUString sError;
::rtl::OUString aSQLState;
SQLException aException;
aException.ErrorCode = 1000;
for (sal_Int32 i = nLen-1; i>=0; --i)
{
ADOError *pError = NULL;
pErrors->get_Item(OLEVariant(i),&pError);
WpADOError aErr(pError);
OSL_ENSURE(pError,"No error in collection found! BAD!");
if(pError)
{
if(i==nLen-1)
aException = SQLException(aErr.GetDescription(),_xInterface,aErr.GetSQLState(),aErr.GetNumber(),Any());
else
{
SQLException aTemp = SQLException(aErr.GetDescription(),
_xInterface,aErr.GetSQLState(),aErr.GetNumber(),makeAny(aException));
aTemp.NextException <<= aException;
aException = aTemp;
}
}
}
pErrors->Clear();
pErrors->Release();
throw aException;
}
pErrors->Release();
}
| 36.311037 | 263 | 0.610942 | [
"vector"
] |
95a89ec90ef8332affb879716ead10afd71cbf84 | 2,651 | cc | C++ | chrome/browser/privacy_budget/surface_set_with_valuation.cc | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | chrome/browser/privacy_budget/surface_set_with_valuation.cc | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 86 | 2015-10-21T13:02:42.000Z | 2022-03-14T07:50:50.000Z | chrome/browser/privacy_budget/surface_set_with_valuation.cc | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | // Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/privacy_budget/surface_set_with_valuation.h"
#include <type_traits>
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/rand_util.h"
#include "base/ranges/algorithm.h"
#include "base/stl_util.h"
namespace base {
template <typename TagType, typename UnderlyingType>
class StrongAlias;
} // namespace base
static_assert(std::is_same<RepresentativeSurface,
SurfaceSetWithValuation::key_type>::value,
"");
SurfaceSetWithValuation::SurfaceSetWithValuation(
const SurfaceSetValuation& valuation)
: valuation_(valuation) {}
SurfaceSetWithValuation::~SurfaceSetWithValuation() = default;
bool SurfaceSetWithValuation::TryAdd(RepresentativeSurface surface,
PrivacyBudgetCost budget) {
if (cost_ > budget)
return false;
auto it = surfaces_.find(surface);
if (it != surfaces_.end())
return true;
double new_cost = cost_ + valuation_.IncrementalCost(surfaces_, surface);
if (new_cost > budget)
return false;
cost_ = new_cost;
auto insertion_result = surfaces_.insert(surface);
DCHECK(insertion_result.second);
return true;
}
bool SurfaceSetWithValuation::TryAdd(blink::IdentifiableSurface surface,
PrivacyBudgetCost budget) {
return TryAdd(valuation_.equivalence().GetRepresentative(surface), budget);
}
void SurfaceSetWithValuation::AssignWithBudget(
RepresentativeSurfaceSet&& incoming_container,
double budget) {
Assign(std::move(incoming_container));
if (cost_ <= budget)
return;
// In case the budget doesn't accommodate all of `surfaces_`, we'll randomly
// drop elements until we meet the budget's restrictions.
auto container = std::move(surfaces_).extract();
base::RandomBitGenerator g;
base::ranges::shuffle(container, g);
auto new_beginning = container.begin();
for (; new_beginning != container.end() && cost_ > budget;
cost_ -= valuation_.Cost(*new_beginning), ++new_beginning) {
}
surfaces_ = container_type(new_beginning, container.end());
}
void SurfaceSetWithValuation::Assign(
RepresentativeSurfaceSet&& incoming_container) {
surfaces_ = std::move(incoming_container);
cost_ = valuation_.Cost(surfaces_);
}
void SurfaceSetWithValuation::Clear() {
cost_ = 0;
base::STLClearObject(&surfaces_);
}
RepresentativeSurfaceSet SurfaceSetWithValuation::Take() && {
cost_ = 0;
return std::move(surfaces_);
}
| 28.815217 | 78 | 0.71822 | [
"vector"
] |
95b3d7c7568855bf2bd9c99e89b17b1ac13b2feb | 2,280 | cpp | C++ | src/polycubed/src/server/Resources/Endpoint/LeafListResource.cpp | francescomessina/polycube | 38f2fb4ffa13cf51313b3cab9994be738ba367be | [
"ECL-2.0",
"Apache-2.0"
] | 337 | 2018-12-12T11:50:15.000Z | 2022-03-15T00:24:35.000Z | src/polycubed/src/server/Resources/Endpoint/LeafListResource.cpp | l1b0k/polycube | 7af919245c131fa9fe24c5d39d10039cbb81e825 | [
"ECL-2.0",
"Apache-2.0"
] | 253 | 2018-12-17T21:36:15.000Z | 2022-01-17T09:30:42.000Z | src/polycubed/src/server/Resources/Endpoint/LeafListResource.cpp | l1b0k/polycube | 7af919245c131fa9fe24c5d39d10039cbb81e825 | [
"ECL-2.0",
"Apache-2.0"
] | 90 | 2018-12-19T15:49:38.000Z | 2022-03-27T03:56:07.000Z | /*
* Copyright 2018 The Polycube Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "LeafListResource.h"
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "rest_server.h"
#include "../../Server/ResponseGenerator.h"
#include "../Body/JsonNodeField.h"
#include "../Body/JsonValueField.h"
#include "../Body/LeafResource.h"
#include "../Body/ListKey.h"
#include "Service.h"
namespace polycube::polycubed::Rest::Resources::Endpoint {
LeafListResource::LeafListResource(
const std::string &name, const std::string &description,
const std::string &cli_example, const std::string &rest_endpoint,
const Body::ParentResource *parent, PolycubedCore *core,
std::unique_ptr<Body::JsonValueField> &&value_field,
const std::vector<Body::JsonNodeField> &node_fields, bool configuration,
bool init_only_config, bool mandatory, Types::Scalar type,
std::vector<std::string> &&default_value)
: Body::LeafResource(name, description, cli_example, parent, core,
std::move(value_field), node_fields, configuration,
init_only_config, mandatory, type, nullptr),
LeafResource(name, description, cli_example, rest_endpoint, parent, core,
nullptr, node_fields, configuration, init_only_config,
mandatory, type, nullptr, false, {}),
Body::LeafListResource(name, description, cli_example, parent, core,
nullptr, node_fields, configuration,
init_only_config, mandatory, type,
std::move(default_value)) {}
LeafListResource::~LeafListResource() {}
} // namespace polycube::polycubed::Rest::Resources::Endpoint
| 40.714286 | 79 | 0.691667 | [
"vector"
] |
95b8d5d57a749c410c281b73ac688a52303bb5fd | 663 | cpp | C++ | sandbox/polymorphtest.cpp | PitEG/poppingamer | 1eade7430b77ddf35098d4e500e2f75aaabbf891 | [
"MIT"
] | null | null | null | sandbox/polymorphtest.cpp | PitEG/poppingamer | 1eade7430b77ddf35098d4e500e2f75aaabbf891 | [
"MIT"
] | null | null | null | sandbox/polymorphtest.cpp | PitEG/poppingamer | 1eade7430b77ddf35098d4e500e2f75aaabbf891 | [
"MIT"
] | null | null | null | #include <string>
#include <iostream>
#include <vector>
using std::cout;
using std::endl;
class A {
public:
int a_thing;
int a_wow;
virtual void talk() {
cout << "I'm A\n";
}
};
class B : public A {
private:
int b_thing;
public:
virtual void talk() override {
cout << "I'm B\n";
}
};
int main() {
std::vector<A>* a_vector = new std::vector<A>(10);
std::vector<B>* b_vector = new std::vector<B>(10);
std::vector<A>* b2a_vector = (std::vector<A>*)b_vector;
for (int i = 0; i < a_vector->size(); i++) {
(*a_vector)[i].talk();
}
for (int i = 0; i < b_vector->size(); i++) {
(*b_vector)[i].talk();
}
return 0;
}
| 15.785714 | 57 | 0.562594 | [
"vector"
] |
95bb318a954d59bdb329a7c378097a014c925653 | 13,511 | cpp | C++ | sourceCode/drawingObjects/drawingObject.cpp | mdecourse/CoppeliaSimLib | 934e65b4b6ea5a07d08919ae35c50fd3ae960ef2 | [
"RSA-MD"
] | null | null | null | sourceCode/drawingObjects/drawingObject.cpp | mdecourse/CoppeliaSimLib | 934e65b4b6ea5a07d08919ae35c50fd3ae960ef2 | [
"RSA-MD"
] | null | null | null | sourceCode/drawingObjects/drawingObject.cpp | mdecourse/CoppeliaSimLib | 934e65b4b6ea5a07d08919ae35c50fd3ae960ef2 | [
"RSA-MD"
] | null | null | null | #include "simInternal.h"
#include "drawingObject.h"
#include "app.h"
#include "tt.h"
#include "easyLock.h"
#include "drawingObjectRendering.h"
float CDrawingObject::getSize() const
{
return(_size);
}
int CDrawingObject::getMaxItemCount() const
{
return(_maxItemCount);
}
int CDrawingObject::getStartItem() const
{
return(_startItem);
}
std::vector<float>* CDrawingObject::getDataPtr()
{
return(&_data);
}
CDrawingObject::CDrawingObject(int theObjectType,float size,float duplicateTolerance,int sceneObjID,int maxItemCount,int creatorHandle)
{
_creatorHandle=creatorHandle;
float tr=0.0f;
if (theObjectType&sim_drawing_50percenttransparency)
tr+=0.5f;
if (theObjectType&sim_drawing_25percenttransparency)
tr+=0.25f;
if (theObjectType&sim_drawing_12percenttransparency)
tr+=0.125f;
color.setDefaultValues();
if (tr!=0.0f)
{
color.setTranslucid(true);
color.setTransparencyFactor(1.0f-tr);
}
_objectID=0;
_sceneObjectID=-1;
size=tt::getLimitedFloat(0.0001f,100.0f,size);
_size=size;
if (maxItemCount==0)
maxItemCount=10000000;
maxItemCount=tt::getLimitedInt(1,10000000,maxItemCount);
_maxItemCount=maxItemCount;
_startItem=0;
int tmp=theObjectType&0x001f;
if (theObjectType&sim_drawing_vertexcolors)
{
if ((tmp!=sim_drawing_lines)&&(tmp!=sim_drawing_triangles)&&(tmp!=sim_drawing_linestrip))
theObjectType-=sim_drawing_vertexcolors;
if ((theObjectType&sim_drawing_itemcolors)&&(theObjectType&sim_drawing_vertexcolors))
theObjectType-=sim_drawing_vertexcolors;
if (theObjectType&sim_drawing_itemtransparency)
theObjectType-=sim_drawing_itemtransparency;
}
if (theObjectType&sim_drawing_itemsizes)
{
if (tmp==sim_drawing_triangles)
theObjectType-=sim_drawing_itemsizes;
}
if (duplicateTolerance<0.0f)
duplicateTolerance=0.0f;
_duplicateTolerance=duplicateTolerance;
_objectType=theObjectType;
_setItemSizes();
if (sceneObjID==-1)
_sceneObjectID=-1;
else
{
CSceneObject* it=App::currentWorld->sceneObjects->getObjectFromHandle(sceneObjID);
if (it!=nullptr)
_sceneObjectID=sceneObjID;
}
}
CDrawingObject::~CDrawingObject()
{
}
int CDrawingObject::getObjectType() const
{
return(_objectType);
}
int CDrawingObject::getSceneObjectID() const
{
return(_sceneObjectID);
}
void CDrawingObject::setObjectID(int newID)
{
_objectID=newID;
}
int CDrawingObject::getObjectID() const
{
return(_objectID);
}
void CDrawingObject::adjustForFrameChange(const C7Vector& preCorrection)
{
for (int i=0;i<int(_data.size())/floatsPerItem;i++)
{
for (int j=0;j<verticesPerItem;j++)
{
C3Vector v(&_data[floatsPerItem*i+j*3+0]);
v*=preCorrection;
v.copyTo(&_data[floatsPerItem*i+j*3+0]);
}
int off=verticesPerItem*3;
for (int j=0;j<normalsPerItem;j++)
{
C3Vector n(&_data[floatsPerItem*i+off+j*3+0]);
n=preCorrection.Q*n;
n.copyTo(&_data[floatsPerItem*i+off+j*3+0]);
}
}
}
void CDrawingObject::adjustForScaling(float xScale,float yScale,float zScale)
{
float avgScaling=(xScale+yScale+zScale)/3.0f;
int tmp=_objectType&0x001f;
if ((tmp!=sim_drawing_points)&&(tmp!=sim_drawing_lines)&&(tmp!=sim_drawing_linestrip))
_size*=avgScaling;
for (int i=0;i<int(_data.size())/floatsPerItem;i++)
{
for (int j=0;j<verticesPerItem;j++)
{
C3Vector v(&_data[floatsPerItem*i+j*3+0]);
v(0)*=xScale;
v(1)*=yScale;
v(2)*=zScale;
v.copyTo(&_data[floatsPerItem*i+j*3+0]);
}
int off=verticesPerItem*3;
if (_objectType&sim_drawing_itemcolors)
off+=3;
if (_objectType&sim_drawing_vertexcolors)
off+=3*verticesPerItem;
if (_objectType&sim_drawing_itemsizes)
{
_data[floatsPerItem*i+off+0]*=avgScaling;
off+=1;
}
if (_objectType&sim_drawing_itemtransparency)
off+=1;
}
}
void CDrawingObject::setItems(const float* itemData,size_t itemCnt)
{
addItem(nullptr);
size_t off=size_t(verticesPerItem*3+normalsPerItem*3+otherFloatsPerItem);
for (size_t i=0;i<itemCnt;i++)
addItem(itemData+off*i);
}
bool CDrawingObject::addItem(const float* itemData)
{
EASYLOCK(_objectMutex);
if (itemData==nullptr)
{
_data.clear();
_startItem=0;
return(false);
}
int newPos=_startItem;
if (int(_data.size())/floatsPerItem>=_maxItemCount)
{ // the buffer is full
if (_objectType&sim_drawing_cyclic)
{
_startItem++;
if (_startItem>=_maxItemCount)
_startItem=0;
}
else
return(false); // saturated
}
C7Vector trInv;
trInv.setIdentity();
if (_sceneObjectID>=0)
{
CSceneObject* it=App::currentWorld->sceneObjects->getObjectFromHandle(_sceneObjectID);
if (it==nullptr)
_sceneObjectID=-2; // should normally never happen!
else
trInv=it->getCumulativeTransformation().getInverse();
}
if ( (_duplicateTolerance>0.0f)&&(verticesPerItem==1) )
{ // Check for duplicates
C3Vector v(itemData);
v*=trInv;
for (int i=0;i<int(_data.size())/floatsPerItem;i++)
{
C3Vector w(&_data[floatsPerItem*i+0]);
if ((w-v).getLength()<=_duplicateTolerance)
return(false); // point already there!
}
}
if (int(_data.size())/floatsPerItem<_maxItemCount)
{ // The buffer is not yet full!
newPos=int(_data.size())/floatsPerItem;
for (int i=0;i<floatsPerItem;i++)
_data.push_back(0.0f);
}
if (_sceneObjectID!=-2)
{
int off=0;
for (int i=0;i<verticesPerItem;i++)
{
C3Vector v(itemData+off);
v*=trInv;
_data[newPos*floatsPerItem+off+0]=v(0);
_data[newPos*floatsPerItem+off+1]=v(1);
_data[newPos*floatsPerItem+off+2]=v(2);
off+=3;
}
for (int i=0;i<normalsPerItem;i++)
{
C3Vector v(itemData+off);
v=trInv.Q*v; // no translational part!
_data[newPos*floatsPerItem+off+0]=v(0);
_data[newPos*floatsPerItem+off+1]=v(1);
_data[newPos*floatsPerItem+off+2]=v(2);
off+=3;
}
for (int i=0;i<otherFloatsPerItem;i++)
_data[newPos*floatsPerItem+off+i]=itemData[off+i];
}
return(true);
}
void CDrawingObject::_setItemSizes()
{
verticesPerItem=0;
normalsPerItem=0;
otherFloatsPerItem=0;
int tmp=_objectType&0x001f;
if ( (tmp==sim_drawing_points)||(tmp==sim_drawing_trianglepoints)||(tmp==sim_drawing_quadpoints)||(tmp==sim_drawing_discpoints)||(tmp==sim_drawing_cubepoints)||(tmp==sim_drawing_spherepoints) )
verticesPerItem=1;
if (tmp==sim_drawing_lines)
verticesPerItem=2;
if (tmp==sim_drawing_linestrip)
verticesPerItem=1;
if (tmp==sim_drawing_triangles)
verticesPerItem=3;
if ( (tmp==sim_drawing_trianglepoints)||(tmp==sim_drawing_quadpoints)||(tmp==sim_drawing_discpoints)||(tmp==sim_drawing_cubepoints) )
{
if ((_objectType&sim_drawing_facingcamera)==0)
normalsPerItem=1;
}
if (_objectType&sim_drawing_itemcolors)
otherFloatsPerItem+=3;
if (_objectType&sim_drawing_vertexcolors)
{
if (tmp==sim_drawing_linestrip)
otherFloatsPerItem+=3;
if (tmp==sim_drawing_lines)
otherFloatsPerItem+=6;
if (tmp==sim_drawing_triangles)
otherFloatsPerItem+=9;
}
if (_objectType&sim_drawing_itemsizes)
otherFloatsPerItem+=1;
if (_objectType&sim_drawing_itemtransparency)
otherFloatsPerItem+=1;
floatsPerItem=3*verticesPerItem+3*normalsPerItem+otherFloatsPerItem;
}
bool CDrawingObject::announceObjectWillBeErased(int objID)
{
return(_sceneObjectID==objID);
}
bool CDrawingObject::announceScriptStateWillBeErased(int scriptHandle,bool simulationScript,bool sceneSwitchPersistentScript)
{
return( (!sceneSwitchPersistentScript)&&(_creatorHandle==scriptHandle) );
}
bool CDrawingObject::canMeshBeExported() const
{
int tmp=_objectType&0x001f;
return((tmp==sim_drawing_triangles)||(tmp==sim_drawing_trianglepoints)||(tmp==sim_drawing_quadpoints)||
(tmp==sim_drawing_discpoints)||(tmp==sim_drawing_cubepoints)||(tmp==sim_drawing_spherepoints));
}
void CDrawingObject::getExportableMesh(std::vector<float>& vertices,std::vector<int>& indices) const
{
vertices.clear();
indices.clear();
C7Vector tr;
tr.setIdentity();
if (_sceneObjectID>=0)
{
CSceneObject* it=App::currentWorld->sceneObjects->getObjectFromHandle(_sceneObjectID);
if (it!=nullptr)
tr=it->getCumulativeTransformation();
}
int tmp=_objectType&0x001f;
if (tmp==sim_drawing_triangles)
_exportTriangles(tr,vertices,indices);
if (tmp==sim_drawing_trianglepoints)
_exportTrianglePoints(tr,vertices,indices);
if (tmp==sim_drawing_quadpoints)
_exportQuadPoints(tr,vertices,indices);
if (tmp==sim_drawing_discpoints)
_exportDiscPoints(tr,vertices,indices);
if (tmp==sim_drawing_cubepoints)
_exportCubePoints(tr,vertices,indices);
if (tmp==sim_drawing_spherepoints)
_exportSpherePoints(tr,vertices,indices);
}
void CDrawingObject::_exportTrianglePoints(C7Vector& tr,std::vector<float>& vertices,std::vector<int>& indices) const
{
// finish this routine (and others linked to export functionality)
}
void CDrawingObject::_exportQuadPoints(C7Vector& tr,std::vector<float>& vertices,std::vector<int>& indices) const
{
// finish this routine (and others linked to export functionality)
}
void CDrawingObject::_exportDiscPoints(C7Vector& tr,std::vector<float>& vertices,std::vector<int>& indices) const
{
// finish this routine (and others linked to export functionality)
}
void CDrawingObject::_exportCubePoints(C7Vector& tr,std::vector<float>& vertices,std::vector<int>& indices) const
{
// finish this routine (and others linked to export functionality)
}
void CDrawingObject::_exportSpherePoints(C7Vector& tr,std::vector<float>& vertices,std::vector<int>& indices) const
{
// finish this routine (and others linked to export functionality)
}
void CDrawingObject::_exportTriangles(C7Vector& tr,std::vector<float>& vertices,std::vector<int>& indices) const
{
// finish this routine (and others linked to export functionality)
C3Vector v;
for (int i=0;i<int(_data.size())/floatsPerItem;i++)
{
int p=_startItem+i;
if (p>=_maxItemCount)
p-=_maxItemCount;
v.set(&_data[floatsPerItem*p+0]);
v*=tr;
v.set(&_data[floatsPerItem*p+3]);
v*=tr;
v.set(&_data[floatsPerItem*p+6]);
v*=tr;
}
}
void CDrawingObject::_exportTriOrQuad(C7Vector& tr,C3Vector* v0,C3Vector* v1,C3Vector* v2,C3Vector* v3,std::vector<float>& vertices,std::vector<int>& indices,int& nextIndex) const
{
// finish this routine (and others linked to export functionality)
v0[0]*=tr;
v1[0]*=tr;
v2[0]*=tr;
if (v3!=nullptr)
v3[0]*=tr;
}
void CDrawingObject::draw(bool overlay,bool transparentObject,int displayAttrib,const C4X4Matrix& cameraCTM)
{
if (displayAttrib&sim_displayattribute_colorcoded)
return;
EASYLOCK(_objectMutex);
if (_objectType&sim_drawing_overlay)
{
if (!overlay)
return;
}
else
{
if (overlay)
return;
}
if (!overlay)
{
if (_objectType&(sim_drawing_50percenttransparency+sim_drawing_25percenttransparency+sim_drawing_12percenttransparency+sim_drawing_itemtransparency))
{
if (!transparentObject)
return;
}
else
{
if (transparentObject)
return;
}
}
C7Vector tr;
tr.setIdentity();
if (_sceneObjectID>=0)
{
CSceneObject* it=App::currentWorld->sceneObjects->getObjectFromHandle(_sceneObjectID);
if (it==nullptr)
_sceneObjectID=-2; // should normally never happen
else
{
tr=it->getCumulativeTransformation();
if (_objectType&sim_drawing_followparentvisibility)
{
if ( ((App::currentWorld->mainSettings->getActiveLayers()&it->getVisibilityLayer())==0)&&((displayAttrib&sim_displayattribute_ignorelayer)==0) )
return; // not visible
if (it->isObjectPartOfInvisibleModel())
return; // not visible
if ( ((_objectType&sim_drawing_painttag)==0)&&(displayAttrib&sim_displayattribute_forvisionsensor) )
return; // not visible
}
else
{
if ( ((_objectType&sim_drawing_painttag)==0)&&(displayAttrib&sim_displayattribute_forvisionsensor) )
return; // not visible
}
}
}
if (_sceneObjectID==-2)
return;
displayDrawingObject(this,tr,overlay,transparentObject,displayAttrib,cameraCTM);
}
| 29.43573 | 197 | 0.643476 | [
"vector"
] |
95bc4235d03b4d13a3696da666db9c8a3143f0ba | 7,386 | hpp | C++ | src/level/chunk.hpp | rohankumardubey/minecraft-again | 87846758854750a4609e39d58c04ec4f63f3a445 | [
"MIT"
] | 514 | 2022-01-15T15:57:08.000Z | 2022-03-30T10:06:06.000Z | src/level/chunk.hpp | cdetn/minecraft-again | eb8de5951d3a019dea3749de128318b3c21c6871 | [
"MIT"
] | 6 | 2022-01-16T03:00:41.000Z | 2022-03-31T14:28:02.000Z | src/level/chunk.hpp | cdetn/minecraft-again | eb8de5951d3a019dea3749de128318b3c21c6871 | [
"MIT"
] | 71 | 2022-01-15T16:31:18.000Z | 2022-03-28T15:18:59.000Z | #ifndef LEVEL_CHUNK_HPP
#define LEVEL_CHUNK_HPP
#include "util/util.hpp"
#include "gfx/gfx.hpp"
// TODO: figure out where to declare/define things for tiles
#include "tile/tile.hpp"
namespace level {
// forward declaration from area.hpp
struct Area;
struct Chunk final : util::Tickable {
static constexpr const glm::ivec3 SIZE = glm::ivec3(16, 128, 16);
static constexpr const usize VOLUME = SIZE.x * SIZE.y * SIZE.z;
// chunk data type
typedef u64 Data;
// proxy for access to chunk data
template <typename T, usize O, usize M, usize S>
struct ChunkDataAccess final {
// proxy for access to individual element
struct Proxy {
ChunkDataAccess *parent;
Data *data;
Proxy(ChunkDataAccess *parent, const glm::ivec3 &p)
: Proxy(parent, p.x * SIZE.y * SIZE.z + p.y * SIZE.z + p.z) { }
Proxy(ChunkDataAccess *parent, usize i)
: parent(parent),
data(&(parent->chunk->data[i])) { }
Proxy(ChunkDataAccess *parent, Data *data)
: parent(parent), data(data) { }
// TODO: this is much slower than it should be due to null check
inline operator T() {
return static_cast<T>(((*this->data) & M) >> O);
}
inline Proxy &operator=(T value) {
// TODO: consider only doing this if value changes
this->parent->chunk->version++;
*this->data =
(*this->data & ~M)
| ((static_cast<Data>(value) << O) & M);
return *this;
}
};
// zeroable proxy, a little slower than a Proxy due to the null check
// will also update neighboring chunks on assignment
struct SafeProxy {
Proxy p;
glm::ivec3 pos;
SafeProxy(ChunkDataAccess *parent, Data *data)
: p(parent, data) { }
SafeProxy(ChunkDataAccess *parent, const glm::ivec3 &pos)
: p(parent, pos), pos(pos) { }
inline operator T() {
return this->p.data ? p : 0;
}
inline SafeProxy &operator=(T value) {
// TODO: consider only doing this if value changes
// update versions of neighboring chunks
auto border = Chunk::border(this->pos);
if (border) {
auto *neighbor = this->p.parent->chunk->neighbor(*border);
if (neighbor) {
neighbor->version++;
}
}
this->p = value;
return *this;
}
};
// proxy which evaluates to zero and crashes on assignment
static const inline auto ZERO = SafeProxy(nullptr, nullptr);
Chunk *chunk;
ChunkDataAccess(Chunk *chunk) : chunk(chunk) { }
inline Proxy operator[](usize index) {
return Proxy(this, index);
}
inline auto operator[](const glm::ivec3 &p) {
return Proxy(this, p);
}
inline auto safe(usize index) {
return SafeProxy(this, index);
}
inline auto safe(const glm::ivec3 &p) {
return SafeProxy(this, p);
}
static inline T from(Data d) {
return static_cast<T>((d & M) >> O);
}
};
std::array<Chunk::Data, Chunk::VOLUME> data;
Area &area;
glm::ivec3 offset, offset_tiles;
// arbitrary integer, *must* change every time chunk data is updated
// used for tracking when chunk is dirtied by external things (primarily
// the renderer)
u64 version;
// data accessors
// types are declared explicitly for easy use of their static methods
using RawData =
ChunkDataAccess<Data, 0, std::numeric_limits<Data>::max(), 64>;
using TileData =
ChunkDataAccess<TileId, 0, 0xFFFF, 16>;
RawData raw;
TileData tiles;
Chunk(Area &area, glm::ivec3 offset)
: area(area),
offset(offset),
offset_tiles(offset * SIZE),
raw(this),
tiles(this) {
std::memset(&this->data, 0, sizeof(this->data));
}
Chunk(const Chunk &other) = default;
Chunk(Chunk &&other) = default;
inline auto operator[](usize index) {
return this->raw[index];
}
inline auto operator[](glm::ivec3 p) {
return this->raw[p];
}
// retrieve neighbor in specified direction
// returns nullptr if not present
Chunk *neighbor(util::Direction d);
// retrieves data at the specified position or gets it from this chunk's
// area if out of bounds
Data or_area(const glm::ivec3 &pos);
// retrieve all chunk neighbors
// array entry is nullptr if not present
std::array<Chunk*, 6> neighbors();
void tick() override;
// utility functions
static inline bool in_bounds(const glm::ivec3 &pos) {
return pos.x >= 0
&& pos.y >= 0
&& pos.z >= 0
&& pos.x < SIZE.x
&& pos.y < SIZE.y
&& pos.z < SIZE.z;
}
// returns true if the specified position is on a chunk border
static inline bool on_border(const glm::ivec3 &pos) {
return pos.x == 0
|| pos.y == 0
|| pos.z == 0
|| pos.x == SIZE.x - 1
|| pos.y == SIZE.y - 1
|| pos.z == SIZE.z - 1;
}
// gets the border of the specified postition, nullopt if not on border
static inline std::optional<util::Direction> border(const glm::ivec3 &pos) {
if (pos.x == 0) {
return std::make_optional(util::Direction::WEST);
} else if (pos.y == 0) {
return std::make_optional(util::Direction::BOTTOM);
} else if (pos.z == 0) {
return std::make_optional(util::Direction::NORTH);
} else if (pos.x == SIZE.x - 1) {
return std::make_optional(util::Direction::EAST);
} else if (pos.y == SIZE.y - 1) {
return std::make_optional(util::Direction::TOP);
} else if (pos.z == SIZE.z - 1) {
return std::make_optional(util::Direction::SOUTH);
}
return std::nullopt;
}
};
struct ChunkRenderer final {
struct ChunkVertex {
glm::vec3 pos;
glm::vec3 normal;
glm::vec2 uv;
glm::vec4 material;
ChunkVertex() = default;
static void create_layout();
// storage in chunk_renderer.cpp
static bgfx::VertexLayout layout;
};
Chunk &chunk;
// version of the chunk (Chunk::version) when it was last meshed
usize mesh_version;
util::RDUniqueResource<bgfx::DynamicIndexBufferHandle> index_buffer;
util::RDUniqueResource<bgfx::DynamicVertexBufferHandle> vertex_buffer;
// indices separate for default/water meshes
struct {
usize num_indices, indices_start;
usize num_vertices, vertices_start;
} pass_indices[Tile::RenderPass::COUNT];
explicit ChunkRenderer(Chunk &chunk);
ChunkRenderer(const ChunkRenderer &other) = delete;
ChunkRenderer(ChunkRenderer &&other) = default;
void mesh();
void render(
Tile::RenderPass render_pass,
bgfx::ViewId view = 0, u64 render_state = 0);
};
}
#endif
| 29.426295 | 80 | 0.556458 | [
"mesh",
"render"
] |
95c91707e662e3220bb199dfb627be9bfc694fbd | 34,056 | cc | C++ | TrickFMI2/FMI2ModelBase.cc | nasa/TrickFMI | e3548fbd6611a0b3abdd6146e5d95cbd617d6cef | [
"NASA-1.3"
] | 17 | 2017-01-13T06:41:13.000Z | 2021-09-26T14:01:31.000Z | TrickFMI2/FMI2ModelBase.cc | nasa/TrickFMI | e3548fbd6611a0b3abdd6146e5d95cbd617d6cef | [
"NASA-1.3"
] | 1 | 2018-09-18T17:45:27.000Z | 2021-07-17T08:34:15.000Z | TrickFMI2/FMI2ModelBase.cc | nasa/TrickFMI | e3548fbd6611a0b3abdd6146e5d95cbd617d6cef | [
"NASA-1.3"
] | 16 | 2017-01-09T02:29:26.000Z | 2019-11-12T20:13:35.000Z | /**
@file FMI2ModelBase.cc
@ingroup FMITrickInterface
@brief Method implementations for the FMI2ModelBase class
@copyright Copyright 2017 United States Government as represented by the
Administrator of the National Aeronautics and Space Administration.
No copyright is claimed in the United States under Title 17, U.S. Code.
All Other Rights Reserved.
@revs_begin
@rev_entry{Edwin Z. Crues, NASA ER7, TrickFMI, January 2017, --, Initial version}
@revs_end
*/
/* Include file that defines dynamic load library functions. */
#include <iostream>
#include <sstream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <ftw.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <errno.h>
#include <libgen.h>
#include <dlfcn.h>
// Archive library includes.
#include <archive.h>
#include <archive_entry.h>
#include "FMI2ModelBase.hh"
extern "C" {
/*!
* @brief Remove callback function used by nftw.
*
* The is a callback function used by the UNIX nftw routine to remove files
* and directories. It is used to clean up the FMU unpack directory.
*
* @param [in] fpath Path to file to be removed.
* @param [in] sb File status structure.
* @param [in] typeflag File traversal control flags.
* @param [in] ftwbuf File traversal control structure.
*/
static int remove_callback(
const char * fpath,
const struct stat * sb,
int typeflag,
struct FTW * ftwbuf )
{
// Remove the file or directory.
int rm_status = remove( fpath );
// Report error i
if ( rm_status ) { perror( fpath ); }
return( rm_status );
}
} /* end of extern "C" { */
//! Default constructor.
TrickFMI::FMI2ModelBase::FMI2ModelBase()
: delete_unpacked_fmu(true), component(NULL), model_library(NULL)
{
/* Make sure that all the function pointers are set to NULL. */
clean_up();
/* Set the default value for the FMU unpack directory. */
unpack_dir = "unpack";
}
/*!
* @brief Pure virtual destructor.
*
* This is an implementation of the pure virtual destructor. This makes the
* FMI2ModelBase class and abstract class. This destructor provides the
* basic cleanup for the FMU handling.
*/
TrickFMI::FMI2ModelBase::~FMI2ModelBase()
{
/* Make sure that all the function pointers are set to NULL. */
clean_up();
if ( delete_unpacked_fmu ) {
// Remove the unpack directory.
if ( remove_unpack_dir() ) {
perror( "Error removing the unpack directory" );
exit(1);
}
}
}
/*!
* @brief Load an FMU.
*
* This routine loads in the FMU specified by the @ref fmu_path variable.
*/
fmi2Status TrickFMI::FMI2ModelBase::load_fmu( void )
{
/* Make sure that the FMU path has been specified. */
if ( this->fmu_path.empty() ) {
std::cerr << "Empty FMU path!" << std::endl;
return( fmi2Fatal);
}
/* Unpack the FMU. */
if ( this->unpack_fmu() != fmi2OK ) {
return( fmi2Fatal );
}
/* Process the model description file. */
std::string model_description_path;
model_description_path = this->unpack_path + "/modelDescription.xml";
if ( this->model_description.parse( model_description_path ) != fmi2OK ){
std::cerr << this->model_description.get_error() << std::endl;
return( fmi2Fatal );
}
// Check model modality.
if ( (this->modality == fmi2ModelExchange)
&& !this->model_description.model_exchange ) {
return( fmi2Fatal );
}
if ( (this->modality == fmi2CoSimulation)
&& !this->model_description.co_simulation ) {
return( fmi2Fatal );
}
/* Load the dynamic library. */
if ( this->load_library() != fmi2OK ) {
return( fmi2Fatal );
}
if ( this->bind_function_ptrs() != fmi2OK ){
return( fmi2Fatal );
}
/* Return success. */
return( fmi2OK );
}
/*!
* @brief Load an FMU.
*
* This routine loads in the FMU specified by the C style string
* passed in as an argument. Note that this will also set the
* @ref fmu_path class variable.
*
* @param [in] path A C-style string that specifies the path to the FMU.
*/
fmi2Status TrickFMI::FMI2ModelBase::load_fmu( const char * path )
{
this->fmu_path = path;
return( this->load_fmu() );
}
/*!
* @brief Load an FMU.
*
* This routine loads in the FMU specified by the C++ style string
* passed in as an argument. Note that this will also set the
* @ref fmu_path class variable.
*
* @param [in] path A C++-style string that specifies the path to the FMU.
*/
fmi2Status TrickFMI::FMI2ModelBase::load_fmu( std::string path )
{
this->fmu_path = path;
return( this->load_fmu() );
}
/*!
* @brief Unpacks the FMU.
*
* This routine finds the FMU file, creates the appropriate
* directories and unzips the archive into the expanded FMU directory
* structure. This is a prerequisite for loading the library.
*/
fmi2Status TrickFMI::FMI2ModelBase::unpack_fmu( )
{
int cwd_file_id;
struct archive * fmu;
struct archive * unpack;
struct archive_entry * entry;
const void * buff;
size_t size;
off_t offset;
int flags;
int status;
char * base_name;
char * fmu_name;
char * dot_pos;
struct stat unpack_dir_stat;
/* Select which attributes we want to restore. */
flags = ARCHIVE_EXTRACT_TIME;
flags |= ARCHIVE_EXTRACT_PERM;
flags |= ARCHIVE_EXTRACT_ACL;
flags |= ARCHIVE_EXTRACT_FFLAGS;
// Set up the FMU archive to read.
fmu = archive_read_new();
archive_read_support_filter_all( fmu );
archive_read_support_format_all( fmu );
// Set up how to write out the archive.
unpack = archive_write_disk_new();
archive_write_disk_set_options( unpack, flags );
archive_write_disk_set_standard_lookup( unpack );
// Open the FMU archive.
status = archive_read_open_filename( fmu, fmu_path.c_str(), 10240 );
if (status != ARCHIVE_OK) {
std::cerr << "Error opening FMU file: " << fmu_path << std::endl;
return( fmi2Fatal );
}
// Get current working directory.
cwd_file_id = open( ".", O_RDONLY );
if ( cwd_file_id == -1 ){
perror( "Error getting current working directory! " );
return( fmi2Fatal );
}
//
// Create the directory in which to unpack the archive.
//
// First check to make sure that the unpacking area does exist.
if ( stat( unpack_dir.c_str(), &unpack_dir_stat )
|| !S_ISDIR( unpack_dir_stat.st_mode ) ) {
std::cerr << "Unpacking area does not exist: " << unpack_dir << std::endl;
return( fmi2Fatal );
}
// Build the unpack path.
base_name = strdup( fmu_path.c_str() );
fmu_name = strdup( basename( base_name ));
dot_pos = strchr( fmu_name, '.' );
if ( dot_pos != NULL ){ *dot_pos = '\0'; }
unpack_path = unpack_dir + "/" + fmu_name;
free( base_name );
free( fmu_name );
// Check to make sure that the directory doesn't already exist.
if ( stat( unpack_path.c_str(), &unpack_dir_stat ) == 0 ){
std::cerr << "FMU unpacking directory already exists: " << unpack_path << std::endl;
return( fmi2Fatal );
}
else {
if ( errno != ENOENT ){
perror( "Error associated with unpack directory" );
return( fmi2Fatal );
}
}
// Create the unpack directory.
if ( mkdir( unpack_path.c_str(), 0000755 ) ) {
std::cerr << "Error creating the unpack directory: " << unpack_path << std::endl;
perror( "Error creating the unpack directory" );
return( fmi2Fatal );
}
// Move to the newly created directory.
if ( chdir( unpack_path.c_str() ) ) {
std::cerr << "Error moving into the unpack directory: " << unpack_path << std::endl;
perror( "Error moving into the unpack directory" );
return( fmi2Fatal );
}
// Read the next header in the FMU archive.
status = archive_read_next_header( fmu, &entry );
// Loop through writing out the data and reading the next header.
while ( (status != ARCHIVE_EOF)
&& ((status == ARCHIVE_OK) || (status == ARCHIVE_WARN)) ) {
// Print out message if everything is not ARCHIVE_OK.
if ( status < ARCHIVE_OK ) {
fprintf( stderr, "%s\n", archive_error_string( fmu ) );
}
status = archive_write_header( unpack, entry );
if ( status < ARCHIVE_OK ){
fprintf( stderr, "%s\n", archive_error_string( unpack ) );
}
else if ( archive_entry_size( entry ) > 0 ) {
// Read the next data block.
status = archive_read_data_block( fmu, &buff, &size, &offset );
if ( status < ARCHIVE_OK ) {
fprintf( stderr, "%s\n", archive_error_string(unpack) );
}
// Loop through the data blocks.
while ( (status != ARCHIVE_EOF)
&& ((status == ARCHIVE_OK) || (status == ARCHIVE_WARN)) ) {
// Write the data block.
status = archive_write_data_block( unpack, buff, size, offset );
if ( status < ARCHIVE_OK ) {
fprintf( stderr, "%s\n", archive_error_string(unpack) );
}
if ( status < ARCHIVE_WARN ) {
continue;
}
// Read the next data block.
status = archive_read_data_block( fmu, &buff, &size, &offset );
}
// If ARCHIVE_EOF of archive entry then mark as ARCHIVE_OK.
if ( status == ARCHIVE_EOF ){ status = ARCHIVE_OK; }
if ( status < ARCHIVE_OK ) {
fprintf( stderr, "%s\n", archive_error_string( unpack ) );
}
}
status = archive_write_finish_entry( unpack );
if ( status < ARCHIVE_OK ) {
fprintf( stderr, "%s\n", archive_error_string( unpack ) );
}
// Read the next header in the FMU archive.
status = archive_read_next_header( fmu, &entry );
} // End of while loop.
// Check for error.
if ( status < ARCHIVE_WARN ) {
fprintf( stderr, "%s\n", archive_error_string( fmu ) );
}
// Close the archive unpack object.
archive_write_close( unpack );
archive_write_free( unpack );
// Check for error.
if ( status < ARCHIVE_WARN ) {
fprintf( stderr, "%s\n", archive_error_string( fmu ) );
}
// Close the archive file.
archive_read_close(fmu);
archive_read_free(fmu);
// Check for error.
if ( status < ARCHIVE_WARN ) {
fprintf( stderr, "%s\n", archive_error_string( fmu ) );
return( fmi2Fatal );
}
// Move back into the original current working directory.
if ( (fchdir( cwd_file_id ) == -1)
|| (close( cwd_file_id ) == -1) ) {
perror( "Error moving back to the original directory" );
return( fmi2Fatal );
}
/* Return success. */
return( fmi2OK );
}
/*!
* @brief Remove the unpack directory.
*
* This routine removes the directory in which the FMU was unpacked.
*/
fmi2Status TrickFMI::FMI2ModelBase::remove_unpack_dir( )
{
struct stat unpack_dir_stat;
if ( stat( unpack_path.c_str(), &unpack_dir_stat ) == 0 ){
std::cout << "Removing unpacking path: " << unpack_path << std::endl;
if ( nftw( unpack_path.c_str(), remove_callback, 64, FTW_DEPTH | FTW_PHYS ) ) {
return( fmi2Error);
}
}
return( fmi2OK );
}
/*!
* @brief Load in the FMU shared/dynamic libraries.
*
* This routine loads in the shared or dynamic libraries that are
* unpacked by unpack_fmu().
*/
fmi2Status TrickFMI::FMI2ModelBase::load_library()
{
std::stringstream path;
struct stat library_stat;
//
// Construct the path to the library.
//
// Make sure that the unpack path has been set.
if ( this->unpack_path.empty() ){
std::cerr << "Error, empty unpack path!" << std::endl;
return( fmi2Fatal );
}
// Determine the architecture.
#if defined(__linux__)
this->architecture = "linux64";
#elif defined(__APPLE__) && defined(__MACH__)
this->architecture = "darwin64";
#endif
// Construct the path to the library.
path << this->unpack_path << "/binaries/" << this->architecture << "/"
<< this->model_description.model_name;
if ( this->architecture == "darwin64" ) {
path << ".dylib";
}
else if ( this->architecture == "linux64" ) {
path << ".so";
}
else {
std::cerr << "Unsupported architecture: " << architecture << std::endl;
return( fmi2Fatal );
}
this->library_path = path.str();
// Make sure that the library path is set.
if ( this->library_path.empty() ){
std::cerr << "Error, empty library path!" << std::endl;
return( fmi2Fatal );
}
// Check to make sure the library exists.
if ( stat( this->library_path.c_str(), &library_stat )
|| !S_ISREG( library_stat.st_mode ) ) {
std::cerr << "Library does not exist: " << library_path << std::endl;
return( fmi2Fatal );
}
//
// Load the library.
//
model_library = dlopen( library_path.c_str(), RTLD_NOW );
if ( model_library == NULL ){
std::cerr << "Error loading library: " << library_path << std::endl;
std::cerr << " \"" << dlerror() << "\"" << std::endl;
return( fmi2Fatal );
}
return( fmi2OK );
}
/*!
* @brief Bind a specific FMU function.
*
* Helper function to bind a function from an open dynamic library. The
* function name has to exactly match a name in the dynamic library.
*
* @return Function pointer to function in dynamic library. This routine
* returns a NULL pointer if the function is not found.
* @param [in] model_library Pointer to open FMU dynamic library.
* @param [in] function_name Name of function in FMU dynamic library.
*/
void * TrickFMI::FMI2ModelBase::bind_function_ptr(
void * model_library,
const char * function_name )
{
void * function_ptr;
if ( model_library == NULL ){ return( NULL ); }
function_ptr = dlsym( model_library, function_name );
if ( function_ptr == NULL ) {
std::cerr << "Error binding to function: " << function_name << std::endl;
std::cerr << " \"" << dlerror() << "\"" << std::endl;
}
return( function_ptr );
}
/*!
* @brief Bind all the internal FMI2 function pointers.
*
* This routine binds the class internal FMI2 function pointers to the
* actual function implementations in the FMU shared or dynamic library.
*
* @return Success or failure of binding all functions.
* - @ref fmi2OK if all functions bind successfully It returns
* - @ref fmi2Fatal if any one of the functions fails to bind.
*
* On failure, all the internal FMI2 function pointers are reset to NULL.
*/
fmi2Status TrickFMI::FMI2ModelBase::bind_function_ptrs()
{
bool bind_error = false;
/* Bind all the required function pointers. */
get_types_platform = (fmi2GetTypesPlatformTYPE*)bind_function_ptr( model_library, "fmi2GetTypesPlatform" );
if ( get_types_platform == NULL ){ bind_error = true; }
get_version = (fmi2GetVersionTYPE*)bind_function_ptr( model_library, "fmi2GetVersion" );
if ( get_version == NULL ){ bind_error = true; }
set_debug_logging = (fmi2SetDebugLoggingTYPE*)bind_function_ptr( model_library, "fmi2SetDebugLogging" );
if ( set_debug_logging == NULL ){ bind_error = true; }
instantiate = (fmi2InstantiateTYPE*)bind_function_ptr( model_library, "fmi2Instantiate" );
if ( instantiate == NULL ){ bind_error = true; }
free_instance = (fmi2FreeInstanceTYPE*)bind_function_ptr( model_library, "fmi2FreeInstance" );
if ( free_instance == NULL ){ bind_error = true; }
setup_experiment = (fmi2SetupExperimentTYPE*)bind_function_ptr( model_library, "fmi2SetupExperiment" );
if ( setup_experiment == NULL ){ bind_error = true; }
enter_initialization_mode = (fmi2EnterInitializationModeTYPE*)bind_function_ptr( model_library, "fmi2EnterInitializationMode" );
if ( enter_initialization_mode == NULL ){ bind_error = true; }
exit_initialization_mode = (fmi2ExitInitializationModeTYPE*)bind_function_ptr( model_library, "fmi2ExitInitializationMode" );
if ( exit_initialization_mode == NULL ){ bind_error = true; }
terminate = (fmi2TerminateTYPE*)bind_function_ptr( model_library, "fmi2Terminate" );
if ( terminate == NULL ){ bind_error = true; }
reset = (fmi2ResetTYPE*)bind_function_ptr( model_library, "fmi2Reset" );
if ( reset == NULL ){ bind_error = true; }
get_real = (fmi2GetRealTYPE*)bind_function_ptr( model_library, "fmi2GetReal" );
if ( get_real == NULL ){ bind_error = true; }
get_integer = (fmi2GetIntegerTYPE*)bind_function_ptr( model_library, "fmi2GetInteger" );
if ( get_integer == NULL ){ bind_error = true; }
get_boolean = (fmi2GetBooleanTYPE*)bind_function_ptr( model_library, "fmi2GetBoolean" );
if ( get_boolean == NULL ){ bind_error = true; }
get_string = (fmi2GetStringTYPE*)bind_function_ptr( model_library, "fmi2GetString" );
if ( get_string == NULL ){ bind_error = true; }
set_real = (fmi2SetRealTYPE*)bind_function_ptr( model_library, "fmi2SetReal" );
if ( set_real == NULL ){ bind_error = true; }
set_integer = (fmi2SetIntegerTYPE*)bind_function_ptr( model_library, "fmi2SetInteger" );
if ( set_integer == NULL ){ bind_error = true; }
set_boolean = (fmi2SetBooleanTYPE*)bind_function_ptr( model_library, "fmi2SetBoolean" );
if ( set_boolean == NULL ){ bind_error = true; }
set_string = (fmi2SetStringTYPE*)bind_function_ptr( model_library, "fmi2SetString" );
if ( set_string == NULL ){ bind_error = true; }
get_fmu_state = (fmi2GetFMUstateTYPE*)bind_function_ptr( model_library, "fmi2GetFMUstate" );
if ( get_fmu_state == NULL ){ bind_error = true; }
set_fmu_state = (fmi2SetFMUstateTYPE*)bind_function_ptr( model_library, "fmi2SetFMUstate" );
if ( set_fmu_state == NULL ){ bind_error = true; }
free_fmu_state = (fmi2FreeFMUstateTYPE*)bind_function_ptr( model_library, "fmi2FreeFMUstate" );
if ( free_fmu_state == NULL ){ bind_error = true; }
serialized_fmu_state_size = (fmi2SerializedFMUstateSizeTYPE*)bind_function_ptr( model_library, "fmi2SerializedFMUstateSize" );
if ( serialized_fmu_state_size == NULL ){ bind_error = true; }
serialize_fmu_state = (fmi2SerializeFMUstateTYPE*)bind_function_ptr( model_library, "fmi2SerializeFMUstate" );
if ( serialize_fmu_state == NULL ){ bind_error = true; }
deserialize_fmu_state = (fmi2DeSerializeFMUstateTYPE*)bind_function_ptr( model_library, "fmi2DeSerializeFMUstate" );
if ( deserialize_fmu_state == NULL ){ bind_error = true; }
get_directional_derivative = (fmi2GetDirectionalDerivativeTYPE*)bind_function_ptr( model_library, "fmi2GetDirectionalDerivative" );
if ( get_directional_derivative == NULL ){ bind_error = true; }
/* Check for function pointer binding error. */
if ( bind_error ) {
this->clean_up();
return( fmi2Fatal );
}
return( fmi2OK );
}
/*!
* @brief Cleanup the internal state of the FMI2 model.
*
* This routine resets at the internal FMI2 function pointers to NULL. It
* also closes the FMU model library if it hasn't already been closed.
*/
void TrickFMI::FMI2ModelBase::clean_up()
{
/* Set function pointers to NULL. */
get_types_platform = NULL;
get_version = NULL;
set_debug_logging = NULL;
instantiate = NULL;
free_instance = NULL;
setup_experiment = NULL;
enter_initialization_mode = NULL;
exit_initialization_mode = NULL;
terminate = NULL;
reset = NULL;
get_real = NULL;
get_integer = NULL;
get_boolean = NULL;
get_string = NULL;
set_real = NULL;
set_integer = NULL;
set_boolean = NULL;
set_string = NULL;
get_fmu_state = NULL;
set_fmu_state = NULL;
free_fmu_state = NULL;
serialized_fmu_state_size = NULL;
serialize_fmu_state = NULL;
deserialize_fmu_state = NULL;
get_directional_derivative = NULL;
/* Close the model's dynamically loaded library. */
if ( model_library != NULL ){
dlclose( model_library );
model_library = NULL;
}
return;
}
/*!
* @brief Get the platform specific types indicator for this FMU.
*
* @return Returns the string to indicate the specific types used on this
* platform.
*/
const char * TrickFMI::FMI2ModelBase::fmi2GetTypesPlatform( void )
{
/* Call the C FMU method if loaded. */
if ( get_types_platform != NULL ) {
return( get_types_platform() );
}
return( NULL );
}
/*!
* @brief Get the FMI version for this FMU.
*
* @return Returns the FMI version string corresponding to this FMU.
*/
const char * TrickFMI::FMI2ModelBase::fmi2GetVersion( void )
{
/* Call the C FMU method if loaded. */
if ( get_version != NULL ) {
return( get_version() );
}
return( NULL );
}
/*!
* @brief Instantiate the FMU model.
*
* @param [in] instanceName Name for this FMU model instance.
* @param [in] fmuType FMU model modality (fmi2ModelExchange or fmi2CoSimulation).
* @param [in] fmuGUID FMU model Global Unique IDentifier.
* @param [in] fmuResourceLocation URI location of additional FMU resources.
* @param [in] functions Callback service functions from environment.
* @param [in] visible Flag to enable user visibility.
* @param [in] loggingOn Flag to enable debug logging.
*/
fmi2Component TrickFMI::FMI2ModelBase::fmi2Instantiate(
fmi2String instanceName,
fmi2Type fmuType,
fmi2String fmuGUID,
fmi2String fmuResourceLocation,
const fmi2CallbackFunctions * functions,
fmi2Boolean visible,
fmi2Boolean loggingOn )
{
/* Call the C FMU method if loaded. */
if ( instantiate != NULL ) {
component = instantiate( instanceName, fmuType, fmuGUID,
fmuResourceLocation, functions,
visible, loggingOn );
return( component );
}
return( NULL );
}
/*!
* @brief Free up the FMU model instance and its' resources.
*/
void TrickFMI::FMI2ModelBase::fmi2FreeInstance( void )
{
/* Call the C FMU method if loaded. */
if ( free_instance != NULL ) {
free_instance( component );
}
return;
}
/*!
* @brief Set the debug logging level for the FMU model.
*
* @param [in] loggingOn Flag to enable or disable FMU model logging.
* @param [in] nCategories Number of categories in the logging category vector.
* @param [in] categories Vector of names of logging categories to set.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2SetDebugLogging(
fmi2Boolean loggingOn,
size_t nCategories,
const fmi2String categories[] )
{
/* Call the C FMU method if loaded. */
if ( set_debug_logging != NULL ) {
return( set_debug_logging( component, loggingOn, nCategories, categories) );
}
return( fmi2Fatal );
}
/*!
* @brief Set up the FMU model experiment.
*
* @param [in] toleranceDefined Flag to indicate a tolerance is set.
* @param [in] tolerance FMU model tolerance value.
* @param [in] startTime FMU model instance start time.
* @param [in] stopTimeDefined Flag to indicate that a stop time is set.
* @param [in] stopTime FMU model instance stop time
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2SetupExperiment(
fmi2Boolean toleranceDefined,
fmi2Real tolerance,
fmi2Real startTime,
fmi2Boolean stopTimeDefined,
fmi2Real stopTime)
{
/* Call the C FMU method if loaded. */
if ( setup_experiment != NULL ) {
return( setup_experiment( component, toleranceDefined, tolerance,
startTime, stopTimeDefined, stopTime ) );
}
return( fmi2Fatal );
}
/*!
* @brief Enter the FMU model's initialization mode.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2EnterInitializationMode( void )
{
/* Call the C FMU method if loaded. */
if ( enter_initialization_mode != NULL ) {
return( enter_initialization_mode( component ) );
}
return( fmi2Fatal );
}
/*!
* @brief Exit the FMU model's initialization mode.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2ExitInitializationMode( void )
{
/* Call the C FMU method if loaded. */
if ( exit_initialization_mode != NULL ) {
return( exit_initialization_mode( component ) );
}
return( fmi2Fatal );
}
/*!
* @brief Terminate the FMU model.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2Terminate( void )
{
/* Call the C FMU method if loaded. */
if ( terminate != NULL ) {
return( terminate( component ) );
}
return( fmi2Fatal );
}
/*!
* @brief Reset the FMU model.
*
* Is called by the environment to reset the FMU after a simulation run.
* The FMU goes into the same state as if fmi2Instantiate would have been
* called. All variables have their default values. Before starting a new
* run, @ref fmi2SetupExperiment and @ref fmi2EnterInitializationMode have
* to be called.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2Reset( void )
{
/* Call the C FMU method if loaded. */
if ( reset != NULL ) {
return( reset( component ) );
}
return( fmi2Fatal );
}
/*!
* @brief Get real values from the FMU model.
*
* @param [in] vr Vector of reference to FMU model real values.
* @param [in] nvr Number of reference in the real value reference list.
* @param [out] value Vector of values that correspond to the references.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2GetReal(
const fmi2ValueReference vr[],
size_t nvr,
fmi2Real value[] )
{
/* Call the C FMU method if loaded. */
if ( get_real != NULL ) {
return( get_real( component, vr, nvr, value ) );
}
return( fmi2Fatal );
}
/*!
* @brief Get integer values from the FMU model.
*
* @param [in] vr Vector of reference to FMU model integer values.
* @param [in] nvr Number of reference in the integer value reference list.
* @param [out] value Vector of values that correspond to the references.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2GetInteger(
const fmi2ValueReference vr[],
size_t nvr,
fmi2Integer value[] )
{
/* Call the C FMU method if loaded. */
if ( get_integer != NULL ) {
return( get_integer( component, vr, nvr, value ) );
}
return( fmi2Fatal );
}
/*!
* @brief Get boolean values from the FMU model.
*
* @param [in] vr Vector of reference to FMU model boolean values.
* @param [in] nvr Number of reference in the boolean value reference list.
* @param [out] value Vector of values that correspond to the references.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2GetBoolean(
const fmi2ValueReference vr[],
size_t nvr,
fmi2Boolean value[] )
{
/* Call the C FMU method if loaded. */
if ( get_boolean != NULL ) {
return( get_boolean( component, vr, nvr, value ) );
}
return( fmi2Fatal );
}
/*!
* @brief Get string values from the FMU model.
*
* @param [in] vr Vector of reference to FMU model string values.
* @param [in] nvr Number of reference in the string value reference list.
* @param [out] value Vector of values that correspond to the references.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2GetString(
const fmi2ValueReference vr[],
size_t nvr,
fmi2String value[] )
{
/* Call the C FMU method if loaded. */
if ( get_string != NULL ) {
return( get_string( component, vr, nvr, value ) );
}
return( fmi2Fatal );
}
/*!
* @brief Set real values for the FMU model.
*
* @param [in] vr Vector of reference to FMU model real values.
* @param [in] nvr Number of reference in the real value reference list.
* @param [in] value Vector of values that correspond to the references.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2SetReal(
const fmi2ValueReference vr[],
size_t nvr,
const fmi2Real value[] )
{
/* Call the C FMU method if loaded. */
if ( set_real != NULL ) {
return( set_real( component, vr, nvr, value ) );
}
return( fmi2Fatal );
}
/*!
* @brief Set integer values for the FMU model.
*
* @param [in] vr Vector of reference to FMU model integer values.
* @param [in] nvr Number of reference in the integer value reference list.
* @param [in] value Vector of values that correspond to the references.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2SetInteger(
const fmi2ValueReference vr[],
size_t nvr,
const fmi2Integer value[] )
{
/* Call the C FMU method if loaded. */
if ( set_integer != NULL ) {
return( set_integer( component, vr, nvr, value ) );
}
return( fmi2Fatal );
}
/*!
* @brief Set boolean values for the FMU model.
*
* @param [in] vr Vector of reference to FMU model boolean values.
* @param [in] nvr Number of reference in the boolean value reference list.
* @param [in] value Vector of values that correspond to the references.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2SetBoolean(
const fmi2ValueReference vr[],
size_t nvr,
const fmi2Boolean value[] )
{
/* Call the C FMU method if loaded. */
if ( set_boolean != NULL ) {
return( set_boolean( component, vr, nvr, value ) );
}
return( fmi2Fatal );
}
/*!
* @brief Set string values for the FMU model.
*
* @param [in] vr Vector of reference to FMU model string values.
* @param [in] nvr Number of reference in the real string reference list.
* @param [in] value Vector of values that correspond to the references.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2SetString(
const fmi2ValueReference vr[],
size_t nvr,
const fmi2String value[] )
{
/* Call the C FMU method if loaded. */
if ( set_string != NULL ) {
return( set_string( component, vr, nvr, value ) );
}
return( fmi2Fatal );
}
/*!
* @brief Get the current state of an FMU model.
*
* @param [out] FMUstate Pointer to location in which to load FMU state.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2GetFMUstate(
fmi2FMUstate * FMUstate )
{
/* Call the C FMU method if loaded. */
if ( get_fmu_state != NULL ) {
return( get_fmu_state( component, FMUstate ) );
}
return( fmi2Fatal );
}
/*!
* @brief Set the current state of an FMU model.
*
* @param [in] FMUstate Previously saved FMU state to set in FMU model.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2SetFMUstate(
fmi2FMUstate FMUstate )
{
/* Call the C FMU method if loaded. */
if ( set_fmu_state != NULL ) {
return( set_fmu_state( component, FMUstate ) );
}
return( fmi2Fatal );
}
/*!
* @brief Free an FMU state.
*
* @param [inout] FMUstate Pointer to a previously saved FMU model state to free.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2FreeFMUstate(
fmi2FMUstate * FMUstate )
{
/* Call the C FMU method if loaded. */
if ( free_fmu_state != NULL ) {
return( free_fmu_state( component, FMUstate ) );
}
return( fmi2Fatal );
}
/*!
* @brief Get the size of the serialized FMU state.
*
* @param [in] FMUstate FMU model state to size.
* @param [out] size Pointer to the size of the corresponding serialized FMU state.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2SerializedFMUstateSize(
fmi2FMUstate FMUstate,
size_t * size )
{
/* Call the C FMU method if loaded. */
if ( serialized_fmu_state_size != NULL ) {
return( serialized_fmu_state_size( component, FMUstate, size ) );
}
return( fmi2Fatal );
}
/*!
* @brief Serialize an FMU state.
*
* @param [in] FMUstate FMU model state to serialize.
* @param [out] serializedState Pointer to a byte array for storing the serialized FMU state.
* @param [in] size Size of the corresponding byte array.
*
* The byte vector serializedState of length size, that must be
* provided by the environment.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2SerializeFMUstate(
fmi2FMUstate FMUstate,
fmi2Byte serializedState[],
size_t size )
{
/* Call the C FMU method if loaded. */
if ( serialize_fmu_state != NULL ) {
return( serialize_fmu_state( component, FMUstate, serializedState, size ) );
}
return( fmi2Fatal );
}
/*!
* @brief Deserialize an FMU state.
*
* @param [in] serializedState Pointer to a byte array containing the serialized FMU state.
* @param [in] size Size of the byte array containing the serialized FMU state.
* @param [out] FMUstate Pointer to FMU model state in which to deserialize.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2DeSerializeFMUstate(
const fmi2Byte serializedState[],
size_t size,
fmi2FMUstate * FMUstate )
{
/* Call the C FMU method if loaded. */
if ( deserialize_fmu_state != NULL ) {
return( deserialize_fmu_state( component, serializedState, size, FMUstate ) );
}
return( fmi2Fatal );
}
/*!
* @brief Get the partial derivatives for the FMU model.
*
* @param [in] vUnknown_ref Vector of unknown Real variables.
* @param [in] nUnknown Number of unknowns in the unknowns vector.
* @param [in] vKnown_ref Vector of real input variables of function that changes its value.
* @param [in] nKnown Number of knowns in the knowns vector.
* @param [in] dvKnown Seed vector of known directional derivatives.
* @param [out] dvUnknown Vector of unknown directional derivatives.
*/
fmi2Status TrickFMI::FMI2ModelBase::fmi2GetDirectionalDerivative(
const fmi2ValueReference vUnknown_ref[],
size_t nUnknown,
const fmi2ValueReference vKnown_ref[],
size_t nKnown,
const fmi2Real dvKnown[],
fmi2Real dvUnknown[] )
{
/* Call the C FMU method if loaded. */
if ( get_directional_derivative != NULL ) {
return( get_directional_derivative( component,
vUnknown_ref, nUnknown,
vKnown_ref, nKnown,
dvKnown, dvUnknown ) );
}
return( fmi2Fatal );
}
| 30.598383 | 134 | 0.652073 | [
"object",
"vector",
"model"
] |
95c9acec789dbe7fad8509bf197f0e36d20b2cee | 7,712 | cpp | C++ | local/etc/format-links.cpp | quotecenter/documentation-1 | f365703264761aa2b19d5d1d8ec55a3a6082ef4d | [
"BSD-3-Clause"
] | null | null | null | local/etc/format-links.cpp | quotecenter/documentation-1 | f365703264761aa2b19d5d1d8ec55a3a6082ef4d | [
"BSD-3-Clause"
] | null | null | null | local/etc/format-links.cpp | quotecenter/documentation-1 | f365703264761aa2b19d5d1d8ec55a3a6082ef4d | [
"BSD-3-Clause"
] | null | null | null | // TODO fix code block parsing (any number of backticks > 3, 4-space indent, etc)
#include <algorithm>
#include <fstream>
#include <iostream>
#include <sstream>
#include <unordered_map>
#include <vector>
#define TRY_OR_ERR(cmd) do { \
err = cmd; \
if (err) { \
return err; \
} \
} while (0);
using namespace std;
enum State {
ST_DEFAULT,
ST_NONLINKDEF,
ST_LINKDEF,
ST_CODEBLOCK
};
struct context {
vector<string> refs;
unordered_map<string, string> lookup;
};
vector<string> shortcodes;
vector<struct context> context_stack;
enum State cur = ST_DEFAULT;
int next(istream &in, char c);
void trim_href(string &href) {
if ('/' == href.back()) {
href.pop_back();
}
}
void get_shortcodes(const string list) {
shortcodes.clear();
istringstream iss(list);
string substr;
while(iss.good()) {
iss >> substr;
shortcodes.push_back(substr);
}
}
void output_link_defs(struct context &ctx) {
for (unsigned i = 0; i < ctx.refs.size(); ++i) {
cout << '[' << i + 1 << "]: " << ctx.lookup[ctx.refs[i]] << endl;
}
}
bool closable_shortcode(const string name) {
return find(shortcodes.begin(), shortcodes.end(), name) != shortcodes.end();
}
void add_and_print_ref(string ref) {
vector<string> &refs = context_stack.back().refs;
vector<string>::iterator it = find(refs.begin(), refs.end(), ref);
if (refs.end() == it) {
refs.push_back(ref);
cout << '[' << refs.size() << ']';
} else {
cout << '[' << distance(refs.begin(), it) + 1 << ']';
}
}
int try_shortcode(istream &in) {
int err = 0;
char c = in.get();
if ('{' != c) {
cout << '{';
TRY_OR_ERR(next(in, c));
return 0;
}
c = in.get();
if ('<' != c && '%' != c) {
cout << "{{" << c;
return 0;
}
char open_delim = c;
char close_delim = ('<' == c) ? '>' : '%';
bool is_closing = false;
string name;
// TODO check for EOF
in >> c;
if ('/' == c) {
is_closing = true;
} else {
in.putback(c);
}
in >> name;
string args;
while ((EOF != (c = in.get())) && close_delim != c) {
args.push_back(c);
}
if (EOF == c) {
cerr << "Error: unfinished shortcode, reached EOF" << endl;
return 1;
}
char tmp;
in >> c >> tmp;
if ('}' != c && '}' != tmp) {
cerr << "Error: unfinished shortcode, no closing }} found" << endl;
return 1;
}
if (is_closing) {
struct context ctx = context_stack.back();
context_stack.pop_back();
output_link_defs(ctx);
} else if (closable_shortcode(name)) {
struct context ctx = {};
context_stack.push_back(ctx);
}
// output the shortcode tag
cout << "{{" << open_delim << ' ';
cout << (is_closing ? "/" : "") << name;
cout << args << close_delim << "}}";
return 0;
}
int parse_inline(istream &in, string &href) {
char c;
while ((EOF != (c = in.get())) && (')' != c)) {
href.push_back(c);
}
// TODO warning
if (EOF == c) {
cout << '(' << href;
return 0;
}
return 0;
}
int try_inline(istream &in) {
int err = 0;
char c = in.get();
if ('#' == c || '?' == c) {
cout << '(' << c;
return 0;
}
string href;
href.push_back(c);
TRY_OR_ERR(parse_inline(in, href));
trim_href(href);
add_and_print_ref(href);
context_stack.back().lookup[href] = href;
return 0;
}
int try_ref(istream &in, string link_text) {
string ref;
char c;
while ((EOF != (c = in.get())) && ']' != c) {
ref.push_back(c);
}
// TODO warning here
if (EOF == c) {
cout << '[' << ref;
return 0;
}
if (ref.empty()) {
add_and_print_ref(link_text);
} else {
add_and_print_ref(ref);
}
return 0;
}
int try_ref_or_def(istream &in) {
string buf;
char c;
int err = 0;
while ((EOF != (c = in.get())) && ']' != c) {
buf.push_back(c);
}
if (EOF == c) {
cout << '[' << buf;
return 0;
}
c = in.get();
// link defs are only allowed at the beginning of the line
if (':' != c) {
cur = ST_NONLINKDEF;
}
switch (c) {
case '[':
// link ref
cout << '[' << buf << ']';
TRY_OR_ERR(try_ref(in, buf));
break;
case '(':
// inline link
cout << '[' << buf << ']';
TRY_OR_ERR(try_inline(in));
break;
case ':': {
// link definitions can only be at the start of the line
if (ST_NONLINKDEF == cur) {
cout << '[' << buf << "]:";
return 0;
}
string href;
in >> href;
if (href.empty()) {
cerr << "ERROR: empty link definition" << endl;
return 1;
}
trim_href(href);
context_stack.back().lookup[buf] = href;
cur = ST_LINKDEF;
break;
}
// didn't match any of the above, output and continue
case EOF:
cout << '[' << buf << ']';
break;
default:
cout << '[' << buf << ']' << c;
break;
}
return 0;
}
int next(istream &in, char c) {
int err = 0;
switch (cur) {
case ST_CODEBLOCK:
cout.put(c);
if ('`' == c) {
cur = ST_NONLINKDEF;
}
break;
default:
if ('[' == c) {
return try_ref_or_def(in);
}
// link defs can be indented
if (!isspace(c)) {
cur = ST_NONLINKDEF;
}
if ('{' == c) {
TRY_OR_ERR(try_shortcode(in));
} else if ('`' == c) {
cout.put(c);
cur = ST_CODEBLOCK;
} else {
cout.put(c);
}
break;
}
return 0;
}
int main(int argc, char *argv[]) {
int err = 0;
ifstream infile(argv[1]);
if (!infile.good()) {
cerr << "Error: can't read file " << argv[1] << endl;
return 1;
}
if (argc > 2) {
get_shortcodes(argv[2]);
}
// start off with the top level context
struct context top_ctx = {};
context_stack.push_back(top_ctx);
string line;
istringstream iss;
while(getline(infile, line)) {
iss.str(line);
iss.clear();
char c;
while (EOF != (c = iss.get())) {
TRY_OR_ERR(next(iss, c));
}
// fully consume the line (including newline) if we found a link definition
if (ST_LINKDEF != cur) {
cout << endl;
}
// don't reset state while in a codeblock
if (ST_CODEBLOCK != cur) {
cur = ST_DEFAULT;
}
}
infile.close();
if (ST_DEFAULT != cur) {
cerr << "Error: finished reading file, but ended up on non-default state: " << cur << endl;
return 1;
}
// merge all remaining trailing contexts into the global context
struct context global = {};
for (vector<struct context>::iterator it = context_stack.begin();
it != context_stack.end();
++it) {
global.refs.insert(global.refs.end(), it->refs.begin(), it->refs.end());
global.lookup.insert(it->lookup.begin(), it->lookup.end());
}
// output the global list of linkdefs
output_link_defs(global);
}
| 22.353623 | 99 | 0.476141 | [
"vector"
] |
95cadfa1d2059846d5b64dd3a2000078fa4285f3 | 15,214 | cpp | C++ | src/libraries/KIRK/Utils/DS_Visualizer.cpp | lucashilbig/BA_Pathtracing_Fur | bed01d44ef93ff674436e002c82cb8c4663e2832 | [
"MIT"
] | null | null | null | src/libraries/KIRK/Utils/DS_Visualizer.cpp | lucashilbig/BA_Pathtracing_Fur | bed01d44ef93ff674436e002c82cb8c4663e2832 | [
"MIT"
] | null | null | null | src/libraries/KIRK/Utils/DS_Visualizer.cpp | lucashilbig/BA_Pathtracing_Fur | bed01d44ef93ff674436e002c82cb8c4663e2832 | [
"MIT"
] | null | null | null | #include "DS_Visualizer.h"
#include "../CPU/CPU_Datastructures/CPU_BVH.h"
#include "../CPU/CPU_Datastructures/CPU_KD.h"
#include "../CPU/CPU_Datastructures/Octree.h"
#include "../CPU/CPU_Datastructures/UniformGrid.h"
namespace KIRK {
const char *Visualizer::cDrawShaders[2] = {SHADERS_PATH "/OCL_ParticleSystem/ocl_ps.vert",
SHADERS_PATH "/OCL_ParticleSystem/ocl_ps.frag"};
const char *Visualizer::cMixShaders[2] = {SHADERS_PATH "/Examples/screenFill.vert",
SHADERS_PATH "/Mix/mix_textures.frag"};
Visualizer::Visualizer(int width, int height) :
m_fbo(CVK::FBO(width, height, 1, false)),
m_draw_shader(CVK::ShaderMinimal(VERTEX_SHADER_BIT | FRAGMENT_SHADER_BIT, cDrawShaders)),
m_mix_shader(CVK::ShaderMixTextures(VERTEX_SHADER_BIT | FRAGMENT_SHADER_BIT, cMixShaders))
{
glGenVertexArrays(1, &m_vao);
glGenBuffers(1, &m_vbo);
}
Visualizer::~Visualizer()
{
glDeleteBuffers(1, &m_vbo);
glDeleteVertexArrays(1, &m_vao);
}
void Visualizer::blendBoxes(unsigned int rendered_image)
{
m_fbo.bind();
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
render();
m_fbo.unbind();
m_mix_shader.useProgram();
m_mix_shader.setTextureInput(0, rendered_image);
m_mix_shader.setTextureInput(1, m_fbo.getColorTexture(0));
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
m_mix_shader.update();
m_mix_shader.render();
}
void Visualizer::resize(int width, int height)
{
m_fbo.resize(width, height);
}
template<typename T>
TreeVisualizerBase<T>::TreeVisualizerBase(int width, int height, const T &root) :
Visualizer(width, height),
m_root(root)
{
}
template<typename T>
TreeVisualizerBase<T>::~TreeVisualizerBase()
{
}
template<typename T>
void TreeVisualizerBase<T>::render()
{
CVK::State::getInstance()->setShader(&m_draw_shader); // Simple shader, mvp and red color
m_draw_shader.update();
glBindVertexArray(m_vao);
glDrawArrays(GL_LINES, 0,
m_aabb.size()); // Each bounding box has 8 defining coordinates, render lines connecting them, forming a box
}
template<typename T>
void TreeVisualizerBase<T>::addToBuffer(const glm::vec3 &bmin, const glm::vec3 &bmax)
{
const glm::vec4 a(bmin.x, bmin.y, bmax.z, 1.0f);
const glm::vec4 b(bmin.x, bmax.y, bmin.z, 1.0f);
const glm::vec4 c(bmax.x, bmin.y, bmin.z, 1.0f);
const glm::vec4 d(bmin.x, bmax.y, bmax.z, 1.0f);
const glm::vec4 e(bmax.x, bmin.y, bmax.z, 1.0f);
const glm::vec4 f(bmax.x, bmax.y, bmin.z, 1.0f);
m_aabb.push_back(a);
m_aabb.push_back(d);
m_aabb.push_back(a);
m_aabb.push_back(e);
m_aabb.push_back(b);
m_aabb.push_back(d);
m_aabb.push_back(b);
m_aabb.push_back(f);
m_aabb.push_back(c);
m_aabb.push_back(e);
m_aabb.push_back(c);
m_aabb.push_back(f);
m_aabb.push_back(glm::vec4(bmin, 1));
m_aabb.push_back(a);
m_aabb.push_back(glm::vec4(bmin, 1));
m_aabb.push_back(b);
m_aabb.push_back(glm::vec4(bmin, 1));
m_aabb.push_back(c);
m_aabb.push_back(glm::vec4(bmax, 1));
m_aabb.push_back(d);
m_aabb.push_back(glm::vec4(bmax, 1));
m_aabb.push_back(e);
m_aabb.push_back(glm::vec4(bmax, 1));
m_aabb.push_back(f);
}
template<typename T>
TreeVisualizer<T>::TreeVisualizer(int width, int height, const T &root) :
TreeVisualizerBase<T>(width, height, root)
{
}
/*
* @brief Class constructor for actual visualizer; works for Octree, N-Tree and such
* @param width current window width
* @param height current window height
* @param root tree to visualize and traverse
*/
template<typename T>
TreeVisualizer<CPU::Tree<T>>::TreeVisualizer(int width, int height, const T &root) :
TreeVisualizerBase<T>(width, height, root)
{
}
/*
* @brief Class constructor for actual visualizer; works for KD-Tree, BVH and such
* @param width current window width
* @param height current window height
* @param root tree to visualize and traverse
*/
template<typename T>
TreeVisualizer<CPU::TreeAccelBase<T>>::TreeVisualizer(int width, int height, const CPU::TreeAccelBase<T> &root) :
TreeVisualizerBase<CPU::TreeAccelBase<T>>(width, height, root)
{
}
/*
* @brief Change at which point no more levels should be rendered; this will re-build the vertex buffer. This is not used for KIRK::Tree types
* @param max_level maximum level to render; should be modified outside of this class, too, hence the reference
*/
template<typename T>
void TreeVisualizer<CPU::TreeAccelBase<T>>::setMaxLevel(int &max_level)
{
// numeric_limits is the default value, thus the tree depth will be used if no custom level is provided
if(max_level == std::numeric_limits<int>::max())
{
max_level = this->m_root.m_prop.max_depth;
}
this->m_max_level = max_level = std::max(0, std::min(max_level,
this->m_root.m_prop.depth)); // Make sure this->m_max_level isn't negative or above tree depth
this->m_aabb.clear();
// Each node has 24 coordinates for 12 lines representing a bounding box
this->m_aabb.reserve(this->m_root.m_prop.amnt_nodes * 24);
traverseNode(this->m_root.m_root, 0, *((const_cast < CPU::TreeAccelBase<T> & > ( this->m_root )).getMinBound()),
*((const_cast < CPU::TreeAccelBase<T> & > ( this->m_root )).getMaxBound())); // will fill this->m_aabb
this->m_aabb.shrink_to_fit(); // Since we probably allocated too much memory, free any unused resources
glBindVertexArray(this->m_vao);
glBindBuffer(GL_ARRAY_BUFFER, this->m_vbo);
glBufferData(GL_ARRAY_BUFFER, this->m_aabb.size() * sizeof(glm::vec4), &this->m_aabb[0], GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 0, 0);
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
// Forward declaration; will be defined later
template<>
void TreeVisualizer<CPU::UniformGrid>::traverseNode(const CPU::UniformGrid &node, int level, const glm::vec3 &bmin,
const glm::vec3 &bmax);
/*
* @brief This is relevant only when building the grid visualization
* @param max_level amount of voxels on each axis
*/
template<>
void TreeVisualizer<CPU::UniformGrid>::setMaxLevel(int &max_level)
{
if(!m_aabb.empty())
{
return; // exit if grid has been built already
}
// In this case, m_max_level actually denotes the number of voxels in this grid (abusing variables, yay!)
m_max_level = (max_level == std::numeric_limits<int>::max() || max_level < 0) ? 0 : max_level;
// Each voxel has 24 coordinates for 12 lines representing it
// Each dimension spans max_level voxels
this->m_aabb.reserve(max_level * max_level * max_level * 24);
traverseNode(this->m_root, 0, *((const_cast < CPU::UniformGrid & > ( this->m_root )).getMinBound()),
*((const_cast < CPU::UniformGrid & > ( this->m_root )).getMaxBound())); // will fill this->m_aabb
this->m_aabb.shrink_to_fit();
glBindVertexArray(this->m_vao);
glBindBuffer(GL_ARRAY_BUFFER, this->m_vbo);
glBufferData(GL_ARRAY_BUFFER, this->m_aabb.size() * sizeof(glm::vec4), &this->m_aabb[0], GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 0, 0);
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
/*
* @brief Change at which point no more levels should be rendered; this will re-build the vertex buffer. This is only used for KIRK::Tree types
* @param max_level maximum level to render; should be modified outside of this class, too, hence the reference
*/
template<typename T>
void TreeVisualizer<CPU::Tree<T>>::setMaxLevel(int &max_level)
{
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// DISCLAIMER; NOTES ON PROGRAMMING STYLE; MIGHT WANT TO READ THIS
// Unfortunately, can't make sure that tree depth is exceeded by the given argument. The Octree/N-Tree code does not have a get-method for its internal depth representation.
// Keep in mind this is actually a good thing; giving away information about internal data of your class is a design flaw. Classes should be defined by their behaviour, not their data.
// (Consider using structs if you wish to reveal much data to outside code)
// Normally, you'd integrate the visualization in the datastructure class to prevent this sort of issue.
// In this case, it is not wanted that the original Tree datastructure we were provided with is changed in any way.
// It doesn't matter too much after all, since we'll add to the buffer only if the current node has children.
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
this->m_max_level = max_level = std::max(0, max_level); // Can still make sure this->m_max_level isn't negative
this->m_aabb.clear();
// Each node has 24 coordinates for 12 lines representing a bounding box
this->m_aabb.reserve((const_cast < T & > ( this->m_root )).numTotalChildren() * 24);
const glm::vec3 &bmin = *((const_cast < T & > ( this->m_root )).getMinBound());
const glm::vec3 &bmax = *((const_cast < T & > ( this->m_root )).getMaxBound());
traverseNode(this->m_root, 0, bmin, bmax); // will fill this->m_aabb
this->m_aabb.shrink_to_fit(); // Since we probably allocated too much memory, free any unused resources
glBindVertexArray(this->m_vao);
glBindBuffer(GL_ARRAY_BUFFER, this->m_vbo);
glBufferData(GL_ARRAY_BUFFER, this->m_aabb.size() * sizeof(glm::vec4), &this->m_aabb[0], GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 0, 0);
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
template<>
void TreeVisualizer<CPU::TreeAccelBase<CPU::KDNode>>::traverseNode(const CPU::KDNode &node, int level, const glm::vec3 &bmin,
const glm::vec3 &bmax)
{
// Render only those boxes that are furthest down the tree.
// If a depth is given that does not exceed the tree depth, that must include any leaf nodes within this range.
// All parent's boxes are made up of these "leaf" boxes recursively! No need to render all these lines multiple times.
if(level++ == this->m_max_level || node.m_axis == -1)
{
this->addToBuffer(bmin, bmax);
return;
}
glm::vec3 left_clamp = bmax;
glm::vec3 right_clamp = bmin;
left_clamp[node.m_axis] = node.m_split_pos;
right_clamp[node.m_axis] = node.m_split_pos;
// If this node has no children, axis will be -1 and we will not enter this code block, hence these child pointers are valid
traverseNode(*(node.m_children[0]), level, bmin, left_clamp);
traverseNode(*(node.m_children[1]), level, right_clamp, bmax);
}
/*
* @brief Traverse a BVH node in order to retrieve its bounding volume coordinates
* @param node current BVH node
* @param level current recursion depth (level in tree)
* @param bmin mininum bounds of node's bounding volume
* @param bmax maximum bounds of node's bounding volume
*/
template<>
void TreeVisualizer<CPU::TreeAccelBase<CPU::BVHNode>>::traverseNode(const CPU::BVHNode &node, int level, const glm::vec3 &bmin,
const glm::vec3 &bmax)
{
// Reached maximum level, stop traversing.
if(level++ > this->m_max_level)
{
return;
}
this->addToBuffer(bmin, bmax);
// If left child exists, so does the right child - continue recursion.
if(node.LEFT_CHILD)
{
traverseNode(*(node.LEFT_CHILD), level, node.LEFT_CHILD->m_bvol.min(), node.LEFT_CHILD->m_bvol.max());
traverseNode(*(node.RIGHT_CHILD), level, node.RIGHT_CHILD->m_bvol.min(), node.RIGHT_CHILD->m_bvol.max());
}
}
/*
* @brief Doesn't make much sense. We abuse this function so we don't have to make a new class. Basically builds the grid visualization.
* @param node the grid
* @param level irrelevant
* @param bmin minimum scene bounds
* @param bmax maximum scene bounds
*/
template<>
void TreeVisualizer<CPU::UniformGrid>::traverseNode(const CPU::UniformGrid &node, int level, const glm::vec3 &bmin,
const glm::vec3 &bmax)
{
if(m_max_level == 0)
{
return; // Please no division by zero
}
const glm::vec3 size = bmax - bmin;
const glm::vec3 voxel_size = size / glm::vec3(m_max_level); // use max level as amount of voxels
// Go over each dimension, increasing the step by voxel size. This will collect all voxels spanning the scene
for(float x = bmin.x; x < bmax.x; x += voxel_size.x)
{
for(float y = bmin.y; y < bmax.y; y += voxel_size.y)
{
for(float z = bmin.z; z < bmax.z; z += voxel_size.z)
{
glm::vec3 tmin(x, y, z);
glm::vec3 tmax = tmin +
voxel_size; // Each voxel we collect has a corresponding max bound that we need in order to set the line coordinates
addToBuffer(tmin, tmax); // Adds 12 vertices
}
}
}
}
/*
* @brief Traverse a KIRK::Tree node in order to retrieve its bounding coordinates
* @param node current KIRK::Tree node
* @param level current recursion depth (level in tree)
* @param bmin mininum bounds of node's bounding box
* @param bmax maximum bounds of node's bounding box
*/
template<typename T>
void TreeVisualizer<CPU::Tree<T>>::traverseNode(const T &node, int level, const glm::vec3 &bmin, const glm::vec3 &bmax)
{
// Render only those boxes that are furthest down the tree.
// If a depth is given that does not exceed the tree depth, that must include any leaf nodes within this range.
// All parent's boxes are made up of these "leaf" boxes recursively! No need to render all these lines multiple times.
// There is one exception to this; any node further up the tree that does not have
// children would not be drawn as it's not on the max level. This provides us with the second (optional) condition.
if(level++ == this->m_max_level || !((const_cast < T & > ( node )).hasChildren()))
{
this->addToBuffer(bmin, bmax);
return;
}
auto &children = *((const_cast < T & > ( node )).getChildren());
for(auto &child : children)
{
traverseNode(*child, level, *(child->getMinBound()), *(child->getMaxBound()));
}
}
template
class TreeVisualizer<CPU::TreeAccelBase<CPU::KDNode> >;
template
class TreeVisualizer<CPU::TreeAccelBase<CPU::BVHNode>>;
template
class TreeVisualizer<CPU::Tree<CPU::Octree>>;
template
class TreeVisualizer<CPU::UniformGrid>;
template
class TreeVisualizerBase<CPU::TreeAccelBase<CPU::KDNode>>;
template
class TreeVisualizerBase<CPU::TreeAccelBase<CPU::BVHNode>>;
template
class TreeVisualizerBase<CPU::Octree>;
template
class TreeVisualizerBase<CPU::UniformGrid>;
}
| 40.248677 | 188 | 0.661759 | [
"render"
] |
95db674e4a1b0457f8b007bedec105244c49365b | 946,587 | cpp | C++ | z80-parser/generated/Z80Parser.cpp | mcchatman8009/z80-core | 127f575aa4a441b7d35b4424c8eea9dab1b665c9 | [
"MIT"
] | null | null | null | z80-parser/generated/Z80Parser.cpp | mcchatman8009/z80-core | 127f575aa4a441b7d35b4424c8eea9dab1b665c9 | [
"MIT"
] | null | null | null | z80-parser/generated/Z80Parser.cpp | mcchatman8009/z80-core | 127f575aa4a441b7d35b4424c8eea9dab1b665c9 | [
"MIT"
] | null | null | null |
// Generated from Z80.g4 by ANTLR 4.8
#include "Z80Listener.h"
#include "Z80Parser.h"
using namespace antlrcpp;
using namespace antlr4;
Z80Parser::Z80Parser(TokenStream *input) : Parser(input) {
_interpreter = new atn::ParserATNSimulator(this, _atn, _decisionToDFA, _sharedContextCache);
}
Z80Parser::~Z80Parser() {
delete _interpreter;
}
std::string Z80Parser::getGrammarFileName() const {
return "Z80.g4";
}
const std::vector<std::string>& Z80Parser::getRuleNames() const {
return _ruleNames;
}
dfa::Vocabulary& Z80Parser::getVocabulary() const {
return _vocabulary;
}
//----------------- ProgramContext ------------------------------------------------------------------
Z80Parser::ProgramContext::ProgramContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
std::vector<Z80Parser::StatementContext *> Z80Parser::ProgramContext::statement() {
return getRuleContexts<Z80Parser::StatementContext>();
}
Z80Parser::StatementContext* Z80Parser::ProgramContext::statement(size_t i) {
return getRuleContext<Z80Parser::StatementContext>(i);
}
size_t Z80Parser::ProgramContext::getRuleIndex() const {
return Z80Parser::RuleProgram;
}
void Z80Parser::ProgramContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterProgram(this);
}
void Z80Parser::ProgramContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitProgram(this);
}
Z80Parser::ProgramContext* Z80Parser::program() {
ProgramContext *_localctx = _tracker.createInstance<ProgramContext>(_ctx, getState());
enterRule(_localctx, 0, Z80Parser::RuleProgram);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(689);
_errHandler->sync(this);
_la = _input->LA(1);
while (((((_la - 72) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 72)) & ((1ULL << (Z80Parser::T__71 - 72))
| (1ULL << (Z80Parser::T__72 - 72))
| (1ULL << (Z80Parser::T__74 - 72))
| (1ULL << (Z80Parser::T__75 - 72))
| (1ULL << (Z80Parser::T__76 - 72))
| (1ULL << (Z80Parser::T__77 - 72))
| (1ULL << (Z80Parser::T__78 - 72))
| (1ULL << (Z80Parser::T__79 - 72))
| (1ULL << (Z80Parser::T__80 - 72))
| (1ULL << (Z80Parser::T__81 - 72))
| (1ULL << (Z80Parser::T__82 - 72))
| (1ULL << (Z80Parser::T__83 - 72))
| (1ULL << (Z80Parser::T__84 - 72))
| (1ULL << (Z80Parser::T__85 - 72))
| (1ULL << (Z80Parser::T__86 - 72))
| (1ULL << (Z80Parser::T__87 - 72))
| (1ULL << (Z80Parser::T__88 - 72))
| (1ULL << (Z80Parser::T__89 - 72))
| (1ULL << (Z80Parser::T__90 - 72))
| (1ULL << (Z80Parser::T__91 - 72))
| (1ULL << (Z80Parser::T__92 - 72))
| (1ULL << (Z80Parser::T__93 - 72))
| (1ULL << (Z80Parser::T__94 - 72))
| (1ULL << (Z80Parser::T__95 - 72))
| (1ULL << (Z80Parser::T__96 - 72))
| (1ULL << (Z80Parser::T__97 - 72))
| (1ULL << (Z80Parser::T__98 - 72))
| (1ULL << (Z80Parser::T__99 - 72))
| (1ULL << (Z80Parser::T__100 - 72))
| (1ULL << (Z80Parser::T__101 - 72))
| (1ULL << (Z80Parser::T__102 - 72))
| (1ULL << (Z80Parser::T__103 - 72))
| (1ULL << (Z80Parser::T__104 - 72))
| (1ULL << (Z80Parser::T__105 - 72))
| (1ULL << (Z80Parser::T__106 - 72))
| (1ULL << (Z80Parser::T__107 - 72))
| (1ULL << (Z80Parser::T__108 - 72))
| (1ULL << (Z80Parser::T__109 - 72))
| (1ULL << (Z80Parser::T__110 - 72))
| (1ULL << (Z80Parser::T__111 - 72))
| (1ULL << (Z80Parser::T__112 - 72))
| (1ULL << (Z80Parser::T__113 - 72))
| (1ULL << (Z80Parser::T__114 - 72))
| (1ULL << (Z80Parser::T__115 - 72))
| (1ULL << (Z80Parser::T__116 - 72))
| (1ULL << (Z80Parser::T__117 - 72))
| (1ULL << (Z80Parser::T__118 - 72))
| (1ULL << (Z80Parser::T__119 - 72))
| (1ULL << (Z80Parser::T__120 - 72))
| (1ULL << (Z80Parser::T__121 - 72))
| (1ULL << (Z80Parser::T__122 - 72))
| (1ULL << (Z80Parser::T__123 - 72))
| (1ULL << (Z80Parser::T__124 - 72))
| (1ULL << (Z80Parser::T__125 - 72))
| (1ULL << (Z80Parser::T__126 - 72))
| (1ULL << (Z80Parser::T__127 - 72))
| (1ULL << (Z80Parser::T__128 - 72))
| (1ULL << (Z80Parser::T__129 - 72))
| (1ULL << (Z80Parser::T__130 - 72))
| (1ULL << (Z80Parser::T__131 - 72))
| (1ULL << (Z80Parser::T__132 - 72))
| (1ULL << (Z80Parser::T__133 - 72))
| (1ULL << (Z80Parser::T__134 - 72)))) != 0) || ((((_la - 136) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 136)) & ((1ULL << (Z80Parser::T__135 - 136))
| (1ULL << (Z80Parser::T__136 - 136))
| (1ULL << (Z80Parser::T__137 - 136))
| (1ULL << (Z80Parser::T__138 - 136))
| (1ULL << (Z80Parser::T__139 - 136))
| (1ULL << (Z80Parser::T__140 - 136))
| (1ULL << (Z80Parser::T__141 - 136))
| (1ULL << (Z80Parser::T__142 - 136))
| (1ULL << (Z80Parser::T__143 - 136))
| (1ULL << (Z80Parser::T__144 - 136))
| (1ULL << (Z80Parser::T__145 - 136))
| (1ULL << (Z80Parser::T__146 - 136))
| (1ULL << (Z80Parser::T__147 - 136))
| (1ULL << (Z80Parser::T__148 - 136))
| (1ULL << (Z80Parser::T__149 - 136))
| (1ULL << (Z80Parser::T__150 - 136))
| (1ULL << (Z80Parser::T__151 - 136))
| (1ULL << (Z80Parser::T__152 - 136))
| (1ULL << (Z80Parser::T__153 - 136))
| (1ULL << (Z80Parser::T__154 - 136))
| (1ULL << (Z80Parser::T__155 - 136))
| (1ULL << (Z80Parser::T__156 - 136))
| (1ULL << (Z80Parser::T__157 - 136))
| (1ULL << (Z80Parser::T__158 - 136))
| (1ULL << (Z80Parser::T__159 - 136))
| (1ULL << (Z80Parser::T__160 - 136))
| (1ULL << (Z80Parser::T__161 - 136))
| (1ULL << (Z80Parser::T__162 - 136))
| (1ULL << (Z80Parser::T__163 - 136))
| (1ULL << (Z80Parser::T__164 - 136))
| (1ULL << (Z80Parser::T__165 - 136))
| (1ULL << (Z80Parser::T__166 - 136))
| (1ULL << (Z80Parser::T__167 - 136))
| (1ULL << (Z80Parser::T__168 - 136))
| (1ULL << (Z80Parser::T__169 - 136))
| (1ULL << (Z80Parser::T__170 - 136))
| (1ULL << (Z80Parser::T__171 - 136))
| (1ULL << (Z80Parser::T__186 - 136))
| (1ULL << (Z80Parser::T__187 - 136))
| (1ULL << (Z80Parser::T__188 - 136))
| (1ULL << (Z80Parser::T__189 - 136))
| (1ULL << (Z80Parser::T__190 - 136))
| (1ULL << (Z80Parser::T__191 - 136))
| (1ULL << (Z80Parser::T__192 - 136))
| (1ULL << (Z80Parser::T__193 - 136))
| (1ULL << (Z80Parser::T__194 - 136))
| (1ULL << (Z80Parser::T__195 - 136))
| (1ULL << (Z80Parser::T__196 - 136))
| (1ULL << (Z80Parser::T__197 - 136))
| (1ULL << (Z80Parser::T__198 - 136)))) != 0) || ((((_la - 200) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 200)) & ((1ULL << (Z80Parser::T__199 - 200))
| (1ULL << (Z80Parser::T__200 - 200))
| (1ULL << (Z80Parser::T__201 - 200))
| (1ULL << (Z80Parser::T__202 - 200))
| (1ULL << (Z80Parser::T__203 - 200))
| (1ULL << (Z80Parser::T__204 - 200))
| (1ULL << (Z80Parser::T__205 - 200))
| (1ULL << (Z80Parser::T__206 - 200))
| (1ULL << (Z80Parser::T__207 - 200))
| (1ULL << (Z80Parser::T__208 - 200))
| (1ULL << (Z80Parser::T__209 - 200))
| (1ULL << (Z80Parser::T__210 - 200))
| (1ULL << (Z80Parser::T__211 - 200))
| (1ULL << (Z80Parser::T__212 - 200))
| (1ULL << (Z80Parser::T__213 - 200))
| (1ULL << (Z80Parser::T__214 - 200))
| (1ULL << (Z80Parser::T__215 - 200))
| (1ULL << (Z80Parser::T__216 - 200))
| (1ULL << (Z80Parser::T__217 - 200))
| (1ULL << (Z80Parser::T__218 - 200))
| (1ULL << (Z80Parser::T__219 - 200))
| (1ULL << (Z80Parser::T__220 - 200))
| (1ULL << (Z80Parser::T__221 - 200))
| (1ULL << (Z80Parser::NAME - 200))
| (1ULL << (Z80Parser::COMMENT - 200))
| (1ULL << (Z80Parser::EOL - 200)))) != 0)) {
setState(686);
statement();
setState(691);
_errHandler->sync(this);
_la = _input->LA(1);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- StatementContext ------------------------------------------------------------------
Z80Parser::StatementContext::StatementContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* Z80Parser::StatementContext::EOL() {
return getToken(Z80Parser::EOL, 0);
}
Z80Parser::LabelContext* Z80Parser::StatementContext::label() {
return getRuleContext<Z80Parser::LabelContext>(0);
}
Z80Parser::InstructionContext* Z80Parser::StatementContext::instruction() {
return getRuleContext<Z80Parser::InstructionContext>(0);
}
Z80Parser::CommentContext* Z80Parser::StatementContext::comment() {
return getRuleContext<Z80Parser::CommentContext>(0);
}
size_t Z80Parser::StatementContext::getRuleIndex() const {
return Z80Parser::RuleStatement;
}
void Z80Parser::StatementContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterStatement(this);
}
void Z80Parser::StatementContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitStatement(this);
}
Z80Parser::StatementContext* Z80Parser::statement() {
StatementContext *_localctx = _tracker.createInstance<StatementContext>(_ctx, getState());
enterRule(_localctx, 2, Z80Parser::RuleStatement);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
setState(703);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 4, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(693);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == Z80Parser::NAME) {
setState(692);
label();
}
setState(696);
_errHandler->sync(this);
_la = _input->LA(1);
if (((((_la - 72) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 72)) & ((1ULL << (Z80Parser::T__71 - 72))
| (1ULL << (Z80Parser::T__72 - 72))
| (1ULL << (Z80Parser::T__74 - 72))
| (1ULL << (Z80Parser::T__75 - 72))
| (1ULL << (Z80Parser::T__76 - 72))
| (1ULL << (Z80Parser::T__77 - 72))
| (1ULL << (Z80Parser::T__78 - 72))
| (1ULL << (Z80Parser::T__79 - 72))
| (1ULL << (Z80Parser::T__80 - 72))
| (1ULL << (Z80Parser::T__81 - 72))
| (1ULL << (Z80Parser::T__82 - 72))
| (1ULL << (Z80Parser::T__83 - 72))
| (1ULL << (Z80Parser::T__84 - 72))
| (1ULL << (Z80Parser::T__85 - 72))
| (1ULL << (Z80Parser::T__86 - 72))
| (1ULL << (Z80Parser::T__87 - 72))
| (1ULL << (Z80Parser::T__88 - 72))
| (1ULL << (Z80Parser::T__89 - 72))
| (1ULL << (Z80Parser::T__90 - 72))
| (1ULL << (Z80Parser::T__91 - 72))
| (1ULL << (Z80Parser::T__92 - 72))
| (1ULL << (Z80Parser::T__93 - 72))
| (1ULL << (Z80Parser::T__94 - 72))
| (1ULL << (Z80Parser::T__95 - 72))
| (1ULL << (Z80Parser::T__96 - 72))
| (1ULL << (Z80Parser::T__97 - 72))
| (1ULL << (Z80Parser::T__98 - 72))
| (1ULL << (Z80Parser::T__99 - 72))
| (1ULL << (Z80Parser::T__100 - 72))
| (1ULL << (Z80Parser::T__101 - 72))
| (1ULL << (Z80Parser::T__102 - 72))
| (1ULL << (Z80Parser::T__103 - 72))
| (1ULL << (Z80Parser::T__104 - 72))
| (1ULL << (Z80Parser::T__105 - 72))
| (1ULL << (Z80Parser::T__106 - 72))
| (1ULL << (Z80Parser::T__107 - 72))
| (1ULL << (Z80Parser::T__108 - 72))
| (1ULL << (Z80Parser::T__109 - 72))
| (1ULL << (Z80Parser::T__110 - 72))
| (1ULL << (Z80Parser::T__111 - 72))
| (1ULL << (Z80Parser::T__112 - 72))
| (1ULL << (Z80Parser::T__113 - 72))
| (1ULL << (Z80Parser::T__114 - 72))
| (1ULL << (Z80Parser::T__115 - 72))
| (1ULL << (Z80Parser::T__116 - 72))
| (1ULL << (Z80Parser::T__117 - 72))
| (1ULL << (Z80Parser::T__118 - 72))
| (1ULL << (Z80Parser::T__119 - 72))
| (1ULL << (Z80Parser::T__120 - 72))
| (1ULL << (Z80Parser::T__121 - 72))
| (1ULL << (Z80Parser::T__122 - 72))
| (1ULL << (Z80Parser::T__123 - 72))
| (1ULL << (Z80Parser::T__124 - 72))
| (1ULL << (Z80Parser::T__125 - 72))
| (1ULL << (Z80Parser::T__126 - 72))
| (1ULL << (Z80Parser::T__127 - 72))
| (1ULL << (Z80Parser::T__128 - 72))
| (1ULL << (Z80Parser::T__129 - 72))
| (1ULL << (Z80Parser::T__130 - 72))
| (1ULL << (Z80Parser::T__131 - 72))
| (1ULL << (Z80Parser::T__132 - 72))
| (1ULL << (Z80Parser::T__133 - 72))
| (1ULL << (Z80Parser::T__134 - 72)))) != 0) || ((((_la - 136) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 136)) & ((1ULL << (Z80Parser::T__135 - 136))
| (1ULL << (Z80Parser::T__136 - 136))
| (1ULL << (Z80Parser::T__137 - 136))
| (1ULL << (Z80Parser::T__138 - 136))
| (1ULL << (Z80Parser::T__139 - 136))
| (1ULL << (Z80Parser::T__140 - 136))
| (1ULL << (Z80Parser::T__141 - 136))
| (1ULL << (Z80Parser::T__142 - 136))
| (1ULL << (Z80Parser::T__143 - 136))
| (1ULL << (Z80Parser::T__144 - 136))
| (1ULL << (Z80Parser::T__145 - 136))
| (1ULL << (Z80Parser::T__146 - 136))
| (1ULL << (Z80Parser::T__147 - 136))
| (1ULL << (Z80Parser::T__148 - 136))
| (1ULL << (Z80Parser::T__149 - 136))
| (1ULL << (Z80Parser::T__150 - 136))
| (1ULL << (Z80Parser::T__151 - 136))
| (1ULL << (Z80Parser::T__152 - 136))
| (1ULL << (Z80Parser::T__153 - 136))
| (1ULL << (Z80Parser::T__154 - 136))
| (1ULL << (Z80Parser::T__155 - 136))
| (1ULL << (Z80Parser::T__156 - 136))
| (1ULL << (Z80Parser::T__157 - 136))
| (1ULL << (Z80Parser::T__158 - 136))
| (1ULL << (Z80Parser::T__159 - 136))
| (1ULL << (Z80Parser::T__160 - 136))
| (1ULL << (Z80Parser::T__161 - 136))
| (1ULL << (Z80Parser::T__162 - 136))
| (1ULL << (Z80Parser::T__163 - 136))
| (1ULL << (Z80Parser::T__164 - 136))
| (1ULL << (Z80Parser::T__165 - 136))
| (1ULL << (Z80Parser::T__166 - 136))
| (1ULL << (Z80Parser::T__167 - 136))
| (1ULL << (Z80Parser::T__168 - 136))
| (1ULL << (Z80Parser::T__169 - 136))
| (1ULL << (Z80Parser::T__170 - 136))
| (1ULL << (Z80Parser::T__171 - 136))
| (1ULL << (Z80Parser::T__186 - 136))
| (1ULL << (Z80Parser::T__187 - 136))
| (1ULL << (Z80Parser::T__188 - 136))
| (1ULL << (Z80Parser::T__189 - 136))
| (1ULL << (Z80Parser::T__190 - 136))
| (1ULL << (Z80Parser::T__191 - 136))
| (1ULL << (Z80Parser::T__192 - 136))
| (1ULL << (Z80Parser::T__193 - 136))
| (1ULL << (Z80Parser::T__194 - 136))
| (1ULL << (Z80Parser::T__195 - 136))
| (1ULL << (Z80Parser::T__196 - 136))
| (1ULL << (Z80Parser::T__197 - 136))
| (1ULL << (Z80Parser::T__198 - 136)))) != 0) || ((((_la - 200) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 200)) & ((1ULL << (Z80Parser::T__199 - 200))
| (1ULL << (Z80Parser::T__200 - 200))
| (1ULL << (Z80Parser::T__201 - 200))
| (1ULL << (Z80Parser::T__202 - 200))
| (1ULL << (Z80Parser::T__203 - 200))
| (1ULL << (Z80Parser::T__204 - 200))
| (1ULL << (Z80Parser::T__205 - 200))
| (1ULL << (Z80Parser::T__206 - 200))
| (1ULL << (Z80Parser::T__207 - 200))
| (1ULL << (Z80Parser::T__208 - 200))
| (1ULL << (Z80Parser::T__209 - 200))
| (1ULL << (Z80Parser::T__210 - 200))
| (1ULL << (Z80Parser::T__211 - 200))
| (1ULL << (Z80Parser::T__212 - 200))
| (1ULL << (Z80Parser::T__213 - 200))
| (1ULL << (Z80Parser::T__214 - 200))
| (1ULL << (Z80Parser::T__215 - 200))
| (1ULL << (Z80Parser::T__216 - 200))
| (1ULL << (Z80Parser::T__217 - 200))
| (1ULL << (Z80Parser::T__218 - 200))
| (1ULL << (Z80Parser::T__219 - 200))
| (1ULL << (Z80Parser::T__220 - 200))
| (1ULL << (Z80Parser::T__221 - 200)))) != 0)) {
setState(695);
instruction();
}
setState(699);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == Z80Parser::COMMENT) {
setState(698);
comment();
}
setState(701);
match(Z80Parser::EOL);
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(702);
match(Z80Parser::EOL);
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- InstructionContext ------------------------------------------------------------------
Z80Parser::InstructionContext::InstructionContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ByteLoadCommandContext* Z80Parser::InstructionContext::byteLoadCommand() {
return getRuleContext<Z80Parser::ByteLoadCommandContext>(0);
}
Z80Parser::WordLoadCommandContext* Z80Parser::InstructionContext::wordLoadCommand() {
return getRuleContext<Z80Parser::WordLoadCommandContext>(0);
}
Z80Parser::ExchagneAndBlockTransfrerCommandContext* Z80Parser::InstructionContext::exchagneAndBlockTransfrerCommand() {
return getRuleContext<Z80Parser::ExchagneAndBlockTransfrerCommandContext>(0);
}
Z80Parser::ArithmeticCommandContext* Z80Parser::InstructionContext::arithmeticCommand() {
return getRuleContext<Z80Parser::ArithmeticCommandContext>(0);
}
Z80Parser::ArithmeticControlCommandContext* Z80Parser::InstructionContext::arithmeticControlCommand() {
return getRuleContext<Z80Parser::ArithmeticControlCommandContext>(0);
}
Z80Parser::WordArithemeticCommandContext* Z80Parser::InstructionContext::wordArithemeticCommand() {
return getRuleContext<Z80Parser::WordArithemeticCommandContext>(0);
}
Z80Parser::RotateCommandContext* Z80Parser::InstructionContext::rotateCommand() {
return getRuleContext<Z80Parser::RotateCommandContext>(0);
}
Z80Parser::BitManipulationCommandContext* Z80Parser::InstructionContext::bitManipulationCommand() {
return getRuleContext<Z80Parser::BitManipulationCommandContext>(0);
}
Z80Parser::BranchCommandContext* Z80Parser::InstructionContext::branchCommand() {
return getRuleContext<Z80Parser::BranchCommandContext>(0);
}
Z80Parser::InputAndOutpuCommandContext* Z80Parser::InstructionContext::inputAndOutpuCommand() {
return getRuleContext<Z80Parser::InputAndOutpuCommandContext>(0);
}
size_t Z80Parser::InstructionContext::getRuleIndex() const {
return Z80Parser::RuleInstruction;
}
void Z80Parser::InstructionContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterInstruction(this);
}
void Z80Parser::InstructionContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitInstruction(this);
}
Z80Parser::InstructionContext* Z80Parser::instruction() {
InstructionContext *_localctx = _tracker.createInstance<InstructionContext>(_ctx, getState());
enterRule(_localctx, 4, Z80Parser::RuleInstruction);
auto onExit = finally([=] {
exitRule();
});
try {
setState(715);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 5, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(705);
byteLoadCommand();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(706);
wordLoadCommand();
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
setState(707);
exchagneAndBlockTransfrerCommand();
break;
}
case 4: {
enterOuterAlt(_localctx, 4);
setState(708);
arithmeticCommand();
break;
}
case 5: {
enterOuterAlt(_localctx, 5);
setState(709);
arithmeticControlCommand();
break;
}
case 6: {
enterOuterAlt(_localctx, 6);
setState(710);
wordArithemeticCommand();
break;
}
case 7: {
enterOuterAlt(_localctx, 7);
setState(711);
rotateCommand();
break;
}
case 8: {
enterOuterAlt(_localctx, 8);
setState(712);
bitManipulationCommand();
break;
}
case 9: {
enterOuterAlt(_localctx, 9);
setState(713);
branchCommand();
break;
}
case 10: {
enterOuterAlt(_localctx, 10);
setState(714);
inputAndOutpuCommand();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AShadowRegisterContext ------------------------------------------------------------------
Z80Parser::AShadowRegisterContext::AShadowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::AShadowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleAShadowRegister;
}
void Z80Parser::AShadowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAShadowRegister(this);
}
void Z80Parser::AShadowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAShadowRegister(this);
}
Z80Parser::AShadowRegisterContext* Z80Parser::aShadowRegister() {
AShadowRegisterContext *_localctx = _tracker.createInstance<AShadowRegisterContext>(_ctx, getState());
enterRule(_localctx, 6, Z80Parser::RuleAShadowRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(717);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__0
|| _la == Z80Parser::T__1)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- FShadowRegisterContext ------------------------------------------------------------------
Z80Parser::FShadowRegisterContext::FShadowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::FShadowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleFShadowRegister;
}
void Z80Parser::FShadowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterFShadowRegister(this);
}
void Z80Parser::FShadowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitFShadowRegister(this);
}
Z80Parser::FShadowRegisterContext* Z80Parser::fShadowRegister() {
FShadowRegisterContext *_localctx = _tracker.createInstance<FShadowRegisterContext>(_ctx, getState());
enterRule(_localctx, 8, Z80Parser::RuleFShadowRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(719);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__2
|| _la == Z80Parser::T__3)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- BShadowRegisterContext ------------------------------------------------------------------
Z80Parser::BShadowRegisterContext::BShadowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::BShadowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleBShadowRegister;
}
void Z80Parser::BShadowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterBShadowRegister(this);
}
void Z80Parser::BShadowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitBShadowRegister(this);
}
Z80Parser::BShadowRegisterContext* Z80Parser::bShadowRegister() {
BShadowRegisterContext *_localctx = _tracker.createInstance<BShadowRegisterContext>(_ctx, getState());
enterRule(_localctx, 10, Z80Parser::RuleBShadowRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(721);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__4
|| _la == Z80Parser::T__5)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CShadowRegisterContext ------------------------------------------------------------------
Z80Parser::CShadowRegisterContext::CShadowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::CShadowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleCShadowRegister;
}
void Z80Parser::CShadowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCShadowRegister(this);
}
void Z80Parser::CShadowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCShadowRegister(this);
}
Z80Parser::CShadowRegisterContext* Z80Parser::cShadowRegister() {
CShadowRegisterContext *_localctx = _tracker.createInstance<CShadowRegisterContext>(_ctx, getState());
enterRule(_localctx, 12, Z80Parser::RuleCShadowRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(723);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__6
|| _la == Z80Parser::T__7)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DShadowRegisterContext ------------------------------------------------------------------
Z80Parser::DShadowRegisterContext::DShadowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::DShadowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleDShadowRegister;
}
void Z80Parser::DShadowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDShadowRegister(this);
}
void Z80Parser::DShadowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDShadowRegister(this);
}
Z80Parser::DShadowRegisterContext* Z80Parser::dShadowRegister() {
DShadowRegisterContext *_localctx = _tracker.createInstance<DShadowRegisterContext>(_ctx, getState());
enterRule(_localctx, 14, Z80Parser::RuleDShadowRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(725);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__8
|| _la == Z80Parser::T__9)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- EShadowRegisterContext ------------------------------------------------------------------
Z80Parser::EShadowRegisterContext::EShadowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::EShadowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleEShadowRegister;
}
void Z80Parser::EShadowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterEShadowRegister(this);
}
void Z80Parser::EShadowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitEShadowRegister(this);
}
Z80Parser::EShadowRegisterContext* Z80Parser::eShadowRegister() {
EShadowRegisterContext *_localctx = _tracker.createInstance<EShadowRegisterContext>(_ctx, getState());
enterRule(_localctx, 16, Z80Parser::RuleEShadowRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(727);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__10
|| _la == Z80Parser::T__11)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- HShadowRegisterContext ------------------------------------------------------------------
Z80Parser::HShadowRegisterContext::HShadowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::HShadowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleHShadowRegister;
}
void Z80Parser::HShadowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterHShadowRegister(this);
}
void Z80Parser::HShadowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitHShadowRegister(this);
}
Z80Parser::HShadowRegisterContext* Z80Parser::hShadowRegister() {
HShadowRegisterContext *_localctx = _tracker.createInstance<HShadowRegisterContext>(_ctx, getState());
enterRule(_localctx, 18, Z80Parser::RuleHShadowRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(729);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__12
|| _la == Z80Parser::T__13)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LShadowRegisterContext ------------------------------------------------------------------
Z80Parser::LShadowRegisterContext::LShadowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::LShadowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleLShadowRegister;
}
void Z80Parser::LShadowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLShadowRegister(this);
}
void Z80Parser::LShadowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLShadowRegister(this);
}
Z80Parser::LShadowRegisterContext* Z80Parser::lShadowRegister() {
LShadowRegisterContext *_localctx = _tracker.createInstance<LShadowRegisterContext>(_ctx, getState());
enterRule(_localctx, 20, Z80Parser::RuleLShadowRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(731);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__14
|| _la == Z80Parser::T__15)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ARegisterContext ------------------------------------------------------------------
Z80Parser::ARegisterContext::ARegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AShadowRegisterContext* Z80Parser::ARegisterContext::aShadowRegister() {
return getRuleContext<Z80Parser::AShadowRegisterContext>(0);
}
size_t Z80Parser::ARegisterContext::getRuleIndex() const {
return Z80Parser::RuleARegister;
}
void Z80Parser::ARegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterARegister(this);
}
void Z80Parser::ARegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitARegister(this);
}
Z80Parser::ARegisterContext* Z80Parser::aRegister() {
ARegisterContext *_localctx = _tracker.createInstance<ARegisterContext>(_ctx, getState());
enterRule(_localctx, 22, Z80Parser::RuleARegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(736);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__16: {
enterOuterAlt(_localctx, 1);
setState(733);
match(Z80Parser::T__16);
break;
}
case Z80Parser::T__17: {
enterOuterAlt(_localctx, 2);
setState(734);
match(Z80Parser::T__17);
break;
}
case Z80Parser::T__0:
case Z80Parser::T__1: {
enterOuterAlt(_localctx, 3);
setState(735);
aShadowRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- FRegisterContext ------------------------------------------------------------------
Z80Parser::FRegisterContext::FRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::FShadowRegisterContext* Z80Parser::FRegisterContext::fShadowRegister() {
return getRuleContext<Z80Parser::FShadowRegisterContext>(0);
}
size_t Z80Parser::FRegisterContext::getRuleIndex() const {
return Z80Parser::RuleFRegister;
}
void Z80Parser::FRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterFRegister(this);
}
void Z80Parser::FRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitFRegister(this);
}
Z80Parser::FRegisterContext* Z80Parser::fRegister() {
FRegisterContext *_localctx = _tracker.createInstance<FRegisterContext>(_ctx, getState());
enterRule(_localctx, 24, Z80Parser::RuleFRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(741);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__18: {
enterOuterAlt(_localctx, 1);
setState(738);
match(Z80Parser::T__18);
break;
}
case Z80Parser::T__19: {
enterOuterAlt(_localctx, 2);
setState(739);
match(Z80Parser::T__19);
break;
}
case Z80Parser::T__2:
case Z80Parser::T__3: {
enterOuterAlt(_localctx, 3);
setState(740);
fShadowRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AfRegisterContext ------------------------------------------------------------------
Z80Parser::AfRegisterContext::AfRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AfShadowRegisterContext* Z80Parser::AfRegisterContext::afShadowRegister() {
return getRuleContext<Z80Parser::AfShadowRegisterContext>(0);
}
size_t Z80Parser::AfRegisterContext::getRuleIndex() const {
return Z80Parser::RuleAfRegister;
}
void Z80Parser::AfRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAfRegister(this);
}
void Z80Parser::AfRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAfRegister(this);
}
Z80Parser::AfRegisterContext* Z80Parser::afRegister() {
AfRegisterContext *_localctx = _tracker.createInstance<AfRegisterContext>(_ctx, getState());
enterRule(_localctx, 26, Z80Parser::RuleAfRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(746);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__20: {
enterOuterAlt(_localctx, 1);
setState(743);
match(Z80Parser::T__20);
break;
}
case Z80Parser::T__21: {
enterOuterAlt(_localctx, 2);
setState(744);
match(Z80Parser::T__21);
break;
}
case Z80Parser::T__22:
case Z80Parser::T__23: {
enterOuterAlt(_localctx, 3);
setState(745);
afShadowRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AfShadowRegisterContext ------------------------------------------------------------------
Z80Parser::AfShadowRegisterContext::AfShadowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::AfShadowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleAfShadowRegister;
}
void Z80Parser::AfShadowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAfShadowRegister(this);
}
void Z80Parser::AfShadowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAfShadowRegister(this);
}
Z80Parser::AfShadowRegisterContext* Z80Parser::afShadowRegister() {
AfShadowRegisterContext *_localctx = _tracker.createInstance<AfShadowRegisterContext>(_ctx, getState());
enterRule(_localctx, 28, Z80Parser::RuleAfShadowRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(748);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__22
|| _la == Z80Parser::T__23)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- BcShadowRegisterContext ------------------------------------------------------------------
Z80Parser::BcShadowRegisterContext::BcShadowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::BcShadowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleBcShadowRegister;
}
void Z80Parser::BcShadowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterBcShadowRegister(this);
}
void Z80Parser::BcShadowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitBcShadowRegister(this);
}
Z80Parser::BcShadowRegisterContext* Z80Parser::bcShadowRegister() {
BcShadowRegisterContext *_localctx = _tracker.createInstance<BcShadowRegisterContext>(_ctx, getState());
enterRule(_localctx, 30, Z80Parser::RuleBcShadowRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(750);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__24
|| _la == Z80Parser::T__25)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DeShadowRegisterContext ------------------------------------------------------------------
Z80Parser::DeShadowRegisterContext::DeShadowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::DeShadowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleDeShadowRegister;
}
void Z80Parser::DeShadowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDeShadowRegister(this);
}
void Z80Parser::DeShadowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDeShadowRegister(this);
}
Z80Parser::DeShadowRegisterContext* Z80Parser::deShadowRegister() {
DeShadowRegisterContext *_localctx = _tracker.createInstance<DeShadowRegisterContext>(_ctx, getState());
enterRule(_localctx, 32, Z80Parser::RuleDeShadowRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(752);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__26
|| _la == Z80Parser::T__27)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- HlShadowRegisterContext ------------------------------------------------------------------
Z80Parser::HlShadowRegisterContext::HlShadowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::HlShadowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleHlShadowRegister;
}
void Z80Parser::HlShadowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterHlShadowRegister(this);
}
void Z80Parser::HlShadowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitHlShadowRegister(this);
}
Z80Parser::HlShadowRegisterContext* Z80Parser::hlShadowRegister() {
HlShadowRegisterContext *_localctx = _tracker.createInstance<HlShadowRegisterContext>(_ctx, getState());
enterRule(_localctx, 34, Z80Parser::RuleHlShadowRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(754);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__28
|| _la == Z80Parser::T__29)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- BRegisterContext ------------------------------------------------------------------
Z80Parser::BRegisterContext::BRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::BShadowRegisterContext* Z80Parser::BRegisterContext::bShadowRegister() {
return getRuleContext<Z80Parser::BShadowRegisterContext>(0);
}
size_t Z80Parser::BRegisterContext::getRuleIndex() const {
return Z80Parser::RuleBRegister;
}
void Z80Parser::BRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterBRegister(this);
}
void Z80Parser::BRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitBRegister(this);
}
Z80Parser::BRegisterContext* Z80Parser::bRegister() {
BRegisterContext *_localctx = _tracker.createInstance<BRegisterContext>(_ctx, getState());
enterRule(_localctx, 36, Z80Parser::RuleBRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(759);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__30: {
enterOuterAlt(_localctx, 1);
setState(756);
match(Z80Parser::T__30);
break;
}
case Z80Parser::T__31: {
enterOuterAlt(_localctx, 2);
setState(757);
match(Z80Parser::T__31);
break;
}
case Z80Parser::T__4:
case Z80Parser::T__5: {
enterOuterAlt(_localctx, 3);
setState(758);
bShadowRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CRegisterContext ------------------------------------------------------------------
Z80Parser::CRegisterContext::CRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::CShadowRegisterContext* Z80Parser::CRegisterContext::cShadowRegister() {
return getRuleContext<Z80Parser::CShadowRegisterContext>(0);
}
size_t Z80Parser::CRegisterContext::getRuleIndex() const {
return Z80Parser::RuleCRegister;
}
void Z80Parser::CRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCRegister(this);
}
void Z80Parser::CRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCRegister(this);
}
Z80Parser::CRegisterContext* Z80Parser::cRegister() {
CRegisterContext *_localctx = _tracker.createInstance<CRegisterContext>(_ctx, getState());
enterRule(_localctx, 38, Z80Parser::RuleCRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(764);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__32: {
enterOuterAlt(_localctx, 1);
setState(761);
match(Z80Parser::T__32);
break;
}
case Z80Parser::T__33: {
enterOuterAlt(_localctx, 2);
setState(762);
match(Z80Parser::T__33);
break;
}
case Z80Parser::T__6:
case Z80Parser::T__7: {
enterOuterAlt(_localctx, 3);
setState(763);
cShadowRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- BcRegisterContext ------------------------------------------------------------------
Z80Parser::BcRegisterContext::BcRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::BcShadowRegisterContext* Z80Parser::BcRegisterContext::bcShadowRegister() {
return getRuleContext<Z80Parser::BcShadowRegisterContext>(0);
}
size_t Z80Parser::BcRegisterContext::getRuleIndex() const {
return Z80Parser::RuleBcRegister;
}
void Z80Parser::BcRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterBcRegister(this);
}
void Z80Parser::BcRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitBcRegister(this);
}
Z80Parser::BcRegisterContext* Z80Parser::bcRegister() {
BcRegisterContext *_localctx = _tracker.createInstance<BcRegisterContext>(_ctx, getState());
enterRule(_localctx, 40, Z80Parser::RuleBcRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(769);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__34: {
enterOuterAlt(_localctx, 1);
setState(766);
match(Z80Parser::T__34);
break;
}
case Z80Parser::T__35: {
enterOuterAlt(_localctx, 2);
setState(767);
match(Z80Parser::T__35);
break;
}
case Z80Parser::T__24:
case Z80Parser::T__25: {
enterOuterAlt(_localctx, 3);
setState(768);
bcShadowRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DRegisterContext ------------------------------------------------------------------
Z80Parser::DRegisterContext::DRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::DShadowRegisterContext* Z80Parser::DRegisterContext::dShadowRegister() {
return getRuleContext<Z80Parser::DShadowRegisterContext>(0);
}
size_t Z80Parser::DRegisterContext::getRuleIndex() const {
return Z80Parser::RuleDRegister;
}
void Z80Parser::DRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDRegister(this);
}
void Z80Parser::DRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDRegister(this);
}
Z80Parser::DRegisterContext* Z80Parser::dRegister() {
DRegisterContext *_localctx = _tracker.createInstance<DRegisterContext>(_ctx, getState());
enterRule(_localctx, 42, Z80Parser::RuleDRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(774);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__36: {
enterOuterAlt(_localctx, 1);
setState(771);
match(Z80Parser::T__36);
break;
}
case Z80Parser::T__37: {
enterOuterAlt(_localctx, 2);
setState(772);
match(Z80Parser::T__37);
break;
}
case Z80Parser::T__8:
case Z80Parser::T__9: {
enterOuterAlt(_localctx, 3);
setState(773);
dShadowRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ERegisterContext ------------------------------------------------------------------
Z80Parser::ERegisterContext::ERegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::EShadowRegisterContext* Z80Parser::ERegisterContext::eShadowRegister() {
return getRuleContext<Z80Parser::EShadowRegisterContext>(0);
}
size_t Z80Parser::ERegisterContext::getRuleIndex() const {
return Z80Parser::RuleERegister;
}
void Z80Parser::ERegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterERegister(this);
}
void Z80Parser::ERegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitERegister(this);
}
Z80Parser::ERegisterContext* Z80Parser::eRegister() {
ERegisterContext *_localctx = _tracker.createInstance<ERegisterContext>(_ctx, getState());
enterRule(_localctx, 44, Z80Parser::RuleERegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(779);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__38: {
enterOuterAlt(_localctx, 1);
setState(776);
match(Z80Parser::T__38);
break;
}
case Z80Parser::T__39: {
enterOuterAlt(_localctx, 2);
setState(777);
match(Z80Parser::T__39);
break;
}
case Z80Parser::T__10:
case Z80Parser::T__11: {
enterOuterAlt(_localctx, 3);
setState(778);
eShadowRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DeRegisterContext ------------------------------------------------------------------
Z80Parser::DeRegisterContext::DeRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::DeShadowRegisterContext* Z80Parser::DeRegisterContext::deShadowRegister() {
return getRuleContext<Z80Parser::DeShadowRegisterContext>(0);
}
size_t Z80Parser::DeRegisterContext::getRuleIndex() const {
return Z80Parser::RuleDeRegister;
}
void Z80Parser::DeRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDeRegister(this);
}
void Z80Parser::DeRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDeRegister(this);
}
Z80Parser::DeRegisterContext* Z80Parser::deRegister() {
DeRegisterContext *_localctx = _tracker.createInstance<DeRegisterContext>(_ctx, getState());
enterRule(_localctx, 46, Z80Parser::RuleDeRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(784);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__40: {
enterOuterAlt(_localctx, 1);
setState(781);
match(Z80Parser::T__40);
break;
}
case Z80Parser::T__41: {
enterOuterAlt(_localctx, 2);
setState(782);
match(Z80Parser::T__41);
break;
}
case Z80Parser::T__26:
case Z80Parser::T__27: {
enterOuterAlt(_localctx, 3);
setState(783);
deShadowRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- HRegisterContext ------------------------------------------------------------------
Z80Parser::HRegisterContext::HRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::HShadowRegisterContext* Z80Parser::HRegisterContext::hShadowRegister() {
return getRuleContext<Z80Parser::HShadowRegisterContext>(0);
}
size_t Z80Parser::HRegisterContext::getRuleIndex() const {
return Z80Parser::RuleHRegister;
}
void Z80Parser::HRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterHRegister(this);
}
void Z80Parser::HRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitHRegister(this);
}
Z80Parser::HRegisterContext* Z80Parser::hRegister() {
HRegisterContext *_localctx = _tracker.createInstance<HRegisterContext>(_ctx, getState());
enterRule(_localctx, 48, Z80Parser::RuleHRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(789);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__42: {
enterOuterAlt(_localctx, 1);
setState(786);
match(Z80Parser::T__42);
break;
}
case Z80Parser::T__43: {
enterOuterAlt(_localctx, 2);
setState(787);
match(Z80Parser::T__43);
break;
}
case Z80Parser::T__12:
case Z80Parser::T__13: {
enterOuterAlt(_localctx, 3);
setState(788);
hShadowRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LRegisterContext ------------------------------------------------------------------
Z80Parser::LRegisterContext::LRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LShadowRegisterContext* Z80Parser::LRegisterContext::lShadowRegister() {
return getRuleContext<Z80Parser::LShadowRegisterContext>(0);
}
size_t Z80Parser::LRegisterContext::getRuleIndex() const {
return Z80Parser::RuleLRegister;
}
void Z80Parser::LRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLRegister(this);
}
void Z80Parser::LRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLRegister(this);
}
Z80Parser::LRegisterContext* Z80Parser::lRegister() {
LRegisterContext *_localctx = _tracker.createInstance<LRegisterContext>(_ctx, getState());
enterRule(_localctx, 50, Z80Parser::RuleLRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(794);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__44: {
enterOuterAlt(_localctx, 1);
setState(791);
match(Z80Parser::T__44);
break;
}
case Z80Parser::T__45: {
enterOuterAlt(_localctx, 2);
setState(792);
match(Z80Parser::T__45);
break;
}
case Z80Parser::T__14:
case Z80Parser::T__15: {
enterOuterAlt(_localctx, 3);
setState(793);
lShadowRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- HlRegisterContext ------------------------------------------------------------------
Z80Parser::HlRegisterContext::HlRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::HlShadowRegisterContext* Z80Parser::HlRegisterContext::hlShadowRegister() {
return getRuleContext<Z80Parser::HlShadowRegisterContext>(0);
}
size_t Z80Parser::HlRegisterContext::getRuleIndex() const {
return Z80Parser::RuleHlRegister;
}
void Z80Parser::HlRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterHlRegister(this);
}
void Z80Parser::HlRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitHlRegister(this);
}
Z80Parser::HlRegisterContext* Z80Parser::hlRegister() {
HlRegisterContext *_localctx = _tracker.createInstance<HlRegisterContext>(_ctx, getState());
enterRule(_localctx, 52, Z80Parser::RuleHlRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(799);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__46: {
enterOuterAlt(_localctx, 1);
setState(796);
match(Z80Parser::T__46);
break;
}
case Z80Parser::T__47: {
enterOuterAlt(_localctx, 2);
setState(797);
match(Z80Parser::T__47);
break;
}
case Z80Parser::T__28:
case Z80Parser::T__29: {
enterOuterAlt(_localctx, 3);
setState(798);
hlShadowRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IRegisterContext ------------------------------------------------------------------
Z80Parser::IRegisterContext::IRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::IRegisterContext::getRuleIndex() const {
return Z80Parser::RuleIRegister;
}
void Z80Parser::IRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIRegister(this);
}
void Z80Parser::IRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIRegister(this);
}
Z80Parser::IRegisterContext* Z80Parser::iRegister() {
IRegisterContext *_localctx = _tracker.createInstance<IRegisterContext>(_ctx, getState());
enterRule(_localctx, 54, Z80Parser::RuleIRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(801);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__48
|| _la == Z80Parser::T__49)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RRegisterContext ------------------------------------------------------------------
Z80Parser::RRegisterContext::RRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::RRegisterContext::getRuleIndex() const {
return Z80Parser::RuleRRegister;
}
void Z80Parser::RRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRRegister(this);
}
void Z80Parser::RRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRRegister(this);
}
Z80Parser::RRegisterContext* Z80Parser::rRegister() {
RRegisterContext *_localctx = _tracker.createInstance<RRegisterContext>(_ctx, getState());
enterRule(_localctx, 56, Z80Parser::RuleRRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(803);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__50
|| _la == Z80Parser::T__51)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IxRegisterContext ------------------------------------------------------------------
Z80Parser::IxRegisterContext::IxRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::IxRegisterContext::getRuleIndex() const {
return Z80Parser::RuleIxRegister;
}
void Z80Parser::IxRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIxRegister(this);
}
void Z80Parser::IxRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIxRegister(this);
}
Z80Parser::IxRegisterContext* Z80Parser::ixRegister() {
IxRegisterContext *_localctx = _tracker.createInstance<IxRegisterContext>(_ctx, getState());
enterRule(_localctx, 58, Z80Parser::RuleIxRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(805);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__52
|| _la == Z80Parser::T__53)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IyRegisterContext ------------------------------------------------------------------
Z80Parser::IyRegisterContext::IyRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::IyRegisterContext::getRuleIndex() const {
return Z80Parser::RuleIyRegister;
}
void Z80Parser::IyRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIyRegister(this);
}
void Z80Parser::IyRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIyRegister(this);
}
Z80Parser::IyRegisterContext* Z80Parser::iyRegister() {
IyRegisterContext *_localctx = _tracker.createInstance<IyRegisterContext>(_ctx, getState());
enterRule(_localctx, 60, Z80Parser::RuleIyRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(807);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__54
|| _la == Z80Parser::T__55)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IxHighRegisterContext ------------------------------------------------------------------
Z80Parser::IxHighRegisterContext::IxHighRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::IxHighRegisterContext::getRuleIndex() const {
return Z80Parser::RuleIxHighRegister;
}
void Z80Parser::IxHighRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIxHighRegister(this);
}
void Z80Parser::IxHighRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIxHighRegister(this);
}
Z80Parser::IxHighRegisterContext* Z80Parser::ixHighRegister() {
IxHighRegisterContext *_localctx = _tracker.createInstance<IxHighRegisterContext>(_ctx, getState());
enterRule(_localctx, 62, Z80Parser::RuleIxHighRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(809);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__56
|| _la == Z80Parser::T__57)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IxLowRegisterContext ------------------------------------------------------------------
Z80Parser::IxLowRegisterContext::IxLowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::IxLowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleIxLowRegister;
}
void Z80Parser::IxLowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIxLowRegister(this);
}
void Z80Parser::IxLowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIxLowRegister(this);
}
Z80Parser::IxLowRegisterContext* Z80Parser::ixLowRegister() {
IxLowRegisterContext *_localctx = _tracker.createInstance<IxLowRegisterContext>(_ctx, getState());
enterRule(_localctx, 64, Z80Parser::RuleIxLowRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(811);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__58
|| _la == Z80Parser::T__59)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IyHighRegisterContext ------------------------------------------------------------------
Z80Parser::IyHighRegisterContext::IyHighRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::IyHighRegisterContext::getRuleIndex() const {
return Z80Parser::RuleIyHighRegister;
}
void Z80Parser::IyHighRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIyHighRegister(this);
}
void Z80Parser::IyHighRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIyHighRegister(this);
}
Z80Parser::IyHighRegisterContext* Z80Parser::iyHighRegister() {
IyHighRegisterContext *_localctx = _tracker.createInstance<IyHighRegisterContext>(_ctx, getState());
enterRule(_localctx, 66, Z80Parser::RuleIyHighRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(813);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__60
|| _la == Z80Parser::T__61)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IyLowRegisterContext ------------------------------------------------------------------
Z80Parser::IyLowRegisterContext::IyLowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::IyLowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleIyLowRegister;
}
void Z80Parser::IyLowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIyLowRegister(this);
}
void Z80Parser::IyLowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIyLowRegister(this);
}
Z80Parser::IyLowRegisterContext* Z80Parser::iyLowRegister() {
IyLowRegisterContext *_localctx = _tracker.createInstance<IyLowRegisterContext>(_ctx, getState());
enterRule(_localctx, 68, Z80Parser::RuleIyLowRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(815);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__62
|| _la == Z80Parser::T__63)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SpRegisterContext ------------------------------------------------------------------
Z80Parser::SpRegisterContext::SpRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::SpRegisterContext::getRuleIndex() const {
return Z80Parser::RuleSpRegister;
}
void Z80Parser::SpRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSpRegister(this);
}
void Z80Parser::SpRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSpRegister(this);
}
Z80Parser::SpRegisterContext* Z80Parser::spRegister() {
SpRegisterContext *_localctx = _tracker.createInstance<SpRegisterContext>(_ctx, getState());
enterRule(_localctx, 70, Z80Parser::RuleSpRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(817);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__64
|| _la == Z80Parser::T__65)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- PcRegisterContext ------------------------------------------------------------------
Z80Parser::PcRegisterContext::PcRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::PcRegisterContext::getRuleIndex() const {
return Z80Parser::RulePcRegister;
}
void Z80Parser::PcRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterPcRegister(this);
}
void Z80Parser::PcRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitPcRegister(this);
}
Z80Parser::PcRegisterContext* Z80Parser::pcRegister() {
PcRegisterContext *_localctx = _tracker.createInstance<PcRegisterContext>(_ctx, getState());
enterRule(_localctx, 72, Z80Parser::RulePcRegister);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(819);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__66
|| _la == Z80Parser::T__67)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- HlPointerContext ------------------------------------------------------------------
Z80Parser::HlPointerContext::HlPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::HlRegisterContext* Z80Parser::HlPointerContext::hlRegister() {
return getRuleContext<Z80Parser::HlRegisterContext>(0);
}
size_t Z80Parser::HlPointerContext::getRuleIndex() const {
return Z80Parser::RuleHlPointer;
}
void Z80Parser::HlPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterHlPointer(this);
}
void Z80Parser::HlPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitHlPointer(this);
}
Z80Parser::HlPointerContext* Z80Parser::hlPointer() {
HlPointerContext *_localctx = _tracker.createInstance<HlPointerContext>(_ctx, getState());
enterRule(_localctx, 74, Z80Parser::RuleHlPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(821);
match(Z80Parser::T__68);
setState(822);
hlRegister();
setState(823);
match(Z80Parser::T__69);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- BcPointerContext ------------------------------------------------------------------
Z80Parser::BcPointerContext::BcPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::BcRegisterContext* Z80Parser::BcPointerContext::bcRegister() {
return getRuleContext<Z80Parser::BcRegisterContext>(0);
}
size_t Z80Parser::BcPointerContext::getRuleIndex() const {
return Z80Parser::RuleBcPointer;
}
void Z80Parser::BcPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterBcPointer(this);
}
void Z80Parser::BcPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitBcPointer(this);
}
Z80Parser::BcPointerContext* Z80Parser::bcPointer() {
BcPointerContext *_localctx = _tracker.createInstance<BcPointerContext>(_ctx, getState());
enterRule(_localctx, 76, Z80Parser::RuleBcPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(825);
match(Z80Parser::T__68);
setState(826);
bcRegister();
setState(827);
match(Z80Parser::T__69);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DePointerContext ------------------------------------------------------------------
Z80Parser::DePointerContext::DePointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::DeRegisterContext* Z80Parser::DePointerContext::deRegister() {
return getRuleContext<Z80Parser::DeRegisterContext>(0);
}
size_t Z80Parser::DePointerContext::getRuleIndex() const {
return Z80Parser::RuleDePointer;
}
void Z80Parser::DePointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDePointer(this);
}
void Z80Parser::DePointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDePointer(this);
}
Z80Parser::DePointerContext* Z80Parser::dePointer() {
DePointerContext *_localctx = _tracker.createInstance<DePointerContext>(_ctx, getState());
enterRule(_localctx, 78, Z80Parser::RuleDePointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(829);
match(Z80Parser::T__68);
setState(830);
deRegister();
setState(831);
match(Z80Parser::T__69);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SpPointerContext ------------------------------------------------------------------
Z80Parser::SpPointerContext::SpPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SpRegisterContext* Z80Parser::SpPointerContext::spRegister() {
return getRuleContext<Z80Parser::SpRegisterContext>(0);
}
size_t Z80Parser::SpPointerContext::getRuleIndex() const {
return Z80Parser::RuleSpPointer;
}
void Z80Parser::SpPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSpPointer(this);
}
void Z80Parser::SpPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSpPointer(this);
}
Z80Parser::SpPointerContext* Z80Parser::spPointer() {
SpPointerContext *_localctx = _tracker.createInstance<SpPointerContext>(_ctx, getState());
enterRule(_localctx, 80, Z80Parser::RuleSpPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(833);
match(Z80Parser::T__68);
setState(834);
spRegister();
setState(835);
match(Z80Parser::T__69);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CPointerContext ------------------------------------------------------------------
Z80Parser::CPointerContext::CPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::CRegisterContext* Z80Parser::CPointerContext::cRegister() {
return getRuleContext<Z80Parser::CRegisterContext>(0);
}
size_t Z80Parser::CPointerContext::getRuleIndex() const {
return Z80Parser::RuleCPointer;
}
void Z80Parser::CPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCPointer(this);
}
void Z80Parser::CPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCPointer(this);
}
Z80Parser::CPointerContext* Z80Parser::cPointer() {
CPointerContext *_localctx = _tracker.createInstance<CPointerContext>(_ctx, getState());
enterRule(_localctx, 82, Z80Parser::RuleCPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(837);
match(Z80Parser::T__68);
setState(838);
cRegister();
setState(839);
match(Z80Parser::T__69);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IxPointerWithOffsetContext ------------------------------------------------------------------
Z80Parser::IxPointerWithOffsetContext::IxPointerWithOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::IxRegisterContext* Z80Parser::IxPointerWithOffsetContext::ixRegister() {
return getRuleContext<Z80Parser::IxRegisterContext>(0);
}
Z80Parser::NumberContext* Z80Parser::IxPointerWithOffsetContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::IxPointerWithOffsetContext::getRuleIndex() const {
return Z80Parser::RuleIxPointerWithOffset;
}
void Z80Parser::IxPointerWithOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIxPointerWithOffset(this);
}
void Z80Parser::IxPointerWithOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIxPointerWithOffset(this);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::ixPointerWithOffset() {
IxPointerWithOffsetContext *_localctx = _tracker.createInstance<IxPointerWithOffsetContext>(_ctx, getState());
enterRule(_localctx, 84, Z80Parser::RuleIxPointerWithOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(841);
match(Z80Parser::T__68);
setState(842);
ixRegister();
setState(843);
match(Z80Parser::T__70);
setState(844);
number();
setState(845);
match(Z80Parser::T__69);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IyPointerWithOffsetContext ------------------------------------------------------------------
Z80Parser::IyPointerWithOffsetContext::IyPointerWithOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::IyRegisterContext* Z80Parser::IyPointerWithOffsetContext::iyRegister() {
return getRuleContext<Z80Parser::IyRegisterContext>(0);
}
Z80Parser::NumberContext* Z80Parser::IyPointerWithOffsetContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::IyPointerWithOffsetContext::getRuleIndex() const {
return Z80Parser::RuleIyPointerWithOffset;
}
void Z80Parser::IyPointerWithOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIyPointerWithOffset(this);
}
void Z80Parser::IyPointerWithOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIyPointerWithOffset(this);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::iyPointerWithOffset() {
IyPointerWithOffsetContext *_localctx = _tracker.createInstance<IyPointerWithOffsetContext>(_ctx, getState());
enterRule(_localctx, 86, Z80Parser::RuleIyPointerWithOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(847);
match(Z80Parser::T__68);
setState(848);
iyRegister();
setState(849);
match(Z80Parser::T__70);
setState(850);
number();
setState(851);
match(Z80Parser::T__69);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- NumberPointerContext ------------------------------------------------------------------
Z80Parser::NumberPointerContext::NumberPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::NumberContext* Z80Parser::NumberPointerContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::NumberPointerContext::getRuleIndex() const {
return Z80Parser::RuleNumberPointer;
}
void Z80Parser::NumberPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterNumberPointer(this);
}
void Z80Parser::NumberPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitNumberPointer(this);
}
Z80Parser::NumberPointerContext* Z80Parser::numberPointer() {
NumberPointerContext *_localctx = _tracker.createInstance<NumberPointerContext>(_ctx, getState());
enterRule(_localctx, 88, Z80Parser::RuleNumberPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(853);
match(Z80Parser::T__68);
setState(854);
number();
setState(855);
match(Z80Parser::T__69);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SimpleByteRegisterContext ------------------------------------------------------------------
Z80Parser::SimpleByteRegisterContext::SimpleByteRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::BRegisterContext* Z80Parser::SimpleByteRegisterContext::bRegister() {
return getRuleContext<Z80Parser::BRegisterContext>(0);
}
Z80Parser::CRegisterContext* Z80Parser::SimpleByteRegisterContext::cRegister() {
return getRuleContext<Z80Parser::CRegisterContext>(0);
}
Z80Parser::DRegisterContext* Z80Parser::SimpleByteRegisterContext::dRegister() {
return getRuleContext<Z80Parser::DRegisterContext>(0);
}
Z80Parser::ERegisterContext* Z80Parser::SimpleByteRegisterContext::eRegister() {
return getRuleContext<Z80Parser::ERegisterContext>(0);
}
Z80Parser::HRegisterContext* Z80Parser::SimpleByteRegisterContext::hRegister() {
return getRuleContext<Z80Parser::HRegisterContext>(0);
}
Z80Parser::LRegisterContext* Z80Parser::SimpleByteRegisterContext::lRegister() {
return getRuleContext<Z80Parser::LRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SimpleByteRegisterContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SimpleByteRegisterContext::getRuleIndex() const {
return Z80Parser::RuleSimpleByteRegister;
}
void Z80Parser::SimpleByteRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSimpleByteRegister(this);
}
void Z80Parser::SimpleByteRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSimpleByteRegister(this);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::simpleByteRegister() {
SimpleByteRegisterContext *_localctx = _tracker.createInstance<SimpleByteRegisterContext>(_ctx, getState());
enterRule(_localctx, 90, Z80Parser::RuleSimpleByteRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(864);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__4:
case Z80Parser::T__5:
case Z80Parser::T__30:
case Z80Parser::T__31: {
enterOuterAlt(_localctx, 1);
setState(857);
bRegister();
break;
}
case Z80Parser::T__6:
case Z80Parser::T__7:
case Z80Parser::T__32:
case Z80Parser::T__33: {
enterOuterAlt(_localctx, 2);
setState(858);
cRegister();
break;
}
case Z80Parser::T__8:
case Z80Parser::T__9:
case Z80Parser::T__36:
case Z80Parser::T__37: {
enterOuterAlt(_localctx, 3);
setState(859);
dRegister();
break;
}
case Z80Parser::T__10:
case Z80Parser::T__11:
case Z80Parser::T__38:
case Z80Parser::T__39: {
enterOuterAlt(_localctx, 4);
setState(860);
eRegister();
break;
}
case Z80Parser::T__12:
case Z80Parser::T__13:
case Z80Parser::T__42:
case Z80Parser::T__43: {
enterOuterAlt(_localctx, 5);
setState(861);
hRegister();
break;
}
case Z80Parser::T__14:
case Z80Parser::T__15:
case Z80Parser::T__44:
case Z80Parser::T__45: {
enterOuterAlt(_localctx, 6);
setState(862);
lRegister();
break;
}
case Z80Parser::T__0:
case Z80Parser::T__1:
case Z80Parser::T__16:
case Z80Parser::T__17: {
enterOuterAlt(_localctx, 7);
setState(863);
aRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadCommandNameContext ------------------------------------------------------------------
Z80Parser::LoadCommandNameContext::LoadCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::LoadCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleLoadCommandName;
}
void Z80Parser::LoadCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadCommandName(this);
}
void Z80Parser::LoadCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadCommandName(this);
}
Z80Parser::LoadCommandNameContext* Z80Parser::loadCommandName() {
LoadCommandNameContext *_localctx = _tracker.createInstance<LoadCommandNameContext>(_ctx, getState());
enterRule(_localctx, 92, Z80Parser::RuleLoadCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(866);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__71
|| _la == Z80Parser::T__72)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadByteRegisterWithByteRegisterContext ------------------------------------------------------------------
Z80Parser::LoadByteRegisterWithByteRegisterContext::LoadByteRegisterWithByteRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadByteRegisterWithByteRegisterContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
std::vector<Z80Parser::SimpleByteRegisterContext *> Z80Parser::LoadByteRegisterWithByteRegisterContext::simpleByteRegister() {
return getRuleContexts<Z80Parser::SimpleByteRegisterContext>();
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadByteRegisterWithByteRegisterContext::simpleByteRegister(size_t i) {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(i);
}
size_t Z80Parser::LoadByteRegisterWithByteRegisterContext::getRuleIndex() const {
return Z80Parser::RuleLoadByteRegisterWithByteRegister;
}
void Z80Parser::LoadByteRegisterWithByteRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadByteRegisterWithByteRegister(this);
}
void Z80Parser::LoadByteRegisterWithByteRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadByteRegisterWithByteRegister(this);
}
Z80Parser::LoadByteRegisterWithByteRegisterContext* Z80Parser::loadByteRegisterWithByteRegister() {
LoadByteRegisterWithByteRegisterContext *_localctx = _tracker.createInstance<LoadByteRegisterWithByteRegisterContext>(_ctx, getState());
enterRule(_localctx, 94, Z80Parser::RuleLoadByteRegisterWithByteRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(868);
loadCommandName();
setState(869);
dynamic_cast<LoadByteRegisterWithByteRegisterContext *>(_localctx)->dest = simpleByteRegister();
setState(870);
match(Z80Parser::T__73);
setState(871);
dynamic_cast<LoadByteRegisterWithByteRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadByteRegisterWithImmediateByteContext ------------------------------------------------------------------
Z80Parser::LoadByteRegisterWithImmediateByteContext::LoadByteRegisterWithImmediateByteContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadByteRegisterWithImmediateByteContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadByteRegisterWithImmediateByteContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::NumberContext* Z80Parser::LoadByteRegisterWithImmediateByteContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::LoadByteRegisterWithImmediateByteContext::getRuleIndex() const {
return Z80Parser::RuleLoadByteRegisterWithImmediateByte;
}
void Z80Parser::LoadByteRegisterWithImmediateByteContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadByteRegisterWithImmediateByte(this);
}
void Z80Parser::LoadByteRegisterWithImmediateByteContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadByteRegisterWithImmediateByte(this);
}
Z80Parser::LoadByteRegisterWithImmediateByteContext* Z80Parser::loadByteRegisterWithImmediateByte() {
LoadByteRegisterWithImmediateByteContext *_localctx = _tracker.createInstance<LoadByteRegisterWithImmediateByteContext>(_ctx, getState());
enterRule(_localctx, 96, Z80Parser::RuleLoadByteRegisterWithImmediateByte);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(873);
loadCommandName();
setState(874);
dynamic_cast<LoadByteRegisterWithImmediateByteContext *>(_localctx)->dest = simpleByteRegister();
setState(875);
match(Z80Parser::T__73);
setState(876);
dynamic_cast<LoadByteRegisterWithImmediateByteContext *>(_localctx)->source = number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadByteRegisterWithHLPointerContext ------------------------------------------------------------------
Z80Parser::LoadByteRegisterWithHLPointerContext::LoadByteRegisterWithHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadByteRegisterWithHLPointerContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadByteRegisterWithHLPointerContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::LoadByteRegisterWithHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
size_t Z80Parser::LoadByteRegisterWithHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleLoadByteRegisterWithHLPointer;
}
void Z80Parser::LoadByteRegisterWithHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadByteRegisterWithHLPointer(this);
}
void Z80Parser::LoadByteRegisterWithHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadByteRegisterWithHLPointer(this);
}
Z80Parser::LoadByteRegisterWithHLPointerContext* Z80Parser::loadByteRegisterWithHLPointer() {
LoadByteRegisterWithHLPointerContext *_localctx = _tracker.createInstance<LoadByteRegisterWithHLPointerContext>(_ctx, getState());
enterRule(_localctx, 98, Z80Parser::RuleLoadByteRegisterWithHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(878);
loadCommandName();
setState(879);
dynamic_cast<LoadByteRegisterWithHLPointerContext *>(_localctx)->dest = simpleByteRegister();
setState(880);
match(Z80Parser::T__73);
setState(881);
dynamic_cast<LoadByteRegisterWithHLPointerContext *>(_localctx)->source = hlPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadByteRegisterWithIXOffsetContext ------------------------------------------------------------------
Z80Parser::LoadByteRegisterWithIXOffsetContext::LoadByteRegisterWithIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadByteRegisterWithIXOffsetContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadByteRegisterWithIXOffsetContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::LoadByteRegisterWithIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
size_t Z80Parser::LoadByteRegisterWithIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleLoadByteRegisterWithIXOffset;
}
void Z80Parser::LoadByteRegisterWithIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadByteRegisterWithIXOffset(this);
}
void Z80Parser::LoadByteRegisterWithIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadByteRegisterWithIXOffset(this);
}
Z80Parser::LoadByteRegisterWithIXOffsetContext* Z80Parser::loadByteRegisterWithIXOffset() {
LoadByteRegisterWithIXOffsetContext *_localctx = _tracker.createInstance<LoadByteRegisterWithIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 100, Z80Parser::RuleLoadByteRegisterWithIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(883);
loadCommandName();
setState(884);
dynamic_cast<LoadByteRegisterWithIXOffsetContext *>(_localctx)->dest = simpleByteRegister();
setState(885);
match(Z80Parser::T__73);
setState(886);
dynamic_cast<LoadByteRegisterWithIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadByteRegisterWithIYOffsetContext ------------------------------------------------------------------
Z80Parser::LoadByteRegisterWithIYOffsetContext::LoadByteRegisterWithIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadByteRegisterWithIYOffsetContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadByteRegisterWithIYOffsetContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::LoadByteRegisterWithIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
size_t Z80Parser::LoadByteRegisterWithIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleLoadByteRegisterWithIYOffset;
}
void Z80Parser::LoadByteRegisterWithIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadByteRegisterWithIYOffset(this);
}
void Z80Parser::LoadByteRegisterWithIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadByteRegisterWithIYOffset(this);
}
Z80Parser::LoadByteRegisterWithIYOffsetContext* Z80Parser::loadByteRegisterWithIYOffset() {
LoadByteRegisterWithIYOffsetContext *_localctx = _tracker.createInstance<LoadByteRegisterWithIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 102, Z80Parser::RuleLoadByteRegisterWithIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(888);
loadCommandName();
setState(889);
dynamic_cast<LoadByteRegisterWithIYOffsetContext *>(_localctx)->dest = simpleByteRegister();
setState(890);
match(Z80Parser::T__73);
setState(891);
dynamic_cast<LoadByteRegisterWithIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadHLPointerWithRegisterContext ------------------------------------------------------------------
Z80Parser::LoadHLPointerWithRegisterContext::LoadHLPointerWithRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadHLPointerWithRegisterContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::LoadHLPointerWithRegisterContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadHLPointerWithRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::LoadHLPointerWithRegisterContext::getRuleIndex() const {
return Z80Parser::RuleLoadHLPointerWithRegister;
}
void Z80Parser::LoadHLPointerWithRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadHLPointerWithRegister(this);
}
void Z80Parser::LoadHLPointerWithRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadHLPointerWithRegister(this);
}
Z80Parser::LoadHLPointerWithRegisterContext* Z80Parser::loadHLPointerWithRegister() {
LoadHLPointerWithRegisterContext *_localctx = _tracker.createInstance<LoadHLPointerWithRegisterContext>(_ctx, getState());
enterRule(_localctx, 104, Z80Parser::RuleLoadHLPointerWithRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(893);
loadCommandName();
setState(894);
dynamic_cast<LoadHLPointerWithRegisterContext *>(_localctx)->dest = hlPointer();
setState(895);
match(Z80Parser::T__73);
setState(896);
dynamic_cast<LoadHLPointerWithRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadIXOffsetWithRegisterContext ------------------------------------------------------------------
Z80Parser::LoadIXOffsetWithRegisterContext::LoadIXOffsetWithRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadIXOffsetWithRegisterContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::LoadIXOffsetWithRegisterContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadIXOffsetWithRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::LoadIXOffsetWithRegisterContext::getRuleIndex() const {
return Z80Parser::RuleLoadIXOffsetWithRegister;
}
void Z80Parser::LoadIXOffsetWithRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadIXOffsetWithRegister(this);
}
void Z80Parser::LoadIXOffsetWithRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadIXOffsetWithRegister(this);
}
Z80Parser::LoadIXOffsetWithRegisterContext* Z80Parser::loadIXOffsetWithRegister() {
LoadIXOffsetWithRegisterContext *_localctx = _tracker.createInstance<LoadIXOffsetWithRegisterContext>(_ctx, getState());
enterRule(_localctx, 106, Z80Parser::RuleLoadIXOffsetWithRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(898);
loadCommandName();
setState(899);
dynamic_cast<LoadIXOffsetWithRegisterContext *>(_localctx)->dest = ixPointerWithOffset();
setState(900);
match(Z80Parser::T__73);
setState(901);
dynamic_cast<LoadIXOffsetWithRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadIYOffsetWithRegisterContext ------------------------------------------------------------------
Z80Parser::LoadIYOffsetWithRegisterContext::LoadIYOffsetWithRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadIYOffsetWithRegisterContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::LoadIYOffsetWithRegisterContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadIYOffsetWithRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::LoadIYOffsetWithRegisterContext::getRuleIndex() const {
return Z80Parser::RuleLoadIYOffsetWithRegister;
}
void Z80Parser::LoadIYOffsetWithRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadIYOffsetWithRegister(this);
}
void Z80Parser::LoadIYOffsetWithRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadIYOffsetWithRegister(this);
}
Z80Parser::LoadIYOffsetWithRegisterContext* Z80Parser::loadIYOffsetWithRegister() {
LoadIYOffsetWithRegisterContext *_localctx = _tracker.createInstance<LoadIYOffsetWithRegisterContext>(_ctx, getState());
enterRule(_localctx, 108, Z80Parser::RuleLoadIYOffsetWithRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(903);
loadCommandName();
setState(904);
dynamic_cast<LoadIYOffsetWithRegisterContext *>(_localctx)->dest = iyPointerWithOffset();
setState(905);
match(Z80Parser::T__73);
setState(906);
dynamic_cast<LoadIYOffsetWithRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadHLPointerWithImmediateByteContext ------------------------------------------------------------------
Z80Parser::LoadHLPointerWithImmediateByteContext::LoadHLPointerWithImmediateByteContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadHLPointerWithImmediateByteContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::LoadHLPointerWithImmediateByteContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
Z80Parser::NumberContext* Z80Parser::LoadHLPointerWithImmediateByteContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::LoadHLPointerWithImmediateByteContext::getRuleIndex() const {
return Z80Parser::RuleLoadHLPointerWithImmediateByte;
}
void Z80Parser::LoadHLPointerWithImmediateByteContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadHLPointerWithImmediateByte(this);
}
void Z80Parser::LoadHLPointerWithImmediateByteContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadHLPointerWithImmediateByte(this);
}
Z80Parser::LoadHLPointerWithImmediateByteContext* Z80Parser::loadHLPointerWithImmediateByte() {
LoadHLPointerWithImmediateByteContext *_localctx = _tracker.createInstance<LoadHLPointerWithImmediateByteContext>(_ctx, getState());
enterRule(_localctx, 110, Z80Parser::RuleLoadHLPointerWithImmediateByte);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(908);
loadCommandName();
setState(909);
dynamic_cast<LoadHLPointerWithImmediateByteContext *>(_localctx)->dest = hlPointer();
setState(910);
match(Z80Parser::T__73);
setState(911);
dynamic_cast<LoadHLPointerWithImmediateByteContext *>(_localctx)->source = number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadIXOffsetWithImmediateByteContext ------------------------------------------------------------------
Z80Parser::LoadIXOffsetWithImmediateByteContext::LoadIXOffsetWithImmediateByteContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadIXOffsetWithImmediateByteContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::LoadIXOffsetWithImmediateByteContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
Z80Parser::NumberContext* Z80Parser::LoadIXOffsetWithImmediateByteContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::LoadIXOffsetWithImmediateByteContext::getRuleIndex() const {
return Z80Parser::RuleLoadIXOffsetWithImmediateByte;
}
void Z80Parser::LoadIXOffsetWithImmediateByteContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadIXOffsetWithImmediateByte(this);
}
void Z80Parser::LoadIXOffsetWithImmediateByteContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadIXOffsetWithImmediateByte(this);
}
Z80Parser::LoadIXOffsetWithImmediateByteContext* Z80Parser::loadIXOffsetWithImmediateByte() {
LoadIXOffsetWithImmediateByteContext *_localctx = _tracker.createInstance<LoadIXOffsetWithImmediateByteContext>(_ctx, getState());
enterRule(_localctx, 112, Z80Parser::RuleLoadIXOffsetWithImmediateByte);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(913);
loadCommandName();
setState(914);
dynamic_cast<LoadIXOffsetWithImmediateByteContext *>(_localctx)->dest = ixPointerWithOffset();
setState(915);
match(Z80Parser::T__73);
setState(916);
dynamic_cast<LoadIXOffsetWithImmediateByteContext *>(_localctx)->source = number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadIYOffsetWithImmediateByteContext ------------------------------------------------------------------
Z80Parser::LoadIYOffsetWithImmediateByteContext::LoadIYOffsetWithImmediateByteContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadIYOffsetWithImmediateByteContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::LoadIYOffsetWithImmediateByteContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
Z80Parser::NumberContext* Z80Parser::LoadIYOffsetWithImmediateByteContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::LoadIYOffsetWithImmediateByteContext::getRuleIndex() const {
return Z80Parser::RuleLoadIYOffsetWithImmediateByte;
}
void Z80Parser::LoadIYOffsetWithImmediateByteContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadIYOffsetWithImmediateByte(this);
}
void Z80Parser::LoadIYOffsetWithImmediateByteContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadIYOffsetWithImmediateByte(this);
}
Z80Parser::LoadIYOffsetWithImmediateByteContext* Z80Parser::loadIYOffsetWithImmediateByte() {
LoadIYOffsetWithImmediateByteContext *_localctx = _tracker.createInstance<LoadIYOffsetWithImmediateByteContext>(_ctx, getState());
enterRule(_localctx, 114, Z80Parser::RuleLoadIYOffsetWithImmediateByte);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(918);
loadCommandName();
setState(919);
dynamic_cast<LoadIYOffsetWithImmediateByteContext *>(_localctx)->dest = iyPointerWithOffset();
setState(920);
match(Z80Parser::T__73);
setState(921);
dynamic_cast<LoadIYOffsetWithImmediateByteContext *>(_localctx)->source = number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadAWithBCPointerContext ------------------------------------------------------------------
Z80Parser::LoadAWithBCPointerContext::LoadAWithBCPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadAWithBCPointerContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::LoadAWithBCPointerContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
Z80Parser::BcPointerContext* Z80Parser::LoadAWithBCPointerContext::bcPointer() {
return getRuleContext<Z80Parser::BcPointerContext>(0);
}
size_t Z80Parser::LoadAWithBCPointerContext::getRuleIndex() const {
return Z80Parser::RuleLoadAWithBCPointer;
}
void Z80Parser::LoadAWithBCPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadAWithBCPointer(this);
}
void Z80Parser::LoadAWithBCPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadAWithBCPointer(this);
}
Z80Parser::LoadAWithBCPointerContext* Z80Parser::loadAWithBCPointer() {
LoadAWithBCPointerContext *_localctx = _tracker.createInstance<LoadAWithBCPointerContext>(_ctx, getState());
enterRule(_localctx, 116, Z80Parser::RuleLoadAWithBCPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(923);
loadCommandName();
setState(924);
dynamic_cast<LoadAWithBCPointerContext *>(_localctx)->dest = aRegister();
setState(925);
match(Z80Parser::T__73);
setState(926);
dynamic_cast<LoadAWithBCPointerContext *>(_localctx)->source = bcPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadAWithDEPointerContext ------------------------------------------------------------------
Z80Parser::LoadAWithDEPointerContext::LoadAWithDEPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadAWithDEPointerContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::LoadAWithDEPointerContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
Z80Parser::DePointerContext* Z80Parser::LoadAWithDEPointerContext::dePointer() {
return getRuleContext<Z80Parser::DePointerContext>(0);
}
size_t Z80Parser::LoadAWithDEPointerContext::getRuleIndex() const {
return Z80Parser::RuleLoadAWithDEPointer;
}
void Z80Parser::LoadAWithDEPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadAWithDEPointer(this);
}
void Z80Parser::LoadAWithDEPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadAWithDEPointer(this);
}
Z80Parser::LoadAWithDEPointerContext* Z80Parser::loadAWithDEPointer() {
LoadAWithDEPointerContext *_localctx = _tracker.createInstance<LoadAWithDEPointerContext>(_ctx, getState());
enterRule(_localctx, 118, Z80Parser::RuleLoadAWithDEPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(928);
loadCommandName();
setState(929);
dynamic_cast<LoadAWithDEPointerContext *>(_localctx)->dest = aRegister();
setState(930);
match(Z80Parser::T__73);
setState(931);
dynamic_cast<LoadAWithDEPointerContext *>(_localctx)->source = dePointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadAWithNNPointerContext ------------------------------------------------------------------
Z80Parser::LoadAWithNNPointerContext::LoadAWithNNPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadAWithNNPointerContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::LoadAWithNNPointerContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
Z80Parser::NumberPointerContext* Z80Parser::LoadAWithNNPointerContext::numberPointer() {
return getRuleContext<Z80Parser::NumberPointerContext>(0);
}
size_t Z80Parser::LoadAWithNNPointerContext::getRuleIndex() const {
return Z80Parser::RuleLoadAWithNNPointer;
}
void Z80Parser::LoadAWithNNPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadAWithNNPointer(this);
}
void Z80Parser::LoadAWithNNPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadAWithNNPointer(this);
}
Z80Parser::LoadAWithNNPointerContext* Z80Parser::loadAWithNNPointer() {
LoadAWithNNPointerContext *_localctx = _tracker.createInstance<LoadAWithNNPointerContext>(_ctx, getState());
enterRule(_localctx, 120, Z80Parser::RuleLoadAWithNNPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(933);
loadCommandName();
setState(934);
dynamic_cast<LoadAWithNNPointerContext *>(_localctx)->dest = aRegister();
setState(935);
match(Z80Parser::T__73);
setState(936);
dynamic_cast<LoadAWithNNPointerContext *>(_localctx)->source = numberPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadBCPointerWithAContext ------------------------------------------------------------------
Z80Parser::LoadBCPointerWithAContext::LoadBCPointerWithAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadBCPointerWithAContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::BcPointerContext* Z80Parser::LoadBCPointerWithAContext::bcPointer() {
return getRuleContext<Z80Parser::BcPointerContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::LoadBCPointerWithAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::LoadBCPointerWithAContext::getRuleIndex() const {
return Z80Parser::RuleLoadBCPointerWithA;
}
void Z80Parser::LoadBCPointerWithAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadBCPointerWithA(this);
}
void Z80Parser::LoadBCPointerWithAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadBCPointerWithA(this);
}
Z80Parser::LoadBCPointerWithAContext* Z80Parser::loadBCPointerWithA() {
LoadBCPointerWithAContext *_localctx = _tracker.createInstance<LoadBCPointerWithAContext>(_ctx, getState());
enterRule(_localctx, 122, Z80Parser::RuleLoadBCPointerWithA);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(938);
loadCommandName();
setState(939);
dynamic_cast<LoadBCPointerWithAContext *>(_localctx)->dest = bcPointer();
setState(940);
match(Z80Parser::T__73);
setState(941);
dynamic_cast<LoadBCPointerWithAContext *>(_localctx)->source = aRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadDEPointerWithAContext ------------------------------------------------------------------
Z80Parser::LoadDEPointerWithAContext::LoadDEPointerWithAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadDEPointerWithAContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::DePointerContext* Z80Parser::LoadDEPointerWithAContext::dePointer() {
return getRuleContext<Z80Parser::DePointerContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::LoadDEPointerWithAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::LoadDEPointerWithAContext::getRuleIndex() const {
return Z80Parser::RuleLoadDEPointerWithA;
}
void Z80Parser::LoadDEPointerWithAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadDEPointerWithA(this);
}
void Z80Parser::LoadDEPointerWithAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadDEPointerWithA(this);
}
Z80Parser::LoadDEPointerWithAContext* Z80Parser::loadDEPointerWithA() {
LoadDEPointerWithAContext *_localctx = _tracker.createInstance<LoadDEPointerWithAContext>(_ctx, getState());
enterRule(_localctx, 124, Z80Parser::RuleLoadDEPointerWithA);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(943);
loadCommandName();
setState(944);
dynamic_cast<LoadDEPointerWithAContext *>(_localctx)->dest = dePointer();
setState(945);
match(Z80Parser::T__73);
setState(946);
dynamic_cast<LoadDEPointerWithAContext *>(_localctx)->source = aRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadNNPointerWithAContext ------------------------------------------------------------------
Z80Parser::LoadNNPointerWithAContext::LoadNNPointerWithAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadNNPointerWithAContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::NumberPointerContext* Z80Parser::LoadNNPointerWithAContext::numberPointer() {
return getRuleContext<Z80Parser::NumberPointerContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::LoadNNPointerWithAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::LoadNNPointerWithAContext::getRuleIndex() const {
return Z80Parser::RuleLoadNNPointerWithA;
}
void Z80Parser::LoadNNPointerWithAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadNNPointerWithA(this);
}
void Z80Parser::LoadNNPointerWithAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadNNPointerWithA(this);
}
Z80Parser::LoadNNPointerWithAContext* Z80Parser::loadNNPointerWithA() {
LoadNNPointerWithAContext *_localctx = _tracker.createInstance<LoadNNPointerWithAContext>(_ctx, getState());
enterRule(_localctx, 126, Z80Parser::RuleLoadNNPointerWithA);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(948);
loadCommandName();
setState(949);
dynamic_cast<LoadNNPointerWithAContext *>(_localctx)->dest = numberPointer();
setState(950);
match(Z80Parser::T__73);
setState(951);
dynamic_cast<LoadNNPointerWithAContext *>(_localctx)->source = aRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadAWithIContext ------------------------------------------------------------------
Z80Parser::LoadAWithIContext::LoadAWithIContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadAWithIContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::LoadAWithIContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
Z80Parser::IRegisterContext* Z80Parser::LoadAWithIContext::iRegister() {
return getRuleContext<Z80Parser::IRegisterContext>(0);
}
size_t Z80Parser::LoadAWithIContext::getRuleIndex() const {
return Z80Parser::RuleLoadAWithI;
}
void Z80Parser::LoadAWithIContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadAWithI(this);
}
void Z80Parser::LoadAWithIContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadAWithI(this);
}
Z80Parser::LoadAWithIContext* Z80Parser::loadAWithI() {
LoadAWithIContext *_localctx = _tracker.createInstance<LoadAWithIContext>(_ctx, getState());
enterRule(_localctx, 128, Z80Parser::RuleLoadAWithI);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(953);
loadCommandName();
setState(954);
dynamic_cast<LoadAWithIContext *>(_localctx)->dest = aRegister();
setState(955);
match(Z80Parser::T__73);
setState(956);
dynamic_cast<LoadAWithIContext *>(_localctx)->source = iRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadAWithRContext ------------------------------------------------------------------
Z80Parser::LoadAWithRContext::LoadAWithRContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadAWithRContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::LoadAWithRContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
Z80Parser::RRegisterContext* Z80Parser::LoadAWithRContext::rRegister() {
return getRuleContext<Z80Parser::RRegisterContext>(0);
}
size_t Z80Parser::LoadAWithRContext::getRuleIndex() const {
return Z80Parser::RuleLoadAWithR;
}
void Z80Parser::LoadAWithRContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadAWithR(this);
}
void Z80Parser::LoadAWithRContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadAWithR(this);
}
Z80Parser::LoadAWithRContext* Z80Parser::loadAWithR() {
LoadAWithRContext *_localctx = _tracker.createInstance<LoadAWithRContext>(_ctx, getState());
enterRule(_localctx, 130, Z80Parser::RuleLoadAWithR);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(958);
loadCommandName();
setState(959);
dynamic_cast<LoadAWithRContext *>(_localctx)->dest = aRegister();
setState(960);
match(Z80Parser::T__73);
setState(961);
dynamic_cast<LoadAWithRContext *>(_localctx)->source = rRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadIWithAContext ------------------------------------------------------------------
Z80Parser::LoadIWithAContext::LoadIWithAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadIWithAContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::IRegisterContext* Z80Parser::LoadIWithAContext::iRegister() {
return getRuleContext<Z80Parser::IRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::LoadIWithAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::LoadIWithAContext::getRuleIndex() const {
return Z80Parser::RuleLoadIWithA;
}
void Z80Parser::LoadIWithAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadIWithA(this);
}
void Z80Parser::LoadIWithAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadIWithA(this);
}
Z80Parser::LoadIWithAContext* Z80Parser::loadIWithA() {
LoadIWithAContext *_localctx = _tracker.createInstance<LoadIWithAContext>(_ctx, getState());
enterRule(_localctx, 132, Z80Parser::RuleLoadIWithA);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(963);
loadCommandName();
setState(964);
dynamic_cast<LoadIWithAContext *>(_localctx)->dest = iRegister();
setState(965);
match(Z80Parser::T__73);
setState(966);
dynamic_cast<LoadIWithAContext *>(_localctx)->source = aRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadRWithAContext ------------------------------------------------------------------
Z80Parser::LoadRWithAContext::LoadRWithAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadRWithAContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::RRegisterContext* Z80Parser::LoadRWithAContext::rRegister() {
return getRuleContext<Z80Parser::RRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::LoadRWithAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::LoadRWithAContext::getRuleIndex() const {
return Z80Parser::RuleLoadRWithA;
}
void Z80Parser::LoadRWithAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadRWithA(this);
}
void Z80Parser::LoadRWithAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadRWithA(this);
}
Z80Parser::LoadRWithAContext* Z80Parser::loadRWithA() {
LoadRWithAContext *_localctx = _tracker.createInstance<LoadRWithAContext>(_ctx, getState());
enterRule(_localctx, 134, Z80Parser::RuleLoadRWithA);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(968);
loadCommandName();
setState(969);
dynamic_cast<LoadRWithAContext *>(_localctx)->dest = rRegister();
setState(970);
match(Z80Parser::T__73);
setState(971);
dynamic_cast<LoadRWithAContext *>(_localctx)->source = aRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadRegisterWithIXHighContext ------------------------------------------------------------------
Z80Parser::LoadRegisterWithIXHighContext::LoadRegisterWithIXHighContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadRegisterWithIXHighContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadRegisterWithIXHighContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::IxHighRegisterContext* Z80Parser::LoadRegisterWithIXHighContext::ixHighRegister() {
return getRuleContext<Z80Parser::IxHighRegisterContext>(0);
}
size_t Z80Parser::LoadRegisterWithIXHighContext::getRuleIndex() const {
return Z80Parser::RuleLoadRegisterWithIXHigh;
}
void Z80Parser::LoadRegisterWithIXHighContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadRegisterWithIXHigh(this);
}
void Z80Parser::LoadRegisterWithIXHighContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadRegisterWithIXHigh(this);
}
Z80Parser::LoadRegisterWithIXHighContext* Z80Parser::loadRegisterWithIXHigh() {
LoadRegisterWithIXHighContext *_localctx = _tracker.createInstance<LoadRegisterWithIXHighContext>(_ctx, getState());
enterRule(_localctx, 136, Z80Parser::RuleLoadRegisterWithIXHigh);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(973);
loadCommandName();
setState(974);
dynamic_cast<LoadRegisterWithIXHighContext *>(_localctx)->dest = simpleByteRegister();
setState(975);
match(Z80Parser::T__73);
setState(976);
dynamic_cast<LoadRegisterWithIXHighContext *>(_localctx)->source = ixHighRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadRegisterWithIXLowContext ------------------------------------------------------------------
Z80Parser::LoadRegisterWithIXLowContext::LoadRegisterWithIXLowContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadRegisterWithIXLowContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadRegisterWithIXLowContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::IxLowRegisterContext* Z80Parser::LoadRegisterWithIXLowContext::ixLowRegister() {
return getRuleContext<Z80Parser::IxLowRegisterContext>(0);
}
size_t Z80Parser::LoadRegisterWithIXLowContext::getRuleIndex() const {
return Z80Parser::RuleLoadRegisterWithIXLow;
}
void Z80Parser::LoadRegisterWithIXLowContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadRegisterWithIXLow(this);
}
void Z80Parser::LoadRegisterWithIXLowContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadRegisterWithIXLow(this);
}
Z80Parser::LoadRegisterWithIXLowContext* Z80Parser::loadRegisterWithIXLow() {
LoadRegisterWithIXLowContext *_localctx = _tracker.createInstance<LoadRegisterWithIXLowContext>(_ctx, getState());
enterRule(_localctx, 138, Z80Parser::RuleLoadRegisterWithIXLow);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(978);
loadCommandName();
setState(979);
dynamic_cast<LoadRegisterWithIXLowContext *>(_localctx)->dest = simpleByteRegister();
setState(980);
match(Z80Parser::T__73);
setState(981);
dynamic_cast<LoadRegisterWithIXLowContext *>(_localctx)->source = ixLowRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadRegisterWithIYHighContext ------------------------------------------------------------------
Z80Parser::LoadRegisterWithIYHighContext::LoadRegisterWithIYHighContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadRegisterWithIYHighContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadRegisterWithIYHighContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::IyHighRegisterContext* Z80Parser::LoadRegisterWithIYHighContext::iyHighRegister() {
return getRuleContext<Z80Parser::IyHighRegisterContext>(0);
}
size_t Z80Parser::LoadRegisterWithIYHighContext::getRuleIndex() const {
return Z80Parser::RuleLoadRegisterWithIYHigh;
}
void Z80Parser::LoadRegisterWithIYHighContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadRegisterWithIYHigh(this);
}
void Z80Parser::LoadRegisterWithIYHighContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadRegisterWithIYHigh(this);
}
Z80Parser::LoadRegisterWithIYHighContext* Z80Parser::loadRegisterWithIYHigh() {
LoadRegisterWithIYHighContext *_localctx = _tracker.createInstance<LoadRegisterWithIYHighContext>(_ctx, getState());
enterRule(_localctx, 140, Z80Parser::RuleLoadRegisterWithIYHigh);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(983);
loadCommandName();
setState(984);
dynamic_cast<LoadRegisterWithIYHighContext *>(_localctx)->dest = simpleByteRegister();
setState(985);
match(Z80Parser::T__73);
setState(986);
dynamic_cast<LoadRegisterWithIYHighContext *>(_localctx)->source = iyHighRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadRegisterWithIYLowContext ------------------------------------------------------------------
Z80Parser::LoadRegisterWithIYLowContext::LoadRegisterWithIYLowContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadRegisterWithIYLowContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadRegisterWithIYLowContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::IyLowRegisterContext* Z80Parser::LoadRegisterWithIYLowContext::iyLowRegister() {
return getRuleContext<Z80Parser::IyLowRegisterContext>(0);
}
size_t Z80Parser::LoadRegisterWithIYLowContext::getRuleIndex() const {
return Z80Parser::RuleLoadRegisterWithIYLow;
}
void Z80Parser::LoadRegisterWithIYLowContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadRegisterWithIYLow(this);
}
void Z80Parser::LoadRegisterWithIYLowContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadRegisterWithIYLow(this);
}
Z80Parser::LoadRegisterWithIYLowContext* Z80Parser::loadRegisterWithIYLow() {
LoadRegisterWithIYLowContext *_localctx = _tracker.createInstance<LoadRegisterWithIYLowContext>(_ctx, getState());
enterRule(_localctx, 142, Z80Parser::RuleLoadRegisterWithIYLow);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(988);
loadCommandName();
setState(989);
dynamic_cast<LoadRegisterWithIYLowContext *>(_localctx)->dest = simpleByteRegister();
setState(990);
match(Z80Parser::T__73);
setState(991);
dynamic_cast<LoadRegisterWithIYLowContext *>(_localctx)->source = iyLowRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadIXHighWithRegisterContext ------------------------------------------------------------------
Z80Parser::LoadIXHighWithRegisterContext::LoadIXHighWithRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadIXHighWithRegisterContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::IxHighRegisterContext* Z80Parser::LoadIXHighWithRegisterContext::ixHighRegister() {
return getRuleContext<Z80Parser::IxHighRegisterContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadIXHighWithRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::LoadIXHighWithRegisterContext::getRuleIndex() const {
return Z80Parser::RuleLoadIXHighWithRegister;
}
void Z80Parser::LoadIXHighWithRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadIXHighWithRegister(this);
}
void Z80Parser::LoadIXHighWithRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadIXHighWithRegister(this);
}
Z80Parser::LoadIXHighWithRegisterContext* Z80Parser::loadIXHighWithRegister() {
LoadIXHighWithRegisterContext *_localctx = _tracker.createInstance<LoadIXHighWithRegisterContext>(_ctx, getState());
enterRule(_localctx, 144, Z80Parser::RuleLoadIXHighWithRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(993);
loadCommandName();
setState(994);
dynamic_cast<LoadIXHighWithRegisterContext *>(_localctx)->dest = ixHighRegister();
setState(995);
match(Z80Parser::T__73);
setState(996);
dynamic_cast<LoadIXHighWithRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IxHighOrLowRegisterContext ------------------------------------------------------------------
Z80Parser::IxHighOrLowRegisterContext::IxHighOrLowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::IxHighRegisterContext* Z80Parser::IxHighOrLowRegisterContext::ixHighRegister() {
return getRuleContext<Z80Parser::IxHighRegisterContext>(0);
}
Z80Parser::IxLowRegisterContext* Z80Parser::IxHighOrLowRegisterContext::ixLowRegister() {
return getRuleContext<Z80Parser::IxLowRegisterContext>(0);
}
size_t Z80Parser::IxHighOrLowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleIxHighOrLowRegister;
}
void Z80Parser::IxHighOrLowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIxHighOrLowRegister(this);
}
void Z80Parser::IxHighOrLowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIxHighOrLowRegister(this);
}
Z80Parser::IxHighOrLowRegisterContext* Z80Parser::ixHighOrLowRegister() {
IxHighOrLowRegisterContext *_localctx = _tracker.createInstance<IxHighOrLowRegisterContext>(_ctx, getState());
enterRule(_localctx, 146, Z80Parser::RuleIxHighOrLowRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1000);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__56:
case Z80Parser::T__57: {
enterOuterAlt(_localctx, 1);
setState(998);
ixHighRegister();
break;
}
case Z80Parser::T__58:
case Z80Parser::T__59: {
enterOuterAlt(_localctx, 2);
setState(999);
ixLowRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IyHighOrLowRegisterContext ------------------------------------------------------------------
Z80Parser::IyHighOrLowRegisterContext::IyHighOrLowRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::IyHighRegisterContext* Z80Parser::IyHighOrLowRegisterContext::iyHighRegister() {
return getRuleContext<Z80Parser::IyHighRegisterContext>(0);
}
Z80Parser::IyLowRegisterContext* Z80Parser::IyHighOrLowRegisterContext::iyLowRegister() {
return getRuleContext<Z80Parser::IyLowRegisterContext>(0);
}
size_t Z80Parser::IyHighOrLowRegisterContext::getRuleIndex() const {
return Z80Parser::RuleIyHighOrLowRegister;
}
void Z80Parser::IyHighOrLowRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIyHighOrLowRegister(this);
}
void Z80Parser::IyHighOrLowRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIyHighOrLowRegister(this);
}
Z80Parser::IyHighOrLowRegisterContext* Z80Parser::iyHighOrLowRegister() {
IyHighOrLowRegisterContext *_localctx = _tracker.createInstance<IyHighOrLowRegisterContext>(_ctx, getState());
enterRule(_localctx, 148, Z80Parser::RuleIyHighOrLowRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1004);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__60:
case Z80Parser::T__61: {
enterOuterAlt(_localctx, 1);
setState(1002);
iyHighRegister();
break;
}
case Z80Parser::T__62:
case Z80Parser::T__63: {
enterOuterAlt(_localctx, 2);
setState(1003);
iyLowRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadIXNibblesContext ------------------------------------------------------------------
Z80Parser::LoadIXNibblesContext::LoadIXNibblesContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadIXNibblesContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
std::vector<Z80Parser::IxHighOrLowRegisterContext *> Z80Parser::LoadIXNibblesContext::ixHighOrLowRegister() {
return getRuleContexts<Z80Parser::IxHighOrLowRegisterContext>();
}
Z80Parser::IxHighOrLowRegisterContext* Z80Parser::LoadIXNibblesContext::ixHighOrLowRegister(size_t i) {
return getRuleContext<Z80Parser::IxHighOrLowRegisterContext>(i);
}
size_t Z80Parser::LoadIXNibblesContext::getRuleIndex() const {
return Z80Parser::RuleLoadIXNibbles;
}
void Z80Parser::LoadIXNibblesContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadIXNibbles(this);
}
void Z80Parser::LoadIXNibblesContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadIXNibbles(this);
}
Z80Parser::LoadIXNibblesContext* Z80Parser::loadIXNibbles() {
LoadIXNibblesContext *_localctx = _tracker.createInstance<LoadIXNibblesContext>(_ctx, getState());
enterRule(_localctx, 150, Z80Parser::RuleLoadIXNibbles);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1006);
loadCommandName();
setState(1007);
dynamic_cast<LoadIXNibblesContext *>(_localctx)->dest = ixHighOrLowRegister();
setState(1008);
match(Z80Parser::T__73);
setState(1009);
dynamic_cast<LoadIXNibblesContext *>(_localctx)->source = ixHighOrLowRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadIYNibblesContext ------------------------------------------------------------------
Z80Parser::LoadIYNibblesContext::LoadIYNibblesContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadIYNibblesContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
std::vector<Z80Parser::IyHighOrLowRegisterContext *> Z80Parser::LoadIYNibblesContext::iyHighOrLowRegister() {
return getRuleContexts<Z80Parser::IyHighOrLowRegisterContext>();
}
Z80Parser::IyHighOrLowRegisterContext* Z80Parser::LoadIYNibblesContext::iyHighOrLowRegister(size_t i) {
return getRuleContext<Z80Parser::IyHighOrLowRegisterContext>(i);
}
size_t Z80Parser::LoadIYNibblesContext::getRuleIndex() const {
return Z80Parser::RuleLoadIYNibbles;
}
void Z80Parser::LoadIYNibblesContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadIYNibbles(this);
}
void Z80Parser::LoadIYNibblesContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadIYNibbles(this);
}
Z80Parser::LoadIYNibblesContext* Z80Parser::loadIYNibbles() {
LoadIYNibblesContext *_localctx = _tracker.createInstance<LoadIYNibblesContext>(_ctx, getState());
enterRule(_localctx, 152, Z80Parser::RuleLoadIYNibbles);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1011);
loadCommandName();
setState(1012);
dynamic_cast<LoadIYNibblesContext *>(_localctx)->dest = iyHighOrLowRegister();
setState(1013);
match(Z80Parser::T__73);
setState(1014);
dynamic_cast<LoadIYNibblesContext *>(_localctx)->source = iyHighOrLowRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadIXLowWithRegisterContext ------------------------------------------------------------------
Z80Parser::LoadIXLowWithRegisterContext::LoadIXLowWithRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadIXLowWithRegisterContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::IxLowRegisterContext* Z80Parser::LoadIXLowWithRegisterContext::ixLowRegister() {
return getRuleContext<Z80Parser::IxLowRegisterContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadIXLowWithRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::LoadIXLowWithRegisterContext::getRuleIndex() const {
return Z80Parser::RuleLoadIXLowWithRegister;
}
void Z80Parser::LoadIXLowWithRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadIXLowWithRegister(this);
}
void Z80Parser::LoadIXLowWithRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadIXLowWithRegister(this);
}
Z80Parser::LoadIXLowWithRegisterContext* Z80Parser::loadIXLowWithRegister() {
LoadIXLowWithRegisterContext *_localctx = _tracker.createInstance<LoadIXLowWithRegisterContext>(_ctx, getState());
enterRule(_localctx, 154, Z80Parser::RuleLoadIXLowWithRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1016);
loadCommandName();
setState(1017);
dynamic_cast<LoadIXLowWithRegisterContext *>(_localctx)->dest = ixLowRegister();
setState(1018);
match(Z80Parser::T__73);
setState(1019);
dynamic_cast<LoadIXLowWithRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadIYHighWithRegisterContext ------------------------------------------------------------------
Z80Parser::LoadIYHighWithRegisterContext::LoadIYHighWithRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadIYHighWithRegisterContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::IyHighRegisterContext* Z80Parser::LoadIYHighWithRegisterContext::iyHighRegister() {
return getRuleContext<Z80Parser::IyHighRegisterContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadIYHighWithRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::LoadIYHighWithRegisterContext::getRuleIndex() const {
return Z80Parser::RuleLoadIYHighWithRegister;
}
void Z80Parser::LoadIYHighWithRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadIYHighWithRegister(this);
}
void Z80Parser::LoadIYHighWithRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadIYHighWithRegister(this);
}
Z80Parser::LoadIYHighWithRegisterContext* Z80Parser::loadIYHighWithRegister() {
LoadIYHighWithRegisterContext *_localctx = _tracker.createInstance<LoadIYHighWithRegisterContext>(_ctx, getState());
enterRule(_localctx, 156, Z80Parser::RuleLoadIYHighWithRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1021);
loadCommandName();
setState(1022);
dynamic_cast<LoadIYHighWithRegisterContext *>(_localctx)->dest = iyHighRegister();
setState(1023);
match(Z80Parser::T__73);
setState(1024);
dynamic_cast<LoadIYHighWithRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadIYLowWithRegisterContext ------------------------------------------------------------------
Z80Parser::LoadIYLowWithRegisterContext::LoadIYLowWithRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadIYLowWithRegisterContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::IyLowRegisterContext* Z80Parser::LoadIYLowWithRegisterContext::iyLowRegister() {
return getRuleContext<Z80Parser::IyLowRegisterContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::LoadIYLowWithRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::LoadIYLowWithRegisterContext::getRuleIndex() const {
return Z80Parser::RuleLoadIYLowWithRegister;
}
void Z80Parser::LoadIYLowWithRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadIYLowWithRegister(this);
}
void Z80Parser::LoadIYLowWithRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadIYLowWithRegister(this);
}
Z80Parser::LoadIYLowWithRegisterContext* Z80Parser::loadIYLowWithRegister() {
LoadIYLowWithRegisterContext *_localctx = _tracker.createInstance<LoadIYLowWithRegisterContext>(_ctx, getState());
enterRule(_localctx, 158, Z80Parser::RuleLoadIYLowWithRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1026);
loadCommandName();
setState(1027);
dynamic_cast<LoadIYLowWithRegisterContext *>(_localctx)->dest = iyLowRegister();
setState(1028);
match(Z80Parser::T__73);
setState(1029);
dynamic_cast<LoadIYLowWithRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ByteLoadCommandContext ------------------------------------------------------------------
Z80Parser::ByteLoadCommandContext::ByteLoadCommandContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadByteRegisterWithByteRegisterContext* Z80Parser::ByteLoadCommandContext::loadByteRegisterWithByteRegister() {
return getRuleContext<Z80Parser::LoadByteRegisterWithByteRegisterContext>(0);
}
Z80Parser::LoadByteRegisterWithImmediateByteContext* Z80Parser::ByteLoadCommandContext::loadByteRegisterWithImmediateByte() {
return getRuleContext<Z80Parser::LoadByteRegisterWithImmediateByteContext>(0);
}
Z80Parser::LoadByteRegisterWithHLPointerContext* Z80Parser::ByteLoadCommandContext::loadByteRegisterWithHLPointer() {
return getRuleContext<Z80Parser::LoadByteRegisterWithHLPointerContext>(0);
}
Z80Parser::LoadByteRegisterWithIXOffsetContext* Z80Parser::ByteLoadCommandContext::loadByteRegisterWithIXOffset() {
return getRuleContext<Z80Parser::LoadByteRegisterWithIXOffsetContext>(0);
}
Z80Parser::LoadByteRegisterWithIYOffsetContext* Z80Parser::ByteLoadCommandContext::loadByteRegisterWithIYOffset() {
return getRuleContext<Z80Parser::LoadByteRegisterWithIYOffsetContext>(0);
}
Z80Parser::LoadHLPointerWithRegisterContext* Z80Parser::ByteLoadCommandContext::loadHLPointerWithRegister() {
return getRuleContext<Z80Parser::LoadHLPointerWithRegisterContext>(0);
}
Z80Parser::LoadIXOffsetWithRegisterContext* Z80Parser::ByteLoadCommandContext::loadIXOffsetWithRegister() {
return getRuleContext<Z80Parser::LoadIXOffsetWithRegisterContext>(0);
}
Z80Parser::LoadIYOffsetWithRegisterContext* Z80Parser::ByteLoadCommandContext::loadIYOffsetWithRegister() {
return getRuleContext<Z80Parser::LoadIYOffsetWithRegisterContext>(0);
}
Z80Parser::LoadHLPointerWithImmediateByteContext* Z80Parser::ByteLoadCommandContext::loadHLPointerWithImmediateByte() {
return getRuleContext<Z80Parser::LoadHLPointerWithImmediateByteContext>(0);
}
Z80Parser::LoadIXOffsetWithImmediateByteContext* Z80Parser::ByteLoadCommandContext::loadIXOffsetWithImmediateByte() {
return getRuleContext<Z80Parser::LoadIXOffsetWithImmediateByteContext>(0);
}
Z80Parser::LoadIYOffsetWithImmediateByteContext* Z80Parser::ByteLoadCommandContext::loadIYOffsetWithImmediateByte() {
return getRuleContext<Z80Parser::LoadIYOffsetWithImmediateByteContext>(0);
}
Z80Parser::LoadAWithBCPointerContext* Z80Parser::ByteLoadCommandContext::loadAWithBCPointer() {
return getRuleContext<Z80Parser::LoadAWithBCPointerContext>(0);
}
Z80Parser::LoadAWithDEPointerContext* Z80Parser::ByteLoadCommandContext::loadAWithDEPointer() {
return getRuleContext<Z80Parser::LoadAWithDEPointerContext>(0);
}
Z80Parser::LoadAWithNNPointerContext* Z80Parser::ByteLoadCommandContext::loadAWithNNPointer() {
return getRuleContext<Z80Parser::LoadAWithNNPointerContext>(0);
}
Z80Parser::LoadBCPointerWithAContext* Z80Parser::ByteLoadCommandContext::loadBCPointerWithA() {
return getRuleContext<Z80Parser::LoadBCPointerWithAContext>(0);
}
Z80Parser::LoadDEPointerWithAContext* Z80Parser::ByteLoadCommandContext::loadDEPointerWithA() {
return getRuleContext<Z80Parser::LoadDEPointerWithAContext>(0);
}
Z80Parser::LoadNNPointerWithAContext* Z80Parser::ByteLoadCommandContext::loadNNPointerWithA() {
return getRuleContext<Z80Parser::LoadNNPointerWithAContext>(0);
}
Z80Parser::LoadAWithIContext* Z80Parser::ByteLoadCommandContext::loadAWithI() {
return getRuleContext<Z80Parser::LoadAWithIContext>(0);
}
Z80Parser::LoadAWithRContext* Z80Parser::ByteLoadCommandContext::loadAWithR() {
return getRuleContext<Z80Parser::LoadAWithRContext>(0);
}
Z80Parser::LoadIWithAContext* Z80Parser::ByteLoadCommandContext::loadIWithA() {
return getRuleContext<Z80Parser::LoadIWithAContext>(0);
}
Z80Parser::LoadRWithAContext* Z80Parser::ByteLoadCommandContext::loadRWithA() {
return getRuleContext<Z80Parser::LoadRWithAContext>(0);
}
Z80Parser::LoadRegisterWithIXHighContext* Z80Parser::ByteLoadCommandContext::loadRegisterWithIXHigh() {
return getRuleContext<Z80Parser::LoadRegisterWithIXHighContext>(0);
}
Z80Parser::LoadRegisterWithIXLowContext* Z80Parser::ByteLoadCommandContext::loadRegisterWithIXLow() {
return getRuleContext<Z80Parser::LoadRegisterWithIXLowContext>(0);
}
Z80Parser::LoadRegisterWithIYHighContext* Z80Parser::ByteLoadCommandContext::loadRegisterWithIYHigh() {
return getRuleContext<Z80Parser::LoadRegisterWithIYHighContext>(0);
}
Z80Parser::LoadRegisterWithIYLowContext* Z80Parser::ByteLoadCommandContext::loadRegisterWithIYLow() {
return getRuleContext<Z80Parser::LoadRegisterWithIYLowContext>(0);
}
Z80Parser::LoadIXHighWithRegisterContext* Z80Parser::ByteLoadCommandContext::loadIXHighWithRegister() {
return getRuleContext<Z80Parser::LoadIXHighWithRegisterContext>(0);
}
Z80Parser::LoadIXLowWithRegisterContext* Z80Parser::ByteLoadCommandContext::loadIXLowWithRegister() {
return getRuleContext<Z80Parser::LoadIXLowWithRegisterContext>(0);
}
Z80Parser::LoadIYHighWithRegisterContext* Z80Parser::ByteLoadCommandContext::loadIYHighWithRegister() {
return getRuleContext<Z80Parser::LoadIYHighWithRegisterContext>(0);
}
Z80Parser::LoadIYLowWithRegisterContext* Z80Parser::ByteLoadCommandContext::loadIYLowWithRegister() {
return getRuleContext<Z80Parser::LoadIYLowWithRegisterContext>(0);
}
Z80Parser::LoadIYNibblesContext* Z80Parser::ByteLoadCommandContext::loadIYNibbles() {
return getRuleContext<Z80Parser::LoadIYNibblesContext>(0);
}
Z80Parser::LoadIXNibblesContext* Z80Parser::ByteLoadCommandContext::loadIXNibbles() {
return getRuleContext<Z80Parser::LoadIXNibblesContext>(0);
}
size_t Z80Parser::ByteLoadCommandContext::getRuleIndex() const {
return Z80Parser::RuleByteLoadCommand;
}
void Z80Parser::ByteLoadCommandContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterByteLoadCommand(this);
}
void Z80Parser::ByteLoadCommandContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitByteLoadCommand(this);
}
Z80Parser::ByteLoadCommandContext* Z80Parser::byteLoadCommand() {
ByteLoadCommandContext *_localctx = _tracker.createInstance<ByteLoadCommandContext>(_ctx, getState());
enterRule(_localctx, 160, Z80Parser::RuleByteLoadCommand);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1062);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 21, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1031);
loadByteRegisterWithByteRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1032);
loadByteRegisterWithImmediateByte();
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
setState(1033);
loadByteRegisterWithHLPointer();
break;
}
case 4: {
enterOuterAlt(_localctx, 4);
setState(1034);
loadByteRegisterWithIXOffset();
break;
}
case 5: {
enterOuterAlt(_localctx, 5);
setState(1035);
loadByteRegisterWithIYOffset();
break;
}
case 6: {
enterOuterAlt(_localctx, 6);
setState(1036);
loadHLPointerWithRegister();
break;
}
case 7: {
enterOuterAlt(_localctx, 7);
setState(1037);
loadIXOffsetWithRegister();
break;
}
case 8: {
enterOuterAlt(_localctx, 8);
setState(1038);
loadIYOffsetWithRegister();
break;
}
case 9: {
enterOuterAlt(_localctx, 9);
setState(1039);
loadHLPointerWithImmediateByte();
break;
}
case 10: {
enterOuterAlt(_localctx, 10);
setState(1040);
loadIXOffsetWithImmediateByte();
break;
}
case 11: {
enterOuterAlt(_localctx, 11);
setState(1041);
loadIYOffsetWithImmediateByte();
break;
}
case 12: {
enterOuterAlt(_localctx, 12);
setState(1042);
loadAWithBCPointer();
break;
}
case 13: {
enterOuterAlt(_localctx, 13);
setState(1043);
loadAWithDEPointer();
break;
}
case 14: {
enterOuterAlt(_localctx, 14);
setState(1044);
loadAWithNNPointer();
break;
}
case 15: {
enterOuterAlt(_localctx, 15);
setState(1045);
loadBCPointerWithA();
break;
}
case 16: {
enterOuterAlt(_localctx, 16);
setState(1046);
loadDEPointerWithA();
break;
}
case 17: {
enterOuterAlt(_localctx, 17);
setState(1047);
loadNNPointerWithA();
break;
}
case 18: {
enterOuterAlt(_localctx, 18);
setState(1048);
loadAWithI();
break;
}
case 19: {
enterOuterAlt(_localctx, 19);
setState(1049);
loadAWithR();
break;
}
case 20: {
enterOuterAlt(_localctx, 20);
setState(1050);
loadIWithA();
break;
}
case 21: {
enterOuterAlt(_localctx, 21);
setState(1051);
loadRWithA();
break;
}
case 22: {
enterOuterAlt(_localctx, 22);
setState(1052);
loadRegisterWithIXHigh();
break;
}
case 23: {
enterOuterAlt(_localctx, 23);
setState(1053);
loadRegisterWithIXLow();
break;
}
case 24: {
enterOuterAlt(_localctx, 24);
setState(1054);
loadRegisterWithIYHigh();
break;
}
case 25: {
enterOuterAlt(_localctx, 25);
setState(1055);
loadRegisterWithIYLow();
break;
}
case 26: {
enterOuterAlt(_localctx, 26);
setState(1056);
loadIXHighWithRegister();
break;
}
case 27: {
enterOuterAlt(_localctx, 27);
setState(1057);
loadIXLowWithRegister();
break;
}
case 28: {
enterOuterAlt(_localctx, 28);
setState(1058);
loadIYHighWithRegister();
break;
}
case 29: {
enterOuterAlt(_localctx, 29);
setState(1059);
loadIYLowWithRegister();
break;
}
case 30: {
enterOuterAlt(_localctx, 30);
setState(1060);
loadIYNibbles();
break;
}
case 31: {
enterOuterAlt(_localctx, 31);
setState(1061);
loadIXNibbles();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SimpleWordRegisterContext ------------------------------------------------------------------
Z80Parser::SimpleWordRegisterContext::SimpleWordRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::BcRegisterContext* Z80Parser::SimpleWordRegisterContext::bcRegister() {
return getRuleContext<Z80Parser::BcRegisterContext>(0);
}
Z80Parser::DeRegisterContext* Z80Parser::SimpleWordRegisterContext::deRegister() {
return getRuleContext<Z80Parser::DeRegisterContext>(0);
}
Z80Parser::HlRegisterContext* Z80Parser::SimpleWordRegisterContext::hlRegister() {
return getRuleContext<Z80Parser::HlRegisterContext>(0);
}
Z80Parser::SpRegisterContext* Z80Parser::SimpleWordRegisterContext::spRegister() {
return getRuleContext<Z80Parser::SpRegisterContext>(0);
}
size_t Z80Parser::SimpleWordRegisterContext::getRuleIndex() const {
return Z80Parser::RuleSimpleWordRegister;
}
void Z80Parser::SimpleWordRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSimpleWordRegister(this);
}
void Z80Parser::SimpleWordRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSimpleWordRegister(this);
}
Z80Parser::SimpleWordRegisterContext* Z80Parser::simpleWordRegister() {
SimpleWordRegisterContext *_localctx = _tracker.createInstance<SimpleWordRegisterContext>(_ctx, getState());
enterRule(_localctx, 162, Z80Parser::RuleSimpleWordRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1068);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__24:
case Z80Parser::T__25:
case Z80Parser::T__34:
case Z80Parser::T__35: {
enterOuterAlt(_localctx, 1);
setState(1064);
bcRegister();
break;
}
case Z80Parser::T__26:
case Z80Parser::T__27:
case Z80Parser::T__40:
case Z80Parser::T__41: {
enterOuterAlt(_localctx, 2);
setState(1065);
deRegister();
break;
}
case Z80Parser::T__28:
case Z80Parser::T__29:
case Z80Parser::T__46:
case Z80Parser::T__47: {
enterOuterAlt(_localctx, 3);
setState(1066);
hlRegister();
break;
}
case Z80Parser::T__64:
case Z80Parser::T__65: {
enterOuterAlt(_localctx, 4);
setState(1067);
spRegister();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadWordWithImmediateWordContext ------------------------------------------------------------------
Z80Parser::LoadWordWithImmediateWordContext::LoadWordWithImmediateWordContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadWordWithImmediateWordContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::SimpleWordRegisterContext* Z80Parser::LoadWordWithImmediateWordContext::simpleWordRegister() {
return getRuleContext<Z80Parser::SimpleWordRegisterContext>(0);
}
Z80Parser::NumberContext* Z80Parser::LoadWordWithImmediateWordContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::LoadWordWithImmediateWordContext::getRuleIndex() const {
return Z80Parser::RuleLoadWordWithImmediateWord;
}
void Z80Parser::LoadWordWithImmediateWordContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadWordWithImmediateWord(this);
}
void Z80Parser::LoadWordWithImmediateWordContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadWordWithImmediateWord(this);
}
Z80Parser::LoadWordWithImmediateWordContext* Z80Parser::loadWordWithImmediateWord() {
LoadWordWithImmediateWordContext *_localctx = _tracker.createInstance<LoadWordWithImmediateWordContext>(_ctx, getState());
enterRule(_localctx, 164, Z80Parser::RuleLoadWordWithImmediateWord);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1070);
loadCommandName();
setState(1071);
dynamic_cast<LoadWordWithImmediateWordContext *>(_localctx)->dest = simpleWordRegister();
setState(1072);
match(Z80Parser::T__73);
setState(1073);
dynamic_cast<LoadWordWithImmediateWordContext *>(_localctx)->source = number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadIXWithImmediateWordContext ------------------------------------------------------------------
Z80Parser::LoadIXWithImmediateWordContext::LoadIXWithImmediateWordContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadIXWithImmediateWordContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::IxRegisterContext* Z80Parser::LoadIXWithImmediateWordContext::ixRegister() {
return getRuleContext<Z80Parser::IxRegisterContext>(0);
}
Z80Parser::NumberContext* Z80Parser::LoadIXWithImmediateWordContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::LoadIXWithImmediateWordContext::getRuleIndex() const {
return Z80Parser::RuleLoadIXWithImmediateWord;
}
void Z80Parser::LoadIXWithImmediateWordContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadIXWithImmediateWord(this);
}
void Z80Parser::LoadIXWithImmediateWordContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadIXWithImmediateWord(this);
}
Z80Parser::LoadIXWithImmediateWordContext* Z80Parser::loadIXWithImmediateWord() {
LoadIXWithImmediateWordContext *_localctx = _tracker.createInstance<LoadIXWithImmediateWordContext>(_ctx, getState());
enterRule(_localctx, 166, Z80Parser::RuleLoadIXWithImmediateWord);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1075);
loadCommandName();
setState(1076);
dynamic_cast<LoadIXWithImmediateWordContext *>(_localctx)->dest = ixRegister();
setState(1077);
match(Z80Parser::T__73);
setState(1078);
dynamic_cast<LoadIXWithImmediateWordContext *>(_localctx)->source = number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadIYWithImmediateWordContext ------------------------------------------------------------------
Z80Parser::LoadIYWithImmediateWordContext::LoadIYWithImmediateWordContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadIYWithImmediateWordContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::IyRegisterContext* Z80Parser::LoadIYWithImmediateWordContext::iyRegister() {
return getRuleContext<Z80Parser::IyRegisterContext>(0);
}
Z80Parser::NumberContext* Z80Parser::LoadIYWithImmediateWordContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::LoadIYWithImmediateWordContext::getRuleIndex() const {
return Z80Parser::RuleLoadIYWithImmediateWord;
}
void Z80Parser::LoadIYWithImmediateWordContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadIYWithImmediateWord(this);
}
void Z80Parser::LoadIYWithImmediateWordContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadIYWithImmediateWord(this);
}
Z80Parser::LoadIYWithImmediateWordContext* Z80Parser::loadIYWithImmediateWord() {
LoadIYWithImmediateWordContext *_localctx = _tracker.createInstance<LoadIYWithImmediateWordContext>(_ctx, getState());
enterRule(_localctx, 168, Z80Parser::RuleLoadIYWithImmediateWord);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1080);
loadCommandName();
setState(1081);
dynamic_cast<LoadIYWithImmediateWordContext *>(_localctx)->dest = iyRegister();
setState(1082);
match(Z80Parser::T__73);
setState(1083);
dynamic_cast<LoadIYWithImmediateWordContext *>(_localctx)->source = number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadWordRegisterWithNNPointerContext ------------------------------------------------------------------
Z80Parser::LoadWordRegisterWithNNPointerContext::LoadWordRegisterWithNNPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadWordRegisterWithNNPointerContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::SimpleWordRegisterContext* Z80Parser::LoadWordRegisterWithNNPointerContext::simpleWordRegister() {
return getRuleContext<Z80Parser::SimpleWordRegisterContext>(0);
}
Z80Parser::NumberPointerContext* Z80Parser::LoadWordRegisterWithNNPointerContext::numberPointer() {
return getRuleContext<Z80Parser::NumberPointerContext>(0);
}
size_t Z80Parser::LoadWordRegisterWithNNPointerContext::getRuleIndex() const {
return Z80Parser::RuleLoadWordRegisterWithNNPointer;
}
void Z80Parser::LoadWordRegisterWithNNPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadWordRegisterWithNNPointer(this);
}
void Z80Parser::LoadWordRegisterWithNNPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadWordRegisterWithNNPointer(this);
}
Z80Parser::LoadWordRegisterWithNNPointerContext* Z80Parser::loadWordRegisterWithNNPointer() {
LoadWordRegisterWithNNPointerContext *_localctx = _tracker.createInstance<LoadWordRegisterWithNNPointerContext>(_ctx, getState());
enterRule(_localctx, 170, Z80Parser::RuleLoadWordRegisterWithNNPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1085);
loadCommandName();
setState(1086);
dynamic_cast<LoadWordRegisterWithNNPointerContext *>(_localctx)->dest = simpleWordRegister();
setState(1087);
match(Z80Parser::T__73);
setState(1088);
dynamic_cast<LoadWordRegisterWithNNPointerContext *>(_localctx)->source = numberPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadIXWithNNPointerContext ------------------------------------------------------------------
Z80Parser::LoadIXWithNNPointerContext::LoadIXWithNNPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadIXWithNNPointerContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::IxRegisterContext* Z80Parser::LoadIXWithNNPointerContext::ixRegister() {
return getRuleContext<Z80Parser::IxRegisterContext>(0);
}
Z80Parser::NumberPointerContext* Z80Parser::LoadIXWithNNPointerContext::numberPointer() {
return getRuleContext<Z80Parser::NumberPointerContext>(0);
}
size_t Z80Parser::LoadIXWithNNPointerContext::getRuleIndex() const {
return Z80Parser::RuleLoadIXWithNNPointer;
}
void Z80Parser::LoadIXWithNNPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadIXWithNNPointer(this);
}
void Z80Parser::LoadIXWithNNPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadIXWithNNPointer(this);
}
Z80Parser::LoadIXWithNNPointerContext* Z80Parser::loadIXWithNNPointer() {
LoadIXWithNNPointerContext *_localctx = _tracker.createInstance<LoadIXWithNNPointerContext>(_ctx, getState());
enterRule(_localctx, 172, Z80Parser::RuleLoadIXWithNNPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1090);
loadCommandName();
setState(1091);
dynamic_cast<LoadIXWithNNPointerContext *>(_localctx)->dest = ixRegister();
setState(1092);
match(Z80Parser::T__73);
setState(1093);
dynamic_cast<LoadIXWithNNPointerContext *>(_localctx)->source = numberPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadIYWithNNPointerContext ------------------------------------------------------------------
Z80Parser::LoadIYWithNNPointerContext::LoadIYWithNNPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadIYWithNNPointerContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::IyRegisterContext* Z80Parser::LoadIYWithNNPointerContext::iyRegister() {
return getRuleContext<Z80Parser::IyRegisterContext>(0);
}
Z80Parser::NumberPointerContext* Z80Parser::LoadIYWithNNPointerContext::numberPointer() {
return getRuleContext<Z80Parser::NumberPointerContext>(0);
}
size_t Z80Parser::LoadIYWithNNPointerContext::getRuleIndex() const {
return Z80Parser::RuleLoadIYWithNNPointer;
}
void Z80Parser::LoadIYWithNNPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadIYWithNNPointer(this);
}
void Z80Parser::LoadIYWithNNPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadIYWithNNPointer(this);
}
Z80Parser::LoadIYWithNNPointerContext* Z80Parser::loadIYWithNNPointer() {
LoadIYWithNNPointerContext *_localctx = _tracker.createInstance<LoadIYWithNNPointerContext>(_ctx, getState());
enterRule(_localctx, 174, Z80Parser::RuleLoadIYWithNNPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1095);
loadCommandName();
setState(1096);
dynamic_cast<LoadIYWithNNPointerContext *>(_localctx)->dest = iyRegister();
setState(1097);
match(Z80Parser::T__73);
setState(1098);
dynamic_cast<LoadIYWithNNPointerContext *>(_localctx)->source = numberPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadNNPointerWithWordRegisterContext ------------------------------------------------------------------
Z80Parser::LoadNNPointerWithWordRegisterContext::LoadNNPointerWithWordRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadNNPointerWithWordRegisterContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::NumberPointerContext* Z80Parser::LoadNNPointerWithWordRegisterContext::numberPointer() {
return getRuleContext<Z80Parser::NumberPointerContext>(0);
}
Z80Parser::SimpleWordRegisterContext* Z80Parser::LoadNNPointerWithWordRegisterContext::simpleWordRegister() {
return getRuleContext<Z80Parser::SimpleWordRegisterContext>(0);
}
size_t Z80Parser::LoadNNPointerWithWordRegisterContext::getRuleIndex() const {
return Z80Parser::RuleLoadNNPointerWithWordRegister;
}
void Z80Parser::LoadNNPointerWithWordRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadNNPointerWithWordRegister(this);
}
void Z80Parser::LoadNNPointerWithWordRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadNNPointerWithWordRegister(this);
}
Z80Parser::LoadNNPointerWithWordRegisterContext* Z80Parser::loadNNPointerWithWordRegister() {
LoadNNPointerWithWordRegisterContext *_localctx = _tracker.createInstance<LoadNNPointerWithWordRegisterContext>(_ctx, getState());
enterRule(_localctx, 176, Z80Parser::RuleLoadNNPointerWithWordRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1100);
loadCommandName();
setState(1101);
dynamic_cast<LoadNNPointerWithWordRegisterContext *>(_localctx)->dest = numberPointer();
setState(1102);
match(Z80Parser::T__73);
setState(1103);
dynamic_cast<LoadNNPointerWithWordRegisterContext *>(_localctx)->source = simpleWordRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadNNPointerWithIXContext ------------------------------------------------------------------
Z80Parser::LoadNNPointerWithIXContext::LoadNNPointerWithIXContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadNNPointerWithIXContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::NumberPointerContext* Z80Parser::LoadNNPointerWithIXContext::numberPointer() {
return getRuleContext<Z80Parser::NumberPointerContext>(0);
}
Z80Parser::IxRegisterContext* Z80Parser::LoadNNPointerWithIXContext::ixRegister() {
return getRuleContext<Z80Parser::IxRegisterContext>(0);
}
size_t Z80Parser::LoadNNPointerWithIXContext::getRuleIndex() const {
return Z80Parser::RuleLoadNNPointerWithIX;
}
void Z80Parser::LoadNNPointerWithIXContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadNNPointerWithIX(this);
}
void Z80Parser::LoadNNPointerWithIXContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadNNPointerWithIX(this);
}
Z80Parser::LoadNNPointerWithIXContext* Z80Parser::loadNNPointerWithIX() {
LoadNNPointerWithIXContext *_localctx = _tracker.createInstance<LoadNNPointerWithIXContext>(_ctx, getState());
enterRule(_localctx, 178, Z80Parser::RuleLoadNNPointerWithIX);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1105);
loadCommandName();
setState(1106);
dynamic_cast<LoadNNPointerWithIXContext *>(_localctx)->dest = numberPointer();
setState(1107);
match(Z80Parser::T__73);
setState(1108);
dynamic_cast<LoadNNPointerWithIXContext *>(_localctx)->source = ixRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadNNPointerWithIYContext ------------------------------------------------------------------
Z80Parser::LoadNNPointerWithIYContext::LoadNNPointerWithIYContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadNNPointerWithIYContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::NumberPointerContext* Z80Parser::LoadNNPointerWithIYContext::numberPointer() {
return getRuleContext<Z80Parser::NumberPointerContext>(0);
}
Z80Parser::IyRegisterContext* Z80Parser::LoadNNPointerWithIYContext::iyRegister() {
return getRuleContext<Z80Parser::IyRegisterContext>(0);
}
size_t Z80Parser::LoadNNPointerWithIYContext::getRuleIndex() const {
return Z80Parser::RuleLoadNNPointerWithIY;
}
void Z80Parser::LoadNNPointerWithIYContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadNNPointerWithIY(this);
}
void Z80Parser::LoadNNPointerWithIYContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadNNPointerWithIY(this);
}
Z80Parser::LoadNNPointerWithIYContext* Z80Parser::loadNNPointerWithIY() {
LoadNNPointerWithIYContext *_localctx = _tracker.createInstance<LoadNNPointerWithIYContext>(_ctx, getState());
enterRule(_localctx, 180, Z80Parser::RuleLoadNNPointerWithIY);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1110);
loadCommandName();
setState(1111);
dynamic_cast<LoadNNPointerWithIYContext *>(_localctx)->dest = numberPointer();
setState(1112);
match(Z80Parser::T__73);
setState(1113);
dynamic_cast<LoadNNPointerWithIYContext *>(_localctx)->source = iyRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadSPWithHLContext ------------------------------------------------------------------
Z80Parser::LoadSPWithHLContext::LoadSPWithHLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadSPWithHLContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::SpRegisterContext* Z80Parser::LoadSPWithHLContext::spRegister() {
return getRuleContext<Z80Parser::SpRegisterContext>(0);
}
Z80Parser::HlRegisterContext* Z80Parser::LoadSPWithHLContext::hlRegister() {
return getRuleContext<Z80Parser::HlRegisterContext>(0);
}
size_t Z80Parser::LoadSPWithHLContext::getRuleIndex() const {
return Z80Parser::RuleLoadSPWithHL;
}
void Z80Parser::LoadSPWithHLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadSPWithHL(this);
}
void Z80Parser::LoadSPWithHLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadSPWithHL(this);
}
Z80Parser::LoadSPWithHLContext* Z80Parser::loadSPWithHL() {
LoadSPWithHLContext *_localctx = _tracker.createInstance<LoadSPWithHLContext>(_ctx, getState());
enterRule(_localctx, 182, Z80Parser::RuleLoadSPWithHL);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1115);
loadCommandName();
setState(1116);
dynamic_cast<LoadSPWithHLContext *>(_localctx)->dest = spRegister();
setState(1117);
match(Z80Parser::T__73);
setState(1118);
dynamic_cast<LoadSPWithHLContext *>(_localctx)->source = hlRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadSPWithIXContext ------------------------------------------------------------------
Z80Parser::LoadSPWithIXContext::LoadSPWithIXContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadSPWithIXContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::SpRegisterContext* Z80Parser::LoadSPWithIXContext::spRegister() {
return getRuleContext<Z80Parser::SpRegisterContext>(0);
}
Z80Parser::IxRegisterContext* Z80Parser::LoadSPWithIXContext::ixRegister() {
return getRuleContext<Z80Parser::IxRegisterContext>(0);
}
size_t Z80Parser::LoadSPWithIXContext::getRuleIndex() const {
return Z80Parser::RuleLoadSPWithIX;
}
void Z80Parser::LoadSPWithIXContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadSPWithIX(this);
}
void Z80Parser::LoadSPWithIXContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadSPWithIX(this);
}
Z80Parser::LoadSPWithIXContext* Z80Parser::loadSPWithIX() {
LoadSPWithIXContext *_localctx = _tracker.createInstance<LoadSPWithIXContext>(_ctx, getState());
enterRule(_localctx, 184, Z80Parser::RuleLoadSPWithIX);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1120);
loadCommandName();
setState(1121);
dynamic_cast<LoadSPWithIXContext *>(_localctx)->dest = spRegister();
setState(1122);
match(Z80Parser::T__73);
setState(1123);
dynamic_cast<LoadSPWithIXContext *>(_localctx)->source = ixRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadSPWithIYContext ------------------------------------------------------------------
Z80Parser::LoadSPWithIYContext::LoadSPWithIYContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadCommandNameContext* Z80Parser::LoadSPWithIYContext::loadCommandName() {
return getRuleContext<Z80Parser::LoadCommandNameContext>(0);
}
Z80Parser::SpRegisterContext* Z80Parser::LoadSPWithIYContext::spRegister() {
return getRuleContext<Z80Parser::SpRegisterContext>(0);
}
Z80Parser::IyRegisterContext* Z80Parser::LoadSPWithIYContext::iyRegister() {
return getRuleContext<Z80Parser::IyRegisterContext>(0);
}
size_t Z80Parser::LoadSPWithIYContext::getRuleIndex() const {
return Z80Parser::RuleLoadSPWithIY;
}
void Z80Parser::LoadSPWithIYContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadSPWithIY(this);
}
void Z80Parser::LoadSPWithIYContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadSPWithIY(this);
}
Z80Parser::LoadSPWithIYContext* Z80Parser::loadSPWithIY() {
LoadSPWithIYContext *_localctx = _tracker.createInstance<LoadSPWithIYContext>(_ctx, getState());
enterRule(_localctx, 186, Z80Parser::RuleLoadSPWithIY);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1125);
loadCommandName();
setState(1126);
dynamic_cast<LoadSPWithIYContext *>(_localctx)->dest = spRegister();
setState(1127);
match(Z80Parser::T__73);
setState(1128);
dynamic_cast<LoadSPWithIYContext *>(_localctx)->source = iyRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- PushCommandNameContext ------------------------------------------------------------------
Z80Parser::PushCommandNameContext::PushCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::PushCommandNameContext::getRuleIndex() const {
return Z80Parser::RulePushCommandName;
}
void Z80Parser::PushCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterPushCommandName(this);
}
void Z80Parser::PushCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitPushCommandName(this);
}
Z80Parser::PushCommandNameContext* Z80Parser::pushCommandName() {
PushCommandNameContext *_localctx = _tracker.createInstance<PushCommandNameContext>(_ctx, getState());
enterRule(_localctx, 188, Z80Parser::RulePushCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1130);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__74
|| _la == Z80Parser::T__75)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- PopCommandNameContext ------------------------------------------------------------------
Z80Parser::PopCommandNameContext::PopCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::PopCommandNameContext::getRuleIndex() const {
return Z80Parser::RulePopCommandName;
}
void Z80Parser::PopCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterPopCommandName(this);
}
void Z80Parser::PopCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitPopCommandName(this);
}
Z80Parser::PopCommandNameContext* Z80Parser::popCommandName() {
PopCommandNameContext *_localctx = _tracker.createInstance<PopCommandNameContext>(_ctx, getState());
enterRule(_localctx, 190, Z80Parser::RulePopCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1132);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__76
|| _la == Z80Parser::T__77)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- PushAndPopRegisterContext ------------------------------------------------------------------
Z80Parser::PushAndPopRegisterContext::PushAndPopRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::BcRegisterContext* Z80Parser::PushAndPopRegisterContext::bcRegister() {
return getRuleContext<Z80Parser::BcRegisterContext>(0);
}
Z80Parser::DeRegisterContext* Z80Parser::PushAndPopRegisterContext::deRegister() {
return getRuleContext<Z80Parser::DeRegisterContext>(0);
}
Z80Parser::HlRegisterContext* Z80Parser::PushAndPopRegisterContext::hlRegister() {
return getRuleContext<Z80Parser::HlRegisterContext>(0);
}
Z80Parser::AfRegisterContext* Z80Parser::PushAndPopRegisterContext::afRegister() {
return getRuleContext<Z80Parser::AfRegisterContext>(0);
}
size_t Z80Parser::PushAndPopRegisterContext::getRuleIndex() const {
return Z80Parser::RulePushAndPopRegister;
}
void Z80Parser::PushAndPopRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterPushAndPopRegister(this);
}
void Z80Parser::PushAndPopRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitPushAndPopRegister(this);
}
Z80Parser::PushAndPopRegisterContext* Z80Parser::pushAndPopRegister() {
PushAndPopRegisterContext *_localctx = _tracker.createInstance<PushAndPopRegisterContext>(_ctx, getState());
enterRule(_localctx, 192, Z80Parser::RulePushAndPopRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1139);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__24:
case Z80Parser::T__25:
case Z80Parser::T__34:
case Z80Parser::T__35: {
enterOuterAlt(_localctx, 1);
setState(1134);
bcRegister();
break;
}
case Z80Parser::T__26:
case Z80Parser::T__27:
case Z80Parser::T__40:
case Z80Parser::T__41: {
enterOuterAlt(_localctx, 2);
setState(1135);
deRegister();
break;
}
case Z80Parser::T__28:
case Z80Parser::T__29:
case Z80Parser::T__46:
case Z80Parser::T__47: {
enterOuterAlt(_localctx, 3);
setState(1136);
hlRegister();
break;
}
case Z80Parser::T__20:
case Z80Parser::T__21:
case Z80Parser::T__22:
case Z80Parser::T__23: {
enterOuterAlt(_localctx, 4);
setState(1137);
afRegister();
break;
}
case Z80Parser::COMMENT:
case Z80Parser::EOL: {
enterOuterAlt(_localctx, 5);
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- PushWordRegisterContext ------------------------------------------------------------------
Z80Parser::PushWordRegisterContext::PushWordRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::PushCommandNameContext* Z80Parser::PushWordRegisterContext::pushCommandName() {
return getRuleContext<Z80Parser::PushCommandNameContext>(0);
}
Z80Parser::PushAndPopRegisterContext* Z80Parser::PushWordRegisterContext::pushAndPopRegister() {
return getRuleContext<Z80Parser::PushAndPopRegisterContext>(0);
}
size_t Z80Parser::PushWordRegisterContext::getRuleIndex() const {
return Z80Parser::RulePushWordRegister;
}
void Z80Parser::PushWordRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterPushWordRegister(this);
}
void Z80Parser::PushWordRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitPushWordRegister(this);
}
Z80Parser::PushWordRegisterContext* Z80Parser::pushWordRegister() {
PushWordRegisterContext *_localctx = _tracker.createInstance<PushWordRegisterContext>(_ctx, getState());
enterRule(_localctx, 194, Z80Parser::RulePushWordRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1141);
pushCommandName();
setState(1142);
dynamic_cast<PushWordRegisterContext *>(_localctx)->source = pushAndPopRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- PushIXContext ------------------------------------------------------------------
Z80Parser::PushIXContext::PushIXContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::PushCommandNameContext* Z80Parser::PushIXContext::pushCommandName() {
return getRuleContext<Z80Parser::PushCommandNameContext>(0);
}
Z80Parser::IxRegisterContext* Z80Parser::PushIXContext::ixRegister() {
return getRuleContext<Z80Parser::IxRegisterContext>(0);
}
size_t Z80Parser::PushIXContext::getRuleIndex() const {
return Z80Parser::RulePushIX;
}
void Z80Parser::PushIXContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterPushIX(this);
}
void Z80Parser::PushIXContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitPushIX(this);
}
Z80Parser::PushIXContext* Z80Parser::pushIX() {
PushIXContext *_localctx = _tracker.createInstance<PushIXContext>(_ctx, getState());
enterRule(_localctx, 196, Z80Parser::RulePushIX);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1144);
pushCommandName();
setState(1145);
dynamic_cast<PushIXContext *>(_localctx)->source = ixRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- PushIYContext ------------------------------------------------------------------
Z80Parser::PushIYContext::PushIYContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::PushCommandNameContext* Z80Parser::PushIYContext::pushCommandName() {
return getRuleContext<Z80Parser::PushCommandNameContext>(0);
}
Z80Parser::IyRegisterContext* Z80Parser::PushIYContext::iyRegister() {
return getRuleContext<Z80Parser::IyRegisterContext>(0);
}
size_t Z80Parser::PushIYContext::getRuleIndex() const {
return Z80Parser::RulePushIY;
}
void Z80Parser::PushIYContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterPushIY(this);
}
void Z80Parser::PushIYContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitPushIY(this);
}
Z80Parser::PushIYContext* Z80Parser::pushIY() {
PushIYContext *_localctx = _tracker.createInstance<PushIYContext>(_ctx, getState());
enterRule(_localctx, 198, Z80Parser::RulePushIY);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1147);
pushCommandName();
setState(1148);
dynamic_cast<PushIYContext *>(_localctx)->source = iyRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- PopWordRegisterContext ------------------------------------------------------------------
Z80Parser::PopWordRegisterContext::PopWordRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::PopCommandNameContext* Z80Parser::PopWordRegisterContext::popCommandName() {
return getRuleContext<Z80Parser::PopCommandNameContext>(0);
}
Z80Parser::PushAndPopRegisterContext* Z80Parser::PopWordRegisterContext::pushAndPopRegister() {
return getRuleContext<Z80Parser::PushAndPopRegisterContext>(0);
}
size_t Z80Parser::PopWordRegisterContext::getRuleIndex() const {
return Z80Parser::RulePopWordRegister;
}
void Z80Parser::PopWordRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterPopWordRegister(this);
}
void Z80Parser::PopWordRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitPopWordRegister(this);
}
Z80Parser::PopWordRegisterContext* Z80Parser::popWordRegister() {
PopWordRegisterContext *_localctx = _tracker.createInstance<PopWordRegisterContext>(_ctx, getState());
enterRule(_localctx, 200, Z80Parser::RulePopWordRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1150);
popCommandName();
setState(1151);
dynamic_cast<PopWordRegisterContext *>(_localctx)->source = pushAndPopRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- PopIXContext ------------------------------------------------------------------
Z80Parser::PopIXContext::PopIXContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::PopCommandNameContext* Z80Parser::PopIXContext::popCommandName() {
return getRuleContext<Z80Parser::PopCommandNameContext>(0);
}
Z80Parser::IxRegisterContext* Z80Parser::PopIXContext::ixRegister() {
return getRuleContext<Z80Parser::IxRegisterContext>(0);
}
size_t Z80Parser::PopIXContext::getRuleIndex() const {
return Z80Parser::RulePopIX;
}
void Z80Parser::PopIXContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterPopIX(this);
}
void Z80Parser::PopIXContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitPopIX(this);
}
Z80Parser::PopIXContext* Z80Parser::popIX() {
PopIXContext *_localctx = _tracker.createInstance<PopIXContext>(_ctx, getState());
enterRule(_localctx, 202, Z80Parser::RulePopIX);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1153);
popCommandName();
setState(1154);
dynamic_cast<PopIXContext *>(_localctx)->source = ixRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- PopIYContext ------------------------------------------------------------------
Z80Parser::PopIYContext::PopIYContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::PopCommandNameContext* Z80Parser::PopIYContext::popCommandName() {
return getRuleContext<Z80Parser::PopCommandNameContext>(0);
}
Z80Parser::IyRegisterContext* Z80Parser::PopIYContext::iyRegister() {
return getRuleContext<Z80Parser::IyRegisterContext>(0);
}
size_t Z80Parser::PopIYContext::getRuleIndex() const {
return Z80Parser::RulePopIY;
}
void Z80Parser::PopIYContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterPopIY(this);
}
void Z80Parser::PopIYContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitPopIY(this);
}
Z80Parser::PopIYContext* Z80Parser::popIY() {
PopIYContext *_localctx = _tracker.createInstance<PopIYContext>(_ctx, getState());
enterRule(_localctx, 204, Z80Parser::RulePopIY);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1156);
popCommandName();
setState(1157);
dynamic_cast<PopIYContext *>(_localctx)->source = iyRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- WordLoadCommandContext ------------------------------------------------------------------
Z80Parser::WordLoadCommandContext::WordLoadCommandContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::LoadWordWithImmediateWordContext* Z80Parser::WordLoadCommandContext::loadWordWithImmediateWord() {
return getRuleContext<Z80Parser::LoadWordWithImmediateWordContext>(0);
}
Z80Parser::LoadIXWithImmediateWordContext* Z80Parser::WordLoadCommandContext::loadIXWithImmediateWord() {
return getRuleContext<Z80Parser::LoadIXWithImmediateWordContext>(0);
}
Z80Parser::LoadIYWithImmediateWordContext* Z80Parser::WordLoadCommandContext::loadIYWithImmediateWord() {
return getRuleContext<Z80Parser::LoadIYWithImmediateWordContext>(0);
}
Z80Parser::LoadWordRegisterWithNNPointerContext* Z80Parser::WordLoadCommandContext::loadWordRegisterWithNNPointer() {
return getRuleContext<Z80Parser::LoadWordRegisterWithNNPointerContext>(0);
}
Z80Parser::LoadIXWithNNPointerContext* Z80Parser::WordLoadCommandContext::loadIXWithNNPointer() {
return getRuleContext<Z80Parser::LoadIXWithNNPointerContext>(0);
}
Z80Parser::LoadIYWithNNPointerContext* Z80Parser::WordLoadCommandContext::loadIYWithNNPointer() {
return getRuleContext<Z80Parser::LoadIYWithNNPointerContext>(0);
}
Z80Parser::LoadNNPointerWithIXContext* Z80Parser::WordLoadCommandContext::loadNNPointerWithIX() {
return getRuleContext<Z80Parser::LoadNNPointerWithIXContext>(0);
}
Z80Parser::LoadNNPointerWithIYContext* Z80Parser::WordLoadCommandContext::loadNNPointerWithIY() {
return getRuleContext<Z80Parser::LoadNNPointerWithIYContext>(0);
}
Z80Parser::LoadNNPointerWithWordRegisterContext* Z80Parser::WordLoadCommandContext::loadNNPointerWithWordRegister() {
return getRuleContext<Z80Parser::LoadNNPointerWithWordRegisterContext>(0);
}
Z80Parser::LoadSPWithHLContext* Z80Parser::WordLoadCommandContext::loadSPWithHL() {
return getRuleContext<Z80Parser::LoadSPWithHLContext>(0);
}
Z80Parser::LoadSPWithIXContext* Z80Parser::WordLoadCommandContext::loadSPWithIX() {
return getRuleContext<Z80Parser::LoadSPWithIXContext>(0);
}
Z80Parser::LoadSPWithIYContext* Z80Parser::WordLoadCommandContext::loadSPWithIY() {
return getRuleContext<Z80Parser::LoadSPWithIYContext>(0);
}
Z80Parser::PushWordRegisterContext* Z80Parser::WordLoadCommandContext::pushWordRegister() {
return getRuleContext<Z80Parser::PushWordRegisterContext>(0);
}
Z80Parser::PushIXContext* Z80Parser::WordLoadCommandContext::pushIX() {
return getRuleContext<Z80Parser::PushIXContext>(0);
}
Z80Parser::PushIYContext* Z80Parser::WordLoadCommandContext::pushIY() {
return getRuleContext<Z80Parser::PushIYContext>(0);
}
Z80Parser::PopWordRegisterContext* Z80Parser::WordLoadCommandContext::popWordRegister() {
return getRuleContext<Z80Parser::PopWordRegisterContext>(0);
}
Z80Parser::PopIXContext* Z80Parser::WordLoadCommandContext::popIX() {
return getRuleContext<Z80Parser::PopIXContext>(0);
}
Z80Parser::PopIYContext* Z80Parser::WordLoadCommandContext::popIY() {
return getRuleContext<Z80Parser::PopIYContext>(0);
}
size_t Z80Parser::WordLoadCommandContext::getRuleIndex() const {
return Z80Parser::RuleWordLoadCommand;
}
void Z80Parser::WordLoadCommandContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterWordLoadCommand(this);
}
void Z80Parser::WordLoadCommandContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitWordLoadCommand(this);
}
Z80Parser::WordLoadCommandContext* Z80Parser::wordLoadCommand() {
WordLoadCommandContext *_localctx = _tracker.createInstance<WordLoadCommandContext>(_ctx, getState());
enterRule(_localctx, 206, Z80Parser::RuleWordLoadCommand);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1177);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 24, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1159);
loadWordWithImmediateWord();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1160);
loadIXWithImmediateWord();
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
setState(1161);
loadIYWithImmediateWord();
break;
}
case 4: {
enterOuterAlt(_localctx, 4);
setState(1162);
loadWordRegisterWithNNPointer();
break;
}
case 5: {
enterOuterAlt(_localctx, 5);
setState(1163);
loadIXWithNNPointer();
break;
}
case 6: {
enterOuterAlt(_localctx, 6);
setState(1164);
loadIYWithNNPointer();
break;
}
case 7: {
enterOuterAlt(_localctx, 7);
setState(1165);
loadNNPointerWithIX();
break;
}
case 8: {
enterOuterAlt(_localctx, 8);
setState(1166);
loadNNPointerWithIY();
break;
}
case 9: {
enterOuterAlt(_localctx, 9);
setState(1167);
loadNNPointerWithWordRegister();
break;
}
case 10: {
enterOuterAlt(_localctx, 10);
setState(1168);
loadSPWithHL();
break;
}
case 11: {
enterOuterAlt(_localctx, 11);
setState(1169);
loadSPWithIX();
break;
}
case 12: {
enterOuterAlt(_localctx, 12);
setState(1170);
loadSPWithIY();
break;
}
case 13: {
enterOuterAlt(_localctx, 13);
setState(1171);
pushWordRegister();
break;
}
case 14: {
enterOuterAlt(_localctx, 14);
setState(1172);
pushIX();
break;
}
case 15: {
enterOuterAlt(_localctx, 15);
setState(1173);
pushIY();
break;
}
case 16: {
enterOuterAlt(_localctx, 16);
setState(1174);
popWordRegister();
break;
}
case 17: {
enterOuterAlt(_localctx, 17);
setState(1175);
popIX();
break;
}
case 18: {
enterOuterAlt(_localctx, 18);
setState(1176);
popIY();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ExchangeCommandNameContext ------------------------------------------------------------------
Z80Parser::ExchangeCommandNameContext::ExchangeCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::ExchangeCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleExchangeCommandName;
}
void Z80Parser::ExchangeCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterExchangeCommandName(this);
}
void Z80Parser::ExchangeCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitExchangeCommandName(this);
}
Z80Parser::ExchangeCommandNameContext* Z80Parser::exchangeCommandName() {
ExchangeCommandNameContext *_localctx = _tracker.createInstance<ExchangeCommandNameContext>(_ctx, getState());
enterRule(_localctx, 208, Z80Parser::RuleExchangeCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1179);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__78
|| _la == Z80Parser::T__79)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ExchangeDEWithHLContext ------------------------------------------------------------------
Z80Parser::ExchangeDEWithHLContext::ExchangeDEWithHLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ExchangeCommandNameContext* Z80Parser::ExchangeDEWithHLContext::exchangeCommandName() {
return getRuleContext<Z80Parser::ExchangeCommandNameContext>(0);
}
Z80Parser::DeRegisterContext* Z80Parser::ExchangeDEWithHLContext::deRegister() {
return getRuleContext<Z80Parser::DeRegisterContext>(0);
}
Z80Parser::HlRegisterContext* Z80Parser::ExchangeDEWithHLContext::hlRegister() {
return getRuleContext<Z80Parser::HlRegisterContext>(0);
}
size_t Z80Parser::ExchangeDEWithHLContext::getRuleIndex() const {
return Z80Parser::RuleExchangeDEWithHL;
}
void Z80Parser::ExchangeDEWithHLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterExchangeDEWithHL(this);
}
void Z80Parser::ExchangeDEWithHLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitExchangeDEWithHL(this);
}
Z80Parser::ExchangeDEWithHLContext* Z80Parser::exchangeDEWithHL() {
ExchangeDEWithHLContext *_localctx = _tracker.createInstance<ExchangeDEWithHLContext>(_ctx, getState());
enterRule(_localctx, 210, Z80Parser::RuleExchangeDEWithHL);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1181);
exchangeCommandName();
setState(1182);
deRegister();
setState(1183);
match(Z80Parser::T__73);
setState(1184);
hlRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ExchangeAFWithShadowAFContext ------------------------------------------------------------------
Z80Parser::ExchangeAFWithShadowAFContext::ExchangeAFWithShadowAFContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ExchangeCommandNameContext* Z80Parser::ExchangeAFWithShadowAFContext::exchangeCommandName() {
return getRuleContext<Z80Parser::ExchangeCommandNameContext>(0);
}
std::vector<Z80Parser::AfRegisterContext *> Z80Parser::ExchangeAFWithShadowAFContext::afRegister() {
return getRuleContexts<Z80Parser::AfRegisterContext>();
}
Z80Parser::AfRegisterContext* Z80Parser::ExchangeAFWithShadowAFContext::afRegister(size_t i) {
return getRuleContext<Z80Parser::AfRegisterContext>(i);
}
size_t Z80Parser::ExchangeAFWithShadowAFContext::getRuleIndex() const {
return Z80Parser::RuleExchangeAFWithShadowAF;
}
void Z80Parser::ExchangeAFWithShadowAFContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterExchangeAFWithShadowAF(this);
}
void Z80Parser::ExchangeAFWithShadowAFContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitExchangeAFWithShadowAF(this);
}
Z80Parser::ExchangeAFWithShadowAFContext* Z80Parser::exchangeAFWithShadowAF() {
ExchangeAFWithShadowAFContext *_localctx = _tracker.createInstance<ExchangeAFWithShadowAFContext>(_ctx, getState());
enterRule(_localctx, 212, Z80Parser::RuleExchangeAFWithShadowAF);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1186);
exchangeCommandName();
setState(1187);
afRegister();
setState(1188);
match(Z80Parser::T__73);
setState(1189);
afRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ExchangeMultipleWordRegistersContext ------------------------------------------------------------------
Z80Parser::ExchangeMultipleWordRegistersContext::ExchangeMultipleWordRegistersContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::ExchangeMultipleWordRegistersContext::getRuleIndex() const {
return Z80Parser::RuleExchangeMultipleWordRegisters;
}
void Z80Parser::ExchangeMultipleWordRegistersContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterExchangeMultipleWordRegisters(this);
}
void Z80Parser::ExchangeMultipleWordRegistersContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitExchangeMultipleWordRegisters(this);
}
Z80Parser::ExchangeMultipleWordRegistersContext* Z80Parser::exchangeMultipleWordRegisters() {
ExchangeMultipleWordRegistersContext *_localctx = _tracker.createInstance<ExchangeMultipleWordRegistersContext>(_ctx, getState());
enterRule(_localctx, 214, Z80Parser::RuleExchangeMultipleWordRegisters);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1191);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__80
|| _la == Z80Parser::T__81)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ExchangeSPPointerWithHLContext ------------------------------------------------------------------
Z80Parser::ExchangeSPPointerWithHLContext::ExchangeSPPointerWithHLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ExchangeCommandNameContext* Z80Parser::ExchangeSPPointerWithHLContext::exchangeCommandName() {
return getRuleContext<Z80Parser::ExchangeCommandNameContext>(0);
}
Z80Parser::SpPointerContext* Z80Parser::ExchangeSPPointerWithHLContext::spPointer() {
return getRuleContext<Z80Parser::SpPointerContext>(0);
}
Z80Parser::HlRegisterContext* Z80Parser::ExchangeSPPointerWithHLContext::hlRegister() {
return getRuleContext<Z80Parser::HlRegisterContext>(0);
}
size_t Z80Parser::ExchangeSPPointerWithHLContext::getRuleIndex() const {
return Z80Parser::RuleExchangeSPPointerWithHL;
}
void Z80Parser::ExchangeSPPointerWithHLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterExchangeSPPointerWithHL(this);
}
void Z80Parser::ExchangeSPPointerWithHLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitExchangeSPPointerWithHL(this);
}
Z80Parser::ExchangeSPPointerWithHLContext* Z80Parser::exchangeSPPointerWithHL() {
ExchangeSPPointerWithHLContext *_localctx = _tracker.createInstance<ExchangeSPPointerWithHLContext>(_ctx, getState());
enterRule(_localctx, 216, Z80Parser::RuleExchangeSPPointerWithHL);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1193);
exchangeCommandName();
setState(1194);
spPointer();
setState(1195);
match(Z80Parser::T__73);
setState(1196);
hlRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ExchangeSPPointerWithIXContext ------------------------------------------------------------------
Z80Parser::ExchangeSPPointerWithIXContext::ExchangeSPPointerWithIXContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ExchangeCommandNameContext* Z80Parser::ExchangeSPPointerWithIXContext::exchangeCommandName() {
return getRuleContext<Z80Parser::ExchangeCommandNameContext>(0);
}
Z80Parser::SpPointerContext* Z80Parser::ExchangeSPPointerWithIXContext::spPointer() {
return getRuleContext<Z80Parser::SpPointerContext>(0);
}
Z80Parser::IxRegisterContext* Z80Parser::ExchangeSPPointerWithIXContext::ixRegister() {
return getRuleContext<Z80Parser::IxRegisterContext>(0);
}
size_t Z80Parser::ExchangeSPPointerWithIXContext::getRuleIndex() const {
return Z80Parser::RuleExchangeSPPointerWithIX;
}
void Z80Parser::ExchangeSPPointerWithIXContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterExchangeSPPointerWithIX(this);
}
void Z80Parser::ExchangeSPPointerWithIXContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitExchangeSPPointerWithIX(this);
}
Z80Parser::ExchangeSPPointerWithIXContext* Z80Parser::exchangeSPPointerWithIX() {
ExchangeSPPointerWithIXContext *_localctx = _tracker.createInstance<ExchangeSPPointerWithIXContext>(_ctx, getState());
enterRule(_localctx, 218, Z80Parser::RuleExchangeSPPointerWithIX);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1198);
exchangeCommandName();
setState(1199);
spPointer();
setState(1200);
match(Z80Parser::T__73);
setState(1201);
ixRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ExchangeSPPointerWithIYContext ------------------------------------------------------------------
Z80Parser::ExchangeSPPointerWithIYContext::ExchangeSPPointerWithIYContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ExchangeCommandNameContext* Z80Parser::ExchangeSPPointerWithIYContext::exchangeCommandName() {
return getRuleContext<Z80Parser::ExchangeCommandNameContext>(0);
}
Z80Parser::SpPointerContext* Z80Parser::ExchangeSPPointerWithIYContext::spPointer() {
return getRuleContext<Z80Parser::SpPointerContext>(0);
}
Z80Parser::IyRegisterContext* Z80Parser::ExchangeSPPointerWithIYContext::iyRegister() {
return getRuleContext<Z80Parser::IyRegisterContext>(0);
}
size_t Z80Parser::ExchangeSPPointerWithIYContext::getRuleIndex() const {
return Z80Parser::RuleExchangeSPPointerWithIY;
}
void Z80Parser::ExchangeSPPointerWithIYContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterExchangeSPPointerWithIY(this);
}
void Z80Parser::ExchangeSPPointerWithIYContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitExchangeSPPointerWithIY(this);
}
Z80Parser::ExchangeSPPointerWithIYContext* Z80Parser::exchangeSPPointerWithIY() {
ExchangeSPPointerWithIYContext *_localctx = _tracker.createInstance<ExchangeSPPointerWithIYContext>(_ctx, getState());
enterRule(_localctx, 220, Z80Parser::RuleExchangeSPPointerWithIY);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1203);
exchangeCommandName();
setState(1204);
spPointer();
setState(1205);
match(Z80Parser::T__73);
setState(1206);
iyRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadHLPointerIntoDEThenDecrementBCAndIncrementHLContext ------------------------------------------------------------------
Z80Parser::LoadHLPointerIntoDEThenDecrementBCAndIncrementHLContext::LoadHLPointerIntoDEThenDecrementBCAndIncrementHLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::LoadHLPointerIntoDEThenDecrementBCAndIncrementHLContext::getRuleIndex() const {
return Z80Parser::RuleLoadHLPointerIntoDEThenDecrementBCAndIncrementHL;
}
void Z80Parser::LoadHLPointerIntoDEThenDecrementBCAndIncrementHLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadHLPointerIntoDEThenDecrementBCAndIncrementHL(this);
}
void Z80Parser::LoadHLPointerIntoDEThenDecrementBCAndIncrementHLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadHLPointerIntoDEThenDecrementBCAndIncrementHL(this);
}
Z80Parser::LoadHLPointerIntoDEThenDecrementBCAndIncrementHLContext* Z80Parser::loadHLPointerIntoDEThenDecrementBCAndIncrementHL() {
LoadHLPointerIntoDEThenDecrementBCAndIncrementHLContext *_localctx = _tracker.createInstance<LoadHLPointerIntoDEThenDecrementBCAndIncrementHLContext>(_ctx, getState());
enterRule(_localctx, 222, Z80Parser::RuleLoadHLPointerIntoDEThenDecrementBCAndIncrementHL);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1208);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__82
|| _la == Z80Parser::T__83)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeatContext ------------------------------------------------------------------
Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeatContext::LoadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeatContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeatContext::getRuleIndex() const {
return Z80Parser::RuleLoadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeat;
}
void Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeatContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeat(this);
}
void Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeatContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeat(this);
}
Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeatContext* Z80Parser::loadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeat() {
LoadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeatContext *_localctx = _tracker.createInstance<LoadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeatContext>(_ctx, getState());
enterRule(_localctx, 224, Z80Parser::RuleLoadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeat);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1210);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__84
|| _la == Z80Parser::T__85)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadDEPointerWithHLPointerThenDecrementBCAndHLContext ------------------------------------------------------------------
Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndHLContext::LoadDEPointerWithHLPointerThenDecrementBCAndHLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndHLContext::getRuleIndex() const {
return Z80Parser::RuleLoadDEPointerWithHLPointerThenDecrementBCAndHL;
}
void Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndHLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadDEPointerWithHLPointerThenDecrementBCAndHL(this);
}
void Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndHLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadDEPointerWithHLPointerThenDecrementBCAndHL(this);
}
Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndHLContext* Z80Parser::loadDEPointerWithHLPointerThenDecrementBCAndHL() {
LoadDEPointerWithHLPointerThenDecrementBCAndHLContext *_localctx = _tracker.createInstance<LoadDEPointerWithHLPointerThenDecrementBCAndHLContext>(_ctx, getState());
enterRule(_localctx, 226, Z80Parser::RuleLoadDEPointerWithHLPointerThenDecrementBCAndHL);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1212);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__86
|| _la == Z80Parser::T__87)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LoadDEPointerWithHLPointerThenDecrementBCAndHLRepeatContext ------------------------------------------------------------------
Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndHLRepeatContext::LoadDEPointerWithHLPointerThenDecrementBCAndHLRepeatContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndHLRepeatContext::getRuleIndex() const {
return Z80Parser::RuleLoadDEPointerWithHLPointerThenDecrementBCAndHLRepeat;
}
void Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndHLRepeatContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLoadDEPointerWithHLPointerThenDecrementBCAndHLRepeat(this);
}
void Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndHLRepeatContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLoadDEPointerWithHLPointerThenDecrementBCAndHLRepeat(this);
}
Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndHLRepeatContext* Z80Parser::loadDEPointerWithHLPointerThenDecrementBCAndHLRepeat() {
LoadDEPointerWithHLPointerThenDecrementBCAndHLRepeatContext *_localctx = _tracker.createInstance<LoadDEPointerWithHLPointerThenDecrementBCAndHLRepeatContext>(_ctx, getState());
enterRule(_localctx, 228, Z80Parser::RuleLoadDEPointerWithHLPointerThenDecrementBCAndHLRepeat);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1214);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__88
|| _la == Z80Parser::T__89)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CompareAToHLPointerThenIncrementHLAndDecrementBCContext ------------------------------------------------------------------
Z80Parser::CompareAToHLPointerThenIncrementHLAndDecrementBCContext::CompareAToHLPointerThenIncrementHLAndDecrementBCContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::CompareAToHLPointerThenIncrementHLAndDecrementBCContext::getRuleIndex() const {
return Z80Parser::RuleCompareAToHLPointerThenIncrementHLAndDecrementBC;
}
void Z80Parser::CompareAToHLPointerThenIncrementHLAndDecrementBCContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCompareAToHLPointerThenIncrementHLAndDecrementBC(this);
}
void Z80Parser::CompareAToHLPointerThenIncrementHLAndDecrementBCContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCompareAToHLPointerThenIncrementHLAndDecrementBC(this);
}
Z80Parser::CompareAToHLPointerThenIncrementHLAndDecrementBCContext* Z80Parser::compareAToHLPointerThenIncrementHLAndDecrementBC() {
CompareAToHLPointerThenIncrementHLAndDecrementBCContext *_localctx = _tracker.createInstance<CompareAToHLPointerThenIncrementHLAndDecrementBCContext>(_ctx, getState());
enterRule(_localctx, 230, Z80Parser::RuleCompareAToHLPointerThenIncrementHLAndDecrementBC);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1216);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__90
|| _la == Z80Parser::T__91)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CompareAToHLPointerThenIncrementHLAndDecrementBCRepeatContext ------------------------------------------------------------------
Z80Parser::CompareAToHLPointerThenIncrementHLAndDecrementBCRepeatContext::CompareAToHLPointerThenIncrementHLAndDecrementBCRepeatContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::CompareAToHLPointerThenIncrementHLAndDecrementBCRepeatContext::getRuleIndex() const {
return Z80Parser::RuleCompareAToHLPointerThenIncrementHLAndDecrementBCRepeat;
}
void Z80Parser::CompareAToHLPointerThenIncrementHLAndDecrementBCRepeatContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCompareAToHLPointerThenIncrementHLAndDecrementBCRepeat(this);
}
void Z80Parser::CompareAToHLPointerThenIncrementHLAndDecrementBCRepeatContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCompareAToHLPointerThenIncrementHLAndDecrementBCRepeat(this);
}
Z80Parser::CompareAToHLPointerThenIncrementHLAndDecrementBCRepeatContext* Z80Parser::compareAToHLPointerThenIncrementHLAndDecrementBCRepeat() {
CompareAToHLPointerThenIncrementHLAndDecrementBCRepeatContext *_localctx = _tracker.createInstance<CompareAToHLPointerThenIncrementHLAndDecrementBCRepeatContext>(_ctx, getState());
enterRule(_localctx, 232, Z80Parser::RuleCompareAToHLPointerThenIncrementHLAndDecrementBCRepeat);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1218);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__92
|| _la == Z80Parser::T__93)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CompareAToHLPointerThenDecrementHLAndBCContext ------------------------------------------------------------------
Z80Parser::CompareAToHLPointerThenDecrementHLAndBCContext::CompareAToHLPointerThenDecrementHLAndBCContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::CompareAToHLPointerThenDecrementHLAndBCContext::getRuleIndex() const {
return Z80Parser::RuleCompareAToHLPointerThenDecrementHLAndBC;
}
void Z80Parser::CompareAToHLPointerThenDecrementHLAndBCContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCompareAToHLPointerThenDecrementHLAndBC(this);
}
void Z80Parser::CompareAToHLPointerThenDecrementHLAndBCContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCompareAToHLPointerThenDecrementHLAndBC(this);
}
Z80Parser::CompareAToHLPointerThenDecrementHLAndBCContext* Z80Parser::compareAToHLPointerThenDecrementHLAndBC() {
CompareAToHLPointerThenDecrementHLAndBCContext *_localctx = _tracker.createInstance<CompareAToHLPointerThenDecrementHLAndBCContext>(_ctx, getState());
enterRule(_localctx, 234, Z80Parser::RuleCompareAToHLPointerThenDecrementHLAndBC);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1220);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__94
|| _la == Z80Parser::T__95)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CompareAToHLPointerThenDecrementHLAndBCRepeatContext ------------------------------------------------------------------
Z80Parser::CompareAToHLPointerThenDecrementHLAndBCRepeatContext::CompareAToHLPointerThenDecrementHLAndBCRepeatContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::CompareAToHLPointerThenDecrementHLAndBCRepeatContext::getRuleIndex() const {
return Z80Parser::RuleCompareAToHLPointerThenDecrementHLAndBCRepeat;
}
void Z80Parser::CompareAToHLPointerThenDecrementHLAndBCRepeatContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCompareAToHLPointerThenDecrementHLAndBCRepeat(this);
}
void Z80Parser::CompareAToHLPointerThenDecrementHLAndBCRepeatContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCompareAToHLPointerThenDecrementHLAndBCRepeat(this);
}
Z80Parser::CompareAToHLPointerThenDecrementHLAndBCRepeatContext* Z80Parser::compareAToHLPointerThenDecrementHLAndBCRepeat() {
CompareAToHLPointerThenDecrementHLAndBCRepeatContext *_localctx = _tracker.createInstance<CompareAToHLPointerThenDecrementHLAndBCRepeatContext>(_ctx, getState());
enterRule(_localctx, 236, Z80Parser::RuleCompareAToHLPointerThenDecrementHLAndBCRepeat);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1222);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__96
|| _la == Z80Parser::T__97)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ExchagneAndBlockTransfrerCommandContext ------------------------------------------------------------------
Z80Parser::ExchagneAndBlockTransfrerCommandContext::ExchagneAndBlockTransfrerCommandContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ExchangeDEWithHLContext* Z80Parser::ExchagneAndBlockTransfrerCommandContext::exchangeDEWithHL() {
return getRuleContext<Z80Parser::ExchangeDEWithHLContext>(0);
}
Z80Parser::ExchangeAFWithShadowAFContext* Z80Parser::ExchagneAndBlockTransfrerCommandContext::exchangeAFWithShadowAF() {
return getRuleContext<Z80Parser::ExchangeAFWithShadowAFContext>(0);
}
Z80Parser::ExchangeMultipleWordRegistersContext* Z80Parser::ExchagneAndBlockTransfrerCommandContext::exchangeMultipleWordRegisters() {
return getRuleContext<Z80Parser::ExchangeMultipleWordRegistersContext>(0);
}
Z80Parser::ExchangeSPPointerWithHLContext* Z80Parser::ExchagneAndBlockTransfrerCommandContext::exchangeSPPointerWithHL() {
return getRuleContext<Z80Parser::ExchangeSPPointerWithHLContext>(0);
}
Z80Parser::ExchangeSPPointerWithIXContext* Z80Parser::ExchagneAndBlockTransfrerCommandContext::exchangeSPPointerWithIX() {
return getRuleContext<Z80Parser::ExchangeSPPointerWithIXContext>(0);
}
Z80Parser::ExchangeSPPointerWithIYContext* Z80Parser::ExchagneAndBlockTransfrerCommandContext::exchangeSPPointerWithIY() {
return getRuleContext<Z80Parser::ExchangeSPPointerWithIYContext>(0);
}
Z80Parser::LoadHLPointerIntoDEThenDecrementBCAndIncrementHLContext* Z80Parser::ExchagneAndBlockTransfrerCommandContext::loadHLPointerIntoDEThenDecrementBCAndIncrementHL() {
return getRuleContext<Z80Parser::LoadHLPointerIntoDEThenDecrementBCAndIncrementHLContext>(0);
}
Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeatContext* Z80Parser::ExchagneAndBlockTransfrerCommandContext::loadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeat() {
return getRuleContext<Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeatContext>(0);
}
Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndHLContext* Z80Parser::ExchagneAndBlockTransfrerCommandContext::loadDEPointerWithHLPointerThenDecrementBCAndHL() {
return getRuleContext<Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndHLContext>(0);
}
Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndHLRepeatContext* Z80Parser::ExchagneAndBlockTransfrerCommandContext::loadDEPointerWithHLPointerThenDecrementBCAndHLRepeat() {
return getRuleContext<Z80Parser::LoadDEPointerWithHLPointerThenDecrementBCAndHLRepeatContext>(0);
}
Z80Parser::CompareAToHLPointerThenIncrementHLAndDecrementBCContext* Z80Parser::ExchagneAndBlockTransfrerCommandContext::compareAToHLPointerThenIncrementHLAndDecrementBC() {
return getRuleContext<Z80Parser::CompareAToHLPointerThenIncrementHLAndDecrementBCContext>(0);
}
Z80Parser::CompareAToHLPointerThenIncrementHLAndDecrementBCRepeatContext* Z80Parser::ExchagneAndBlockTransfrerCommandContext::compareAToHLPointerThenIncrementHLAndDecrementBCRepeat() {
return getRuleContext<Z80Parser::CompareAToHLPointerThenIncrementHLAndDecrementBCRepeatContext>(0);
}
Z80Parser::CompareAToHLPointerThenDecrementHLAndBCContext* Z80Parser::ExchagneAndBlockTransfrerCommandContext::compareAToHLPointerThenDecrementHLAndBC() {
return getRuleContext<Z80Parser::CompareAToHLPointerThenDecrementHLAndBCContext>(0);
}
Z80Parser::CompareAToHLPointerThenDecrementHLAndBCRepeatContext* Z80Parser::ExchagneAndBlockTransfrerCommandContext::compareAToHLPointerThenDecrementHLAndBCRepeat() {
return getRuleContext<Z80Parser::CompareAToHLPointerThenDecrementHLAndBCRepeatContext>(0);
}
size_t Z80Parser::ExchagneAndBlockTransfrerCommandContext::getRuleIndex() const {
return Z80Parser::RuleExchagneAndBlockTransfrerCommand;
}
void Z80Parser::ExchagneAndBlockTransfrerCommandContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterExchagneAndBlockTransfrerCommand(this);
}
void Z80Parser::ExchagneAndBlockTransfrerCommandContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitExchagneAndBlockTransfrerCommand(this);
}
Z80Parser::ExchagneAndBlockTransfrerCommandContext* Z80Parser::exchagneAndBlockTransfrerCommand() {
ExchagneAndBlockTransfrerCommandContext *_localctx = _tracker.createInstance<ExchagneAndBlockTransfrerCommandContext>(_ctx, getState());
enterRule(_localctx, 238, Z80Parser::RuleExchagneAndBlockTransfrerCommand);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1238);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 25, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1224);
exchangeDEWithHL();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1225);
exchangeAFWithShadowAF();
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
setState(1226);
exchangeMultipleWordRegisters();
break;
}
case 4: {
enterOuterAlt(_localctx, 4);
setState(1227);
exchangeSPPointerWithHL();
break;
}
case 5: {
enterOuterAlt(_localctx, 5);
setState(1228);
exchangeSPPointerWithIX();
break;
}
case 6: {
enterOuterAlt(_localctx, 6);
setState(1229);
exchangeSPPointerWithIY();
break;
}
case 7: {
enterOuterAlt(_localctx, 7);
setState(1230);
loadHLPointerIntoDEThenDecrementBCAndIncrementHL();
break;
}
case 8: {
enterOuterAlt(_localctx, 8);
setState(1231);
loadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeat();
break;
}
case 9: {
enterOuterAlt(_localctx, 9);
setState(1232);
loadDEPointerWithHLPointerThenDecrementBCAndHL();
break;
}
case 10: {
enterOuterAlt(_localctx, 10);
setState(1233);
loadDEPointerWithHLPointerThenDecrementBCAndHLRepeat();
break;
}
case 11: {
enterOuterAlt(_localctx, 11);
setState(1234);
compareAToHLPointerThenIncrementHLAndDecrementBC();
break;
}
case 12: {
enterOuterAlt(_localctx, 12);
setState(1235);
compareAToHLPointerThenIncrementHLAndDecrementBCRepeat();
break;
}
case 13: {
enterOuterAlt(_localctx, 13);
setState(1236);
compareAToHLPointerThenDecrementHLAndBC();
break;
}
case 14: {
enterOuterAlt(_localctx, 14);
setState(1237);
compareAToHLPointerThenDecrementHLAndBCRepeat();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddCommandNameContext ------------------------------------------------------------------
Z80Parser::AddCommandNameContext::AddCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::AddCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleAddCommandName;
}
void Z80Parser::AddCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddCommandName(this);
}
void Z80Parser::AddCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddCommandName(this);
}
Z80Parser::AddCommandNameContext* Z80Parser::addCommandName() {
AddCommandNameContext *_localctx = _tracker.createInstance<AddCommandNameContext>(_ctx, getState());
enterRule(_localctx, 240, Z80Parser::RuleAddCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1240);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__98
|| _la == Z80Parser::T__99)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddWithCarryCommandNameContext ------------------------------------------------------------------
Z80Parser::AddWithCarryCommandNameContext::AddWithCarryCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::AddWithCarryCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleAddWithCarryCommandName;
}
void Z80Parser::AddWithCarryCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddWithCarryCommandName(this);
}
void Z80Parser::AddWithCarryCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddWithCarryCommandName(this);
}
Z80Parser::AddWithCarryCommandNameContext* Z80Parser::addWithCarryCommandName() {
AddWithCarryCommandNameContext *_localctx = _tracker.createInstance<AddWithCarryCommandNameContext>(_ctx, getState());
enterRule(_localctx, 242, Z80Parser::RuleAddWithCarryCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1242);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__100
|| _la == Z80Parser::T__101)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractCommandNameContext ------------------------------------------------------------------
Z80Parser::SubtractCommandNameContext::SubtractCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::SubtractCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleSubtractCommandName;
}
void Z80Parser::SubtractCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractCommandName(this);
}
void Z80Parser::SubtractCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractCommandName(this);
}
Z80Parser::SubtractCommandNameContext* Z80Parser::subtractCommandName() {
SubtractCommandNameContext *_localctx = _tracker.createInstance<SubtractCommandNameContext>(_ctx, getState());
enterRule(_localctx, 244, Z80Parser::RuleSubtractCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1244);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__102
|| _la == Z80Parser::T__103)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractWithBorrowCommandNameContext ------------------------------------------------------------------
Z80Parser::SubtractWithBorrowCommandNameContext::SubtractWithBorrowCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::SubtractWithBorrowCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleSubtractWithBorrowCommandName;
}
void Z80Parser::SubtractWithBorrowCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractWithBorrowCommandName(this);
}
void Z80Parser::SubtractWithBorrowCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractWithBorrowCommandName(this);
}
Z80Parser::SubtractWithBorrowCommandNameContext* Z80Parser::subtractWithBorrowCommandName() {
SubtractWithBorrowCommandNameContext *_localctx = _tracker.createInstance<SubtractWithBorrowCommandNameContext>(_ctx, getState());
enterRule(_localctx, 246, Z80Parser::RuleSubtractWithBorrowCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1246);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__104
|| _la == Z80Parser::T__105)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AndCommandNameContext ------------------------------------------------------------------
Z80Parser::AndCommandNameContext::AndCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::AndCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleAndCommandName;
}
void Z80Parser::AndCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAndCommandName(this);
}
void Z80Parser::AndCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAndCommandName(this);
}
Z80Parser::AndCommandNameContext* Z80Parser::andCommandName() {
AndCommandNameContext *_localctx = _tracker.createInstance<AndCommandNameContext>(_ctx, getState());
enterRule(_localctx, 248, Z80Parser::RuleAndCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1248);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__106
|| _la == Z80Parser::T__107)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OrCommandNameContext ------------------------------------------------------------------
Z80Parser::OrCommandNameContext::OrCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::OrCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleOrCommandName;
}
void Z80Parser::OrCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOrCommandName(this);
}
void Z80Parser::OrCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOrCommandName(this);
}
Z80Parser::OrCommandNameContext* Z80Parser::orCommandName() {
OrCommandNameContext *_localctx = _tracker.createInstance<OrCommandNameContext>(_ctx, getState());
enterRule(_localctx, 250, Z80Parser::RuleOrCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1250);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__108
|| _la == Z80Parser::T__109)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- XorCommandNameContext ------------------------------------------------------------------
Z80Parser::XorCommandNameContext::XorCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::XorCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleXorCommandName;
}
void Z80Parser::XorCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterXorCommandName(this);
}
void Z80Parser::XorCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitXorCommandName(this);
}
Z80Parser::XorCommandNameContext* Z80Parser::xorCommandName() {
XorCommandNameContext *_localctx = _tracker.createInstance<XorCommandNameContext>(_ctx, getState());
enterRule(_localctx, 252, Z80Parser::RuleXorCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1252);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__110
|| _la == Z80Parser::T__111)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CompareCommandNameContext ------------------------------------------------------------------
Z80Parser::CompareCommandNameContext::CompareCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::CompareCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleCompareCommandName;
}
void Z80Parser::CompareCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCompareCommandName(this);
}
void Z80Parser::CompareCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCompareCommandName(this);
}
Z80Parser::CompareCommandNameContext* Z80Parser::compareCommandName() {
CompareCommandNameContext *_localctx = _tracker.createInstance<CompareCommandNameContext>(_ctx, getState());
enterRule(_localctx, 254, Z80Parser::RuleCompareCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1254);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__112
|| _la == Z80Parser::T__113)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IncrementCommandNameContext ------------------------------------------------------------------
Z80Parser::IncrementCommandNameContext::IncrementCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::IncrementCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleIncrementCommandName;
}
void Z80Parser::IncrementCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIncrementCommandName(this);
}
void Z80Parser::IncrementCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIncrementCommandName(this);
}
Z80Parser::IncrementCommandNameContext* Z80Parser::incrementCommandName() {
IncrementCommandNameContext *_localctx = _tracker.createInstance<IncrementCommandNameContext>(_ctx, getState());
enterRule(_localctx, 256, Z80Parser::RuleIncrementCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1256);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__114
|| _la == Z80Parser::T__115)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DecrementCommandNameContext ------------------------------------------------------------------
Z80Parser::DecrementCommandNameContext::DecrementCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::DecrementCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleDecrementCommandName;
}
void Z80Parser::DecrementCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDecrementCommandName(this);
}
void Z80Parser::DecrementCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDecrementCommandName(this);
}
Z80Parser::DecrementCommandNameContext* Z80Parser::decrementCommandName() {
DecrementCommandNameContext *_localctx = _tracker.createInstance<DecrementCommandNameContext>(_ctx, getState());
enterRule(_localctx, 258, Z80Parser::RuleDecrementCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1258);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__116
|| _la == Z80Parser::T__117)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddAAndRegisterContext ------------------------------------------------------------------
Z80Parser::AddAAndRegisterContext::AddAAndRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddCommandNameContext* Z80Parser::AddAAndRegisterContext::addCommandName() {
return getRuleContext<Z80Parser::AddCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::AddAAndRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddAAndRegisterContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddAAndRegisterContext::getRuleIndex() const {
return Z80Parser::RuleAddAAndRegister;
}
void Z80Parser::AddAAndRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddAAndRegister(this);
}
void Z80Parser::AddAAndRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddAAndRegister(this);
}
Z80Parser::AddAAndRegisterContext* Z80Parser::addAAndRegister() {
AddAAndRegisterContext *_localctx = _tracker.createInstance<AddAAndRegisterContext>(_ctx, getState());
enterRule(_localctx, 260, Z80Parser::RuleAddAAndRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1268);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 26, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1260);
addCommandName();
setState(1261);
dynamic_cast<AddAAndRegisterContext *>(_localctx)->source = simpleByteRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1263);
addCommandName();
setState(1264);
aRegister();
setState(1265);
match(Z80Parser::T__73);
setState(1266);
dynamic_cast<AddAAndRegisterContext *>(_localctx)->source = simpleByteRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddAAndImmediateByteContext ------------------------------------------------------------------
Z80Parser::AddAAndImmediateByteContext::AddAAndImmediateByteContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddCommandNameContext* Z80Parser::AddAAndImmediateByteContext::addCommandName() {
return getRuleContext<Z80Parser::AddCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::AddAAndImmediateByteContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddAAndImmediateByteContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddAAndImmediateByteContext::getRuleIndex() const {
return Z80Parser::RuleAddAAndImmediateByte;
}
void Z80Parser::AddAAndImmediateByteContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddAAndImmediateByte(this);
}
void Z80Parser::AddAAndImmediateByteContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddAAndImmediateByte(this);
}
Z80Parser::AddAAndImmediateByteContext* Z80Parser::addAAndImmediateByte() {
AddAAndImmediateByteContext *_localctx = _tracker.createInstance<AddAAndImmediateByteContext>(_ctx, getState());
enterRule(_localctx, 262, Z80Parser::RuleAddAAndImmediateByte);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1278);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 27, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1270);
addCommandName();
setState(1271);
dynamic_cast<AddAAndImmediateByteContext *>(_localctx)->source = number();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1273);
addCommandName();
setState(1274);
aRegister();
setState(1275);
match(Z80Parser::T__73);
setState(1276);
dynamic_cast<AddAAndImmediateByteContext *>(_localctx)->source = number();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddAAndIXHContext ------------------------------------------------------------------
Z80Parser::AddAAndIXHContext::AddAAndIXHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddCommandNameContext* Z80Parser::AddAAndIXHContext::addCommandName() {
return getRuleContext<Z80Parser::AddCommandNameContext>(0);
}
Z80Parser::IxHighRegisterContext* Z80Parser::AddAAndIXHContext::ixHighRegister() {
return getRuleContext<Z80Parser::IxHighRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddAAndIXHContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddAAndIXHContext::getRuleIndex() const {
return Z80Parser::RuleAddAAndIXH;
}
void Z80Parser::AddAAndIXHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddAAndIXH(this);
}
void Z80Parser::AddAAndIXHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddAAndIXH(this);
}
Z80Parser::AddAAndIXHContext* Z80Parser::addAAndIXH() {
AddAAndIXHContext *_localctx = _tracker.createInstance<AddAAndIXHContext>(_ctx, getState());
enterRule(_localctx, 264, Z80Parser::RuleAddAAndIXH);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1288);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 28, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1280);
addCommandName();
setState(1281);
dynamic_cast<AddAAndIXHContext *>(_localctx)->source = ixHighRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1283);
addCommandName();
setState(1284);
aRegister();
setState(1285);
match(Z80Parser::T__73);
setState(1286);
dynamic_cast<AddAAndIXHContext *>(_localctx)->source = ixHighRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddAAndIXLContext ------------------------------------------------------------------
Z80Parser::AddAAndIXLContext::AddAAndIXLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddCommandNameContext* Z80Parser::AddAAndIXLContext::addCommandName() {
return getRuleContext<Z80Parser::AddCommandNameContext>(0);
}
Z80Parser::IxLowRegisterContext* Z80Parser::AddAAndIXLContext::ixLowRegister() {
return getRuleContext<Z80Parser::IxLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddAAndIXLContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddAAndIXLContext::getRuleIndex() const {
return Z80Parser::RuleAddAAndIXL;
}
void Z80Parser::AddAAndIXLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddAAndIXL(this);
}
void Z80Parser::AddAAndIXLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddAAndIXL(this);
}
Z80Parser::AddAAndIXLContext* Z80Parser::addAAndIXL() {
AddAAndIXLContext *_localctx = _tracker.createInstance<AddAAndIXLContext>(_ctx, getState());
enterRule(_localctx, 266, Z80Parser::RuleAddAAndIXL);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1298);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 29, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1290);
addCommandName();
setState(1291);
dynamic_cast<AddAAndIXLContext *>(_localctx)->source = ixLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1293);
addCommandName();
setState(1294);
aRegister();
setState(1295);
match(Z80Parser::T__73);
setState(1296);
dynamic_cast<AddAAndIXLContext *>(_localctx)->source = ixLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddAAndIYHContext ------------------------------------------------------------------
Z80Parser::AddAAndIYHContext::AddAAndIYHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddCommandNameContext* Z80Parser::AddAAndIYHContext::addCommandName() {
return getRuleContext<Z80Parser::AddCommandNameContext>(0);
}
Z80Parser::IyHighRegisterContext* Z80Parser::AddAAndIYHContext::iyHighRegister() {
return getRuleContext<Z80Parser::IyHighRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddAAndIYHContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddAAndIYHContext::getRuleIndex() const {
return Z80Parser::RuleAddAAndIYH;
}
void Z80Parser::AddAAndIYHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddAAndIYH(this);
}
void Z80Parser::AddAAndIYHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddAAndIYH(this);
}
Z80Parser::AddAAndIYHContext* Z80Parser::addAAndIYH() {
AddAAndIYHContext *_localctx = _tracker.createInstance<AddAAndIYHContext>(_ctx, getState());
enterRule(_localctx, 268, Z80Parser::RuleAddAAndIYH);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1308);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 30, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1300);
addCommandName();
setState(1301);
dynamic_cast<AddAAndIYHContext *>(_localctx)->source = iyHighRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1303);
addCommandName();
setState(1304);
aRegister();
setState(1305);
match(Z80Parser::T__73);
setState(1306);
dynamic_cast<AddAAndIYHContext *>(_localctx)->source = iyHighRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddAAndIYLContext ------------------------------------------------------------------
Z80Parser::AddAAndIYLContext::AddAAndIYLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddCommandNameContext* Z80Parser::AddAAndIYLContext::addCommandName() {
return getRuleContext<Z80Parser::AddCommandNameContext>(0);
}
Z80Parser::IyLowRegisterContext* Z80Parser::AddAAndIYLContext::iyLowRegister() {
return getRuleContext<Z80Parser::IyLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddAAndIYLContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddAAndIYLContext::getRuleIndex() const {
return Z80Parser::RuleAddAAndIYL;
}
void Z80Parser::AddAAndIYLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddAAndIYL(this);
}
void Z80Parser::AddAAndIYLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddAAndIYL(this);
}
Z80Parser::AddAAndIYLContext* Z80Parser::addAAndIYL() {
AddAAndIYLContext *_localctx = _tracker.createInstance<AddAAndIYLContext>(_ctx, getState());
enterRule(_localctx, 270, Z80Parser::RuleAddAAndIYL);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1318);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 31, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1310);
addCommandName();
setState(1311);
dynamic_cast<AddAAndIYLContext *>(_localctx)->source = iyLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1313);
addCommandName();
setState(1314);
aRegister();
setState(1315);
match(Z80Parser::T__73);
setState(1316);
dynamic_cast<AddAAndIYLContext *>(_localctx)->source = iyLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddAAndHLPointerContext ------------------------------------------------------------------
Z80Parser::AddAAndHLPointerContext::AddAAndHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddCommandNameContext* Z80Parser::AddAAndHLPointerContext::addCommandName() {
return getRuleContext<Z80Parser::AddCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::AddAAndHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddAAndHLPointerContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddAAndHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleAddAAndHLPointer;
}
void Z80Parser::AddAAndHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddAAndHLPointer(this);
}
void Z80Parser::AddAAndHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddAAndHLPointer(this);
}
Z80Parser::AddAAndHLPointerContext* Z80Parser::addAAndHLPointer() {
AddAAndHLPointerContext *_localctx = _tracker.createInstance<AddAAndHLPointerContext>(_ctx, getState());
enterRule(_localctx, 272, Z80Parser::RuleAddAAndHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1328);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 32, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1320);
addCommandName();
setState(1321);
dynamic_cast<AddAAndHLPointerContext *>(_localctx)->source = hlPointer();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1323);
addCommandName();
setState(1324);
aRegister();
setState(1325);
match(Z80Parser::T__73);
setState(1326);
dynamic_cast<AddAAndHLPointerContext *>(_localctx)->source = hlPointer();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddAAndIXOffsetContext ------------------------------------------------------------------
Z80Parser::AddAAndIXOffsetContext::AddAAndIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddCommandNameContext* Z80Parser::AddAAndIXOffsetContext::addCommandName() {
return getRuleContext<Z80Parser::AddCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::AddAAndIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddAAndIXOffsetContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddAAndIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleAddAAndIXOffset;
}
void Z80Parser::AddAAndIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddAAndIXOffset(this);
}
void Z80Parser::AddAAndIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddAAndIXOffset(this);
}
Z80Parser::AddAAndIXOffsetContext* Z80Parser::addAAndIXOffset() {
AddAAndIXOffsetContext *_localctx = _tracker.createInstance<AddAAndIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 274, Z80Parser::RuleAddAAndIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1338);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 33, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1330);
addCommandName();
setState(1331);
dynamic_cast<AddAAndIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1333);
addCommandName();
setState(1334);
aRegister();
setState(1335);
match(Z80Parser::T__73);
setState(1336);
dynamic_cast<AddAAndIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddAAndIYOffsetContext ------------------------------------------------------------------
Z80Parser::AddAAndIYOffsetContext::AddAAndIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddCommandNameContext* Z80Parser::AddAAndIYOffsetContext::addCommandName() {
return getRuleContext<Z80Parser::AddCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::AddAAndIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddAAndIYOffsetContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddAAndIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleAddAAndIYOffset;
}
void Z80Parser::AddAAndIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddAAndIYOffset(this);
}
void Z80Parser::AddAAndIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddAAndIYOffset(this);
}
Z80Parser::AddAAndIYOffsetContext* Z80Parser::addAAndIYOffset() {
AddAAndIYOffsetContext *_localctx = _tracker.createInstance<AddAAndIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 276, Z80Parser::RuleAddAAndIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1348);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 34, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1340);
addCommandName();
setState(1341);
dynamic_cast<AddAAndIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1343);
addCommandName();
setState(1344);
aRegister();
setState(1345);
match(Z80Parser::T__73);
setState(1346);
dynamic_cast<AddAAndIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddWithCarryAAndRegisterContext ------------------------------------------------------------------
Z80Parser::AddWithCarryAAndRegisterContext::AddWithCarryAAndRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddWithCarryCommandNameContext* Z80Parser::AddWithCarryAAndRegisterContext::addWithCarryCommandName() {
return getRuleContext<Z80Parser::AddWithCarryCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::AddWithCarryAAndRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddWithCarryAAndRegisterContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddWithCarryAAndRegisterContext::getRuleIndex() const {
return Z80Parser::RuleAddWithCarryAAndRegister;
}
void Z80Parser::AddWithCarryAAndRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddWithCarryAAndRegister(this);
}
void Z80Parser::AddWithCarryAAndRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddWithCarryAAndRegister(this);
}
Z80Parser::AddWithCarryAAndRegisterContext* Z80Parser::addWithCarryAAndRegister() {
AddWithCarryAAndRegisterContext *_localctx = _tracker.createInstance<AddWithCarryAAndRegisterContext>(_ctx, getState());
enterRule(_localctx, 278, Z80Parser::RuleAddWithCarryAAndRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1358);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 35, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1350);
addWithCarryCommandName();
setState(1351);
dynamic_cast<AddWithCarryAAndRegisterContext *>(_localctx)->source = simpleByteRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1353);
addWithCarryCommandName();
setState(1354);
aRegister();
setState(1355);
match(Z80Parser::T__73);
setState(1356);
dynamic_cast<AddWithCarryAAndRegisterContext *>(_localctx)->source = simpleByteRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddWithCarryAAndHLPointerContext ------------------------------------------------------------------
Z80Parser::AddWithCarryAAndHLPointerContext::AddWithCarryAAndHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddWithCarryCommandNameContext* Z80Parser::AddWithCarryAAndHLPointerContext::addWithCarryCommandName() {
return getRuleContext<Z80Parser::AddWithCarryCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::AddWithCarryAAndHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddWithCarryAAndHLPointerContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddWithCarryAAndHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleAddWithCarryAAndHLPointer;
}
void Z80Parser::AddWithCarryAAndHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddWithCarryAAndHLPointer(this);
}
void Z80Parser::AddWithCarryAAndHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddWithCarryAAndHLPointer(this);
}
Z80Parser::AddWithCarryAAndHLPointerContext* Z80Parser::addWithCarryAAndHLPointer() {
AddWithCarryAAndHLPointerContext *_localctx = _tracker.createInstance<AddWithCarryAAndHLPointerContext>(_ctx, getState());
enterRule(_localctx, 280, Z80Parser::RuleAddWithCarryAAndHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1368);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 36, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1360);
addWithCarryCommandName();
setState(1361);
dynamic_cast<AddWithCarryAAndHLPointerContext *>(_localctx)->source = hlPointer();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1363);
addWithCarryCommandName();
setState(1364);
aRegister();
setState(1365);
match(Z80Parser::T__73);
setState(1366);
dynamic_cast<AddWithCarryAAndHLPointerContext *>(_localctx)->source = hlPointer();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddWithCarryAAndImmediateContext ------------------------------------------------------------------
Z80Parser::AddWithCarryAAndImmediateContext::AddWithCarryAAndImmediateContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddWithCarryCommandNameContext* Z80Parser::AddWithCarryAAndImmediateContext::addWithCarryCommandName() {
return getRuleContext<Z80Parser::AddWithCarryCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::AddWithCarryAAndImmediateContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddWithCarryAAndImmediateContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddWithCarryAAndImmediateContext::getRuleIndex() const {
return Z80Parser::RuleAddWithCarryAAndImmediate;
}
void Z80Parser::AddWithCarryAAndImmediateContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddWithCarryAAndImmediate(this);
}
void Z80Parser::AddWithCarryAAndImmediateContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddWithCarryAAndImmediate(this);
}
Z80Parser::AddWithCarryAAndImmediateContext* Z80Parser::addWithCarryAAndImmediate() {
AddWithCarryAAndImmediateContext *_localctx = _tracker.createInstance<AddWithCarryAAndImmediateContext>(_ctx, getState());
enterRule(_localctx, 282, Z80Parser::RuleAddWithCarryAAndImmediate);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1378);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 37, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1370);
addWithCarryCommandName();
setState(1371);
dynamic_cast<AddWithCarryAAndImmediateContext *>(_localctx)->source = number();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1373);
addWithCarryCommandName();
setState(1374);
aRegister();
setState(1375);
match(Z80Parser::T__73);
setState(1376);
dynamic_cast<AddWithCarryAAndImmediateContext *>(_localctx)->source = number();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddWithCarryAAndIXOffsetContext ------------------------------------------------------------------
Z80Parser::AddWithCarryAAndIXOffsetContext::AddWithCarryAAndIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddWithCarryCommandNameContext* Z80Parser::AddWithCarryAAndIXOffsetContext::addWithCarryCommandName() {
return getRuleContext<Z80Parser::AddWithCarryCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::AddWithCarryAAndIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddWithCarryAAndIXOffsetContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddWithCarryAAndIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleAddWithCarryAAndIXOffset;
}
void Z80Parser::AddWithCarryAAndIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddWithCarryAAndIXOffset(this);
}
void Z80Parser::AddWithCarryAAndIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddWithCarryAAndIXOffset(this);
}
Z80Parser::AddWithCarryAAndIXOffsetContext* Z80Parser::addWithCarryAAndIXOffset() {
AddWithCarryAAndIXOffsetContext *_localctx = _tracker.createInstance<AddWithCarryAAndIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 284, Z80Parser::RuleAddWithCarryAAndIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1388);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 38, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1380);
addWithCarryCommandName();
setState(1381);
dynamic_cast<AddWithCarryAAndIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1383);
addWithCarryCommandName();
setState(1384);
aRegister();
setState(1385);
match(Z80Parser::T__73);
setState(1386);
dynamic_cast<AddWithCarryAAndIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddWithCarryAAndIYOffsetContext ------------------------------------------------------------------
Z80Parser::AddWithCarryAAndIYOffsetContext::AddWithCarryAAndIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddWithCarryCommandNameContext* Z80Parser::AddWithCarryAAndIYOffsetContext::addWithCarryCommandName() {
return getRuleContext<Z80Parser::AddWithCarryCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::AddWithCarryAAndIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddWithCarryAAndIYOffsetContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddWithCarryAAndIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleAddWithCarryAAndIYOffset;
}
void Z80Parser::AddWithCarryAAndIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddWithCarryAAndIYOffset(this);
}
void Z80Parser::AddWithCarryAAndIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddWithCarryAAndIYOffset(this);
}
Z80Parser::AddWithCarryAAndIYOffsetContext* Z80Parser::addWithCarryAAndIYOffset() {
AddWithCarryAAndIYOffsetContext *_localctx = _tracker.createInstance<AddWithCarryAAndIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 286, Z80Parser::RuleAddWithCarryAAndIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1398);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 39, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1390);
addWithCarryCommandName();
setState(1391);
dynamic_cast<AddWithCarryAAndIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1393);
addWithCarryCommandName();
setState(1394);
aRegister();
setState(1395);
match(Z80Parser::T__73);
setState(1396);
dynamic_cast<AddWithCarryAAndIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddWithCarryAAndIXHContext ------------------------------------------------------------------
Z80Parser::AddWithCarryAAndIXHContext::AddWithCarryAAndIXHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddWithCarryCommandNameContext* Z80Parser::AddWithCarryAAndIXHContext::addWithCarryCommandName() {
return getRuleContext<Z80Parser::AddWithCarryCommandNameContext>(0);
}
Z80Parser::IxHighRegisterContext* Z80Parser::AddWithCarryAAndIXHContext::ixHighRegister() {
return getRuleContext<Z80Parser::IxHighRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddWithCarryAAndIXHContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddWithCarryAAndIXHContext::getRuleIndex() const {
return Z80Parser::RuleAddWithCarryAAndIXH;
}
void Z80Parser::AddWithCarryAAndIXHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddWithCarryAAndIXH(this);
}
void Z80Parser::AddWithCarryAAndIXHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddWithCarryAAndIXH(this);
}
Z80Parser::AddWithCarryAAndIXHContext* Z80Parser::addWithCarryAAndIXH() {
AddWithCarryAAndIXHContext *_localctx = _tracker.createInstance<AddWithCarryAAndIXHContext>(_ctx, getState());
enterRule(_localctx, 288, Z80Parser::RuleAddWithCarryAAndIXH);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1408);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 40, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1400);
addWithCarryCommandName();
setState(1401);
dynamic_cast<AddWithCarryAAndIXHContext *>(_localctx)->source = ixHighRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1403);
addWithCarryCommandName();
setState(1404);
aRegister();
setState(1405);
match(Z80Parser::T__73);
setState(1406);
dynamic_cast<AddWithCarryAAndIXHContext *>(_localctx)->source = ixHighRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddWithCarryAAndIXLContext ------------------------------------------------------------------
Z80Parser::AddWithCarryAAndIXLContext::AddWithCarryAAndIXLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddWithCarryCommandNameContext* Z80Parser::AddWithCarryAAndIXLContext::addWithCarryCommandName() {
return getRuleContext<Z80Parser::AddWithCarryCommandNameContext>(0);
}
Z80Parser::IxLowRegisterContext* Z80Parser::AddWithCarryAAndIXLContext::ixLowRegister() {
return getRuleContext<Z80Parser::IxLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddWithCarryAAndIXLContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddWithCarryAAndIXLContext::getRuleIndex() const {
return Z80Parser::RuleAddWithCarryAAndIXL;
}
void Z80Parser::AddWithCarryAAndIXLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddWithCarryAAndIXL(this);
}
void Z80Parser::AddWithCarryAAndIXLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddWithCarryAAndIXL(this);
}
Z80Parser::AddWithCarryAAndIXLContext* Z80Parser::addWithCarryAAndIXL() {
AddWithCarryAAndIXLContext *_localctx = _tracker.createInstance<AddWithCarryAAndIXLContext>(_ctx, getState());
enterRule(_localctx, 290, Z80Parser::RuleAddWithCarryAAndIXL);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1418);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 41, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1410);
addWithCarryCommandName();
setState(1411);
dynamic_cast<AddWithCarryAAndIXLContext *>(_localctx)->source = ixLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1413);
addWithCarryCommandName();
setState(1414);
aRegister();
setState(1415);
match(Z80Parser::T__73);
setState(1416);
dynamic_cast<AddWithCarryAAndIXLContext *>(_localctx)->source = ixLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddWithCarryAAndIYHContext ------------------------------------------------------------------
Z80Parser::AddWithCarryAAndIYHContext::AddWithCarryAAndIYHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddWithCarryCommandNameContext* Z80Parser::AddWithCarryAAndIYHContext::addWithCarryCommandName() {
return getRuleContext<Z80Parser::AddWithCarryCommandNameContext>(0);
}
Z80Parser::IyHighRegisterContext* Z80Parser::AddWithCarryAAndIYHContext::iyHighRegister() {
return getRuleContext<Z80Parser::IyHighRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddWithCarryAAndIYHContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddWithCarryAAndIYHContext::getRuleIndex() const {
return Z80Parser::RuleAddWithCarryAAndIYH;
}
void Z80Parser::AddWithCarryAAndIYHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddWithCarryAAndIYH(this);
}
void Z80Parser::AddWithCarryAAndIYHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddWithCarryAAndIYH(this);
}
Z80Parser::AddWithCarryAAndIYHContext* Z80Parser::addWithCarryAAndIYH() {
AddWithCarryAAndIYHContext *_localctx = _tracker.createInstance<AddWithCarryAAndIYHContext>(_ctx, getState());
enterRule(_localctx, 292, Z80Parser::RuleAddWithCarryAAndIYH);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1428);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 42, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1420);
addWithCarryCommandName();
setState(1421);
dynamic_cast<AddWithCarryAAndIYHContext *>(_localctx)->source = iyHighRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1423);
addWithCarryCommandName();
setState(1424);
aRegister();
setState(1425);
match(Z80Parser::T__73);
setState(1426);
dynamic_cast<AddWithCarryAAndIYHContext *>(_localctx)->source = iyHighRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddWithCarryAAndIYLContext ------------------------------------------------------------------
Z80Parser::AddWithCarryAAndIYLContext::AddWithCarryAAndIYLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddWithCarryCommandNameContext* Z80Parser::AddWithCarryAAndIYLContext::addWithCarryCommandName() {
return getRuleContext<Z80Parser::AddWithCarryCommandNameContext>(0);
}
Z80Parser::IyLowRegisterContext* Z80Parser::AddWithCarryAAndIYLContext::iyLowRegister() {
return getRuleContext<Z80Parser::IyLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AddWithCarryAAndIYLContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AddWithCarryAAndIYLContext::getRuleIndex() const {
return Z80Parser::RuleAddWithCarryAAndIYL;
}
void Z80Parser::AddWithCarryAAndIYLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddWithCarryAAndIYL(this);
}
void Z80Parser::AddWithCarryAAndIYLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddWithCarryAAndIYL(this);
}
Z80Parser::AddWithCarryAAndIYLContext* Z80Parser::addWithCarryAAndIYL() {
AddWithCarryAAndIYLContext *_localctx = _tracker.createInstance<AddWithCarryAAndIYLContext>(_ctx, getState());
enterRule(_localctx, 294, Z80Parser::RuleAddWithCarryAAndIYL);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1438);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 43, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1430);
addWithCarryCommandName();
setState(1431);
dynamic_cast<AddWithCarryAAndIYLContext *>(_localctx)->source = iyLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1433);
addWithCarryCommandName();
setState(1434);
aRegister();
setState(1435);
match(Z80Parser::T__73);
setState(1436);
dynamic_cast<AddWithCarryAAndIYLContext *>(_localctx)->source = iyLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractRegisterFromAContext ------------------------------------------------------------------
Z80Parser::SubtractRegisterFromAContext::SubtractRegisterFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractCommandNameContext* Z80Parser::SubtractRegisterFromAContext::subtractCommandName() {
return getRuleContext<Z80Parser::SubtractCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::SubtractRegisterFromAContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractRegisterFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractRegisterFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractRegisterFromA;
}
void Z80Parser::SubtractRegisterFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractRegisterFromA(this);
}
void Z80Parser::SubtractRegisterFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractRegisterFromA(this);
}
Z80Parser::SubtractRegisterFromAContext* Z80Parser::subtractRegisterFromA() {
SubtractRegisterFromAContext *_localctx = _tracker.createInstance<SubtractRegisterFromAContext>(_ctx, getState());
enterRule(_localctx, 296, Z80Parser::RuleSubtractRegisterFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1448);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 44, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1440);
subtractCommandName();
setState(1441);
dynamic_cast<SubtractRegisterFromAContext *>(_localctx)->source = simpleByteRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1443);
subtractCommandName();
setState(1444);
aRegister();
setState(1445);
match(Z80Parser::T__73);
setState(1446);
dynamic_cast<SubtractRegisterFromAContext *>(_localctx)->source = simpleByteRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractHLPointerFromAContext ------------------------------------------------------------------
Z80Parser::SubtractHLPointerFromAContext::SubtractHLPointerFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractCommandNameContext* Z80Parser::SubtractHLPointerFromAContext::subtractCommandName() {
return getRuleContext<Z80Parser::SubtractCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::SubtractHLPointerFromAContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractHLPointerFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractHLPointerFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractHLPointerFromA;
}
void Z80Parser::SubtractHLPointerFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractHLPointerFromA(this);
}
void Z80Parser::SubtractHLPointerFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractHLPointerFromA(this);
}
Z80Parser::SubtractHLPointerFromAContext* Z80Parser::subtractHLPointerFromA() {
SubtractHLPointerFromAContext *_localctx = _tracker.createInstance<SubtractHLPointerFromAContext>(_ctx, getState());
enterRule(_localctx, 298, Z80Parser::RuleSubtractHLPointerFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1458);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 45, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1450);
subtractCommandName();
setState(1451);
dynamic_cast<SubtractHLPointerFromAContext *>(_localctx)->source = hlPointer();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1453);
subtractCommandName();
setState(1454);
aRegister();
setState(1455);
match(Z80Parser::T__73);
setState(1456);
dynamic_cast<SubtractHLPointerFromAContext *>(_localctx)->source = hlPointer();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractImmediateFromAContext ------------------------------------------------------------------
Z80Parser::SubtractImmediateFromAContext::SubtractImmediateFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractCommandNameContext* Z80Parser::SubtractImmediateFromAContext::subtractCommandName() {
return getRuleContext<Z80Parser::SubtractCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::SubtractImmediateFromAContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractImmediateFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractImmediateFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractImmediateFromA;
}
void Z80Parser::SubtractImmediateFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractImmediateFromA(this);
}
void Z80Parser::SubtractImmediateFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractImmediateFromA(this);
}
Z80Parser::SubtractImmediateFromAContext* Z80Parser::subtractImmediateFromA() {
SubtractImmediateFromAContext *_localctx = _tracker.createInstance<SubtractImmediateFromAContext>(_ctx, getState());
enterRule(_localctx, 300, Z80Parser::RuleSubtractImmediateFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1468);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 46, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1460);
subtractCommandName();
setState(1461);
dynamic_cast<SubtractImmediateFromAContext *>(_localctx)->source = number();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1463);
subtractCommandName();
setState(1464);
aRegister();
setState(1465);
match(Z80Parser::T__73);
setState(1466);
dynamic_cast<SubtractImmediateFromAContext *>(_localctx)->source = number();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractIXOffsetFromAContext ------------------------------------------------------------------
Z80Parser::SubtractIXOffsetFromAContext::SubtractIXOffsetFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractCommandNameContext* Z80Parser::SubtractIXOffsetFromAContext::subtractCommandName() {
return getRuleContext<Z80Parser::SubtractCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::SubtractIXOffsetFromAContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractIXOffsetFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractIXOffsetFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractIXOffsetFromA;
}
void Z80Parser::SubtractIXOffsetFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractIXOffsetFromA(this);
}
void Z80Parser::SubtractIXOffsetFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractIXOffsetFromA(this);
}
Z80Parser::SubtractIXOffsetFromAContext* Z80Parser::subtractIXOffsetFromA() {
SubtractIXOffsetFromAContext *_localctx = _tracker.createInstance<SubtractIXOffsetFromAContext>(_ctx, getState());
enterRule(_localctx, 302, Z80Parser::RuleSubtractIXOffsetFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1478);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 47, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1470);
subtractCommandName();
setState(1471);
dynamic_cast<SubtractIXOffsetFromAContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1473);
subtractCommandName();
setState(1474);
aRegister();
setState(1475);
match(Z80Parser::T__73);
setState(1476);
dynamic_cast<SubtractIXOffsetFromAContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractIYOffsetFromAContext ------------------------------------------------------------------
Z80Parser::SubtractIYOffsetFromAContext::SubtractIYOffsetFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractCommandNameContext* Z80Parser::SubtractIYOffsetFromAContext::subtractCommandName() {
return getRuleContext<Z80Parser::SubtractCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::SubtractIYOffsetFromAContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractIYOffsetFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractIYOffsetFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractIYOffsetFromA;
}
void Z80Parser::SubtractIYOffsetFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractIYOffsetFromA(this);
}
void Z80Parser::SubtractIYOffsetFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractIYOffsetFromA(this);
}
Z80Parser::SubtractIYOffsetFromAContext* Z80Parser::subtractIYOffsetFromA() {
SubtractIYOffsetFromAContext *_localctx = _tracker.createInstance<SubtractIYOffsetFromAContext>(_ctx, getState());
enterRule(_localctx, 304, Z80Parser::RuleSubtractIYOffsetFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1488);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 48, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1480);
subtractCommandName();
setState(1481);
dynamic_cast<SubtractIYOffsetFromAContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1483);
subtractCommandName();
setState(1484);
aRegister();
setState(1485);
match(Z80Parser::T__73);
setState(1486);
dynamic_cast<SubtractIYOffsetFromAContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractIXHighOrLowFromAContext ------------------------------------------------------------------
Z80Parser::SubtractIXHighOrLowFromAContext::SubtractIXHighOrLowFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractCommandNameContext* Z80Parser::SubtractIXHighOrLowFromAContext::subtractCommandName() {
return getRuleContext<Z80Parser::SubtractCommandNameContext>(0);
}
Z80Parser::IxHighOrLowRegisterContext* Z80Parser::SubtractIXHighOrLowFromAContext::ixHighOrLowRegister() {
return getRuleContext<Z80Parser::IxHighOrLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractIXHighOrLowFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractIXHighOrLowFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractIXHighOrLowFromA;
}
void Z80Parser::SubtractIXHighOrLowFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractIXHighOrLowFromA(this);
}
void Z80Parser::SubtractIXHighOrLowFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractIXHighOrLowFromA(this);
}
Z80Parser::SubtractIXHighOrLowFromAContext* Z80Parser::subtractIXHighOrLowFromA() {
SubtractIXHighOrLowFromAContext *_localctx = _tracker.createInstance<SubtractIXHighOrLowFromAContext>(_ctx, getState());
enterRule(_localctx, 306, Z80Parser::RuleSubtractIXHighOrLowFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1498);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 49, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1490);
subtractCommandName();
setState(1491);
dynamic_cast<SubtractIXHighOrLowFromAContext *>(_localctx)->source = ixHighOrLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1493);
subtractCommandName();
setState(1494);
aRegister();
setState(1495);
match(Z80Parser::T__73);
setState(1496);
dynamic_cast<SubtractIXHighOrLowFromAContext *>(_localctx)->source = ixHighOrLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractIYHighOrLowFromAContext ------------------------------------------------------------------
Z80Parser::SubtractIYHighOrLowFromAContext::SubtractIYHighOrLowFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractCommandNameContext* Z80Parser::SubtractIYHighOrLowFromAContext::subtractCommandName() {
return getRuleContext<Z80Parser::SubtractCommandNameContext>(0);
}
Z80Parser::IyHighOrLowRegisterContext* Z80Parser::SubtractIYHighOrLowFromAContext::iyHighOrLowRegister() {
return getRuleContext<Z80Parser::IyHighOrLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractIYHighOrLowFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractIYHighOrLowFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractIYHighOrLowFromA;
}
void Z80Parser::SubtractIYHighOrLowFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractIYHighOrLowFromA(this);
}
void Z80Parser::SubtractIYHighOrLowFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractIYHighOrLowFromA(this);
}
Z80Parser::SubtractIYHighOrLowFromAContext* Z80Parser::subtractIYHighOrLowFromA() {
SubtractIYHighOrLowFromAContext *_localctx = _tracker.createInstance<SubtractIYHighOrLowFromAContext>(_ctx, getState());
enterRule(_localctx, 308, Z80Parser::RuleSubtractIYHighOrLowFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1508);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 50, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1500);
subtractCommandName();
setState(1501);
dynamic_cast<SubtractIYHighOrLowFromAContext *>(_localctx)->source = iyHighOrLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1503);
subtractCommandName();
setState(1504);
aRegister();
setState(1505);
match(Z80Parser::T__73);
setState(1506);
dynamic_cast<SubtractIYHighOrLowFromAContext *>(_localctx)->source = iyHighOrLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractWithBorrowRegisterFromAContext ------------------------------------------------------------------
Z80Parser::SubtractWithBorrowRegisterFromAContext::SubtractWithBorrowRegisterFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractWithBorrowCommandNameContext* Z80Parser::SubtractWithBorrowRegisterFromAContext::subtractWithBorrowCommandName() {
return getRuleContext<Z80Parser::SubtractWithBorrowCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::SubtractWithBorrowRegisterFromAContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractWithBorrowRegisterFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractWithBorrowRegisterFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractWithBorrowRegisterFromA;
}
void Z80Parser::SubtractWithBorrowRegisterFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractWithBorrowRegisterFromA(this);
}
void Z80Parser::SubtractWithBorrowRegisterFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractWithBorrowRegisterFromA(this);
}
Z80Parser::SubtractWithBorrowRegisterFromAContext* Z80Parser::subtractWithBorrowRegisterFromA() {
SubtractWithBorrowRegisterFromAContext *_localctx = _tracker.createInstance<SubtractWithBorrowRegisterFromAContext>(_ctx, getState());
enterRule(_localctx, 310, Z80Parser::RuleSubtractWithBorrowRegisterFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1518);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 51, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1510);
subtractWithBorrowCommandName();
setState(1511);
dynamic_cast<SubtractWithBorrowRegisterFromAContext *>(_localctx)->source = simpleByteRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1513);
subtractWithBorrowCommandName();
setState(1514);
aRegister();
setState(1515);
match(Z80Parser::T__73);
setState(1516);
dynamic_cast<SubtractWithBorrowRegisterFromAContext *>(_localctx)->source = simpleByteRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractWithBorrowHLPointerFromAContext ------------------------------------------------------------------
Z80Parser::SubtractWithBorrowHLPointerFromAContext::SubtractWithBorrowHLPointerFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractWithBorrowCommandNameContext* Z80Parser::SubtractWithBorrowHLPointerFromAContext::subtractWithBorrowCommandName() {
return getRuleContext<Z80Parser::SubtractWithBorrowCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::SubtractWithBorrowHLPointerFromAContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractWithBorrowHLPointerFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractWithBorrowHLPointerFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractWithBorrowHLPointerFromA;
}
void Z80Parser::SubtractWithBorrowHLPointerFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractWithBorrowHLPointerFromA(this);
}
void Z80Parser::SubtractWithBorrowHLPointerFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractWithBorrowHLPointerFromA(this);
}
Z80Parser::SubtractWithBorrowHLPointerFromAContext* Z80Parser::subtractWithBorrowHLPointerFromA() {
SubtractWithBorrowHLPointerFromAContext *_localctx = _tracker.createInstance<SubtractWithBorrowHLPointerFromAContext>(_ctx, getState());
enterRule(_localctx, 312, Z80Parser::RuleSubtractWithBorrowHLPointerFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1528);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 52, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1520);
subtractWithBorrowCommandName();
setState(1521);
dynamic_cast<SubtractWithBorrowHLPointerFromAContext *>(_localctx)->source = hlPointer();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1523);
subtractWithBorrowCommandName();
setState(1524);
aRegister();
setState(1525);
match(Z80Parser::T__73);
setState(1526);
dynamic_cast<SubtractWithBorrowHLPointerFromAContext *>(_localctx)->source = hlPointer();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractWithBorrowIXOffsetFromAContext ------------------------------------------------------------------
Z80Parser::SubtractWithBorrowIXOffsetFromAContext::SubtractWithBorrowIXOffsetFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractWithBorrowCommandNameContext* Z80Parser::SubtractWithBorrowIXOffsetFromAContext::subtractWithBorrowCommandName() {
return getRuleContext<Z80Parser::SubtractWithBorrowCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::SubtractWithBorrowIXOffsetFromAContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractWithBorrowIXOffsetFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractWithBorrowIXOffsetFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractWithBorrowIXOffsetFromA;
}
void Z80Parser::SubtractWithBorrowIXOffsetFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractWithBorrowIXOffsetFromA(this);
}
void Z80Parser::SubtractWithBorrowIXOffsetFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractWithBorrowIXOffsetFromA(this);
}
Z80Parser::SubtractWithBorrowIXOffsetFromAContext* Z80Parser::subtractWithBorrowIXOffsetFromA() {
SubtractWithBorrowIXOffsetFromAContext *_localctx = _tracker.createInstance<SubtractWithBorrowIXOffsetFromAContext>(_ctx, getState());
enterRule(_localctx, 314, Z80Parser::RuleSubtractWithBorrowIXOffsetFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1538);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 53, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1530);
subtractWithBorrowCommandName();
setState(1531);
dynamic_cast<SubtractWithBorrowIXOffsetFromAContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1533);
subtractWithBorrowCommandName();
setState(1534);
aRegister();
setState(1535);
match(Z80Parser::T__73);
setState(1536);
dynamic_cast<SubtractWithBorrowIXOffsetFromAContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractWithBorrowIYOffsetFromAContext ------------------------------------------------------------------
Z80Parser::SubtractWithBorrowIYOffsetFromAContext::SubtractWithBorrowIYOffsetFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractWithBorrowCommandNameContext* Z80Parser::SubtractWithBorrowIYOffsetFromAContext::subtractWithBorrowCommandName() {
return getRuleContext<Z80Parser::SubtractWithBorrowCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::SubtractWithBorrowIYOffsetFromAContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractWithBorrowIYOffsetFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractWithBorrowIYOffsetFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractWithBorrowIYOffsetFromA;
}
void Z80Parser::SubtractWithBorrowIYOffsetFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractWithBorrowIYOffsetFromA(this);
}
void Z80Parser::SubtractWithBorrowIYOffsetFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractWithBorrowIYOffsetFromA(this);
}
Z80Parser::SubtractWithBorrowIYOffsetFromAContext* Z80Parser::subtractWithBorrowIYOffsetFromA() {
SubtractWithBorrowIYOffsetFromAContext *_localctx = _tracker.createInstance<SubtractWithBorrowIYOffsetFromAContext>(_ctx, getState());
enterRule(_localctx, 316, Z80Parser::RuleSubtractWithBorrowIYOffsetFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1548);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 54, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1540);
subtractWithBorrowCommandName();
setState(1541);
dynamic_cast<SubtractWithBorrowIYOffsetFromAContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1543);
subtractWithBorrowCommandName();
setState(1544);
aRegister();
setState(1545);
match(Z80Parser::T__73);
setState(1546);
dynamic_cast<SubtractWithBorrowIYOffsetFromAContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractWithBorrowImmediateFromAContext ------------------------------------------------------------------
Z80Parser::SubtractWithBorrowImmediateFromAContext::SubtractWithBorrowImmediateFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractWithBorrowCommandNameContext* Z80Parser::SubtractWithBorrowImmediateFromAContext::subtractWithBorrowCommandName() {
return getRuleContext<Z80Parser::SubtractWithBorrowCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::SubtractWithBorrowImmediateFromAContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractWithBorrowImmediateFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractWithBorrowImmediateFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractWithBorrowImmediateFromA;
}
void Z80Parser::SubtractWithBorrowImmediateFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractWithBorrowImmediateFromA(this);
}
void Z80Parser::SubtractWithBorrowImmediateFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractWithBorrowImmediateFromA(this);
}
Z80Parser::SubtractWithBorrowImmediateFromAContext* Z80Parser::subtractWithBorrowImmediateFromA() {
SubtractWithBorrowImmediateFromAContext *_localctx = _tracker.createInstance<SubtractWithBorrowImmediateFromAContext>(_ctx, getState());
enterRule(_localctx, 318, Z80Parser::RuleSubtractWithBorrowImmediateFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1558);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 55, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1550);
subtractWithBorrowCommandName();
setState(1551);
dynamic_cast<SubtractWithBorrowImmediateFromAContext *>(_localctx)->source = number();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1553);
subtractWithBorrowCommandName();
setState(1554);
aRegister();
setState(1555);
match(Z80Parser::T__73);
setState(1556);
dynamic_cast<SubtractWithBorrowImmediateFromAContext *>(_localctx)->source = number();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractWithBorrowIXHFromAContext ------------------------------------------------------------------
Z80Parser::SubtractWithBorrowIXHFromAContext::SubtractWithBorrowIXHFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractWithBorrowCommandNameContext* Z80Parser::SubtractWithBorrowIXHFromAContext::subtractWithBorrowCommandName() {
return getRuleContext<Z80Parser::SubtractWithBorrowCommandNameContext>(0);
}
Z80Parser::IxHighRegisterContext* Z80Parser::SubtractWithBorrowIXHFromAContext::ixHighRegister() {
return getRuleContext<Z80Parser::IxHighRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractWithBorrowIXHFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractWithBorrowIXHFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractWithBorrowIXHFromA;
}
void Z80Parser::SubtractWithBorrowIXHFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractWithBorrowIXHFromA(this);
}
void Z80Parser::SubtractWithBorrowIXHFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractWithBorrowIXHFromA(this);
}
Z80Parser::SubtractWithBorrowIXHFromAContext* Z80Parser::subtractWithBorrowIXHFromA() {
SubtractWithBorrowIXHFromAContext *_localctx = _tracker.createInstance<SubtractWithBorrowIXHFromAContext>(_ctx, getState());
enterRule(_localctx, 320, Z80Parser::RuleSubtractWithBorrowIXHFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1568);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 56, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1560);
subtractWithBorrowCommandName();
setState(1561);
dynamic_cast<SubtractWithBorrowIXHFromAContext *>(_localctx)->source = ixHighRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1563);
subtractWithBorrowCommandName();
setState(1564);
aRegister();
setState(1565);
match(Z80Parser::T__73);
setState(1566);
dynamic_cast<SubtractWithBorrowIXHFromAContext *>(_localctx)->source = ixHighRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractWithBorrowIXLFromAContext ------------------------------------------------------------------
Z80Parser::SubtractWithBorrowIXLFromAContext::SubtractWithBorrowIXLFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractWithBorrowCommandNameContext* Z80Parser::SubtractWithBorrowIXLFromAContext::subtractWithBorrowCommandName() {
return getRuleContext<Z80Parser::SubtractWithBorrowCommandNameContext>(0);
}
Z80Parser::IxLowRegisterContext* Z80Parser::SubtractWithBorrowIXLFromAContext::ixLowRegister() {
return getRuleContext<Z80Parser::IxLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractWithBorrowIXLFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractWithBorrowIXLFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractWithBorrowIXLFromA;
}
void Z80Parser::SubtractWithBorrowIXLFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractWithBorrowIXLFromA(this);
}
void Z80Parser::SubtractWithBorrowIXLFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractWithBorrowIXLFromA(this);
}
Z80Parser::SubtractWithBorrowIXLFromAContext* Z80Parser::subtractWithBorrowIXLFromA() {
SubtractWithBorrowIXLFromAContext *_localctx = _tracker.createInstance<SubtractWithBorrowIXLFromAContext>(_ctx, getState());
enterRule(_localctx, 322, Z80Parser::RuleSubtractWithBorrowIXLFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1578);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 57, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1570);
subtractWithBorrowCommandName();
setState(1571);
dynamic_cast<SubtractWithBorrowIXLFromAContext *>(_localctx)->source = ixLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1573);
subtractWithBorrowCommandName();
setState(1574);
aRegister();
setState(1575);
match(Z80Parser::T__73);
setState(1576);
dynamic_cast<SubtractWithBorrowIXLFromAContext *>(_localctx)->source = ixLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractWithBorrowIYHFromAContext ------------------------------------------------------------------
Z80Parser::SubtractWithBorrowIYHFromAContext::SubtractWithBorrowIYHFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractWithBorrowCommandNameContext* Z80Parser::SubtractWithBorrowIYHFromAContext::subtractWithBorrowCommandName() {
return getRuleContext<Z80Parser::SubtractWithBorrowCommandNameContext>(0);
}
Z80Parser::IyHighRegisterContext* Z80Parser::SubtractWithBorrowIYHFromAContext::iyHighRegister() {
return getRuleContext<Z80Parser::IyHighRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractWithBorrowIYHFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractWithBorrowIYHFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractWithBorrowIYHFromA;
}
void Z80Parser::SubtractWithBorrowIYHFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractWithBorrowIYHFromA(this);
}
void Z80Parser::SubtractWithBorrowIYHFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractWithBorrowIYHFromA(this);
}
Z80Parser::SubtractWithBorrowIYHFromAContext* Z80Parser::subtractWithBorrowIYHFromA() {
SubtractWithBorrowIYHFromAContext *_localctx = _tracker.createInstance<SubtractWithBorrowIYHFromAContext>(_ctx, getState());
enterRule(_localctx, 324, Z80Parser::RuleSubtractWithBorrowIYHFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1588);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 58, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1580);
subtractWithBorrowCommandName();
setState(1581);
dynamic_cast<SubtractWithBorrowIYHFromAContext *>(_localctx)->source = iyHighRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1583);
subtractWithBorrowCommandName();
setState(1584);
aRegister();
setState(1585);
match(Z80Parser::T__73);
setState(1586);
dynamic_cast<SubtractWithBorrowIYHFromAContext *>(_localctx)->source = iyHighRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractWithBorrowIYLFromAContext ------------------------------------------------------------------
Z80Parser::SubtractWithBorrowIYLFromAContext::SubtractWithBorrowIYLFromAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractWithBorrowCommandNameContext* Z80Parser::SubtractWithBorrowIYLFromAContext::subtractWithBorrowCommandName() {
return getRuleContext<Z80Parser::SubtractWithBorrowCommandNameContext>(0);
}
Z80Parser::IyLowRegisterContext* Z80Parser::SubtractWithBorrowIYLFromAContext::iyLowRegister() {
return getRuleContext<Z80Parser::IyLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::SubtractWithBorrowIYLFromAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::SubtractWithBorrowIYLFromAContext::getRuleIndex() const {
return Z80Parser::RuleSubtractWithBorrowIYLFromA;
}
void Z80Parser::SubtractWithBorrowIYLFromAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractWithBorrowIYLFromA(this);
}
void Z80Parser::SubtractWithBorrowIYLFromAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractWithBorrowIYLFromA(this);
}
Z80Parser::SubtractWithBorrowIYLFromAContext* Z80Parser::subtractWithBorrowIYLFromA() {
SubtractWithBorrowIYLFromAContext *_localctx = _tracker.createInstance<SubtractWithBorrowIYLFromAContext>(_ctx, getState());
enterRule(_localctx, 326, Z80Parser::RuleSubtractWithBorrowIYLFromA);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1598);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 59, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1590);
subtractWithBorrowCommandName();
setState(1591);
dynamic_cast<SubtractWithBorrowIYLFromAContext *>(_localctx)->source = iyLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1593);
subtractWithBorrowCommandName();
setState(1594);
aRegister();
setState(1595);
match(Z80Parser::T__73);
setState(1596);
dynamic_cast<SubtractWithBorrowIYLFromAContext *>(_localctx)->source = iyLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AndAWithRegisterContext ------------------------------------------------------------------
Z80Parser::AndAWithRegisterContext::AndAWithRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AndCommandNameContext* Z80Parser::AndAWithRegisterContext::andCommandName() {
return getRuleContext<Z80Parser::AndCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::AndAWithRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AndAWithRegisterContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AndAWithRegisterContext::getRuleIndex() const {
return Z80Parser::RuleAndAWithRegister;
}
void Z80Parser::AndAWithRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAndAWithRegister(this);
}
void Z80Parser::AndAWithRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAndAWithRegister(this);
}
Z80Parser::AndAWithRegisterContext* Z80Parser::andAWithRegister() {
AndAWithRegisterContext *_localctx = _tracker.createInstance<AndAWithRegisterContext>(_ctx, getState());
enterRule(_localctx, 328, Z80Parser::RuleAndAWithRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1608);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 60, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1600);
andCommandName();
setState(1601);
dynamic_cast<AndAWithRegisterContext *>(_localctx)->source = simpleByteRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1603);
andCommandName();
setState(1604);
aRegister();
setState(1605);
match(Z80Parser::T__73);
setState(1606);
dynamic_cast<AndAWithRegisterContext *>(_localctx)->source = simpleByteRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AndAWithImmediateContext ------------------------------------------------------------------
Z80Parser::AndAWithImmediateContext::AndAWithImmediateContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AndCommandNameContext* Z80Parser::AndAWithImmediateContext::andCommandName() {
return getRuleContext<Z80Parser::AndCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::AndAWithImmediateContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AndAWithImmediateContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AndAWithImmediateContext::getRuleIndex() const {
return Z80Parser::RuleAndAWithImmediate;
}
void Z80Parser::AndAWithImmediateContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAndAWithImmediate(this);
}
void Z80Parser::AndAWithImmediateContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAndAWithImmediate(this);
}
Z80Parser::AndAWithImmediateContext* Z80Parser::andAWithImmediate() {
AndAWithImmediateContext *_localctx = _tracker.createInstance<AndAWithImmediateContext>(_ctx, getState());
enterRule(_localctx, 330, Z80Parser::RuleAndAWithImmediate);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1618);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 61, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1610);
andCommandName();
setState(1611);
dynamic_cast<AndAWithImmediateContext *>(_localctx)->source = number();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1613);
andCommandName();
setState(1614);
aRegister();
setState(1615);
match(Z80Parser::T__73);
setState(1616);
dynamic_cast<AndAWithImmediateContext *>(_localctx)->source = number();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AndAWithHLPointerContext ------------------------------------------------------------------
Z80Parser::AndAWithHLPointerContext::AndAWithHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AndCommandNameContext* Z80Parser::AndAWithHLPointerContext::andCommandName() {
return getRuleContext<Z80Parser::AndCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::AndAWithHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AndAWithHLPointerContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AndAWithHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleAndAWithHLPointer;
}
void Z80Parser::AndAWithHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAndAWithHLPointer(this);
}
void Z80Parser::AndAWithHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAndAWithHLPointer(this);
}
Z80Parser::AndAWithHLPointerContext* Z80Parser::andAWithHLPointer() {
AndAWithHLPointerContext *_localctx = _tracker.createInstance<AndAWithHLPointerContext>(_ctx, getState());
enterRule(_localctx, 332, Z80Parser::RuleAndAWithHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1628);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 62, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1620);
andCommandName();
setState(1621);
dynamic_cast<AndAWithHLPointerContext *>(_localctx)->source = hlPointer();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1623);
andCommandName();
setState(1624);
aRegister();
setState(1625);
match(Z80Parser::T__73);
setState(1626);
dynamic_cast<AndAWithHLPointerContext *>(_localctx)->source = hlPointer();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AndAWithIXOffsetContext ------------------------------------------------------------------
Z80Parser::AndAWithIXOffsetContext::AndAWithIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AndCommandNameContext* Z80Parser::AndAWithIXOffsetContext::andCommandName() {
return getRuleContext<Z80Parser::AndCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::AndAWithIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AndAWithIXOffsetContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AndAWithIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleAndAWithIXOffset;
}
void Z80Parser::AndAWithIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAndAWithIXOffset(this);
}
void Z80Parser::AndAWithIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAndAWithIXOffset(this);
}
Z80Parser::AndAWithIXOffsetContext* Z80Parser::andAWithIXOffset() {
AndAWithIXOffsetContext *_localctx = _tracker.createInstance<AndAWithIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 334, Z80Parser::RuleAndAWithIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1638);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 63, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1630);
andCommandName();
setState(1631);
dynamic_cast<AndAWithIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1633);
andCommandName();
setState(1634);
aRegister();
setState(1635);
match(Z80Parser::T__73);
setState(1636);
dynamic_cast<AndAWithIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AndAWithIYOffsetContext ------------------------------------------------------------------
Z80Parser::AndAWithIYOffsetContext::AndAWithIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AndCommandNameContext* Z80Parser::AndAWithIYOffsetContext::andCommandName() {
return getRuleContext<Z80Parser::AndCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::AndAWithIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AndAWithIYOffsetContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AndAWithIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleAndAWithIYOffset;
}
void Z80Parser::AndAWithIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAndAWithIYOffset(this);
}
void Z80Parser::AndAWithIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAndAWithIYOffset(this);
}
Z80Parser::AndAWithIYOffsetContext* Z80Parser::andAWithIYOffset() {
AndAWithIYOffsetContext *_localctx = _tracker.createInstance<AndAWithIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 336, Z80Parser::RuleAndAWithIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1648);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 64, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1640);
andCommandName();
setState(1641);
dynamic_cast<AndAWithIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1643);
andCommandName();
setState(1644);
aRegister();
setState(1645);
match(Z80Parser::T__73);
setState(1646);
dynamic_cast<AndAWithIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AndAWithIXHContext ------------------------------------------------------------------
Z80Parser::AndAWithIXHContext::AndAWithIXHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AndCommandNameContext* Z80Parser::AndAWithIXHContext::andCommandName() {
return getRuleContext<Z80Parser::AndCommandNameContext>(0);
}
Z80Parser::IxHighRegisterContext* Z80Parser::AndAWithIXHContext::ixHighRegister() {
return getRuleContext<Z80Parser::IxHighRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AndAWithIXHContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AndAWithIXHContext::getRuleIndex() const {
return Z80Parser::RuleAndAWithIXH;
}
void Z80Parser::AndAWithIXHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAndAWithIXH(this);
}
void Z80Parser::AndAWithIXHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAndAWithIXH(this);
}
Z80Parser::AndAWithIXHContext* Z80Parser::andAWithIXH() {
AndAWithIXHContext *_localctx = _tracker.createInstance<AndAWithIXHContext>(_ctx, getState());
enterRule(_localctx, 338, Z80Parser::RuleAndAWithIXH);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1658);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 65, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1650);
andCommandName();
setState(1651);
dynamic_cast<AndAWithIXHContext *>(_localctx)->source = ixHighRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1653);
andCommandName();
setState(1654);
aRegister();
setState(1655);
match(Z80Parser::T__73);
setState(1656);
dynamic_cast<AndAWithIXHContext *>(_localctx)->source = ixHighRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AndAWithIXLContext ------------------------------------------------------------------
Z80Parser::AndAWithIXLContext::AndAWithIXLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AndCommandNameContext* Z80Parser::AndAWithIXLContext::andCommandName() {
return getRuleContext<Z80Parser::AndCommandNameContext>(0);
}
Z80Parser::IxLowRegisterContext* Z80Parser::AndAWithIXLContext::ixLowRegister() {
return getRuleContext<Z80Parser::IxLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AndAWithIXLContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AndAWithIXLContext::getRuleIndex() const {
return Z80Parser::RuleAndAWithIXL;
}
void Z80Parser::AndAWithIXLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAndAWithIXL(this);
}
void Z80Parser::AndAWithIXLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAndAWithIXL(this);
}
Z80Parser::AndAWithIXLContext* Z80Parser::andAWithIXL() {
AndAWithIXLContext *_localctx = _tracker.createInstance<AndAWithIXLContext>(_ctx, getState());
enterRule(_localctx, 340, Z80Parser::RuleAndAWithIXL);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1668);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 66, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1660);
andCommandName();
setState(1661);
dynamic_cast<AndAWithIXLContext *>(_localctx)->source = ixLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1663);
andCommandName();
setState(1664);
aRegister();
setState(1665);
match(Z80Parser::T__73);
setState(1666);
dynamic_cast<AndAWithIXLContext *>(_localctx)->source = ixLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AndAWithIYHContext ------------------------------------------------------------------
Z80Parser::AndAWithIYHContext::AndAWithIYHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AndCommandNameContext* Z80Parser::AndAWithIYHContext::andCommandName() {
return getRuleContext<Z80Parser::AndCommandNameContext>(0);
}
Z80Parser::IyHighRegisterContext* Z80Parser::AndAWithIYHContext::iyHighRegister() {
return getRuleContext<Z80Parser::IyHighRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AndAWithIYHContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AndAWithIYHContext::getRuleIndex() const {
return Z80Parser::RuleAndAWithIYH;
}
void Z80Parser::AndAWithIYHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAndAWithIYH(this);
}
void Z80Parser::AndAWithIYHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAndAWithIYH(this);
}
Z80Parser::AndAWithIYHContext* Z80Parser::andAWithIYH() {
AndAWithIYHContext *_localctx = _tracker.createInstance<AndAWithIYHContext>(_ctx, getState());
enterRule(_localctx, 342, Z80Parser::RuleAndAWithIYH);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1678);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 67, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1670);
andCommandName();
setState(1671);
dynamic_cast<AndAWithIYHContext *>(_localctx)->source = iyHighRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1673);
andCommandName();
setState(1674);
aRegister();
setState(1675);
match(Z80Parser::T__73);
setState(1676);
dynamic_cast<AndAWithIYHContext *>(_localctx)->source = iyHighRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AndAWithIYLContext ------------------------------------------------------------------
Z80Parser::AndAWithIYLContext::AndAWithIYLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AndCommandNameContext* Z80Parser::AndAWithIYLContext::andCommandName() {
return getRuleContext<Z80Parser::AndCommandNameContext>(0);
}
Z80Parser::IyLowRegisterContext* Z80Parser::AndAWithIYLContext::iyLowRegister() {
return getRuleContext<Z80Parser::IyLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::AndAWithIYLContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::AndAWithIYLContext::getRuleIndex() const {
return Z80Parser::RuleAndAWithIYL;
}
void Z80Parser::AndAWithIYLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAndAWithIYL(this);
}
void Z80Parser::AndAWithIYLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAndAWithIYL(this);
}
Z80Parser::AndAWithIYLContext* Z80Parser::andAWithIYL() {
AndAWithIYLContext *_localctx = _tracker.createInstance<AndAWithIYLContext>(_ctx, getState());
enterRule(_localctx, 344, Z80Parser::RuleAndAWithIYL);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1688);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 68, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1680);
andCommandName();
setState(1681);
dynamic_cast<AndAWithIYLContext *>(_localctx)->source = iyLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1683);
andCommandName();
setState(1684);
aRegister();
setState(1685);
match(Z80Parser::T__73);
setState(1686);
dynamic_cast<AndAWithIYLContext *>(_localctx)->source = iyLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OrAWithRegisterContext ------------------------------------------------------------------
Z80Parser::OrAWithRegisterContext::OrAWithRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::OrCommandNameContext* Z80Parser::OrAWithRegisterContext::orCommandName() {
return getRuleContext<Z80Parser::OrCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::OrAWithRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::OrAWithRegisterContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::OrAWithRegisterContext::getRuleIndex() const {
return Z80Parser::RuleOrAWithRegister;
}
void Z80Parser::OrAWithRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOrAWithRegister(this);
}
void Z80Parser::OrAWithRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOrAWithRegister(this);
}
Z80Parser::OrAWithRegisterContext* Z80Parser::orAWithRegister() {
OrAWithRegisterContext *_localctx = _tracker.createInstance<OrAWithRegisterContext>(_ctx, getState());
enterRule(_localctx, 346, Z80Parser::RuleOrAWithRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1698);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 69, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1690);
orCommandName();
setState(1691);
dynamic_cast<OrAWithRegisterContext *>(_localctx)->source = simpleByteRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1693);
orCommandName();
setState(1694);
aRegister();
setState(1695);
match(Z80Parser::T__73);
setState(1696);
dynamic_cast<OrAWithRegisterContext *>(_localctx)->source = simpleByteRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OrAWithImmediateContext ------------------------------------------------------------------
Z80Parser::OrAWithImmediateContext::OrAWithImmediateContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::OrCommandNameContext* Z80Parser::OrAWithImmediateContext::orCommandName() {
return getRuleContext<Z80Parser::OrCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::OrAWithImmediateContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::OrAWithImmediateContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::OrAWithImmediateContext::getRuleIndex() const {
return Z80Parser::RuleOrAWithImmediate;
}
void Z80Parser::OrAWithImmediateContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOrAWithImmediate(this);
}
void Z80Parser::OrAWithImmediateContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOrAWithImmediate(this);
}
Z80Parser::OrAWithImmediateContext* Z80Parser::orAWithImmediate() {
OrAWithImmediateContext *_localctx = _tracker.createInstance<OrAWithImmediateContext>(_ctx, getState());
enterRule(_localctx, 348, Z80Parser::RuleOrAWithImmediate);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1708);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 70, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1700);
orCommandName();
setState(1701);
dynamic_cast<OrAWithImmediateContext *>(_localctx)->source = number();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1703);
orCommandName();
setState(1704);
aRegister();
setState(1705);
match(Z80Parser::T__73);
setState(1706);
dynamic_cast<OrAWithImmediateContext *>(_localctx)->source = number();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OrAWithHLPointerContext ------------------------------------------------------------------
Z80Parser::OrAWithHLPointerContext::OrAWithHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::OrCommandNameContext* Z80Parser::OrAWithHLPointerContext::orCommandName() {
return getRuleContext<Z80Parser::OrCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::OrAWithHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::OrAWithHLPointerContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::OrAWithHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleOrAWithHLPointer;
}
void Z80Parser::OrAWithHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOrAWithHLPointer(this);
}
void Z80Parser::OrAWithHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOrAWithHLPointer(this);
}
Z80Parser::OrAWithHLPointerContext* Z80Parser::orAWithHLPointer() {
OrAWithHLPointerContext *_localctx = _tracker.createInstance<OrAWithHLPointerContext>(_ctx, getState());
enterRule(_localctx, 350, Z80Parser::RuleOrAWithHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1718);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 71, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1710);
orCommandName();
setState(1711);
dynamic_cast<OrAWithHLPointerContext *>(_localctx)->source = hlPointer();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1713);
orCommandName();
setState(1714);
aRegister();
setState(1715);
match(Z80Parser::T__73);
setState(1716);
dynamic_cast<OrAWithHLPointerContext *>(_localctx)->source = hlPointer();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OrAWithIXOffsetContext ------------------------------------------------------------------
Z80Parser::OrAWithIXOffsetContext::OrAWithIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::OrCommandNameContext* Z80Parser::OrAWithIXOffsetContext::orCommandName() {
return getRuleContext<Z80Parser::OrCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::OrAWithIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::OrAWithIXOffsetContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::OrAWithIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleOrAWithIXOffset;
}
void Z80Parser::OrAWithIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOrAWithIXOffset(this);
}
void Z80Parser::OrAWithIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOrAWithIXOffset(this);
}
Z80Parser::OrAWithIXOffsetContext* Z80Parser::orAWithIXOffset() {
OrAWithIXOffsetContext *_localctx = _tracker.createInstance<OrAWithIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 352, Z80Parser::RuleOrAWithIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1728);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 72, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1720);
orCommandName();
setState(1721);
dynamic_cast<OrAWithIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1723);
orCommandName();
setState(1724);
aRegister();
setState(1725);
match(Z80Parser::T__73);
setState(1726);
dynamic_cast<OrAWithIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OrAWithIYOffsetContext ------------------------------------------------------------------
Z80Parser::OrAWithIYOffsetContext::OrAWithIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::OrCommandNameContext* Z80Parser::OrAWithIYOffsetContext::orCommandName() {
return getRuleContext<Z80Parser::OrCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::OrAWithIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::OrAWithIYOffsetContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::OrAWithIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleOrAWithIYOffset;
}
void Z80Parser::OrAWithIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOrAWithIYOffset(this);
}
void Z80Parser::OrAWithIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOrAWithIYOffset(this);
}
Z80Parser::OrAWithIYOffsetContext* Z80Parser::orAWithIYOffset() {
OrAWithIYOffsetContext *_localctx = _tracker.createInstance<OrAWithIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 354, Z80Parser::RuleOrAWithIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1738);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 73, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1730);
orCommandName();
setState(1731);
dynamic_cast<OrAWithIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1733);
orCommandName();
setState(1734);
aRegister();
setState(1735);
match(Z80Parser::T__73);
setState(1736);
dynamic_cast<OrAWithIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OrAWithIXHContext ------------------------------------------------------------------
Z80Parser::OrAWithIXHContext::OrAWithIXHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::OrCommandNameContext* Z80Parser::OrAWithIXHContext::orCommandName() {
return getRuleContext<Z80Parser::OrCommandNameContext>(0);
}
Z80Parser::IxHighRegisterContext* Z80Parser::OrAWithIXHContext::ixHighRegister() {
return getRuleContext<Z80Parser::IxHighRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::OrAWithIXHContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::OrAWithIXHContext::getRuleIndex() const {
return Z80Parser::RuleOrAWithIXH;
}
void Z80Parser::OrAWithIXHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOrAWithIXH(this);
}
void Z80Parser::OrAWithIXHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOrAWithIXH(this);
}
Z80Parser::OrAWithIXHContext* Z80Parser::orAWithIXH() {
OrAWithIXHContext *_localctx = _tracker.createInstance<OrAWithIXHContext>(_ctx, getState());
enterRule(_localctx, 356, Z80Parser::RuleOrAWithIXH);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1748);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 74, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1740);
orCommandName();
setState(1741);
dynamic_cast<OrAWithIXHContext *>(_localctx)->source = ixHighRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1743);
orCommandName();
setState(1744);
aRegister();
setState(1745);
match(Z80Parser::T__73);
setState(1746);
dynamic_cast<OrAWithIXHContext *>(_localctx)->source = ixHighRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OrAWithIXLContext ------------------------------------------------------------------
Z80Parser::OrAWithIXLContext::OrAWithIXLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::OrCommandNameContext* Z80Parser::OrAWithIXLContext::orCommandName() {
return getRuleContext<Z80Parser::OrCommandNameContext>(0);
}
Z80Parser::IxLowRegisterContext* Z80Parser::OrAWithIXLContext::ixLowRegister() {
return getRuleContext<Z80Parser::IxLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::OrAWithIXLContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::OrAWithIXLContext::getRuleIndex() const {
return Z80Parser::RuleOrAWithIXL;
}
void Z80Parser::OrAWithIXLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOrAWithIXL(this);
}
void Z80Parser::OrAWithIXLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOrAWithIXL(this);
}
Z80Parser::OrAWithIXLContext* Z80Parser::orAWithIXL() {
OrAWithIXLContext *_localctx = _tracker.createInstance<OrAWithIXLContext>(_ctx, getState());
enterRule(_localctx, 358, Z80Parser::RuleOrAWithIXL);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1758);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 75, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1750);
orCommandName();
setState(1751);
dynamic_cast<OrAWithIXLContext *>(_localctx)->source = ixLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1753);
orCommandName();
setState(1754);
aRegister();
setState(1755);
match(Z80Parser::T__73);
setState(1756);
dynamic_cast<OrAWithIXLContext *>(_localctx)->source = ixLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OrAWithIYHContext ------------------------------------------------------------------
Z80Parser::OrAWithIYHContext::OrAWithIYHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::OrCommandNameContext* Z80Parser::OrAWithIYHContext::orCommandName() {
return getRuleContext<Z80Parser::OrCommandNameContext>(0);
}
Z80Parser::IyHighRegisterContext* Z80Parser::OrAWithIYHContext::iyHighRegister() {
return getRuleContext<Z80Parser::IyHighRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::OrAWithIYHContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::OrAWithIYHContext::getRuleIndex() const {
return Z80Parser::RuleOrAWithIYH;
}
void Z80Parser::OrAWithIYHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOrAWithIYH(this);
}
void Z80Parser::OrAWithIYHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOrAWithIYH(this);
}
Z80Parser::OrAWithIYHContext* Z80Parser::orAWithIYH() {
OrAWithIYHContext *_localctx = _tracker.createInstance<OrAWithIYHContext>(_ctx, getState());
enterRule(_localctx, 360, Z80Parser::RuleOrAWithIYH);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1768);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 76, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1760);
orCommandName();
setState(1761);
dynamic_cast<OrAWithIYHContext *>(_localctx)->source = iyHighRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1763);
orCommandName();
setState(1764);
aRegister();
setState(1765);
match(Z80Parser::T__73);
setState(1766);
dynamic_cast<OrAWithIYHContext *>(_localctx)->source = iyHighRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OrAWithIYLContext ------------------------------------------------------------------
Z80Parser::OrAWithIYLContext::OrAWithIYLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::OrCommandNameContext* Z80Parser::OrAWithIYLContext::orCommandName() {
return getRuleContext<Z80Parser::OrCommandNameContext>(0);
}
Z80Parser::IyLowRegisterContext* Z80Parser::OrAWithIYLContext::iyLowRegister() {
return getRuleContext<Z80Parser::IyLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::OrAWithIYLContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::OrAWithIYLContext::getRuleIndex() const {
return Z80Parser::RuleOrAWithIYL;
}
void Z80Parser::OrAWithIYLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOrAWithIYL(this);
}
void Z80Parser::OrAWithIYLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOrAWithIYL(this);
}
Z80Parser::OrAWithIYLContext* Z80Parser::orAWithIYL() {
OrAWithIYLContext *_localctx = _tracker.createInstance<OrAWithIYLContext>(_ctx, getState());
enterRule(_localctx, 362, Z80Parser::RuleOrAWithIYL);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1778);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 77, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1770);
orCommandName();
setState(1771);
dynamic_cast<OrAWithIYLContext *>(_localctx)->source = iyLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1773);
orCommandName();
setState(1774);
aRegister();
setState(1775);
match(Z80Parser::T__73);
setState(1776);
dynamic_cast<OrAWithIYLContext *>(_localctx)->source = iyLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- XorAWithRegisterContext ------------------------------------------------------------------
Z80Parser::XorAWithRegisterContext::XorAWithRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::XorCommandNameContext* Z80Parser::XorAWithRegisterContext::xorCommandName() {
return getRuleContext<Z80Parser::XorCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::XorAWithRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::XorAWithRegisterContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::XorAWithRegisterContext::getRuleIndex() const {
return Z80Parser::RuleXorAWithRegister;
}
void Z80Parser::XorAWithRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterXorAWithRegister(this);
}
void Z80Parser::XorAWithRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitXorAWithRegister(this);
}
Z80Parser::XorAWithRegisterContext* Z80Parser::xorAWithRegister() {
XorAWithRegisterContext *_localctx = _tracker.createInstance<XorAWithRegisterContext>(_ctx, getState());
enterRule(_localctx, 364, Z80Parser::RuleXorAWithRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1788);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 78, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1780);
xorCommandName();
setState(1781);
dynamic_cast<XorAWithRegisterContext *>(_localctx)->source = simpleByteRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1783);
xorCommandName();
setState(1784);
aRegister();
setState(1785);
match(Z80Parser::T__73);
setState(1786);
dynamic_cast<XorAWithRegisterContext *>(_localctx)->source = simpleByteRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- XorAWithImmediateContext ------------------------------------------------------------------
Z80Parser::XorAWithImmediateContext::XorAWithImmediateContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::XorCommandNameContext* Z80Parser::XorAWithImmediateContext::xorCommandName() {
return getRuleContext<Z80Parser::XorCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::XorAWithImmediateContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::XorAWithImmediateContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::XorAWithImmediateContext::getRuleIndex() const {
return Z80Parser::RuleXorAWithImmediate;
}
void Z80Parser::XorAWithImmediateContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterXorAWithImmediate(this);
}
void Z80Parser::XorAWithImmediateContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitXorAWithImmediate(this);
}
Z80Parser::XorAWithImmediateContext* Z80Parser::xorAWithImmediate() {
XorAWithImmediateContext *_localctx = _tracker.createInstance<XorAWithImmediateContext>(_ctx, getState());
enterRule(_localctx, 366, Z80Parser::RuleXorAWithImmediate);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1798);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 79, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1790);
xorCommandName();
setState(1791);
dynamic_cast<XorAWithImmediateContext *>(_localctx)->source = number();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1793);
xorCommandName();
setState(1794);
aRegister();
setState(1795);
match(Z80Parser::T__73);
setState(1796);
dynamic_cast<XorAWithImmediateContext *>(_localctx)->source = number();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- XorAWithHLPointerContext ------------------------------------------------------------------
Z80Parser::XorAWithHLPointerContext::XorAWithHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::XorCommandNameContext* Z80Parser::XorAWithHLPointerContext::xorCommandName() {
return getRuleContext<Z80Parser::XorCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::XorAWithHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::XorAWithHLPointerContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::XorAWithHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleXorAWithHLPointer;
}
void Z80Parser::XorAWithHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterXorAWithHLPointer(this);
}
void Z80Parser::XorAWithHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitXorAWithHLPointer(this);
}
Z80Parser::XorAWithHLPointerContext* Z80Parser::xorAWithHLPointer() {
XorAWithHLPointerContext *_localctx = _tracker.createInstance<XorAWithHLPointerContext>(_ctx, getState());
enterRule(_localctx, 368, Z80Parser::RuleXorAWithHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1808);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 80, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1800);
xorCommandName();
setState(1801);
dynamic_cast<XorAWithHLPointerContext *>(_localctx)->source = hlPointer();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1803);
xorCommandName();
setState(1804);
aRegister();
setState(1805);
match(Z80Parser::T__73);
setState(1806);
dynamic_cast<XorAWithHLPointerContext *>(_localctx)->source = hlPointer();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- XorAWithIXOffsetContext ------------------------------------------------------------------
Z80Parser::XorAWithIXOffsetContext::XorAWithIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::XorCommandNameContext* Z80Parser::XorAWithIXOffsetContext::xorCommandName() {
return getRuleContext<Z80Parser::XorCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::XorAWithIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::XorAWithIXOffsetContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::XorAWithIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleXorAWithIXOffset;
}
void Z80Parser::XorAWithIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterXorAWithIXOffset(this);
}
void Z80Parser::XorAWithIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitXorAWithIXOffset(this);
}
Z80Parser::XorAWithIXOffsetContext* Z80Parser::xorAWithIXOffset() {
XorAWithIXOffsetContext *_localctx = _tracker.createInstance<XorAWithIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 370, Z80Parser::RuleXorAWithIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1818);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 81, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1810);
xorCommandName();
setState(1811);
dynamic_cast<XorAWithIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1813);
xorCommandName();
setState(1814);
aRegister();
setState(1815);
match(Z80Parser::T__73);
setState(1816);
dynamic_cast<XorAWithIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- XorAWithIYOffsetContext ------------------------------------------------------------------
Z80Parser::XorAWithIYOffsetContext::XorAWithIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::XorCommandNameContext* Z80Parser::XorAWithIYOffsetContext::xorCommandName() {
return getRuleContext<Z80Parser::XorCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::XorAWithIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::XorAWithIYOffsetContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::XorAWithIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleXorAWithIYOffset;
}
void Z80Parser::XorAWithIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterXorAWithIYOffset(this);
}
void Z80Parser::XorAWithIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitXorAWithIYOffset(this);
}
Z80Parser::XorAWithIYOffsetContext* Z80Parser::xorAWithIYOffset() {
XorAWithIYOffsetContext *_localctx = _tracker.createInstance<XorAWithIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 372, Z80Parser::RuleXorAWithIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1828);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 82, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1820);
xorCommandName();
setState(1821);
dynamic_cast<XorAWithIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1823);
xorCommandName();
setState(1824);
aRegister();
setState(1825);
match(Z80Parser::T__73);
setState(1826);
dynamic_cast<XorAWithIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- XorAWithIXHContext ------------------------------------------------------------------
Z80Parser::XorAWithIXHContext::XorAWithIXHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::XorCommandNameContext* Z80Parser::XorAWithIXHContext::xorCommandName() {
return getRuleContext<Z80Parser::XorCommandNameContext>(0);
}
Z80Parser::IxHighRegisterContext* Z80Parser::XorAWithIXHContext::ixHighRegister() {
return getRuleContext<Z80Parser::IxHighRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::XorAWithIXHContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::XorAWithIXHContext::getRuleIndex() const {
return Z80Parser::RuleXorAWithIXH;
}
void Z80Parser::XorAWithIXHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterXorAWithIXH(this);
}
void Z80Parser::XorAWithIXHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitXorAWithIXH(this);
}
Z80Parser::XorAWithIXHContext* Z80Parser::xorAWithIXH() {
XorAWithIXHContext *_localctx = _tracker.createInstance<XorAWithIXHContext>(_ctx, getState());
enterRule(_localctx, 374, Z80Parser::RuleXorAWithIXH);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1838);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 83, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1830);
xorCommandName();
setState(1831);
dynamic_cast<XorAWithIXHContext *>(_localctx)->source = ixHighRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1833);
xorCommandName();
setState(1834);
aRegister();
setState(1835);
match(Z80Parser::T__73);
setState(1836);
dynamic_cast<XorAWithIXHContext *>(_localctx)->source = ixHighRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- XorAWithIXLContext ------------------------------------------------------------------
Z80Parser::XorAWithIXLContext::XorAWithIXLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::XorCommandNameContext* Z80Parser::XorAWithIXLContext::xorCommandName() {
return getRuleContext<Z80Parser::XorCommandNameContext>(0);
}
Z80Parser::IxLowRegisterContext* Z80Parser::XorAWithIXLContext::ixLowRegister() {
return getRuleContext<Z80Parser::IxLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::XorAWithIXLContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::XorAWithIXLContext::getRuleIndex() const {
return Z80Parser::RuleXorAWithIXL;
}
void Z80Parser::XorAWithIXLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterXorAWithIXL(this);
}
void Z80Parser::XorAWithIXLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitXorAWithIXL(this);
}
Z80Parser::XorAWithIXLContext* Z80Parser::xorAWithIXL() {
XorAWithIXLContext *_localctx = _tracker.createInstance<XorAWithIXLContext>(_ctx, getState());
enterRule(_localctx, 376, Z80Parser::RuleXorAWithIXL);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1848);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 84, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1840);
xorCommandName();
setState(1841);
dynamic_cast<XorAWithIXLContext *>(_localctx)->source = ixLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1843);
xorCommandName();
setState(1844);
aRegister();
setState(1845);
match(Z80Parser::T__73);
setState(1846);
dynamic_cast<XorAWithIXLContext *>(_localctx)->source = ixLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- XorAWithIYHContext ------------------------------------------------------------------
Z80Parser::XorAWithIYHContext::XorAWithIYHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::XorCommandNameContext* Z80Parser::XorAWithIYHContext::xorCommandName() {
return getRuleContext<Z80Parser::XorCommandNameContext>(0);
}
Z80Parser::IyHighRegisterContext* Z80Parser::XorAWithIYHContext::iyHighRegister() {
return getRuleContext<Z80Parser::IyHighRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::XorAWithIYHContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::XorAWithIYHContext::getRuleIndex() const {
return Z80Parser::RuleXorAWithIYH;
}
void Z80Parser::XorAWithIYHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterXorAWithIYH(this);
}
void Z80Parser::XorAWithIYHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitXorAWithIYH(this);
}
Z80Parser::XorAWithIYHContext* Z80Parser::xorAWithIYH() {
XorAWithIYHContext *_localctx = _tracker.createInstance<XorAWithIYHContext>(_ctx, getState());
enterRule(_localctx, 378, Z80Parser::RuleXorAWithIYH);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1858);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 85, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1850);
xorCommandName();
setState(1851);
dynamic_cast<XorAWithIYHContext *>(_localctx)->source = iyHighRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1853);
xorCommandName();
setState(1854);
aRegister();
setState(1855);
match(Z80Parser::T__73);
setState(1856);
dynamic_cast<XorAWithIYHContext *>(_localctx)->source = iyHighRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- XorAWithIYLContext ------------------------------------------------------------------
Z80Parser::XorAWithIYLContext::XorAWithIYLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::XorCommandNameContext* Z80Parser::XorAWithIYLContext::xorCommandName() {
return getRuleContext<Z80Parser::XorCommandNameContext>(0);
}
Z80Parser::IyLowRegisterContext* Z80Parser::XorAWithIYLContext::iyLowRegister() {
return getRuleContext<Z80Parser::IyLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::XorAWithIYLContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::XorAWithIYLContext::getRuleIndex() const {
return Z80Parser::RuleXorAWithIYL;
}
void Z80Parser::XorAWithIYLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterXorAWithIYL(this);
}
void Z80Parser::XorAWithIYLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitXorAWithIYL(this);
}
Z80Parser::XorAWithIYLContext* Z80Parser::xorAWithIYL() {
XorAWithIYLContext *_localctx = _tracker.createInstance<XorAWithIYLContext>(_ctx, getState());
enterRule(_localctx, 380, Z80Parser::RuleXorAWithIYL);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1868);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 86, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1860);
xorCommandName();
setState(1861);
dynamic_cast<XorAWithIYLContext *>(_localctx)->source = iyLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1863);
xorCommandName();
setState(1864);
aRegister();
setState(1865);
match(Z80Parser::T__73);
setState(1866);
dynamic_cast<XorAWithIYLContext *>(_localctx)->source = iyLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CompareAWithRegisterContext ------------------------------------------------------------------
Z80Parser::CompareAWithRegisterContext::CompareAWithRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::CompareCommandNameContext* Z80Parser::CompareAWithRegisterContext::compareCommandName() {
return getRuleContext<Z80Parser::CompareCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::CompareAWithRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::CompareAWithRegisterContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::CompareAWithRegisterContext::getRuleIndex() const {
return Z80Parser::RuleCompareAWithRegister;
}
void Z80Parser::CompareAWithRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCompareAWithRegister(this);
}
void Z80Parser::CompareAWithRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCompareAWithRegister(this);
}
Z80Parser::CompareAWithRegisterContext* Z80Parser::compareAWithRegister() {
CompareAWithRegisterContext *_localctx = _tracker.createInstance<CompareAWithRegisterContext>(_ctx, getState());
enterRule(_localctx, 382, Z80Parser::RuleCompareAWithRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1878);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 87, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1870);
compareCommandName();
setState(1871);
dynamic_cast<CompareAWithRegisterContext *>(_localctx)->source = simpleByteRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1873);
compareCommandName();
setState(1874);
aRegister();
setState(1875);
match(Z80Parser::T__73);
setState(1876);
dynamic_cast<CompareAWithRegisterContext *>(_localctx)->source = simpleByteRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CompareAWithHLPointerContext ------------------------------------------------------------------
Z80Parser::CompareAWithHLPointerContext::CompareAWithHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::CompareCommandNameContext* Z80Parser::CompareAWithHLPointerContext::compareCommandName() {
return getRuleContext<Z80Parser::CompareCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::CompareAWithHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::CompareAWithHLPointerContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::CompareAWithHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleCompareAWithHLPointer;
}
void Z80Parser::CompareAWithHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCompareAWithHLPointer(this);
}
void Z80Parser::CompareAWithHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCompareAWithHLPointer(this);
}
Z80Parser::CompareAWithHLPointerContext* Z80Parser::compareAWithHLPointer() {
CompareAWithHLPointerContext *_localctx = _tracker.createInstance<CompareAWithHLPointerContext>(_ctx, getState());
enterRule(_localctx, 384, Z80Parser::RuleCompareAWithHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1888);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 88, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1880);
compareCommandName();
setState(1881);
dynamic_cast<CompareAWithHLPointerContext *>(_localctx)->source = hlPointer();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1883);
compareCommandName();
setState(1884);
aRegister();
setState(1885);
match(Z80Parser::T__73);
setState(1886);
dynamic_cast<CompareAWithHLPointerContext *>(_localctx)->source = hlPointer();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CompareAWithImmediateContext ------------------------------------------------------------------
Z80Parser::CompareAWithImmediateContext::CompareAWithImmediateContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::CompareCommandNameContext* Z80Parser::CompareAWithImmediateContext::compareCommandName() {
return getRuleContext<Z80Parser::CompareCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::CompareAWithImmediateContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::CompareAWithImmediateContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::CompareAWithImmediateContext::getRuleIndex() const {
return Z80Parser::RuleCompareAWithImmediate;
}
void Z80Parser::CompareAWithImmediateContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCompareAWithImmediate(this);
}
void Z80Parser::CompareAWithImmediateContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCompareAWithImmediate(this);
}
Z80Parser::CompareAWithImmediateContext* Z80Parser::compareAWithImmediate() {
CompareAWithImmediateContext *_localctx = _tracker.createInstance<CompareAWithImmediateContext>(_ctx, getState());
enterRule(_localctx, 386, Z80Parser::RuleCompareAWithImmediate);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1898);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 89, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1890);
compareCommandName();
setState(1891);
dynamic_cast<CompareAWithImmediateContext *>(_localctx)->source = number();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1893);
compareCommandName();
setState(1894);
aRegister();
setState(1895);
match(Z80Parser::T__73);
setState(1896);
dynamic_cast<CompareAWithImmediateContext *>(_localctx)->source = number();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CompareAWithIXOffsetContext ------------------------------------------------------------------
Z80Parser::CompareAWithIXOffsetContext::CompareAWithIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::CompareCommandNameContext* Z80Parser::CompareAWithIXOffsetContext::compareCommandName() {
return getRuleContext<Z80Parser::CompareCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::CompareAWithIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::CompareAWithIXOffsetContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::CompareAWithIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleCompareAWithIXOffset;
}
void Z80Parser::CompareAWithIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCompareAWithIXOffset(this);
}
void Z80Parser::CompareAWithIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCompareAWithIXOffset(this);
}
Z80Parser::CompareAWithIXOffsetContext* Z80Parser::compareAWithIXOffset() {
CompareAWithIXOffsetContext *_localctx = _tracker.createInstance<CompareAWithIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 388, Z80Parser::RuleCompareAWithIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1908);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 90, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1900);
compareCommandName();
setState(1901);
dynamic_cast<CompareAWithIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1903);
compareCommandName();
setState(1904);
aRegister();
setState(1905);
match(Z80Parser::T__73);
setState(1906);
dynamic_cast<CompareAWithIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CompareAWithIYOffsetContext ------------------------------------------------------------------
Z80Parser::CompareAWithIYOffsetContext::CompareAWithIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::CompareCommandNameContext* Z80Parser::CompareAWithIYOffsetContext::compareCommandName() {
return getRuleContext<Z80Parser::CompareCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::CompareAWithIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::CompareAWithIYOffsetContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::CompareAWithIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleCompareAWithIYOffset;
}
void Z80Parser::CompareAWithIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCompareAWithIYOffset(this);
}
void Z80Parser::CompareAWithIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCompareAWithIYOffset(this);
}
Z80Parser::CompareAWithIYOffsetContext* Z80Parser::compareAWithIYOffset() {
CompareAWithIYOffsetContext *_localctx = _tracker.createInstance<CompareAWithIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 390, Z80Parser::RuleCompareAWithIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1918);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 91, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1910);
compareCommandName();
setState(1911);
dynamic_cast<CompareAWithIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1913);
compareCommandName();
setState(1914);
aRegister();
setState(1915);
match(Z80Parser::T__73);
setState(1916);
dynamic_cast<CompareAWithIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CompareAWithIXHContext ------------------------------------------------------------------
Z80Parser::CompareAWithIXHContext::CompareAWithIXHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::CompareCommandNameContext* Z80Parser::CompareAWithIXHContext::compareCommandName() {
return getRuleContext<Z80Parser::CompareCommandNameContext>(0);
}
Z80Parser::IxHighRegisterContext* Z80Parser::CompareAWithIXHContext::ixHighRegister() {
return getRuleContext<Z80Parser::IxHighRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::CompareAWithIXHContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::CompareAWithIXHContext::getRuleIndex() const {
return Z80Parser::RuleCompareAWithIXH;
}
void Z80Parser::CompareAWithIXHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCompareAWithIXH(this);
}
void Z80Parser::CompareAWithIXHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCompareAWithIXH(this);
}
Z80Parser::CompareAWithIXHContext* Z80Parser::compareAWithIXH() {
CompareAWithIXHContext *_localctx = _tracker.createInstance<CompareAWithIXHContext>(_ctx, getState());
enterRule(_localctx, 392, Z80Parser::RuleCompareAWithIXH);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1928);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 92, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1920);
compareCommandName();
setState(1921);
dynamic_cast<CompareAWithIXHContext *>(_localctx)->source = ixHighRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1923);
compareCommandName();
setState(1924);
aRegister();
setState(1925);
match(Z80Parser::T__73);
setState(1926);
dynamic_cast<CompareAWithIXHContext *>(_localctx)->source = ixHighRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CompareAWithIXLContext ------------------------------------------------------------------
Z80Parser::CompareAWithIXLContext::CompareAWithIXLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::CompareCommandNameContext* Z80Parser::CompareAWithIXLContext::compareCommandName() {
return getRuleContext<Z80Parser::CompareCommandNameContext>(0);
}
Z80Parser::IxLowRegisterContext* Z80Parser::CompareAWithIXLContext::ixLowRegister() {
return getRuleContext<Z80Parser::IxLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::CompareAWithIXLContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::CompareAWithIXLContext::getRuleIndex() const {
return Z80Parser::RuleCompareAWithIXL;
}
void Z80Parser::CompareAWithIXLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCompareAWithIXL(this);
}
void Z80Parser::CompareAWithIXLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCompareAWithIXL(this);
}
Z80Parser::CompareAWithIXLContext* Z80Parser::compareAWithIXL() {
CompareAWithIXLContext *_localctx = _tracker.createInstance<CompareAWithIXLContext>(_ctx, getState());
enterRule(_localctx, 394, Z80Parser::RuleCompareAWithIXL);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1938);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 93, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1930);
compareCommandName();
setState(1931);
dynamic_cast<CompareAWithIXLContext *>(_localctx)->source = ixLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1933);
compareCommandName();
setState(1934);
aRegister();
setState(1935);
match(Z80Parser::T__73);
setState(1936);
dynamic_cast<CompareAWithIXLContext *>(_localctx)->source = ixLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CompareAWithIYHContext ------------------------------------------------------------------
Z80Parser::CompareAWithIYHContext::CompareAWithIYHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::CompareCommandNameContext* Z80Parser::CompareAWithIYHContext::compareCommandName() {
return getRuleContext<Z80Parser::CompareCommandNameContext>(0);
}
Z80Parser::IyHighRegisterContext* Z80Parser::CompareAWithIYHContext::iyHighRegister() {
return getRuleContext<Z80Parser::IyHighRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::CompareAWithIYHContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::CompareAWithIYHContext::getRuleIndex() const {
return Z80Parser::RuleCompareAWithIYH;
}
void Z80Parser::CompareAWithIYHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCompareAWithIYH(this);
}
void Z80Parser::CompareAWithIYHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCompareAWithIYH(this);
}
Z80Parser::CompareAWithIYHContext* Z80Parser::compareAWithIYH() {
CompareAWithIYHContext *_localctx = _tracker.createInstance<CompareAWithIYHContext>(_ctx, getState());
enterRule(_localctx, 396, Z80Parser::RuleCompareAWithIYH);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1948);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 94, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1940);
compareCommandName();
setState(1941);
dynamic_cast<CompareAWithIYHContext *>(_localctx)->source = iyHighRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1943);
compareCommandName();
setState(1944);
aRegister();
setState(1945);
match(Z80Parser::T__73);
setState(1946);
dynamic_cast<CompareAWithIYHContext *>(_localctx)->source = iyHighRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CompareAWithIYLContext ------------------------------------------------------------------
Z80Parser::CompareAWithIYLContext::CompareAWithIYLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::CompareCommandNameContext* Z80Parser::CompareAWithIYLContext::compareCommandName() {
return getRuleContext<Z80Parser::CompareCommandNameContext>(0);
}
Z80Parser::IyLowRegisterContext* Z80Parser::CompareAWithIYLContext::iyLowRegister() {
return getRuleContext<Z80Parser::IyLowRegisterContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::CompareAWithIYLContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::CompareAWithIYLContext::getRuleIndex() const {
return Z80Parser::RuleCompareAWithIYL;
}
void Z80Parser::CompareAWithIYLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCompareAWithIYL(this);
}
void Z80Parser::CompareAWithIYLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCompareAWithIYL(this);
}
Z80Parser::CompareAWithIYLContext* Z80Parser::compareAWithIYL() {
CompareAWithIYLContext *_localctx = _tracker.createInstance<CompareAWithIYLContext>(_ctx, getState());
enterRule(_localctx, 398, Z80Parser::RuleCompareAWithIYL);
auto onExit = finally([=] {
exitRule();
});
try {
setState(1958);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 95, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(1950);
compareCommandName();
setState(1951);
dynamic_cast<CompareAWithIYLContext *>(_localctx)->source = iyLowRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(1953);
compareCommandName();
setState(1954);
aRegister();
setState(1955);
match(Z80Parser::T__73);
setState(1956);
dynamic_cast<CompareAWithIYLContext *>(_localctx)->source = iyLowRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IncrementRegisterContext ------------------------------------------------------------------
Z80Parser::IncrementRegisterContext::IncrementRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::IncrementCommandNameContext* Z80Parser::IncrementRegisterContext::incrementCommandName() {
return getRuleContext<Z80Parser::IncrementCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::IncrementRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::IncrementRegisterContext::getRuleIndex() const {
return Z80Parser::RuleIncrementRegister;
}
void Z80Parser::IncrementRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIncrementRegister(this);
}
void Z80Parser::IncrementRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIncrementRegister(this);
}
Z80Parser::IncrementRegisterContext* Z80Parser::incrementRegister() {
IncrementRegisterContext *_localctx = _tracker.createInstance<IncrementRegisterContext>(_ctx, getState());
enterRule(_localctx, 400, Z80Parser::RuleIncrementRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1960);
incrementCommandName();
setState(1961);
dynamic_cast<IncrementRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IncrementIXHContext ------------------------------------------------------------------
Z80Parser::IncrementIXHContext::IncrementIXHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::IncrementCommandNameContext* Z80Parser::IncrementIXHContext::incrementCommandName() {
return getRuleContext<Z80Parser::IncrementCommandNameContext>(0);
}
Z80Parser::IxHighRegisterContext* Z80Parser::IncrementIXHContext::ixHighRegister() {
return getRuleContext<Z80Parser::IxHighRegisterContext>(0);
}
size_t Z80Parser::IncrementIXHContext::getRuleIndex() const {
return Z80Parser::RuleIncrementIXH;
}
void Z80Parser::IncrementIXHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIncrementIXH(this);
}
void Z80Parser::IncrementIXHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIncrementIXH(this);
}
Z80Parser::IncrementIXHContext* Z80Parser::incrementIXH() {
IncrementIXHContext *_localctx = _tracker.createInstance<IncrementIXHContext>(_ctx, getState());
enterRule(_localctx, 402, Z80Parser::RuleIncrementIXH);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1963);
incrementCommandName();
setState(1964);
dynamic_cast<IncrementIXHContext *>(_localctx)->source = ixHighRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IncrementIXLContext ------------------------------------------------------------------
Z80Parser::IncrementIXLContext::IncrementIXLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::IncrementCommandNameContext* Z80Parser::IncrementIXLContext::incrementCommandName() {
return getRuleContext<Z80Parser::IncrementCommandNameContext>(0);
}
Z80Parser::IxLowRegisterContext* Z80Parser::IncrementIXLContext::ixLowRegister() {
return getRuleContext<Z80Parser::IxLowRegisterContext>(0);
}
size_t Z80Parser::IncrementIXLContext::getRuleIndex() const {
return Z80Parser::RuleIncrementIXL;
}
void Z80Parser::IncrementIXLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIncrementIXL(this);
}
void Z80Parser::IncrementIXLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIncrementIXL(this);
}
Z80Parser::IncrementIXLContext* Z80Parser::incrementIXL() {
IncrementIXLContext *_localctx = _tracker.createInstance<IncrementIXLContext>(_ctx, getState());
enterRule(_localctx, 404, Z80Parser::RuleIncrementIXL);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1966);
incrementCommandName();
setState(1967);
dynamic_cast<IncrementIXLContext *>(_localctx)->source = ixLowRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IncrementIYHContext ------------------------------------------------------------------
Z80Parser::IncrementIYHContext::IncrementIYHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::IncrementCommandNameContext* Z80Parser::IncrementIYHContext::incrementCommandName() {
return getRuleContext<Z80Parser::IncrementCommandNameContext>(0);
}
Z80Parser::IyHighRegisterContext* Z80Parser::IncrementIYHContext::iyHighRegister() {
return getRuleContext<Z80Parser::IyHighRegisterContext>(0);
}
size_t Z80Parser::IncrementIYHContext::getRuleIndex() const {
return Z80Parser::RuleIncrementIYH;
}
void Z80Parser::IncrementIYHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIncrementIYH(this);
}
void Z80Parser::IncrementIYHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIncrementIYH(this);
}
Z80Parser::IncrementIYHContext* Z80Parser::incrementIYH() {
IncrementIYHContext *_localctx = _tracker.createInstance<IncrementIYHContext>(_ctx, getState());
enterRule(_localctx, 406, Z80Parser::RuleIncrementIYH);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1969);
incrementCommandName();
setState(1970);
dynamic_cast<IncrementIYHContext *>(_localctx)->source = iyHighRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IncrementIYLContext ------------------------------------------------------------------
Z80Parser::IncrementIYLContext::IncrementIYLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::IncrementCommandNameContext* Z80Parser::IncrementIYLContext::incrementCommandName() {
return getRuleContext<Z80Parser::IncrementCommandNameContext>(0);
}
Z80Parser::IyLowRegisterContext* Z80Parser::IncrementIYLContext::iyLowRegister() {
return getRuleContext<Z80Parser::IyLowRegisterContext>(0);
}
size_t Z80Parser::IncrementIYLContext::getRuleIndex() const {
return Z80Parser::RuleIncrementIYL;
}
void Z80Parser::IncrementIYLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIncrementIYL(this);
}
void Z80Parser::IncrementIYLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIncrementIYL(this);
}
Z80Parser::IncrementIYLContext* Z80Parser::incrementIYL() {
IncrementIYLContext *_localctx = _tracker.createInstance<IncrementIYLContext>(_ctx, getState());
enterRule(_localctx, 408, Z80Parser::RuleIncrementIYL);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1972);
incrementCommandName();
setState(1973);
dynamic_cast<IncrementIYLContext *>(_localctx)->source = iyLowRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IncrementHLPointerContext ------------------------------------------------------------------
Z80Parser::IncrementHLPointerContext::IncrementHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::IncrementCommandNameContext* Z80Parser::IncrementHLPointerContext::incrementCommandName() {
return getRuleContext<Z80Parser::IncrementCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::IncrementHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
size_t Z80Parser::IncrementHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleIncrementHLPointer;
}
void Z80Parser::IncrementHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIncrementHLPointer(this);
}
void Z80Parser::IncrementHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIncrementHLPointer(this);
}
Z80Parser::IncrementHLPointerContext* Z80Parser::incrementHLPointer() {
IncrementHLPointerContext *_localctx = _tracker.createInstance<IncrementHLPointerContext>(_ctx, getState());
enterRule(_localctx, 410, Z80Parser::RuleIncrementHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1975);
incrementCommandName();
setState(1976);
dynamic_cast<IncrementHLPointerContext *>(_localctx)->source = hlPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IncrementIXOffsetContext ------------------------------------------------------------------
Z80Parser::IncrementIXOffsetContext::IncrementIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::IncrementCommandNameContext* Z80Parser::IncrementIXOffsetContext::incrementCommandName() {
return getRuleContext<Z80Parser::IncrementCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::IncrementIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
size_t Z80Parser::IncrementIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleIncrementIXOffset;
}
void Z80Parser::IncrementIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIncrementIXOffset(this);
}
void Z80Parser::IncrementIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIncrementIXOffset(this);
}
Z80Parser::IncrementIXOffsetContext* Z80Parser::incrementIXOffset() {
IncrementIXOffsetContext *_localctx = _tracker.createInstance<IncrementIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 412, Z80Parser::RuleIncrementIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1978);
incrementCommandName();
setState(1979);
dynamic_cast<IncrementIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IncrementIYOffsetContext ------------------------------------------------------------------
Z80Parser::IncrementIYOffsetContext::IncrementIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::IncrementCommandNameContext* Z80Parser::IncrementIYOffsetContext::incrementCommandName() {
return getRuleContext<Z80Parser::IncrementCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::IncrementIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
size_t Z80Parser::IncrementIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleIncrementIYOffset;
}
void Z80Parser::IncrementIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIncrementIYOffset(this);
}
void Z80Parser::IncrementIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIncrementIYOffset(this);
}
Z80Parser::IncrementIYOffsetContext* Z80Parser::incrementIYOffset() {
IncrementIYOffsetContext *_localctx = _tracker.createInstance<IncrementIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 414, Z80Parser::RuleIncrementIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1981);
incrementCommandName();
setState(1982);
dynamic_cast<IncrementIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DecrementRegisterContext ------------------------------------------------------------------
Z80Parser::DecrementRegisterContext::DecrementRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::DecrementCommandNameContext* Z80Parser::DecrementRegisterContext::decrementCommandName() {
return getRuleContext<Z80Parser::DecrementCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::DecrementRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::DecrementRegisterContext::getRuleIndex() const {
return Z80Parser::RuleDecrementRegister;
}
void Z80Parser::DecrementRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDecrementRegister(this);
}
void Z80Parser::DecrementRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDecrementRegister(this);
}
Z80Parser::DecrementRegisterContext* Z80Parser::decrementRegister() {
DecrementRegisterContext *_localctx = _tracker.createInstance<DecrementRegisterContext>(_ctx, getState());
enterRule(_localctx, 416, Z80Parser::RuleDecrementRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1984);
decrementCommandName();
setState(1985);
dynamic_cast<DecrementRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DecrementIXHContext ------------------------------------------------------------------
Z80Parser::DecrementIXHContext::DecrementIXHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::DecrementCommandNameContext* Z80Parser::DecrementIXHContext::decrementCommandName() {
return getRuleContext<Z80Parser::DecrementCommandNameContext>(0);
}
Z80Parser::IxHighRegisterContext* Z80Parser::DecrementIXHContext::ixHighRegister() {
return getRuleContext<Z80Parser::IxHighRegisterContext>(0);
}
size_t Z80Parser::DecrementIXHContext::getRuleIndex() const {
return Z80Parser::RuleDecrementIXH;
}
void Z80Parser::DecrementIXHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDecrementIXH(this);
}
void Z80Parser::DecrementIXHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDecrementIXH(this);
}
Z80Parser::DecrementIXHContext* Z80Parser::decrementIXH() {
DecrementIXHContext *_localctx = _tracker.createInstance<DecrementIXHContext>(_ctx, getState());
enterRule(_localctx, 418, Z80Parser::RuleDecrementIXH);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1987);
decrementCommandName();
setState(1988);
dynamic_cast<DecrementIXHContext *>(_localctx)->source = ixHighRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DecrementIXLContext ------------------------------------------------------------------
Z80Parser::DecrementIXLContext::DecrementIXLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::DecrementCommandNameContext* Z80Parser::DecrementIXLContext::decrementCommandName() {
return getRuleContext<Z80Parser::DecrementCommandNameContext>(0);
}
Z80Parser::IxLowRegisterContext* Z80Parser::DecrementIXLContext::ixLowRegister() {
return getRuleContext<Z80Parser::IxLowRegisterContext>(0);
}
size_t Z80Parser::DecrementIXLContext::getRuleIndex() const {
return Z80Parser::RuleDecrementIXL;
}
void Z80Parser::DecrementIXLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDecrementIXL(this);
}
void Z80Parser::DecrementIXLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDecrementIXL(this);
}
Z80Parser::DecrementIXLContext* Z80Parser::decrementIXL() {
DecrementIXLContext *_localctx = _tracker.createInstance<DecrementIXLContext>(_ctx, getState());
enterRule(_localctx, 420, Z80Parser::RuleDecrementIXL);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1990);
decrementCommandName();
setState(1991);
dynamic_cast<DecrementIXLContext *>(_localctx)->source = ixLowRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DecrementIYHContext ------------------------------------------------------------------
Z80Parser::DecrementIYHContext::DecrementIYHContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::DecrementCommandNameContext* Z80Parser::DecrementIYHContext::decrementCommandName() {
return getRuleContext<Z80Parser::DecrementCommandNameContext>(0);
}
Z80Parser::IyHighRegisterContext* Z80Parser::DecrementIYHContext::iyHighRegister() {
return getRuleContext<Z80Parser::IyHighRegisterContext>(0);
}
size_t Z80Parser::DecrementIYHContext::getRuleIndex() const {
return Z80Parser::RuleDecrementIYH;
}
void Z80Parser::DecrementIYHContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDecrementIYH(this);
}
void Z80Parser::DecrementIYHContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDecrementIYH(this);
}
Z80Parser::DecrementIYHContext* Z80Parser::decrementIYH() {
DecrementIYHContext *_localctx = _tracker.createInstance<DecrementIYHContext>(_ctx, getState());
enterRule(_localctx, 422, Z80Parser::RuleDecrementIYH);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1993);
decrementCommandName();
setState(1994);
dynamic_cast<DecrementIYHContext *>(_localctx)->source = iyHighRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DecrementIYLContext ------------------------------------------------------------------
Z80Parser::DecrementIYLContext::DecrementIYLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::DecrementCommandNameContext* Z80Parser::DecrementIYLContext::decrementCommandName() {
return getRuleContext<Z80Parser::DecrementCommandNameContext>(0);
}
Z80Parser::IyLowRegisterContext* Z80Parser::DecrementIYLContext::iyLowRegister() {
return getRuleContext<Z80Parser::IyLowRegisterContext>(0);
}
size_t Z80Parser::DecrementIYLContext::getRuleIndex() const {
return Z80Parser::RuleDecrementIYL;
}
void Z80Parser::DecrementIYLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDecrementIYL(this);
}
void Z80Parser::DecrementIYLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDecrementIYL(this);
}
Z80Parser::DecrementIYLContext* Z80Parser::decrementIYL() {
DecrementIYLContext *_localctx = _tracker.createInstance<DecrementIYLContext>(_ctx, getState());
enterRule(_localctx, 424, Z80Parser::RuleDecrementIYL);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1996);
decrementCommandName();
setState(1997);
dynamic_cast<DecrementIYLContext *>(_localctx)->source = iyLowRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DecrementHLPointerContext ------------------------------------------------------------------
Z80Parser::DecrementHLPointerContext::DecrementHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::DecrementCommandNameContext* Z80Parser::DecrementHLPointerContext::decrementCommandName() {
return getRuleContext<Z80Parser::DecrementCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::DecrementHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
size_t Z80Parser::DecrementHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleDecrementHLPointer;
}
void Z80Parser::DecrementHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDecrementHLPointer(this);
}
void Z80Parser::DecrementHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDecrementHLPointer(this);
}
Z80Parser::DecrementHLPointerContext* Z80Parser::decrementHLPointer() {
DecrementHLPointerContext *_localctx = _tracker.createInstance<DecrementHLPointerContext>(_ctx, getState());
enterRule(_localctx, 426, Z80Parser::RuleDecrementHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(1999);
decrementCommandName();
setState(2000);
dynamic_cast<DecrementHLPointerContext *>(_localctx)->source = hlPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DecrementIXOffsetContext ------------------------------------------------------------------
Z80Parser::DecrementIXOffsetContext::DecrementIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::DecrementCommandNameContext* Z80Parser::DecrementIXOffsetContext::decrementCommandName() {
return getRuleContext<Z80Parser::DecrementCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::DecrementIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
size_t Z80Parser::DecrementIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleDecrementIXOffset;
}
void Z80Parser::DecrementIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDecrementIXOffset(this);
}
void Z80Parser::DecrementIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDecrementIXOffset(this);
}
Z80Parser::DecrementIXOffsetContext* Z80Parser::decrementIXOffset() {
DecrementIXOffsetContext *_localctx = _tracker.createInstance<DecrementIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 428, Z80Parser::RuleDecrementIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2002);
decrementCommandName();
setState(2003);
dynamic_cast<DecrementIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DecrementIYOffsetContext ------------------------------------------------------------------
Z80Parser::DecrementIYOffsetContext::DecrementIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::DecrementCommandNameContext* Z80Parser::DecrementIYOffsetContext::decrementCommandName() {
return getRuleContext<Z80Parser::DecrementCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::DecrementIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
size_t Z80Parser::DecrementIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleDecrementIYOffset;
}
void Z80Parser::DecrementIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDecrementIYOffset(this);
}
void Z80Parser::DecrementIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDecrementIYOffset(this);
}
Z80Parser::DecrementIYOffsetContext* Z80Parser::decrementIYOffset() {
DecrementIYOffsetContext *_localctx = _tracker.createInstance<DecrementIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 430, Z80Parser::RuleDecrementIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2005);
decrementCommandName();
setState(2006);
dynamic_cast<DecrementIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ArithmeticCommandContext ------------------------------------------------------------------
Z80Parser::ArithmeticCommandContext::ArithmeticCommandContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddAAndRegisterContext* Z80Parser::ArithmeticCommandContext::addAAndRegister() {
return getRuleContext<Z80Parser::AddAAndRegisterContext>(0);
}
Z80Parser::AddAAndImmediateByteContext* Z80Parser::ArithmeticCommandContext::addAAndImmediateByte() {
return getRuleContext<Z80Parser::AddAAndImmediateByteContext>(0);
}
Z80Parser::AddAAndIXHContext* Z80Parser::ArithmeticCommandContext::addAAndIXH() {
return getRuleContext<Z80Parser::AddAAndIXHContext>(0);
}
Z80Parser::AddAAndIXLContext* Z80Parser::ArithmeticCommandContext::addAAndIXL() {
return getRuleContext<Z80Parser::AddAAndIXLContext>(0);
}
Z80Parser::AddAAndIYHContext* Z80Parser::ArithmeticCommandContext::addAAndIYH() {
return getRuleContext<Z80Parser::AddAAndIYHContext>(0);
}
Z80Parser::AddAAndIYLContext* Z80Parser::ArithmeticCommandContext::addAAndIYL() {
return getRuleContext<Z80Parser::AddAAndIYLContext>(0);
}
Z80Parser::AddAAndHLPointerContext* Z80Parser::ArithmeticCommandContext::addAAndHLPointer() {
return getRuleContext<Z80Parser::AddAAndHLPointerContext>(0);
}
Z80Parser::AddAAndIXOffsetContext* Z80Parser::ArithmeticCommandContext::addAAndIXOffset() {
return getRuleContext<Z80Parser::AddAAndIXOffsetContext>(0);
}
Z80Parser::AddAAndIYOffsetContext* Z80Parser::ArithmeticCommandContext::addAAndIYOffset() {
return getRuleContext<Z80Parser::AddAAndIYOffsetContext>(0);
}
Z80Parser::AddWithCarryAAndRegisterContext* Z80Parser::ArithmeticCommandContext::addWithCarryAAndRegister() {
return getRuleContext<Z80Parser::AddWithCarryAAndRegisterContext>(0);
}
Z80Parser::AddWithCarryAAndHLPointerContext* Z80Parser::ArithmeticCommandContext::addWithCarryAAndHLPointer() {
return getRuleContext<Z80Parser::AddWithCarryAAndHLPointerContext>(0);
}
Z80Parser::AddWithCarryAAndImmediateContext* Z80Parser::ArithmeticCommandContext::addWithCarryAAndImmediate() {
return getRuleContext<Z80Parser::AddWithCarryAAndImmediateContext>(0);
}
Z80Parser::AddWithCarryAAndIXOffsetContext* Z80Parser::ArithmeticCommandContext::addWithCarryAAndIXOffset() {
return getRuleContext<Z80Parser::AddWithCarryAAndIXOffsetContext>(0);
}
Z80Parser::AddWithCarryAAndIYOffsetContext* Z80Parser::ArithmeticCommandContext::addWithCarryAAndIYOffset() {
return getRuleContext<Z80Parser::AddWithCarryAAndIYOffsetContext>(0);
}
Z80Parser::AddWithCarryAAndIXHContext* Z80Parser::ArithmeticCommandContext::addWithCarryAAndIXH() {
return getRuleContext<Z80Parser::AddWithCarryAAndIXHContext>(0);
}
Z80Parser::AddWithCarryAAndIXLContext* Z80Parser::ArithmeticCommandContext::addWithCarryAAndIXL() {
return getRuleContext<Z80Parser::AddWithCarryAAndIXLContext>(0);
}
Z80Parser::AddWithCarryAAndIYHContext* Z80Parser::ArithmeticCommandContext::addWithCarryAAndIYH() {
return getRuleContext<Z80Parser::AddWithCarryAAndIYHContext>(0);
}
Z80Parser::AddWithCarryAAndIYLContext* Z80Parser::ArithmeticCommandContext::addWithCarryAAndIYL() {
return getRuleContext<Z80Parser::AddWithCarryAAndIYLContext>(0);
}
Z80Parser::SubtractRegisterFromAContext* Z80Parser::ArithmeticCommandContext::subtractRegisterFromA() {
return getRuleContext<Z80Parser::SubtractRegisterFromAContext>(0);
}
Z80Parser::SubtractHLPointerFromAContext* Z80Parser::ArithmeticCommandContext::subtractHLPointerFromA() {
return getRuleContext<Z80Parser::SubtractHLPointerFromAContext>(0);
}
Z80Parser::SubtractImmediateFromAContext* Z80Parser::ArithmeticCommandContext::subtractImmediateFromA() {
return getRuleContext<Z80Parser::SubtractImmediateFromAContext>(0);
}
Z80Parser::SubtractIXOffsetFromAContext* Z80Parser::ArithmeticCommandContext::subtractIXOffsetFromA() {
return getRuleContext<Z80Parser::SubtractIXOffsetFromAContext>(0);
}
Z80Parser::SubtractIYOffsetFromAContext* Z80Parser::ArithmeticCommandContext::subtractIYOffsetFromA() {
return getRuleContext<Z80Parser::SubtractIYOffsetFromAContext>(0);
}
Z80Parser::SubtractWithBorrowRegisterFromAContext* Z80Parser::ArithmeticCommandContext::subtractWithBorrowRegisterFromA() {
return getRuleContext<Z80Parser::SubtractWithBorrowRegisterFromAContext>(0);
}
Z80Parser::SubtractWithBorrowHLPointerFromAContext* Z80Parser::ArithmeticCommandContext::subtractWithBorrowHLPointerFromA() {
return getRuleContext<Z80Parser::SubtractWithBorrowHLPointerFromAContext>(0);
}
Z80Parser::SubtractWithBorrowIXOffsetFromAContext* Z80Parser::ArithmeticCommandContext::subtractWithBorrowIXOffsetFromA() {
return getRuleContext<Z80Parser::SubtractWithBorrowIXOffsetFromAContext>(0);
}
Z80Parser::SubtractWithBorrowIYOffsetFromAContext* Z80Parser::ArithmeticCommandContext::subtractWithBorrowIYOffsetFromA() {
return getRuleContext<Z80Parser::SubtractWithBorrowIYOffsetFromAContext>(0);
}
Z80Parser::SubtractWithBorrowImmediateFromAContext* Z80Parser::ArithmeticCommandContext::subtractWithBorrowImmediateFromA() {
return getRuleContext<Z80Parser::SubtractWithBorrowImmediateFromAContext>(0);
}
Z80Parser::SubtractWithBorrowIXHFromAContext* Z80Parser::ArithmeticCommandContext::subtractWithBorrowIXHFromA() {
return getRuleContext<Z80Parser::SubtractWithBorrowIXHFromAContext>(0);
}
Z80Parser::SubtractWithBorrowIXLFromAContext* Z80Parser::ArithmeticCommandContext::subtractWithBorrowIXLFromA() {
return getRuleContext<Z80Parser::SubtractWithBorrowIXLFromAContext>(0);
}
Z80Parser::SubtractWithBorrowIYHFromAContext* Z80Parser::ArithmeticCommandContext::subtractWithBorrowIYHFromA() {
return getRuleContext<Z80Parser::SubtractWithBorrowIYHFromAContext>(0);
}
Z80Parser::SubtractWithBorrowIYLFromAContext* Z80Parser::ArithmeticCommandContext::subtractWithBorrowIYLFromA() {
return getRuleContext<Z80Parser::SubtractWithBorrowIYLFromAContext>(0);
}
Z80Parser::SubtractIXHighOrLowFromAContext* Z80Parser::ArithmeticCommandContext::subtractIXHighOrLowFromA() {
return getRuleContext<Z80Parser::SubtractIXHighOrLowFromAContext>(0);
}
Z80Parser::SubtractIYHighOrLowFromAContext* Z80Parser::ArithmeticCommandContext::subtractIYHighOrLowFromA() {
return getRuleContext<Z80Parser::SubtractIYHighOrLowFromAContext>(0);
}
Z80Parser::AndAWithRegisterContext* Z80Parser::ArithmeticCommandContext::andAWithRegister() {
return getRuleContext<Z80Parser::AndAWithRegisterContext>(0);
}
Z80Parser::AndAWithImmediateContext* Z80Parser::ArithmeticCommandContext::andAWithImmediate() {
return getRuleContext<Z80Parser::AndAWithImmediateContext>(0);
}
Z80Parser::AndAWithHLPointerContext* Z80Parser::ArithmeticCommandContext::andAWithHLPointer() {
return getRuleContext<Z80Parser::AndAWithHLPointerContext>(0);
}
Z80Parser::AndAWithIXOffsetContext* Z80Parser::ArithmeticCommandContext::andAWithIXOffset() {
return getRuleContext<Z80Parser::AndAWithIXOffsetContext>(0);
}
Z80Parser::AndAWithIYOffsetContext* Z80Parser::ArithmeticCommandContext::andAWithIYOffset() {
return getRuleContext<Z80Parser::AndAWithIYOffsetContext>(0);
}
Z80Parser::AndAWithIXHContext* Z80Parser::ArithmeticCommandContext::andAWithIXH() {
return getRuleContext<Z80Parser::AndAWithIXHContext>(0);
}
Z80Parser::AndAWithIXLContext* Z80Parser::ArithmeticCommandContext::andAWithIXL() {
return getRuleContext<Z80Parser::AndAWithIXLContext>(0);
}
Z80Parser::AndAWithIYHContext* Z80Parser::ArithmeticCommandContext::andAWithIYH() {
return getRuleContext<Z80Parser::AndAWithIYHContext>(0);
}
Z80Parser::AndAWithIYLContext* Z80Parser::ArithmeticCommandContext::andAWithIYL() {
return getRuleContext<Z80Parser::AndAWithIYLContext>(0);
}
Z80Parser::OrAWithRegisterContext* Z80Parser::ArithmeticCommandContext::orAWithRegister() {
return getRuleContext<Z80Parser::OrAWithRegisterContext>(0);
}
Z80Parser::OrAWithImmediateContext* Z80Parser::ArithmeticCommandContext::orAWithImmediate() {
return getRuleContext<Z80Parser::OrAWithImmediateContext>(0);
}
Z80Parser::OrAWithHLPointerContext* Z80Parser::ArithmeticCommandContext::orAWithHLPointer() {
return getRuleContext<Z80Parser::OrAWithHLPointerContext>(0);
}
Z80Parser::OrAWithIXOffsetContext* Z80Parser::ArithmeticCommandContext::orAWithIXOffset() {
return getRuleContext<Z80Parser::OrAWithIXOffsetContext>(0);
}
Z80Parser::OrAWithIYOffsetContext* Z80Parser::ArithmeticCommandContext::orAWithIYOffset() {
return getRuleContext<Z80Parser::OrAWithIYOffsetContext>(0);
}
Z80Parser::OrAWithIXHContext* Z80Parser::ArithmeticCommandContext::orAWithIXH() {
return getRuleContext<Z80Parser::OrAWithIXHContext>(0);
}
Z80Parser::OrAWithIXLContext* Z80Parser::ArithmeticCommandContext::orAWithIXL() {
return getRuleContext<Z80Parser::OrAWithIXLContext>(0);
}
Z80Parser::OrAWithIYHContext* Z80Parser::ArithmeticCommandContext::orAWithIYH() {
return getRuleContext<Z80Parser::OrAWithIYHContext>(0);
}
Z80Parser::OrAWithIYLContext* Z80Parser::ArithmeticCommandContext::orAWithIYL() {
return getRuleContext<Z80Parser::OrAWithIYLContext>(0);
}
Z80Parser::XorAWithRegisterContext* Z80Parser::ArithmeticCommandContext::xorAWithRegister() {
return getRuleContext<Z80Parser::XorAWithRegisterContext>(0);
}
Z80Parser::XorAWithImmediateContext* Z80Parser::ArithmeticCommandContext::xorAWithImmediate() {
return getRuleContext<Z80Parser::XorAWithImmediateContext>(0);
}
Z80Parser::XorAWithHLPointerContext* Z80Parser::ArithmeticCommandContext::xorAWithHLPointer() {
return getRuleContext<Z80Parser::XorAWithHLPointerContext>(0);
}
Z80Parser::XorAWithIXOffsetContext* Z80Parser::ArithmeticCommandContext::xorAWithIXOffset() {
return getRuleContext<Z80Parser::XorAWithIXOffsetContext>(0);
}
Z80Parser::XorAWithIYOffsetContext* Z80Parser::ArithmeticCommandContext::xorAWithIYOffset() {
return getRuleContext<Z80Parser::XorAWithIYOffsetContext>(0);
}
Z80Parser::XorAWithIXHContext* Z80Parser::ArithmeticCommandContext::xorAWithIXH() {
return getRuleContext<Z80Parser::XorAWithIXHContext>(0);
}
Z80Parser::XorAWithIXLContext* Z80Parser::ArithmeticCommandContext::xorAWithIXL() {
return getRuleContext<Z80Parser::XorAWithIXLContext>(0);
}
Z80Parser::XorAWithIYHContext* Z80Parser::ArithmeticCommandContext::xorAWithIYH() {
return getRuleContext<Z80Parser::XorAWithIYHContext>(0);
}
Z80Parser::XorAWithIYLContext* Z80Parser::ArithmeticCommandContext::xorAWithIYL() {
return getRuleContext<Z80Parser::XorAWithIYLContext>(0);
}
Z80Parser::CompareAWithRegisterContext* Z80Parser::ArithmeticCommandContext::compareAWithRegister() {
return getRuleContext<Z80Parser::CompareAWithRegisterContext>(0);
}
Z80Parser::CompareAWithHLPointerContext* Z80Parser::ArithmeticCommandContext::compareAWithHLPointer() {
return getRuleContext<Z80Parser::CompareAWithHLPointerContext>(0);
}
Z80Parser::CompareAWithImmediateContext* Z80Parser::ArithmeticCommandContext::compareAWithImmediate() {
return getRuleContext<Z80Parser::CompareAWithImmediateContext>(0);
}
Z80Parser::CompareAWithIXOffsetContext* Z80Parser::ArithmeticCommandContext::compareAWithIXOffset() {
return getRuleContext<Z80Parser::CompareAWithIXOffsetContext>(0);
}
Z80Parser::CompareAWithIYOffsetContext* Z80Parser::ArithmeticCommandContext::compareAWithIYOffset() {
return getRuleContext<Z80Parser::CompareAWithIYOffsetContext>(0);
}
Z80Parser::CompareAWithIXHContext* Z80Parser::ArithmeticCommandContext::compareAWithIXH() {
return getRuleContext<Z80Parser::CompareAWithIXHContext>(0);
}
Z80Parser::CompareAWithIXLContext* Z80Parser::ArithmeticCommandContext::compareAWithIXL() {
return getRuleContext<Z80Parser::CompareAWithIXLContext>(0);
}
Z80Parser::CompareAWithIYHContext* Z80Parser::ArithmeticCommandContext::compareAWithIYH() {
return getRuleContext<Z80Parser::CompareAWithIYHContext>(0);
}
Z80Parser::CompareAWithIYLContext* Z80Parser::ArithmeticCommandContext::compareAWithIYL() {
return getRuleContext<Z80Parser::CompareAWithIYLContext>(0);
}
Z80Parser::IncrementRegisterContext* Z80Parser::ArithmeticCommandContext::incrementRegister() {
return getRuleContext<Z80Parser::IncrementRegisterContext>(0);
}
Z80Parser::IncrementIXHContext* Z80Parser::ArithmeticCommandContext::incrementIXH() {
return getRuleContext<Z80Parser::IncrementIXHContext>(0);
}
Z80Parser::IncrementIXLContext* Z80Parser::ArithmeticCommandContext::incrementIXL() {
return getRuleContext<Z80Parser::IncrementIXLContext>(0);
}
Z80Parser::IncrementIYHContext* Z80Parser::ArithmeticCommandContext::incrementIYH() {
return getRuleContext<Z80Parser::IncrementIYHContext>(0);
}
Z80Parser::IncrementIYLContext* Z80Parser::ArithmeticCommandContext::incrementIYL() {
return getRuleContext<Z80Parser::IncrementIYLContext>(0);
}
Z80Parser::IncrementHLPointerContext* Z80Parser::ArithmeticCommandContext::incrementHLPointer() {
return getRuleContext<Z80Parser::IncrementHLPointerContext>(0);
}
Z80Parser::IncrementIXOffsetContext* Z80Parser::ArithmeticCommandContext::incrementIXOffset() {
return getRuleContext<Z80Parser::IncrementIXOffsetContext>(0);
}
Z80Parser::IncrementIYOffsetContext* Z80Parser::ArithmeticCommandContext::incrementIYOffset() {
return getRuleContext<Z80Parser::IncrementIYOffsetContext>(0);
}
Z80Parser::DecrementRegisterContext* Z80Parser::ArithmeticCommandContext::decrementRegister() {
return getRuleContext<Z80Parser::DecrementRegisterContext>(0);
}
Z80Parser::DecrementIXHContext* Z80Parser::ArithmeticCommandContext::decrementIXH() {
return getRuleContext<Z80Parser::DecrementIXHContext>(0);
}
Z80Parser::DecrementIXLContext* Z80Parser::ArithmeticCommandContext::decrementIXL() {
return getRuleContext<Z80Parser::DecrementIXLContext>(0);
}
Z80Parser::DecrementIYHContext* Z80Parser::ArithmeticCommandContext::decrementIYH() {
return getRuleContext<Z80Parser::DecrementIYHContext>(0);
}
Z80Parser::DecrementIYLContext* Z80Parser::ArithmeticCommandContext::decrementIYL() {
return getRuleContext<Z80Parser::DecrementIYLContext>(0);
}
Z80Parser::DecrementHLPointerContext* Z80Parser::ArithmeticCommandContext::decrementHLPointer() {
return getRuleContext<Z80Parser::DecrementHLPointerContext>(0);
}
Z80Parser::DecrementIXOffsetContext* Z80Parser::ArithmeticCommandContext::decrementIXOffset() {
return getRuleContext<Z80Parser::DecrementIXOffsetContext>(0);
}
Z80Parser::DecrementIYOffsetContext* Z80Parser::ArithmeticCommandContext::decrementIYOffset() {
return getRuleContext<Z80Parser::DecrementIYOffsetContext>(0);
}
size_t Z80Parser::ArithmeticCommandContext::getRuleIndex() const {
return Z80Parser::RuleArithmeticCommand;
}
void Z80Parser::ArithmeticCommandContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterArithmeticCommand(this);
}
void Z80Parser::ArithmeticCommandContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitArithmeticCommand(this);
}
Z80Parser::ArithmeticCommandContext* Z80Parser::arithmeticCommand() {
ArithmeticCommandContext *_localctx = _tracker.createInstance<ArithmeticCommandContext>(_ctx, getState());
enterRule(_localctx, 432, Z80Parser::RuleArithmeticCommand);
auto onExit = finally([=] {
exitRule();
});
try {
setState(2094);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 96, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(2008);
addAAndRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(2009);
addAAndImmediateByte();
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
setState(2010);
addAAndIXH();
break;
}
case 4: {
enterOuterAlt(_localctx, 4);
setState(2011);
addAAndIXL();
break;
}
case 5: {
enterOuterAlt(_localctx, 5);
setState(2012);
addAAndIYH();
break;
}
case 6: {
enterOuterAlt(_localctx, 6);
setState(2013);
addAAndIYL();
break;
}
case 7: {
enterOuterAlt(_localctx, 7);
setState(2014);
addAAndHLPointer();
break;
}
case 8: {
enterOuterAlt(_localctx, 8);
setState(2015);
addAAndIXOffset();
break;
}
case 9: {
enterOuterAlt(_localctx, 9);
setState(2016);
addAAndIYOffset();
break;
}
case 10: {
enterOuterAlt(_localctx, 10);
setState(2017);
addWithCarryAAndRegister();
break;
}
case 11: {
enterOuterAlt(_localctx, 11);
setState(2018);
addWithCarryAAndHLPointer();
break;
}
case 12: {
enterOuterAlt(_localctx, 12);
setState(2019);
addWithCarryAAndImmediate();
break;
}
case 13: {
enterOuterAlt(_localctx, 13);
setState(2020);
addWithCarryAAndIXOffset();
break;
}
case 14: {
enterOuterAlt(_localctx, 14);
setState(2021);
addWithCarryAAndIYOffset();
break;
}
case 15: {
enterOuterAlt(_localctx, 15);
setState(2022);
addWithCarryAAndIXH();
break;
}
case 16: {
enterOuterAlt(_localctx, 16);
setState(2023);
addWithCarryAAndIXL();
break;
}
case 17: {
enterOuterAlt(_localctx, 17);
setState(2024);
addWithCarryAAndIYH();
break;
}
case 18: {
enterOuterAlt(_localctx, 18);
setState(2025);
addWithCarryAAndIYL();
break;
}
case 19: {
enterOuterAlt(_localctx, 19);
setState(2026);
subtractRegisterFromA();
break;
}
case 20: {
enterOuterAlt(_localctx, 20);
setState(2027);
subtractHLPointerFromA();
break;
}
case 21: {
enterOuterAlt(_localctx, 21);
setState(2028);
subtractImmediateFromA();
break;
}
case 22: {
enterOuterAlt(_localctx, 22);
setState(2029);
subtractIXOffsetFromA();
break;
}
case 23: {
enterOuterAlt(_localctx, 23);
setState(2030);
subtractIYOffsetFromA();
break;
}
case 24: {
enterOuterAlt(_localctx, 24);
setState(2031);
subtractWithBorrowRegisterFromA();
break;
}
case 25: {
enterOuterAlt(_localctx, 25);
setState(2032);
subtractWithBorrowHLPointerFromA();
break;
}
case 26: {
enterOuterAlt(_localctx, 26);
setState(2033);
subtractWithBorrowIXOffsetFromA();
break;
}
case 27: {
enterOuterAlt(_localctx, 27);
setState(2034);
subtractWithBorrowIYOffsetFromA();
break;
}
case 28: {
enterOuterAlt(_localctx, 28);
setState(2035);
subtractWithBorrowImmediateFromA();
break;
}
case 29: {
enterOuterAlt(_localctx, 29);
setState(2036);
subtractWithBorrowIXHFromA();
break;
}
case 30: {
enterOuterAlt(_localctx, 30);
setState(2037);
subtractWithBorrowIXLFromA();
break;
}
case 31: {
enterOuterAlt(_localctx, 31);
setState(2038);
subtractWithBorrowIYHFromA();
break;
}
case 32: {
enterOuterAlt(_localctx, 32);
setState(2039);
subtractWithBorrowIYLFromA();
break;
}
case 33: {
enterOuterAlt(_localctx, 33);
setState(2040);
subtractIXHighOrLowFromA();
break;
}
case 34: {
enterOuterAlt(_localctx, 34);
setState(2041);
subtractIYHighOrLowFromA();
break;
}
case 35: {
enterOuterAlt(_localctx, 35);
setState(2042);
andAWithRegister();
break;
}
case 36: {
enterOuterAlt(_localctx, 36);
setState(2043);
andAWithImmediate();
break;
}
case 37: {
enterOuterAlt(_localctx, 37);
setState(2044);
andAWithHLPointer();
break;
}
case 38: {
enterOuterAlt(_localctx, 38);
setState(2045);
andAWithIXOffset();
break;
}
case 39: {
enterOuterAlt(_localctx, 39);
setState(2046);
andAWithIYOffset();
break;
}
case 40: {
enterOuterAlt(_localctx, 40);
setState(2047);
andAWithIXH();
break;
}
case 41: {
enterOuterAlt(_localctx, 41);
setState(2048);
andAWithIXL();
break;
}
case 42: {
enterOuterAlt(_localctx, 42);
setState(2049);
andAWithIYH();
break;
}
case 43: {
enterOuterAlt(_localctx, 43);
setState(2050);
andAWithIYL();
break;
}
case 44: {
enterOuterAlt(_localctx, 44);
setState(2051);
orAWithRegister();
break;
}
case 45: {
enterOuterAlt(_localctx, 45);
setState(2052);
orAWithImmediate();
break;
}
case 46: {
enterOuterAlt(_localctx, 46);
setState(2053);
orAWithHLPointer();
break;
}
case 47: {
enterOuterAlt(_localctx, 47);
setState(2054);
orAWithIXOffset();
break;
}
case 48: {
enterOuterAlt(_localctx, 48);
setState(2055);
orAWithIYOffset();
break;
}
case 49: {
enterOuterAlt(_localctx, 49);
setState(2056);
orAWithIXH();
break;
}
case 50: {
enterOuterAlt(_localctx, 50);
setState(2057);
orAWithIXL();
break;
}
case 51: {
enterOuterAlt(_localctx, 51);
setState(2058);
orAWithIYH();
break;
}
case 52: {
enterOuterAlt(_localctx, 52);
setState(2059);
orAWithIYL();
break;
}
case 53: {
enterOuterAlt(_localctx, 53);
setState(2060);
xorAWithRegister();
break;
}
case 54: {
enterOuterAlt(_localctx, 54);
setState(2061);
xorAWithImmediate();
break;
}
case 55: {
enterOuterAlt(_localctx, 55);
setState(2062);
xorAWithHLPointer();
break;
}
case 56: {
enterOuterAlt(_localctx, 56);
setState(2063);
xorAWithIXOffset();
break;
}
case 57: {
enterOuterAlt(_localctx, 57);
setState(2064);
xorAWithIYOffset();
break;
}
case 58: {
enterOuterAlt(_localctx, 58);
setState(2065);
xorAWithIXH();
break;
}
case 59: {
enterOuterAlt(_localctx, 59);
setState(2066);
xorAWithIXL();
break;
}
case 60: {
enterOuterAlt(_localctx, 60);
setState(2067);
xorAWithIYH();
break;
}
case 61: {
enterOuterAlt(_localctx, 61);
setState(2068);
xorAWithIYL();
break;
}
case 62: {
enterOuterAlt(_localctx, 62);
setState(2069);
compareAWithRegister();
break;
}
case 63: {
enterOuterAlt(_localctx, 63);
setState(2070);
compareAWithHLPointer();
break;
}
case 64: {
enterOuterAlt(_localctx, 64);
setState(2071);
compareAWithImmediate();
break;
}
case 65: {
enterOuterAlt(_localctx, 65);
setState(2072);
compareAWithIXOffset();
break;
}
case 66: {
enterOuterAlt(_localctx, 66);
setState(2073);
compareAWithIYOffset();
break;
}
case 67: {
enterOuterAlt(_localctx, 67);
setState(2074);
compareAWithIXH();
break;
}
case 68: {
enterOuterAlt(_localctx, 68);
setState(2075);
compareAWithIXL();
break;
}
case 69: {
enterOuterAlt(_localctx, 69);
setState(2076);
compareAWithIYH();
break;
}
case 70: {
enterOuterAlt(_localctx, 70);
setState(2077);
compareAWithIYL();
break;
}
case 71: {
enterOuterAlt(_localctx, 71);
setState(2078);
incrementRegister();
break;
}
case 72: {
enterOuterAlt(_localctx, 72);
setState(2079);
incrementIXH();
break;
}
case 73: {
enterOuterAlt(_localctx, 73);
setState(2080);
incrementIXL();
break;
}
case 74: {
enterOuterAlt(_localctx, 74);
setState(2081);
incrementIYH();
break;
}
case 75: {
enterOuterAlt(_localctx, 75);
setState(2082);
incrementIYL();
break;
}
case 76: {
enterOuterAlt(_localctx, 76);
setState(2083);
incrementHLPointer();
break;
}
case 77: {
enterOuterAlt(_localctx, 77);
setState(2084);
incrementIXOffset();
break;
}
case 78: {
enterOuterAlt(_localctx, 78);
setState(2085);
incrementIYOffset();
break;
}
case 79: {
enterOuterAlt(_localctx, 79);
setState(2086);
decrementRegister();
break;
}
case 80: {
enterOuterAlt(_localctx, 80);
setState(2087);
decrementIXH();
break;
}
case 81: {
enterOuterAlt(_localctx, 81);
setState(2088);
decrementIXL();
break;
}
case 82: {
enterOuterAlt(_localctx, 82);
setState(2089);
decrementIYH();
break;
}
case 83: {
enterOuterAlt(_localctx, 83);
setState(2090);
decrementIYL();
break;
}
case 84: {
enterOuterAlt(_localctx, 84);
setState(2091);
decrementHLPointer();
break;
}
case 85: {
enterOuterAlt(_localctx, 85);
setState(2092);
decrementIXOffset();
break;
}
case 86: {
enterOuterAlt(_localctx, 86);
setState(2093);
decrementIYOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DecimalAdjustAContext ------------------------------------------------------------------
Z80Parser::DecimalAdjustAContext::DecimalAdjustAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::DecimalAdjustAContext::getRuleIndex() const {
return Z80Parser::RuleDecimalAdjustA;
}
void Z80Parser::DecimalAdjustAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDecimalAdjustA(this);
}
void Z80Parser::DecimalAdjustAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDecimalAdjustA(this);
}
Z80Parser::DecimalAdjustAContext* Z80Parser::decimalAdjustA() {
DecimalAdjustAContext *_localctx = _tracker.createInstance<DecimalAdjustAContext>(_ctx, getState());
enterRule(_localctx, 434, Z80Parser::RuleDecimalAdjustA);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2096);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__118
|| _la == Z80Parser::T__119)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ComplementAContext ------------------------------------------------------------------
Z80Parser::ComplementAContext::ComplementAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::ComplementAContext::getRuleIndex() const {
return Z80Parser::RuleComplementA;
}
void Z80Parser::ComplementAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterComplementA(this);
}
void Z80Parser::ComplementAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitComplementA(this);
}
Z80Parser::ComplementAContext* Z80Parser::complementA() {
ComplementAContext *_localctx = _tracker.createInstance<ComplementAContext>(_ctx, getState());
enterRule(_localctx, 436, Z80Parser::RuleComplementA);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2098);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__120
|| _la == Z80Parser::T__121)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- NegateAContext ------------------------------------------------------------------
Z80Parser::NegateAContext::NegateAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::NegateAContext::getRuleIndex() const {
return Z80Parser::RuleNegateA;
}
void Z80Parser::NegateAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterNegateA(this);
}
void Z80Parser::NegateAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitNegateA(this);
}
Z80Parser::NegateAContext* Z80Parser::negateA() {
NegateAContext *_localctx = _tracker.createInstance<NegateAContext>(_ctx, getState());
enterRule(_localctx, 438, Z80Parser::RuleNegateA);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2100);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__122
|| _la == Z80Parser::T__123)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ComplementCarryFlagContext ------------------------------------------------------------------
Z80Parser::ComplementCarryFlagContext::ComplementCarryFlagContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::ComplementCarryFlagContext::getRuleIndex() const {
return Z80Parser::RuleComplementCarryFlag;
}
void Z80Parser::ComplementCarryFlagContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterComplementCarryFlag(this);
}
void Z80Parser::ComplementCarryFlagContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitComplementCarryFlag(this);
}
Z80Parser::ComplementCarryFlagContext* Z80Parser::complementCarryFlag() {
ComplementCarryFlagContext *_localctx = _tracker.createInstance<ComplementCarryFlagContext>(_ctx, getState());
enterRule(_localctx, 440, Z80Parser::RuleComplementCarryFlag);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2102);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__124
|| _la == Z80Parser::T__125)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SetCarryFlagContext ------------------------------------------------------------------
Z80Parser::SetCarryFlagContext::SetCarryFlagContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::SetCarryFlagContext::getRuleIndex() const {
return Z80Parser::RuleSetCarryFlag;
}
void Z80Parser::SetCarryFlagContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSetCarryFlag(this);
}
void Z80Parser::SetCarryFlagContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSetCarryFlag(this);
}
Z80Parser::SetCarryFlagContext* Z80Parser::setCarryFlag() {
SetCarryFlagContext *_localctx = _tracker.createInstance<SetCarryFlagContext>(_ctx, getState());
enterRule(_localctx, 442, Z80Parser::RuleSetCarryFlag);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2104);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__126
|| _la == Z80Parser::T__127)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- NopContext ------------------------------------------------------------------
Z80Parser::NopContext::NopContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::NopContext::getRuleIndex() const {
return Z80Parser::RuleNop;
}
void Z80Parser::NopContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterNop(this);
}
void Z80Parser::NopContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitNop(this);
}
Z80Parser::NopContext* Z80Parser::nop() {
NopContext *_localctx = _tracker.createInstance<NopContext>(_ctx, getState());
enterRule(_localctx, 444, Z80Parser::RuleNop);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2106);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__128
|| _la == Z80Parser::T__129)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- HaltContext ------------------------------------------------------------------
Z80Parser::HaltContext::HaltContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::HaltContext::getRuleIndex() const {
return Z80Parser::RuleHalt;
}
void Z80Parser::HaltContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterHalt(this);
}
void Z80Parser::HaltContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitHalt(this);
}
Z80Parser::HaltContext* Z80Parser::halt() {
HaltContext *_localctx = _tracker.createInstance<HaltContext>(_ctx, getState());
enterRule(_localctx, 446, Z80Parser::RuleHalt);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2108);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__130
|| _la == Z80Parser::T__131)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DisableInterruptsContext ------------------------------------------------------------------
Z80Parser::DisableInterruptsContext::DisableInterruptsContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::DisableInterruptsContext::getRuleIndex() const {
return Z80Parser::RuleDisableInterrupts;
}
void Z80Parser::DisableInterruptsContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDisableInterrupts(this);
}
void Z80Parser::DisableInterruptsContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDisableInterrupts(this);
}
Z80Parser::DisableInterruptsContext* Z80Parser::disableInterrupts() {
DisableInterruptsContext *_localctx = _tracker.createInstance<DisableInterruptsContext>(_ctx, getState());
enterRule(_localctx, 448, Z80Parser::RuleDisableInterrupts);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2110);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__132
|| _la == Z80Parser::T__133)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- EnableInterruptsContext ------------------------------------------------------------------
Z80Parser::EnableInterruptsContext::EnableInterruptsContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::EnableInterruptsContext::getRuleIndex() const {
return Z80Parser::RuleEnableInterrupts;
}
void Z80Parser::EnableInterruptsContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterEnableInterrupts(this);
}
void Z80Parser::EnableInterruptsContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitEnableInterrupts(this);
}
Z80Parser::EnableInterruptsContext* Z80Parser::enableInterrupts() {
EnableInterruptsContext *_localctx = _tracker.createInstance<EnableInterruptsContext>(_ctx, getState());
enterRule(_localctx, 450, Z80Parser::RuleEnableInterrupts);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2112);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__134
|| _la == Z80Parser::T__135)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SetInterruptModeContext ------------------------------------------------------------------
Z80Parser::SetInterruptModeContext::SetInterruptModeContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::NumberContext* Z80Parser::SetInterruptModeContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::SetInterruptModeContext::getRuleIndex() const {
return Z80Parser::RuleSetInterruptMode;
}
void Z80Parser::SetInterruptModeContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSetInterruptMode(this);
}
void Z80Parser::SetInterruptModeContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSetInterruptMode(this);
}
Z80Parser::SetInterruptModeContext* Z80Parser::setInterruptMode() {
SetInterruptModeContext *_localctx = _tracker.createInstance<SetInterruptModeContext>(_ctx, getState());
enterRule(_localctx, 452, Z80Parser::RuleSetInterruptMode);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2114);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__136
|| _la == Z80Parser::T__137)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
setState(2115);
dynamic_cast<SetInterruptModeContext *>(_localctx)->source = number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ArithmeticControlCommandContext ------------------------------------------------------------------
Z80Parser::ArithmeticControlCommandContext::ArithmeticControlCommandContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::DecimalAdjustAContext* Z80Parser::ArithmeticControlCommandContext::decimalAdjustA() {
return getRuleContext<Z80Parser::DecimalAdjustAContext>(0);
}
Z80Parser::ComplementAContext* Z80Parser::ArithmeticControlCommandContext::complementA() {
return getRuleContext<Z80Parser::ComplementAContext>(0);
}
Z80Parser::NegateAContext* Z80Parser::ArithmeticControlCommandContext::negateA() {
return getRuleContext<Z80Parser::NegateAContext>(0);
}
Z80Parser::ComplementCarryFlagContext* Z80Parser::ArithmeticControlCommandContext::complementCarryFlag() {
return getRuleContext<Z80Parser::ComplementCarryFlagContext>(0);
}
Z80Parser::SetCarryFlagContext* Z80Parser::ArithmeticControlCommandContext::setCarryFlag() {
return getRuleContext<Z80Parser::SetCarryFlagContext>(0);
}
Z80Parser::NopContext* Z80Parser::ArithmeticControlCommandContext::nop() {
return getRuleContext<Z80Parser::NopContext>(0);
}
Z80Parser::HaltContext* Z80Parser::ArithmeticControlCommandContext::halt() {
return getRuleContext<Z80Parser::HaltContext>(0);
}
Z80Parser::DisableInterruptsContext* Z80Parser::ArithmeticControlCommandContext::disableInterrupts() {
return getRuleContext<Z80Parser::DisableInterruptsContext>(0);
}
Z80Parser::EnableInterruptsContext* Z80Parser::ArithmeticControlCommandContext::enableInterrupts() {
return getRuleContext<Z80Parser::EnableInterruptsContext>(0);
}
Z80Parser::SetInterruptModeContext* Z80Parser::ArithmeticControlCommandContext::setInterruptMode() {
return getRuleContext<Z80Parser::SetInterruptModeContext>(0);
}
size_t Z80Parser::ArithmeticControlCommandContext::getRuleIndex() const {
return Z80Parser::RuleArithmeticControlCommand;
}
void Z80Parser::ArithmeticControlCommandContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterArithmeticControlCommand(this);
}
void Z80Parser::ArithmeticControlCommandContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitArithmeticControlCommand(this);
}
Z80Parser::ArithmeticControlCommandContext* Z80Parser::arithmeticControlCommand() {
ArithmeticControlCommandContext *_localctx = _tracker.createInstance<ArithmeticControlCommandContext>(_ctx, getState());
enterRule(_localctx, 454, Z80Parser::RuleArithmeticControlCommand);
auto onExit = finally([=] {
exitRule();
});
try {
setState(2127);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__118:
case Z80Parser::T__119: {
enterOuterAlt(_localctx, 1);
setState(2117);
decimalAdjustA();
break;
}
case Z80Parser::T__120:
case Z80Parser::T__121: {
enterOuterAlt(_localctx, 2);
setState(2118);
complementA();
break;
}
case Z80Parser::T__122:
case Z80Parser::T__123: {
enterOuterAlt(_localctx, 3);
setState(2119);
negateA();
break;
}
case Z80Parser::T__124:
case Z80Parser::T__125: {
enterOuterAlt(_localctx, 4);
setState(2120);
complementCarryFlag();
break;
}
case Z80Parser::T__126:
case Z80Parser::T__127: {
enterOuterAlt(_localctx, 5);
setState(2121);
setCarryFlag();
break;
}
case Z80Parser::T__128:
case Z80Parser::T__129: {
enterOuterAlt(_localctx, 6);
setState(2122);
nop();
break;
}
case Z80Parser::T__130:
case Z80Parser::T__131: {
enterOuterAlt(_localctx, 7);
setState(2123);
halt();
break;
}
case Z80Parser::T__132:
case Z80Parser::T__133: {
enterOuterAlt(_localctx, 8);
setState(2124);
disableInterrupts();
break;
}
case Z80Parser::T__134:
case Z80Parser::T__135: {
enterOuterAlt(_localctx, 9);
setState(2125);
enableInterrupts();
break;
}
case Z80Parser::T__136:
case Z80Parser::T__137: {
enterOuterAlt(_localctx, 10);
setState(2126);
setInterruptMode();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddHLAndWordRegisterContext ------------------------------------------------------------------
Z80Parser::AddHLAndWordRegisterContext::AddHLAndWordRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddCommandNameContext* Z80Parser::AddHLAndWordRegisterContext::addCommandName() {
return getRuleContext<Z80Parser::AddCommandNameContext>(0);
}
Z80Parser::HlRegisterContext* Z80Parser::AddHLAndWordRegisterContext::hlRegister() {
return getRuleContext<Z80Parser::HlRegisterContext>(0);
}
Z80Parser::SimpleWordRegisterContext* Z80Parser::AddHLAndWordRegisterContext::simpleWordRegister() {
return getRuleContext<Z80Parser::SimpleWordRegisterContext>(0);
}
size_t Z80Parser::AddHLAndWordRegisterContext::getRuleIndex() const {
return Z80Parser::RuleAddHLAndWordRegister;
}
void Z80Parser::AddHLAndWordRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddHLAndWordRegister(this);
}
void Z80Parser::AddHLAndWordRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddHLAndWordRegister(this);
}
Z80Parser::AddHLAndWordRegisterContext* Z80Parser::addHLAndWordRegister() {
AddHLAndWordRegisterContext *_localctx = _tracker.createInstance<AddHLAndWordRegisterContext>(_ctx, getState());
enterRule(_localctx, 456, Z80Parser::RuleAddHLAndWordRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2129);
addCommandName();
setState(2130);
dynamic_cast<AddHLAndWordRegisterContext *>(_localctx)->dest = hlRegister();
setState(2131);
match(Z80Parser::T__73);
setState(2132);
dynamic_cast<AddHLAndWordRegisterContext *>(_localctx)->source = simpleWordRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddWithCarryHLAndWordRegisterContext ------------------------------------------------------------------
Z80Parser::AddWithCarryHLAndWordRegisterContext::AddWithCarryHLAndWordRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddWithCarryCommandNameContext* Z80Parser::AddWithCarryHLAndWordRegisterContext::addWithCarryCommandName() {
return getRuleContext<Z80Parser::AddWithCarryCommandNameContext>(0);
}
Z80Parser::HlRegisterContext* Z80Parser::AddWithCarryHLAndWordRegisterContext::hlRegister() {
return getRuleContext<Z80Parser::HlRegisterContext>(0);
}
Z80Parser::SimpleWordRegisterContext* Z80Parser::AddWithCarryHLAndWordRegisterContext::simpleWordRegister() {
return getRuleContext<Z80Parser::SimpleWordRegisterContext>(0);
}
size_t Z80Parser::AddWithCarryHLAndWordRegisterContext::getRuleIndex() const {
return Z80Parser::RuleAddWithCarryHLAndWordRegister;
}
void Z80Parser::AddWithCarryHLAndWordRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddWithCarryHLAndWordRegister(this);
}
void Z80Parser::AddWithCarryHLAndWordRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddWithCarryHLAndWordRegister(this);
}
Z80Parser::AddWithCarryHLAndWordRegisterContext* Z80Parser::addWithCarryHLAndWordRegister() {
AddWithCarryHLAndWordRegisterContext *_localctx = _tracker.createInstance<AddWithCarryHLAndWordRegisterContext>(_ctx, getState());
enterRule(_localctx, 458, Z80Parser::RuleAddWithCarryHLAndWordRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2134);
addWithCarryCommandName();
setState(2135);
dynamic_cast<AddWithCarryHLAndWordRegisterContext *>(_localctx)->dest = hlRegister();
setState(2136);
match(Z80Parser::T__73);
setState(2137);
dynamic_cast<AddWithCarryHLAndWordRegisterContext *>(_localctx)->source = simpleWordRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SubtractWithCarryWordRegisterFromHLContext ------------------------------------------------------------------
Z80Parser::SubtractWithCarryWordRegisterFromHLContext::SubtractWithCarryWordRegisterFromHLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SubtractWithBorrowCommandNameContext* Z80Parser::SubtractWithCarryWordRegisterFromHLContext::subtractWithBorrowCommandName() {
return getRuleContext<Z80Parser::SubtractWithBorrowCommandNameContext>(0);
}
Z80Parser::HlRegisterContext* Z80Parser::SubtractWithCarryWordRegisterFromHLContext::hlRegister() {
return getRuleContext<Z80Parser::HlRegisterContext>(0);
}
Z80Parser::SimpleWordRegisterContext* Z80Parser::SubtractWithCarryWordRegisterFromHLContext::simpleWordRegister() {
return getRuleContext<Z80Parser::SimpleWordRegisterContext>(0);
}
size_t Z80Parser::SubtractWithCarryWordRegisterFromHLContext::getRuleIndex() const {
return Z80Parser::RuleSubtractWithCarryWordRegisterFromHL;
}
void Z80Parser::SubtractWithCarryWordRegisterFromHLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSubtractWithCarryWordRegisterFromHL(this);
}
void Z80Parser::SubtractWithCarryWordRegisterFromHLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSubtractWithCarryWordRegisterFromHL(this);
}
Z80Parser::SubtractWithCarryWordRegisterFromHLContext* Z80Parser::subtractWithCarryWordRegisterFromHL() {
SubtractWithCarryWordRegisterFromHLContext *_localctx = _tracker.createInstance<SubtractWithCarryWordRegisterFromHLContext>(_ctx, getState());
enterRule(_localctx, 460, Z80Parser::RuleSubtractWithCarryWordRegisterFromHL);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2139);
subtractWithBorrowCommandName();
setState(2140);
dynamic_cast<SubtractWithCarryWordRegisterFromHLContext *>(_localctx)->dest = hlRegister();
setState(2141);
match(Z80Parser::T__73);
setState(2142);
dynamic_cast<SubtractWithCarryWordRegisterFromHLContext *>(_localctx)->source = simpleWordRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SimpleIXAdditionRegisterContext ------------------------------------------------------------------
Z80Parser::SimpleIXAdditionRegisterContext::SimpleIXAdditionRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::BcRegisterContext* Z80Parser::SimpleIXAdditionRegisterContext::bcRegister() {
return getRuleContext<Z80Parser::BcRegisterContext>(0);
}
Z80Parser::DeRegisterContext* Z80Parser::SimpleIXAdditionRegisterContext::deRegister() {
return getRuleContext<Z80Parser::DeRegisterContext>(0);
}
Z80Parser::IxRegisterContext* Z80Parser::SimpleIXAdditionRegisterContext::ixRegister() {
return getRuleContext<Z80Parser::IxRegisterContext>(0);
}
Z80Parser::SpRegisterContext* Z80Parser::SimpleIXAdditionRegisterContext::spRegister() {
return getRuleContext<Z80Parser::SpRegisterContext>(0);
}
size_t Z80Parser::SimpleIXAdditionRegisterContext::getRuleIndex() const {
return Z80Parser::RuleSimpleIXAdditionRegister;
}
void Z80Parser::SimpleIXAdditionRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSimpleIXAdditionRegister(this);
}
void Z80Parser::SimpleIXAdditionRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSimpleIXAdditionRegister(this);
}
Z80Parser::SimpleIXAdditionRegisterContext* Z80Parser::simpleIXAdditionRegister() {
SimpleIXAdditionRegisterContext *_localctx = _tracker.createInstance<SimpleIXAdditionRegisterContext>(_ctx, getState());
enterRule(_localctx, 462, Z80Parser::RuleSimpleIXAdditionRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(2149);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__24:
case Z80Parser::T__25:
case Z80Parser::T__34:
case Z80Parser::T__35: {
enterOuterAlt(_localctx, 1);
setState(2144);
bcRegister();
break;
}
case Z80Parser::T__26:
case Z80Parser::T__27:
case Z80Parser::T__40:
case Z80Parser::T__41: {
enterOuterAlt(_localctx, 2);
setState(2145);
deRegister();
break;
}
case Z80Parser::T__52:
case Z80Parser::T__53: {
enterOuterAlt(_localctx, 3);
setState(2146);
ixRegister();
break;
}
case Z80Parser::T__64:
case Z80Parser::T__65: {
enterOuterAlt(_localctx, 4);
setState(2147);
spRegister();
break;
}
case Z80Parser::COMMENT:
case Z80Parser::EOL: {
enterOuterAlt(_localctx, 5);
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SimpleIYAdditionRegisterContext ------------------------------------------------------------------
Z80Parser::SimpleIYAdditionRegisterContext::SimpleIYAdditionRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::BcRegisterContext* Z80Parser::SimpleIYAdditionRegisterContext::bcRegister() {
return getRuleContext<Z80Parser::BcRegisterContext>(0);
}
Z80Parser::DeRegisterContext* Z80Parser::SimpleIYAdditionRegisterContext::deRegister() {
return getRuleContext<Z80Parser::DeRegisterContext>(0);
}
Z80Parser::IyRegisterContext* Z80Parser::SimpleIYAdditionRegisterContext::iyRegister() {
return getRuleContext<Z80Parser::IyRegisterContext>(0);
}
Z80Parser::SpRegisterContext* Z80Parser::SimpleIYAdditionRegisterContext::spRegister() {
return getRuleContext<Z80Parser::SpRegisterContext>(0);
}
size_t Z80Parser::SimpleIYAdditionRegisterContext::getRuleIndex() const {
return Z80Parser::RuleSimpleIYAdditionRegister;
}
void Z80Parser::SimpleIYAdditionRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSimpleIYAdditionRegister(this);
}
void Z80Parser::SimpleIYAdditionRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSimpleIYAdditionRegister(this);
}
Z80Parser::SimpleIYAdditionRegisterContext* Z80Parser::simpleIYAdditionRegister() {
SimpleIYAdditionRegisterContext *_localctx = _tracker.createInstance<SimpleIYAdditionRegisterContext>(_ctx, getState());
enterRule(_localctx, 464, Z80Parser::RuleSimpleIYAdditionRegister);
auto onExit = finally([=] {
exitRule();
});
try {
setState(2156);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__24:
case Z80Parser::T__25:
case Z80Parser::T__34:
case Z80Parser::T__35: {
enterOuterAlt(_localctx, 1);
setState(2151);
bcRegister();
break;
}
case Z80Parser::T__26:
case Z80Parser::T__27:
case Z80Parser::T__40:
case Z80Parser::T__41: {
enterOuterAlt(_localctx, 2);
setState(2152);
deRegister();
break;
}
case Z80Parser::T__54:
case Z80Parser::T__55: {
enterOuterAlt(_localctx, 3);
setState(2153);
iyRegister();
break;
}
case Z80Parser::T__64:
case Z80Parser::T__65: {
enterOuterAlt(_localctx, 4);
setState(2154);
spRegister();
break;
}
case Z80Parser::COMMENT:
case Z80Parser::EOL: {
enterOuterAlt(_localctx, 5);
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddIXWithRegisterContext ------------------------------------------------------------------
Z80Parser::AddIXWithRegisterContext::AddIXWithRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddCommandNameContext* Z80Parser::AddIXWithRegisterContext::addCommandName() {
return getRuleContext<Z80Parser::AddCommandNameContext>(0);
}
Z80Parser::IxRegisterContext* Z80Parser::AddIXWithRegisterContext::ixRegister() {
return getRuleContext<Z80Parser::IxRegisterContext>(0);
}
Z80Parser::SimpleIXAdditionRegisterContext* Z80Parser::AddIXWithRegisterContext::simpleIXAdditionRegister() {
return getRuleContext<Z80Parser::SimpleIXAdditionRegisterContext>(0);
}
size_t Z80Parser::AddIXWithRegisterContext::getRuleIndex() const {
return Z80Parser::RuleAddIXWithRegister;
}
void Z80Parser::AddIXWithRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddIXWithRegister(this);
}
void Z80Parser::AddIXWithRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddIXWithRegister(this);
}
Z80Parser::AddIXWithRegisterContext* Z80Parser::addIXWithRegister() {
AddIXWithRegisterContext *_localctx = _tracker.createInstance<AddIXWithRegisterContext>(_ctx, getState());
enterRule(_localctx, 466, Z80Parser::RuleAddIXWithRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2158);
addCommandName();
setState(2159);
dynamic_cast<AddIXWithRegisterContext *>(_localctx)->dest = ixRegister();
setState(2160);
match(Z80Parser::T__73);
setState(2161);
dynamic_cast<AddIXWithRegisterContext *>(_localctx)->source = simpleIXAdditionRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- AddIYWithRegisterContext ------------------------------------------------------------------
Z80Parser::AddIYWithRegisterContext::AddIYWithRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddCommandNameContext* Z80Parser::AddIYWithRegisterContext::addCommandName() {
return getRuleContext<Z80Parser::AddCommandNameContext>(0);
}
Z80Parser::IyRegisterContext* Z80Parser::AddIYWithRegisterContext::iyRegister() {
return getRuleContext<Z80Parser::IyRegisterContext>(0);
}
Z80Parser::SimpleIYAdditionRegisterContext* Z80Parser::AddIYWithRegisterContext::simpleIYAdditionRegister() {
return getRuleContext<Z80Parser::SimpleIYAdditionRegisterContext>(0);
}
size_t Z80Parser::AddIYWithRegisterContext::getRuleIndex() const {
return Z80Parser::RuleAddIYWithRegister;
}
void Z80Parser::AddIYWithRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterAddIYWithRegister(this);
}
void Z80Parser::AddIYWithRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitAddIYWithRegister(this);
}
Z80Parser::AddIYWithRegisterContext* Z80Parser::addIYWithRegister() {
AddIYWithRegisterContext *_localctx = _tracker.createInstance<AddIYWithRegisterContext>(_ctx, getState());
enterRule(_localctx, 468, Z80Parser::RuleAddIYWithRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2163);
addCommandName();
setState(2164);
dynamic_cast<AddIYWithRegisterContext *>(_localctx)->dest = iyRegister();
setState(2165);
match(Z80Parser::T__73);
setState(2166);
dynamic_cast<AddIYWithRegisterContext *>(_localctx)->source = simpleIYAdditionRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IncrementWordRegisterContext ------------------------------------------------------------------
Z80Parser::IncrementWordRegisterContext::IncrementWordRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::IncrementCommandNameContext* Z80Parser::IncrementWordRegisterContext::incrementCommandName() {
return getRuleContext<Z80Parser::IncrementCommandNameContext>(0);
}
Z80Parser::SimpleWordRegisterContext* Z80Parser::IncrementWordRegisterContext::simpleWordRegister() {
return getRuleContext<Z80Parser::SimpleWordRegisterContext>(0);
}
size_t Z80Parser::IncrementWordRegisterContext::getRuleIndex() const {
return Z80Parser::RuleIncrementWordRegister;
}
void Z80Parser::IncrementWordRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIncrementWordRegister(this);
}
void Z80Parser::IncrementWordRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIncrementWordRegister(this);
}
Z80Parser::IncrementWordRegisterContext* Z80Parser::incrementWordRegister() {
IncrementWordRegisterContext *_localctx = _tracker.createInstance<IncrementWordRegisterContext>(_ctx, getState());
enterRule(_localctx, 470, Z80Parser::RuleIncrementWordRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2168);
incrementCommandName();
setState(2169);
dynamic_cast<IncrementWordRegisterContext *>(_localctx)->source = simpleWordRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IncrementIXContext ------------------------------------------------------------------
Z80Parser::IncrementIXContext::IncrementIXContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::IncrementCommandNameContext* Z80Parser::IncrementIXContext::incrementCommandName() {
return getRuleContext<Z80Parser::IncrementCommandNameContext>(0);
}
Z80Parser::IxRegisterContext* Z80Parser::IncrementIXContext::ixRegister() {
return getRuleContext<Z80Parser::IxRegisterContext>(0);
}
size_t Z80Parser::IncrementIXContext::getRuleIndex() const {
return Z80Parser::RuleIncrementIX;
}
void Z80Parser::IncrementIXContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIncrementIX(this);
}
void Z80Parser::IncrementIXContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIncrementIX(this);
}
Z80Parser::IncrementIXContext* Z80Parser::incrementIX() {
IncrementIXContext *_localctx = _tracker.createInstance<IncrementIXContext>(_ctx, getState());
enterRule(_localctx, 472, Z80Parser::RuleIncrementIX);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2171);
incrementCommandName();
setState(2172);
dynamic_cast<IncrementIXContext *>(_localctx)->source = ixRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IncrementIYContext ------------------------------------------------------------------
Z80Parser::IncrementIYContext::IncrementIYContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::IncrementCommandNameContext* Z80Parser::IncrementIYContext::incrementCommandName() {
return getRuleContext<Z80Parser::IncrementCommandNameContext>(0);
}
Z80Parser::IyRegisterContext* Z80Parser::IncrementIYContext::iyRegister() {
return getRuleContext<Z80Parser::IyRegisterContext>(0);
}
size_t Z80Parser::IncrementIYContext::getRuleIndex() const {
return Z80Parser::RuleIncrementIY;
}
void Z80Parser::IncrementIYContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIncrementIY(this);
}
void Z80Parser::IncrementIYContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIncrementIY(this);
}
Z80Parser::IncrementIYContext* Z80Parser::incrementIY() {
IncrementIYContext *_localctx = _tracker.createInstance<IncrementIYContext>(_ctx, getState());
enterRule(_localctx, 474, Z80Parser::RuleIncrementIY);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2174);
incrementCommandName();
setState(2175);
dynamic_cast<IncrementIYContext *>(_localctx)->source = iyRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DecrementWordRegisterContext ------------------------------------------------------------------
Z80Parser::DecrementWordRegisterContext::DecrementWordRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::DecrementCommandNameContext* Z80Parser::DecrementWordRegisterContext::decrementCommandName() {
return getRuleContext<Z80Parser::DecrementCommandNameContext>(0);
}
Z80Parser::SimpleWordRegisterContext* Z80Parser::DecrementWordRegisterContext::simpleWordRegister() {
return getRuleContext<Z80Parser::SimpleWordRegisterContext>(0);
}
size_t Z80Parser::DecrementWordRegisterContext::getRuleIndex() const {
return Z80Parser::RuleDecrementWordRegister;
}
void Z80Parser::DecrementWordRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDecrementWordRegister(this);
}
void Z80Parser::DecrementWordRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDecrementWordRegister(this);
}
Z80Parser::DecrementWordRegisterContext* Z80Parser::decrementWordRegister() {
DecrementWordRegisterContext *_localctx = _tracker.createInstance<DecrementWordRegisterContext>(_ctx, getState());
enterRule(_localctx, 476, Z80Parser::RuleDecrementWordRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2177);
decrementCommandName();
setState(2178);
dynamic_cast<DecrementWordRegisterContext *>(_localctx)->source = simpleWordRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DecrementIXContext ------------------------------------------------------------------
Z80Parser::DecrementIXContext::DecrementIXContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::DecrementCommandNameContext* Z80Parser::DecrementIXContext::decrementCommandName() {
return getRuleContext<Z80Parser::DecrementCommandNameContext>(0);
}
Z80Parser::IxRegisterContext* Z80Parser::DecrementIXContext::ixRegister() {
return getRuleContext<Z80Parser::IxRegisterContext>(0);
}
size_t Z80Parser::DecrementIXContext::getRuleIndex() const {
return Z80Parser::RuleDecrementIX;
}
void Z80Parser::DecrementIXContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDecrementIX(this);
}
void Z80Parser::DecrementIXContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDecrementIX(this);
}
Z80Parser::DecrementIXContext* Z80Parser::decrementIX() {
DecrementIXContext *_localctx = _tracker.createInstance<DecrementIXContext>(_ctx, getState());
enterRule(_localctx, 478, Z80Parser::RuleDecrementIX);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2180);
decrementCommandName();
setState(2181);
dynamic_cast<DecrementIXContext *>(_localctx)->source = ixRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DecrementIYContext ------------------------------------------------------------------
Z80Parser::DecrementIYContext::DecrementIYContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::DecrementCommandNameContext* Z80Parser::DecrementIYContext::decrementCommandName() {
return getRuleContext<Z80Parser::DecrementCommandNameContext>(0);
}
Z80Parser::IyRegisterContext* Z80Parser::DecrementIYContext::iyRegister() {
return getRuleContext<Z80Parser::IyRegisterContext>(0);
}
size_t Z80Parser::DecrementIYContext::getRuleIndex() const {
return Z80Parser::RuleDecrementIY;
}
void Z80Parser::DecrementIYContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDecrementIY(this);
}
void Z80Parser::DecrementIYContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDecrementIY(this);
}
Z80Parser::DecrementIYContext* Z80Parser::decrementIY() {
DecrementIYContext *_localctx = _tracker.createInstance<DecrementIYContext>(_ctx, getState());
enterRule(_localctx, 480, Z80Parser::RuleDecrementIY);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2183);
decrementCommandName();
setState(2184);
dynamic_cast<DecrementIYContext *>(_localctx)->source = iyRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- WordArithemeticCommandContext ------------------------------------------------------------------
Z80Parser::WordArithemeticCommandContext::WordArithemeticCommandContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::AddHLAndWordRegisterContext* Z80Parser::WordArithemeticCommandContext::addHLAndWordRegister() {
return getRuleContext<Z80Parser::AddHLAndWordRegisterContext>(0);
}
Z80Parser::AddWithCarryHLAndWordRegisterContext* Z80Parser::WordArithemeticCommandContext::addWithCarryHLAndWordRegister() {
return getRuleContext<Z80Parser::AddWithCarryHLAndWordRegisterContext>(0);
}
Z80Parser::SubtractWithCarryWordRegisterFromHLContext* Z80Parser::WordArithemeticCommandContext::subtractWithCarryWordRegisterFromHL() {
return getRuleContext<Z80Parser::SubtractWithCarryWordRegisterFromHLContext>(0);
}
Z80Parser::AddIXWithRegisterContext* Z80Parser::WordArithemeticCommandContext::addIXWithRegister() {
return getRuleContext<Z80Parser::AddIXWithRegisterContext>(0);
}
Z80Parser::AddIYWithRegisterContext* Z80Parser::WordArithemeticCommandContext::addIYWithRegister() {
return getRuleContext<Z80Parser::AddIYWithRegisterContext>(0);
}
Z80Parser::IncrementWordRegisterContext* Z80Parser::WordArithemeticCommandContext::incrementWordRegister() {
return getRuleContext<Z80Parser::IncrementWordRegisterContext>(0);
}
Z80Parser::IncrementIXContext* Z80Parser::WordArithemeticCommandContext::incrementIX() {
return getRuleContext<Z80Parser::IncrementIXContext>(0);
}
Z80Parser::IncrementIYContext* Z80Parser::WordArithemeticCommandContext::incrementIY() {
return getRuleContext<Z80Parser::IncrementIYContext>(0);
}
Z80Parser::DecrementWordRegisterContext* Z80Parser::WordArithemeticCommandContext::decrementWordRegister() {
return getRuleContext<Z80Parser::DecrementWordRegisterContext>(0);
}
Z80Parser::DecrementIXContext* Z80Parser::WordArithemeticCommandContext::decrementIX() {
return getRuleContext<Z80Parser::DecrementIXContext>(0);
}
Z80Parser::DecrementIYContext* Z80Parser::WordArithemeticCommandContext::decrementIY() {
return getRuleContext<Z80Parser::DecrementIYContext>(0);
}
size_t Z80Parser::WordArithemeticCommandContext::getRuleIndex() const {
return Z80Parser::RuleWordArithemeticCommand;
}
void Z80Parser::WordArithemeticCommandContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterWordArithemeticCommand(this);
}
void Z80Parser::WordArithemeticCommandContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitWordArithemeticCommand(this);
}
Z80Parser::WordArithemeticCommandContext* Z80Parser::wordArithemeticCommand() {
WordArithemeticCommandContext *_localctx = _tracker.createInstance<WordArithemeticCommandContext>(_ctx, getState());
enterRule(_localctx, 482, Z80Parser::RuleWordArithemeticCommand);
auto onExit = finally([=] {
exitRule();
});
try {
setState(2198);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 100, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(2186);
addHLAndWordRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(2187);
addWithCarryHLAndWordRegister();
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
setState(2188);
subtractWithCarryWordRegisterFromHL();
break;
}
case 4: {
enterOuterAlt(_localctx, 4);
setState(2189);
addIXWithRegister();
break;
}
case 5: {
enterOuterAlt(_localctx, 5);
setState(2190);
addIYWithRegister();
break;
}
case 6: {
enterOuterAlt(_localctx, 6);
setState(2191);
addIYWithRegister();
break;
}
case 7: {
enterOuterAlt(_localctx, 7);
setState(2192);
incrementWordRegister();
break;
}
case 8: {
enterOuterAlt(_localctx, 8);
setState(2193);
incrementIX();
break;
}
case 9: {
enterOuterAlt(_localctx, 9);
setState(2194);
incrementIY();
break;
}
case 10: {
enterOuterAlt(_localctx, 10);
setState(2195);
decrementWordRegister();
break;
}
case 11: {
enterOuterAlt(_localctx, 11);
setState(2196);
decrementIX();
break;
}
case 12: {
enterOuterAlt(_localctx, 12);
setState(2197);
decrementIY();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateLeftCircularAContext ------------------------------------------------------------------
Z80Parser::RotateLeftCircularAContext::RotateLeftCircularAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::RotateLeftCircularAContext::getRuleIndex() const {
return Z80Parser::RuleRotateLeftCircularA;
}
void Z80Parser::RotateLeftCircularAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateLeftCircularA(this);
}
void Z80Parser::RotateLeftCircularAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateLeftCircularA(this);
}
Z80Parser::RotateLeftCircularAContext* Z80Parser::rotateLeftCircularA() {
RotateLeftCircularAContext *_localctx = _tracker.createInstance<RotateLeftCircularAContext>(_ctx, getState());
enterRule(_localctx, 484, Z80Parser::RuleRotateLeftCircularA);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2200);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__138
|| _la == Z80Parser::T__139)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateLeftThroughCarryAContext ------------------------------------------------------------------
Z80Parser::RotateLeftThroughCarryAContext::RotateLeftThroughCarryAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::RotateLeftThroughCarryAContext::getRuleIndex() const {
return Z80Parser::RuleRotateLeftThroughCarryA;
}
void Z80Parser::RotateLeftThroughCarryAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateLeftThroughCarryA(this);
}
void Z80Parser::RotateLeftThroughCarryAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateLeftThroughCarryA(this);
}
Z80Parser::RotateLeftThroughCarryAContext* Z80Parser::rotateLeftThroughCarryA() {
RotateLeftThroughCarryAContext *_localctx = _tracker.createInstance<RotateLeftThroughCarryAContext>(_ctx, getState());
enterRule(_localctx, 486, Z80Parser::RuleRotateLeftThroughCarryA);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2202);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__140
|| _la == Z80Parser::T__141)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateRightCircularAContext ------------------------------------------------------------------
Z80Parser::RotateRightCircularAContext::RotateRightCircularAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::RotateRightCircularAContext::getRuleIndex() const {
return Z80Parser::RuleRotateRightCircularA;
}
void Z80Parser::RotateRightCircularAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateRightCircularA(this);
}
void Z80Parser::RotateRightCircularAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateRightCircularA(this);
}
Z80Parser::RotateRightCircularAContext* Z80Parser::rotateRightCircularA() {
RotateRightCircularAContext *_localctx = _tracker.createInstance<RotateRightCircularAContext>(_ctx, getState());
enterRule(_localctx, 488, Z80Parser::RuleRotateRightCircularA);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2204);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__142
|| _la == Z80Parser::T__143)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateRightThroughCarryAContext ------------------------------------------------------------------
Z80Parser::RotateRightThroughCarryAContext::RotateRightThroughCarryAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::RotateRightThroughCarryAContext::getRuleIndex() const {
return Z80Parser::RuleRotateRightThroughCarryA;
}
void Z80Parser::RotateRightThroughCarryAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateRightThroughCarryA(this);
}
void Z80Parser::RotateRightThroughCarryAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateRightThroughCarryA(this);
}
Z80Parser::RotateRightThroughCarryAContext* Z80Parser::rotateRightThroughCarryA() {
RotateRightThroughCarryAContext *_localctx = _tracker.createInstance<RotateRightThroughCarryAContext>(_ctx, getState());
enterRule(_localctx, 490, Z80Parser::RuleRotateRightThroughCarryA);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2206);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__144
|| _la == Z80Parser::T__145)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateLeftCircularCommandNameContext ------------------------------------------------------------------
Z80Parser::RotateLeftCircularCommandNameContext::RotateLeftCircularCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::RotateLeftCircularCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleRotateLeftCircularCommandName;
}
void Z80Parser::RotateLeftCircularCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateLeftCircularCommandName(this);
}
void Z80Parser::RotateLeftCircularCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateLeftCircularCommandName(this);
}
Z80Parser::RotateLeftCircularCommandNameContext* Z80Parser::rotateLeftCircularCommandName() {
RotateLeftCircularCommandNameContext *_localctx = _tracker.createInstance<RotateLeftCircularCommandNameContext>(_ctx, getState());
enterRule(_localctx, 492, Z80Parser::RuleRotateLeftCircularCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2208);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__146
|| _la == Z80Parser::T__147)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateLeftThroughCarryCommandNameContext ------------------------------------------------------------------
Z80Parser::RotateLeftThroughCarryCommandNameContext::RotateLeftThroughCarryCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::RotateLeftThroughCarryCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleRotateLeftThroughCarryCommandName;
}
void Z80Parser::RotateLeftThroughCarryCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateLeftThroughCarryCommandName(this);
}
void Z80Parser::RotateLeftThroughCarryCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateLeftThroughCarryCommandName(this);
}
Z80Parser::RotateLeftThroughCarryCommandNameContext* Z80Parser::rotateLeftThroughCarryCommandName() {
RotateLeftThroughCarryCommandNameContext *_localctx = _tracker.createInstance<RotateLeftThroughCarryCommandNameContext>(_ctx, getState());
enterRule(_localctx, 494, Z80Parser::RuleRotateLeftThroughCarryCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2210);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__148
|| _la == Z80Parser::T__149)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateRightCircularCommandNameContext ------------------------------------------------------------------
Z80Parser::RotateRightCircularCommandNameContext::RotateRightCircularCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::RotateRightCircularCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleRotateRightCircularCommandName;
}
void Z80Parser::RotateRightCircularCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateRightCircularCommandName(this);
}
void Z80Parser::RotateRightCircularCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateRightCircularCommandName(this);
}
Z80Parser::RotateRightCircularCommandNameContext* Z80Parser::rotateRightCircularCommandName() {
RotateRightCircularCommandNameContext *_localctx = _tracker.createInstance<RotateRightCircularCommandNameContext>(_ctx, getState());
enterRule(_localctx, 496, Z80Parser::RuleRotateRightCircularCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2212);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__150
|| _la == Z80Parser::T__151)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateRightThroughCarryCommandNameContext ------------------------------------------------------------------
Z80Parser::RotateRightThroughCarryCommandNameContext::RotateRightThroughCarryCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::RotateRightThroughCarryCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleRotateRightThroughCarryCommandName;
}
void Z80Parser::RotateRightThroughCarryCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateRightThroughCarryCommandName(this);
}
void Z80Parser::RotateRightThroughCarryCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateRightThroughCarryCommandName(this);
}
Z80Parser::RotateRightThroughCarryCommandNameContext* Z80Parser::rotateRightThroughCarryCommandName() {
RotateRightThroughCarryCommandNameContext *_localctx = _tracker.createInstance<RotateRightThroughCarryCommandNameContext>(_ctx, getState());
enterRule(_localctx, 498, Z80Parser::RuleRotateRightThroughCarryCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2214);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__152
|| _la == Z80Parser::T__153)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ShiftLeftArithmeticCommandNameContext ------------------------------------------------------------------
Z80Parser::ShiftLeftArithmeticCommandNameContext::ShiftLeftArithmeticCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::ShiftLeftArithmeticCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleShiftLeftArithmeticCommandName;
}
void Z80Parser::ShiftLeftArithmeticCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterShiftLeftArithmeticCommandName(this);
}
void Z80Parser::ShiftLeftArithmeticCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitShiftLeftArithmeticCommandName(this);
}
Z80Parser::ShiftLeftArithmeticCommandNameContext* Z80Parser::shiftLeftArithmeticCommandName() {
ShiftLeftArithmeticCommandNameContext *_localctx = _tracker.createInstance<ShiftLeftArithmeticCommandNameContext>(_ctx, getState());
enterRule(_localctx, 500, Z80Parser::RuleShiftLeftArithmeticCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2216);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__154
|| _la == Z80Parser::T__155)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ShiftLeftLogicalCommandNameContext ------------------------------------------------------------------
Z80Parser::ShiftLeftLogicalCommandNameContext::ShiftLeftLogicalCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::ShiftLeftLogicalCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleShiftLeftLogicalCommandName;
}
void Z80Parser::ShiftLeftLogicalCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterShiftLeftLogicalCommandName(this);
}
void Z80Parser::ShiftLeftLogicalCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitShiftLeftLogicalCommandName(this);
}
Z80Parser::ShiftLeftLogicalCommandNameContext* Z80Parser::shiftLeftLogicalCommandName() {
ShiftLeftLogicalCommandNameContext *_localctx = _tracker.createInstance<ShiftLeftLogicalCommandNameContext>(_ctx, getState());
enterRule(_localctx, 502, Z80Parser::RuleShiftLeftLogicalCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2218);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__156
|| _la == Z80Parser::T__157)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ShiftRightArithmeticCommandNameContext ------------------------------------------------------------------
Z80Parser::ShiftRightArithmeticCommandNameContext::ShiftRightArithmeticCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::ShiftRightArithmeticCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleShiftRightArithmeticCommandName;
}
void Z80Parser::ShiftRightArithmeticCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterShiftRightArithmeticCommandName(this);
}
void Z80Parser::ShiftRightArithmeticCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitShiftRightArithmeticCommandName(this);
}
Z80Parser::ShiftRightArithmeticCommandNameContext* Z80Parser::shiftRightArithmeticCommandName() {
ShiftRightArithmeticCommandNameContext *_localctx = _tracker.createInstance<ShiftRightArithmeticCommandNameContext>(_ctx, getState());
enterRule(_localctx, 504, Z80Parser::RuleShiftRightArithmeticCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2220);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__158
|| _la == Z80Parser::T__159)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ShiftRightLogicalCommandNameContext ------------------------------------------------------------------
Z80Parser::ShiftRightLogicalCommandNameContext::ShiftRightLogicalCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::ShiftRightLogicalCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleShiftRightLogicalCommandName;
}
void Z80Parser::ShiftRightLogicalCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterShiftRightLogicalCommandName(this);
}
void Z80Parser::ShiftRightLogicalCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitShiftRightLogicalCommandName(this);
}
Z80Parser::ShiftRightLogicalCommandNameContext* Z80Parser::shiftRightLogicalCommandName() {
ShiftRightLogicalCommandNameContext *_localctx = _tracker.createInstance<ShiftRightLogicalCommandNameContext>(_ctx, getState());
enterRule(_localctx, 506, Z80Parser::RuleShiftRightLogicalCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2222);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__160
|| _la == Z80Parser::T__161)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateDigitLeftCommandNameContext ------------------------------------------------------------------
Z80Parser::RotateDigitLeftCommandNameContext::RotateDigitLeftCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::RotateDigitLeftCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleRotateDigitLeftCommandName;
}
void Z80Parser::RotateDigitLeftCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateDigitLeftCommandName(this);
}
void Z80Parser::RotateDigitLeftCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateDigitLeftCommandName(this);
}
Z80Parser::RotateDigitLeftCommandNameContext* Z80Parser::rotateDigitLeftCommandName() {
RotateDigitLeftCommandNameContext *_localctx = _tracker.createInstance<RotateDigitLeftCommandNameContext>(_ctx, getState());
enterRule(_localctx, 508, Z80Parser::RuleRotateDigitLeftCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2224);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__162
|| _la == Z80Parser::T__163)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateDigitRightCommandNameContext ------------------------------------------------------------------
Z80Parser::RotateDigitRightCommandNameContext::RotateDigitRightCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::RotateDigitRightCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleRotateDigitRightCommandName;
}
void Z80Parser::RotateDigitRightCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateDigitRightCommandName(this);
}
void Z80Parser::RotateDigitRightCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateDigitRightCommandName(this);
}
Z80Parser::RotateDigitRightCommandNameContext* Z80Parser::rotateDigitRightCommandName() {
RotateDigitRightCommandNameContext *_localctx = _tracker.createInstance<RotateDigitRightCommandNameContext>(_ctx, getState());
enterRule(_localctx, 510, Z80Parser::RuleRotateDigitRightCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2226);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__164
|| _la == Z80Parser::T__165)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateLeftCircularRegisterContext ------------------------------------------------------------------
Z80Parser::RotateLeftCircularRegisterContext::RotateLeftCircularRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateLeftCircularCommandNameContext* Z80Parser::RotateLeftCircularRegisterContext::rotateLeftCircularCommandName() {
return getRuleContext<Z80Parser::RotateLeftCircularCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::RotateLeftCircularRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::RotateLeftCircularRegisterContext::getRuleIndex() const {
return Z80Parser::RuleRotateLeftCircularRegister;
}
void Z80Parser::RotateLeftCircularRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateLeftCircularRegister(this);
}
void Z80Parser::RotateLeftCircularRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateLeftCircularRegister(this);
}
Z80Parser::RotateLeftCircularRegisterContext* Z80Parser::rotateLeftCircularRegister() {
RotateLeftCircularRegisterContext *_localctx = _tracker.createInstance<RotateLeftCircularRegisterContext>(_ctx, getState());
enterRule(_localctx, 512, Z80Parser::RuleRotateLeftCircularRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2228);
rotateLeftCircularCommandName();
setState(2229);
dynamic_cast<RotateLeftCircularRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateLeftCircularHLPointerContext ------------------------------------------------------------------
Z80Parser::RotateLeftCircularHLPointerContext::RotateLeftCircularHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateLeftCircularCommandNameContext* Z80Parser::RotateLeftCircularHLPointerContext::rotateLeftCircularCommandName() {
return getRuleContext<Z80Parser::RotateLeftCircularCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::RotateLeftCircularHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
size_t Z80Parser::RotateLeftCircularHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleRotateLeftCircularHLPointer;
}
void Z80Parser::RotateLeftCircularHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateLeftCircularHLPointer(this);
}
void Z80Parser::RotateLeftCircularHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateLeftCircularHLPointer(this);
}
Z80Parser::RotateLeftCircularHLPointerContext* Z80Parser::rotateLeftCircularHLPointer() {
RotateLeftCircularHLPointerContext *_localctx = _tracker.createInstance<RotateLeftCircularHLPointerContext>(_ctx, getState());
enterRule(_localctx, 514, Z80Parser::RuleRotateLeftCircularHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2231);
rotateLeftCircularCommandName();
setState(2232);
dynamic_cast<RotateLeftCircularHLPointerContext *>(_localctx)->source = hlPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateLeftCircularIXOffsetContext ------------------------------------------------------------------
Z80Parser::RotateLeftCircularIXOffsetContext::RotateLeftCircularIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateLeftCircularCommandNameContext* Z80Parser::RotateLeftCircularIXOffsetContext::rotateLeftCircularCommandName() {
return getRuleContext<Z80Parser::RotateLeftCircularCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::RotateLeftCircularIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
size_t Z80Parser::RotateLeftCircularIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleRotateLeftCircularIXOffset;
}
void Z80Parser::RotateLeftCircularIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateLeftCircularIXOffset(this);
}
void Z80Parser::RotateLeftCircularIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateLeftCircularIXOffset(this);
}
Z80Parser::RotateLeftCircularIXOffsetContext* Z80Parser::rotateLeftCircularIXOffset() {
RotateLeftCircularIXOffsetContext *_localctx = _tracker.createInstance<RotateLeftCircularIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 516, Z80Parser::RuleRotateLeftCircularIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2234);
rotateLeftCircularCommandName();
setState(2235);
dynamic_cast<RotateLeftCircularIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateLeftCircularIYOffsetContext ------------------------------------------------------------------
Z80Parser::RotateLeftCircularIYOffsetContext::RotateLeftCircularIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateLeftCircularCommandNameContext* Z80Parser::RotateLeftCircularIYOffsetContext::rotateLeftCircularCommandName() {
return getRuleContext<Z80Parser::RotateLeftCircularCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::RotateLeftCircularIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
size_t Z80Parser::RotateLeftCircularIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleRotateLeftCircularIYOffset;
}
void Z80Parser::RotateLeftCircularIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateLeftCircularIYOffset(this);
}
void Z80Parser::RotateLeftCircularIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateLeftCircularIYOffset(this);
}
Z80Parser::RotateLeftCircularIYOffsetContext* Z80Parser::rotateLeftCircularIYOffset() {
RotateLeftCircularIYOffsetContext *_localctx = _tracker.createInstance<RotateLeftCircularIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 518, Z80Parser::RuleRotateLeftCircularIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2237);
rotateLeftCircularCommandName();
setState(2238);
dynamic_cast<RotateLeftCircularIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateLeftThroughCarryRegisterContext ------------------------------------------------------------------
Z80Parser::RotateLeftThroughCarryRegisterContext::RotateLeftThroughCarryRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateLeftThroughCarryCommandNameContext* Z80Parser::RotateLeftThroughCarryRegisterContext::rotateLeftThroughCarryCommandName() {
return getRuleContext<Z80Parser::RotateLeftThroughCarryCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::RotateLeftThroughCarryRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::RotateLeftThroughCarryRegisterContext::getRuleIndex() const {
return Z80Parser::RuleRotateLeftThroughCarryRegister;
}
void Z80Parser::RotateLeftThroughCarryRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateLeftThroughCarryRegister(this);
}
void Z80Parser::RotateLeftThroughCarryRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateLeftThroughCarryRegister(this);
}
Z80Parser::RotateLeftThroughCarryRegisterContext* Z80Parser::rotateLeftThroughCarryRegister() {
RotateLeftThroughCarryRegisterContext *_localctx = _tracker.createInstance<RotateLeftThroughCarryRegisterContext>(_ctx, getState());
enterRule(_localctx, 520, Z80Parser::RuleRotateLeftThroughCarryRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2240);
rotateLeftThroughCarryCommandName();
setState(2241);
dynamic_cast<RotateLeftThroughCarryRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateLeftThroughCarryHLPointerContext ------------------------------------------------------------------
Z80Parser::RotateLeftThroughCarryHLPointerContext::RotateLeftThroughCarryHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateLeftThroughCarryCommandNameContext* Z80Parser::RotateLeftThroughCarryHLPointerContext::rotateLeftThroughCarryCommandName() {
return getRuleContext<Z80Parser::RotateLeftThroughCarryCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::RotateLeftThroughCarryHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
size_t Z80Parser::RotateLeftThroughCarryHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleRotateLeftThroughCarryHLPointer;
}
void Z80Parser::RotateLeftThroughCarryHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateLeftThroughCarryHLPointer(this);
}
void Z80Parser::RotateLeftThroughCarryHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateLeftThroughCarryHLPointer(this);
}
Z80Parser::RotateLeftThroughCarryHLPointerContext* Z80Parser::rotateLeftThroughCarryHLPointer() {
RotateLeftThroughCarryHLPointerContext *_localctx = _tracker.createInstance<RotateLeftThroughCarryHLPointerContext>(_ctx, getState());
enterRule(_localctx, 522, Z80Parser::RuleRotateLeftThroughCarryHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2243);
rotateLeftThroughCarryCommandName();
setState(2244);
dynamic_cast<RotateLeftThroughCarryHLPointerContext *>(_localctx)->source = hlPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateLeftThroughCarryIXOffsetContext ------------------------------------------------------------------
Z80Parser::RotateLeftThroughCarryIXOffsetContext::RotateLeftThroughCarryIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateLeftThroughCarryCommandNameContext* Z80Parser::RotateLeftThroughCarryIXOffsetContext::rotateLeftThroughCarryCommandName() {
return getRuleContext<Z80Parser::RotateLeftThroughCarryCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::RotateLeftThroughCarryIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
size_t Z80Parser::RotateLeftThroughCarryIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleRotateLeftThroughCarryIXOffset;
}
void Z80Parser::RotateLeftThroughCarryIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateLeftThroughCarryIXOffset(this);
}
void Z80Parser::RotateLeftThroughCarryIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateLeftThroughCarryIXOffset(this);
}
Z80Parser::RotateLeftThroughCarryIXOffsetContext* Z80Parser::rotateLeftThroughCarryIXOffset() {
RotateLeftThroughCarryIXOffsetContext *_localctx = _tracker.createInstance<RotateLeftThroughCarryIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 524, Z80Parser::RuleRotateLeftThroughCarryIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2246);
rotateLeftThroughCarryCommandName();
setState(2247);
dynamic_cast<RotateLeftThroughCarryIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateLeftThroughCarryIYOffsetContext ------------------------------------------------------------------
Z80Parser::RotateLeftThroughCarryIYOffsetContext::RotateLeftThroughCarryIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateLeftThroughCarryCommandNameContext* Z80Parser::RotateLeftThroughCarryIYOffsetContext::rotateLeftThroughCarryCommandName() {
return getRuleContext<Z80Parser::RotateLeftThroughCarryCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::RotateLeftThroughCarryIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
size_t Z80Parser::RotateLeftThroughCarryIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleRotateLeftThroughCarryIYOffset;
}
void Z80Parser::RotateLeftThroughCarryIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateLeftThroughCarryIYOffset(this);
}
void Z80Parser::RotateLeftThroughCarryIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateLeftThroughCarryIYOffset(this);
}
Z80Parser::RotateLeftThroughCarryIYOffsetContext* Z80Parser::rotateLeftThroughCarryIYOffset() {
RotateLeftThroughCarryIYOffsetContext *_localctx = _tracker.createInstance<RotateLeftThroughCarryIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 526, Z80Parser::RuleRotateLeftThroughCarryIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2249);
rotateLeftThroughCarryCommandName();
setState(2250);
dynamic_cast<RotateLeftThroughCarryIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateRightCircularRegisterContext ------------------------------------------------------------------
Z80Parser::RotateRightCircularRegisterContext::RotateRightCircularRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateRightCircularCommandNameContext* Z80Parser::RotateRightCircularRegisterContext::rotateRightCircularCommandName() {
return getRuleContext<Z80Parser::RotateRightCircularCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::RotateRightCircularRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::RotateRightCircularRegisterContext::getRuleIndex() const {
return Z80Parser::RuleRotateRightCircularRegister;
}
void Z80Parser::RotateRightCircularRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateRightCircularRegister(this);
}
void Z80Parser::RotateRightCircularRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateRightCircularRegister(this);
}
Z80Parser::RotateRightCircularRegisterContext* Z80Parser::rotateRightCircularRegister() {
RotateRightCircularRegisterContext *_localctx = _tracker.createInstance<RotateRightCircularRegisterContext>(_ctx, getState());
enterRule(_localctx, 528, Z80Parser::RuleRotateRightCircularRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2252);
rotateRightCircularCommandName();
setState(2253);
dynamic_cast<RotateRightCircularRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateRightCircularHLPointerContext ------------------------------------------------------------------
Z80Parser::RotateRightCircularHLPointerContext::RotateRightCircularHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateRightCircularCommandNameContext* Z80Parser::RotateRightCircularHLPointerContext::rotateRightCircularCommandName() {
return getRuleContext<Z80Parser::RotateRightCircularCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::RotateRightCircularHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
size_t Z80Parser::RotateRightCircularHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleRotateRightCircularHLPointer;
}
void Z80Parser::RotateRightCircularHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateRightCircularHLPointer(this);
}
void Z80Parser::RotateRightCircularHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateRightCircularHLPointer(this);
}
Z80Parser::RotateRightCircularHLPointerContext* Z80Parser::rotateRightCircularHLPointer() {
RotateRightCircularHLPointerContext *_localctx = _tracker.createInstance<RotateRightCircularHLPointerContext>(_ctx, getState());
enterRule(_localctx, 530, Z80Parser::RuleRotateRightCircularHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2255);
rotateRightCircularCommandName();
setState(2256);
dynamic_cast<RotateRightCircularHLPointerContext *>(_localctx)->source = hlPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateRightCircularIXOffsetContext ------------------------------------------------------------------
Z80Parser::RotateRightCircularIXOffsetContext::RotateRightCircularIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateRightCircularCommandNameContext* Z80Parser::RotateRightCircularIXOffsetContext::rotateRightCircularCommandName() {
return getRuleContext<Z80Parser::RotateRightCircularCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::RotateRightCircularIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
size_t Z80Parser::RotateRightCircularIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleRotateRightCircularIXOffset;
}
void Z80Parser::RotateRightCircularIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateRightCircularIXOffset(this);
}
void Z80Parser::RotateRightCircularIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateRightCircularIXOffset(this);
}
Z80Parser::RotateRightCircularIXOffsetContext* Z80Parser::rotateRightCircularIXOffset() {
RotateRightCircularIXOffsetContext *_localctx = _tracker.createInstance<RotateRightCircularIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 532, Z80Parser::RuleRotateRightCircularIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2258);
rotateRightCircularCommandName();
setState(2259);
dynamic_cast<RotateRightCircularIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateRightCircularIYOffsetContext ------------------------------------------------------------------
Z80Parser::RotateRightCircularIYOffsetContext::RotateRightCircularIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateRightCircularCommandNameContext* Z80Parser::RotateRightCircularIYOffsetContext::rotateRightCircularCommandName() {
return getRuleContext<Z80Parser::RotateRightCircularCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::RotateRightCircularIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
size_t Z80Parser::RotateRightCircularIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleRotateRightCircularIYOffset;
}
void Z80Parser::RotateRightCircularIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateRightCircularIYOffset(this);
}
void Z80Parser::RotateRightCircularIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateRightCircularIYOffset(this);
}
Z80Parser::RotateRightCircularIYOffsetContext* Z80Parser::rotateRightCircularIYOffset() {
RotateRightCircularIYOffsetContext *_localctx = _tracker.createInstance<RotateRightCircularIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 534, Z80Parser::RuleRotateRightCircularIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2261);
rotateRightCircularCommandName();
setState(2262);
dynamic_cast<RotateRightCircularIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateRightThroughCarryRegisterContext ------------------------------------------------------------------
Z80Parser::RotateRightThroughCarryRegisterContext::RotateRightThroughCarryRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateRightThroughCarryCommandNameContext* Z80Parser::RotateRightThroughCarryRegisterContext::rotateRightThroughCarryCommandName() {
return getRuleContext<Z80Parser::RotateRightThroughCarryCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::RotateRightThroughCarryRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::RotateRightThroughCarryRegisterContext::getRuleIndex() const {
return Z80Parser::RuleRotateRightThroughCarryRegister;
}
void Z80Parser::RotateRightThroughCarryRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateRightThroughCarryRegister(this);
}
void Z80Parser::RotateRightThroughCarryRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateRightThroughCarryRegister(this);
}
Z80Parser::RotateRightThroughCarryRegisterContext* Z80Parser::rotateRightThroughCarryRegister() {
RotateRightThroughCarryRegisterContext *_localctx = _tracker.createInstance<RotateRightThroughCarryRegisterContext>(_ctx, getState());
enterRule(_localctx, 536, Z80Parser::RuleRotateRightThroughCarryRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2264);
rotateRightThroughCarryCommandName();
setState(2265);
dynamic_cast<RotateRightThroughCarryRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateRightThroughCarryHLPointerContext ------------------------------------------------------------------
Z80Parser::RotateRightThroughCarryHLPointerContext::RotateRightThroughCarryHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateRightThroughCarryCommandNameContext* Z80Parser::RotateRightThroughCarryHLPointerContext::rotateRightThroughCarryCommandName() {
return getRuleContext<Z80Parser::RotateRightThroughCarryCommandNameContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::RotateRightThroughCarryHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
size_t Z80Parser::RotateRightThroughCarryHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleRotateRightThroughCarryHLPointer;
}
void Z80Parser::RotateRightThroughCarryHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateRightThroughCarryHLPointer(this);
}
void Z80Parser::RotateRightThroughCarryHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateRightThroughCarryHLPointer(this);
}
Z80Parser::RotateRightThroughCarryHLPointerContext* Z80Parser::rotateRightThroughCarryHLPointer() {
RotateRightThroughCarryHLPointerContext *_localctx = _tracker.createInstance<RotateRightThroughCarryHLPointerContext>(_ctx, getState());
enterRule(_localctx, 538, Z80Parser::RuleRotateRightThroughCarryHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2267);
rotateRightThroughCarryCommandName();
setState(2268);
dynamic_cast<RotateRightThroughCarryHLPointerContext *>(_localctx)->source = hlPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateRightThroughCarryIXOffsetContext ------------------------------------------------------------------
Z80Parser::RotateRightThroughCarryIXOffsetContext::RotateRightThroughCarryIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateRightThroughCarryCommandNameContext* Z80Parser::RotateRightThroughCarryIXOffsetContext::rotateRightThroughCarryCommandName() {
return getRuleContext<Z80Parser::RotateRightThroughCarryCommandNameContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::RotateRightThroughCarryIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
size_t Z80Parser::RotateRightThroughCarryIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleRotateRightThroughCarryIXOffset;
}
void Z80Parser::RotateRightThroughCarryIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateRightThroughCarryIXOffset(this);
}
void Z80Parser::RotateRightThroughCarryIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateRightThroughCarryIXOffset(this);
}
Z80Parser::RotateRightThroughCarryIXOffsetContext* Z80Parser::rotateRightThroughCarryIXOffset() {
RotateRightThroughCarryIXOffsetContext *_localctx = _tracker.createInstance<RotateRightThroughCarryIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 540, Z80Parser::RuleRotateRightThroughCarryIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2270);
rotateRightThroughCarryCommandName();
setState(2271);
dynamic_cast<RotateRightThroughCarryIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateRightThroughCarryIYOffsetContext ------------------------------------------------------------------
Z80Parser::RotateRightThroughCarryIYOffsetContext::RotateRightThroughCarryIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateRightThroughCarryCommandNameContext* Z80Parser::RotateRightThroughCarryIYOffsetContext::rotateRightThroughCarryCommandName() {
return getRuleContext<Z80Parser::RotateRightThroughCarryCommandNameContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::RotateRightThroughCarryIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
size_t Z80Parser::RotateRightThroughCarryIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleRotateRightThroughCarryIYOffset;
}
void Z80Parser::RotateRightThroughCarryIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateRightThroughCarryIYOffset(this);
}
void Z80Parser::RotateRightThroughCarryIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateRightThroughCarryIYOffset(this);
}
Z80Parser::RotateRightThroughCarryIYOffsetContext* Z80Parser::rotateRightThroughCarryIYOffset() {
RotateRightThroughCarryIYOffsetContext *_localctx = _tracker.createInstance<RotateRightThroughCarryIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 542, Z80Parser::RuleRotateRightThroughCarryIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2273);
rotateRightThroughCarryCommandName();
setState(2274);
dynamic_cast<RotateRightThroughCarryIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ShiftLeftArithmeticContext ------------------------------------------------------------------
Z80Parser::ShiftLeftArithmeticContext::ShiftLeftArithmeticContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ShiftLeftArithmeticCommandNameContext* Z80Parser::ShiftLeftArithmeticContext::shiftLeftArithmeticCommandName() {
return getRuleContext<Z80Parser::ShiftLeftArithmeticCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::ShiftLeftArithmeticContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::ShiftLeftArithmeticContext::getRuleIndex() const {
return Z80Parser::RuleShiftLeftArithmetic;
}
void Z80Parser::ShiftLeftArithmeticContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterShiftLeftArithmetic(this);
}
void Z80Parser::ShiftLeftArithmeticContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitShiftLeftArithmetic(this);
}
Z80Parser::ShiftLeftArithmeticContext* Z80Parser::shiftLeftArithmetic() {
ShiftLeftArithmeticContext *_localctx = _tracker.createInstance<ShiftLeftArithmeticContext>(_ctx, getState());
enterRule(_localctx, 544, Z80Parser::RuleShiftLeftArithmetic);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2276);
shiftLeftArithmeticCommandName();
setState(2277);
dynamic_cast<ShiftLeftArithmeticContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ShiftLeftLogicalContext ------------------------------------------------------------------
Z80Parser::ShiftLeftLogicalContext::ShiftLeftLogicalContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ShiftLeftLogicalCommandNameContext* Z80Parser::ShiftLeftLogicalContext::shiftLeftLogicalCommandName() {
return getRuleContext<Z80Parser::ShiftLeftLogicalCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::ShiftLeftLogicalContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::ShiftLeftLogicalContext::getRuleIndex() const {
return Z80Parser::RuleShiftLeftLogical;
}
void Z80Parser::ShiftLeftLogicalContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterShiftLeftLogical(this);
}
void Z80Parser::ShiftLeftLogicalContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitShiftLeftLogical(this);
}
Z80Parser::ShiftLeftLogicalContext* Z80Parser::shiftLeftLogical() {
ShiftLeftLogicalContext *_localctx = _tracker.createInstance<ShiftLeftLogicalContext>(_ctx, getState());
enterRule(_localctx, 546, Z80Parser::RuleShiftLeftLogical);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2279);
shiftLeftLogicalCommandName();
setState(2280);
dynamic_cast<ShiftLeftLogicalContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ShiftRightArithmeticContext ------------------------------------------------------------------
Z80Parser::ShiftRightArithmeticContext::ShiftRightArithmeticContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ShiftRightArithmeticCommandNameContext* Z80Parser::ShiftRightArithmeticContext::shiftRightArithmeticCommandName() {
return getRuleContext<Z80Parser::ShiftRightArithmeticCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::ShiftRightArithmeticContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::ShiftRightArithmeticContext::getRuleIndex() const {
return Z80Parser::RuleShiftRightArithmetic;
}
void Z80Parser::ShiftRightArithmeticContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterShiftRightArithmetic(this);
}
void Z80Parser::ShiftRightArithmeticContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitShiftRightArithmetic(this);
}
Z80Parser::ShiftRightArithmeticContext* Z80Parser::shiftRightArithmetic() {
ShiftRightArithmeticContext *_localctx = _tracker.createInstance<ShiftRightArithmeticContext>(_ctx, getState());
enterRule(_localctx, 548, Z80Parser::RuleShiftRightArithmetic);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2282);
shiftRightArithmeticCommandName();
setState(2283);
dynamic_cast<ShiftRightArithmeticContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ShiftRightLogicalContext ------------------------------------------------------------------
Z80Parser::ShiftRightLogicalContext::ShiftRightLogicalContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ShiftRightLogicalCommandNameContext* Z80Parser::ShiftRightLogicalContext::shiftRightLogicalCommandName() {
return getRuleContext<Z80Parser::ShiftRightLogicalCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::ShiftRightLogicalContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::ShiftRightLogicalContext::getRuleIndex() const {
return Z80Parser::RuleShiftRightLogical;
}
void Z80Parser::ShiftRightLogicalContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterShiftRightLogical(this);
}
void Z80Parser::ShiftRightLogicalContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitShiftRightLogical(this);
}
Z80Parser::ShiftRightLogicalContext* Z80Parser::shiftRightLogical() {
ShiftRightLogicalContext *_localctx = _tracker.createInstance<ShiftRightLogicalContext>(_ctx, getState());
enterRule(_localctx, 550, Z80Parser::RuleShiftRightLogical);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2285);
shiftRightLogicalCommandName();
setState(2286);
dynamic_cast<ShiftRightLogicalContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateDigitLeftContext ------------------------------------------------------------------
Z80Parser::RotateDigitLeftContext::RotateDigitLeftContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateDigitLeftCommandNameContext* Z80Parser::RotateDigitLeftContext::rotateDigitLeftCommandName() {
return getRuleContext<Z80Parser::RotateDigitLeftCommandNameContext>(0);
}
size_t Z80Parser::RotateDigitLeftContext::getRuleIndex() const {
return Z80Parser::RuleRotateDigitLeft;
}
void Z80Parser::RotateDigitLeftContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateDigitLeft(this);
}
void Z80Parser::RotateDigitLeftContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateDigitLeft(this);
}
Z80Parser::RotateDigitLeftContext* Z80Parser::rotateDigitLeft() {
RotateDigitLeftContext *_localctx = _tracker.createInstance<RotateDigitLeftContext>(_ctx, getState());
enterRule(_localctx, 552, Z80Parser::RuleRotateDigitLeft);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2288);
rotateDigitLeftCommandName();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateDigitRightContext ------------------------------------------------------------------
Z80Parser::RotateDigitRightContext::RotateDigitRightContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateDigitRightCommandNameContext* Z80Parser::RotateDigitRightContext::rotateDigitRightCommandName() {
return getRuleContext<Z80Parser::RotateDigitRightCommandNameContext>(0);
}
size_t Z80Parser::RotateDigitRightContext::getRuleIndex() const {
return Z80Parser::RuleRotateDigitRight;
}
void Z80Parser::RotateDigitRightContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateDigitRight(this);
}
void Z80Parser::RotateDigitRightContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateDigitRight(this);
}
Z80Parser::RotateDigitRightContext* Z80Parser::rotateDigitRight() {
RotateDigitRightContext *_localctx = _tracker.createInstance<RotateDigitRightContext>(_ctx, getState());
enterRule(_localctx, 554, Z80Parser::RuleRotateDigitRight);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2290);
rotateDigitRightCommandName();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RotateCommandContext ------------------------------------------------------------------
Z80Parser::RotateCommandContext::RotateCommandContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RotateLeftCircularAContext* Z80Parser::RotateCommandContext::rotateLeftCircularA() {
return getRuleContext<Z80Parser::RotateLeftCircularAContext>(0);
}
Z80Parser::RotateLeftThroughCarryAContext* Z80Parser::RotateCommandContext::rotateLeftThroughCarryA() {
return getRuleContext<Z80Parser::RotateLeftThroughCarryAContext>(0);
}
Z80Parser::RotateRightCircularAContext* Z80Parser::RotateCommandContext::rotateRightCircularA() {
return getRuleContext<Z80Parser::RotateRightCircularAContext>(0);
}
Z80Parser::RotateRightThroughCarryAContext* Z80Parser::RotateCommandContext::rotateRightThroughCarryA() {
return getRuleContext<Z80Parser::RotateRightThroughCarryAContext>(0);
}
Z80Parser::RotateLeftCircularRegisterContext* Z80Parser::RotateCommandContext::rotateLeftCircularRegister() {
return getRuleContext<Z80Parser::RotateLeftCircularRegisterContext>(0);
}
Z80Parser::RotateLeftCircularHLPointerContext* Z80Parser::RotateCommandContext::rotateLeftCircularHLPointer() {
return getRuleContext<Z80Parser::RotateLeftCircularHLPointerContext>(0);
}
Z80Parser::RotateLeftCircularIXOffsetContext* Z80Parser::RotateCommandContext::rotateLeftCircularIXOffset() {
return getRuleContext<Z80Parser::RotateLeftCircularIXOffsetContext>(0);
}
Z80Parser::RotateLeftCircularIYOffsetContext* Z80Parser::RotateCommandContext::rotateLeftCircularIYOffset() {
return getRuleContext<Z80Parser::RotateLeftCircularIYOffsetContext>(0);
}
Z80Parser::RotateLeftThroughCarryRegisterContext* Z80Parser::RotateCommandContext::rotateLeftThroughCarryRegister() {
return getRuleContext<Z80Parser::RotateLeftThroughCarryRegisterContext>(0);
}
Z80Parser::RotateLeftThroughCarryHLPointerContext* Z80Parser::RotateCommandContext::rotateLeftThroughCarryHLPointer() {
return getRuleContext<Z80Parser::RotateLeftThroughCarryHLPointerContext>(0);
}
Z80Parser::RotateLeftThroughCarryIXOffsetContext* Z80Parser::RotateCommandContext::rotateLeftThroughCarryIXOffset() {
return getRuleContext<Z80Parser::RotateLeftThroughCarryIXOffsetContext>(0);
}
Z80Parser::RotateLeftThroughCarryIYOffsetContext* Z80Parser::RotateCommandContext::rotateLeftThroughCarryIYOffset() {
return getRuleContext<Z80Parser::RotateLeftThroughCarryIYOffsetContext>(0);
}
Z80Parser::RotateRightCircularRegisterContext* Z80Parser::RotateCommandContext::rotateRightCircularRegister() {
return getRuleContext<Z80Parser::RotateRightCircularRegisterContext>(0);
}
Z80Parser::RotateRightCircularHLPointerContext* Z80Parser::RotateCommandContext::rotateRightCircularHLPointer() {
return getRuleContext<Z80Parser::RotateRightCircularHLPointerContext>(0);
}
Z80Parser::RotateRightCircularIXOffsetContext* Z80Parser::RotateCommandContext::rotateRightCircularIXOffset() {
return getRuleContext<Z80Parser::RotateRightCircularIXOffsetContext>(0);
}
Z80Parser::RotateRightCircularIYOffsetContext* Z80Parser::RotateCommandContext::rotateRightCircularIYOffset() {
return getRuleContext<Z80Parser::RotateRightCircularIYOffsetContext>(0);
}
Z80Parser::RotateRightThroughCarryRegisterContext* Z80Parser::RotateCommandContext::rotateRightThroughCarryRegister() {
return getRuleContext<Z80Parser::RotateRightThroughCarryRegisterContext>(0);
}
Z80Parser::RotateRightThroughCarryHLPointerContext* Z80Parser::RotateCommandContext::rotateRightThroughCarryHLPointer() {
return getRuleContext<Z80Parser::RotateRightThroughCarryHLPointerContext>(0);
}
Z80Parser::RotateRightThroughCarryIXOffsetContext* Z80Parser::RotateCommandContext::rotateRightThroughCarryIXOffset() {
return getRuleContext<Z80Parser::RotateRightThroughCarryIXOffsetContext>(0);
}
Z80Parser::RotateRightThroughCarryIYOffsetContext* Z80Parser::RotateCommandContext::rotateRightThroughCarryIYOffset() {
return getRuleContext<Z80Parser::RotateRightThroughCarryIYOffsetContext>(0);
}
Z80Parser::ShiftLeftArithmeticContext* Z80Parser::RotateCommandContext::shiftLeftArithmetic() {
return getRuleContext<Z80Parser::ShiftLeftArithmeticContext>(0);
}
Z80Parser::ShiftLeftLogicalContext* Z80Parser::RotateCommandContext::shiftLeftLogical() {
return getRuleContext<Z80Parser::ShiftLeftLogicalContext>(0);
}
Z80Parser::ShiftRightArithmeticContext* Z80Parser::RotateCommandContext::shiftRightArithmetic() {
return getRuleContext<Z80Parser::ShiftRightArithmeticContext>(0);
}
Z80Parser::ShiftRightLogicalContext* Z80Parser::RotateCommandContext::shiftRightLogical() {
return getRuleContext<Z80Parser::ShiftRightLogicalContext>(0);
}
Z80Parser::RotateDigitLeftContext* Z80Parser::RotateCommandContext::rotateDigitLeft() {
return getRuleContext<Z80Parser::RotateDigitLeftContext>(0);
}
Z80Parser::RotateDigitRightContext* Z80Parser::RotateCommandContext::rotateDigitRight() {
return getRuleContext<Z80Parser::RotateDigitRightContext>(0);
}
size_t Z80Parser::RotateCommandContext::getRuleIndex() const {
return Z80Parser::RuleRotateCommand;
}
void Z80Parser::RotateCommandContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRotateCommand(this);
}
void Z80Parser::RotateCommandContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRotateCommand(this);
}
Z80Parser::RotateCommandContext* Z80Parser::rotateCommand() {
RotateCommandContext *_localctx = _tracker.createInstance<RotateCommandContext>(_ctx, getState());
enterRule(_localctx, 556, Z80Parser::RuleRotateCommand);
auto onExit = finally([=] {
exitRule();
});
try {
setState(2318);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 101, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(2292);
rotateLeftCircularA();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(2293);
rotateLeftThroughCarryA();
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
setState(2294);
rotateRightCircularA();
break;
}
case 4: {
enterOuterAlt(_localctx, 4);
setState(2295);
rotateRightThroughCarryA();
break;
}
case 5: {
enterOuterAlt(_localctx, 5);
setState(2296);
rotateLeftCircularRegister();
break;
}
case 6: {
enterOuterAlt(_localctx, 6);
setState(2297);
rotateLeftCircularHLPointer();
break;
}
case 7: {
enterOuterAlt(_localctx, 7);
setState(2298);
rotateLeftCircularIXOffset();
break;
}
case 8: {
enterOuterAlt(_localctx, 8);
setState(2299);
rotateLeftCircularIYOffset();
break;
}
case 9: {
enterOuterAlt(_localctx, 9);
setState(2300);
rotateLeftThroughCarryRegister();
break;
}
case 10: {
enterOuterAlt(_localctx, 10);
setState(2301);
rotateLeftThroughCarryHLPointer();
break;
}
case 11: {
enterOuterAlt(_localctx, 11);
setState(2302);
rotateLeftThroughCarryIXOffset();
break;
}
case 12: {
enterOuterAlt(_localctx, 12);
setState(2303);
rotateLeftThroughCarryIYOffset();
break;
}
case 13: {
enterOuterAlt(_localctx, 13);
setState(2304);
rotateRightCircularRegister();
break;
}
case 14: {
enterOuterAlt(_localctx, 14);
setState(2305);
rotateRightCircularHLPointer();
break;
}
case 15: {
enterOuterAlt(_localctx, 15);
setState(2306);
rotateRightCircularIXOffset();
break;
}
case 16: {
enterOuterAlt(_localctx, 16);
setState(2307);
rotateRightCircularIYOffset();
break;
}
case 17: {
enterOuterAlt(_localctx, 17);
setState(2308);
rotateRightThroughCarryRegister();
break;
}
case 18: {
enterOuterAlt(_localctx, 18);
setState(2309);
rotateRightThroughCarryHLPointer();
break;
}
case 19: {
enterOuterAlt(_localctx, 19);
setState(2310);
rotateRightThroughCarryIXOffset();
break;
}
case 20: {
enterOuterAlt(_localctx, 20);
setState(2311);
rotateRightThroughCarryIYOffset();
break;
}
case 21: {
enterOuterAlt(_localctx, 21);
setState(2312);
shiftLeftArithmetic();
break;
}
case 22: {
enterOuterAlt(_localctx, 22);
setState(2313);
shiftLeftLogical();
break;
}
case 23: {
enterOuterAlt(_localctx, 23);
setState(2314);
shiftRightArithmetic();
break;
}
case 24: {
enterOuterAlt(_localctx, 24);
setState(2315);
shiftRightLogical();
break;
}
case 25: {
enterOuterAlt(_localctx, 25);
setState(2316);
rotateDigitLeft();
break;
}
case 26: {
enterOuterAlt(_localctx, 26);
setState(2317);
rotateDigitRight();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- BitCommandNameContext ------------------------------------------------------------------
Z80Parser::BitCommandNameContext::BitCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::BitCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleBitCommandName;
}
void Z80Parser::BitCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterBitCommandName(this);
}
void Z80Parser::BitCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitBitCommandName(this);
}
Z80Parser::BitCommandNameContext* Z80Parser::bitCommandName() {
BitCommandNameContext *_localctx = _tracker.createInstance<BitCommandNameContext>(_ctx, getState());
enterRule(_localctx, 558, Z80Parser::RuleBitCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2320);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__166
|| _la == Z80Parser::T__167)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SetCommandNameContext ------------------------------------------------------------------
Z80Parser::SetCommandNameContext::SetCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::SetCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleSetCommandName;
}
void Z80Parser::SetCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSetCommandName(this);
}
void Z80Parser::SetCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSetCommandName(this);
}
Z80Parser::SetCommandNameContext* Z80Parser::setCommandName() {
SetCommandNameContext *_localctx = _tracker.createInstance<SetCommandNameContext>(_ctx, getState());
enterRule(_localctx, 560, Z80Parser::RuleSetCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2322);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__168
|| _la == Z80Parser::T__169)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ResetBitCommandNameContext ------------------------------------------------------------------
Z80Parser::ResetBitCommandNameContext::ResetBitCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::ResetBitCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleResetBitCommandName;
}
void Z80Parser::ResetBitCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterResetBitCommandName(this);
}
void Z80Parser::ResetBitCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitResetBitCommandName(this);
}
Z80Parser::ResetBitCommandNameContext* Z80Parser::resetBitCommandName() {
ResetBitCommandNameContext *_localctx = _tracker.createInstance<ResetBitCommandNameContext>(_ctx, getState());
enterRule(_localctx, 562, Z80Parser::RuleResetBitCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2324);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__170
|| _la == Z80Parser::T__171)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- TestBitInRegisterContext ------------------------------------------------------------------
Z80Parser::TestBitInRegisterContext::TestBitInRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::BitCommandNameContext* Z80Parser::TestBitInRegisterContext::bitCommandName() {
return getRuleContext<Z80Parser::BitCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::TestBitInRegisterContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::TestBitInRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::TestBitInRegisterContext::getRuleIndex() const {
return Z80Parser::RuleTestBitInRegister;
}
void Z80Parser::TestBitInRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterTestBitInRegister(this);
}
void Z80Parser::TestBitInRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitTestBitInRegister(this);
}
Z80Parser::TestBitInRegisterContext* Z80Parser::testBitInRegister() {
TestBitInRegisterContext *_localctx = _tracker.createInstance<TestBitInRegisterContext>(_ctx, getState());
enterRule(_localctx, 564, Z80Parser::RuleTestBitInRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2326);
bitCommandName();
setState(2327);
dynamic_cast<TestBitInRegisterContext *>(_localctx)->bit = number();
setState(2328);
match(Z80Parser::T__73);
setState(2329);
dynamic_cast<TestBitInRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- TestBitInHLPointerContext ------------------------------------------------------------------
Z80Parser::TestBitInHLPointerContext::TestBitInHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::BitCommandNameContext* Z80Parser::TestBitInHLPointerContext::bitCommandName() {
return getRuleContext<Z80Parser::BitCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::TestBitInHLPointerContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::TestBitInHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
size_t Z80Parser::TestBitInHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleTestBitInHLPointer;
}
void Z80Parser::TestBitInHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterTestBitInHLPointer(this);
}
void Z80Parser::TestBitInHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitTestBitInHLPointer(this);
}
Z80Parser::TestBitInHLPointerContext* Z80Parser::testBitInHLPointer() {
TestBitInHLPointerContext *_localctx = _tracker.createInstance<TestBitInHLPointerContext>(_ctx, getState());
enterRule(_localctx, 566, Z80Parser::RuleTestBitInHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2331);
bitCommandName();
setState(2332);
dynamic_cast<TestBitInHLPointerContext *>(_localctx)->bit = number();
setState(2333);
match(Z80Parser::T__73);
setState(2334);
dynamic_cast<TestBitInHLPointerContext *>(_localctx)->source = hlPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- TestBitInIXOffsetContext ------------------------------------------------------------------
Z80Parser::TestBitInIXOffsetContext::TestBitInIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::BitCommandNameContext* Z80Parser::TestBitInIXOffsetContext::bitCommandName() {
return getRuleContext<Z80Parser::BitCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::TestBitInIXOffsetContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::TestBitInIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
size_t Z80Parser::TestBitInIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleTestBitInIXOffset;
}
void Z80Parser::TestBitInIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterTestBitInIXOffset(this);
}
void Z80Parser::TestBitInIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitTestBitInIXOffset(this);
}
Z80Parser::TestBitInIXOffsetContext* Z80Parser::testBitInIXOffset() {
TestBitInIXOffsetContext *_localctx = _tracker.createInstance<TestBitInIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 568, Z80Parser::RuleTestBitInIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2336);
bitCommandName();
setState(2337);
dynamic_cast<TestBitInIXOffsetContext *>(_localctx)->bit = number();
setState(2338);
match(Z80Parser::T__73);
setState(2339);
dynamic_cast<TestBitInIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- TestBitInIYOffsetContext ------------------------------------------------------------------
Z80Parser::TestBitInIYOffsetContext::TestBitInIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::BitCommandNameContext* Z80Parser::TestBitInIYOffsetContext::bitCommandName() {
return getRuleContext<Z80Parser::BitCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::TestBitInIYOffsetContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::TestBitInIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
size_t Z80Parser::TestBitInIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleTestBitInIYOffset;
}
void Z80Parser::TestBitInIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterTestBitInIYOffset(this);
}
void Z80Parser::TestBitInIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitTestBitInIYOffset(this);
}
Z80Parser::TestBitInIYOffsetContext* Z80Parser::testBitInIYOffset() {
TestBitInIYOffsetContext *_localctx = _tracker.createInstance<TestBitInIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 570, Z80Parser::RuleTestBitInIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2341);
bitCommandName();
setState(2342);
dynamic_cast<TestBitInIYOffsetContext *>(_localctx)->bit = number();
setState(2343);
match(Z80Parser::T__73);
setState(2344);
dynamic_cast<TestBitInIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SetBitInRegisterContext ------------------------------------------------------------------
Z80Parser::SetBitInRegisterContext::SetBitInRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SetCommandNameContext* Z80Parser::SetBitInRegisterContext::setCommandName() {
return getRuleContext<Z80Parser::SetCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::SetBitInRegisterContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::SetBitInRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::SetBitInRegisterContext::getRuleIndex() const {
return Z80Parser::RuleSetBitInRegister;
}
void Z80Parser::SetBitInRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSetBitInRegister(this);
}
void Z80Parser::SetBitInRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSetBitInRegister(this);
}
Z80Parser::SetBitInRegisterContext* Z80Parser::setBitInRegister() {
SetBitInRegisterContext *_localctx = _tracker.createInstance<SetBitInRegisterContext>(_ctx, getState());
enterRule(_localctx, 572, Z80Parser::RuleSetBitInRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2346);
setCommandName();
setState(2347);
dynamic_cast<SetBitInRegisterContext *>(_localctx)->bit = number();
setState(2348);
match(Z80Parser::T__73);
setState(2349);
dynamic_cast<SetBitInRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SetBitInHLPointerContext ------------------------------------------------------------------
Z80Parser::SetBitInHLPointerContext::SetBitInHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SetCommandNameContext* Z80Parser::SetBitInHLPointerContext::setCommandName() {
return getRuleContext<Z80Parser::SetCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::SetBitInHLPointerContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::SetBitInHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
size_t Z80Parser::SetBitInHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleSetBitInHLPointer;
}
void Z80Parser::SetBitInHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSetBitInHLPointer(this);
}
void Z80Parser::SetBitInHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSetBitInHLPointer(this);
}
Z80Parser::SetBitInHLPointerContext* Z80Parser::setBitInHLPointer() {
SetBitInHLPointerContext *_localctx = _tracker.createInstance<SetBitInHLPointerContext>(_ctx, getState());
enterRule(_localctx, 574, Z80Parser::RuleSetBitInHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2351);
setCommandName();
setState(2352);
dynamic_cast<SetBitInHLPointerContext *>(_localctx)->bit = number();
setState(2353);
match(Z80Parser::T__73);
setState(2354);
dynamic_cast<SetBitInHLPointerContext *>(_localctx)->source = hlPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SetBitInIXOffsetContext ------------------------------------------------------------------
Z80Parser::SetBitInIXOffsetContext::SetBitInIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SetCommandNameContext* Z80Parser::SetBitInIXOffsetContext::setCommandName() {
return getRuleContext<Z80Parser::SetCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::SetBitInIXOffsetContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::SetBitInIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
size_t Z80Parser::SetBitInIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleSetBitInIXOffset;
}
void Z80Parser::SetBitInIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSetBitInIXOffset(this);
}
void Z80Parser::SetBitInIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSetBitInIXOffset(this);
}
Z80Parser::SetBitInIXOffsetContext* Z80Parser::setBitInIXOffset() {
SetBitInIXOffsetContext *_localctx = _tracker.createInstance<SetBitInIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 576, Z80Parser::RuleSetBitInIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2356);
setCommandName();
setState(2357);
dynamic_cast<SetBitInIXOffsetContext *>(_localctx)->bit = number();
setState(2358);
match(Z80Parser::T__73);
setState(2359);
dynamic_cast<SetBitInIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- SetBitInIYOffsetContext ------------------------------------------------------------------
Z80Parser::SetBitInIYOffsetContext::SetBitInIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::SetCommandNameContext* Z80Parser::SetBitInIYOffsetContext::setCommandName() {
return getRuleContext<Z80Parser::SetCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::SetBitInIYOffsetContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::SetBitInIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
size_t Z80Parser::SetBitInIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleSetBitInIYOffset;
}
void Z80Parser::SetBitInIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterSetBitInIYOffset(this);
}
void Z80Parser::SetBitInIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitSetBitInIYOffset(this);
}
Z80Parser::SetBitInIYOffsetContext* Z80Parser::setBitInIYOffset() {
SetBitInIYOffsetContext *_localctx = _tracker.createInstance<SetBitInIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 578, Z80Parser::RuleSetBitInIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2361);
setCommandName();
setState(2362);
dynamic_cast<SetBitInIYOffsetContext *>(_localctx)->bit = number();
setState(2363);
match(Z80Parser::T__73);
setState(2364);
dynamic_cast<SetBitInIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ResetBitInRegisterContext ------------------------------------------------------------------
Z80Parser::ResetBitInRegisterContext::ResetBitInRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ResetBitCommandNameContext* Z80Parser::ResetBitInRegisterContext::resetBitCommandName() {
return getRuleContext<Z80Parser::ResetBitCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::ResetBitInRegisterContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::ResetBitInRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::ResetBitInRegisterContext::getRuleIndex() const {
return Z80Parser::RuleResetBitInRegister;
}
void Z80Parser::ResetBitInRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterResetBitInRegister(this);
}
void Z80Parser::ResetBitInRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitResetBitInRegister(this);
}
Z80Parser::ResetBitInRegisterContext* Z80Parser::resetBitInRegister() {
ResetBitInRegisterContext *_localctx = _tracker.createInstance<ResetBitInRegisterContext>(_ctx, getState());
enterRule(_localctx, 580, Z80Parser::RuleResetBitInRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2366);
resetBitCommandName();
setState(2367);
dynamic_cast<ResetBitInRegisterContext *>(_localctx)->bit = number();
setState(2368);
match(Z80Parser::T__73);
setState(2369);
dynamic_cast<ResetBitInRegisterContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ResetBitHLPointerContext ------------------------------------------------------------------
Z80Parser::ResetBitHLPointerContext::ResetBitHLPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ResetBitCommandNameContext* Z80Parser::ResetBitHLPointerContext::resetBitCommandName() {
return getRuleContext<Z80Parser::ResetBitCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::ResetBitHLPointerContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::ResetBitHLPointerContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
size_t Z80Parser::ResetBitHLPointerContext::getRuleIndex() const {
return Z80Parser::RuleResetBitHLPointer;
}
void Z80Parser::ResetBitHLPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterResetBitHLPointer(this);
}
void Z80Parser::ResetBitHLPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitResetBitHLPointer(this);
}
Z80Parser::ResetBitHLPointerContext* Z80Parser::resetBitHLPointer() {
ResetBitHLPointerContext *_localctx = _tracker.createInstance<ResetBitHLPointerContext>(_ctx, getState());
enterRule(_localctx, 582, Z80Parser::RuleResetBitHLPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2371);
resetBitCommandName();
setState(2372);
dynamic_cast<ResetBitHLPointerContext *>(_localctx)->bit = number();
setState(2373);
match(Z80Parser::T__73);
setState(2374);
dynamic_cast<ResetBitHLPointerContext *>(_localctx)->source = hlPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ResetBitIXOffsetContext ------------------------------------------------------------------
Z80Parser::ResetBitIXOffsetContext::ResetBitIXOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ResetBitCommandNameContext* Z80Parser::ResetBitIXOffsetContext::resetBitCommandName() {
return getRuleContext<Z80Parser::ResetBitCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::ResetBitIXOffsetContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::IxPointerWithOffsetContext* Z80Parser::ResetBitIXOffsetContext::ixPointerWithOffset() {
return getRuleContext<Z80Parser::IxPointerWithOffsetContext>(0);
}
size_t Z80Parser::ResetBitIXOffsetContext::getRuleIndex() const {
return Z80Parser::RuleResetBitIXOffset;
}
void Z80Parser::ResetBitIXOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterResetBitIXOffset(this);
}
void Z80Parser::ResetBitIXOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitResetBitIXOffset(this);
}
Z80Parser::ResetBitIXOffsetContext* Z80Parser::resetBitIXOffset() {
ResetBitIXOffsetContext *_localctx = _tracker.createInstance<ResetBitIXOffsetContext>(_ctx, getState());
enterRule(_localctx, 584, Z80Parser::RuleResetBitIXOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2376);
resetBitCommandName();
setState(2377);
dynamic_cast<ResetBitIXOffsetContext *>(_localctx)->bit = number();
setState(2378);
match(Z80Parser::T__73);
setState(2379);
dynamic_cast<ResetBitIXOffsetContext *>(_localctx)->source = ixPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ResetBitIYOffsetContext ------------------------------------------------------------------
Z80Parser::ResetBitIYOffsetContext::ResetBitIYOffsetContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ResetBitCommandNameContext* Z80Parser::ResetBitIYOffsetContext::resetBitCommandName() {
return getRuleContext<Z80Parser::ResetBitCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::ResetBitIYOffsetContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
Z80Parser::IyPointerWithOffsetContext* Z80Parser::ResetBitIYOffsetContext::iyPointerWithOffset() {
return getRuleContext<Z80Parser::IyPointerWithOffsetContext>(0);
}
size_t Z80Parser::ResetBitIYOffsetContext::getRuleIndex() const {
return Z80Parser::RuleResetBitIYOffset;
}
void Z80Parser::ResetBitIYOffsetContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterResetBitIYOffset(this);
}
void Z80Parser::ResetBitIYOffsetContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitResetBitIYOffset(this);
}
Z80Parser::ResetBitIYOffsetContext* Z80Parser::resetBitIYOffset() {
ResetBitIYOffsetContext *_localctx = _tracker.createInstance<ResetBitIYOffsetContext>(_ctx, getState());
enterRule(_localctx, 586, Z80Parser::RuleResetBitIYOffset);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2381);
resetBitCommandName();
setState(2382);
dynamic_cast<ResetBitIYOffsetContext *>(_localctx)->bit = number();
setState(2383);
match(Z80Parser::T__73);
setState(2384);
dynamic_cast<ResetBitIYOffsetContext *>(_localctx)->source = iyPointerWithOffset();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- BitManipulationCommandContext ------------------------------------------------------------------
Z80Parser::BitManipulationCommandContext::BitManipulationCommandContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::TestBitInRegisterContext* Z80Parser::BitManipulationCommandContext::testBitInRegister() {
return getRuleContext<Z80Parser::TestBitInRegisterContext>(0);
}
Z80Parser::TestBitInHLPointerContext* Z80Parser::BitManipulationCommandContext::testBitInHLPointer() {
return getRuleContext<Z80Parser::TestBitInHLPointerContext>(0);
}
Z80Parser::TestBitInIXOffsetContext* Z80Parser::BitManipulationCommandContext::testBitInIXOffset() {
return getRuleContext<Z80Parser::TestBitInIXOffsetContext>(0);
}
Z80Parser::TestBitInIYOffsetContext* Z80Parser::BitManipulationCommandContext::testBitInIYOffset() {
return getRuleContext<Z80Parser::TestBitInIYOffsetContext>(0);
}
Z80Parser::SetBitInRegisterContext* Z80Parser::BitManipulationCommandContext::setBitInRegister() {
return getRuleContext<Z80Parser::SetBitInRegisterContext>(0);
}
Z80Parser::SetBitInHLPointerContext* Z80Parser::BitManipulationCommandContext::setBitInHLPointer() {
return getRuleContext<Z80Parser::SetBitInHLPointerContext>(0);
}
Z80Parser::SetBitInIXOffsetContext* Z80Parser::BitManipulationCommandContext::setBitInIXOffset() {
return getRuleContext<Z80Parser::SetBitInIXOffsetContext>(0);
}
Z80Parser::SetBitInIYOffsetContext* Z80Parser::BitManipulationCommandContext::setBitInIYOffset() {
return getRuleContext<Z80Parser::SetBitInIYOffsetContext>(0);
}
Z80Parser::ResetBitInRegisterContext* Z80Parser::BitManipulationCommandContext::resetBitInRegister() {
return getRuleContext<Z80Parser::ResetBitInRegisterContext>(0);
}
Z80Parser::ResetBitHLPointerContext* Z80Parser::BitManipulationCommandContext::resetBitHLPointer() {
return getRuleContext<Z80Parser::ResetBitHLPointerContext>(0);
}
Z80Parser::ResetBitIXOffsetContext* Z80Parser::BitManipulationCommandContext::resetBitIXOffset() {
return getRuleContext<Z80Parser::ResetBitIXOffsetContext>(0);
}
Z80Parser::ResetBitIYOffsetContext* Z80Parser::BitManipulationCommandContext::resetBitIYOffset() {
return getRuleContext<Z80Parser::ResetBitIYOffsetContext>(0);
}
size_t Z80Parser::BitManipulationCommandContext::getRuleIndex() const {
return Z80Parser::RuleBitManipulationCommand;
}
void Z80Parser::BitManipulationCommandContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterBitManipulationCommand(this);
}
void Z80Parser::BitManipulationCommandContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitBitManipulationCommand(this);
}
Z80Parser::BitManipulationCommandContext* Z80Parser::bitManipulationCommand() {
BitManipulationCommandContext *_localctx = _tracker.createInstance<BitManipulationCommandContext>(_ctx, getState());
enterRule(_localctx, 588, Z80Parser::RuleBitManipulationCommand);
auto onExit = finally([=] {
exitRule();
});
try {
setState(2398);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 102, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(2386);
testBitInRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(2387);
testBitInHLPointer();
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
setState(2388);
testBitInIXOffset();
break;
}
case 4: {
enterOuterAlt(_localctx, 4);
setState(2389);
testBitInIYOffset();
break;
}
case 5: {
enterOuterAlt(_localctx, 5);
setState(2390);
setBitInRegister();
break;
}
case 6: {
enterOuterAlt(_localctx, 6);
setState(2391);
setBitInHLPointer();
break;
}
case 7: {
enterOuterAlt(_localctx, 7);
setState(2392);
setBitInIXOffset();
break;
}
case 8: {
enterOuterAlt(_localctx, 8);
setState(2393);
setBitInIYOffset();
break;
}
case 9: {
enterOuterAlt(_localctx, 9);
setState(2394);
resetBitInRegister();
break;
}
case 10: {
enterOuterAlt(_localctx, 10);
setState(2395);
resetBitHLPointer();
break;
}
case 11: {
enterOuterAlt(_localctx, 11);
setState(2396);
resetBitIXOffset();
break;
}
case 12: {
enterOuterAlt(_localctx, 12);
setState(2397);
resetBitIYOffset();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JumpConditionContext ------------------------------------------------------------------
Z80Parser::JumpConditionContext::JumpConditionContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::JumpConditionContext::getRuleIndex() const {
return Z80Parser::RuleJumpCondition;
}
void Z80Parser::JumpConditionContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterJumpCondition(this);
}
void Z80Parser::JumpConditionContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitJumpCondition(this);
}
Z80Parser::JumpConditionContext* Z80Parser::jumpCondition() {
JumpConditionContext *_localctx = _tracker.createInstance<JumpConditionContext>(_ctx, getState());
enterRule(_localctx, 590, Z80Parser::RuleJumpCondition);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
setState(2408);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::T__172:
case Z80Parser::T__173: {
enterOuterAlt(_localctx, 1);
setState(2400);
dynamic_cast<JumpConditionContext *>(_localctx)->zero = _input->LT(1);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__172
|| _la == Z80Parser::T__173)) {
dynamic_cast<JumpConditionContext *>(_localctx)->zero = _errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
break;
}
case Z80Parser::T__174:
case Z80Parser::T__175: {
enterOuterAlt(_localctx, 2);
setState(2401);
dynamic_cast<JumpConditionContext *>(_localctx)->notZero = _input->LT(1);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__174
|| _la == Z80Parser::T__175)) {
dynamic_cast<JumpConditionContext *>(_localctx)->notZero = _errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
break;
}
case Z80Parser::T__32:
case Z80Parser::T__33: {
enterOuterAlt(_localctx, 3);
setState(2402);
dynamic_cast<JumpConditionContext *>(_localctx)->carry = _input->LT(1);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__32
|| _la == Z80Parser::T__33)) {
dynamic_cast<JumpConditionContext *>(_localctx)->carry = _errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
break;
}
case Z80Parser::T__176:
case Z80Parser::T__177: {
enterOuterAlt(_localctx, 4);
setState(2403);
dynamic_cast<JumpConditionContext *>(_localctx)->notCarry = _input->LT(1);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__176
|| _la == Z80Parser::T__177)) {
dynamic_cast<JumpConditionContext *>(_localctx)->notCarry = _errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
break;
}
case Z80Parser::T__178:
case Z80Parser::T__179: {
enterOuterAlt(_localctx, 5);
setState(2404);
dynamic_cast<JumpConditionContext *>(_localctx)->parityOdd = _input->LT(1);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__178
|| _la == Z80Parser::T__179)) {
dynamic_cast<JumpConditionContext *>(_localctx)->parityOdd = _errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
break;
}
case Z80Parser::T__180:
case Z80Parser::T__181: {
enterOuterAlt(_localctx, 6);
setState(2405);
dynamic_cast<JumpConditionContext *>(_localctx)->parityEven = _input->LT(1);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__180
|| _la == Z80Parser::T__181)) {
dynamic_cast<JumpConditionContext *>(_localctx)->parityEven = _errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
break;
}
case Z80Parser::T__182:
case Z80Parser::T__183: {
enterOuterAlt(_localctx, 7);
setState(2406);
dynamic_cast<JumpConditionContext *>(_localctx)->positive = _input->LT(1);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__182
|| _la == Z80Parser::T__183)) {
dynamic_cast<JumpConditionContext *>(_localctx)->positive = _errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
break;
}
case Z80Parser::T__184:
case Z80Parser::T__185: {
enterOuterAlt(_localctx, 8);
setState(2407);
dynamic_cast<JumpConditionContext *>(_localctx)->negative = _input->LT(1);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__184
|| _la == Z80Parser::T__185)) {
dynamic_cast<JumpConditionContext *>(_localctx)->negative = _errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JumpCommandNameContext ------------------------------------------------------------------
Z80Parser::JumpCommandNameContext::JumpCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::JumpCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleJumpCommandName;
}
void Z80Parser::JumpCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterJumpCommandName(this);
}
void Z80Parser::JumpCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitJumpCommandName(this);
}
Z80Parser::JumpCommandNameContext* Z80Parser::jumpCommandName() {
JumpCommandNameContext *_localctx = _tracker.createInstance<JumpCommandNameContext>(_ctx, getState());
enterRule(_localctx, 592, Z80Parser::RuleJumpCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2410);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__186
|| _la == Z80Parser::T__187)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JumpRelativeCommandNameContext ------------------------------------------------------------------
Z80Parser::JumpRelativeCommandNameContext::JumpRelativeCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::JumpRelativeCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleJumpRelativeCommandName;
}
void Z80Parser::JumpRelativeCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterJumpRelativeCommandName(this);
}
void Z80Parser::JumpRelativeCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitJumpRelativeCommandName(this);
}
Z80Parser::JumpRelativeCommandNameContext* Z80Parser::jumpRelativeCommandName() {
JumpRelativeCommandNameContext *_localctx = _tracker.createInstance<JumpRelativeCommandNameContext>(_ctx, getState());
enterRule(_localctx, 594, Z80Parser::RuleJumpRelativeCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2412);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__188
|| _la == Z80Parser::T__189)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JumpRelativeAndDecrementCommandNameContext ------------------------------------------------------------------
Z80Parser::JumpRelativeAndDecrementCommandNameContext::JumpRelativeAndDecrementCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::JumpRelativeAndDecrementCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleJumpRelativeAndDecrementCommandName;
}
void Z80Parser::JumpRelativeAndDecrementCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterJumpRelativeAndDecrementCommandName(this);
}
void Z80Parser::JumpRelativeAndDecrementCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitJumpRelativeAndDecrementCommandName(this);
}
Z80Parser::JumpRelativeAndDecrementCommandNameContext* Z80Parser::jumpRelativeAndDecrementCommandName() {
JumpRelativeAndDecrementCommandNameContext *_localctx = _tracker.createInstance<JumpRelativeAndDecrementCommandNameContext>(_ctx, getState());
enterRule(_localctx, 596, Z80Parser::RuleJumpRelativeAndDecrementCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2414);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__190
|| _la == Z80Parser::T__191)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CallCommandNameContext ------------------------------------------------------------------
Z80Parser::CallCommandNameContext::CallCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::CallCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleCallCommandName;
}
void Z80Parser::CallCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCallCommandName(this);
}
void Z80Parser::CallCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCallCommandName(this);
}
Z80Parser::CallCommandNameContext* Z80Parser::callCommandName() {
CallCommandNameContext *_localctx = _tracker.createInstance<CallCommandNameContext>(_ctx, getState());
enterRule(_localctx, 598, Z80Parser::RuleCallCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2416);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__192
|| _la == Z80Parser::T__193)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ReturnCommandNameContext ------------------------------------------------------------------
Z80Parser::ReturnCommandNameContext::ReturnCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::ReturnCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleReturnCommandName;
}
void Z80Parser::ReturnCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterReturnCommandName(this);
}
void Z80Parser::ReturnCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitReturnCommandName(this);
}
Z80Parser::ReturnCommandNameContext* Z80Parser::returnCommandName() {
ReturnCommandNameContext *_localctx = _tracker.createInstance<ReturnCommandNameContext>(_ctx, getState());
enterRule(_localctx, 600, Z80Parser::RuleReturnCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2418);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__194
|| _la == Z80Parser::T__195)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ReturnAndEnableInterruptCommandNameContext ------------------------------------------------------------------
Z80Parser::ReturnAndEnableInterruptCommandNameContext::ReturnAndEnableInterruptCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::ReturnAndEnableInterruptCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleReturnAndEnableInterruptCommandName;
}
void Z80Parser::ReturnAndEnableInterruptCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterReturnAndEnableInterruptCommandName(this);
}
void Z80Parser::ReturnAndEnableInterruptCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitReturnAndEnableInterruptCommandName(this);
}
Z80Parser::ReturnAndEnableInterruptCommandNameContext* Z80Parser::returnAndEnableInterruptCommandName() {
ReturnAndEnableInterruptCommandNameContext *_localctx = _tracker.createInstance<ReturnAndEnableInterruptCommandNameContext>(_ctx, getState());
enterRule(_localctx, 602, Z80Parser::RuleReturnAndEnableInterruptCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2420);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__196
|| _la == Z80Parser::T__197)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ReturnFromNonMaskableInterruptCommandNameContext ------------------------------------------------------------------
Z80Parser::ReturnFromNonMaskableInterruptCommandNameContext::ReturnFromNonMaskableInterruptCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::ReturnFromNonMaskableInterruptCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleReturnFromNonMaskableInterruptCommandName;
}
void Z80Parser::ReturnFromNonMaskableInterruptCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterReturnFromNonMaskableInterruptCommandName(this);
}
void Z80Parser::ReturnFromNonMaskableInterruptCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitReturnFromNonMaskableInterruptCommandName(this);
}
Z80Parser::ReturnFromNonMaskableInterruptCommandNameContext* Z80Parser::returnFromNonMaskableInterruptCommandName() {
ReturnFromNonMaskableInterruptCommandNameContext *_localctx = _tracker.createInstance<ReturnFromNonMaskableInterruptCommandNameContext>(_ctx, getState());
enterRule(_localctx, 604, Z80Parser::RuleReturnFromNonMaskableInterruptCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2422);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__198
|| _la == Z80Parser::T__199)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RestartCommandNameContext ------------------------------------------------------------------
Z80Parser::RestartCommandNameContext::RestartCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::RestartCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleRestartCommandName;
}
void Z80Parser::RestartCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRestartCommandName(this);
}
void Z80Parser::RestartCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRestartCommandName(this);
}
Z80Parser::RestartCommandNameContext* Z80Parser::restartCommandName() {
RestartCommandNameContext *_localctx = _tracker.createInstance<RestartCommandNameContext>(_ctx, getState());
enterRule(_localctx, 606, Z80Parser::RuleRestartCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2424);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__200
|| _la == Z80Parser::T__201)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JumpToAbsoluteAddressContext ------------------------------------------------------------------
Z80Parser::JumpToAbsoluteAddressContext::JumpToAbsoluteAddressContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::JumpCommandNameContext* Z80Parser::JumpToAbsoluteAddressContext::jumpCommandName() {
return getRuleContext<Z80Parser::JumpCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::JumpToAbsoluteAddressContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::JumpToAbsoluteAddressContext::getRuleIndex() const {
return Z80Parser::RuleJumpToAbsoluteAddress;
}
void Z80Parser::JumpToAbsoluteAddressContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterJumpToAbsoluteAddress(this);
}
void Z80Parser::JumpToAbsoluteAddressContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitJumpToAbsoluteAddress(this);
}
Z80Parser::JumpToAbsoluteAddressContext* Z80Parser::jumpToAbsoluteAddress() {
JumpToAbsoluteAddressContext *_localctx = _tracker.createInstance<JumpToAbsoluteAddressContext>(_ctx, getState());
enterRule(_localctx, 608, Z80Parser::RuleJumpToAbsoluteAddress);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2426);
jumpCommandName();
setState(2427);
dynamic_cast<JumpToAbsoluteAddressContext *>(_localctx)->address = number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JumpToAbsoluteAddressGivenConditionContext ------------------------------------------------------------------
Z80Parser::JumpToAbsoluteAddressGivenConditionContext::JumpToAbsoluteAddressGivenConditionContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::JumpCommandNameContext* Z80Parser::JumpToAbsoluteAddressGivenConditionContext::jumpCommandName() {
return getRuleContext<Z80Parser::JumpCommandNameContext>(0);
}
Z80Parser::JumpConditionContext* Z80Parser::JumpToAbsoluteAddressGivenConditionContext::jumpCondition() {
return getRuleContext<Z80Parser::JumpConditionContext>(0);
}
Z80Parser::NumberContext* Z80Parser::JumpToAbsoluteAddressGivenConditionContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::JumpToAbsoluteAddressGivenConditionContext::getRuleIndex() const {
return Z80Parser::RuleJumpToAbsoluteAddressGivenCondition;
}
void Z80Parser::JumpToAbsoluteAddressGivenConditionContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterJumpToAbsoluteAddressGivenCondition(this);
}
void Z80Parser::JumpToAbsoluteAddressGivenConditionContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitJumpToAbsoluteAddressGivenCondition(this);
}
Z80Parser::JumpToAbsoluteAddressGivenConditionContext* Z80Parser::jumpToAbsoluteAddressGivenCondition() {
JumpToAbsoluteAddressGivenConditionContext *_localctx = _tracker.createInstance<JumpToAbsoluteAddressGivenConditionContext>(_ctx, getState());
enterRule(_localctx, 610, Z80Parser::RuleJumpToAbsoluteAddressGivenCondition);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2429);
jumpCommandName();
setState(2430);
dynamic_cast<JumpToAbsoluteAddressGivenConditionContext *>(_localctx)->condition = jumpCondition();
setState(2431);
dynamic_cast<JumpToAbsoluteAddressGivenConditionContext *>(_localctx)->address = number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JumpToRelativeAddressContext ------------------------------------------------------------------
Z80Parser::JumpToRelativeAddressContext::JumpToRelativeAddressContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::JumpRelativeCommandNameContext* Z80Parser::JumpToRelativeAddressContext::jumpRelativeCommandName() {
return getRuleContext<Z80Parser::JumpRelativeCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::JumpToRelativeAddressContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::JumpToRelativeAddressContext::getRuleIndex() const {
return Z80Parser::RuleJumpToRelativeAddress;
}
void Z80Parser::JumpToRelativeAddressContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterJumpToRelativeAddress(this);
}
void Z80Parser::JumpToRelativeAddressContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitJumpToRelativeAddress(this);
}
Z80Parser::JumpToRelativeAddressContext* Z80Parser::jumpToRelativeAddress() {
JumpToRelativeAddressContext *_localctx = _tracker.createInstance<JumpToRelativeAddressContext>(_ctx, getState());
enterRule(_localctx, 612, Z80Parser::RuleJumpToRelativeAddress);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2433);
jumpRelativeCommandName();
setState(2434);
dynamic_cast<JumpToRelativeAddressContext *>(_localctx)->address = number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JumpToRelativeAddressGivenConditionContext ------------------------------------------------------------------
Z80Parser::JumpToRelativeAddressGivenConditionContext::JumpToRelativeAddressGivenConditionContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::JumpRelativeCommandNameContext* Z80Parser::JumpToRelativeAddressGivenConditionContext::jumpRelativeCommandName() {
return getRuleContext<Z80Parser::JumpRelativeCommandNameContext>(0);
}
Z80Parser::JumpConditionContext* Z80Parser::JumpToRelativeAddressGivenConditionContext::jumpCondition() {
return getRuleContext<Z80Parser::JumpConditionContext>(0);
}
Z80Parser::NumberContext* Z80Parser::JumpToRelativeAddressGivenConditionContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::JumpToRelativeAddressGivenConditionContext::getRuleIndex() const {
return Z80Parser::RuleJumpToRelativeAddressGivenCondition;
}
void Z80Parser::JumpToRelativeAddressGivenConditionContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterJumpToRelativeAddressGivenCondition(this);
}
void Z80Parser::JumpToRelativeAddressGivenConditionContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitJumpToRelativeAddressGivenCondition(this);
}
Z80Parser::JumpToRelativeAddressGivenConditionContext* Z80Parser::jumpToRelativeAddressGivenCondition() {
JumpToRelativeAddressGivenConditionContext *_localctx = _tracker.createInstance<JumpToRelativeAddressGivenConditionContext>(_ctx, getState());
enterRule(_localctx, 614, Z80Parser::RuleJumpToRelativeAddressGivenCondition);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2436);
jumpRelativeCommandName();
setState(2437);
dynamic_cast<JumpToRelativeAddressGivenConditionContext *>(_localctx)->condition = jumpCondition();
setState(2438);
dynamic_cast<JumpToRelativeAddressGivenConditionContext *>(_localctx)->address = number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JumpToHLContext ------------------------------------------------------------------
Z80Parser::JumpToHLContext::JumpToHLContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::JumpCommandNameContext* Z80Parser::JumpToHLContext::jumpCommandName() {
return getRuleContext<Z80Parser::JumpCommandNameContext>(0);
}
Z80Parser::HlRegisterContext* Z80Parser::JumpToHLContext::hlRegister() {
return getRuleContext<Z80Parser::HlRegisterContext>(0);
}
Z80Parser::HlPointerContext* Z80Parser::JumpToHLContext::hlPointer() {
return getRuleContext<Z80Parser::HlPointerContext>(0);
}
size_t Z80Parser::JumpToHLContext::getRuleIndex() const {
return Z80Parser::RuleJumpToHL;
}
void Z80Parser::JumpToHLContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterJumpToHL(this);
}
void Z80Parser::JumpToHLContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitJumpToHL(this);
}
Z80Parser::JumpToHLContext* Z80Parser::jumpToHL() {
JumpToHLContext *_localctx = _tracker.createInstance<JumpToHLContext>(_ctx, getState());
enterRule(_localctx, 616, Z80Parser::RuleJumpToHL);
auto onExit = finally([=] {
exitRule();
});
try {
setState(2446);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 104, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(2440);
jumpCommandName();
setState(2441);
hlRegister();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(2443);
jumpCommandName();
setState(2444);
hlPointer();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JumpToIXContext ------------------------------------------------------------------
Z80Parser::JumpToIXContext::JumpToIXContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::JumpCommandNameContext* Z80Parser::JumpToIXContext::jumpCommandName() {
return getRuleContext<Z80Parser::JumpCommandNameContext>(0);
}
Z80Parser::IxRegisterContext* Z80Parser::JumpToIXContext::ixRegister() {
return getRuleContext<Z80Parser::IxRegisterContext>(0);
}
size_t Z80Parser::JumpToIXContext::getRuleIndex() const {
return Z80Parser::RuleJumpToIX;
}
void Z80Parser::JumpToIXContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterJumpToIX(this);
}
void Z80Parser::JumpToIXContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitJumpToIX(this);
}
Z80Parser::JumpToIXContext* Z80Parser::jumpToIX() {
JumpToIXContext *_localctx = _tracker.createInstance<JumpToIXContext>(_ctx, getState());
enterRule(_localctx, 618, Z80Parser::RuleJumpToIX);
auto onExit = finally([=] {
exitRule();
});
try {
setState(2456);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 105, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(2448);
jumpCommandName();
setState(2449);
match(Z80Parser::T__68);
setState(2450);
ixRegister();
setState(2451);
match(Z80Parser::T__69);
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(2453);
jumpCommandName();
setState(2454);
ixRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JumpToIYContext ------------------------------------------------------------------
Z80Parser::JumpToIYContext::JumpToIYContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::JumpCommandNameContext* Z80Parser::JumpToIYContext::jumpCommandName() {
return getRuleContext<Z80Parser::JumpCommandNameContext>(0);
}
Z80Parser::IyRegisterContext* Z80Parser::JumpToIYContext::iyRegister() {
return getRuleContext<Z80Parser::IyRegisterContext>(0);
}
size_t Z80Parser::JumpToIYContext::getRuleIndex() const {
return Z80Parser::RuleJumpToIY;
}
void Z80Parser::JumpToIYContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterJumpToIY(this);
}
void Z80Parser::JumpToIYContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitJumpToIY(this);
}
Z80Parser::JumpToIYContext* Z80Parser::jumpToIY() {
JumpToIYContext *_localctx = _tracker.createInstance<JumpToIYContext>(_ctx, getState());
enterRule(_localctx, 620, Z80Parser::RuleJumpToIY);
auto onExit = finally([=] {
exitRule();
});
try {
setState(2466);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 106, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(2458);
jumpCommandName();
setState(2459);
match(Z80Parser::T__68);
setState(2460);
iyRegister();
setState(2461);
match(Z80Parser::T__69);
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(2463);
jumpCommandName();
setState(2464);
iyRegister();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- JumpRelativeAndDecrementContext ------------------------------------------------------------------
Z80Parser::JumpRelativeAndDecrementContext::JumpRelativeAndDecrementContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::JumpRelativeAndDecrementCommandNameContext* Z80Parser::JumpRelativeAndDecrementContext::jumpRelativeAndDecrementCommandName() {
return getRuleContext<Z80Parser::JumpRelativeAndDecrementCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::JumpRelativeAndDecrementContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::JumpRelativeAndDecrementContext::getRuleIndex() const {
return Z80Parser::RuleJumpRelativeAndDecrement;
}
void Z80Parser::JumpRelativeAndDecrementContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterJumpRelativeAndDecrement(this);
}
void Z80Parser::JumpRelativeAndDecrementContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitJumpRelativeAndDecrement(this);
}
Z80Parser::JumpRelativeAndDecrementContext* Z80Parser::jumpRelativeAndDecrement() {
JumpRelativeAndDecrementContext *_localctx = _tracker.createInstance<JumpRelativeAndDecrementContext>(_ctx, getState());
enterRule(_localctx, 622, Z80Parser::RuleJumpRelativeAndDecrement);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2468);
jumpRelativeAndDecrementCommandName();
setState(2469);
dynamic_cast<JumpRelativeAndDecrementContext *>(_localctx)->address = number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CallSubroutineContext ------------------------------------------------------------------
Z80Parser::CallSubroutineContext::CallSubroutineContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::CallCommandNameContext* Z80Parser::CallSubroutineContext::callCommandName() {
return getRuleContext<Z80Parser::CallCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::CallSubroutineContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::CallSubroutineContext::getRuleIndex() const {
return Z80Parser::RuleCallSubroutine;
}
void Z80Parser::CallSubroutineContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCallSubroutine(this);
}
void Z80Parser::CallSubroutineContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCallSubroutine(this);
}
Z80Parser::CallSubroutineContext* Z80Parser::callSubroutine() {
CallSubroutineContext *_localctx = _tracker.createInstance<CallSubroutineContext>(_ctx, getState());
enterRule(_localctx, 624, Z80Parser::RuleCallSubroutine);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2471);
callCommandName();
setState(2472);
dynamic_cast<CallSubroutineContext *>(_localctx)->address = number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CallSubroutineWithConditionContext ------------------------------------------------------------------
Z80Parser::CallSubroutineWithConditionContext::CallSubroutineWithConditionContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::CallCommandNameContext* Z80Parser::CallSubroutineWithConditionContext::callCommandName() {
return getRuleContext<Z80Parser::CallCommandNameContext>(0);
}
Z80Parser::JumpConditionContext* Z80Parser::CallSubroutineWithConditionContext::jumpCondition() {
return getRuleContext<Z80Parser::JumpConditionContext>(0);
}
Z80Parser::NumberContext* Z80Parser::CallSubroutineWithConditionContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::CallSubroutineWithConditionContext::getRuleIndex() const {
return Z80Parser::RuleCallSubroutineWithCondition;
}
void Z80Parser::CallSubroutineWithConditionContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCallSubroutineWithCondition(this);
}
void Z80Parser::CallSubroutineWithConditionContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCallSubroutineWithCondition(this);
}
Z80Parser::CallSubroutineWithConditionContext* Z80Parser::callSubroutineWithCondition() {
CallSubroutineWithConditionContext *_localctx = _tracker.createInstance<CallSubroutineWithConditionContext>(_ctx, getState());
enterRule(_localctx, 626, Z80Parser::RuleCallSubroutineWithCondition);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2474);
callCommandName();
setState(2475);
dynamic_cast<CallSubroutineWithConditionContext *>(_localctx)->condition = jumpCondition();
setState(2476);
dynamic_cast<CallSubroutineWithConditionContext *>(_localctx)->address = number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ReturnFromSubroutineContext ------------------------------------------------------------------
Z80Parser::ReturnFromSubroutineContext::ReturnFromSubroutineContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ReturnCommandNameContext* Z80Parser::ReturnFromSubroutineContext::returnCommandName() {
return getRuleContext<Z80Parser::ReturnCommandNameContext>(0);
}
size_t Z80Parser::ReturnFromSubroutineContext::getRuleIndex() const {
return Z80Parser::RuleReturnFromSubroutine;
}
void Z80Parser::ReturnFromSubroutineContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterReturnFromSubroutine(this);
}
void Z80Parser::ReturnFromSubroutineContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitReturnFromSubroutine(this);
}
Z80Parser::ReturnFromSubroutineContext* Z80Parser::returnFromSubroutine() {
ReturnFromSubroutineContext *_localctx = _tracker.createInstance<ReturnFromSubroutineContext>(_ctx, getState());
enterRule(_localctx, 628, Z80Parser::RuleReturnFromSubroutine);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2478);
returnCommandName();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ReturnFromSubroutineGivenConditionContext ------------------------------------------------------------------
Z80Parser::ReturnFromSubroutineGivenConditionContext::ReturnFromSubroutineGivenConditionContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ReturnCommandNameContext* Z80Parser::ReturnFromSubroutineGivenConditionContext::returnCommandName() {
return getRuleContext<Z80Parser::ReturnCommandNameContext>(0);
}
Z80Parser::JumpConditionContext* Z80Parser::ReturnFromSubroutineGivenConditionContext::jumpCondition() {
return getRuleContext<Z80Parser::JumpConditionContext>(0);
}
size_t Z80Parser::ReturnFromSubroutineGivenConditionContext::getRuleIndex() const {
return Z80Parser::RuleReturnFromSubroutineGivenCondition;
}
void Z80Parser::ReturnFromSubroutineGivenConditionContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterReturnFromSubroutineGivenCondition(this);
}
void Z80Parser::ReturnFromSubroutineGivenConditionContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitReturnFromSubroutineGivenCondition(this);
}
Z80Parser::ReturnFromSubroutineGivenConditionContext* Z80Parser::returnFromSubroutineGivenCondition() {
ReturnFromSubroutineGivenConditionContext *_localctx = _tracker.createInstance<ReturnFromSubroutineGivenConditionContext>(_ctx, getState());
enterRule(_localctx, 630, Z80Parser::RuleReturnFromSubroutineGivenCondition);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2480);
returnCommandName();
setState(2481);
dynamic_cast<ReturnFromSubroutineGivenConditionContext *>(_localctx)->condition = jumpCondition();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ReturnAndEnableInterruptContext ------------------------------------------------------------------
Z80Parser::ReturnAndEnableInterruptContext::ReturnAndEnableInterruptContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ReturnAndEnableInterruptCommandNameContext* Z80Parser::ReturnAndEnableInterruptContext::returnAndEnableInterruptCommandName() {
return getRuleContext<Z80Parser::ReturnAndEnableInterruptCommandNameContext>(0);
}
size_t Z80Parser::ReturnAndEnableInterruptContext::getRuleIndex() const {
return Z80Parser::RuleReturnAndEnableInterrupt;
}
void Z80Parser::ReturnAndEnableInterruptContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterReturnAndEnableInterrupt(this);
}
void Z80Parser::ReturnAndEnableInterruptContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitReturnAndEnableInterrupt(this);
}
Z80Parser::ReturnAndEnableInterruptContext* Z80Parser::returnAndEnableInterrupt() {
ReturnAndEnableInterruptContext *_localctx = _tracker.createInstance<ReturnAndEnableInterruptContext>(_ctx, getState());
enterRule(_localctx, 632, Z80Parser::RuleReturnAndEnableInterrupt);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2483);
returnAndEnableInterruptCommandName();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- ReturnFromNonMaskableInterruptContext ------------------------------------------------------------------
Z80Parser::ReturnFromNonMaskableInterruptContext::ReturnFromNonMaskableInterruptContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::ReturnFromNonMaskableInterruptCommandNameContext* Z80Parser::ReturnFromNonMaskableInterruptContext::returnFromNonMaskableInterruptCommandName() {
return getRuleContext<Z80Parser::ReturnFromNonMaskableInterruptCommandNameContext>(0);
}
size_t Z80Parser::ReturnFromNonMaskableInterruptContext::getRuleIndex() const {
return Z80Parser::RuleReturnFromNonMaskableInterrupt;
}
void Z80Parser::ReturnFromNonMaskableInterruptContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterReturnFromNonMaskableInterrupt(this);
}
void Z80Parser::ReturnFromNonMaskableInterruptContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitReturnFromNonMaskableInterrupt(this);
}
Z80Parser::ReturnFromNonMaskableInterruptContext* Z80Parser::returnFromNonMaskableInterrupt() {
ReturnFromNonMaskableInterruptContext *_localctx = _tracker.createInstance<ReturnFromNonMaskableInterruptContext>(_ctx, getState());
enterRule(_localctx, 634, Z80Parser::RuleReturnFromNonMaskableInterrupt);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2485);
returnFromNonMaskableInterruptCommandName();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- RestartCommandContext ------------------------------------------------------------------
Z80Parser::RestartCommandContext::RestartCommandContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::RestartCommandNameContext* Z80Parser::RestartCommandContext::restartCommandName() {
return getRuleContext<Z80Parser::RestartCommandNameContext>(0);
}
Z80Parser::NumberContext* Z80Parser::RestartCommandContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::RestartCommandContext::getRuleIndex() const {
return Z80Parser::RuleRestartCommand;
}
void Z80Parser::RestartCommandContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterRestartCommand(this);
}
void Z80Parser::RestartCommandContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitRestartCommand(this);
}
Z80Parser::RestartCommandContext* Z80Parser::restartCommand() {
RestartCommandContext *_localctx = _tracker.createInstance<RestartCommandContext>(_ctx, getState());
enterRule(_localctx, 636, Z80Parser::RuleRestartCommand);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2487);
restartCommandName();
setState(2488);
number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- BranchCommandContext ------------------------------------------------------------------
Z80Parser::BranchCommandContext::BranchCommandContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::JumpToAbsoluteAddressContext* Z80Parser::BranchCommandContext::jumpToAbsoluteAddress() {
return getRuleContext<Z80Parser::JumpToAbsoluteAddressContext>(0);
}
Z80Parser::JumpToAbsoluteAddressGivenConditionContext* Z80Parser::BranchCommandContext::jumpToAbsoluteAddressGivenCondition() {
return getRuleContext<Z80Parser::JumpToAbsoluteAddressGivenConditionContext>(0);
}
Z80Parser::JumpToRelativeAddressContext* Z80Parser::BranchCommandContext::jumpToRelativeAddress() {
return getRuleContext<Z80Parser::JumpToRelativeAddressContext>(0);
}
Z80Parser::JumpToRelativeAddressGivenConditionContext* Z80Parser::BranchCommandContext::jumpToRelativeAddressGivenCondition() {
return getRuleContext<Z80Parser::JumpToRelativeAddressGivenConditionContext>(0);
}
Z80Parser::JumpToHLContext* Z80Parser::BranchCommandContext::jumpToHL() {
return getRuleContext<Z80Parser::JumpToHLContext>(0);
}
Z80Parser::JumpToIXContext* Z80Parser::BranchCommandContext::jumpToIX() {
return getRuleContext<Z80Parser::JumpToIXContext>(0);
}
Z80Parser::JumpToIYContext* Z80Parser::BranchCommandContext::jumpToIY() {
return getRuleContext<Z80Parser::JumpToIYContext>(0);
}
Z80Parser::JumpRelativeAndDecrementContext* Z80Parser::BranchCommandContext::jumpRelativeAndDecrement() {
return getRuleContext<Z80Parser::JumpRelativeAndDecrementContext>(0);
}
Z80Parser::CallSubroutineContext* Z80Parser::BranchCommandContext::callSubroutine() {
return getRuleContext<Z80Parser::CallSubroutineContext>(0);
}
Z80Parser::CallSubroutineWithConditionContext* Z80Parser::BranchCommandContext::callSubroutineWithCondition() {
return getRuleContext<Z80Parser::CallSubroutineWithConditionContext>(0);
}
Z80Parser::ReturnFromSubroutineContext* Z80Parser::BranchCommandContext::returnFromSubroutine() {
return getRuleContext<Z80Parser::ReturnFromSubroutineContext>(0);
}
Z80Parser::ReturnFromSubroutineGivenConditionContext* Z80Parser::BranchCommandContext::returnFromSubroutineGivenCondition() {
return getRuleContext<Z80Parser::ReturnFromSubroutineGivenConditionContext>(0);
}
Z80Parser::ReturnAndEnableInterruptContext* Z80Parser::BranchCommandContext::returnAndEnableInterrupt() {
return getRuleContext<Z80Parser::ReturnAndEnableInterruptContext>(0);
}
Z80Parser::ReturnFromNonMaskableInterruptContext* Z80Parser::BranchCommandContext::returnFromNonMaskableInterrupt() {
return getRuleContext<Z80Parser::ReturnFromNonMaskableInterruptContext>(0);
}
Z80Parser::RestartCommandContext* Z80Parser::BranchCommandContext::restartCommand() {
return getRuleContext<Z80Parser::RestartCommandContext>(0);
}
size_t Z80Parser::BranchCommandContext::getRuleIndex() const {
return Z80Parser::RuleBranchCommand;
}
void Z80Parser::BranchCommandContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterBranchCommand(this);
}
void Z80Parser::BranchCommandContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitBranchCommand(this);
}
Z80Parser::BranchCommandContext* Z80Parser::branchCommand() {
BranchCommandContext *_localctx = _tracker.createInstance<BranchCommandContext>(_ctx, getState());
enterRule(_localctx, 638, Z80Parser::RuleBranchCommand);
auto onExit = finally([=] {
exitRule();
});
try {
setState(2505);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 107, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(2490);
jumpToAbsoluteAddress();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(2491);
jumpToAbsoluteAddressGivenCondition();
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
setState(2492);
jumpToRelativeAddress();
break;
}
case 4: {
enterOuterAlt(_localctx, 4);
setState(2493);
jumpToRelativeAddressGivenCondition();
break;
}
case 5: {
enterOuterAlt(_localctx, 5);
setState(2494);
jumpToHL();
break;
}
case 6: {
enterOuterAlt(_localctx, 6);
setState(2495);
jumpToIX();
break;
}
case 7: {
enterOuterAlt(_localctx, 7);
setState(2496);
jumpToIY();
break;
}
case 8: {
enterOuterAlt(_localctx, 8);
setState(2497);
jumpRelativeAndDecrement();
break;
}
case 9: {
enterOuterAlt(_localctx, 9);
setState(2498);
callSubroutine();
break;
}
case 10: {
enterOuterAlt(_localctx, 10);
setState(2499);
callSubroutineWithCondition();
break;
}
case 11: {
enterOuterAlt(_localctx, 11);
setState(2500);
returnFromSubroutine();
break;
}
case 12: {
enterOuterAlt(_localctx, 12);
setState(2501);
returnFromSubroutineGivenCondition();
break;
}
case 13: {
enterOuterAlt(_localctx, 13);
setState(2502);
returnAndEnableInterrupt();
break;
}
case 14: {
enterOuterAlt(_localctx, 14);
setState(2503);
returnFromNonMaskableInterrupt();
break;
}
case 15: {
enterOuterAlt(_localctx, 15);
setState(2504);
restartCommand();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- InputCommandNameContext ------------------------------------------------------------------
Z80Parser::InputCommandNameContext::InputCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::InputCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleInputCommandName;
}
void Z80Parser::InputCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterInputCommandName(this);
}
void Z80Parser::InputCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitInputCommandName(this);
}
Z80Parser::InputCommandNameContext* Z80Parser::inputCommandName() {
InputCommandNameContext *_localctx = _tracker.createInstance<InputCommandNameContext>(_ctx, getState());
enterRule(_localctx, 640, Z80Parser::RuleInputCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2507);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__202
|| _la == Z80Parser::T__203)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OutCommandNameContext ------------------------------------------------------------------
Z80Parser::OutCommandNameContext::OutCommandNameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::OutCommandNameContext::getRuleIndex() const {
return Z80Parser::RuleOutCommandName;
}
void Z80Parser::OutCommandNameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOutCommandName(this);
}
void Z80Parser::OutCommandNameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOutCommandName(this);
}
Z80Parser::OutCommandNameContext* Z80Parser::outCommandName() {
OutCommandNameContext *_localctx = _tracker.createInstance<OutCommandNameContext>(_ctx, getState());
enterRule(_localctx, 642, Z80Parser::RuleOutCommandName);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2509);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__204
|| _la == Z80Parser::T__205)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- InputDataIntoAContext ------------------------------------------------------------------
Z80Parser::InputDataIntoAContext::InputDataIntoAContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::InputCommandNameContext* Z80Parser::InputDataIntoAContext::inputCommandName() {
return getRuleContext<Z80Parser::InputCommandNameContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::InputDataIntoAContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
Z80Parser::NumberPointerContext* Z80Parser::InputDataIntoAContext::numberPointer() {
return getRuleContext<Z80Parser::NumberPointerContext>(0);
}
size_t Z80Parser::InputDataIntoAContext::getRuleIndex() const {
return Z80Parser::RuleInputDataIntoA;
}
void Z80Parser::InputDataIntoAContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterInputDataIntoA(this);
}
void Z80Parser::InputDataIntoAContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitInputDataIntoA(this);
}
Z80Parser::InputDataIntoAContext* Z80Parser::inputDataIntoA() {
InputDataIntoAContext *_localctx = _tracker.createInstance<InputDataIntoAContext>(_ctx, getState());
enterRule(_localctx, 644, Z80Parser::RuleInputDataIntoA);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2511);
inputCommandName();
setState(2512);
dynamic_cast<InputDataIntoAContext *>(_localctx)->dest = aRegister();
setState(2513);
match(Z80Parser::T__73);
setState(2514);
dynamic_cast<InputDataIntoAContext *>(_localctx)->source = numberPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- InputDataIntoRegisterContext ------------------------------------------------------------------
Z80Parser::InputDataIntoRegisterContext::InputDataIntoRegisterContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::InputCommandNameContext* Z80Parser::InputDataIntoRegisterContext::inputCommandName() {
return getRuleContext<Z80Parser::InputCommandNameContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::InputDataIntoRegisterContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
Z80Parser::CPointerContext* Z80Parser::InputDataIntoRegisterContext::cPointer() {
return getRuleContext<Z80Parser::CPointerContext>(0);
}
size_t Z80Parser::InputDataIntoRegisterContext::getRuleIndex() const {
return Z80Parser::RuleInputDataIntoRegister;
}
void Z80Parser::InputDataIntoRegisterContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterInputDataIntoRegister(this);
}
void Z80Parser::InputDataIntoRegisterContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitInputDataIntoRegister(this);
}
Z80Parser::InputDataIntoRegisterContext* Z80Parser::inputDataIntoRegister() {
InputDataIntoRegisterContext *_localctx = _tracker.createInstance<InputDataIntoRegisterContext>(_ctx, getState());
enterRule(_localctx, 646, Z80Parser::RuleInputDataIntoRegister);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2516);
inputCommandName();
setState(2517);
dynamic_cast<InputDataIntoRegisterContext *>(_localctx)->dest = simpleByteRegister();
setState(2518);
match(Z80Parser::T__73);
setState(2519);
dynamic_cast<InputDataIntoRegisterContext *>(_localctx)->source = cPointer();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IniContext ------------------------------------------------------------------
Z80Parser::IniContext::IniContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::IniContext::getRuleIndex() const {
return Z80Parser::RuleIni;
}
void Z80Parser::IniContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIni(this);
}
void Z80Parser::IniContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIni(this);
}
Z80Parser::IniContext* Z80Parser::ini() {
IniContext *_localctx = _tracker.createInstance<IniContext>(_ctx, getState());
enterRule(_localctx, 648, Z80Parser::RuleIni);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2521);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__206
|| _la == Z80Parser::T__207)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- InirContext ------------------------------------------------------------------
Z80Parser::InirContext::InirContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::InirContext::getRuleIndex() const {
return Z80Parser::RuleInir;
}
void Z80Parser::InirContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterInir(this);
}
void Z80Parser::InirContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitInir(this);
}
Z80Parser::InirContext* Z80Parser::inir() {
InirContext *_localctx = _tracker.createInstance<InirContext>(_ctx, getState());
enterRule(_localctx, 650, Z80Parser::RuleInir);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2523);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__208
|| _la == Z80Parser::T__209)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IndContext ------------------------------------------------------------------
Z80Parser::IndContext::IndContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::IndContext::getRuleIndex() const {
return Z80Parser::RuleInd;
}
void Z80Parser::IndContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterInd(this);
}
void Z80Parser::IndContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitInd(this);
}
Z80Parser::IndContext* Z80Parser::ind() {
IndContext *_localctx = _tracker.createInstance<IndContext>(_ctx, getState());
enterRule(_localctx, 652, Z80Parser::RuleInd);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2525);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__210
|| _la == Z80Parser::T__211)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- IndrContext ------------------------------------------------------------------
Z80Parser::IndrContext::IndrContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::IndrContext::getRuleIndex() const {
return Z80Parser::RuleIndr;
}
void Z80Parser::IndrContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterIndr(this);
}
void Z80Parser::IndrContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitIndr(this);
}
Z80Parser::IndrContext* Z80Parser::indr() {
IndrContext *_localctx = _tracker.createInstance<IndrContext>(_ctx, getState());
enterRule(_localctx, 654, Z80Parser::RuleIndr);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2527);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__212
|| _la == Z80Parser::T__213)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OutputAIntoDataPointerContext ------------------------------------------------------------------
Z80Parser::OutputAIntoDataPointerContext::OutputAIntoDataPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::OutCommandNameContext* Z80Parser::OutputAIntoDataPointerContext::outCommandName() {
return getRuleContext<Z80Parser::OutCommandNameContext>(0);
}
Z80Parser::NumberPointerContext* Z80Parser::OutputAIntoDataPointerContext::numberPointer() {
return getRuleContext<Z80Parser::NumberPointerContext>(0);
}
Z80Parser::ARegisterContext* Z80Parser::OutputAIntoDataPointerContext::aRegister() {
return getRuleContext<Z80Parser::ARegisterContext>(0);
}
size_t Z80Parser::OutputAIntoDataPointerContext::getRuleIndex() const {
return Z80Parser::RuleOutputAIntoDataPointer;
}
void Z80Parser::OutputAIntoDataPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOutputAIntoDataPointer(this);
}
void Z80Parser::OutputAIntoDataPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOutputAIntoDataPointer(this);
}
Z80Parser::OutputAIntoDataPointerContext* Z80Parser::outputAIntoDataPointer() {
OutputAIntoDataPointerContext *_localctx = _tracker.createInstance<OutputAIntoDataPointerContext>(_ctx, getState());
enterRule(_localctx, 656, Z80Parser::RuleOutputAIntoDataPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2529);
outCommandName();
setState(2530);
dynamic_cast<OutputAIntoDataPointerContext *>(_localctx)->dest = numberPointer();
setState(2531);
match(Z80Parser::T__73);
setState(2532);
dynamic_cast<OutputAIntoDataPointerContext *>(_localctx)->source = aRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OutputRegisterIntoCPointerContext ------------------------------------------------------------------
Z80Parser::OutputRegisterIntoCPointerContext::OutputRegisterIntoCPointerContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::OutCommandNameContext* Z80Parser::OutputRegisterIntoCPointerContext::outCommandName() {
return getRuleContext<Z80Parser::OutCommandNameContext>(0);
}
Z80Parser::CPointerContext* Z80Parser::OutputRegisterIntoCPointerContext::cPointer() {
return getRuleContext<Z80Parser::CPointerContext>(0);
}
Z80Parser::SimpleByteRegisterContext* Z80Parser::OutputRegisterIntoCPointerContext::simpleByteRegister() {
return getRuleContext<Z80Parser::SimpleByteRegisterContext>(0);
}
size_t Z80Parser::OutputRegisterIntoCPointerContext::getRuleIndex() const {
return Z80Parser::RuleOutputRegisterIntoCPointer;
}
void Z80Parser::OutputRegisterIntoCPointerContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOutputRegisterIntoCPointer(this);
}
void Z80Parser::OutputRegisterIntoCPointerContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOutputRegisterIntoCPointer(this);
}
Z80Parser::OutputRegisterIntoCPointerContext* Z80Parser::outputRegisterIntoCPointer() {
OutputRegisterIntoCPointerContext *_localctx = _tracker.createInstance<OutputRegisterIntoCPointerContext>(_ctx, getState());
enterRule(_localctx, 658, Z80Parser::RuleOutputRegisterIntoCPointer);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2534);
outCommandName();
setState(2535);
dynamic_cast<OutputRegisterIntoCPointerContext *>(_localctx)->dest = cPointer();
setState(2536);
match(Z80Parser::T__73);
setState(2537);
dynamic_cast<OutputRegisterIntoCPointerContext *>(_localctx)->source = simpleByteRegister();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OutiContext ------------------------------------------------------------------
Z80Parser::OutiContext::OutiContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::OutiContext::getRuleIndex() const {
return Z80Parser::RuleOuti;
}
void Z80Parser::OutiContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOuti(this);
}
void Z80Parser::OutiContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOuti(this);
}
Z80Parser::OutiContext* Z80Parser::outi() {
OutiContext *_localctx = _tracker.createInstance<OutiContext>(_ctx, getState());
enterRule(_localctx, 660, Z80Parser::RuleOuti);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2539);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__214
|| _la == Z80Parser::T__215)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OtirContext ------------------------------------------------------------------
Z80Parser::OtirContext::OtirContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::OtirContext::getRuleIndex() const {
return Z80Parser::RuleOtir;
}
void Z80Parser::OtirContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOtir(this);
}
void Z80Parser::OtirContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOtir(this);
}
Z80Parser::OtirContext* Z80Parser::otir() {
OtirContext *_localctx = _tracker.createInstance<OtirContext>(_ctx, getState());
enterRule(_localctx, 662, Z80Parser::RuleOtir);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2541);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__216
|| _la == Z80Parser::T__217)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OutdContext ------------------------------------------------------------------
Z80Parser::OutdContext::OutdContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::OutdContext::getRuleIndex() const {
return Z80Parser::RuleOutd;
}
void Z80Parser::OutdContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOutd(this);
}
void Z80Parser::OutdContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOutd(this);
}
Z80Parser::OutdContext* Z80Parser::outd() {
OutdContext *_localctx = _tracker.createInstance<OutdContext>(_ctx, getState());
enterRule(_localctx, 664, Z80Parser::RuleOutd);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2543);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__218
|| _la == Z80Parser::T__219)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OtdrContext ------------------------------------------------------------------
Z80Parser::OtdrContext::OtdrContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
size_t Z80Parser::OtdrContext::getRuleIndex() const {
return Z80Parser::RuleOtdr;
}
void Z80Parser::OtdrContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOtdr(this);
}
void Z80Parser::OtdrContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOtdr(this);
}
Z80Parser::OtdrContext* Z80Parser::otdr() {
OtdrContext *_localctx = _tracker.createInstance<OtdrContext>(_ctx, getState());
enterRule(_localctx, 666, Z80Parser::RuleOtdr);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2545);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__220
|| _la == Z80Parser::T__221)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- InputAndOutpuCommandContext ------------------------------------------------------------------
Z80Parser::InputAndOutpuCommandContext::InputAndOutpuCommandContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::InputDataIntoAContext* Z80Parser::InputAndOutpuCommandContext::inputDataIntoA() {
return getRuleContext<Z80Parser::InputDataIntoAContext>(0);
}
Z80Parser::InputDataIntoRegisterContext* Z80Parser::InputAndOutpuCommandContext::inputDataIntoRegister() {
return getRuleContext<Z80Parser::InputDataIntoRegisterContext>(0);
}
Z80Parser::IniContext* Z80Parser::InputAndOutpuCommandContext::ini() {
return getRuleContext<Z80Parser::IniContext>(0);
}
Z80Parser::InirContext* Z80Parser::InputAndOutpuCommandContext::inir() {
return getRuleContext<Z80Parser::InirContext>(0);
}
Z80Parser::IndContext* Z80Parser::InputAndOutpuCommandContext::ind() {
return getRuleContext<Z80Parser::IndContext>(0);
}
Z80Parser::IndrContext* Z80Parser::InputAndOutpuCommandContext::indr() {
return getRuleContext<Z80Parser::IndrContext>(0);
}
Z80Parser::OutputAIntoDataPointerContext* Z80Parser::InputAndOutpuCommandContext::outputAIntoDataPointer() {
return getRuleContext<Z80Parser::OutputAIntoDataPointerContext>(0);
}
Z80Parser::OutputRegisterIntoCPointerContext* Z80Parser::InputAndOutpuCommandContext::outputRegisterIntoCPointer() {
return getRuleContext<Z80Parser::OutputRegisterIntoCPointerContext>(0);
}
Z80Parser::OutiContext* Z80Parser::InputAndOutpuCommandContext::outi() {
return getRuleContext<Z80Parser::OutiContext>(0);
}
Z80Parser::OtirContext* Z80Parser::InputAndOutpuCommandContext::otir() {
return getRuleContext<Z80Parser::OtirContext>(0);
}
Z80Parser::OutdContext* Z80Parser::InputAndOutpuCommandContext::outd() {
return getRuleContext<Z80Parser::OutdContext>(0);
}
Z80Parser::OtdrContext* Z80Parser::InputAndOutpuCommandContext::otdr() {
return getRuleContext<Z80Parser::OtdrContext>(0);
}
size_t Z80Parser::InputAndOutpuCommandContext::getRuleIndex() const {
return Z80Parser::RuleInputAndOutpuCommand;
}
void Z80Parser::InputAndOutpuCommandContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterInputAndOutpuCommand(this);
}
void Z80Parser::InputAndOutpuCommandContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitInputAndOutpuCommand(this);
}
Z80Parser::InputAndOutpuCommandContext* Z80Parser::inputAndOutpuCommand() {
InputAndOutpuCommandContext *_localctx = _tracker.createInstance<InputAndOutpuCommandContext>(_ctx, getState());
enterRule(_localctx, 668, Z80Parser::RuleInputAndOutpuCommand);
auto onExit = finally([=] {
exitRule();
});
try {
setState(2559);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 108, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
setState(2547);
inputDataIntoA();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
setState(2548);
inputDataIntoRegister();
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
setState(2549);
ini();
break;
}
case 4: {
enterOuterAlt(_localctx, 4);
setState(2550);
inir();
break;
}
case 5: {
enterOuterAlt(_localctx, 5);
setState(2551);
ind();
break;
}
case 6: {
enterOuterAlt(_localctx, 6);
setState(2552);
indr();
break;
}
case 7: {
enterOuterAlt(_localctx, 7);
setState(2553);
outputAIntoDataPointer();
break;
}
case 8: {
enterOuterAlt(_localctx, 8);
setState(2554);
outputRegisterIntoCPointer();
break;
}
case 9: {
enterOuterAlt(_localctx, 9);
setState(2555);
outi();
break;
}
case 10: {
enterOuterAlt(_localctx, 10);
setState(2556);
otir();
break;
}
case 11: {
enterOuterAlt(_localctx, 11);
setState(2557);
outd();
break;
}
case 12: {
enterOuterAlt(_localctx, 12);
setState(2558);
otdr();
break;
}
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- LabelContext ------------------------------------------------------------------
Z80Parser::LabelContext::LabelContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::NameContext* Z80Parser::LabelContext::name() {
return getRuleContext<Z80Parser::NameContext>(0);
}
size_t Z80Parser::LabelContext::getRuleIndex() const {
return Z80Parser::RuleLabel;
}
void Z80Parser::LabelContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterLabel(this);
}
void Z80Parser::LabelContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitLabel(this);
}
Z80Parser::LabelContext* Z80Parser::label() {
LabelContext *_localctx = _tracker.createInstance<LabelContext>(_ctx, getState());
enterRule(_localctx, 670, Z80Parser::RuleLabel);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2561);
name();
setState(2563);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == Z80Parser::T__222) {
setState(2562);
match(Z80Parser::T__222);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- OrgDirectiveContext ------------------------------------------------------------------
Z80Parser::OrgDirectiveContext::OrgDirectiveContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::NumberContext* Z80Parser::OrgDirectiveContext::number() {
return getRuleContext<Z80Parser::NumberContext>(0);
}
size_t Z80Parser::OrgDirectiveContext::getRuleIndex() const {
return Z80Parser::RuleOrgDirective;
}
void Z80Parser::OrgDirectiveContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterOrgDirective(this);
}
void Z80Parser::OrgDirectiveContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitOrgDirective(this);
}
Z80Parser::OrgDirectiveContext* Z80Parser::orgDirective() {
OrgDirectiveContext *_localctx = _tracker.createInstance<OrgDirectiveContext>(_ctx, getState());
enterRule(_localctx, 672, Z80Parser::RuleOrgDirective);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2565);
_la = _input->LA(1);
if (!(_la == Z80Parser::T__223
|| _la == Z80Parser::T__224)) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
setState(2566);
number();
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CharNumberContext ------------------------------------------------------------------
Z80Parser::CharNumberContext::CharNumberContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* Z80Parser::CharNumberContext::CHAR() {
return getToken(Z80Parser::CHAR, 0);
}
size_t Z80Parser::CharNumberContext::getRuleIndex() const {
return Z80Parser::RuleCharNumber;
}
void Z80Parser::CharNumberContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterCharNumber(this);
}
void Z80Parser::CharNumberContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitCharNumber(this);
}
Z80Parser::CharNumberContext* Z80Parser::charNumber() {
CharNumberContext *_localctx = _tracker.createInstance<CharNumberContext>(_ctx, getState());
enterRule(_localctx, 674, Z80Parser::RuleCharNumber);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2568);
match(Z80Parser::CHAR);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- NameContext ------------------------------------------------------------------
Z80Parser::NameContext::NameContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* Z80Parser::NameContext::NAME() {
return getToken(Z80Parser::NAME, 0);
}
size_t Z80Parser::NameContext::getRuleIndex() const {
return Z80Parser::RuleName;
}
void Z80Parser::NameContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterName(this);
}
void Z80Parser::NameContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitName(this);
}
Z80Parser::NameContext* Z80Parser::name() {
NameContext *_localctx = _tracker.createInstance<NameContext>(_ctx, getState());
enterRule(_localctx, 676, Z80Parser::RuleName);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2570);
match(Z80Parser::NAME);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- NumberContext ------------------------------------------------------------------
Z80Parser::NumberContext::NumberContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
Z80Parser::HexNumberContext* Z80Parser::NumberContext::hexNumber() {
return getRuleContext<Z80Parser::HexNumberContext>(0);
}
Z80Parser::DecimalNumberContext* Z80Parser::NumberContext::decimalNumber() {
return getRuleContext<Z80Parser::DecimalNumberContext>(0);
}
Z80Parser::CharNumberContext* Z80Parser::NumberContext::charNumber() {
return getRuleContext<Z80Parser::CharNumberContext>(0);
}
Z80Parser::NameContext* Z80Parser::NumberContext::name() {
return getRuleContext<Z80Parser::NameContext>(0);
}
size_t Z80Parser::NumberContext::getRuleIndex() const {
return Z80Parser::RuleNumber;
}
void Z80Parser::NumberContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterNumber(this);
}
void Z80Parser::NumberContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitNumber(this);
}
Z80Parser::NumberContext* Z80Parser::number() {
NumberContext *_localctx = _tracker.createInstance<NumberContext>(_ctx, getState());
enterRule(_localctx, 678, Z80Parser::RuleNumber);
auto onExit = finally([=] {
exitRule();
});
try {
setState(2576);
_errHandler->sync(this);
switch (_input->LA(1)) {
case Z80Parser::HEX_DIGITS_1:
case Z80Parser::HEX_DIGITS_2:
case Z80Parser::HEX_DIGITS_3: {
enterOuterAlt(_localctx, 1);
setState(2572);
hexNumber();
break;
}
case Z80Parser::DECIMAL: {
enterOuterAlt(_localctx, 2);
setState(2573);
decimalNumber();
break;
}
case Z80Parser::CHAR: {
enterOuterAlt(_localctx, 3);
setState(2574);
charNumber();
break;
}
case Z80Parser::NAME: {
enterOuterAlt(_localctx, 4);
setState(2575);
name();
break;
}
default:
throw NoViableAltException(this);
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- DecimalNumberContext ------------------------------------------------------------------
Z80Parser::DecimalNumberContext::DecimalNumberContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* Z80Parser::DecimalNumberContext::DECIMAL() {
return getToken(Z80Parser::DECIMAL, 0);
}
size_t Z80Parser::DecimalNumberContext::getRuleIndex() const {
return Z80Parser::RuleDecimalNumber;
}
void Z80Parser::DecimalNumberContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterDecimalNumber(this);
}
void Z80Parser::DecimalNumberContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitDecimalNumber(this);
}
Z80Parser::DecimalNumberContext* Z80Parser::decimalNumber() {
DecimalNumberContext *_localctx = _tracker.createInstance<DecimalNumberContext>(_ctx, getState());
enterRule(_localctx, 680, Z80Parser::RuleDecimalNumber);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2578);
match(Z80Parser::DECIMAL);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- HexNumberContext ------------------------------------------------------------------
Z80Parser::HexNumberContext::HexNumberContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* Z80Parser::HexNumberContext::HEX_DIGITS_1() {
return getToken(Z80Parser::HEX_DIGITS_1, 0);
}
tree::TerminalNode* Z80Parser::HexNumberContext::HEX_DIGITS_2() {
return getToken(Z80Parser::HEX_DIGITS_2, 0);
}
tree::TerminalNode* Z80Parser::HexNumberContext::HEX_DIGITS_3() {
return getToken(Z80Parser::HEX_DIGITS_3, 0);
}
size_t Z80Parser::HexNumberContext::getRuleIndex() const {
return Z80Parser::RuleHexNumber;
}
void Z80Parser::HexNumberContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterHexNumber(this);
}
void Z80Parser::HexNumberContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitHexNumber(this);
}
Z80Parser::HexNumberContext* Z80Parser::hexNumber() {
HexNumberContext *_localctx = _tracker.createInstance<HexNumberContext>(_ctx, getState());
enterRule(_localctx, 682, Z80Parser::RuleHexNumber);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2580);
_la = _input->LA(1);
if (!(((((_la - 227) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 227)) & ((1ULL << (Z80Parser::HEX_DIGITS_1 - 227))
| (1ULL << (Z80Parser::HEX_DIGITS_2 - 227))
| (1ULL << (Z80Parser::HEX_DIGITS_3 - 227)))) != 0))) {
_errHandler->recoverInline(this);
}
else {
_errHandler->reportMatch(this);
consume();
}
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- CommentContext ------------------------------------------------------------------
Z80Parser::CommentContext::CommentContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* Z80Parser::CommentContext::COMMENT() {
return getToken(Z80Parser::COMMENT, 0);
}
size_t Z80Parser::CommentContext::getRuleIndex() const {
return Z80Parser::RuleComment;
}
void Z80Parser::CommentContext::enterRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->enterComment(this);
}
void Z80Parser::CommentContext::exitRule(tree::ParseTreeListener *listener) {
auto parserListener = dynamic_cast<Z80Listener *>(listener);
if (parserListener != nullptr)
parserListener->exitComment(this);
}
Z80Parser::CommentContext* Z80Parser::comment() {
CommentContext *_localctx = _tracker.createInstance<CommentContext>(_ctx, getState());
enterRule(_localctx, 684, Z80Parser::RuleComment);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(2582);
match(Z80Parser::COMMENT);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
// Static vars and initialization.
std::vector<dfa::DFA> Z80Parser::_decisionToDFA;
atn::PredictionContextCache Z80Parser::_sharedContextCache;
// We own the ATN which in turn owns the ATN states.
atn::ATN Z80Parser::_atn;
std::vector<uint16_t> Z80Parser::_serializedATN;
std::vector<std::string> Z80Parser::_ruleNames = {
"program", "statement", "instruction", "aShadowRegister", "fShadowRegister",
"bShadowRegister", "cShadowRegister", "dShadowRegister", "eShadowRegister",
"hShadowRegister", "lShadowRegister", "aRegister", "fRegister", "afRegister",
"afShadowRegister", "bcShadowRegister", "deShadowRegister", "hlShadowRegister",
"bRegister", "cRegister", "bcRegister", "dRegister", "eRegister", "deRegister",
"hRegister", "lRegister", "hlRegister", "iRegister", "rRegister", "ixRegister",
"iyRegister", "ixHighRegister", "ixLowRegister", "iyHighRegister", "iyLowRegister",
"spRegister", "pcRegister", "hlPointer", "bcPointer", "dePointer", "spPointer",
"cPointer", "ixPointerWithOffset", "iyPointerWithOffset", "numberPointer",
"simpleByteRegister", "loadCommandName", "loadByteRegisterWithByteRegister",
"loadByteRegisterWithImmediateByte", "loadByteRegisterWithHLPointer",
"loadByteRegisterWithIXOffset", "loadByteRegisterWithIYOffset", "loadHLPointerWithRegister",
"loadIXOffsetWithRegister", "loadIYOffsetWithRegister", "loadHLPointerWithImmediateByte",
"loadIXOffsetWithImmediateByte", "loadIYOffsetWithImmediateByte", "loadAWithBCPointer",
"loadAWithDEPointer", "loadAWithNNPointer", "loadBCPointerWithA", "loadDEPointerWithA",
"loadNNPointerWithA", "loadAWithI", "loadAWithR", "loadIWithA", "loadRWithA",
"loadRegisterWithIXHigh", "loadRegisterWithIXLow", "loadRegisterWithIYHigh",
"loadRegisterWithIYLow", "loadIXHighWithRegister", "ixHighOrLowRegister",
"iyHighOrLowRegister", "loadIXNibbles", "loadIYNibbles", "loadIXLowWithRegister",
"loadIYHighWithRegister", "loadIYLowWithRegister", "byteLoadCommand",
"simpleWordRegister", "loadWordWithImmediateWord", "loadIXWithImmediateWord",
"loadIYWithImmediateWord", "loadWordRegisterWithNNPointer", "loadIXWithNNPointer",
"loadIYWithNNPointer", "loadNNPointerWithWordRegister", "loadNNPointerWithIX",
"loadNNPointerWithIY", "loadSPWithHL", "loadSPWithIX", "loadSPWithIY",
"pushCommandName", "popCommandName", "pushAndPopRegister", "pushWordRegister",
"pushIX", "pushIY", "popWordRegister", "popIX", "popIY", "wordLoadCommand",
"exchangeCommandName", "exchangeDEWithHL", "exchangeAFWithShadowAF", "exchangeMultipleWordRegisters",
"exchangeSPPointerWithHL", "exchangeSPPointerWithIX", "exchangeSPPointerWithIY",
"loadHLPointerIntoDEThenDecrementBCAndIncrementHL", "loadDEPointerWithHLPointerThenDecrementBCAndIncrementHLRepeat",
"loadDEPointerWithHLPointerThenDecrementBCAndHL", "loadDEPointerWithHLPointerThenDecrementBCAndHLRepeat",
"compareAToHLPointerThenIncrementHLAndDecrementBC", "compareAToHLPointerThenIncrementHLAndDecrementBCRepeat",
"compareAToHLPointerThenDecrementHLAndBC", "compareAToHLPointerThenDecrementHLAndBCRepeat",
"exchagneAndBlockTransfrerCommand", "addCommandName", "addWithCarryCommandName",
"subtractCommandName", "subtractWithBorrowCommandName", "andCommandName",
"orCommandName", "xorCommandName", "compareCommandName", "incrementCommandName",
"decrementCommandName", "addAAndRegister", "addAAndImmediateByte", "addAAndIXH",
"addAAndIXL", "addAAndIYH", "addAAndIYL", "addAAndHLPointer", "addAAndIXOffset",
"addAAndIYOffset", "addWithCarryAAndRegister", "addWithCarryAAndHLPointer",
"addWithCarryAAndImmediate", "addWithCarryAAndIXOffset", "addWithCarryAAndIYOffset",
"addWithCarryAAndIXH", "addWithCarryAAndIXL", "addWithCarryAAndIYH", "addWithCarryAAndIYL",
"subtractRegisterFromA", "subtractHLPointerFromA", "subtractImmediateFromA",
"subtractIXOffsetFromA", "subtractIYOffsetFromA", "subtractIXHighOrLowFromA",
"subtractIYHighOrLowFromA", "subtractWithBorrowRegisterFromA", "subtractWithBorrowHLPointerFromA",
"subtractWithBorrowIXOffsetFromA", "subtractWithBorrowIYOffsetFromA",
"subtractWithBorrowImmediateFromA", "subtractWithBorrowIXHFromA", "subtractWithBorrowIXLFromA",
"subtractWithBorrowIYHFromA", "subtractWithBorrowIYLFromA", "andAWithRegister",
"andAWithImmediate", "andAWithHLPointer", "andAWithIXOffset", "andAWithIYOffset",
"andAWithIXH", "andAWithIXL", "andAWithIYH", "andAWithIYL", "orAWithRegister",
"orAWithImmediate", "orAWithHLPointer", "orAWithIXOffset", "orAWithIYOffset",
"orAWithIXH", "orAWithIXL", "orAWithIYH", "orAWithIYL", "xorAWithRegister",
"xorAWithImmediate", "xorAWithHLPointer", "xorAWithIXOffset", "xorAWithIYOffset",
"xorAWithIXH", "xorAWithIXL", "xorAWithIYH", "xorAWithIYL", "compareAWithRegister",
"compareAWithHLPointer", "compareAWithImmediate", "compareAWithIXOffset",
"compareAWithIYOffset", "compareAWithIXH", "compareAWithIXL", "compareAWithIYH",
"compareAWithIYL", "incrementRegister", "incrementIXH", "incrementIXL",
"incrementIYH", "incrementIYL", "incrementHLPointer", "incrementIXOffset",
"incrementIYOffset", "decrementRegister", "decrementIXH", "decrementIXL",
"decrementIYH", "decrementIYL", "decrementHLPointer", "decrementIXOffset",
"decrementIYOffset", "arithmeticCommand", "decimalAdjustA", "complementA",
"negateA", "complementCarryFlag", "setCarryFlag", "nop", "halt", "disableInterrupts",
"enableInterrupts", "setInterruptMode", "arithmeticControlCommand", "addHLAndWordRegister",
"addWithCarryHLAndWordRegister", "subtractWithCarryWordRegisterFromHL",
"simpleIXAdditionRegister", "simpleIYAdditionRegister", "addIXWithRegister",
"addIYWithRegister", "incrementWordRegister", "incrementIX", "incrementIY",
"decrementWordRegister", "decrementIX", "decrementIY", "wordArithemeticCommand",
"rotateLeftCircularA", "rotateLeftThroughCarryA", "rotateRightCircularA",
"rotateRightThroughCarryA", "rotateLeftCircularCommandName", "rotateLeftThroughCarryCommandName",
"rotateRightCircularCommandName", "rotateRightThroughCarryCommandName",
"shiftLeftArithmeticCommandName", "shiftLeftLogicalCommandName", "shiftRightArithmeticCommandName",
"shiftRightLogicalCommandName", "rotateDigitLeftCommandName", "rotateDigitRightCommandName",
"rotateLeftCircularRegister", "rotateLeftCircularHLPointer", "rotateLeftCircularIXOffset",
"rotateLeftCircularIYOffset", "rotateLeftThroughCarryRegister", "rotateLeftThroughCarryHLPointer",
"rotateLeftThroughCarryIXOffset", "rotateLeftThroughCarryIYOffset", "rotateRightCircularRegister",
"rotateRightCircularHLPointer", "rotateRightCircularIXOffset", "rotateRightCircularIYOffset",
"rotateRightThroughCarryRegister", "rotateRightThroughCarryHLPointer",
"rotateRightThroughCarryIXOffset", "rotateRightThroughCarryIYOffset",
"shiftLeftArithmetic", "shiftLeftLogical", "shiftRightArithmetic", "shiftRightLogical",
"rotateDigitLeft", "rotateDigitRight", "rotateCommand", "bitCommandName",
"setCommandName", "resetBitCommandName", "testBitInRegister", "testBitInHLPointer",
"testBitInIXOffset", "testBitInIYOffset", "setBitInRegister", "setBitInHLPointer",
"setBitInIXOffset", "setBitInIYOffset", "resetBitInRegister", "resetBitHLPointer",
"resetBitIXOffset", "resetBitIYOffset", "bitManipulationCommand", "jumpCondition",
"jumpCommandName", "jumpRelativeCommandName", "jumpRelativeAndDecrementCommandName",
"callCommandName", "returnCommandName", "returnAndEnableInterruptCommandName",
"returnFromNonMaskableInterruptCommandName", "restartCommandName", "jumpToAbsoluteAddress",
"jumpToAbsoluteAddressGivenCondition", "jumpToRelativeAddress", "jumpToRelativeAddressGivenCondition",
"jumpToHL", "jumpToIX", "jumpToIY", "jumpRelativeAndDecrement", "callSubroutine",
"callSubroutineWithCondition", "returnFromSubroutine", "returnFromSubroutineGivenCondition",
"returnAndEnableInterrupt", "returnFromNonMaskableInterrupt", "restartCommand",
"branchCommand", "inputCommandName", "outCommandName", "inputDataIntoA",
"inputDataIntoRegister", "ini", "inir", "ind", "indr", "outputAIntoDataPointer",
"outputRegisterIntoCPointer", "outi", "otir", "outd", "otdr", "inputAndOutpuCommand",
"label", "orgDirective", "charNumber", "name", "number", "decimalNumber",
"hexNumber", "comment"
};
std::vector<std::string> Z80Parser::_literalNames = {
"", "'A''", "'a''", "'f''", "'F''", "'b''", "'B''", "'c''", "'C''", "'d''",
"'D''", "'e''", "'E''", "'h''", "'H''", "'l''", "'L''", "'A'", "'a'",
"'F'", "'f'", "'AF'", "'af'", "'AF''", "'af''", "'BC''", "'bc''", "'DE''",
"'de''", "'HL''", "'hl''", "'B'", "'b'", "'c'", "'C'", "'BC'", "'bc'",
"'D'", "'d'", "'E'", "'e'", "'de'", "'DE'", "'h'", "'H'", "'L'", "'l'",
"'hl'", "'HL'", "'i'", "'I'", "'r'", "'R'", "'ix'", "'IX'", "'iy'", "'IY'",
"'ixh'", "'IXH'", "'ixl'", "'IXL'", "'iyh'", "'IYH'", "'iyl'", "'IYL'",
"'sp'", "'SP'", "'PC'", "'pc'", "'('", "')'", "'+'", "'LD'", "'ld'", "','",
"'push'", "'PUSH'", "'POP'", "'pop'", "'ex'", "'EX'", "'exx'", "'EXX'",
"'LDI'", "'ldi'", "'LDIR'", "'ldir'", "'LDD'", "'ldd'", "'LDDR'", "'lddr'",
"'cpi'", "'CPI'", "'cpir'", "'CPIR'", "'cpd'", "'CPD'", "'cpdr'", "'CPDR'",
"'add'", "'ADD'", "'adc'", "'ADC'", "'sub'", "'SUB'", "'sbc'", "'SBC'",
"'and'", "'AND'", "'or'", "'OR'", "'xor'", "'XOR'", "'cp'", "'CP'", "'INC'",
"'inc'", "'DEC'", "'dec'", "'daa'", "'DAA'", "'CPL'", "'cpl'", "'NEG'",
"'neg'", "'CCF'", "'ccf'", "'SCF'", "'scf'", "'NOP'", "'nop'", "'halt'",
"'HALT'", "'DI'", "'di'", "'ei'", "'EI'", "'IM'", "'im'", "'RLCA'", "'rlca'",
"'RLA'", "'rla'", "'RRCA'", "'rrca'", "'RRA'", "'rra'", "'RLC'", "'rlc'",
"'RL'", "'rl'", "'RRC'", "'rrc'", "'RR'", "'rr'", "'sla'", "'SLA'", "'sll'",
"'SLL'", "'sra'", "'SRA'", "'srl'", "'SRL'", "'RLD'", "'rld'", "'RRD'",
"'rrd'", "'BIT'", "'bit'", "'SET'", "'set'", "'RES'", "'res'", "'Z'",
"'z'", "'NZ'", "'nz'", "'NC'", "'nc'", "'PO'", "'po'", "'PE'", "'pe'",
"'P'", "'p'", "'M'", "'m'", "'JP'", "'jp'", "'JR'", "'jr'", "'DJNZ'",
"'djnz'", "'CALL'", "'call'", "'RET'", "'ret'", "'RETI'", "'reti'", "'RETN'",
"'retn'", "'RST'", "'rst'", "'in'", "'IN'", "'out'", "'OUT'", "'INI'",
"'ini'", "'INIR'", "'inir'", "'IND'", "'ind'", "'INDR'", "'indr'", "'OUTI'",
"'outi'", "'otir'", "'OTIR'", "'outd'", "'OUTD'", "'otdr'", "'OTDR'",
"':'", "'.org'", "'.ORG'"
};
std::vector<std::string> Z80Parser::_symbolicNames = {
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "DECIMAL", "HEX_DIGITS_1", "HEX_DIGITS_2",
"HEX_DIGITS_3", "NAME", "CHAR", "STRING", "COMMENT", "EOL", "WS"
};
dfa::Vocabulary Z80Parser::_vocabulary(_literalNames, _symbolicNames);
std::vector<std::string> Z80Parser::_tokenNames;
Z80Parser::Initializer::Initializer() {
for (size_t i = 0; i < _symbolicNames.size(); ++i) {
std::string name = _vocabulary.getLiteralName(i);
if (name.empty()) {
name = _vocabulary.getSymbolicName(i);
}
if (name.empty()) {
_tokenNames.push_back("<INVALID>");
} else {
_tokenNames.push_back(name);
}
}
_serializedATN = {
0x3, 0x608b, 0xa72a, 0x8133, 0xb9ed, 0x417c, 0x3be7, 0x7786, 0x5964,
0x3, 0xed, 0xa1b, 0x4, 0x2, 0x9, 0x2, 0x4, 0x3, 0x9, 0x3, 0x4, 0x4,
0x9, 0x4, 0x4, 0x5, 0x9, 0x5, 0x4, 0x6, 0x9, 0x6, 0x4, 0x7, 0x9, 0x7,
0x4, 0x8, 0x9, 0x8, 0x4, 0x9, 0x9, 0x9, 0x4, 0xa, 0x9, 0xa, 0x4, 0xb,
0x9, 0xb, 0x4, 0xc, 0x9, 0xc, 0x4, 0xd, 0x9, 0xd, 0x4, 0xe, 0x9, 0xe,
0x4, 0xf, 0x9, 0xf, 0x4, 0x10, 0x9, 0x10, 0x4, 0x11, 0x9, 0x11, 0x4,
0x12, 0x9, 0x12, 0x4, 0x13, 0x9, 0x13, 0x4, 0x14, 0x9, 0x14, 0x4, 0x15,
0x9, 0x15, 0x4, 0x16, 0x9, 0x16, 0x4, 0x17, 0x9, 0x17, 0x4, 0x18, 0x9,
0x18, 0x4, 0x19, 0x9, 0x19, 0x4, 0x1a, 0x9, 0x1a, 0x4, 0x1b, 0x9, 0x1b,
0x4, 0x1c, 0x9, 0x1c, 0x4, 0x1d, 0x9, 0x1d, 0x4, 0x1e, 0x9, 0x1e, 0x4,
0x1f, 0x9, 0x1f, 0x4, 0x20, 0x9, 0x20, 0x4, 0x21, 0x9, 0x21, 0x4, 0x22,
0x9, 0x22, 0x4, 0x23, 0x9, 0x23, 0x4, 0x24, 0x9, 0x24, 0x4, 0x25, 0x9,
0x25, 0x4, 0x26, 0x9, 0x26, 0x4, 0x27, 0x9, 0x27, 0x4, 0x28, 0x9, 0x28,
0x4, 0x29, 0x9, 0x29, 0x4, 0x2a, 0x9, 0x2a, 0x4, 0x2b, 0x9, 0x2b, 0x4,
0x2c, 0x9, 0x2c, 0x4, 0x2d, 0x9, 0x2d, 0x4, 0x2e, 0x9, 0x2e, 0x4, 0x2f,
0x9, 0x2f, 0x4, 0x30, 0x9, 0x30, 0x4, 0x31, 0x9, 0x31, 0x4, 0x32, 0x9,
0x32, 0x4, 0x33, 0x9, 0x33, 0x4, 0x34, 0x9, 0x34, 0x4, 0x35, 0x9, 0x35,
0x4, 0x36, 0x9, 0x36, 0x4, 0x37, 0x9, 0x37, 0x4, 0x38, 0x9, 0x38, 0x4,
0x39, 0x9, 0x39, 0x4, 0x3a, 0x9, 0x3a, 0x4, 0x3b, 0x9, 0x3b, 0x4, 0x3c,
0x9, 0x3c, 0x4, 0x3d, 0x9, 0x3d, 0x4, 0x3e, 0x9, 0x3e, 0x4, 0x3f, 0x9,
0x3f, 0x4, 0x40, 0x9, 0x40, 0x4, 0x41, 0x9, 0x41, 0x4, 0x42, 0x9, 0x42,
0x4, 0x43, 0x9, 0x43, 0x4, 0x44, 0x9, 0x44, 0x4, 0x45, 0x9, 0x45, 0x4,
0x46, 0x9, 0x46, 0x4, 0x47, 0x9, 0x47, 0x4, 0x48, 0x9, 0x48, 0x4, 0x49,
0x9, 0x49, 0x4, 0x4a, 0x9, 0x4a, 0x4, 0x4b, 0x9, 0x4b, 0x4, 0x4c, 0x9,
0x4c, 0x4, 0x4d, 0x9, 0x4d, 0x4, 0x4e, 0x9, 0x4e, 0x4, 0x4f, 0x9, 0x4f,
0x4, 0x50, 0x9, 0x50, 0x4, 0x51, 0x9, 0x51, 0x4, 0x52, 0x9, 0x52, 0x4,
0x53, 0x9, 0x53, 0x4, 0x54, 0x9, 0x54, 0x4, 0x55, 0x9, 0x55, 0x4, 0x56,
0x9, 0x56, 0x4, 0x57, 0x9, 0x57, 0x4, 0x58, 0x9, 0x58, 0x4, 0x59, 0x9,
0x59, 0x4, 0x5a, 0x9, 0x5a, 0x4, 0x5b, 0x9, 0x5b, 0x4, 0x5c, 0x9, 0x5c,
0x4, 0x5d, 0x9, 0x5d, 0x4, 0x5e, 0x9, 0x5e, 0x4, 0x5f, 0x9, 0x5f, 0x4,
0x60, 0x9, 0x60, 0x4, 0x61, 0x9, 0x61, 0x4, 0x62, 0x9, 0x62, 0x4, 0x63,
0x9, 0x63, 0x4, 0x64, 0x9, 0x64, 0x4, 0x65, 0x9, 0x65, 0x4, 0x66, 0x9,
0x66, 0x4, 0x67, 0x9, 0x67, 0x4, 0x68, 0x9, 0x68, 0x4, 0x69, 0x9, 0x69,
0x4, 0x6a, 0x9, 0x6a, 0x4, 0x6b, 0x9, 0x6b, 0x4, 0x6c, 0x9, 0x6c, 0x4,
0x6d, 0x9, 0x6d, 0x4, 0x6e, 0x9, 0x6e, 0x4, 0x6f, 0x9, 0x6f, 0x4, 0x70,
0x9, 0x70, 0x4, 0x71, 0x9, 0x71, 0x4, 0x72, 0x9, 0x72, 0x4, 0x73, 0x9,
0x73, 0x4, 0x74, 0x9, 0x74, 0x4, 0x75, 0x9, 0x75, 0x4, 0x76, 0x9, 0x76,
0x4, 0x77, 0x9, 0x77, 0x4, 0x78, 0x9, 0x78, 0x4, 0x79, 0x9, 0x79, 0x4,
0x7a, 0x9, 0x7a, 0x4, 0x7b, 0x9, 0x7b, 0x4, 0x7c, 0x9, 0x7c, 0x4, 0x7d,
0x9, 0x7d, 0x4, 0x7e, 0x9, 0x7e, 0x4, 0x7f, 0x9, 0x7f, 0x4, 0x80, 0x9,
0x80, 0x4, 0x81, 0x9, 0x81, 0x4, 0x82, 0x9, 0x82, 0x4, 0x83, 0x9, 0x83,
0x4, 0x84, 0x9, 0x84, 0x4, 0x85, 0x9, 0x85, 0x4, 0x86, 0x9, 0x86, 0x4,
0x87, 0x9, 0x87, 0x4, 0x88, 0x9, 0x88, 0x4, 0x89, 0x9, 0x89, 0x4, 0x8a,
0x9, 0x8a, 0x4, 0x8b, 0x9, 0x8b, 0x4, 0x8c, 0x9, 0x8c, 0x4, 0x8d, 0x9,
0x8d, 0x4, 0x8e, 0x9, 0x8e, 0x4, 0x8f, 0x9, 0x8f, 0x4, 0x90, 0x9, 0x90,
0x4, 0x91, 0x9, 0x91, 0x4, 0x92, 0x9, 0x92, 0x4, 0x93, 0x9, 0x93, 0x4,
0x94, 0x9, 0x94, 0x4, 0x95, 0x9, 0x95, 0x4, 0x96, 0x9, 0x96, 0x4, 0x97,
0x9, 0x97, 0x4, 0x98, 0x9, 0x98, 0x4, 0x99, 0x9, 0x99, 0x4, 0x9a, 0x9,
0x9a, 0x4, 0x9b, 0x9, 0x9b, 0x4, 0x9c, 0x9, 0x9c, 0x4, 0x9d, 0x9, 0x9d,
0x4, 0x9e, 0x9, 0x9e, 0x4, 0x9f, 0x9, 0x9f, 0x4, 0xa0, 0x9, 0xa0, 0x4,
0xa1, 0x9, 0xa1, 0x4, 0xa2, 0x9, 0xa2, 0x4, 0xa3, 0x9, 0xa3, 0x4, 0xa4,
0x9, 0xa4, 0x4, 0xa5, 0x9, 0xa5, 0x4, 0xa6, 0x9, 0xa6, 0x4, 0xa7, 0x9,
0xa7, 0x4, 0xa8, 0x9, 0xa8, 0x4, 0xa9, 0x9, 0xa9, 0x4, 0xaa, 0x9, 0xaa,
0x4, 0xab, 0x9, 0xab, 0x4, 0xac, 0x9, 0xac, 0x4, 0xad, 0x9, 0xad, 0x4,
0xae, 0x9, 0xae, 0x4, 0xaf, 0x9, 0xaf, 0x4, 0xb0, 0x9, 0xb0, 0x4, 0xb1,
0x9, 0xb1, 0x4, 0xb2, 0x9, 0xb2, 0x4, 0xb3, 0x9, 0xb3, 0x4, 0xb4, 0x9,
0xb4, 0x4, 0xb5, 0x9, 0xb5, 0x4, 0xb6, 0x9, 0xb6, 0x4, 0xb7, 0x9, 0xb7,
0x4, 0xb8, 0x9, 0xb8, 0x4, 0xb9, 0x9, 0xb9, 0x4, 0xba, 0x9, 0xba, 0x4,
0xbb, 0x9, 0xbb, 0x4, 0xbc, 0x9, 0xbc, 0x4, 0xbd, 0x9, 0xbd, 0x4, 0xbe,
0x9, 0xbe, 0x4, 0xbf, 0x9, 0xbf, 0x4, 0xc0, 0x9, 0xc0, 0x4, 0xc1, 0x9,
0xc1, 0x4, 0xc2, 0x9, 0xc2, 0x4, 0xc3, 0x9, 0xc3, 0x4, 0xc4, 0x9, 0xc4,
0x4, 0xc5, 0x9, 0xc5, 0x4, 0xc6, 0x9, 0xc6, 0x4, 0xc7, 0x9, 0xc7, 0x4,
0xc8, 0x9, 0xc8, 0x4, 0xc9, 0x9, 0xc9, 0x4, 0xca, 0x9, 0xca, 0x4, 0xcb,
0x9, 0xcb, 0x4, 0xcc, 0x9, 0xcc, 0x4, 0xcd, 0x9, 0xcd, 0x4, 0xce, 0x9,
0xce, 0x4, 0xcf, 0x9, 0xcf, 0x4, 0xd0, 0x9, 0xd0, 0x4, 0xd1, 0x9, 0xd1,
0x4, 0xd2, 0x9, 0xd2, 0x4, 0xd3, 0x9, 0xd3, 0x4, 0xd4, 0x9, 0xd4, 0x4,
0xd5, 0x9, 0xd5, 0x4, 0xd6, 0x9, 0xd6, 0x4, 0xd7, 0x9, 0xd7, 0x4, 0xd8,
0x9, 0xd8, 0x4, 0xd9, 0x9, 0xd9, 0x4, 0xda, 0x9, 0xda, 0x4, 0xdb, 0x9,
0xdb, 0x4, 0xdc, 0x9, 0xdc, 0x4, 0xdd, 0x9, 0xdd, 0x4, 0xde, 0x9, 0xde,
0x4, 0xdf, 0x9, 0xdf, 0x4, 0xe0, 0x9, 0xe0, 0x4, 0xe1, 0x9, 0xe1, 0x4,
0xe2, 0x9, 0xe2, 0x4, 0xe3, 0x9, 0xe3, 0x4, 0xe4, 0x9, 0xe4, 0x4, 0xe5,
0x9, 0xe5, 0x4, 0xe6, 0x9, 0xe6, 0x4, 0xe7, 0x9, 0xe7, 0x4, 0xe8, 0x9,
0xe8, 0x4, 0xe9, 0x9, 0xe9, 0x4, 0xea, 0x9, 0xea, 0x4, 0xeb, 0x9, 0xeb,
0x4, 0xec, 0x9, 0xec, 0x4, 0xed, 0x9, 0xed, 0x4, 0xee, 0x9, 0xee, 0x4,
0xef, 0x9, 0xef, 0x4, 0xf0, 0x9, 0xf0, 0x4, 0xf1, 0x9, 0xf1, 0x4, 0xf2,
0x9, 0xf2, 0x4, 0xf3, 0x9, 0xf3, 0x4, 0xf4, 0x9, 0xf4, 0x4, 0xf5, 0x9,
0xf5, 0x4, 0xf6, 0x9, 0xf6, 0x4, 0xf7, 0x9, 0xf7, 0x4, 0xf8, 0x9, 0xf8,
0x4, 0xf9, 0x9, 0xf9, 0x4, 0xfa, 0x9, 0xfa, 0x4, 0xfb, 0x9, 0xfb, 0x4,
0xfc, 0x9, 0xfc, 0x4, 0xfd, 0x9, 0xfd, 0x4, 0xfe, 0x9, 0xfe, 0x4, 0xff,
0x9, 0xff, 0x4, 0x100, 0x9, 0x100, 0x4, 0x101, 0x9, 0x101, 0x4, 0x102,
0x9, 0x102, 0x4, 0x103, 0x9, 0x103, 0x4, 0x104, 0x9, 0x104, 0x4, 0x105,
0x9, 0x105, 0x4, 0x106, 0x9, 0x106, 0x4, 0x107, 0x9, 0x107, 0x4, 0x108,
0x9, 0x108, 0x4, 0x109, 0x9, 0x109, 0x4, 0x10a, 0x9, 0x10a, 0x4, 0x10b,
0x9, 0x10b, 0x4, 0x10c, 0x9, 0x10c, 0x4, 0x10d, 0x9, 0x10d, 0x4, 0x10e,
0x9, 0x10e, 0x4, 0x10f, 0x9, 0x10f, 0x4, 0x110, 0x9, 0x110, 0x4, 0x111,
0x9, 0x111, 0x4, 0x112, 0x9, 0x112, 0x4, 0x113, 0x9, 0x113, 0x4, 0x114,
0x9, 0x114, 0x4, 0x115, 0x9, 0x115, 0x4, 0x116, 0x9, 0x116, 0x4, 0x117,
0x9, 0x117, 0x4, 0x118, 0x9, 0x118, 0x4, 0x119, 0x9, 0x119, 0x4, 0x11a,
0x9, 0x11a, 0x4, 0x11b, 0x9, 0x11b, 0x4, 0x11c, 0x9, 0x11c, 0x4, 0x11d,
0x9, 0x11d, 0x4, 0x11e, 0x9, 0x11e, 0x4, 0x11f, 0x9, 0x11f, 0x4, 0x120,
0x9, 0x120, 0x4, 0x121, 0x9, 0x121, 0x4, 0x122, 0x9, 0x122, 0x4, 0x123,
0x9, 0x123, 0x4, 0x124, 0x9, 0x124, 0x4, 0x125, 0x9, 0x125, 0x4, 0x126,
0x9, 0x126, 0x4, 0x127, 0x9, 0x127, 0x4, 0x128, 0x9, 0x128, 0x4, 0x129,
0x9, 0x129, 0x4, 0x12a, 0x9, 0x12a, 0x4, 0x12b, 0x9, 0x12b, 0x4, 0x12c,
0x9, 0x12c, 0x4, 0x12d, 0x9, 0x12d, 0x4, 0x12e, 0x9, 0x12e, 0x4, 0x12f,
0x9, 0x12f, 0x4, 0x130, 0x9, 0x130, 0x4, 0x131, 0x9, 0x131, 0x4, 0x132,
0x9, 0x132, 0x4, 0x133, 0x9, 0x133, 0x4, 0x134, 0x9, 0x134, 0x4, 0x135,
0x9, 0x135, 0x4, 0x136, 0x9, 0x136, 0x4, 0x137, 0x9, 0x137, 0x4, 0x138,
0x9, 0x138, 0x4, 0x139, 0x9, 0x139, 0x4, 0x13a, 0x9, 0x13a, 0x4, 0x13b,
0x9, 0x13b, 0x4, 0x13c, 0x9, 0x13c, 0x4, 0x13d, 0x9, 0x13d, 0x4, 0x13e,
0x9, 0x13e, 0x4, 0x13f, 0x9, 0x13f, 0x4, 0x140, 0x9, 0x140, 0x4, 0x141,
0x9, 0x141, 0x4, 0x142, 0x9, 0x142, 0x4, 0x143, 0x9, 0x143, 0x4, 0x144,
0x9, 0x144, 0x4, 0x145, 0x9, 0x145, 0x4, 0x146, 0x9, 0x146, 0x4, 0x147,
0x9, 0x147, 0x4, 0x148, 0x9, 0x148, 0x4, 0x149, 0x9, 0x149, 0x4, 0x14a,
0x9, 0x14a, 0x4, 0x14b, 0x9, 0x14b, 0x4, 0x14c, 0x9, 0x14c, 0x4, 0x14d,
0x9, 0x14d, 0x4, 0x14e, 0x9, 0x14e, 0x4, 0x14f, 0x9, 0x14f, 0x4, 0x150,
0x9, 0x150, 0x4, 0x151, 0x9, 0x151, 0x4, 0x152, 0x9, 0x152, 0x4, 0x153,
0x9, 0x153, 0x4, 0x154, 0x9, 0x154, 0x4, 0x155, 0x9, 0x155, 0x4, 0x156,
0x9, 0x156, 0x4, 0x157, 0x9, 0x157, 0x4, 0x158, 0x9, 0x158, 0x3, 0x2,
0x7, 0x2, 0x2b2, 0xa, 0x2, 0xc, 0x2, 0xe, 0x2, 0x2b5, 0xb, 0x2, 0x3,
0x3, 0x5, 0x3, 0x2b8, 0xa, 0x3, 0x3, 0x3, 0x5, 0x3, 0x2bb, 0xa, 0x3,
0x3, 0x3, 0x5, 0x3, 0x2be, 0xa, 0x3, 0x3, 0x3, 0x3, 0x3, 0x5, 0x3, 0x2c2,
0xa, 0x3, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4,
0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x3, 0x4, 0x5, 0x4, 0x2ce, 0xa, 0x4, 0x3,
0x5, 0x3, 0x5, 0x3, 0x6, 0x3, 0x6, 0x3, 0x7, 0x3, 0x7, 0x3, 0x8, 0x3,
0x8, 0x3, 0x9, 0x3, 0x9, 0x3, 0xa, 0x3, 0xa, 0x3, 0xb, 0x3, 0xb, 0x3,
0xc, 0x3, 0xc, 0x3, 0xd, 0x3, 0xd, 0x3, 0xd, 0x5, 0xd, 0x2e3, 0xa, 0xd,
0x3, 0xe, 0x3, 0xe, 0x3, 0xe, 0x5, 0xe, 0x2e8, 0xa, 0xe, 0x3, 0xf, 0x3,
0xf, 0x3, 0xf, 0x5, 0xf, 0x2ed, 0xa, 0xf, 0x3, 0x10, 0x3, 0x10, 0x3,
0x11, 0x3, 0x11, 0x3, 0x12, 0x3, 0x12, 0x3, 0x13, 0x3, 0x13, 0x3, 0x14,
0x3, 0x14, 0x3, 0x14, 0x5, 0x14, 0x2fa, 0xa, 0x14, 0x3, 0x15, 0x3, 0x15,
0x3, 0x15, 0x5, 0x15, 0x2ff, 0xa, 0x15, 0x3, 0x16, 0x3, 0x16, 0x3, 0x16,
0x5, 0x16, 0x304, 0xa, 0x16, 0x3, 0x17, 0x3, 0x17, 0x3, 0x17, 0x5, 0x17,
0x309, 0xa, 0x17, 0x3, 0x18, 0x3, 0x18, 0x3, 0x18, 0x5, 0x18, 0x30e,
0xa, 0x18, 0x3, 0x19, 0x3, 0x19, 0x3, 0x19, 0x5, 0x19, 0x313, 0xa, 0x19,
0x3, 0x1a, 0x3, 0x1a, 0x3, 0x1a, 0x5, 0x1a, 0x318, 0xa, 0x1a, 0x3, 0x1b,
0x3, 0x1b, 0x3, 0x1b, 0x5, 0x1b, 0x31d, 0xa, 0x1b, 0x3, 0x1c, 0x3, 0x1c,
0x3, 0x1c, 0x5, 0x1c, 0x322, 0xa, 0x1c, 0x3, 0x1d, 0x3, 0x1d, 0x3, 0x1e,
0x3, 0x1e, 0x3, 0x1f, 0x3, 0x1f, 0x3, 0x20, 0x3, 0x20, 0x3, 0x21, 0x3,
0x21, 0x3, 0x22, 0x3, 0x22, 0x3, 0x23, 0x3, 0x23, 0x3, 0x24, 0x3, 0x24,
0x3, 0x25, 0x3, 0x25, 0x3, 0x26, 0x3, 0x26, 0x3, 0x27, 0x3, 0x27, 0x3,
0x27, 0x3, 0x27, 0x3, 0x28, 0x3, 0x28, 0x3, 0x28, 0x3, 0x28, 0x3, 0x29,
0x3, 0x29, 0x3, 0x29, 0x3, 0x29, 0x3, 0x2a, 0x3, 0x2a, 0x3, 0x2a, 0x3,
0x2a, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2b, 0x3, 0x2c, 0x3, 0x2c,
0x3, 0x2c, 0x3, 0x2c, 0x3, 0x2c, 0x3, 0x2c, 0x3, 0x2d, 0x3, 0x2d, 0x3,
0x2d, 0x3, 0x2d, 0x3, 0x2d, 0x3, 0x2d, 0x3, 0x2e, 0x3, 0x2e, 0x3, 0x2e,
0x3, 0x2e, 0x3, 0x2f, 0x3, 0x2f, 0x3, 0x2f, 0x3, 0x2f, 0x3, 0x2f, 0x3,
0x2f, 0x3, 0x2f, 0x5, 0x2f, 0x363, 0xa, 0x2f, 0x3, 0x30, 0x3, 0x30,
0x3, 0x31, 0x3, 0x31, 0x3, 0x31, 0x3, 0x31, 0x3, 0x31, 0x3, 0x32, 0x3,
0x32, 0x3, 0x32, 0x3, 0x32, 0x3, 0x32, 0x3, 0x33, 0x3, 0x33, 0x3, 0x33,
0x3, 0x33, 0x3, 0x33, 0x3, 0x34, 0x3, 0x34, 0x3, 0x34, 0x3, 0x34, 0x3,
0x34, 0x3, 0x35, 0x3, 0x35, 0x3, 0x35, 0x3, 0x35, 0x3, 0x35, 0x3, 0x36,
0x3, 0x36, 0x3, 0x36, 0x3, 0x36, 0x3, 0x36, 0x3, 0x37, 0x3, 0x37, 0x3,
0x37, 0x3, 0x37, 0x3, 0x37, 0x3, 0x38, 0x3, 0x38, 0x3, 0x38, 0x3, 0x38,
0x3, 0x38, 0x3, 0x39, 0x3, 0x39, 0x3, 0x39, 0x3, 0x39, 0x3, 0x39, 0x3,
0x3a, 0x3, 0x3a, 0x3, 0x3a, 0x3, 0x3a, 0x3, 0x3a, 0x3, 0x3b, 0x3, 0x3b,
0x3, 0x3b, 0x3, 0x3b, 0x3, 0x3b, 0x3, 0x3c, 0x3, 0x3c, 0x3, 0x3c, 0x3,
0x3c, 0x3, 0x3c, 0x3, 0x3d, 0x3, 0x3d, 0x3, 0x3d, 0x3, 0x3d, 0x3, 0x3d,
0x3, 0x3e, 0x3, 0x3e, 0x3, 0x3e, 0x3, 0x3e, 0x3, 0x3e, 0x3, 0x3f, 0x3,
0x3f, 0x3, 0x3f, 0x3, 0x3f, 0x3, 0x3f, 0x3, 0x40, 0x3, 0x40, 0x3, 0x40,
0x3, 0x40, 0x3, 0x40, 0x3, 0x41, 0x3, 0x41, 0x3, 0x41, 0x3, 0x41, 0x3,
0x41, 0x3, 0x42, 0x3, 0x42, 0x3, 0x42, 0x3, 0x42, 0x3, 0x42, 0x3, 0x43,
0x3, 0x43, 0x3, 0x43, 0x3, 0x43, 0x3, 0x43, 0x3, 0x44, 0x3, 0x44, 0x3,
0x44, 0x3, 0x44, 0x3, 0x44, 0x3, 0x45, 0x3, 0x45, 0x3, 0x45, 0x3, 0x45,
0x3, 0x45, 0x3, 0x46, 0x3, 0x46, 0x3, 0x46, 0x3, 0x46, 0x3, 0x46, 0x3,
0x47, 0x3, 0x47, 0x3, 0x47, 0x3, 0x47, 0x3, 0x47, 0x3, 0x48, 0x3, 0x48,
0x3, 0x48, 0x3, 0x48, 0x3, 0x48, 0x3, 0x49, 0x3, 0x49, 0x3, 0x49, 0x3,
0x49, 0x3, 0x49, 0x3, 0x4a, 0x3, 0x4a, 0x3, 0x4a, 0x3, 0x4a, 0x3, 0x4a,
0x3, 0x4b, 0x3, 0x4b, 0x5, 0x4b, 0x3eb, 0xa, 0x4b, 0x3, 0x4c, 0x3, 0x4c,
0x5, 0x4c, 0x3ef, 0xa, 0x4c, 0x3, 0x4d, 0x3, 0x4d, 0x3, 0x4d, 0x3, 0x4d,
0x3, 0x4d, 0x3, 0x4e, 0x3, 0x4e, 0x3, 0x4e, 0x3, 0x4e, 0x3, 0x4e, 0x3,
0x4f, 0x3, 0x4f, 0x3, 0x4f, 0x3, 0x4f, 0x3, 0x4f, 0x3, 0x50, 0x3, 0x50,
0x3, 0x50, 0x3, 0x50, 0x3, 0x50, 0x3, 0x51, 0x3, 0x51, 0x3, 0x51, 0x3,
0x51, 0x3, 0x51, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52,
0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3,
0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52,
0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3,
0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52, 0x3, 0x52,
0x5, 0x52, 0x429, 0xa, 0x52, 0x3, 0x53, 0x3, 0x53, 0x3, 0x53, 0x3, 0x53,
0x5, 0x53, 0x42f, 0xa, 0x53, 0x3, 0x54, 0x3, 0x54, 0x3, 0x54, 0x3, 0x54,
0x3, 0x54, 0x3, 0x55, 0x3, 0x55, 0x3, 0x55, 0x3, 0x55, 0x3, 0x55, 0x3,
0x56, 0x3, 0x56, 0x3, 0x56, 0x3, 0x56, 0x3, 0x56, 0x3, 0x57, 0x3, 0x57,
0x3, 0x57, 0x3, 0x57, 0x3, 0x57, 0x3, 0x58, 0x3, 0x58, 0x3, 0x58, 0x3,
0x58, 0x3, 0x58, 0x3, 0x59, 0x3, 0x59, 0x3, 0x59, 0x3, 0x59, 0x3, 0x59,
0x3, 0x5a, 0x3, 0x5a, 0x3, 0x5a, 0x3, 0x5a, 0x3, 0x5a, 0x3, 0x5b, 0x3,
0x5b, 0x3, 0x5b, 0x3, 0x5b, 0x3, 0x5b, 0x3, 0x5c, 0x3, 0x5c, 0x3, 0x5c,
0x3, 0x5c, 0x3, 0x5c, 0x3, 0x5d, 0x3, 0x5d, 0x3, 0x5d, 0x3, 0x5d, 0x3,
0x5d, 0x3, 0x5e, 0x3, 0x5e, 0x3, 0x5e, 0x3, 0x5e, 0x3, 0x5e, 0x3, 0x5f,
0x3, 0x5f, 0x3, 0x5f, 0x3, 0x5f, 0x3, 0x5f, 0x3, 0x60, 0x3, 0x60, 0x3,
0x61, 0x3, 0x61, 0x3, 0x62, 0x3, 0x62, 0x3, 0x62, 0x3, 0x62, 0x3, 0x62,
0x5, 0x62, 0x476, 0xa, 0x62, 0x3, 0x63, 0x3, 0x63, 0x3, 0x63, 0x3, 0x64,
0x3, 0x64, 0x3, 0x64, 0x3, 0x65, 0x3, 0x65, 0x3, 0x65, 0x3, 0x66, 0x3,
0x66, 0x3, 0x66, 0x3, 0x67, 0x3, 0x67, 0x3, 0x67, 0x3, 0x68, 0x3, 0x68,
0x3, 0x68, 0x3, 0x69, 0x3, 0x69, 0x3, 0x69, 0x3, 0x69, 0x3, 0x69, 0x3,
0x69, 0x3, 0x69, 0x3, 0x69, 0x3, 0x69, 0x3, 0x69, 0x3, 0x69, 0x3, 0x69,
0x3, 0x69, 0x3, 0x69, 0x3, 0x69, 0x3, 0x69, 0x3, 0x69, 0x3, 0x69, 0x5,
0x69, 0x49c, 0xa, 0x69, 0x3, 0x6a, 0x3, 0x6a, 0x3, 0x6b, 0x3, 0x6b,
0x3, 0x6b, 0x3, 0x6b, 0x3, 0x6b, 0x3, 0x6c, 0x3, 0x6c, 0x3, 0x6c, 0x3,
0x6c, 0x3, 0x6c, 0x3, 0x6d, 0x3, 0x6d, 0x3, 0x6e, 0x3, 0x6e, 0x3, 0x6e,
0x3, 0x6e, 0x3, 0x6e, 0x3, 0x6f, 0x3, 0x6f, 0x3, 0x6f, 0x3, 0x6f, 0x3,
0x6f, 0x3, 0x70, 0x3, 0x70, 0x3, 0x70, 0x3, 0x70, 0x3, 0x70, 0x3, 0x71,
0x3, 0x71, 0x3, 0x72, 0x3, 0x72, 0x3, 0x73, 0x3, 0x73, 0x3, 0x74, 0x3,
0x74, 0x3, 0x75, 0x3, 0x75, 0x3, 0x76, 0x3, 0x76, 0x3, 0x77, 0x3, 0x77,
0x3, 0x78, 0x3, 0x78, 0x3, 0x79, 0x3, 0x79, 0x3, 0x79, 0x3, 0x79, 0x3,
0x79, 0x3, 0x79, 0x3, 0x79, 0x3, 0x79, 0x3, 0x79, 0x3, 0x79, 0x3, 0x79,
0x3, 0x79, 0x3, 0x79, 0x3, 0x79, 0x5, 0x79, 0x4d9, 0xa, 0x79, 0x3, 0x7a,
0x3, 0x7a, 0x3, 0x7b, 0x3, 0x7b, 0x3, 0x7c, 0x3, 0x7c, 0x3, 0x7d, 0x3,
0x7d, 0x3, 0x7e, 0x3, 0x7e, 0x3, 0x7f, 0x3, 0x7f, 0x3, 0x80, 0x3, 0x80,
0x3, 0x81, 0x3, 0x81, 0x3, 0x82, 0x3, 0x82, 0x3, 0x83, 0x3, 0x83, 0x3,
0x84, 0x3, 0x84, 0x3, 0x84, 0x3, 0x84, 0x3, 0x84, 0x3, 0x84, 0x3, 0x84,
0x3, 0x84, 0x5, 0x84, 0x4f7, 0xa, 0x84, 0x3, 0x85, 0x3, 0x85, 0x3, 0x85,
0x3, 0x85, 0x3, 0x85, 0x3, 0x85, 0x3, 0x85, 0x3, 0x85, 0x5, 0x85, 0x501,
0xa, 0x85, 0x3, 0x86, 0x3, 0x86, 0x3, 0x86, 0x3, 0x86, 0x3, 0x86, 0x3,
0x86, 0x3, 0x86, 0x3, 0x86, 0x5, 0x86, 0x50b, 0xa, 0x86, 0x3, 0x87,
0x3, 0x87, 0x3, 0x87, 0x3, 0x87, 0x3, 0x87, 0x3, 0x87, 0x3, 0x87, 0x3,
0x87, 0x5, 0x87, 0x515, 0xa, 0x87, 0x3, 0x88, 0x3, 0x88, 0x3, 0x88,
0x3, 0x88, 0x3, 0x88, 0x3, 0x88, 0x3, 0x88, 0x3, 0x88, 0x5, 0x88, 0x51f,
0xa, 0x88, 0x3, 0x89, 0x3, 0x89, 0x3, 0x89, 0x3, 0x89, 0x3, 0x89, 0x3,
0x89, 0x3, 0x89, 0x3, 0x89, 0x5, 0x89, 0x529, 0xa, 0x89, 0x3, 0x8a,
0x3, 0x8a, 0x3, 0x8a, 0x3, 0x8a, 0x3, 0x8a, 0x3, 0x8a, 0x3, 0x8a, 0x3,
0x8a, 0x5, 0x8a, 0x533, 0xa, 0x8a, 0x3, 0x8b, 0x3, 0x8b, 0x3, 0x8b,
0x3, 0x8b, 0x3, 0x8b, 0x3, 0x8b, 0x3, 0x8b, 0x3, 0x8b, 0x5, 0x8b, 0x53d,
0xa, 0x8b, 0x3, 0x8c, 0x3, 0x8c, 0x3, 0x8c, 0x3, 0x8c, 0x3, 0x8c, 0x3,
0x8c, 0x3, 0x8c, 0x3, 0x8c, 0x5, 0x8c, 0x547, 0xa, 0x8c, 0x3, 0x8d,
0x3, 0x8d, 0x3, 0x8d, 0x3, 0x8d, 0x3, 0x8d, 0x3, 0x8d, 0x3, 0x8d, 0x3,
0x8d, 0x5, 0x8d, 0x551, 0xa, 0x8d, 0x3, 0x8e, 0x3, 0x8e, 0x3, 0x8e,
0x3, 0x8e, 0x3, 0x8e, 0x3, 0x8e, 0x3, 0x8e, 0x3, 0x8e, 0x5, 0x8e, 0x55b,
0xa, 0x8e, 0x3, 0x8f, 0x3, 0x8f, 0x3, 0x8f, 0x3, 0x8f, 0x3, 0x8f, 0x3,
0x8f, 0x3, 0x8f, 0x3, 0x8f, 0x5, 0x8f, 0x565, 0xa, 0x8f, 0x3, 0x90,
0x3, 0x90, 0x3, 0x90, 0x3, 0x90, 0x3, 0x90, 0x3, 0x90, 0x3, 0x90, 0x3,
0x90, 0x5, 0x90, 0x56f, 0xa, 0x90, 0x3, 0x91, 0x3, 0x91, 0x3, 0x91,
0x3, 0x91, 0x3, 0x91, 0x3, 0x91, 0x3, 0x91, 0x3, 0x91, 0x5, 0x91, 0x579,
0xa, 0x91, 0x3, 0x92, 0x3, 0x92, 0x3, 0x92, 0x3, 0x92, 0x3, 0x92, 0x3,
0x92, 0x3, 0x92, 0x3, 0x92, 0x5, 0x92, 0x583, 0xa, 0x92, 0x3, 0x93,
0x3, 0x93, 0x3, 0x93, 0x3, 0x93, 0x3, 0x93, 0x3, 0x93, 0x3, 0x93, 0x3,
0x93, 0x5, 0x93, 0x58d, 0xa, 0x93, 0x3, 0x94, 0x3, 0x94, 0x3, 0x94,
0x3, 0x94, 0x3, 0x94, 0x3, 0x94, 0x3, 0x94, 0x3, 0x94, 0x5, 0x94, 0x597,
0xa, 0x94, 0x3, 0x95, 0x3, 0x95, 0x3, 0x95, 0x3, 0x95, 0x3, 0x95, 0x3,
0x95, 0x3, 0x95, 0x3, 0x95, 0x5, 0x95, 0x5a1, 0xa, 0x95, 0x3, 0x96,
0x3, 0x96, 0x3, 0x96, 0x3, 0x96, 0x3, 0x96, 0x3, 0x96, 0x3, 0x96, 0x3,
0x96, 0x5, 0x96, 0x5ab, 0xa, 0x96, 0x3, 0x97, 0x3, 0x97, 0x3, 0x97,
0x3, 0x97, 0x3, 0x97, 0x3, 0x97, 0x3, 0x97, 0x3, 0x97, 0x5, 0x97, 0x5b5,
0xa, 0x97, 0x3, 0x98, 0x3, 0x98, 0x3, 0x98, 0x3, 0x98, 0x3, 0x98, 0x3,
0x98, 0x3, 0x98, 0x3, 0x98, 0x5, 0x98, 0x5bf, 0xa, 0x98, 0x3, 0x99,
0x3, 0x99, 0x3, 0x99, 0x3, 0x99, 0x3, 0x99, 0x3, 0x99, 0x3, 0x99, 0x3,
0x99, 0x5, 0x99, 0x5c9, 0xa, 0x99, 0x3, 0x9a, 0x3, 0x9a, 0x3, 0x9a,
0x3, 0x9a, 0x3, 0x9a, 0x3, 0x9a, 0x3, 0x9a, 0x3, 0x9a, 0x5, 0x9a, 0x5d3,
0xa, 0x9a, 0x3, 0x9b, 0x3, 0x9b, 0x3, 0x9b, 0x3, 0x9b, 0x3, 0x9b, 0x3,
0x9b, 0x3, 0x9b, 0x3, 0x9b, 0x5, 0x9b, 0x5dd, 0xa, 0x9b, 0x3, 0x9c,
0x3, 0x9c, 0x3, 0x9c, 0x3, 0x9c, 0x3, 0x9c, 0x3, 0x9c, 0x3, 0x9c, 0x3,
0x9c, 0x5, 0x9c, 0x5e7, 0xa, 0x9c, 0x3, 0x9d, 0x3, 0x9d, 0x3, 0x9d,
0x3, 0x9d, 0x3, 0x9d, 0x3, 0x9d, 0x3, 0x9d, 0x3, 0x9d, 0x5, 0x9d, 0x5f1,
0xa, 0x9d, 0x3, 0x9e, 0x3, 0x9e, 0x3, 0x9e, 0x3, 0x9e, 0x3, 0x9e, 0x3,
0x9e, 0x3, 0x9e, 0x3, 0x9e, 0x5, 0x9e, 0x5fb, 0xa, 0x9e, 0x3, 0x9f,
0x3, 0x9f, 0x3, 0x9f, 0x3, 0x9f, 0x3, 0x9f, 0x3, 0x9f, 0x3, 0x9f, 0x3,
0x9f, 0x5, 0x9f, 0x605, 0xa, 0x9f, 0x3, 0xa0, 0x3, 0xa0, 0x3, 0xa0,
0x3, 0xa0, 0x3, 0xa0, 0x3, 0xa0, 0x3, 0xa0, 0x3, 0xa0, 0x5, 0xa0, 0x60f,
0xa, 0xa0, 0x3, 0xa1, 0x3, 0xa1, 0x3, 0xa1, 0x3, 0xa1, 0x3, 0xa1, 0x3,
0xa1, 0x3, 0xa1, 0x3, 0xa1, 0x5, 0xa1, 0x619, 0xa, 0xa1, 0x3, 0xa2,
0x3, 0xa2, 0x3, 0xa2, 0x3, 0xa2, 0x3, 0xa2, 0x3, 0xa2, 0x3, 0xa2, 0x3,
0xa2, 0x5, 0xa2, 0x623, 0xa, 0xa2, 0x3, 0xa3, 0x3, 0xa3, 0x3, 0xa3,
0x3, 0xa3, 0x3, 0xa3, 0x3, 0xa3, 0x3, 0xa3, 0x3, 0xa3, 0x5, 0xa3, 0x62d,
0xa, 0xa3, 0x3, 0xa4, 0x3, 0xa4, 0x3, 0xa4, 0x3, 0xa4, 0x3, 0xa4, 0x3,
0xa4, 0x3, 0xa4, 0x3, 0xa4, 0x5, 0xa4, 0x637, 0xa, 0xa4, 0x3, 0xa5,
0x3, 0xa5, 0x3, 0xa5, 0x3, 0xa5, 0x3, 0xa5, 0x3, 0xa5, 0x3, 0xa5, 0x3,
0xa5, 0x5, 0xa5, 0x641, 0xa, 0xa5, 0x3, 0xa6, 0x3, 0xa6, 0x3, 0xa6,
0x3, 0xa6, 0x3, 0xa6, 0x3, 0xa6, 0x3, 0xa6, 0x3, 0xa6, 0x5, 0xa6, 0x64b,
0xa, 0xa6, 0x3, 0xa7, 0x3, 0xa7, 0x3, 0xa7, 0x3, 0xa7, 0x3, 0xa7, 0x3,
0xa7, 0x3, 0xa7, 0x3, 0xa7, 0x5, 0xa7, 0x655, 0xa, 0xa7, 0x3, 0xa8,
0x3, 0xa8, 0x3, 0xa8, 0x3, 0xa8, 0x3, 0xa8, 0x3, 0xa8, 0x3, 0xa8, 0x3,
0xa8, 0x5, 0xa8, 0x65f, 0xa, 0xa8, 0x3, 0xa9, 0x3, 0xa9, 0x3, 0xa9,
0x3, 0xa9, 0x3, 0xa9, 0x3, 0xa9, 0x3, 0xa9, 0x3, 0xa9, 0x5, 0xa9, 0x669,
0xa, 0xa9, 0x3, 0xaa, 0x3, 0xaa, 0x3, 0xaa, 0x3, 0xaa, 0x3, 0xaa, 0x3,
0xaa, 0x3, 0xaa, 0x3, 0xaa, 0x5, 0xaa, 0x673, 0xa, 0xaa, 0x3, 0xab,
0x3, 0xab, 0x3, 0xab, 0x3, 0xab, 0x3, 0xab, 0x3, 0xab, 0x3, 0xab, 0x3,
0xab, 0x5, 0xab, 0x67d, 0xa, 0xab, 0x3, 0xac, 0x3, 0xac, 0x3, 0xac,
0x3, 0xac, 0x3, 0xac, 0x3, 0xac, 0x3, 0xac, 0x3, 0xac, 0x5, 0xac, 0x687,
0xa, 0xac, 0x3, 0xad, 0x3, 0xad, 0x3, 0xad, 0x3, 0xad, 0x3, 0xad, 0x3,
0xad, 0x3, 0xad, 0x3, 0xad, 0x5, 0xad, 0x691, 0xa, 0xad, 0x3, 0xae,
0x3, 0xae, 0x3, 0xae, 0x3, 0xae, 0x3, 0xae, 0x3, 0xae, 0x3, 0xae, 0x3,
0xae, 0x5, 0xae, 0x69b, 0xa, 0xae, 0x3, 0xaf, 0x3, 0xaf, 0x3, 0xaf,
0x3, 0xaf, 0x3, 0xaf, 0x3, 0xaf, 0x3, 0xaf, 0x3, 0xaf, 0x5, 0xaf, 0x6a5,
0xa, 0xaf, 0x3, 0xb0, 0x3, 0xb0, 0x3, 0xb0, 0x3, 0xb0, 0x3, 0xb0, 0x3,
0xb0, 0x3, 0xb0, 0x3, 0xb0, 0x5, 0xb0, 0x6af, 0xa, 0xb0, 0x3, 0xb1,
0x3, 0xb1, 0x3, 0xb1, 0x3, 0xb1, 0x3, 0xb1, 0x3, 0xb1, 0x3, 0xb1, 0x3,
0xb1, 0x5, 0xb1, 0x6b9, 0xa, 0xb1, 0x3, 0xb2, 0x3, 0xb2, 0x3, 0xb2,
0x3, 0xb2, 0x3, 0xb2, 0x3, 0xb2, 0x3, 0xb2, 0x3, 0xb2, 0x5, 0xb2, 0x6c3,
0xa, 0xb2, 0x3, 0xb3, 0x3, 0xb3, 0x3, 0xb3, 0x3, 0xb3, 0x3, 0xb3, 0x3,
0xb3, 0x3, 0xb3, 0x3, 0xb3, 0x5, 0xb3, 0x6cd, 0xa, 0xb3, 0x3, 0xb4,
0x3, 0xb4, 0x3, 0xb4, 0x3, 0xb4, 0x3, 0xb4, 0x3, 0xb4, 0x3, 0xb4, 0x3,
0xb4, 0x5, 0xb4, 0x6d7, 0xa, 0xb4, 0x3, 0xb5, 0x3, 0xb5, 0x3, 0xb5,
0x3, 0xb5, 0x3, 0xb5, 0x3, 0xb5, 0x3, 0xb5, 0x3, 0xb5, 0x5, 0xb5, 0x6e1,
0xa, 0xb5, 0x3, 0xb6, 0x3, 0xb6, 0x3, 0xb6, 0x3, 0xb6, 0x3, 0xb6, 0x3,
0xb6, 0x3, 0xb6, 0x3, 0xb6, 0x5, 0xb6, 0x6eb, 0xa, 0xb6, 0x3, 0xb7,
0x3, 0xb7, 0x3, 0xb7, 0x3, 0xb7, 0x3, 0xb7, 0x3, 0xb7, 0x3, 0xb7, 0x3,
0xb7, 0x5, 0xb7, 0x6f5, 0xa, 0xb7, 0x3, 0xb8, 0x3, 0xb8, 0x3, 0xb8,
0x3, 0xb8, 0x3, 0xb8, 0x3, 0xb8, 0x3, 0xb8, 0x3, 0xb8, 0x5, 0xb8, 0x6ff,
0xa, 0xb8, 0x3, 0xb9, 0x3, 0xb9, 0x3, 0xb9, 0x3, 0xb9, 0x3, 0xb9, 0x3,
0xb9, 0x3, 0xb9, 0x3, 0xb9, 0x5, 0xb9, 0x709, 0xa, 0xb9, 0x3, 0xba,
0x3, 0xba, 0x3, 0xba, 0x3, 0xba, 0x3, 0xba, 0x3, 0xba, 0x3, 0xba, 0x3,
0xba, 0x5, 0xba, 0x713, 0xa, 0xba, 0x3, 0xbb, 0x3, 0xbb, 0x3, 0xbb,
0x3, 0xbb, 0x3, 0xbb, 0x3, 0xbb, 0x3, 0xbb, 0x3, 0xbb, 0x5, 0xbb, 0x71d,
0xa, 0xbb, 0x3, 0xbc, 0x3, 0xbc, 0x3, 0xbc, 0x3, 0xbc, 0x3, 0xbc, 0x3,
0xbc, 0x3, 0xbc, 0x3, 0xbc, 0x5, 0xbc, 0x727, 0xa, 0xbc, 0x3, 0xbd,
0x3, 0xbd, 0x3, 0xbd, 0x3, 0xbd, 0x3, 0xbd, 0x3, 0xbd, 0x3, 0xbd, 0x3,
0xbd, 0x5, 0xbd, 0x731, 0xa, 0xbd, 0x3, 0xbe, 0x3, 0xbe, 0x3, 0xbe,
0x3, 0xbe, 0x3, 0xbe, 0x3, 0xbe, 0x3, 0xbe, 0x3, 0xbe, 0x5, 0xbe, 0x73b,
0xa, 0xbe, 0x3, 0xbf, 0x3, 0xbf, 0x3, 0xbf, 0x3, 0xbf, 0x3, 0xbf, 0x3,
0xbf, 0x3, 0xbf, 0x3, 0xbf, 0x5, 0xbf, 0x745, 0xa, 0xbf, 0x3, 0xc0,
0x3, 0xc0, 0x3, 0xc0, 0x3, 0xc0, 0x3, 0xc0, 0x3, 0xc0, 0x3, 0xc0, 0x3,
0xc0, 0x5, 0xc0, 0x74f, 0xa, 0xc0, 0x3, 0xc1, 0x3, 0xc1, 0x3, 0xc1,
0x3, 0xc1, 0x3, 0xc1, 0x3, 0xc1, 0x3, 0xc1, 0x3, 0xc1, 0x5, 0xc1, 0x759,
0xa, 0xc1, 0x3, 0xc2, 0x3, 0xc2, 0x3, 0xc2, 0x3, 0xc2, 0x3, 0xc2, 0x3,
0xc2, 0x3, 0xc2, 0x3, 0xc2, 0x5, 0xc2, 0x763, 0xa, 0xc2, 0x3, 0xc3,
0x3, 0xc3, 0x3, 0xc3, 0x3, 0xc3, 0x3, 0xc3, 0x3, 0xc3, 0x3, 0xc3, 0x3,
0xc3, 0x5, 0xc3, 0x76d, 0xa, 0xc3, 0x3, 0xc4, 0x3, 0xc4, 0x3, 0xc4,
0x3, 0xc4, 0x3, 0xc4, 0x3, 0xc4, 0x3, 0xc4, 0x3, 0xc4, 0x5, 0xc4, 0x777,
0xa, 0xc4, 0x3, 0xc5, 0x3, 0xc5, 0x3, 0xc5, 0x3, 0xc5, 0x3, 0xc5, 0x3,
0xc5, 0x3, 0xc5, 0x3, 0xc5, 0x5, 0xc5, 0x781, 0xa, 0xc5, 0x3, 0xc6,
0x3, 0xc6, 0x3, 0xc6, 0x3, 0xc6, 0x3, 0xc6, 0x3, 0xc6, 0x3, 0xc6, 0x3,
0xc6, 0x5, 0xc6, 0x78b, 0xa, 0xc6, 0x3, 0xc7, 0x3, 0xc7, 0x3, 0xc7,
0x3, 0xc7, 0x3, 0xc7, 0x3, 0xc7, 0x3, 0xc7, 0x3, 0xc7, 0x5, 0xc7, 0x795,
0xa, 0xc7, 0x3, 0xc8, 0x3, 0xc8, 0x3, 0xc8, 0x3, 0xc8, 0x3, 0xc8, 0x3,
0xc8, 0x3, 0xc8, 0x3, 0xc8, 0x5, 0xc8, 0x79f, 0xa, 0xc8, 0x3, 0xc9,
0x3, 0xc9, 0x3, 0xc9, 0x3, 0xc9, 0x3, 0xc9, 0x3, 0xc9, 0x3, 0xc9, 0x3,
0xc9, 0x5, 0xc9, 0x7a9, 0xa, 0xc9, 0x3, 0xca, 0x3, 0xca, 0x3, 0xca,
0x3, 0xcb, 0x3, 0xcb, 0x3, 0xcb, 0x3, 0xcc, 0x3, 0xcc, 0x3, 0xcc, 0x3,
0xcd, 0x3, 0xcd, 0x3, 0xcd, 0x3, 0xce, 0x3, 0xce, 0x3, 0xce, 0x3, 0xcf,
0x3, 0xcf, 0x3, 0xcf, 0x3, 0xd0, 0x3, 0xd0, 0x3, 0xd0, 0x3, 0xd1, 0x3,
0xd1, 0x3, 0xd1, 0x3, 0xd2, 0x3, 0xd2, 0x3, 0xd2, 0x3, 0xd3, 0x3, 0xd3,
0x3, 0xd3, 0x3, 0xd4, 0x3, 0xd4, 0x3, 0xd4, 0x3, 0xd5, 0x3, 0xd5, 0x3,
0xd5, 0x3, 0xd6, 0x3, 0xd6, 0x3, 0xd6, 0x3, 0xd7, 0x3, 0xd7, 0x3, 0xd7,
0x3, 0xd8, 0x3, 0xd8, 0x3, 0xd8, 0x3, 0xd9, 0x3, 0xd9, 0x3, 0xd9, 0x3,
0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda,
0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3,
0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda,
0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3,
0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda,
0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3,
0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda,
0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3,
0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda,
0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3,
0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda,
0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3,
0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda, 0x3, 0xda,
0x3, 0xda, 0x5, 0xda, 0x831, 0xa, 0xda, 0x3, 0xdb, 0x3, 0xdb, 0x3, 0xdc,
0x3, 0xdc, 0x3, 0xdd, 0x3, 0xdd, 0x3, 0xde, 0x3, 0xde, 0x3, 0xdf, 0x3,
0xdf, 0x3, 0xe0, 0x3, 0xe0, 0x3, 0xe1, 0x3, 0xe1, 0x3, 0xe2, 0x3, 0xe2,
0x3, 0xe3, 0x3, 0xe3, 0x3, 0xe4, 0x3, 0xe4, 0x3, 0xe4, 0x3, 0xe5, 0x3,
0xe5, 0x3, 0xe5, 0x3, 0xe5, 0x3, 0xe5, 0x3, 0xe5, 0x3, 0xe5, 0x3, 0xe5,
0x3, 0xe5, 0x3, 0xe5, 0x5, 0xe5, 0x852, 0xa, 0xe5, 0x3, 0xe6, 0x3, 0xe6,
0x3, 0xe6, 0x3, 0xe6, 0x3, 0xe6, 0x3, 0xe7, 0x3, 0xe7, 0x3, 0xe7, 0x3,
0xe7, 0x3, 0xe7, 0x3, 0xe8, 0x3, 0xe8, 0x3, 0xe8, 0x3, 0xe8, 0x3, 0xe8,
0x3, 0xe9, 0x3, 0xe9, 0x3, 0xe9, 0x3, 0xe9, 0x3, 0xe9, 0x5, 0xe9, 0x868,
0xa, 0xe9, 0x3, 0xea, 0x3, 0xea, 0x3, 0xea, 0x3, 0xea, 0x3, 0xea, 0x5,
0xea, 0x86f, 0xa, 0xea, 0x3, 0xeb, 0x3, 0xeb, 0x3, 0xeb, 0x3, 0xeb,
0x3, 0xeb, 0x3, 0xec, 0x3, 0xec, 0x3, 0xec, 0x3, 0xec, 0x3, 0xec, 0x3,
0xed, 0x3, 0xed, 0x3, 0xed, 0x3, 0xee, 0x3, 0xee, 0x3, 0xee, 0x3, 0xef,
0x3, 0xef, 0x3, 0xef, 0x3, 0xf0, 0x3, 0xf0, 0x3, 0xf0, 0x3, 0xf1, 0x3,
0xf1, 0x3, 0xf1, 0x3, 0xf2, 0x3, 0xf2, 0x3, 0xf2, 0x3, 0xf3, 0x3, 0xf3,
0x3, 0xf3, 0x3, 0xf3, 0x3, 0xf3, 0x3, 0xf3, 0x3, 0xf3, 0x3, 0xf3, 0x3,
0xf3, 0x3, 0xf3, 0x3, 0xf3, 0x3, 0xf3, 0x5, 0xf3, 0x899, 0xa, 0xf3,
0x3, 0xf4, 0x3, 0xf4, 0x3, 0xf5, 0x3, 0xf5, 0x3, 0xf6, 0x3, 0xf6, 0x3,
0xf7, 0x3, 0xf7, 0x3, 0xf8, 0x3, 0xf8, 0x3, 0xf9, 0x3, 0xf9, 0x3, 0xfa,
0x3, 0xfa, 0x3, 0xfb, 0x3, 0xfb, 0x3, 0xfc, 0x3, 0xfc, 0x3, 0xfd, 0x3,
0xfd, 0x3, 0xfe, 0x3, 0xfe, 0x3, 0xff, 0x3, 0xff, 0x3, 0x100, 0x3, 0x100,
0x3, 0x101, 0x3, 0x101, 0x3, 0x102, 0x3, 0x102, 0x3, 0x102, 0x3, 0x103,
0x3, 0x103, 0x3, 0x103, 0x3, 0x104, 0x3, 0x104, 0x3, 0x104, 0x3, 0x105,
0x3, 0x105, 0x3, 0x105, 0x3, 0x106, 0x3, 0x106, 0x3, 0x106, 0x3, 0x107,
0x3, 0x107, 0x3, 0x107, 0x3, 0x108, 0x3, 0x108, 0x3, 0x108, 0x3, 0x109,
0x3, 0x109, 0x3, 0x109, 0x3, 0x10a, 0x3, 0x10a, 0x3, 0x10a, 0x3, 0x10b,
0x3, 0x10b, 0x3, 0x10b, 0x3, 0x10c, 0x3, 0x10c, 0x3, 0x10c, 0x3, 0x10d,
0x3, 0x10d, 0x3, 0x10d, 0x3, 0x10e, 0x3, 0x10e, 0x3, 0x10e, 0x3, 0x10f,
0x3, 0x10f, 0x3, 0x10f, 0x3, 0x110, 0x3, 0x110, 0x3, 0x110, 0x3, 0x111,
0x3, 0x111, 0x3, 0x111, 0x3, 0x112, 0x3, 0x112, 0x3, 0x112, 0x3, 0x113,
0x3, 0x113, 0x3, 0x113, 0x3, 0x114, 0x3, 0x114, 0x3, 0x114, 0x3, 0x115,
0x3, 0x115, 0x3, 0x115, 0x3, 0x116, 0x3, 0x116, 0x3, 0x117, 0x3, 0x117,
0x3, 0x118, 0x3, 0x118, 0x3, 0x118, 0x3, 0x118, 0x3, 0x118, 0x3, 0x118,
0x3, 0x118, 0x3, 0x118, 0x3, 0x118, 0x3, 0x118, 0x3, 0x118, 0x3, 0x118,
0x3, 0x118, 0x3, 0x118, 0x3, 0x118, 0x3, 0x118, 0x3, 0x118, 0x3, 0x118,
0x3, 0x118, 0x3, 0x118, 0x3, 0x118, 0x3, 0x118, 0x3, 0x118, 0x3, 0x118,
0x3, 0x118, 0x3, 0x118, 0x5, 0x118, 0x911, 0xa, 0x118, 0x3, 0x119, 0x3,
0x119, 0x3, 0x11a, 0x3, 0x11a, 0x3, 0x11b, 0x3, 0x11b, 0x3, 0x11c, 0x3,
0x11c, 0x3, 0x11c, 0x3, 0x11c, 0x3, 0x11c, 0x3, 0x11d, 0x3, 0x11d, 0x3,
0x11d, 0x3, 0x11d, 0x3, 0x11d, 0x3, 0x11e, 0x3, 0x11e, 0x3, 0x11e, 0x3,
0x11e, 0x3, 0x11e, 0x3, 0x11f, 0x3, 0x11f, 0x3, 0x11f, 0x3, 0x11f, 0x3,
0x11f, 0x3, 0x120, 0x3, 0x120, 0x3, 0x120, 0x3, 0x120, 0x3, 0x120, 0x3,
0x121, 0x3, 0x121, 0x3, 0x121, 0x3, 0x121, 0x3, 0x121, 0x3, 0x122, 0x3,
0x122, 0x3, 0x122, 0x3, 0x122, 0x3, 0x122, 0x3, 0x123, 0x3, 0x123, 0x3,
0x123, 0x3, 0x123, 0x3, 0x123, 0x3, 0x124, 0x3, 0x124, 0x3, 0x124, 0x3,
0x124, 0x3, 0x124, 0x3, 0x125, 0x3, 0x125, 0x3, 0x125, 0x3, 0x125, 0x3,
0x125, 0x3, 0x126, 0x3, 0x126, 0x3, 0x126, 0x3, 0x126, 0x3, 0x126, 0x3,
0x127, 0x3, 0x127, 0x3, 0x127, 0x3, 0x127, 0x3, 0x127, 0x3, 0x128, 0x3,
0x128, 0x3, 0x128, 0x3, 0x128, 0x3, 0x128, 0x3, 0x128, 0x3, 0x128, 0x3,
0x128, 0x3, 0x128, 0x3, 0x128, 0x3, 0x128, 0x3, 0x128, 0x5, 0x128, 0x961,
0xa, 0x128, 0x3, 0x129, 0x3, 0x129, 0x3, 0x129, 0x3, 0x129, 0x3, 0x129,
0x3, 0x129, 0x3, 0x129, 0x3, 0x129, 0x5, 0x129, 0x96b, 0xa, 0x129, 0x3,
0x12a, 0x3, 0x12a, 0x3, 0x12b, 0x3, 0x12b, 0x3, 0x12c, 0x3, 0x12c, 0x3,
0x12d, 0x3, 0x12d, 0x3, 0x12e, 0x3, 0x12e, 0x3, 0x12f, 0x3, 0x12f, 0x3,
0x130, 0x3, 0x130, 0x3, 0x131, 0x3, 0x131, 0x3, 0x132, 0x3, 0x132, 0x3,
0x132, 0x3, 0x133, 0x3, 0x133, 0x3, 0x133, 0x3, 0x133, 0x3, 0x134, 0x3,
0x134, 0x3, 0x134, 0x3, 0x135, 0x3, 0x135, 0x3, 0x135, 0x3, 0x135, 0x3,
0x136, 0x3, 0x136, 0x3, 0x136, 0x3, 0x136, 0x3, 0x136, 0x3, 0x136, 0x5,
0x136, 0x991, 0xa, 0x136, 0x3, 0x137, 0x3, 0x137, 0x3, 0x137, 0x3, 0x137,
0x3, 0x137, 0x3, 0x137, 0x3, 0x137, 0x3, 0x137, 0x5, 0x137, 0x99b, 0xa,
0x137, 0x3, 0x138, 0x3, 0x138, 0x3, 0x138, 0x3, 0x138, 0x3, 0x138, 0x3,
0x138, 0x3, 0x138, 0x3, 0x138, 0x5, 0x138, 0x9a5, 0xa, 0x138, 0x3, 0x139,
0x3, 0x139, 0x3, 0x139, 0x3, 0x13a, 0x3, 0x13a, 0x3, 0x13a, 0x3, 0x13b,
0x3, 0x13b, 0x3, 0x13b, 0x3, 0x13b, 0x3, 0x13c, 0x3, 0x13c, 0x3, 0x13d,
0x3, 0x13d, 0x3, 0x13d, 0x3, 0x13e, 0x3, 0x13e, 0x3, 0x13f, 0x3, 0x13f,
0x3, 0x140, 0x3, 0x140, 0x3, 0x140, 0x3, 0x141, 0x3, 0x141, 0x3, 0x141,
0x3, 0x141, 0x3, 0x141, 0x3, 0x141, 0x3, 0x141, 0x3, 0x141, 0x3, 0x141,
0x3, 0x141, 0x3, 0x141, 0x3, 0x141, 0x3, 0x141, 0x3, 0x141, 0x3, 0x141,
0x5, 0x141, 0x9cc, 0xa, 0x141, 0x3, 0x142, 0x3, 0x142, 0x3, 0x143, 0x3,
0x143, 0x3, 0x144, 0x3, 0x144, 0x3, 0x144, 0x3, 0x144, 0x3, 0x144, 0x3,
0x145, 0x3, 0x145, 0x3, 0x145, 0x3, 0x145, 0x3, 0x145, 0x3, 0x146, 0x3,
0x146, 0x3, 0x147, 0x3, 0x147, 0x3, 0x148, 0x3, 0x148, 0x3, 0x149, 0x3,
0x149, 0x3, 0x14a, 0x3, 0x14a, 0x3, 0x14a, 0x3, 0x14a, 0x3, 0x14a, 0x3,
0x14b, 0x3, 0x14b, 0x3, 0x14b, 0x3, 0x14b, 0x3, 0x14b, 0x3, 0x14c, 0x3,
0x14c, 0x3, 0x14d, 0x3, 0x14d, 0x3, 0x14e, 0x3, 0x14e, 0x3, 0x14f, 0x3,
0x14f, 0x3, 0x150, 0x3, 0x150, 0x3, 0x150, 0x3, 0x150, 0x3, 0x150, 0x3,
0x150, 0x3, 0x150, 0x3, 0x150, 0x3, 0x150, 0x3, 0x150, 0x3, 0x150, 0x3,
0x150, 0x5, 0x150, 0xa02, 0xa, 0x150, 0x3, 0x151, 0x3, 0x151, 0x5, 0x151,
0xa06, 0xa, 0x151, 0x3, 0x152, 0x3, 0x152, 0x3, 0x152, 0x3, 0x153, 0x3,
0x153, 0x3, 0x154, 0x3, 0x154, 0x3, 0x155, 0x3, 0x155, 0x3, 0x155, 0x3,
0x155, 0x5, 0x155, 0xa13, 0xa, 0x155, 0x3, 0x156, 0x3, 0x156, 0x3, 0x157,
0x3, 0x157, 0x3, 0x158, 0x3, 0x158, 0x3, 0x158, 0x2, 0x2, 0x159, 0x2,
0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c,
0x1e, 0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, 0x30, 0x32, 0x34,
0x36, 0x38, 0x3a, 0x3c, 0x3e, 0x40, 0x42, 0x44, 0x46, 0x48, 0x4a, 0x4c,
0x4e, 0x50, 0x52, 0x54, 0x56, 0x58, 0x5a, 0x5c, 0x5e, 0x60, 0x62, 0x64,
0x66, 0x68, 0x6a, 0x6c, 0x6e, 0x70, 0x72, 0x74, 0x76, 0x78, 0x7a, 0x7c,
0x7e, 0x80, 0x82, 0x84, 0x86, 0x88, 0x8a, 0x8c, 0x8e, 0x90, 0x92, 0x94,
0x96, 0x98, 0x9a, 0x9c, 0x9e, 0xa0, 0xa2, 0xa4, 0xa6, 0xa8, 0xaa, 0xac,
0xae, 0xb0, 0xb2, 0xb4, 0xb6, 0xb8, 0xba, 0xbc, 0xbe, 0xc0, 0xc2, 0xc4,
0xc6, 0xc8, 0xca, 0xcc, 0xce, 0xd0, 0xd2, 0xd4, 0xd6, 0xd8, 0xda, 0xdc,
0xde, 0xe0, 0xe2, 0xe4, 0xe6, 0xe8, 0xea, 0xec, 0xee, 0xf0, 0xf2, 0xf4,
0xf6, 0xf8, 0xfa, 0xfc, 0xfe, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10a,
0x10c, 0x10e, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11a, 0x11c, 0x11e,
0x120, 0x122, 0x124, 0x126, 0x128, 0x12a, 0x12c, 0x12e, 0x130, 0x132,
0x134, 0x136, 0x138, 0x13a, 0x13c, 0x13e, 0x140, 0x142, 0x144, 0x146,
0x148, 0x14a, 0x14c, 0x14e, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15a,
0x15c, 0x15e, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16a, 0x16c, 0x16e,
0x170, 0x172, 0x174, 0x176, 0x178, 0x17a, 0x17c, 0x17e, 0x180, 0x182,
0x184, 0x186, 0x188, 0x18a, 0x18c, 0x18e, 0x190, 0x192, 0x194, 0x196,
0x198, 0x19a, 0x19c, 0x19e, 0x1a0, 0x1a2, 0x1a4, 0x1a6, 0x1a8, 0x1aa,
0x1ac, 0x1ae, 0x1b0, 0x1b2, 0x1b4, 0x1b6, 0x1b8, 0x1ba, 0x1bc, 0x1be,
0x1c0, 0x1c2, 0x1c4, 0x1c6, 0x1c8, 0x1ca, 0x1cc, 0x1ce, 0x1d0, 0x1d2,
0x1d4, 0x1d6, 0x1d8, 0x1da, 0x1dc, 0x1de, 0x1e0, 0x1e2, 0x1e4, 0x1e6,
0x1e8, 0x1ea, 0x1ec, 0x1ee, 0x1f0, 0x1f2, 0x1f4, 0x1f6, 0x1f8, 0x1fa,
0x1fc, 0x1fe, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20a, 0x20c, 0x20e,
0x210, 0x212, 0x214, 0x216, 0x218, 0x21a, 0x21c, 0x21e, 0x220, 0x222,
0x224, 0x226, 0x228, 0x22a, 0x22c, 0x22e, 0x230, 0x232, 0x234, 0x236,
0x238, 0x23a, 0x23c, 0x23e, 0x240, 0x242, 0x244, 0x246, 0x248, 0x24a,
0x24c, 0x24e, 0x250, 0x252, 0x254, 0x256, 0x258, 0x25a, 0x25c, 0x25e,
0x260, 0x262, 0x264, 0x266, 0x268, 0x26a, 0x26c, 0x26e, 0x270, 0x272,
0x274, 0x276, 0x278, 0x27a, 0x27c, 0x27e, 0x280, 0x282, 0x284, 0x286,
0x288, 0x28a, 0x28c, 0x28e, 0x290, 0x292, 0x294, 0x296, 0x298, 0x29a,
0x29c, 0x29e, 0x2a0, 0x2a2, 0x2a4, 0x2a6, 0x2a8, 0x2aa, 0x2ac, 0x2ae,
0x2, 0x66, 0x3, 0x2, 0x3, 0x4, 0x3, 0x2, 0x5, 0x6, 0x3, 0x2, 0x7, 0x8,
0x3, 0x2, 0x9, 0xa, 0x3, 0x2, 0xb, 0xc, 0x3, 0x2, 0xd, 0xe, 0x3, 0x2,
0xf, 0x10, 0x3, 0x2, 0x11, 0x12, 0x3, 0x2, 0x19, 0x1a, 0x3, 0x2, 0x1b,
0x1c, 0x3, 0x2, 0x1d, 0x1e, 0x3, 0x2, 0x1f, 0x20, 0x3, 0x2, 0x33, 0x34,
0x3, 0x2, 0x35, 0x36, 0x3, 0x2, 0x37, 0x38, 0x3, 0x2, 0x39, 0x3a, 0x3,
0x2, 0x3b, 0x3c, 0x3, 0x2, 0x3d, 0x3e, 0x3, 0x2, 0x3f, 0x40, 0x3, 0x2,
0x41, 0x42, 0x3, 0x2, 0x43, 0x44, 0x3, 0x2, 0x45, 0x46, 0x3, 0x2, 0x4a,
0x4b, 0x3, 0x2, 0x4d, 0x4e, 0x3, 0x2, 0x4f, 0x50, 0x3, 0x2, 0x51, 0x52,
0x3, 0x2, 0x53, 0x54, 0x3, 0x2, 0x55, 0x56, 0x3, 0x2, 0x57, 0x58, 0x3,
0x2, 0x59, 0x5a, 0x3, 0x2, 0x5b, 0x5c, 0x3, 0x2, 0x5d, 0x5e, 0x3, 0x2,
0x5f, 0x60, 0x3, 0x2, 0x61, 0x62, 0x3, 0x2, 0x63, 0x64, 0x3, 0x2, 0x65,
0x66, 0x3, 0x2, 0x67, 0x68, 0x3, 0x2, 0x69, 0x6a, 0x3, 0x2, 0x6b, 0x6c,
0x3, 0x2, 0x6d, 0x6e, 0x3, 0x2, 0x6f, 0x70, 0x3, 0x2, 0x71, 0x72, 0x3,
0x2, 0x73, 0x74, 0x3, 0x2, 0x75, 0x76, 0x3, 0x2, 0x77, 0x78, 0x3, 0x2,
0x79, 0x7a, 0x3, 0x2, 0x7b, 0x7c, 0x3, 0x2, 0x7d, 0x7e, 0x3, 0x2, 0x7f,
0x80, 0x3, 0x2, 0x81, 0x82, 0x3, 0x2, 0x83, 0x84, 0x3, 0x2, 0x85, 0x86,
0x3, 0x2, 0x87, 0x88, 0x3, 0x2, 0x89, 0x8a, 0x3, 0x2, 0x8b, 0x8c, 0x3,
0x2, 0x8d, 0x8e, 0x3, 0x2, 0x8f, 0x90, 0x3, 0x2, 0x91, 0x92, 0x3, 0x2,
0x93, 0x94, 0x3, 0x2, 0x95, 0x96, 0x3, 0x2, 0x97, 0x98, 0x3, 0x2, 0x99,
0x9a, 0x3, 0x2, 0x9b, 0x9c, 0x3, 0x2, 0x9d, 0x9e, 0x3, 0x2, 0x9f, 0xa0,
0x3, 0x2, 0xa1, 0xa2, 0x3, 0x2, 0xa3, 0xa4, 0x3, 0x2, 0xa5, 0xa6, 0x3,
0x2, 0xa7, 0xa8, 0x3, 0x2, 0xa9, 0xaa, 0x3, 0x2, 0xab, 0xac, 0x3, 0x2,
0xad, 0xae, 0x3, 0x2, 0xaf, 0xb0, 0x3, 0x2, 0xb1, 0xb2, 0x3, 0x2, 0x23,
0x24, 0x3, 0x2, 0xb3, 0xb4, 0x3, 0x2, 0xb5, 0xb6, 0x3, 0x2, 0xb7, 0xb8,
0x3, 0x2, 0xb9, 0xba, 0x3, 0x2, 0xbb, 0xbc, 0x3, 0x2, 0xbd, 0xbe, 0x3,
0x2, 0xbf, 0xc0, 0x3, 0x2, 0xc1, 0xc2, 0x3, 0x2, 0xc3, 0xc4, 0x3, 0x2,
0xc5, 0xc6, 0x3, 0x2, 0xc7, 0xc8, 0x3, 0x2, 0xc9, 0xca, 0x3, 0x2, 0xcb,
0xcc, 0x3, 0x2, 0xcd, 0xce, 0x3, 0x2, 0xcf, 0xd0, 0x3, 0x2, 0xd1, 0xd2,
0x3, 0x2, 0xd3, 0xd4, 0x3, 0x2, 0xd5, 0xd6, 0x3, 0x2, 0xd7, 0xd8, 0x3,
0x2, 0xd9, 0xda, 0x3, 0x2, 0xdb, 0xdc, 0x3, 0x2, 0xdd, 0xde, 0x3, 0x2,
0xdf, 0xe0, 0x3, 0x2, 0xe2, 0xe3, 0x3, 0x2, 0xe5, 0xe7, 0x2, 0xa36,
0x2, 0x2b3, 0x3, 0x2, 0x2, 0x2, 0x4, 0x2c1, 0x3, 0x2, 0x2, 0x2, 0x6,
0x2cd, 0x3, 0x2, 0x2, 0x2, 0x8, 0x2cf, 0x3, 0x2, 0x2, 0x2, 0xa, 0x2d1,
0x3, 0x2, 0x2, 0x2, 0xc, 0x2d3, 0x3, 0x2, 0x2, 0x2, 0xe, 0x2d5, 0x3,
0x2, 0x2, 0x2, 0x10, 0x2d7, 0x3, 0x2, 0x2, 0x2, 0x12, 0x2d9, 0x3, 0x2,
0x2, 0x2, 0x14, 0x2db, 0x3, 0x2, 0x2, 0x2, 0x16, 0x2dd, 0x3, 0x2, 0x2,
0x2, 0x18, 0x2e2, 0x3, 0x2, 0x2, 0x2, 0x1a, 0x2e7, 0x3, 0x2, 0x2, 0x2,
0x1c, 0x2ec, 0x3, 0x2, 0x2, 0x2, 0x1e, 0x2ee, 0x3, 0x2, 0x2, 0x2, 0x20,
0x2f0, 0x3, 0x2, 0x2, 0x2, 0x22, 0x2f2, 0x3, 0x2, 0x2, 0x2, 0x24, 0x2f4,
0x3, 0x2, 0x2, 0x2, 0x26, 0x2f9, 0x3, 0x2, 0x2, 0x2, 0x28, 0x2fe, 0x3,
0x2, 0x2, 0x2, 0x2a, 0x303, 0x3, 0x2, 0x2, 0x2, 0x2c, 0x308, 0x3, 0x2,
0x2, 0x2, 0x2e, 0x30d, 0x3, 0x2, 0x2, 0x2, 0x30, 0x312, 0x3, 0x2, 0x2,
0x2, 0x32, 0x317, 0x3, 0x2, 0x2, 0x2, 0x34, 0x31c, 0x3, 0x2, 0x2, 0x2,
0x36, 0x321, 0x3, 0x2, 0x2, 0x2, 0x38, 0x323, 0x3, 0x2, 0x2, 0x2, 0x3a,
0x325, 0x3, 0x2, 0x2, 0x2, 0x3c, 0x327, 0x3, 0x2, 0x2, 0x2, 0x3e, 0x329,
0x3, 0x2, 0x2, 0x2, 0x40, 0x32b, 0x3, 0x2, 0x2, 0x2, 0x42, 0x32d, 0x3,
0x2, 0x2, 0x2, 0x44, 0x32f, 0x3, 0x2, 0x2, 0x2, 0x46, 0x331, 0x3, 0x2,
0x2, 0x2, 0x48, 0x333, 0x3, 0x2, 0x2, 0x2, 0x4a, 0x335, 0x3, 0x2, 0x2,
0x2, 0x4c, 0x337, 0x3, 0x2, 0x2, 0x2, 0x4e, 0x33b, 0x3, 0x2, 0x2, 0x2,
0x50, 0x33f, 0x3, 0x2, 0x2, 0x2, 0x52, 0x343, 0x3, 0x2, 0x2, 0x2, 0x54,
0x347, 0x3, 0x2, 0x2, 0x2, 0x56, 0x34b, 0x3, 0x2, 0x2, 0x2, 0x58, 0x351,
0x3, 0x2, 0x2, 0x2, 0x5a, 0x357, 0x3, 0x2, 0x2, 0x2, 0x5c, 0x362, 0x3,
0x2, 0x2, 0x2, 0x5e, 0x364, 0x3, 0x2, 0x2, 0x2, 0x60, 0x366, 0x3, 0x2,
0x2, 0x2, 0x62, 0x36b, 0x3, 0x2, 0x2, 0x2, 0x64, 0x370, 0x3, 0x2, 0x2,
0x2, 0x66, 0x375, 0x3, 0x2, 0x2, 0x2, 0x68, 0x37a, 0x3, 0x2, 0x2, 0x2,
0x6a, 0x37f, 0x3, 0x2, 0x2, 0x2, 0x6c, 0x384, 0x3, 0x2, 0x2, 0x2, 0x6e,
0x389, 0x3, 0x2, 0x2, 0x2, 0x70, 0x38e, 0x3, 0x2, 0x2, 0x2, 0x72, 0x393,
0x3, 0x2, 0x2, 0x2, 0x74, 0x398, 0x3, 0x2, 0x2, 0x2, 0x76, 0x39d, 0x3,
0x2, 0x2, 0x2, 0x78, 0x3a2, 0x3, 0x2, 0x2, 0x2, 0x7a, 0x3a7, 0x3, 0x2,
0x2, 0x2, 0x7c, 0x3ac, 0x3, 0x2, 0x2, 0x2, 0x7e, 0x3b1, 0x3, 0x2, 0x2,
0x2, 0x80, 0x3b6, 0x3, 0x2, 0x2, 0x2, 0x82, 0x3bb, 0x3, 0x2, 0x2, 0x2,
0x84, 0x3c0, 0x3, 0x2, 0x2, 0x2, 0x86, 0x3c5, 0x3, 0x2, 0x2, 0x2, 0x88,
0x3ca, 0x3, 0x2, 0x2, 0x2, 0x8a, 0x3cf, 0x3, 0x2, 0x2, 0x2, 0x8c, 0x3d4,
0x3, 0x2, 0x2, 0x2, 0x8e, 0x3d9, 0x3, 0x2, 0x2, 0x2, 0x90, 0x3de, 0x3,
0x2, 0x2, 0x2, 0x92, 0x3e3, 0x3, 0x2, 0x2, 0x2, 0x94, 0x3ea, 0x3, 0x2,
0x2, 0x2, 0x96, 0x3ee, 0x3, 0x2, 0x2, 0x2, 0x98, 0x3f0, 0x3, 0x2, 0x2,
0x2, 0x9a, 0x3f5, 0x3, 0x2, 0x2, 0x2, 0x9c, 0x3fa, 0x3, 0x2, 0x2, 0x2,
0x9e, 0x3ff, 0x3, 0x2, 0x2, 0x2, 0xa0, 0x404, 0x3, 0x2, 0x2, 0x2, 0xa2,
0x428, 0x3, 0x2, 0x2, 0x2, 0xa4, 0x42e, 0x3, 0x2, 0x2, 0x2, 0xa6, 0x430,
0x3, 0x2, 0x2, 0x2, 0xa8, 0x435, 0x3, 0x2, 0x2, 0x2, 0xaa, 0x43a, 0x3,
0x2, 0x2, 0x2, 0xac, 0x43f, 0x3, 0x2, 0x2, 0x2, 0xae, 0x444, 0x3, 0x2,
0x2, 0x2, 0xb0, 0x449, 0x3, 0x2, 0x2, 0x2, 0xb2, 0x44e, 0x3, 0x2, 0x2,
0x2, 0xb4, 0x453, 0x3, 0x2, 0x2, 0x2, 0xb6, 0x458, 0x3, 0x2, 0x2, 0x2,
0xb8, 0x45d, 0x3, 0x2, 0x2, 0x2, 0xba, 0x462, 0x3, 0x2, 0x2, 0x2, 0xbc,
0x467, 0x3, 0x2, 0x2, 0x2, 0xbe, 0x46c, 0x3, 0x2, 0x2, 0x2, 0xc0, 0x46e,
0x3, 0x2, 0x2, 0x2, 0xc2, 0x475, 0x3, 0x2, 0x2, 0x2, 0xc4, 0x477, 0x3,
0x2, 0x2, 0x2, 0xc6, 0x47a, 0x3, 0x2, 0x2, 0x2, 0xc8, 0x47d, 0x3, 0x2,
0x2, 0x2, 0xca, 0x480, 0x3, 0x2, 0x2, 0x2, 0xcc, 0x483, 0x3, 0x2, 0x2,
0x2, 0xce, 0x486, 0x3, 0x2, 0x2, 0x2, 0xd0, 0x49b, 0x3, 0x2, 0x2, 0x2,
0xd2, 0x49d, 0x3, 0x2, 0x2, 0x2, 0xd4, 0x49f, 0x3, 0x2, 0x2, 0x2, 0xd6,
0x4a4, 0x3, 0x2, 0x2, 0x2, 0xd8, 0x4a9, 0x3, 0x2, 0x2, 0x2, 0xda, 0x4ab,
0x3, 0x2, 0x2, 0x2, 0xdc, 0x4b0, 0x3, 0x2, 0x2, 0x2, 0xde, 0x4b5, 0x3,
0x2, 0x2, 0x2, 0xe0, 0x4ba, 0x3, 0x2, 0x2, 0x2, 0xe2, 0x4bc, 0x3, 0x2,
0x2, 0x2, 0xe4, 0x4be, 0x3, 0x2, 0x2, 0x2, 0xe6, 0x4c0, 0x3, 0x2, 0x2,
0x2, 0xe8, 0x4c2, 0x3, 0x2, 0x2, 0x2, 0xea, 0x4c4, 0x3, 0x2, 0x2, 0x2,
0xec, 0x4c6, 0x3, 0x2, 0x2, 0x2, 0xee, 0x4c8, 0x3, 0x2, 0x2, 0x2, 0xf0,
0x4d8, 0x3, 0x2, 0x2, 0x2, 0xf2, 0x4da, 0x3, 0x2, 0x2, 0x2, 0xf4, 0x4dc,
0x3, 0x2, 0x2, 0x2, 0xf6, 0x4de, 0x3, 0x2, 0x2, 0x2, 0xf8, 0x4e0, 0x3,
0x2, 0x2, 0x2, 0xfa, 0x4e2, 0x3, 0x2, 0x2, 0x2, 0xfc, 0x4e4, 0x3, 0x2,
0x2, 0x2, 0xfe, 0x4e6, 0x3, 0x2, 0x2, 0x2, 0x100, 0x4e8, 0x3, 0x2, 0x2,
0x2, 0x102, 0x4ea, 0x3, 0x2, 0x2, 0x2, 0x104, 0x4ec, 0x3, 0x2, 0x2,
0x2, 0x106, 0x4f6, 0x3, 0x2, 0x2, 0x2, 0x108, 0x500, 0x3, 0x2, 0x2,
0x2, 0x10a, 0x50a, 0x3, 0x2, 0x2, 0x2, 0x10c, 0x514, 0x3, 0x2, 0x2,
0x2, 0x10e, 0x51e, 0x3, 0x2, 0x2, 0x2, 0x110, 0x528, 0x3, 0x2, 0x2,
0x2, 0x112, 0x532, 0x3, 0x2, 0x2, 0x2, 0x114, 0x53c, 0x3, 0x2, 0x2,
0x2, 0x116, 0x546, 0x3, 0x2, 0x2, 0x2, 0x118, 0x550, 0x3, 0x2, 0x2,
0x2, 0x11a, 0x55a, 0x3, 0x2, 0x2, 0x2, 0x11c, 0x564, 0x3, 0x2, 0x2,
0x2, 0x11e, 0x56e, 0x3, 0x2, 0x2, 0x2, 0x120, 0x578, 0x3, 0x2, 0x2,
0x2, 0x122, 0x582, 0x3, 0x2, 0x2, 0x2, 0x124, 0x58c, 0x3, 0x2, 0x2,
0x2, 0x126, 0x596, 0x3, 0x2, 0x2, 0x2, 0x128, 0x5a0, 0x3, 0x2, 0x2,
0x2, 0x12a, 0x5aa, 0x3, 0x2, 0x2, 0x2, 0x12c, 0x5b4, 0x3, 0x2, 0x2,
0x2, 0x12e, 0x5be, 0x3, 0x2, 0x2, 0x2, 0x130, 0x5c8, 0x3, 0x2, 0x2,
0x2, 0x132, 0x5d2, 0x3, 0x2, 0x2, 0x2, 0x134, 0x5dc, 0x3, 0x2, 0x2,
0x2, 0x136, 0x5e6, 0x3, 0x2, 0x2, 0x2, 0x138, 0x5f0, 0x3, 0x2, 0x2,
0x2, 0x13a, 0x5fa, 0x3, 0x2, 0x2, 0x2, 0x13c, 0x604, 0x3, 0x2, 0x2,
0x2, 0x13e, 0x60e, 0x3, 0x2, 0x2, 0x2, 0x140, 0x618, 0x3, 0x2, 0x2,
0x2, 0x142, 0x622, 0x3, 0x2, 0x2, 0x2, 0x144, 0x62c, 0x3, 0x2, 0x2,
0x2, 0x146, 0x636, 0x3, 0x2, 0x2, 0x2, 0x148, 0x640, 0x3, 0x2, 0x2,
0x2, 0x14a, 0x64a, 0x3, 0x2, 0x2, 0x2, 0x14c, 0x654, 0x3, 0x2, 0x2,
0x2, 0x14e, 0x65e, 0x3, 0x2, 0x2, 0x2, 0x150, 0x668, 0x3, 0x2, 0x2,
0x2, 0x152, 0x672, 0x3, 0x2, 0x2, 0x2, 0x154, 0x67c, 0x3, 0x2, 0x2,
0x2, 0x156, 0x686, 0x3, 0x2, 0x2, 0x2, 0x158, 0x690, 0x3, 0x2, 0x2,
0x2, 0x15a, 0x69a, 0x3, 0x2, 0x2, 0x2, 0x15c, 0x6a4, 0x3, 0x2, 0x2,
0x2, 0x15e, 0x6ae, 0x3, 0x2, 0x2, 0x2, 0x160, 0x6b8, 0x3, 0x2, 0x2,
0x2, 0x162, 0x6c2, 0x3, 0x2, 0x2, 0x2, 0x164, 0x6cc, 0x3, 0x2, 0x2,
0x2, 0x166, 0x6d6, 0x3, 0x2, 0x2, 0x2, 0x168, 0x6e0, 0x3, 0x2, 0x2,
0x2, 0x16a, 0x6ea, 0x3, 0x2, 0x2, 0x2, 0x16c, 0x6f4, 0x3, 0x2, 0x2,
0x2, 0x16e, 0x6fe, 0x3, 0x2, 0x2, 0x2, 0x170, 0x708, 0x3, 0x2, 0x2,
0x2, 0x172, 0x712, 0x3, 0x2, 0x2, 0x2, 0x174, 0x71c, 0x3, 0x2, 0x2,
0x2, 0x176, 0x726, 0x3, 0x2, 0x2, 0x2, 0x178, 0x730, 0x3, 0x2, 0x2,
0x2, 0x17a, 0x73a, 0x3, 0x2, 0x2, 0x2, 0x17c, 0x744, 0x3, 0x2, 0x2,
0x2, 0x17e, 0x74e, 0x3, 0x2, 0x2, 0x2, 0x180, 0x758, 0x3, 0x2, 0x2,
0x2, 0x182, 0x762, 0x3, 0x2, 0x2, 0x2, 0x184, 0x76c, 0x3, 0x2, 0x2,
0x2, 0x186, 0x776, 0x3, 0x2, 0x2, 0x2, 0x188, 0x780, 0x3, 0x2, 0x2,
0x2, 0x18a, 0x78a, 0x3, 0x2, 0x2, 0x2, 0x18c, 0x794, 0x3, 0x2, 0x2,
0x2, 0x18e, 0x79e, 0x3, 0x2, 0x2, 0x2, 0x190, 0x7a8, 0x3, 0x2, 0x2,
0x2, 0x192, 0x7aa, 0x3, 0x2, 0x2, 0x2, 0x194, 0x7ad, 0x3, 0x2, 0x2,
0x2, 0x196, 0x7b0, 0x3, 0x2, 0x2, 0x2, 0x198, 0x7b3, 0x3, 0x2, 0x2,
0x2, 0x19a, 0x7b6, 0x3, 0x2, 0x2, 0x2, 0x19c, 0x7b9, 0x3, 0x2, 0x2,
0x2, 0x19e, 0x7bc, 0x3, 0x2, 0x2, 0x2, 0x1a0, 0x7bf, 0x3, 0x2, 0x2,
0x2, 0x1a2, 0x7c2, 0x3, 0x2, 0x2, 0x2, 0x1a4, 0x7c5, 0x3, 0x2, 0x2,
0x2, 0x1a6, 0x7c8, 0x3, 0x2, 0x2, 0x2, 0x1a8, 0x7cb, 0x3, 0x2, 0x2,
0x2, 0x1aa, 0x7ce, 0x3, 0x2, 0x2, 0x2, 0x1ac, 0x7d1, 0x3, 0x2, 0x2,
0x2, 0x1ae, 0x7d4, 0x3, 0x2, 0x2, 0x2, 0x1b0, 0x7d7, 0x3, 0x2, 0x2,
0x2, 0x1b2, 0x830, 0x3, 0x2, 0x2, 0x2, 0x1b4, 0x832, 0x3, 0x2, 0x2,
0x2, 0x1b6, 0x834, 0x3, 0x2, 0x2, 0x2, 0x1b8, 0x836, 0x3, 0x2, 0x2,
0x2, 0x1ba, 0x838, 0x3, 0x2, 0x2, 0x2, 0x1bc, 0x83a, 0x3, 0x2, 0x2,
0x2, 0x1be, 0x83c, 0x3, 0x2, 0x2, 0x2, 0x1c0, 0x83e, 0x3, 0x2, 0x2,
0x2, 0x1c2, 0x840, 0x3, 0x2, 0x2, 0x2, 0x1c4, 0x842, 0x3, 0x2, 0x2,
0x2, 0x1c6, 0x844, 0x3, 0x2, 0x2, 0x2, 0x1c8, 0x851, 0x3, 0x2, 0x2,
0x2, 0x1ca, 0x853, 0x3, 0x2, 0x2, 0x2, 0x1cc, 0x858, 0x3, 0x2, 0x2,
0x2, 0x1ce, 0x85d, 0x3, 0x2, 0x2, 0x2, 0x1d0, 0x867, 0x3, 0x2, 0x2,
0x2, 0x1d2, 0x86e, 0x3, 0x2, 0x2, 0x2, 0x1d4, 0x870, 0x3, 0x2, 0x2,
0x2, 0x1d6, 0x875, 0x3, 0x2, 0x2, 0x2, 0x1d8, 0x87a, 0x3, 0x2, 0x2,
0x2, 0x1da, 0x87d, 0x3, 0x2, 0x2, 0x2, 0x1dc, 0x880, 0x3, 0x2, 0x2,
0x2, 0x1de, 0x883, 0x3, 0x2, 0x2, 0x2, 0x1e0, 0x886, 0x3, 0x2, 0x2,
0x2, 0x1e2, 0x889, 0x3, 0x2, 0x2, 0x2, 0x1e4, 0x898, 0x3, 0x2, 0x2,
0x2, 0x1e6, 0x89a, 0x3, 0x2, 0x2, 0x2, 0x1e8, 0x89c, 0x3, 0x2, 0x2,
0x2, 0x1ea, 0x89e, 0x3, 0x2, 0x2, 0x2, 0x1ec, 0x8a0, 0x3, 0x2, 0x2,
0x2, 0x1ee, 0x8a2, 0x3, 0x2, 0x2, 0x2, 0x1f0, 0x8a4, 0x3, 0x2, 0x2,
0x2, 0x1f2, 0x8a6, 0x3, 0x2, 0x2, 0x2, 0x1f4, 0x8a8, 0x3, 0x2, 0x2,
0x2, 0x1f6, 0x8aa, 0x3, 0x2, 0x2, 0x2, 0x1f8, 0x8ac, 0x3, 0x2, 0x2,
0x2, 0x1fa, 0x8ae, 0x3, 0x2, 0x2, 0x2, 0x1fc, 0x8b0, 0x3, 0x2, 0x2,
0x2, 0x1fe, 0x8b2, 0x3, 0x2, 0x2, 0x2, 0x200, 0x8b4, 0x3, 0x2, 0x2,
0x2, 0x202, 0x8b6, 0x3, 0x2, 0x2, 0x2, 0x204, 0x8b9, 0x3, 0x2, 0x2,
0x2, 0x206, 0x8bc, 0x3, 0x2, 0x2, 0x2, 0x208, 0x8bf, 0x3, 0x2, 0x2,
0x2, 0x20a, 0x8c2, 0x3, 0x2, 0x2, 0x2, 0x20c, 0x8c5, 0x3, 0x2, 0x2,
0x2, 0x20e, 0x8c8, 0x3, 0x2, 0x2, 0x2, 0x210, 0x8cb, 0x3, 0x2, 0x2,
0x2, 0x212, 0x8ce, 0x3, 0x2, 0x2, 0x2, 0x214, 0x8d1, 0x3, 0x2, 0x2,
0x2, 0x216, 0x8d4, 0x3, 0x2, 0x2, 0x2, 0x218, 0x8d7, 0x3, 0x2, 0x2,
0x2, 0x21a, 0x8da, 0x3, 0x2, 0x2, 0x2, 0x21c, 0x8dd, 0x3, 0x2, 0x2,
0x2, 0x21e, 0x8e0, 0x3, 0x2, 0x2, 0x2, 0x220, 0x8e3, 0x3, 0x2, 0x2,
0x2, 0x222, 0x8e6, 0x3, 0x2, 0x2, 0x2, 0x224, 0x8e9, 0x3, 0x2, 0x2,
0x2, 0x226, 0x8ec, 0x3, 0x2, 0x2, 0x2, 0x228, 0x8ef, 0x3, 0x2, 0x2,
0x2, 0x22a, 0x8f2, 0x3, 0x2, 0x2, 0x2, 0x22c, 0x8f4, 0x3, 0x2, 0x2,
0x2, 0x22e, 0x910, 0x3, 0x2, 0x2, 0x2, 0x230, 0x912, 0x3, 0x2, 0x2,
0x2, 0x232, 0x914, 0x3, 0x2, 0x2, 0x2, 0x234, 0x916, 0x3, 0x2, 0x2,
0x2, 0x236, 0x918, 0x3, 0x2, 0x2, 0x2, 0x238, 0x91d, 0x3, 0x2, 0x2,
0x2, 0x23a, 0x922, 0x3, 0x2, 0x2, 0x2, 0x23c, 0x927, 0x3, 0x2, 0x2,
0x2, 0x23e, 0x92c, 0x3, 0x2, 0x2, 0x2, 0x240, 0x931, 0x3, 0x2, 0x2,
0x2, 0x242, 0x936, 0x3, 0x2, 0x2, 0x2, 0x244, 0x93b, 0x3, 0x2, 0x2,
0x2, 0x246, 0x940, 0x3, 0x2, 0x2, 0x2, 0x248, 0x945, 0x3, 0x2, 0x2,
0x2, 0x24a, 0x94a, 0x3, 0x2, 0x2, 0x2, 0x24c, 0x94f, 0x3, 0x2, 0x2,
0x2, 0x24e, 0x960, 0x3, 0x2, 0x2, 0x2, 0x250, 0x96a, 0x3, 0x2, 0x2,
0x2, 0x252, 0x96c, 0x3, 0x2, 0x2, 0x2, 0x254, 0x96e, 0x3, 0x2, 0x2,
0x2, 0x256, 0x970, 0x3, 0x2, 0x2, 0x2, 0x258, 0x972, 0x3, 0x2, 0x2,
0x2, 0x25a, 0x974, 0x3, 0x2, 0x2, 0x2, 0x25c, 0x976, 0x3, 0x2, 0x2,
0x2, 0x25e, 0x978, 0x3, 0x2, 0x2, 0x2, 0x260, 0x97a, 0x3, 0x2, 0x2,
0x2, 0x262, 0x97c, 0x3, 0x2, 0x2, 0x2, 0x264, 0x97f, 0x3, 0x2, 0x2,
0x2, 0x266, 0x983, 0x3, 0x2, 0x2, 0x2, 0x268, 0x986, 0x3, 0x2, 0x2,
0x2, 0x26a, 0x990, 0x3, 0x2, 0x2, 0x2, 0x26c, 0x99a, 0x3, 0x2, 0x2,
0x2, 0x26e, 0x9a4, 0x3, 0x2, 0x2, 0x2, 0x270, 0x9a6, 0x3, 0x2, 0x2,
0x2, 0x272, 0x9a9, 0x3, 0x2, 0x2, 0x2, 0x274, 0x9ac, 0x3, 0x2, 0x2,
0x2, 0x276, 0x9b0, 0x3, 0x2, 0x2, 0x2, 0x278, 0x9b2, 0x3, 0x2, 0x2,
0x2, 0x27a, 0x9b5, 0x3, 0x2, 0x2, 0x2, 0x27c, 0x9b7, 0x3, 0x2, 0x2,
0x2, 0x27e, 0x9b9, 0x3, 0x2, 0x2, 0x2, 0x280, 0x9cb, 0x3, 0x2, 0x2,
0x2, 0x282, 0x9cd, 0x3, 0x2, 0x2, 0x2, 0x284, 0x9cf, 0x3, 0x2, 0x2,
0x2, 0x286, 0x9d1, 0x3, 0x2, 0x2, 0x2, 0x288, 0x9d6, 0x3, 0x2, 0x2,
0x2, 0x28a, 0x9db, 0x3, 0x2, 0x2, 0x2, 0x28c, 0x9dd, 0x3, 0x2, 0x2,
0x2, 0x28e, 0x9df, 0x3, 0x2, 0x2, 0x2, 0x290, 0x9e1, 0x3, 0x2, 0x2,
0x2, 0x292, 0x9e3, 0x3, 0x2, 0x2, 0x2, 0x294, 0x9e8, 0x3, 0x2, 0x2,
0x2, 0x296, 0x9ed, 0x3, 0x2, 0x2, 0x2, 0x298, 0x9ef, 0x3, 0x2, 0x2,
0x2, 0x29a, 0x9f1, 0x3, 0x2, 0x2, 0x2, 0x29c, 0x9f3, 0x3, 0x2, 0x2,
0x2, 0x29e, 0xa01, 0x3, 0x2, 0x2, 0x2, 0x2a0, 0xa03, 0x3, 0x2, 0x2,
0x2, 0x2a2, 0xa07, 0x3, 0x2, 0x2, 0x2, 0x2a4, 0xa0a, 0x3, 0x2, 0x2,
0x2, 0x2a6, 0xa0c, 0x3, 0x2, 0x2, 0x2, 0x2a8, 0xa12, 0x3, 0x2, 0x2,
0x2, 0x2aa, 0xa14, 0x3, 0x2, 0x2, 0x2, 0x2ac, 0xa16, 0x3, 0x2, 0x2,
0x2, 0x2ae, 0xa18, 0x3, 0x2, 0x2, 0x2, 0x2b0, 0x2b2, 0x5, 0x4, 0x3,
0x2, 0x2b1, 0x2b0, 0x3, 0x2, 0x2, 0x2, 0x2b2, 0x2b5, 0x3, 0x2, 0x2,
0x2, 0x2b3, 0x2b1, 0x3, 0x2, 0x2, 0x2, 0x2b3, 0x2b4, 0x3, 0x2, 0x2,
0x2, 0x2b4, 0x3, 0x3, 0x2, 0x2, 0x2, 0x2b5, 0x2b3, 0x3, 0x2, 0x2, 0x2,
0x2b6, 0x2b8, 0x5, 0x2a0, 0x151, 0x2, 0x2b7, 0x2b6, 0x3, 0x2, 0x2, 0x2,
0x2b7, 0x2b8, 0x3, 0x2, 0x2, 0x2, 0x2b8, 0x2ba, 0x3, 0x2, 0x2, 0x2,
0x2b9, 0x2bb, 0x5, 0x6, 0x4, 0x2, 0x2ba, 0x2b9, 0x3, 0x2, 0x2, 0x2,
0x2ba, 0x2bb, 0x3, 0x2, 0x2, 0x2, 0x2bb, 0x2bd, 0x3, 0x2, 0x2, 0x2,
0x2bc, 0x2be, 0x5, 0x2ae, 0x158, 0x2, 0x2bd, 0x2bc, 0x3, 0x2, 0x2, 0x2,
0x2bd, 0x2be, 0x3, 0x2, 0x2, 0x2, 0x2be, 0x2bf, 0x3, 0x2, 0x2, 0x2,
0x2bf, 0x2c2, 0x7, 0xec, 0x2, 0x2, 0x2c0, 0x2c2, 0x7, 0xec, 0x2, 0x2,
0x2c1, 0x2b7, 0x3, 0x2, 0x2, 0x2, 0x2c1, 0x2c0, 0x3, 0x2, 0x2, 0x2,
0x2c2, 0x5, 0x3, 0x2, 0x2, 0x2, 0x2c3, 0x2ce, 0x5, 0xa2, 0x52, 0x2,
0x2c4, 0x2ce, 0x5, 0xd0, 0x69, 0x2, 0x2c5, 0x2ce, 0x5, 0xf0, 0x79, 0x2,
0x2c6, 0x2ce, 0x5, 0x1b2, 0xda, 0x2, 0x2c7, 0x2ce, 0x5, 0x1c8, 0xe5,
0x2, 0x2c8, 0x2ce, 0x5, 0x1e4, 0xf3, 0x2, 0x2c9, 0x2ce, 0x5, 0x22e,
0x118, 0x2, 0x2ca, 0x2ce, 0x5, 0x24e, 0x128, 0x2, 0x2cb, 0x2ce, 0x5,
0x280, 0x141, 0x2, 0x2cc, 0x2ce, 0x5, 0x29e, 0x150, 0x2, 0x2cd, 0x2c3,
0x3, 0x2, 0x2, 0x2, 0x2cd, 0x2c4, 0x3, 0x2, 0x2, 0x2, 0x2cd, 0x2c5,
0x3, 0x2, 0x2, 0x2, 0x2cd, 0x2c6, 0x3, 0x2, 0x2, 0x2, 0x2cd, 0x2c7,
0x3, 0x2, 0x2, 0x2, 0x2cd, 0x2c8, 0x3, 0x2, 0x2, 0x2, 0x2cd, 0x2c9,
0x3, 0x2, 0x2, 0x2, 0x2cd, 0x2ca, 0x3, 0x2, 0x2, 0x2, 0x2cd, 0x2cb,
0x3, 0x2, 0x2, 0x2, 0x2cd, 0x2cc, 0x3, 0x2, 0x2, 0x2, 0x2ce, 0x7, 0x3,
0x2, 0x2, 0x2, 0x2cf, 0x2d0, 0x9, 0x2, 0x2, 0x2, 0x2d0, 0x9, 0x3, 0x2,
0x2, 0x2, 0x2d1, 0x2d2, 0x9, 0x3, 0x2, 0x2, 0x2d2, 0xb, 0x3, 0x2, 0x2,
0x2, 0x2d3, 0x2d4, 0x9, 0x4, 0x2, 0x2, 0x2d4, 0xd, 0x3, 0x2, 0x2, 0x2,
0x2d5, 0x2d6, 0x9, 0x5, 0x2, 0x2, 0x2d6, 0xf, 0x3, 0x2, 0x2, 0x2, 0x2d7,
0x2d8, 0x9, 0x6, 0x2, 0x2, 0x2d8, 0x11, 0x3, 0x2, 0x2, 0x2, 0x2d9, 0x2da,
0x9, 0x7, 0x2, 0x2, 0x2da, 0x13, 0x3, 0x2, 0x2, 0x2, 0x2db, 0x2dc, 0x9,
0x8, 0x2, 0x2, 0x2dc, 0x15, 0x3, 0x2, 0x2, 0x2, 0x2dd, 0x2de, 0x9, 0x9,
0x2, 0x2, 0x2de, 0x17, 0x3, 0x2, 0x2, 0x2, 0x2df, 0x2e3, 0x7, 0x13,
0x2, 0x2, 0x2e0, 0x2e3, 0x7, 0x14, 0x2, 0x2, 0x2e1, 0x2e3, 0x5, 0x8,
0x5, 0x2, 0x2e2, 0x2df, 0x3, 0x2, 0x2, 0x2, 0x2e2, 0x2e0, 0x3, 0x2,
0x2, 0x2, 0x2e2, 0x2e1, 0x3, 0x2, 0x2, 0x2, 0x2e3, 0x19, 0x3, 0x2, 0x2,
0x2, 0x2e4, 0x2e8, 0x7, 0x15, 0x2, 0x2, 0x2e5, 0x2e8, 0x7, 0x16, 0x2,
0x2, 0x2e6, 0x2e8, 0x5, 0xa, 0x6, 0x2, 0x2e7, 0x2e4, 0x3, 0x2, 0x2,
0x2, 0x2e7, 0x2e5, 0x3, 0x2, 0x2, 0x2, 0x2e7, 0x2e6, 0x3, 0x2, 0x2,
0x2, 0x2e8, 0x1b, 0x3, 0x2, 0x2, 0x2, 0x2e9, 0x2ed, 0x7, 0x17, 0x2,
0x2, 0x2ea, 0x2ed, 0x7, 0x18, 0x2, 0x2, 0x2eb, 0x2ed, 0x5, 0x1e, 0x10,
0x2, 0x2ec, 0x2e9, 0x3, 0x2, 0x2, 0x2, 0x2ec, 0x2ea, 0x3, 0x2, 0x2,
0x2, 0x2ec, 0x2eb, 0x3, 0x2, 0x2, 0x2, 0x2ed, 0x1d, 0x3, 0x2, 0x2, 0x2,
0x2ee, 0x2ef, 0x9, 0xa, 0x2, 0x2, 0x2ef, 0x1f, 0x3, 0x2, 0x2, 0x2, 0x2f0,
0x2f1, 0x9, 0xb, 0x2, 0x2, 0x2f1, 0x21, 0x3, 0x2, 0x2, 0x2, 0x2f2, 0x2f3,
0x9, 0xc, 0x2, 0x2, 0x2f3, 0x23, 0x3, 0x2, 0x2, 0x2, 0x2f4, 0x2f5, 0x9,
0xd, 0x2, 0x2, 0x2f5, 0x25, 0x3, 0x2, 0x2, 0x2, 0x2f6, 0x2fa, 0x7, 0x21,
0x2, 0x2, 0x2f7, 0x2fa, 0x7, 0x22, 0x2, 0x2, 0x2f8, 0x2fa, 0x5, 0xc,
0x7, 0x2, 0x2f9, 0x2f6, 0x3, 0x2, 0x2, 0x2, 0x2f9, 0x2f7, 0x3, 0x2,
0x2, 0x2, 0x2f9, 0x2f8, 0x3, 0x2, 0x2, 0x2, 0x2fa, 0x27, 0x3, 0x2, 0x2,
0x2, 0x2fb, 0x2ff, 0x7, 0x23, 0x2, 0x2, 0x2fc, 0x2ff, 0x7, 0x24, 0x2,
0x2, 0x2fd, 0x2ff, 0x5, 0xe, 0x8, 0x2, 0x2fe, 0x2fb, 0x3, 0x2, 0x2,
0x2, 0x2fe, 0x2fc, 0x3, 0x2, 0x2, 0x2, 0x2fe, 0x2fd, 0x3, 0x2, 0x2,
0x2, 0x2ff, 0x29, 0x3, 0x2, 0x2, 0x2, 0x300, 0x304, 0x7, 0x25, 0x2,
0x2, 0x301, 0x304, 0x7, 0x26, 0x2, 0x2, 0x302, 0x304, 0x5, 0x20, 0x11,
0x2, 0x303, 0x300, 0x3, 0x2, 0x2, 0x2, 0x303, 0x301, 0x3, 0x2, 0x2,
0x2, 0x303, 0x302, 0x3, 0x2, 0x2, 0x2, 0x304, 0x2b, 0x3, 0x2, 0x2, 0x2,
0x305, 0x309, 0x7, 0x27, 0x2, 0x2, 0x306, 0x309, 0x7, 0x28, 0x2, 0x2,
0x307, 0x309, 0x5, 0x10, 0x9, 0x2, 0x308, 0x305, 0x3, 0x2, 0x2, 0x2,
0x308, 0x306, 0x3, 0x2, 0x2, 0x2, 0x308, 0x307, 0x3, 0x2, 0x2, 0x2,
0x309, 0x2d, 0x3, 0x2, 0x2, 0x2, 0x30a, 0x30e, 0x7, 0x29, 0x2, 0x2,
0x30b, 0x30e, 0x7, 0x2a, 0x2, 0x2, 0x30c, 0x30e, 0x5, 0x12, 0xa, 0x2,
0x30d, 0x30a, 0x3, 0x2, 0x2, 0x2, 0x30d, 0x30b, 0x3, 0x2, 0x2, 0x2,
0x30d, 0x30c, 0x3, 0x2, 0x2, 0x2, 0x30e, 0x2f, 0x3, 0x2, 0x2, 0x2, 0x30f,
0x313, 0x7, 0x2b, 0x2, 0x2, 0x310, 0x313, 0x7, 0x2c, 0x2, 0x2, 0x311,
0x313, 0x5, 0x22, 0x12, 0x2, 0x312, 0x30f, 0x3, 0x2, 0x2, 0x2, 0x312,
0x310, 0x3, 0x2, 0x2, 0x2, 0x312, 0x311, 0x3, 0x2, 0x2, 0x2, 0x313,
0x31, 0x3, 0x2, 0x2, 0x2, 0x314, 0x318, 0x7, 0x2d, 0x2, 0x2, 0x315,
0x318, 0x7, 0x2e, 0x2, 0x2, 0x316, 0x318, 0x5, 0x14, 0xb, 0x2, 0x317,
0x314, 0x3, 0x2, 0x2, 0x2, 0x317, 0x315, 0x3, 0x2, 0x2, 0x2, 0x317,
0x316, 0x3, 0x2, 0x2, 0x2, 0x318, 0x33, 0x3, 0x2, 0x2, 0x2, 0x319, 0x31d,
0x7, 0x2f, 0x2, 0x2, 0x31a, 0x31d, 0x7, 0x30, 0x2, 0x2, 0x31b, 0x31d,
0x5, 0x16, 0xc, 0x2, 0x31c, 0x319, 0x3, 0x2, 0x2, 0x2, 0x31c, 0x31a,
0x3, 0x2, 0x2, 0x2, 0x31c, 0x31b, 0x3, 0x2, 0x2, 0x2, 0x31d, 0x35, 0x3,
0x2, 0x2, 0x2, 0x31e, 0x322, 0x7, 0x31, 0x2, 0x2, 0x31f, 0x322, 0x7,
0x32, 0x2, 0x2, 0x320, 0x322, 0x5, 0x24, 0x13, 0x2, 0x321, 0x31e, 0x3,
0x2, 0x2, 0x2, 0x321, 0x31f, 0x3, 0x2, 0x2, 0x2, 0x321, 0x320, 0x3,
0x2, 0x2, 0x2, 0x322, 0x37, 0x3, 0x2, 0x2, 0x2, 0x323, 0x324, 0x9, 0xe,
0x2, 0x2, 0x324, 0x39, 0x3, 0x2, 0x2, 0x2, 0x325, 0x326, 0x9, 0xf, 0x2,
0x2, 0x326, 0x3b, 0x3, 0x2, 0x2, 0x2, 0x327, 0x328, 0x9, 0x10, 0x2,
0x2, 0x328, 0x3d, 0x3, 0x2, 0x2, 0x2, 0x329, 0x32a, 0x9, 0x11, 0x2,
0x2, 0x32a, 0x3f, 0x3, 0x2, 0x2, 0x2, 0x32b, 0x32c, 0x9, 0x12, 0x2,
0x2, 0x32c, 0x41, 0x3, 0x2, 0x2, 0x2, 0x32d, 0x32e, 0x9, 0x13, 0x2,
0x2, 0x32e, 0x43, 0x3, 0x2, 0x2, 0x2, 0x32f, 0x330, 0x9, 0x14, 0x2,
0x2, 0x330, 0x45, 0x3, 0x2, 0x2, 0x2, 0x331, 0x332, 0x9, 0x15, 0x2,
0x2, 0x332, 0x47, 0x3, 0x2, 0x2, 0x2, 0x333, 0x334, 0x9, 0x16, 0x2,
0x2, 0x334, 0x49, 0x3, 0x2, 0x2, 0x2, 0x335, 0x336, 0x9, 0x17, 0x2,
0x2, 0x336, 0x4b, 0x3, 0x2, 0x2, 0x2, 0x337, 0x338, 0x7, 0x47, 0x2,
0x2, 0x338, 0x339, 0x5, 0x36, 0x1c, 0x2, 0x339, 0x33a, 0x7, 0x48, 0x2,
0x2, 0x33a, 0x4d, 0x3, 0x2, 0x2, 0x2, 0x33b, 0x33c, 0x7, 0x47, 0x2,
0x2, 0x33c, 0x33d, 0x5, 0x2a, 0x16, 0x2, 0x33d, 0x33e, 0x7, 0x48, 0x2,
0x2, 0x33e, 0x4f, 0x3, 0x2, 0x2, 0x2, 0x33f, 0x340, 0x7, 0x47, 0x2,
0x2, 0x340, 0x341, 0x5, 0x30, 0x19, 0x2, 0x341, 0x342, 0x7, 0x48, 0x2,
0x2, 0x342, 0x51, 0x3, 0x2, 0x2, 0x2, 0x343, 0x344, 0x7, 0x47, 0x2,
0x2, 0x344, 0x345, 0x5, 0x48, 0x25, 0x2, 0x345, 0x346, 0x7, 0x48, 0x2,
0x2, 0x346, 0x53, 0x3, 0x2, 0x2, 0x2, 0x347, 0x348, 0x7, 0x47, 0x2,
0x2, 0x348, 0x349, 0x5, 0x28, 0x15, 0x2, 0x349, 0x34a, 0x7, 0x48, 0x2,
0x2, 0x34a, 0x55, 0x3, 0x2, 0x2, 0x2, 0x34b, 0x34c, 0x7, 0x47, 0x2,
0x2, 0x34c, 0x34d, 0x5, 0x3c, 0x1f, 0x2, 0x34d, 0x34e, 0x7, 0x49, 0x2,
0x2, 0x34e, 0x34f, 0x5, 0x2a8, 0x155, 0x2, 0x34f, 0x350, 0x7, 0x48,
0x2, 0x2, 0x350, 0x57, 0x3, 0x2, 0x2, 0x2, 0x351, 0x352, 0x7, 0x47,
0x2, 0x2, 0x352, 0x353, 0x5, 0x3e, 0x20, 0x2, 0x353, 0x354, 0x7, 0x49,
0x2, 0x2, 0x354, 0x355, 0x5, 0x2a8, 0x155, 0x2, 0x355, 0x356, 0x7, 0x48,
0x2, 0x2, 0x356, 0x59, 0x3, 0x2, 0x2, 0x2, 0x357, 0x358, 0x7, 0x47,
0x2, 0x2, 0x358, 0x359, 0x5, 0x2a8, 0x155, 0x2, 0x359, 0x35a, 0x7, 0x48,
0x2, 0x2, 0x35a, 0x5b, 0x3, 0x2, 0x2, 0x2, 0x35b, 0x363, 0x5, 0x26,
0x14, 0x2, 0x35c, 0x363, 0x5, 0x28, 0x15, 0x2, 0x35d, 0x363, 0x5, 0x2c,
0x17, 0x2, 0x35e, 0x363, 0x5, 0x2e, 0x18, 0x2, 0x35f, 0x363, 0x5, 0x32,
0x1a, 0x2, 0x360, 0x363, 0x5, 0x34, 0x1b, 0x2, 0x361, 0x363, 0x5, 0x18,
0xd, 0x2, 0x362, 0x35b, 0x3, 0x2, 0x2, 0x2, 0x362, 0x35c, 0x3, 0x2,
0x2, 0x2, 0x362, 0x35d, 0x3, 0x2, 0x2, 0x2, 0x362, 0x35e, 0x3, 0x2,
0x2, 0x2, 0x362, 0x35f, 0x3, 0x2, 0x2, 0x2, 0x362, 0x360, 0x3, 0x2,
0x2, 0x2, 0x362, 0x361, 0x3, 0x2, 0x2, 0x2, 0x363, 0x5d, 0x3, 0x2, 0x2,
0x2, 0x364, 0x365, 0x9, 0x18, 0x2, 0x2, 0x365, 0x5f, 0x3, 0x2, 0x2,
0x2, 0x366, 0x367, 0x5, 0x5e, 0x30, 0x2, 0x367, 0x368, 0x5, 0x5c, 0x2f,
0x2, 0x368, 0x369, 0x7, 0x4c, 0x2, 0x2, 0x369, 0x36a, 0x5, 0x5c, 0x2f,
0x2, 0x36a, 0x61, 0x3, 0x2, 0x2, 0x2, 0x36b, 0x36c, 0x5, 0x5e, 0x30,
0x2, 0x36c, 0x36d, 0x5, 0x5c, 0x2f, 0x2, 0x36d, 0x36e, 0x7, 0x4c, 0x2,
0x2, 0x36e, 0x36f, 0x5, 0x2a8, 0x155, 0x2, 0x36f, 0x63, 0x3, 0x2, 0x2,
0x2, 0x370, 0x371, 0x5, 0x5e, 0x30, 0x2, 0x371, 0x372, 0x5, 0x5c, 0x2f,
0x2, 0x372, 0x373, 0x7, 0x4c, 0x2, 0x2, 0x373, 0x374, 0x5, 0x4c, 0x27,
0x2, 0x374, 0x65, 0x3, 0x2, 0x2, 0x2, 0x375, 0x376, 0x5, 0x5e, 0x30,
0x2, 0x376, 0x377, 0x5, 0x5c, 0x2f, 0x2, 0x377, 0x378, 0x7, 0x4c, 0x2,
0x2, 0x378, 0x379, 0x5, 0x56, 0x2c, 0x2, 0x379, 0x67, 0x3, 0x2, 0x2,
0x2, 0x37a, 0x37b, 0x5, 0x5e, 0x30, 0x2, 0x37b, 0x37c, 0x5, 0x5c, 0x2f,
0x2, 0x37c, 0x37d, 0x7, 0x4c, 0x2, 0x2, 0x37d, 0x37e, 0x5, 0x58, 0x2d,
0x2, 0x37e, 0x69, 0x3, 0x2, 0x2, 0x2, 0x37f, 0x380, 0x5, 0x5e, 0x30,
0x2, 0x380, 0x381, 0x5, 0x4c, 0x27, 0x2, 0x381, 0x382, 0x7, 0x4c, 0x2,
0x2, 0x382, 0x383, 0x5, 0x5c, 0x2f, 0x2, 0x383, 0x6b, 0x3, 0x2, 0x2,
0x2, 0x384, 0x385, 0x5, 0x5e, 0x30, 0x2, 0x385, 0x386, 0x5, 0x56, 0x2c,
0x2, 0x386, 0x387, 0x7, 0x4c, 0x2, 0x2, 0x387, 0x388, 0x5, 0x5c, 0x2f,
0x2, 0x388, 0x6d, 0x3, 0x2, 0x2, 0x2, 0x389, 0x38a, 0x5, 0x5e, 0x30,
0x2, 0x38a, 0x38b, 0x5, 0x58, 0x2d, 0x2, 0x38b, 0x38c, 0x7, 0x4c, 0x2,
0x2, 0x38c, 0x38d, 0x5, 0x5c, 0x2f, 0x2, 0x38d, 0x6f, 0x3, 0x2, 0x2,
0x2, 0x38e, 0x38f, 0x5, 0x5e, 0x30, 0x2, 0x38f, 0x390, 0x5, 0x4c, 0x27,
0x2, 0x390, 0x391, 0x7, 0x4c, 0x2, 0x2, 0x391, 0x392, 0x5, 0x2a8, 0x155,
0x2, 0x392, 0x71, 0x3, 0x2, 0x2, 0x2, 0x393, 0x394, 0x5, 0x5e, 0x30,
0x2, 0x394, 0x395, 0x5, 0x56, 0x2c, 0x2, 0x395, 0x396, 0x7, 0x4c, 0x2,
0x2, 0x396, 0x397, 0x5, 0x2a8, 0x155, 0x2, 0x397, 0x73, 0x3, 0x2, 0x2,
0x2, 0x398, 0x399, 0x5, 0x5e, 0x30, 0x2, 0x399, 0x39a, 0x5, 0x58, 0x2d,
0x2, 0x39a, 0x39b, 0x7, 0x4c, 0x2, 0x2, 0x39b, 0x39c, 0x5, 0x2a8, 0x155,
0x2, 0x39c, 0x75, 0x3, 0x2, 0x2, 0x2, 0x39d, 0x39e, 0x5, 0x5e, 0x30,
0x2, 0x39e, 0x39f, 0x5, 0x18, 0xd, 0x2, 0x39f, 0x3a0, 0x7, 0x4c, 0x2,
0x2, 0x3a0, 0x3a1, 0x5, 0x4e, 0x28, 0x2, 0x3a1, 0x77, 0x3, 0x2, 0x2,
0x2, 0x3a2, 0x3a3, 0x5, 0x5e, 0x30, 0x2, 0x3a3, 0x3a4, 0x5, 0x18, 0xd,
0x2, 0x3a4, 0x3a5, 0x7, 0x4c, 0x2, 0x2, 0x3a5, 0x3a6, 0x5, 0x50, 0x29,
0x2, 0x3a6, 0x79, 0x3, 0x2, 0x2, 0x2, 0x3a7, 0x3a8, 0x5, 0x5e, 0x30,
0x2, 0x3a8, 0x3a9, 0x5, 0x18, 0xd, 0x2, 0x3a9, 0x3aa, 0x7, 0x4c, 0x2,
0x2, 0x3aa, 0x3ab, 0x5, 0x5a, 0x2e, 0x2, 0x3ab, 0x7b, 0x3, 0x2, 0x2,
0x2, 0x3ac, 0x3ad, 0x5, 0x5e, 0x30, 0x2, 0x3ad, 0x3ae, 0x5, 0x4e, 0x28,
0x2, 0x3ae, 0x3af, 0x7, 0x4c, 0x2, 0x2, 0x3af, 0x3b0, 0x5, 0x18, 0xd,
0x2, 0x3b0, 0x7d, 0x3, 0x2, 0x2, 0x2, 0x3b1, 0x3b2, 0x5, 0x5e, 0x30,
0x2, 0x3b2, 0x3b3, 0x5, 0x50, 0x29, 0x2, 0x3b3, 0x3b4, 0x7, 0x4c, 0x2,
0x2, 0x3b4, 0x3b5, 0x5, 0x18, 0xd, 0x2, 0x3b5, 0x7f, 0x3, 0x2, 0x2,
0x2, 0x3b6, 0x3b7, 0x5, 0x5e, 0x30, 0x2, 0x3b7, 0x3b8, 0x5, 0x5a, 0x2e,
0x2, 0x3b8, 0x3b9, 0x7, 0x4c, 0x2, 0x2, 0x3b9, 0x3ba, 0x5, 0x18, 0xd,
0x2, 0x3ba, 0x81, 0x3, 0x2, 0x2, 0x2, 0x3bb, 0x3bc, 0x5, 0x5e, 0x30,
0x2, 0x3bc, 0x3bd, 0x5, 0x18, 0xd, 0x2, 0x3bd, 0x3be, 0x7, 0x4c, 0x2,
0x2, 0x3be, 0x3bf, 0x5, 0x38, 0x1d, 0x2, 0x3bf, 0x83, 0x3, 0x2, 0x2,
0x2, 0x3c0, 0x3c1, 0x5, 0x5e, 0x30, 0x2, 0x3c1, 0x3c2, 0x5, 0x18, 0xd,
0x2, 0x3c2, 0x3c3, 0x7, 0x4c, 0x2, 0x2, 0x3c3, 0x3c4, 0x5, 0x3a, 0x1e,
0x2, 0x3c4, 0x85, 0x3, 0x2, 0x2, 0x2, 0x3c5, 0x3c6, 0x5, 0x5e, 0x30,
0x2, 0x3c6, 0x3c7, 0x5, 0x38, 0x1d, 0x2, 0x3c7, 0x3c8, 0x7, 0x4c, 0x2,
0x2, 0x3c8, 0x3c9, 0x5, 0x18, 0xd, 0x2, 0x3c9, 0x87, 0x3, 0x2, 0x2,
0x2, 0x3ca, 0x3cb, 0x5, 0x5e, 0x30, 0x2, 0x3cb, 0x3cc, 0x5, 0x3a, 0x1e,
0x2, 0x3cc, 0x3cd, 0x7, 0x4c, 0x2, 0x2, 0x3cd, 0x3ce, 0x5, 0x18, 0xd,
0x2, 0x3ce, 0x89, 0x3, 0x2, 0x2, 0x2, 0x3cf, 0x3d0, 0x5, 0x5e, 0x30,
0x2, 0x3d0, 0x3d1, 0x5, 0x5c, 0x2f, 0x2, 0x3d1, 0x3d2, 0x7, 0x4c, 0x2,
0x2, 0x3d2, 0x3d3, 0x5, 0x40, 0x21, 0x2, 0x3d3, 0x8b, 0x3, 0x2, 0x2,
0x2, 0x3d4, 0x3d5, 0x5, 0x5e, 0x30, 0x2, 0x3d5, 0x3d6, 0x5, 0x5c, 0x2f,
0x2, 0x3d6, 0x3d7, 0x7, 0x4c, 0x2, 0x2, 0x3d7, 0x3d8, 0x5, 0x42, 0x22,
0x2, 0x3d8, 0x8d, 0x3, 0x2, 0x2, 0x2, 0x3d9, 0x3da, 0x5, 0x5e, 0x30,
0x2, 0x3da, 0x3db, 0x5, 0x5c, 0x2f, 0x2, 0x3db, 0x3dc, 0x7, 0x4c, 0x2,
0x2, 0x3dc, 0x3dd, 0x5, 0x44, 0x23, 0x2, 0x3dd, 0x8f, 0x3, 0x2, 0x2,
0x2, 0x3de, 0x3df, 0x5, 0x5e, 0x30, 0x2, 0x3df, 0x3e0, 0x5, 0x5c, 0x2f,
0x2, 0x3e0, 0x3e1, 0x7, 0x4c, 0x2, 0x2, 0x3e1, 0x3e2, 0x5, 0x46, 0x24,
0x2, 0x3e2, 0x91, 0x3, 0x2, 0x2, 0x2, 0x3e3, 0x3e4, 0x5, 0x5e, 0x30,
0x2, 0x3e4, 0x3e5, 0x5, 0x40, 0x21, 0x2, 0x3e5, 0x3e6, 0x7, 0x4c, 0x2,
0x2, 0x3e6, 0x3e7, 0x5, 0x5c, 0x2f, 0x2, 0x3e7, 0x93, 0x3, 0x2, 0x2,
0x2, 0x3e8, 0x3eb, 0x5, 0x40, 0x21, 0x2, 0x3e9, 0x3eb, 0x5, 0x42, 0x22,
0x2, 0x3ea, 0x3e8, 0x3, 0x2, 0x2, 0x2, 0x3ea, 0x3e9, 0x3, 0x2, 0x2,
0x2, 0x3eb, 0x95, 0x3, 0x2, 0x2, 0x2, 0x3ec, 0x3ef, 0x5, 0x44, 0x23,
0x2, 0x3ed, 0x3ef, 0x5, 0x46, 0x24, 0x2, 0x3ee, 0x3ec, 0x3, 0x2, 0x2,
0x2, 0x3ee, 0x3ed, 0x3, 0x2, 0x2, 0x2, 0x3ef, 0x97, 0x3, 0x2, 0x2, 0x2,
0x3f0, 0x3f1, 0x5, 0x5e, 0x30, 0x2, 0x3f1, 0x3f2, 0x5, 0x94, 0x4b, 0x2,
0x3f2, 0x3f3, 0x7, 0x4c, 0x2, 0x2, 0x3f3, 0x3f4, 0x5, 0x94, 0x4b, 0x2,
0x3f4, 0x99, 0x3, 0x2, 0x2, 0x2, 0x3f5, 0x3f6, 0x5, 0x5e, 0x30, 0x2,
0x3f6, 0x3f7, 0x5, 0x96, 0x4c, 0x2, 0x3f7, 0x3f8, 0x7, 0x4c, 0x2, 0x2,
0x3f8, 0x3f9, 0x5, 0x96, 0x4c, 0x2, 0x3f9, 0x9b, 0x3, 0x2, 0x2, 0x2,
0x3fa, 0x3fb, 0x5, 0x5e, 0x30, 0x2, 0x3fb, 0x3fc, 0x5, 0x42, 0x22, 0x2,
0x3fc, 0x3fd, 0x7, 0x4c, 0x2, 0x2, 0x3fd, 0x3fe, 0x5, 0x5c, 0x2f, 0x2,
0x3fe, 0x9d, 0x3, 0x2, 0x2, 0x2, 0x3ff, 0x400, 0x5, 0x5e, 0x30, 0x2,
0x400, 0x401, 0x5, 0x44, 0x23, 0x2, 0x401, 0x402, 0x7, 0x4c, 0x2, 0x2,
0x402, 0x403, 0x5, 0x5c, 0x2f, 0x2, 0x403, 0x9f, 0x3, 0x2, 0x2, 0x2,
0x404, 0x405, 0x5, 0x5e, 0x30, 0x2, 0x405, 0x406, 0x5, 0x46, 0x24, 0x2,
0x406, 0x407, 0x7, 0x4c, 0x2, 0x2, 0x407, 0x408, 0x5, 0x5c, 0x2f, 0x2,
0x408, 0xa1, 0x3, 0x2, 0x2, 0x2, 0x409, 0x429, 0x5, 0x60, 0x31, 0x2,
0x40a, 0x429, 0x5, 0x62, 0x32, 0x2, 0x40b, 0x429, 0x5, 0x64, 0x33, 0x2,
0x40c, 0x429, 0x5, 0x66, 0x34, 0x2, 0x40d, 0x429, 0x5, 0x68, 0x35, 0x2,
0x40e, 0x429, 0x5, 0x6a, 0x36, 0x2, 0x40f, 0x429, 0x5, 0x6c, 0x37, 0x2,
0x410, 0x429, 0x5, 0x6e, 0x38, 0x2, 0x411, 0x429, 0x5, 0x70, 0x39, 0x2,
0x412, 0x429, 0x5, 0x72, 0x3a, 0x2, 0x413, 0x429, 0x5, 0x74, 0x3b, 0x2,
0x414, 0x429, 0x5, 0x76, 0x3c, 0x2, 0x415, 0x429, 0x5, 0x78, 0x3d, 0x2,
0x416, 0x429, 0x5, 0x7a, 0x3e, 0x2, 0x417, 0x429, 0x5, 0x7c, 0x3f, 0x2,
0x418, 0x429, 0x5, 0x7e, 0x40, 0x2, 0x419, 0x429, 0x5, 0x80, 0x41, 0x2,
0x41a, 0x429, 0x5, 0x82, 0x42, 0x2, 0x41b, 0x429, 0x5, 0x84, 0x43, 0x2,
0x41c, 0x429, 0x5, 0x86, 0x44, 0x2, 0x41d, 0x429, 0x5, 0x88, 0x45, 0x2,
0x41e, 0x429, 0x5, 0x8a, 0x46, 0x2, 0x41f, 0x429, 0x5, 0x8c, 0x47, 0x2,
0x420, 0x429, 0x5, 0x8e, 0x48, 0x2, 0x421, 0x429, 0x5, 0x90, 0x49, 0x2,
0x422, 0x429, 0x5, 0x92, 0x4a, 0x2, 0x423, 0x429, 0x5, 0x9c, 0x4f, 0x2,
0x424, 0x429, 0x5, 0x9e, 0x50, 0x2, 0x425, 0x429, 0x5, 0xa0, 0x51, 0x2,
0x426, 0x429, 0x5, 0x9a, 0x4e, 0x2, 0x427, 0x429, 0x5, 0x98, 0x4d, 0x2,
0x428, 0x409, 0x3, 0x2, 0x2, 0x2, 0x428, 0x40a, 0x3, 0x2, 0x2, 0x2,
0x428, 0x40b, 0x3, 0x2, 0x2, 0x2, 0x428, 0x40c, 0x3, 0x2, 0x2, 0x2,
0x428, 0x40d, 0x3, 0x2, 0x2, 0x2, 0x428, 0x40e, 0x3, 0x2, 0x2, 0x2,
0x428, 0x40f, 0x3, 0x2, 0x2, 0x2, 0x428, 0x410, 0x3, 0x2, 0x2, 0x2,
0x428, 0x411, 0x3, 0x2, 0x2, 0x2, 0x428, 0x412, 0x3, 0x2, 0x2, 0x2,
0x428, 0x413, 0x3, 0x2, 0x2, 0x2, 0x428, 0x414, 0x3, 0x2, 0x2, 0x2,
0x428, 0x415, 0x3, 0x2, 0x2, 0x2, 0x428, 0x416, 0x3, 0x2, 0x2, 0x2,
0x428, 0x417, 0x3, 0x2, 0x2, 0x2, 0x428, 0x418, 0x3, 0x2, 0x2, 0x2,
0x428, 0x419, 0x3, 0x2, 0x2, 0x2, 0x428, 0x41a, 0x3, 0x2, 0x2, 0x2,
0x428, 0x41b, 0x3, 0x2, 0x2, 0x2, 0x428, 0x41c, 0x3, 0x2, 0x2, 0x2,
0x428, 0x41d, 0x3, 0x2, 0x2, 0x2, 0x428, 0x41e, 0x3, 0x2, 0x2, 0x2,
0x428, 0x41f, 0x3, 0x2, 0x2, 0x2, 0x428, 0x420, 0x3, 0x2, 0x2, 0x2,
0x428, 0x421, 0x3, 0x2, 0x2, 0x2, 0x428, 0x422, 0x3, 0x2, 0x2, 0x2,
0x428, 0x423, 0x3, 0x2, 0x2, 0x2, 0x428, 0x424, 0x3, 0x2, 0x2, 0x2,
0x428, 0x425, 0x3, 0x2, 0x2, 0x2, 0x428, 0x426, 0x3, 0x2, 0x2, 0x2,
0x428, 0x427, 0x3, 0x2, 0x2, 0x2, 0x429, 0xa3, 0x3, 0x2, 0x2, 0x2, 0x42a,
0x42f, 0x5, 0x2a, 0x16, 0x2, 0x42b, 0x42f, 0x5, 0x30, 0x19, 0x2, 0x42c,
0x42f, 0x5, 0x36, 0x1c, 0x2, 0x42d, 0x42f, 0x5, 0x48, 0x25, 0x2, 0x42e,
0x42a, 0x3, 0x2, 0x2, 0x2, 0x42e, 0x42b, 0x3, 0x2, 0x2, 0x2, 0x42e,
0x42c, 0x3, 0x2, 0x2, 0x2, 0x42e, 0x42d, 0x3, 0x2, 0x2, 0x2, 0x42f,
0xa5, 0x3, 0x2, 0x2, 0x2, 0x430, 0x431, 0x5, 0x5e, 0x30, 0x2, 0x431,
0x432, 0x5, 0xa4, 0x53, 0x2, 0x432, 0x433, 0x7, 0x4c, 0x2, 0x2, 0x433,
0x434, 0x5, 0x2a8, 0x155, 0x2, 0x434, 0xa7, 0x3, 0x2, 0x2, 0x2, 0x435,
0x436, 0x5, 0x5e, 0x30, 0x2, 0x436, 0x437, 0x5, 0x3c, 0x1f, 0x2, 0x437,
0x438, 0x7, 0x4c, 0x2, 0x2, 0x438, 0x439, 0x5, 0x2a8, 0x155, 0x2, 0x439,
0xa9, 0x3, 0x2, 0x2, 0x2, 0x43a, 0x43b, 0x5, 0x5e, 0x30, 0x2, 0x43b,
0x43c, 0x5, 0x3e, 0x20, 0x2, 0x43c, 0x43d, 0x7, 0x4c, 0x2, 0x2, 0x43d,
0x43e, 0x5, 0x2a8, 0x155, 0x2, 0x43e, 0xab, 0x3, 0x2, 0x2, 0x2, 0x43f,
0x440, 0x5, 0x5e, 0x30, 0x2, 0x440, 0x441, 0x5, 0xa4, 0x53, 0x2, 0x441,
0x442, 0x7, 0x4c, 0x2, 0x2, 0x442, 0x443, 0x5, 0x5a, 0x2e, 0x2, 0x443,
0xad, 0x3, 0x2, 0x2, 0x2, 0x444, 0x445, 0x5, 0x5e, 0x30, 0x2, 0x445,
0x446, 0x5, 0x3c, 0x1f, 0x2, 0x446, 0x447, 0x7, 0x4c, 0x2, 0x2, 0x447,
0x448, 0x5, 0x5a, 0x2e, 0x2, 0x448, 0xaf, 0x3, 0x2, 0x2, 0x2, 0x449,
0x44a, 0x5, 0x5e, 0x30, 0x2, 0x44a, 0x44b, 0x5, 0x3e, 0x20, 0x2, 0x44b,
0x44c, 0x7, 0x4c, 0x2, 0x2, 0x44c, 0x44d, 0x5, 0x5a, 0x2e, 0x2, 0x44d,
0xb1, 0x3, 0x2, 0x2, 0x2, 0x44e, 0x44f, 0x5, 0x5e, 0x30, 0x2, 0x44f,
0x450, 0x5, 0x5a, 0x2e, 0x2, 0x450, 0x451, 0x7, 0x4c, 0x2, 0x2, 0x451,
0x452, 0x5, 0xa4, 0x53, 0x2, 0x452, 0xb3, 0x3, 0x2, 0x2, 0x2, 0x453,
0x454, 0x5, 0x5e, 0x30, 0x2, 0x454, 0x455, 0x5, 0x5a, 0x2e, 0x2, 0x455,
0x456, 0x7, 0x4c, 0x2, 0x2, 0x456, 0x457, 0x5, 0x3c, 0x1f, 0x2, 0x457,
0xb5, 0x3, 0x2, 0x2, 0x2, 0x458, 0x459, 0x5, 0x5e, 0x30, 0x2, 0x459,
0x45a, 0x5, 0x5a, 0x2e, 0x2, 0x45a, 0x45b, 0x7, 0x4c, 0x2, 0x2, 0x45b,
0x45c, 0x5, 0x3e, 0x20, 0x2, 0x45c, 0xb7, 0x3, 0x2, 0x2, 0x2, 0x45d,
0x45e, 0x5, 0x5e, 0x30, 0x2, 0x45e, 0x45f, 0x5, 0x48, 0x25, 0x2, 0x45f,
0x460, 0x7, 0x4c, 0x2, 0x2, 0x460, 0x461, 0x5, 0x36, 0x1c, 0x2, 0x461,
0xb9, 0x3, 0x2, 0x2, 0x2, 0x462, 0x463, 0x5, 0x5e, 0x30, 0x2, 0x463,
0x464, 0x5, 0x48, 0x25, 0x2, 0x464, 0x465, 0x7, 0x4c, 0x2, 0x2, 0x465,
0x466, 0x5, 0x3c, 0x1f, 0x2, 0x466, 0xbb, 0x3, 0x2, 0x2, 0x2, 0x467,
0x468, 0x5, 0x5e, 0x30, 0x2, 0x468, 0x469, 0x5, 0x48, 0x25, 0x2, 0x469,
0x46a, 0x7, 0x4c, 0x2, 0x2, 0x46a, 0x46b, 0x5, 0x3e, 0x20, 0x2, 0x46b,
0xbd, 0x3, 0x2, 0x2, 0x2, 0x46c, 0x46d, 0x9, 0x19, 0x2, 0x2, 0x46d,
0xbf, 0x3, 0x2, 0x2, 0x2, 0x46e, 0x46f, 0x9, 0x1a, 0x2, 0x2, 0x46f,
0xc1, 0x3, 0x2, 0x2, 0x2, 0x470, 0x476, 0x5, 0x2a, 0x16, 0x2, 0x471,
0x476, 0x5, 0x30, 0x19, 0x2, 0x472, 0x476, 0x5, 0x36, 0x1c, 0x2, 0x473,
0x476, 0x5, 0x1c, 0xf, 0x2, 0x474, 0x476, 0x3, 0x2, 0x2, 0x2, 0x475,
0x470, 0x3, 0x2, 0x2, 0x2, 0x475, 0x471, 0x3, 0x2, 0x2, 0x2, 0x475,
0x472, 0x3, 0x2, 0x2, 0x2, 0x475, 0x473, 0x3, 0x2, 0x2, 0x2, 0x475,
0x474, 0x3, 0x2, 0x2, 0x2, 0x476, 0xc3, 0x3, 0x2, 0x2, 0x2, 0x477, 0x478,
0x5, 0xbe, 0x60, 0x2, 0x478, 0x479, 0x5, 0xc2, 0x62, 0x2, 0x479, 0xc5,
0x3, 0x2, 0x2, 0x2, 0x47a, 0x47b, 0x5, 0xbe, 0x60, 0x2, 0x47b, 0x47c,
0x5, 0x3c, 0x1f, 0x2, 0x47c, 0xc7, 0x3, 0x2, 0x2, 0x2, 0x47d, 0x47e,
0x5, 0xbe, 0x60, 0x2, 0x47e, 0x47f, 0x5, 0x3e, 0x20, 0x2, 0x47f, 0xc9,
0x3, 0x2, 0x2, 0x2, 0x480, 0x481, 0x5, 0xc0, 0x61, 0x2, 0x481, 0x482,
0x5, 0xc2, 0x62, 0x2, 0x482, 0xcb, 0x3, 0x2, 0x2, 0x2, 0x483, 0x484,
0x5, 0xc0, 0x61, 0x2, 0x484, 0x485, 0x5, 0x3c, 0x1f, 0x2, 0x485, 0xcd,
0x3, 0x2, 0x2, 0x2, 0x486, 0x487, 0x5, 0xc0, 0x61, 0x2, 0x487, 0x488,
0x5, 0x3e, 0x20, 0x2, 0x488, 0xcf, 0x3, 0x2, 0x2, 0x2, 0x489, 0x49c,
0x5, 0xa6, 0x54, 0x2, 0x48a, 0x49c, 0x5, 0xa8, 0x55, 0x2, 0x48b, 0x49c,
0x5, 0xaa, 0x56, 0x2, 0x48c, 0x49c, 0x5, 0xac, 0x57, 0x2, 0x48d, 0x49c,
0x5, 0xae, 0x58, 0x2, 0x48e, 0x49c, 0x5, 0xb0, 0x59, 0x2, 0x48f, 0x49c,
0x5, 0xb4, 0x5b, 0x2, 0x490, 0x49c, 0x5, 0xb6, 0x5c, 0x2, 0x491, 0x49c,
0x5, 0xb2, 0x5a, 0x2, 0x492, 0x49c, 0x5, 0xb8, 0x5d, 0x2, 0x493, 0x49c,
0x5, 0xba, 0x5e, 0x2, 0x494, 0x49c, 0x5, 0xbc, 0x5f, 0x2, 0x495, 0x49c,
0x5, 0xc4, 0x63, 0x2, 0x496, 0x49c, 0x5, 0xc6, 0x64, 0x2, 0x497, 0x49c,
0x5, 0xc8, 0x65, 0x2, 0x498, 0x49c, 0x5, 0xca, 0x66, 0x2, 0x499, 0x49c,
0x5, 0xcc, 0x67, 0x2, 0x49a, 0x49c, 0x5, 0xce, 0x68, 0x2, 0x49b, 0x489,
0x3, 0x2, 0x2, 0x2, 0x49b, 0x48a, 0x3, 0x2, 0x2, 0x2, 0x49b, 0x48b,
0x3, 0x2, 0x2, 0x2, 0x49b, 0x48c, 0x3, 0x2, 0x2, 0x2, 0x49b, 0x48d,
0x3, 0x2, 0x2, 0x2, 0x49b, 0x48e, 0x3, 0x2, 0x2, 0x2, 0x49b, 0x48f,
0x3, 0x2, 0x2, 0x2, 0x49b, 0x490, 0x3, 0x2, 0x2, 0x2, 0x49b, 0x491,
0x3, 0x2, 0x2, 0x2, 0x49b, 0x492, 0x3, 0x2, 0x2, 0x2, 0x49b, 0x493,
0x3, 0x2, 0x2, 0x2, 0x49b, 0x494, 0x3, 0x2, 0x2, 0x2, 0x49b, 0x495,
0x3, 0x2, 0x2, 0x2, 0x49b, 0x496, 0x3, 0x2, 0x2, 0x2, 0x49b, 0x497,
0x3, 0x2, 0x2, 0x2, 0x49b, 0x498, 0x3, 0x2, 0x2, 0x2, 0x49b, 0x499,
0x3, 0x2, 0x2, 0x2, 0x49b, 0x49a, 0x3, 0x2, 0x2, 0x2, 0x49c, 0xd1, 0x3,
0x2, 0x2, 0x2, 0x49d, 0x49e, 0x9, 0x1b, 0x2, 0x2, 0x49e, 0xd3, 0x3,
0x2, 0x2, 0x2, 0x49f, 0x4a0, 0x5, 0xd2, 0x6a, 0x2, 0x4a0, 0x4a1, 0x5,
0x30, 0x19, 0x2, 0x4a1, 0x4a2, 0x7, 0x4c, 0x2, 0x2, 0x4a2, 0x4a3, 0x5,
0x36, 0x1c, 0x2, 0x4a3, 0xd5, 0x3, 0x2, 0x2, 0x2, 0x4a4, 0x4a5, 0x5,
0xd2, 0x6a, 0x2, 0x4a5, 0x4a6, 0x5, 0x1c, 0xf, 0x2, 0x4a6, 0x4a7, 0x7,
0x4c, 0x2, 0x2, 0x4a7, 0x4a8, 0x5, 0x1c, 0xf, 0x2, 0x4a8, 0xd7, 0x3,
0x2, 0x2, 0x2, 0x4a9, 0x4aa, 0x9, 0x1c, 0x2, 0x2, 0x4aa, 0xd9, 0x3,
0x2, 0x2, 0x2, 0x4ab, 0x4ac, 0x5, 0xd2, 0x6a, 0x2, 0x4ac, 0x4ad, 0x5,
0x52, 0x2a, 0x2, 0x4ad, 0x4ae, 0x7, 0x4c, 0x2, 0x2, 0x4ae, 0x4af, 0x5,
0x36, 0x1c, 0x2, 0x4af, 0xdb, 0x3, 0x2, 0x2, 0x2, 0x4b0, 0x4b1, 0x5,
0xd2, 0x6a, 0x2, 0x4b1, 0x4b2, 0x5, 0x52, 0x2a, 0x2, 0x4b2, 0x4b3, 0x7,
0x4c, 0x2, 0x2, 0x4b3, 0x4b4, 0x5, 0x3c, 0x1f, 0x2, 0x4b4, 0xdd, 0x3,
0x2, 0x2, 0x2, 0x4b5, 0x4b6, 0x5, 0xd2, 0x6a, 0x2, 0x4b6, 0x4b7, 0x5,
0x52, 0x2a, 0x2, 0x4b7, 0x4b8, 0x7, 0x4c, 0x2, 0x2, 0x4b8, 0x4b9, 0x5,
0x3e, 0x20, 0x2, 0x4b9, 0xdf, 0x3, 0x2, 0x2, 0x2, 0x4ba, 0x4bb, 0x9,
0x1d, 0x2, 0x2, 0x4bb, 0xe1, 0x3, 0x2, 0x2, 0x2, 0x4bc, 0x4bd, 0x9,
0x1e, 0x2, 0x2, 0x4bd, 0xe3, 0x3, 0x2, 0x2, 0x2, 0x4be, 0x4bf, 0x9,
0x1f, 0x2, 0x2, 0x4bf, 0xe5, 0x3, 0x2, 0x2, 0x2, 0x4c0, 0x4c1, 0x9,
0x20, 0x2, 0x2, 0x4c1, 0xe7, 0x3, 0x2, 0x2, 0x2, 0x4c2, 0x4c3, 0x9,
0x21, 0x2, 0x2, 0x4c3, 0xe9, 0x3, 0x2, 0x2, 0x2, 0x4c4, 0x4c5, 0x9,
0x22, 0x2, 0x2, 0x4c5, 0xeb, 0x3, 0x2, 0x2, 0x2, 0x4c6, 0x4c7, 0x9,
0x23, 0x2, 0x2, 0x4c7, 0xed, 0x3, 0x2, 0x2, 0x2, 0x4c8, 0x4c9, 0x9,
0x24, 0x2, 0x2, 0x4c9, 0xef, 0x3, 0x2, 0x2, 0x2, 0x4ca, 0x4d9, 0x5,
0xd4, 0x6b, 0x2, 0x4cb, 0x4d9, 0x5, 0xd6, 0x6c, 0x2, 0x4cc, 0x4d9, 0x5,
0xd8, 0x6d, 0x2, 0x4cd, 0x4d9, 0x5, 0xda, 0x6e, 0x2, 0x4ce, 0x4d9, 0x5,
0xdc, 0x6f, 0x2, 0x4cf, 0x4d9, 0x5, 0xde, 0x70, 0x2, 0x4d0, 0x4d9, 0x5,
0xe0, 0x71, 0x2, 0x4d1, 0x4d9, 0x5, 0xe2, 0x72, 0x2, 0x4d2, 0x4d9, 0x5,
0xe4, 0x73, 0x2, 0x4d3, 0x4d9, 0x5, 0xe6, 0x74, 0x2, 0x4d4, 0x4d9, 0x5,
0xe8, 0x75, 0x2, 0x4d5, 0x4d9, 0x5, 0xea, 0x76, 0x2, 0x4d6, 0x4d9, 0x5,
0xec, 0x77, 0x2, 0x4d7, 0x4d9, 0x5, 0xee, 0x78, 0x2, 0x4d8, 0x4ca, 0x3,
0x2, 0x2, 0x2, 0x4d8, 0x4cb, 0x3, 0x2, 0x2, 0x2, 0x4d8, 0x4cc, 0x3,
0x2, 0x2, 0x2, 0x4d8, 0x4cd, 0x3, 0x2, 0x2, 0x2, 0x4d8, 0x4ce, 0x3,
0x2, 0x2, 0x2, 0x4d8, 0x4cf, 0x3, 0x2, 0x2, 0x2, 0x4d8, 0x4d0, 0x3,
0x2, 0x2, 0x2, 0x4d8, 0x4d1, 0x3, 0x2, 0x2, 0x2, 0x4d8, 0x4d2, 0x3,
0x2, 0x2, 0x2, 0x4d8, 0x4d3, 0x3, 0x2, 0x2, 0x2, 0x4d8, 0x4d4, 0x3,
0x2, 0x2, 0x2, 0x4d8, 0x4d5, 0x3, 0x2, 0x2, 0x2, 0x4d8, 0x4d6, 0x3,
0x2, 0x2, 0x2, 0x4d8, 0x4d7, 0x3, 0x2, 0x2, 0x2, 0x4d9, 0xf1, 0x3, 0x2,
0x2, 0x2, 0x4da, 0x4db, 0x9, 0x25, 0x2, 0x2, 0x4db, 0xf3, 0x3, 0x2,
0x2, 0x2, 0x4dc, 0x4dd, 0x9, 0x26, 0x2, 0x2, 0x4dd, 0xf5, 0x3, 0x2,
0x2, 0x2, 0x4de, 0x4df, 0x9, 0x27, 0x2, 0x2, 0x4df, 0xf7, 0x3, 0x2,
0x2, 0x2, 0x4e0, 0x4e1, 0x9, 0x28, 0x2, 0x2, 0x4e1, 0xf9, 0x3, 0x2,
0x2, 0x2, 0x4e2, 0x4e3, 0x9, 0x29, 0x2, 0x2, 0x4e3, 0xfb, 0x3, 0x2,
0x2, 0x2, 0x4e4, 0x4e5, 0x9, 0x2a, 0x2, 0x2, 0x4e5, 0xfd, 0x3, 0x2,
0x2, 0x2, 0x4e6, 0x4e7, 0x9, 0x2b, 0x2, 0x2, 0x4e7, 0xff, 0x3, 0x2,
0x2, 0x2, 0x4e8, 0x4e9, 0x9, 0x2c, 0x2, 0x2, 0x4e9, 0x101, 0x3, 0x2,
0x2, 0x2, 0x4ea, 0x4eb, 0x9, 0x2d, 0x2, 0x2, 0x4eb, 0x103, 0x3, 0x2,
0x2, 0x2, 0x4ec, 0x4ed, 0x9, 0x2e, 0x2, 0x2, 0x4ed, 0x105, 0x3, 0x2,
0x2, 0x2, 0x4ee, 0x4ef, 0x5, 0xf2, 0x7a, 0x2, 0x4ef, 0x4f0, 0x5, 0x5c,
0x2f, 0x2, 0x4f0, 0x4f7, 0x3, 0x2, 0x2, 0x2, 0x4f1, 0x4f2, 0x5, 0xf2,
0x7a, 0x2, 0x4f2, 0x4f3, 0x5, 0x18, 0xd, 0x2, 0x4f3, 0x4f4, 0x7, 0x4c,
0x2, 0x2, 0x4f4, 0x4f5, 0x5, 0x5c, 0x2f, 0x2, 0x4f5, 0x4f7, 0x3, 0x2,
0x2, 0x2, 0x4f6, 0x4ee, 0x3, 0x2, 0x2, 0x2, 0x4f6, 0x4f1, 0x3, 0x2,
0x2, 0x2, 0x4f7, 0x107, 0x3, 0x2, 0x2, 0x2, 0x4f8, 0x4f9, 0x5, 0xf2,
0x7a, 0x2, 0x4f9, 0x4fa, 0x5, 0x2a8, 0x155, 0x2, 0x4fa, 0x501, 0x3,
0x2, 0x2, 0x2, 0x4fb, 0x4fc, 0x5, 0xf2, 0x7a, 0x2, 0x4fc, 0x4fd, 0x5,
0x18, 0xd, 0x2, 0x4fd, 0x4fe, 0x7, 0x4c, 0x2, 0x2, 0x4fe, 0x4ff, 0x5,
0x2a8, 0x155, 0x2, 0x4ff, 0x501, 0x3, 0x2, 0x2, 0x2, 0x500, 0x4f8, 0x3,
0x2, 0x2, 0x2, 0x500, 0x4fb, 0x3, 0x2, 0x2, 0x2, 0x501, 0x109, 0x3,
0x2, 0x2, 0x2, 0x502, 0x503, 0x5, 0xf2, 0x7a, 0x2, 0x503, 0x504, 0x5,
0x40, 0x21, 0x2, 0x504, 0x50b, 0x3, 0x2, 0x2, 0x2, 0x505, 0x506, 0x5,
0xf2, 0x7a, 0x2, 0x506, 0x507, 0x5, 0x18, 0xd, 0x2, 0x507, 0x508, 0x7,
0x4c, 0x2, 0x2, 0x508, 0x509, 0x5, 0x40, 0x21, 0x2, 0x509, 0x50b, 0x3,
0x2, 0x2, 0x2, 0x50a, 0x502, 0x3, 0x2, 0x2, 0x2, 0x50a, 0x505, 0x3,
0x2, 0x2, 0x2, 0x50b, 0x10b, 0x3, 0x2, 0x2, 0x2, 0x50c, 0x50d, 0x5,
0xf2, 0x7a, 0x2, 0x50d, 0x50e, 0x5, 0x42, 0x22, 0x2, 0x50e, 0x515, 0x3,
0x2, 0x2, 0x2, 0x50f, 0x510, 0x5, 0xf2, 0x7a, 0x2, 0x510, 0x511, 0x5,
0x18, 0xd, 0x2, 0x511, 0x512, 0x7, 0x4c, 0x2, 0x2, 0x512, 0x513, 0x5,
0x42, 0x22, 0x2, 0x513, 0x515, 0x3, 0x2, 0x2, 0x2, 0x514, 0x50c, 0x3,
0x2, 0x2, 0x2, 0x514, 0x50f, 0x3, 0x2, 0x2, 0x2, 0x515, 0x10d, 0x3,
0x2, 0x2, 0x2, 0x516, 0x517, 0x5, 0xf2, 0x7a, 0x2, 0x517, 0x518, 0x5,
0x44, 0x23, 0x2, 0x518, 0x51f, 0x3, 0x2, 0x2, 0x2, 0x519, 0x51a, 0x5,
0xf2, 0x7a, 0x2, 0x51a, 0x51b, 0x5, 0x18, 0xd, 0x2, 0x51b, 0x51c, 0x7,
0x4c, 0x2, 0x2, 0x51c, 0x51d, 0x5, 0x44, 0x23, 0x2, 0x51d, 0x51f, 0x3,
0x2, 0x2, 0x2, 0x51e, 0x516, 0x3, 0x2, 0x2, 0x2, 0x51e, 0x519, 0x3,
0x2, 0x2, 0x2, 0x51f, 0x10f, 0x3, 0x2, 0x2, 0x2, 0x520, 0x521, 0x5,
0xf2, 0x7a, 0x2, 0x521, 0x522, 0x5, 0x46, 0x24, 0x2, 0x522, 0x529, 0x3,
0x2, 0x2, 0x2, 0x523, 0x524, 0x5, 0xf2, 0x7a, 0x2, 0x524, 0x525, 0x5,
0x18, 0xd, 0x2, 0x525, 0x526, 0x7, 0x4c, 0x2, 0x2, 0x526, 0x527, 0x5,
0x46, 0x24, 0x2, 0x527, 0x529, 0x3, 0x2, 0x2, 0x2, 0x528, 0x520, 0x3,
0x2, 0x2, 0x2, 0x528, 0x523, 0x3, 0x2, 0x2, 0x2, 0x529, 0x111, 0x3,
0x2, 0x2, 0x2, 0x52a, 0x52b, 0x5, 0xf2, 0x7a, 0x2, 0x52b, 0x52c, 0x5,
0x4c, 0x27, 0x2, 0x52c, 0x533, 0x3, 0x2, 0x2, 0x2, 0x52d, 0x52e, 0x5,
0xf2, 0x7a, 0x2, 0x52e, 0x52f, 0x5, 0x18, 0xd, 0x2, 0x52f, 0x530, 0x7,
0x4c, 0x2, 0x2, 0x530, 0x531, 0x5, 0x4c, 0x27, 0x2, 0x531, 0x533, 0x3,
0x2, 0x2, 0x2, 0x532, 0x52a, 0x3, 0x2, 0x2, 0x2, 0x532, 0x52d, 0x3,
0x2, 0x2, 0x2, 0x533, 0x113, 0x3, 0x2, 0x2, 0x2, 0x534, 0x535, 0x5,
0xf2, 0x7a, 0x2, 0x535, 0x536, 0x5, 0x56, 0x2c, 0x2, 0x536, 0x53d, 0x3,
0x2, 0x2, 0x2, 0x537, 0x538, 0x5, 0xf2, 0x7a, 0x2, 0x538, 0x539, 0x5,
0x18, 0xd, 0x2, 0x539, 0x53a, 0x7, 0x4c, 0x2, 0x2, 0x53a, 0x53b, 0x5,
0x56, 0x2c, 0x2, 0x53b, 0x53d, 0x3, 0x2, 0x2, 0x2, 0x53c, 0x534, 0x3,
0x2, 0x2, 0x2, 0x53c, 0x537, 0x3, 0x2, 0x2, 0x2, 0x53d, 0x115, 0x3,
0x2, 0x2, 0x2, 0x53e, 0x53f, 0x5, 0xf2, 0x7a, 0x2, 0x53f, 0x540, 0x5,
0x58, 0x2d, 0x2, 0x540, 0x547, 0x3, 0x2, 0x2, 0x2, 0x541, 0x542, 0x5,
0xf2, 0x7a, 0x2, 0x542, 0x543, 0x5, 0x18, 0xd, 0x2, 0x543, 0x544, 0x7,
0x4c, 0x2, 0x2, 0x544, 0x545, 0x5, 0x58, 0x2d, 0x2, 0x545, 0x547, 0x3,
0x2, 0x2, 0x2, 0x546, 0x53e, 0x3, 0x2, 0x2, 0x2, 0x546, 0x541, 0x3,
0x2, 0x2, 0x2, 0x547, 0x117, 0x3, 0x2, 0x2, 0x2, 0x548, 0x549, 0x5,
0xf4, 0x7b, 0x2, 0x549, 0x54a, 0x5, 0x5c, 0x2f, 0x2, 0x54a, 0x551, 0x3,
0x2, 0x2, 0x2, 0x54b, 0x54c, 0x5, 0xf4, 0x7b, 0x2, 0x54c, 0x54d, 0x5,
0x18, 0xd, 0x2, 0x54d, 0x54e, 0x7, 0x4c, 0x2, 0x2, 0x54e, 0x54f, 0x5,
0x5c, 0x2f, 0x2, 0x54f, 0x551, 0x3, 0x2, 0x2, 0x2, 0x550, 0x548, 0x3,
0x2, 0x2, 0x2, 0x550, 0x54b, 0x3, 0x2, 0x2, 0x2, 0x551, 0x119, 0x3,
0x2, 0x2, 0x2, 0x552, 0x553, 0x5, 0xf4, 0x7b, 0x2, 0x553, 0x554, 0x5,
0x4c, 0x27, 0x2, 0x554, 0x55b, 0x3, 0x2, 0x2, 0x2, 0x555, 0x556, 0x5,
0xf4, 0x7b, 0x2, 0x556, 0x557, 0x5, 0x18, 0xd, 0x2, 0x557, 0x558, 0x7,
0x4c, 0x2, 0x2, 0x558, 0x559, 0x5, 0x4c, 0x27, 0x2, 0x559, 0x55b, 0x3,
0x2, 0x2, 0x2, 0x55a, 0x552, 0x3, 0x2, 0x2, 0x2, 0x55a, 0x555, 0x3,
0x2, 0x2, 0x2, 0x55b, 0x11b, 0x3, 0x2, 0x2, 0x2, 0x55c, 0x55d, 0x5,
0xf4, 0x7b, 0x2, 0x55d, 0x55e, 0x5, 0x2a8, 0x155, 0x2, 0x55e, 0x565,
0x3, 0x2, 0x2, 0x2, 0x55f, 0x560, 0x5, 0xf4, 0x7b, 0x2, 0x560, 0x561,
0x5, 0x18, 0xd, 0x2, 0x561, 0x562, 0x7, 0x4c, 0x2, 0x2, 0x562, 0x563,
0x5, 0x2a8, 0x155, 0x2, 0x563, 0x565, 0x3, 0x2, 0x2, 0x2, 0x564, 0x55c,
0x3, 0x2, 0x2, 0x2, 0x564, 0x55f, 0x3, 0x2, 0x2, 0x2, 0x565, 0x11d,
0x3, 0x2, 0x2, 0x2, 0x566, 0x567, 0x5, 0xf4, 0x7b, 0x2, 0x567, 0x568,
0x5, 0x56, 0x2c, 0x2, 0x568, 0x56f, 0x3, 0x2, 0x2, 0x2, 0x569, 0x56a,
0x5, 0xf4, 0x7b, 0x2, 0x56a, 0x56b, 0x5, 0x18, 0xd, 0x2, 0x56b, 0x56c,
0x7, 0x4c, 0x2, 0x2, 0x56c, 0x56d, 0x5, 0x56, 0x2c, 0x2, 0x56d, 0x56f,
0x3, 0x2, 0x2, 0x2, 0x56e, 0x566, 0x3, 0x2, 0x2, 0x2, 0x56e, 0x569,
0x3, 0x2, 0x2, 0x2, 0x56f, 0x11f, 0x3, 0x2, 0x2, 0x2, 0x570, 0x571,
0x5, 0xf4, 0x7b, 0x2, 0x571, 0x572, 0x5, 0x58, 0x2d, 0x2, 0x572, 0x579,
0x3, 0x2, 0x2, 0x2, 0x573, 0x574, 0x5, 0xf4, 0x7b, 0x2, 0x574, 0x575,
0x5, 0x18, 0xd, 0x2, 0x575, 0x576, 0x7, 0x4c, 0x2, 0x2, 0x576, 0x577,
0x5, 0x58, 0x2d, 0x2, 0x577, 0x579, 0x3, 0x2, 0x2, 0x2, 0x578, 0x570,
0x3, 0x2, 0x2, 0x2, 0x578, 0x573, 0x3, 0x2, 0x2, 0x2, 0x579, 0x121,
0x3, 0x2, 0x2, 0x2, 0x57a, 0x57b, 0x5, 0xf4, 0x7b, 0x2, 0x57b, 0x57c,
0x5, 0x40, 0x21, 0x2, 0x57c, 0x583, 0x3, 0x2, 0x2, 0x2, 0x57d, 0x57e,
0x5, 0xf4, 0x7b, 0x2, 0x57e, 0x57f, 0x5, 0x18, 0xd, 0x2, 0x57f, 0x580,
0x7, 0x4c, 0x2, 0x2, 0x580, 0x581, 0x5, 0x40, 0x21, 0x2, 0x581, 0x583,
0x3, 0x2, 0x2, 0x2, 0x582, 0x57a, 0x3, 0x2, 0x2, 0x2, 0x582, 0x57d,
0x3, 0x2, 0x2, 0x2, 0x583, 0x123, 0x3, 0x2, 0x2, 0x2, 0x584, 0x585,
0x5, 0xf4, 0x7b, 0x2, 0x585, 0x586, 0x5, 0x42, 0x22, 0x2, 0x586, 0x58d,
0x3, 0x2, 0x2, 0x2, 0x587, 0x588, 0x5, 0xf4, 0x7b, 0x2, 0x588, 0x589,
0x5, 0x18, 0xd, 0x2, 0x589, 0x58a, 0x7, 0x4c, 0x2, 0x2, 0x58a, 0x58b,
0x5, 0x42, 0x22, 0x2, 0x58b, 0x58d, 0x3, 0x2, 0x2, 0x2, 0x58c, 0x584,
0x3, 0x2, 0x2, 0x2, 0x58c, 0x587, 0x3, 0x2, 0x2, 0x2, 0x58d, 0x125,
0x3, 0x2, 0x2, 0x2, 0x58e, 0x58f, 0x5, 0xf4, 0x7b, 0x2, 0x58f, 0x590,
0x5, 0x44, 0x23, 0x2, 0x590, 0x597, 0x3, 0x2, 0x2, 0x2, 0x591, 0x592,
0x5, 0xf4, 0x7b, 0x2, 0x592, 0x593, 0x5, 0x18, 0xd, 0x2, 0x593, 0x594,
0x7, 0x4c, 0x2, 0x2, 0x594, 0x595, 0x5, 0x44, 0x23, 0x2, 0x595, 0x597,
0x3, 0x2, 0x2, 0x2, 0x596, 0x58e, 0x3, 0x2, 0x2, 0x2, 0x596, 0x591,
0x3, 0x2, 0x2, 0x2, 0x597, 0x127, 0x3, 0x2, 0x2, 0x2, 0x598, 0x599,
0x5, 0xf4, 0x7b, 0x2, 0x599, 0x59a, 0x5, 0x46, 0x24, 0x2, 0x59a, 0x5a1,
0x3, 0x2, 0x2, 0x2, 0x59b, 0x59c, 0x5, 0xf4, 0x7b, 0x2, 0x59c, 0x59d,
0x5, 0x18, 0xd, 0x2, 0x59d, 0x59e, 0x7, 0x4c, 0x2, 0x2, 0x59e, 0x59f,
0x5, 0x46, 0x24, 0x2, 0x59f, 0x5a1, 0x3, 0x2, 0x2, 0x2, 0x5a0, 0x598,
0x3, 0x2, 0x2, 0x2, 0x5a0, 0x59b, 0x3, 0x2, 0x2, 0x2, 0x5a1, 0x129,
0x3, 0x2, 0x2, 0x2, 0x5a2, 0x5a3, 0x5, 0xf6, 0x7c, 0x2, 0x5a3, 0x5a4,
0x5, 0x5c, 0x2f, 0x2, 0x5a4, 0x5ab, 0x3, 0x2, 0x2, 0x2, 0x5a5, 0x5a6,
0x5, 0xf6, 0x7c, 0x2, 0x5a6, 0x5a7, 0x5, 0x18, 0xd, 0x2, 0x5a7, 0x5a8,
0x7, 0x4c, 0x2, 0x2, 0x5a8, 0x5a9, 0x5, 0x5c, 0x2f, 0x2, 0x5a9, 0x5ab,
0x3, 0x2, 0x2, 0x2, 0x5aa, 0x5a2, 0x3, 0x2, 0x2, 0x2, 0x5aa, 0x5a5,
0x3, 0x2, 0x2, 0x2, 0x5ab, 0x12b, 0x3, 0x2, 0x2, 0x2, 0x5ac, 0x5ad,
0x5, 0xf6, 0x7c, 0x2, 0x5ad, 0x5ae, 0x5, 0x4c, 0x27, 0x2, 0x5ae, 0x5b5,
0x3, 0x2, 0x2, 0x2, 0x5af, 0x5b0, 0x5, 0xf6, 0x7c, 0x2, 0x5b0, 0x5b1,
0x5, 0x18, 0xd, 0x2, 0x5b1, 0x5b2, 0x7, 0x4c, 0x2, 0x2, 0x5b2, 0x5b3,
0x5, 0x4c, 0x27, 0x2, 0x5b3, 0x5b5, 0x3, 0x2, 0x2, 0x2, 0x5b4, 0x5ac,
0x3, 0x2, 0x2, 0x2, 0x5b4, 0x5af, 0x3, 0x2, 0x2, 0x2, 0x5b5, 0x12d,
0x3, 0x2, 0x2, 0x2, 0x5b6, 0x5b7, 0x5, 0xf6, 0x7c, 0x2, 0x5b7, 0x5b8,
0x5, 0x2a8, 0x155, 0x2, 0x5b8, 0x5bf, 0x3, 0x2, 0x2, 0x2, 0x5b9, 0x5ba,
0x5, 0xf6, 0x7c, 0x2, 0x5ba, 0x5bb, 0x5, 0x18, 0xd, 0x2, 0x5bb, 0x5bc,
0x7, 0x4c, 0x2, 0x2, 0x5bc, 0x5bd, 0x5, 0x2a8, 0x155, 0x2, 0x5bd, 0x5bf,
0x3, 0x2, 0x2, 0x2, 0x5be, 0x5b6, 0x3, 0x2, 0x2, 0x2, 0x5be, 0x5b9,
0x3, 0x2, 0x2, 0x2, 0x5bf, 0x12f, 0x3, 0x2, 0x2, 0x2, 0x5c0, 0x5c1,
0x5, 0xf6, 0x7c, 0x2, 0x5c1, 0x5c2, 0x5, 0x56, 0x2c, 0x2, 0x5c2, 0x5c9,
0x3, 0x2, 0x2, 0x2, 0x5c3, 0x5c4, 0x5, 0xf6, 0x7c, 0x2, 0x5c4, 0x5c5,
0x5, 0x18, 0xd, 0x2, 0x5c5, 0x5c6, 0x7, 0x4c, 0x2, 0x2, 0x5c6, 0x5c7,
0x5, 0x56, 0x2c, 0x2, 0x5c7, 0x5c9, 0x3, 0x2, 0x2, 0x2, 0x5c8, 0x5c0,
0x3, 0x2, 0x2, 0x2, 0x5c8, 0x5c3, 0x3, 0x2, 0x2, 0x2, 0x5c9, 0x131,
0x3, 0x2, 0x2, 0x2, 0x5ca, 0x5cb, 0x5, 0xf6, 0x7c, 0x2, 0x5cb, 0x5cc,
0x5, 0x58, 0x2d, 0x2, 0x5cc, 0x5d3, 0x3, 0x2, 0x2, 0x2, 0x5cd, 0x5ce,
0x5, 0xf6, 0x7c, 0x2, 0x5ce, 0x5cf, 0x5, 0x18, 0xd, 0x2, 0x5cf, 0x5d0,
0x7, 0x4c, 0x2, 0x2, 0x5d0, 0x5d1, 0x5, 0x58, 0x2d, 0x2, 0x5d1, 0x5d3,
0x3, 0x2, 0x2, 0x2, 0x5d2, 0x5ca, 0x3, 0x2, 0x2, 0x2, 0x5d2, 0x5cd,
0x3, 0x2, 0x2, 0x2, 0x5d3, 0x133, 0x3, 0x2, 0x2, 0x2, 0x5d4, 0x5d5,
0x5, 0xf6, 0x7c, 0x2, 0x5d5, 0x5d6, 0x5, 0x94, 0x4b, 0x2, 0x5d6, 0x5dd,
0x3, 0x2, 0x2, 0x2, 0x5d7, 0x5d8, 0x5, 0xf6, 0x7c, 0x2, 0x5d8, 0x5d9,
0x5, 0x18, 0xd, 0x2, 0x5d9, 0x5da, 0x7, 0x4c, 0x2, 0x2, 0x5da, 0x5db,
0x5, 0x94, 0x4b, 0x2, 0x5db, 0x5dd, 0x3, 0x2, 0x2, 0x2, 0x5dc, 0x5d4,
0x3, 0x2, 0x2, 0x2, 0x5dc, 0x5d7, 0x3, 0x2, 0x2, 0x2, 0x5dd, 0x135,
0x3, 0x2, 0x2, 0x2, 0x5de, 0x5df, 0x5, 0xf6, 0x7c, 0x2, 0x5df, 0x5e0,
0x5, 0x96, 0x4c, 0x2, 0x5e0, 0x5e7, 0x3, 0x2, 0x2, 0x2, 0x5e1, 0x5e2,
0x5, 0xf6, 0x7c, 0x2, 0x5e2, 0x5e3, 0x5, 0x18, 0xd, 0x2, 0x5e3, 0x5e4,
0x7, 0x4c, 0x2, 0x2, 0x5e4, 0x5e5, 0x5, 0x96, 0x4c, 0x2, 0x5e5, 0x5e7,
0x3, 0x2, 0x2, 0x2, 0x5e6, 0x5de, 0x3, 0x2, 0x2, 0x2, 0x5e6, 0x5e1,
0x3, 0x2, 0x2, 0x2, 0x5e7, 0x137, 0x3, 0x2, 0x2, 0x2, 0x5e8, 0x5e9,
0x5, 0xf8, 0x7d, 0x2, 0x5e9, 0x5ea, 0x5, 0x5c, 0x2f, 0x2, 0x5ea, 0x5f1,
0x3, 0x2, 0x2, 0x2, 0x5eb, 0x5ec, 0x5, 0xf8, 0x7d, 0x2, 0x5ec, 0x5ed,
0x5, 0x18, 0xd, 0x2, 0x5ed, 0x5ee, 0x7, 0x4c, 0x2, 0x2, 0x5ee, 0x5ef,
0x5, 0x5c, 0x2f, 0x2, 0x5ef, 0x5f1, 0x3, 0x2, 0x2, 0x2, 0x5f0, 0x5e8,
0x3, 0x2, 0x2, 0x2, 0x5f0, 0x5eb, 0x3, 0x2, 0x2, 0x2, 0x5f1, 0x139,
0x3, 0x2, 0x2, 0x2, 0x5f2, 0x5f3, 0x5, 0xf8, 0x7d, 0x2, 0x5f3, 0x5f4,
0x5, 0x4c, 0x27, 0x2, 0x5f4, 0x5fb, 0x3, 0x2, 0x2, 0x2, 0x5f5, 0x5f6,
0x5, 0xf8, 0x7d, 0x2, 0x5f6, 0x5f7, 0x5, 0x18, 0xd, 0x2, 0x5f7, 0x5f8,
0x7, 0x4c, 0x2, 0x2, 0x5f8, 0x5f9, 0x5, 0x4c, 0x27, 0x2, 0x5f9, 0x5fb,
0x3, 0x2, 0x2, 0x2, 0x5fa, 0x5f2, 0x3, 0x2, 0x2, 0x2, 0x5fa, 0x5f5,
0x3, 0x2, 0x2, 0x2, 0x5fb, 0x13b, 0x3, 0x2, 0x2, 0x2, 0x5fc, 0x5fd,
0x5, 0xf8, 0x7d, 0x2, 0x5fd, 0x5fe, 0x5, 0x56, 0x2c, 0x2, 0x5fe, 0x605,
0x3, 0x2, 0x2, 0x2, 0x5ff, 0x600, 0x5, 0xf8, 0x7d, 0x2, 0x600, 0x601,
0x5, 0x18, 0xd, 0x2, 0x601, 0x602, 0x7, 0x4c, 0x2, 0x2, 0x602, 0x603,
0x5, 0x56, 0x2c, 0x2, 0x603, 0x605, 0x3, 0x2, 0x2, 0x2, 0x604, 0x5fc,
0x3, 0x2, 0x2, 0x2, 0x604, 0x5ff, 0x3, 0x2, 0x2, 0x2, 0x605, 0x13d,
0x3, 0x2, 0x2, 0x2, 0x606, 0x607, 0x5, 0xf8, 0x7d, 0x2, 0x607, 0x608,
0x5, 0x58, 0x2d, 0x2, 0x608, 0x60f, 0x3, 0x2, 0x2, 0x2, 0x609, 0x60a,
0x5, 0xf8, 0x7d, 0x2, 0x60a, 0x60b, 0x5, 0x18, 0xd, 0x2, 0x60b, 0x60c,
0x7, 0x4c, 0x2, 0x2, 0x60c, 0x60d, 0x5, 0x58, 0x2d, 0x2, 0x60d, 0x60f,
0x3, 0x2, 0x2, 0x2, 0x60e, 0x606, 0x3, 0x2, 0x2, 0x2, 0x60e, 0x609,
0x3, 0x2, 0x2, 0x2, 0x60f, 0x13f, 0x3, 0x2, 0x2, 0x2, 0x610, 0x611,
0x5, 0xf8, 0x7d, 0x2, 0x611, 0x612, 0x5, 0x2a8, 0x155, 0x2, 0x612, 0x619,
0x3, 0x2, 0x2, 0x2, 0x613, 0x614, 0x5, 0xf8, 0x7d, 0x2, 0x614, 0x615,
0x5, 0x18, 0xd, 0x2, 0x615, 0x616, 0x7, 0x4c, 0x2, 0x2, 0x616, 0x617,
0x5, 0x2a8, 0x155, 0x2, 0x617, 0x619, 0x3, 0x2, 0x2, 0x2, 0x618, 0x610,
0x3, 0x2, 0x2, 0x2, 0x618, 0x613, 0x3, 0x2, 0x2, 0x2, 0x619, 0x141,
0x3, 0x2, 0x2, 0x2, 0x61a, 0x61b, 0x5, 0xf8, 0x7d, 0x2, 0x61b, 0x61c,
0x5, 0x40, 0x21, 0x2, 0x61c, 0x623, 0x3, 0x2, 0x2, 0x2, 0x61d, 0x61e,
0x5, 0xf8, 0x7d, 0x2, 0x61e, 0x61f, 0x5, 0x18, 0xd, 0x2, 0x61f, 0x620,
0x7, 0x4c, 0x2, 0x2, 0x620, 0x621, 0x5, 0x40, 0x21, 0x2, 0x621, 0x623,
0x3, 0x2, 0x2, 0x2, 0x622, 0x61a, 0x3, 0x2, 0x2, 0x2, 0x622, 0x61d,
0x3, 0x2, 0x2, 0x2, 0x623, 0x143, 0x3, 0x2, 0x2, 0x2, 0x624, 0x625,
0x5, 0xf8, 0x7d, 0x2, 0x625, 0x626, 0x5, 0x42, 0x22, 0x2, 0x626, 0x62d,
0x3, 0x2, 0x2, 0x2, 0x627, 0x628, 0x5, 0xf8, 0x7d, 0x2, 0x628, 0x629,
0x5, 0x18, 0xd, 0x2, 0x629, 0x62a, 0x7, 0x4c, 0x2, 0x2, 0x62a, 0x62b,
0x5, 0x42, 0x22, 0x2, 0x62b, 0x62d, 0x3, 0x2, 0x2, 0x2, 0x62c, 0x624,
0x3, 0x2, 0x2, 0x2, 0x62c, 0x627, 0x3, 0x2, 0x2, 0x2, 0x62d, 0x145,
0x3, 0x2, 0x2, 0x2, 0x62e, 0x62f, 0x5, 0xf8, 0x7d, 0x2, 0x62f, 0x630,
0x5, 0x44, 0x23, 0x2, 0x630, 0x637, 0x3, 0x2, 0x2, 0x2, 0x631, 0x632,
0x5, 0xf8, 0x7d, 0x2, 0x632, 0x633, 0x5, 0x18, 0xd, 0x2, 0x633, 0x634,
0x7, 0x4c, 0x2, 0x2, 0x634, 0x635, 0x5, 0x44, 0x23, 0x2, 0x635, 0x637,
0x3, 0x2, 0x2, 0x2, 0x636, 0x62e, 0x3, 0x2, 0x2, 0x2, 0x636, 0x631,
0x3, 0x2, 0x2, 0x2, 0x637, 0x147, 0x3, 0x2, 0x2, 0x2, 0x638, 0x639,
0x5, 0xf8, 0x7d, 0x2, 0x639, 0x63a, 0x5, 0x46, 0x24, 0x2, 0x63a, 0x641,
0x3, 0x2, 0x2, 0x2, 0x63b, 0x63c, 0x5, 0xf8, 0x7d, 0x2, 0x63c, 0x63d,
0x5, 0x18, 0xd, 0x2, 0x63d, 0x63e, 0x7, 0x4c, 0x2, 0x2, 0x63e, 0x63f,
0x5, 0x46, 0x24, 0x2, 0x63f, 0x641, 0x3, 0x2, 0x2, 0x2, 0x640, 0x638,
0x3, 0x2, 0x2, 0x2, 0x640, 0x63b, 0x3, 0x2, 0x2, 0x2, 0x641, 0x149,
0x3, 0x2, 0x2, 0x2, 0x642, 0x643, 0x5, 0xfa, 0x7e, 0x2, 0x643, 0x644,
0x5, 0x5c, 0x2f, 0x2, 0x644, 0x64b, 0x3, 0x2, 0x2, 0x2, 0x645, 0x646,
0x5, 0xfa, 0x7e, 0x2, 0x646, 0x647, 0x5, 0x18, 0xd, 0x2, 0x647, 0x648,
0x7, 0x4c, 0x2, 0x2, 0x648, 0x649, 0x5, 0x5c, 0x2f, 0x2, 0x649, 0x64b,
0x3, 0x2, 0x2, 0x2, 0x64a, 0x642, 0x3, 0x2, 0x2, 0x2, 0x64a, 0x645,
0x3, 0x2, 0x2, 0x2, 0x64b, 0x14b, 0x3, 0x2, 0x2, 0x2, 0x64c, 0x64d,
0x5, 0xfa, 0x7e, 0x2, 0x64d, 0x64e, 0x5, 0x2a8, 0x155, 0x2, 0x64e, 0x655,
0x3, 0x2, 0x2, 0x2, 0x64f, 0x650, 0x5, 0xfa, 0x7e, 0x2, 0x650, 0x651,
0x5, 0x18, 0xd, 0x2, 0x651, 0x652, 0x7, 0x4c, 0x2, 0x2, 0x652, 0x653,
0x5, 0x2a8, 0x155, 0x2, 0x653, 0x655, 0x3, 0x2, 0x2, 0x2, 0x654, 0x64c,
0x3, 0x2, 0x2, 0x2, 0x654, 0x64f, 0x3, 0x2, 0x2, 0x2, 0x655, 0x14d,
0x3, 0x2, 0x2, 0x2, 0x656, 0x657, 0x5, 0xfa, 0x7e, 0x2, 0x657, 0x658,
0x5, 0x4c, 0x27, 0x2, 0x658, 0x65f, 0x3, 0x2, 0x2, 0x2, 0x659, 0x65a,
0x5, 0xfa, 0x7e, 0x2, 0x65a, 0x65b, 0x5, 0x18, 0xd, 0x2, 0x65b, 0x65c,
0x7, 0x4c, 0x2, 0x2, 0x65c, 0x65d, 0x5, 0x4c, 0x27, 0x2, 0x65d, 0x65f,
0x3, 0x2, 0x2, 0x2, 0x65e, 0x656, 0x3, 0x2, 0x2, 0x2, 0x65e, 0x659,
0x3, 0x2, 0x2, 0x2, 0x65f, 0x14f, 0x3, 0x2, 0x2, 0x2, 0x660, 0x661,
0x5, 0xfa, 0x7e, 0x2, 0x661, 0x662, 0x5, 0x56, 0x2c, 0x2, 0x662, 0x669,
0x3, 0x2, 0x2, 0x2, 0x663, 0x664, 0x5, 0xfa, 0x7e, 0x2, 0x664, 0x665,
0x5, 0x18, 0xd, 0x2, 0x665, 0x666, 0x7, 0x4c, 0x2, 0x2, 0x666, 0x667,
0x5, 0x56, 0x2c, 0x2, 0x667, 0x669, 0x3, 0x2, 0x2, 0x2, 0x668, 0x660,
0x3, 0x2, 0x2, 0x2, 0x668, 0x663, 0x3, 0x2, 0x2, 0x2, 0x669, 0x151,
0x3, 0x2, 0x2, 0x2, 0x66a, 0x66b, 0x5, 0xfa, 0x7e, 0x2, 0x66b, 0x66c,
0x5, 0x58, 0x2d, 0x2, 0x66c, 0x673, 0x3, 0x2, 0x2, 0x2, 0x66d, 0x66e,
0x5, 0xfa, 0x7e, 0x2, 0x66e, 0x66f, 0x5, 0x18, 0xd, 0x2, 0x66f, 0x670,
0x7, 0x4c, 0x2, 0x2, 0x670, 0x671, 0x5, 0x58, 0x2d, 0x2, 0x671, 0x673,
0x3, 0x2, 0x2, 0x2, 0x672, 0x66a, 0x3, 0x2, 0x2, 0x2, 0x672, 0x66d,
0x3, 0x2, 0x2, 0x2, 0x673, 0x153, 0x3, 0x2, 0x2, 0x2, 0x674, 0x675,
0x5, 0xfa, 0x7e, 0x2, 0x675, 0x676, 0x5, 0x40, 0x21, 0x2, 0x676, 0x67d,
0x3, 0x2, 0x2, 0x2, 0x677, 0x678, 0x5, 0xfa, 0x7e, 0x2, 0x678, 0x679,
0x5, 0x18, 0xd, 0x2, 0x679, 0x67a, 0x7, 0x4c, 0x2, 0x2, 0x67a, 0x67b,
0x5, 0x40, 0x21, 0x2, 0x67b, 0x67d, 0x3, 0x2, 0x2, 0x2, 0x67c, 0x674,
0x3, 0x2, 0x2, 0x2, 0x67c, 0x677, 0x3, 0x2, 0x2, 0x2, 0x67d, 0x155,
0x3, 0x2, 0x2, 0x2, 0x67e, 0x67f, 0x5, 0xfa, 0x7e, 0x2, 0x67f, 0x680,
0x5, 0x42, 0x22, 0x2, 0x680, 0x687, 0x3, 0x2, 0x2, 0x2, 0x681, 0x682,
0x5, 0xfa, 0x7e, 0x2, 0x682, 0x683, 0x5, 0x18, 0xd, 0x2, 0x683, 0x684,
0x7, 0x4c, 0x2, 0x2, 0x684, 0x685, 0x5, 0x42, 0x22, 0x2, 0x685, 0x687,
0x3, 0x2, 0x2, 0x2, 0x686, 0x67e, 0x3, 0x2, 0x2, 0x2, 0x686, 0x681,
0x3, 0x2, 0x2, 0x2, 0x687, 0x157, 0x3, 0x2, 0x2, 0x2, 0x688, 0x689,
0x5, 0xfa, 0x7e, 0x2, 0x689, 0x68a, 0x5, 0x44, 0x23, 0x2, 0x68a, 0x691,
0x3, 0x2, 0x2, 0x2, 0x68b, 0x68c, 0x5, 0xfa, 0x7e, 0x2, 0x68c, 0x68d,
0x5, 0x18, 0xd, 0x2, 0x68d, 0x68e, 0x7, 0x4c, 0x2, 0x2, 0x68e, 0x68f,
0x5, 0x44, 0x23, 0x2, 0x68f, 0x691, 0x3, 0x2, 0x2, 0x2, 0x690, 0x688,
0x3, 0x2, 0x2, 0x2, 0x690, 0x68b, 0x3, 0x2, 0x2, 0x2, 0x691, 0x159,
0x3, 0x2, 0x2, 0x2, 0x692, 0x693, 0x5, 0xfa, 0x7e, 0x2, 0x693, 0x694,
0x5, 0x46, 0x24, 0x2, 0x694, 0x69b, 0x3, 0x2, 0x2, 0x2, 0x695, 0x696,
0x5, 0xfa, 0x7e, 0x2, 0x696, 0x697, 0x5, 0x18, 0xd, 0x2, 0x697, 0x698,
0x7, 0x4c, 0x2, 0x2, 0x698, 0x699, 0x5, 0x46, 0x24, 0x2, 0x699, 0x69b,
0x3, 0x2, 0x2, 0x2, 0x69a, 0x692, 0x3, 0x2, 0x2, 0x2, 0x69a, 0x695,
0x3, 0x2, 0x2, 0x2, 0x69b, 0x15b, 0x3, 0x2, 0x2, 0x2, 0x69c, 0x69d,
0x5, 0xfc, 0x7f, 0x2, 0x69d, 0x69e, 0x5, 0x5c, 0x2f, 0x2, 0x69e, 0x6a5,
0x3, 0x2, 0x2, 0x2, 0x69f, 0x6a0, 0x5, 0xfc, 0x7f, 0x2, 0x6a0, 0x6a1,
0x5, 0x18, 0xd, 0x2, 0x6a1, 0x6a2, 0x7, 0x4c, 0x2, 0x2, 0x6a2, 0x6a3,
0x5, 0x5c, 0x2f, 0x2, 0x6a3, 0x6a5, 0x3, 0x2, 0x2, 0x2, 0x6a4, 0x69c,
0x3, 0x2, 0x2, 0x2, 0x6a4, 0x69f, 0x3, 0x2, 0x2, 0x2, 0x6a5, 0x15d,
0x3, 0x2, 0x2, 0x2, 0x6a6, 0x6a7, 0x5, 0xfc, 0x7f, 0x2, 0x6a7, 0x6a8,
0x5, 0x2a8, 0x155, 0x2, 0x6a8, 0x6af, 0x3, 0x2, 0x2, 0x2, 0x6a9, 0x6aa,
0x5, 0xfc, 0x7f, 0x2, 0x6aa, 0x6ab, 0x5, 0x18, 0xd, 0x2, 0x6ab, 0x6ac,
0x7, 0x4c, 0x2, 0x2, 0x6ac, 0x6ad, 0x5, 0x2a8, 0x155, 0x2, 0x6ad, 0x6af,
0x3, 0x2, 0x2, 0x2, 0x6ae, 0x6a6, 0x3, 0x2, 0x2, 0x2, 0x6ae, 0x6a9,
0x3, 0x2, 0x2, 0x2, 0x6af, 0x15f, 0x3, 0x2, 0x2, 0x2, 0x6b0, 0x6b1,
0x5, 0xfc, 0x7f, 0x2, 0x6b1, 0x6b2, 0x5, 0x4c, 0x27, 0x2, 0x6b2, 0x6b9,
0x3, 0x2, 0x2, 0x2, 0x6b3, 0x6b4, 0x5, 0xfc, 0x7f, 0x2, 0x6b4, 0x6b5,
0x5, 0x18, 0xd, 0x2, 0x6b5, 0x6b6, 0x7, 0x4c, 0x2, 0x2, 0x6b6, 0x6b7,
0x5, 0x4c, 0x27, 0x2, 0x6b7, 0x6b9, 0x3, 0x2, 0x2, 0x2, 0x6b8, 0x6b0,
0x3, 0x2, 0x2, 0x2, 0x6b8, 0x6b3, 0x3, 0x2, 0x2, 0x2, 0x6b9, 0x161,
0x3, 0x2, 0x2, 0x2, 0x6ba, 0x6bb, 0x5, 0xfc, 0x7f, 0x2, 0x6bb, 0x6bc,
0x5, 0x56, 0x2c, 0x2, 0x6bc, 0x6c3, 0x3, 0x2, 0x2, 0x2, 0x6bd, 0x6be,
0x5, 0xfc, 0x7f, 0x2, 0x6be, 0x6bf, 0x5, 0x18, 0xd, 0x2, 0x6bf, 0x6c0,
0x7, 0x4c, 0x2, 0x2, 0x6c0, 0x6c1, 0x5, 0x56, 0x2c, 0x2, 0x6c1, 0x6c3,
0x3, 0x2, 0x2, 0x2, 0x6c2, 0x6ba, 0x3, 0x2, 0x2, 0x2, 0x6c2, 0x6bd,
0x3, 0x2, 0x2, 0x2, 0x6c3, 0x163, 0x3, 0x2, 0x2, 0x2, 0x6c4, 0x6c5,
0x5, 0xfc, 0x7f, 0x2, 0x6c5, 0x6c6, 0x5, 0x58, 0x2d, 0x2, 0x6c6, 0x6cd,
0x3, 0x2, 0x2, 0x2, 0x6c7, 0x6c8, 0x5, 0xfc, 0x7f, 0x2, 0x6c8, 0x6c9,
0x5, 0x18, 0xd, 0x2, 0x6c9, 0x6ca, 0x7, 0x4c, 0x2, 0x2, 0x6ca, 0x6cb,
0x5, 0x58, 0x2d, 0x2, 0x6cb, 0x6cd, 0x3, 0x2, 0x2, 0x2, 0x6cc, 0x6c4,
0x3, 0x2, 0x2, 0x2, 0x6cc, 0x6c7, 0x3, 0x2, 0x2, 0x2, 0x6cd, 0x165,
0x3, 0x2, 0x2, 0x2, 0x6ce, 0x6cf, 0x5, 0xfc, 0x7f, 0x2, 0x6cf, 0x6d0,
0x5, 0x40, 0x21, 0x2, 0x6d0, 0x6d7, 0x3, 0x2, 0x2, 0x2, 0x6d1, 0x6d2,
0x5, 0xfc, 0x7f, 0x2, 0x6d2, 0x6d3, 0x5, 0x18, 0xd, 0x2, 0x6d3, 0x6d4,
0x7, 0x4c, 0x2, 0x2, 0x6d4, 0x6d5, 0x5, 0x40, 0x21, 0x2, 0x6d5, 0x6d7,
0x3, 0x2, 0x2, 0x2, 0x6d6, 0x6ce, 0x3, 0x2, 0x2, 0x2, 0x6d6, 0x6d1,
0x3, 0x2, 0x2, 0x2, 0x6d7, 0x167, 0x3, 0x2, 0x2, 0x2, 0x6d8, 0x6d9,
0x5, 0xfc, 0x7f, 0x2, 0x6d9, 0x6da, 0x5, 0x42, 0x22, 0x2, 0x6da, 0x6e1,
0x3, 0x2, 0x2, 0x2, 0x6db, 0x6dc, 0x5, 0xfc, 0x7f, 0x2, 0x6dc, 0x6dd,
0x5, 0x18, 0xd, 0x2, 0x6dd, 0x6de, 0x7, 0x4c, 0x2, 0x2, 0x6de, 0x6df,
0x5, 0x42, 0x22, 0x2, 0x6df, 0x6e1, 0x3, 0x2, 0x2, 0x2, 0x6e0, 0x6d8,
0x3, 0x2, 0x2, 0x2, 0x6e0, 0x6db, 0x3, 0x2, 0x2, 0x2, 0x6e1, 0x169,
0x3, 0x2, 0x2, 0x2, 0x6e2, 0x6e3, 0x5, 0xfc, 0x7f, 0x2, 0x6e3, 0x6e4,
0x5, 0x44, 0x23, 0x2, 0x6e4, 0x6eb, 0x3, 0x2, 0x2, 0x2, 0x6e5, 0x6e6,
0x5, 0xfc, 0x7f, 0x2, 0x6e6, 0x6e7, 0x5, 0x18, 0xd, 0x2, 0x6e7, 0x6e8,
0x7, 0x4c, 0x2, 0x2, 0x6e8, 0x6e9, 0x5, 0x44, 0x23, 0x2, 0x6e9, 0x6eb,
0x3, 0x2, 0x2, 0x2, 0x6ea, 0x6e2, 0x3, 0x2, 0x2, 0x2, 0x6ea, 0x6e5,
0x3, 0x2, 0x2, 0x2, 0x6eb, 0x16b, 0x3, 0x2, 0x2, 0x2, 0x6ec, 0x6ed,
0x5, 0xfc, 0x7f, 0x2, 0x6ed, 0x6ee, 0x5, 0x46, 0x24, 0x2, 0x6ee, 0x6f5,
0x3, 0x2, 0x2, 0x2, 0x6ef, 0x6f0, 0x5, 0xfc, 0x7f, 0x2, 0x6f0, 0x6f1,
0x5, 0x18, 0xd, 0x2, 0x6f1, 0x6f2, 0x7, 0x4c, 0x2, 0x2, 0x6f2, 0x6f3,
0x5, 0x46, 0x24, 0x2, 0x6f3, 0x6f5, 0x3, 0x2, 0x2, 0x2, 0x6f4, 0x6ec,
0x3, 0x2, 0x2, 0x2, 0x6f4, 0x6ef, 0x3, 0x2, 0x2, 0x2, 0x6f5, 0x16d,
0x3, 0x2, 0x2, 0x2, 0x6f6, 0x6f7, 0x5, 0xfe, 0x80, 0x2, 0x6f7, 0x6f8,
0x5, 0x5c, 0x2f, 0x2, 0x6f8, 0x6ff, 0x3, 0x2, 0x2, 0x2, 0x6f9, 0x6fa,
0x5, 0xfe, 0x80, 0x2, 0x6fa, 0x6fb, 0x5, 0x18, 0xd, 0x2, 0x6fb, 0x6fc,
0x7, 0x4c, 0x2, 0x2, 0x6fc, 0x6fd, 0x5, 0x5c, 0x2f, 0x2, 0x6fd, 0x6ff,
0x3, 0x2, 0x2, 0x2, 0x6fe, 0x6f6, 0x3, 0x2, 0x2, 0x2, 0x6fe, 0x6f9,
0x3, 0x2, 0x2, 0x2, 0x6ff, 0x16f, 0x3, 0x2, 0x2, 0x2, 0x700, 0x701,
0x5, 0xfe, 0x80, 0x2, 0x701, 0x702, 0x5, 0x2a8, 0x155, 0x2, 0x702, 0x709,
0x3, 0x2, 0x2, 0x2, 0x703, 0x704, 0x5, 0xfe, 0x80, 0x2, 0x704, 0x705,
0x5, 0x18, 0xd, 0x2, 0x705, 0x706, 0x7, 0x4c, 0x2, 0x2, 0x706, 0x707,
0x5, 0x2a8, 0x155, 0x2, 0x707, 0x709, 0x3, 0x2, 0x2, 0x2, 0x708, 0x700,
0x3, 0x2, 0x2, 0x2, 0x708, 0x703, 0x3, 0x2, 0x2, 0x2, 0x709, 0x171,
0x3, 0x2, 0x2, 0x2, 0x70a, 0x70b, 0x5, 0xfe, 0x80, 0x2, 0x70b, 0x70c,
0x5, 0x4c, 0x27, 0x2, 0x70c, 0x713, 0x3, 0x2, 0x2, 0x2, 0x70d, 0x70e,
0x5, 0xfe, 0x80, 0x2, 0x70e, 0x70f, 0x5, 0x18, 0xd, 0x2, 0x70f, 0x710,
0x7, 0x4c, 0x2, 0x2, 0x710, 0x711, 0x5, 0x4c, 0x27, 0x2, 0x711, 0x713,
0x3, 0x2, 0x2, 0x2, 0x712, 0x70a, 0x3, 0x2, 0x2, 0x2, 0x712, 0x70d,
0x3, 0x2, 0x2, 0x2, 0x713, 0x173, 0x3, 0x2, 0x2, 0x2, 0x714, 0x715,
0x5, 0xfe, 0x80, 0x2, 0x715, 0x716, 0x5, 0x56, 0x2c, 0x2, 0x716, 0x71d,
0x3, 0x2, 0x2, 0x2, 0x717, 0x718, 0x5, 0xfe, 0x80, 0x2, 0x718, 0x719,
0x5, 0x18, 0xd, 0x2, 0x719, 0x71a, 0x7, 0x4c, 0x2, 0x2, 0x71a, 0x71b,
0x5, 0x56, 0x2c, 0x2, 0x71b, 0x71d, 0x3, 0x2, 0x2, 0x2, 0x71c, 0x714,
0x3, 0x2, 0x2, 0x2, 0x71c, 0x717, 0x3, 0x2, 0x2, 0x2, 0x71d, 0x175,
0x3, 0x2, 0x2, 0x2, 0x71e, 0x71f, 0x5, 0xfe, 0x80, 0x2, 0x71f, 0x720,
0x5, 0x58, 0x2d, 0x2, 0x720, 0x727, 0x3, 0x2, 0x2, 0x2, 0x721, 0x722,
0x5, 0xfe, 0x80, 0x2, 0x722, 0x723, 0x5, 0x18, 0xd, 0x2, 0x723, 0x724,
0x7, 0x4c, 0x2, 0x2, 0x724, 0x725, 0x5, 0x58, 0x2d, 0x2, 0x725, 0x727,
0x3, 0x2, 0x2, 0x2, 0x726, 0x71e, 0x3, 0x2, 0x2, 0x2, 0x726, 0x721,
0x3, 0x2, 0x2, 0x2, 0x727, 0x177, 0x3, 0x2, 0x2, 0x2, 0x728, 0x729,
0x5, 0xfe, 0x80, 0x2, 0x729, 0x72a, 0x5, 0x40, 0x21, 0x2, 0x72a, 0x731,
0x3, 0x2, 0x2, 0x2, 0x72b, 0x72c, 0x5, 0xfe, 0x80, 0x2, 0x72c, 0x72d,
0x5, 0x18, 0xd, 0x2, 0x72d, 0x72e, 0x7, 0x4c, 0x2, 0x2, 0x72e, 0x72f,
0x5, 0x40, 0x21, 0x2, 0x72f, 0x731, 0x3, 0x2, 0x2, 0x2, 0x730, 0x728,
0x3, 0x2, 0x2, 0x2, 0x730, 0x72b, 0x3, 0x2, 0x2, 0x2, 0x731, 0x179,
0x3, 0x2, 0x2, 0x2, 0x732, 0x733, 0x5, 0xfe, 0x80, 0x2, 0x733, 0x734,
0x5, 0x42, 0x22, 0x2, 0x734, 0x73b, 0x3, 0x2, 0x2, 0x2, 0x735, 0x736,
0x5, 0xfe, 0x80, 0x2, 0x736, 0x737, 0x5, 0x18, 0xd, 0x2, 0x737, 0x738,
0x7, 0x4c, 0x2, 0x2, 0x738, 0x739, 0x5, 0x42, 0x22, 0x2, 0x739, 0x73b,
0x3, 0x2, 0x2, 0x2, 0x73a, 0x732, 0x3, 0x2, 0x2, 0x2, 0x73a, 0x735,
0x3, 0x2, 0x2, 0x2, 0x73b, 0x17b, 0x3, 0x2, 0x2, 0x2, 0x73c, 0x73d,
0x5, 0xfe, 0x80, 0x2, 0x73d, 0x73e, 0x5, 0x44, 0x23, 0x2, 0x73e, 0x745,
0x3, 0x2, 0x2, 0x2, 0x73f, 0x740, 0x5, 0xfe, 0x80, 0x2, 0x740, 0x741,
0x5, 0x18, 0xd, 0x2, 0x741, 0x742, 0x7, 0x4c, 0x2, 0x2, 0x742, 0x743,
0x5, 0x44, 0x23, 0x2, 0x743, 0x745, 0x3, 0x2, 0x2, 0x2, 0x744, 0x73c,
0x3, 0x2, 0x2, 0x2, 0x744, 0x73f, 0x3, 0x2, 0x2, 0x2, 0x745, 0x17d,
0x3, 0x2, 0x2, 0x2, 0x746, 0x747, 0x5, 0xfe, 0x80, 0x2, 0x747, 0x748,
0x5, 0x46, 0x24, 0x2, 0x748, 0x74f, 0x3, 0x2, 0x2, 0x2, 0x749, 0x74a,
0x5, 0xfe, 0x80, 0x2, 0x74a, 0x74b, 0x5, 0x18, 0xd, 0x2, 0x74b, 0x74c,
0x7, 0x4c, 0x2, 0x2, 0x74c, 0x74d, 0x5, 0x46, 0x24, 0x2, 0x74d, 0x74f,
0x3, 0x2, 0x2, 0x2, 0x74e, 0x746, 0x3, 0x2, 0x2, 0x2, 0x74e, 0x749,
0x3, 0x2, 0x2, 0x2, 0x74f, 0x17f, 0x3, 0x2, 0x2, 0x2, 0x750, 0x751,
0x5, 0x100, 0x81, 0x2, 0x751, 0x752, 0x5, 0x5c, 0x2f, 0x2, 0x752, 0x759,
0x3, 0x2, 0x2, 0x2, 0x753, 0x754, 0x5, 0x100, 0x81, 0x2, 0x754, 0x755,
0x5, 0x18, 0xd, 0x2, 0x755, 0x756, 0x7, 0x4c, 0x2, 0x2, 0x756, 0x757,
0x5, 0x5c, 0x2f, 0x2, 0x757, 0x759, 0x3, 0x2, 0x2, 0x2, 0x758, 0x750,
0x3, 0x2, 0x2, 0x2, 0x758, 0x753, 0x3, 0x2, 0x2, 0x2, 0x759, 0x181,
0x3, 0x2, 0x2, 0x2, 0x75a, 0x75b, 0x5, 0x100, 0x81, 0x2, 0x75b, 0x75c,
0x5, 0x4c, 0x27, 0x2, 0x75c, 0x763, 0x3, 0x2, 0x2, 0x2, 0x75d, 0x75e,
0x5, 0x100, 0x81, 0x2, 0x75e, 0x75f, 0x5, 0x18, 0xd, 0x2, 0x75f, 0x760,
0x7, 0x4c, 0x2, 0x2, 0x760, 0x761, 0x5, 0x4c, 0x27, 0x2, 0x761, 0x763,
0x3, 0x2, 0x2, 0x2, 0x762, 0x75a, 0x3, 0x2, 0x2, 0x2, 0x762, 0x75d,
0x3, 0x2, 0x2, 0x2, 0x763, 0x183, 0x3, 0x2, 0x2, 0x2, 0x764, 0x765,
0x5, 0x100, 0x81, 0x2, 0x765, 0x766, 0x5, 0x2a8, 0x155, 0x2, 0x766,
0x76d, 0x3, 0x2, 0x2, 0x2, 0x767, 0x768, 0x5, 0x100, 0x81, 0x2, 0x768,
0x769, 0x5, 0x18, 0xd, 0x2, 0x769, 0x76a, 0x7, 0x4c, 0x2, 0x2, 0x76a,
0x76b, 0x5, 0x2a8, 0x155, 0x2, 0x76b, 0x76d, 0x3, 0x2, 0x2, 0x2, 0x76c,
0x764, 0x3, 0x2, 0x2, 0x2, 0x76c, 0x767, 0x3, 0x2, 0x2, 0x2, 0x76d,
0x185, 0x3, 0x2, 0x2, 0x2, 0x76e, 0x76f, 0x5, 0x100, 0x81, 0x2, 0x76f,
0x770, 0x5, 0x56, 0x2c, 0x2, 0x770, 0x777, 0x3, 0x2, 0x2, 0x2, 0x771,
0x772, 0x5, 0x100, 0x81, 0x2, 0x772, 0x773, 0x5, 0x18, 0xd, 0x2, 0x773,
0x774, 0x7, 0x4c, 0x2, 0x2, 0x774, 0x775, 0x5, 0x56, 0x2c, 0x2, 0x775,
0x777, 0x3, 0x2, 0x2, 0x2, 0x776, 0x76e, 0x3, 0x2, 0x2, 0x2, 0x776,
0x771, 0x3, 0x2, 0x2, 0x2, 0x777, 0x187, 0x3, 0x2, 0x2, 0x2, 0x778,
0x779, 0x5, 0x100, 0x81, 0x2, 0x779, 0x77a, 0x5, 0x58, 0x2d, 0x2, 0x77a,
0x781, 0x3, 0x2, 0x2, 0x2, 0x77b, 0x77c, 0x5, 0x100, 0x81, 0x2, 0x77c,
0x77d, 0x5, 0x18, 0xd, 0x2, 0x77d, 0x77e, 0x7, 0x4c, 0x2, 0x2, 0x77e,
0x77f, 0x5, 0x58, 0x2d, 0x2, 0x77f, 0x781, 0x3, 0x2, 0x2, 0x2, 0x780,
0x778, 0x3, 0x2, 0x2, 0x2, 0x780, 0x77b, 0x3, 0x2, 0x2, 0x2, 0x781,
0x189, 0x3, 0x2, 0x2, 0x2, 0x782, 0x783, 0x5, 0x100, 0x81, 0x2, 0x783,
0x784, 0x5, 0x40, 0x21, 0x2, 0x784, 0x78b, 0x3, 0x2, 0x2, 0x2, 0x785,
0x786, 0x5, 0x100, 0x81, 0x2, 0x786, 0x787, 0x5, 0x18, 0xd, 0x2, 0x787,
0x788, 0x7, 0x4c, 0x2, 0x2, 0x788, 0x789, 0x5, 0x40, 0x21, 0x2, 0x789,
0x78b, 0x3, 0x2, 0x2, 0x2, 0x78a, 0x782, 0x3, 0x2, 0x2, 0x2, 0x78a,
0x785, 0x3, 0x2, 0x2, 0x2, 0x78b, 0x18b, 0x3, 0x2, 0x2, 0x2, 0x78c,
0x78d, 0x5, 0x100, 0x81, 0x2, 0x78d, 0x78e, 0x5, 0x42, 0x22, 0x2, 0x78e,
0x795, 0x3, 0x2, 0x2, 0x2, 0x78f, 0x790, 0x5, 0x100, 0x81, 0x2, 0x790,
0x791, 0x5, 0x18, 0xd, 0x2, 0x791, 0x792, 0x7, 0x4c, 0x2, 0x2, 0x792,
0x793, 0x5, 0x42, 0x22, 0x2, 0x793, 0x795, 0x3, 0x2, 0x2, 0x2, 0x794,
0x78c, 0x3, 0x2, 0x2, 0x2, 0x794, 0x78f, 0x3, 0x2, 0x2, 0x2, 0x795,
0x18d, 0x3, 0x2, 0x2, 0x2, 0x796, 0x797, 0x5, 0x100, 0x81, 0x2, 0x797,
0x798, 0x5, 0x44, 0x23, 0x2, 0x798, 0x79f, 0x3, 0x2, 0x2, 0x2, 0x799,
0x79a, 0x5, 0x100, 0x81, 0x2, 0x79a, 0x79b, 0x5, 0x18, 0xd, 0x2, 0x79b,
0x79c, 0x7, 0x4c, 0x2, 0x2, 0x79c, 0x79d, 0x5, 0x44, 0x23, 0x2, 0x79d,
0x79f, 0x3, 0x2, 0x2, 0x2, 0x79e, 0x796, 0x3, 0x2, 0x2, 0x2, 0x79e,
0x799, 0x3, 0x2, 0x2, 0x2, 0x79f, 0x18f, 0x3, 0x2, 0x2, 0x2, 0x7a0,
0x7a1, 0x5, 0x100, 0x81, 0x2, 0x7a1, 0x7a2, 0x5, 0x46, 0x24, 0x2, 0x7a2,
0x7a9, 0x3, 0x2, 0x2, 0x2, 0x7a3, 0x7a4, 0x5, 0x100, 0x81, 0x2, 0x7a4,
0x7a5, 0x5, 0x18, 0xd, 0x2, 0x7a5, 0x7a6, 0x7, 0x4c, 0x2, 0x2, 0x7a6,
0x7a7, 0x5, 0x46, 0x24, 0x2, 0x7a7, 0x7a9, 0x3, 0x2, 0x2, 0x2, 0x7a8,
0x7a0, 0x3, 0x2, 0x2, 0x2, 0x7a8, 0x7a3, 0x3, 0x2, 0x2, 0x2, 0x7a9,
0x191, 0x3, 0x2, 0x2, 0x2, 0x7aa, 0x7ab, 0x5, 0x102, 0x82, 0x2, 0x7ab,
0x7ac, 0x5, 0x5c, 0x2f, 0x2, 0x7ac, 0x193, 0x3, 0x2, 0x2, 0x2, 0x7ad,
0x7ae, 0x5, 0x102, 0x82, 0x2, 0x7ae, 0x7af, 0x5, 0x40, 0x21, 0x2, 0x7af,
0x195, 0x3, 0x2, 0x2, 0x2, 0x7b0, 0x7b1, 0x5, 0x102, 0x82, 0x2, 0x7b1,
0x7b2, 0x5, 0x42, 0x22, 0x2, 0x7b2, 0x197, 0x3, 0x2, 0x2, 0x2, 0x7b3,
0x7b4, 0x5, 0x102, 0x82, 0x2, 0x7b4, 0x7b5, 0x5, 0x44, 0x23, 0x2, 0x7b5,
0x199, 0x3, 0x2, 0x2, 0x2, 0x7b6, 0x7b7, 0x5, 0x102, 0x82, 0x2, 0x7b7,
0x7b8, 0x5, 0x46, 0x24, 0x2, 0x7b8, 0x19b, 0x3, 0x2, 0x2, 0x2, 0x7b9,
0x7ba, 0x5, 0x102, 0x82, 0x2, 0x7ba, 0x7bb, 0x5, 0x4c, 0x27, 0x2, 0x7bb,
0x19d, 0x3, 0x2, 0x2, 0x2, 0x7bc, 0x7bd, 0x5, 0x102, 0x82, 0x2, 0x7bd,
0x7be, 0x5, 0x56, 0x2c, 0x2, 0x7be, 0x19f, 0x3, 0x2, 0x2, 0x2, 0x7bf,
0x7c0, 0x5, 0x102, 0x82, 0x2, 0x7c0, 0x7c1, 0x5, 0x58, 0x2d, 0x2, 0x7c1,
0x1a1, 0x3, 0x2, 0x2, 0x2, 0x7c2, 0x7c3, 0x5, 0x104, 0x83, 0x2, 0x7c3,
0x7c4, 0x5, 0x5c, 0x2f, 0x2, 0x7c4, 0x1a3, 0x3, 0x2, 0x2, 0x2, 0x7c5,
0x7c6, 0x5, 0x104, 0x83, 0x2, 0x7c6, 0x7c7, 0x5, 0x40, 0x21, 0x2, 0x7c7,
0x1a5, 0x3, 0x2, 0x2, 0x2, 0x7c8, 0x7c9, 0x5, 0x104, 0x83, 0x2, 0x7c9,
0x7ca, 0x5, 0x42, 0x22, 0x2, 0x7ca, 0x1a7, 0x3, 0x2, 0x2, 0x2, 0x7cb,
0x7cc, 0x5, 0x104, 0x83, 0x2, 0x7cc, 0x7cd, 0x5, 0x44, 0x23, 0x2, 0x7cd,
0x1a9, 0x3, 0x2, 0x2, 0x2, 0x7ce, 0x7cf, 0x5, 0x104, 0x83, 0x2, 0x7cf,
0x7d0, 0x5, 0x46, 0x24, 0x2, 0x7d0, 0x1ab, 0x3, 0x2, 0x2, 0x2, 0x7d1,
0x7d2, 0x5, 0x104, 0x83, 0x2, 0x7d2, 0x7d3, 0x5, 0x4c, 0x27, 0x2, 0x7d3,
0x1ad, 0x3, 0x2, 0x2, 0x2, 0x7d4, 0x7d5, 0x5, 0x104, 0x83, 0x2, 0x7d5,
0x7d6, 0x5, 0x56, 0x2c, 0x2, 0x7d6, 0x1af, 0x3, 0x2, 0x2, 0x2, 0x7d7,
0x7d8, 0x5, 0x104, 0x83, 0x2, 0x7d8, 0x7d9, 0x5, 0x58, 0x2d, 0x2, 0x7d9,
0x1b1, 0x3, 0x2, 0x2, 0x2, 0x7da, 0x831, 0x5, 0x106, 0x84, 0x2, 0x7db,
0x831, 0x5, 0x108, 0x85, 0x2, 0x7dc, 0x831, 0x5, 0x10a, 0x86, 0x2, 0x7dd,
0x831, 0x5, 0x10c, 0x87, 0x2, 0x7de, 0x831, 0x5, 0x10e, 0x88, 0x2, 0x7df,
0x831, 0x5, 0x110, 0x89, 0x2, 0x7e0, 0x831, 0x5, 0x112, 0x8a, 0x2, 0x7e1,
0x831, 0x5, 0x114, 0x8b, 0x2, 0x7e2, 0x831, 0x5, 0x116, 0x8c, 0x2, 0x7e3,
0x831, 0x5, 0x118, 0x8d, 0x2, 0x7e4, 0x831, 0x5, 0x11a, 0x8e, 0x2, 0x7e5,
0x831, 0x5, 0x11c, 0x8f, 0x2, 0x7e6, 0x831, 0x5, 0x11e, 0x90, 0x2, 0x7e7,
0x831, 0x5, 0x120, 0x91, 0x2, 0x7e8, 0x831, 0x5, 0x122, 0x92, 0x2, 0x7e9,
0x831, 0x5, 0x124, 0x93, 0x2, 0x7ea, 0x831, 0x5, 0x126, 0x94, 0x2, 0x7eb,
0x831, 0x5, 0x128, 0x95, 0x2, 0x7ec, 0x831, 0x5, 0x12a, 0x96, 0x2, 0x7ed,
0x831, 0x5, 0x12c, 0x97, 0x2, 0x7ee, 0x831, 0x5, 0x12e, 0x98, 0x2, 0x7ef,
0x831, 0x5, 0x130, 0x99, 0x2, 0x7f0, 0x831, 0x5, 0x132, 0x9a, 0x2, 0x7f1,
0x831, 0x5, 0x138, 0x9d, 0x2, 0x7f2, 0x831, 0x5, 0x13a, 0x9e, 0x2, 0x7f3,
0x831, 0x5, 0x13c, 0x9f, 0x2, 0x7f4, 0x831, 0x5, 0x13e, 0xa0, 0x2, 0x7f5,
0x831, 0x5, 0x140, 0xa1, 0x2, 0x7f6, 0x831, 0x5, 0x142, 0xa2, 0x2, 0x7f7,
0x831, 0x5, 0x144, 0xa3, 0x2, 0x7f8, 0x831, 0x5, 0x146, 0xa4, 0x2, 0x7f9,
0x831, 0x5, 0x148, 0xa5, 0x2, 0x7fa, 0x831, 0x5, 0x134, 0x9b, 0x2, 0x7fb,
0x831, 0x5, 0x136, 0x9c, 0x2, 0x7fc, 0x831, 0x5, 0x14a, 0xa6, 0x2, 0x7fd,
0x831, 0x5, 0x14c, 0xa7, 0x2, 0x7fe, 0x831, 0x5, 0x14e, 0xa8, 0x2, 0x7ff,
0x831, 0x5, 0x150, 0xa9, 0x2, 0x800, 0x831, 0x5, 0x152, 0xaa, 0x2, 0x801,
0x831, 0x5, 0x154, 0xab, 0x2, 0x802, 0x831, 0x5, 0x156, 0xac, 0x2, 0x803,
0x831, 0x5, 0x158, 0xad, 0x2, 0x804, 0x831, 0x5, 0x15a, 0xae, 0x2, 0x805,
0x831, 0x5, 0x15c, 0xaf, 0x2, 0x806, 0x831, 0x5, 0x15e, 0xb0, 0x2, 0x807,
0x831, 0x5, 0x160, 0xb1, 0x2, 0x808, 0x831, 0x5, 0x162, 0xb2, 0x2, 0x809,
0x831, 0x5, 0x164, 0xb3, 0x2, 0x80a, 0x831, 0x5, 0x166, 0xb4, 0x2, 0x80b,
0x831, 0x5, 0x168, 0xb5, 0x2, 0x80c, 0x831, 0x5, 0x16a, 0xb6, 0x2, 0x80d,
0x831, 0x5, 0x16c, 0xb7, 0x2, 0x80e, 0x831, 0x5, 0x16e, 0xb8, 0x2, 0x80f,
0x831, 0x5, 0x170, 0xb9, 0x2, 0x810, 0x831, 0x5, 0x172, 0xba, 0x2, 0x811,
0x831, 0x5, 0x174, 0xbb, 0x2, 0x812, 0x831, 0x5, 0x176, 0xbc, 0x2, 0x813,
0x831, 0x5, 0x178, 0xbd, 0x2, 0x814, 0x831, 0x5, 0x17a, 0xbe, 0x2, 0x815,
0x831, 0x5, 0x17c, 0xbf, 0x2, 0x816, 0x831, 0x5, 0x17e, 0xc0, 0x2, 0x817,
0x831, 0x5, 0x180, 0xc1, 0x2, 0x818, 0x831, 0x5, 0x182, 0xc2, 0x2, 0x819,
0x831, 0x5, 0x184, 0xc3, 0x2, 0x81a, 0x831, 0x5, 0x186, 0xc4, 0x2, 0x81b,
0x831, 0x5, 0x188, 0xc5, 0x2, 0x81c, 0x831, 0x5, 0x18a, 0xc6, 0x2, 0x81d,
0x831, 0x5, 0x18c, 0xc7, 0x2, 0x81e, 0x831, 0x5, 0x18e, 0xc8, 0x2, 0x81f,
0x831, 0x5, 0x190, 0xc9, 0x2, 0x820, 0x831, 0x5, 0x192, 0xca, 0x2, 0x821,
0x831, 0x5, 0x194, 0xcb, 0x2, 0x822, 0x831, 0x5, 0x196, 0xcc, 0x2, 0x823,
0x831, 0x5, 0x198, 0xcd, 0x2, 0x824, 0x831, 0x5, 0x19a, 0xce, 0x2, 0x825,
0x831, 0x5, 0x19c, 0xcf, 0x2, 0x826, 0x831, 0x5, 0x19e, 0xd0, 0x2, 0x827,
0x831, 0x5, 0x1a0, 0xd1, 0x2, 0x828, 0x831, 0x5, 0x1a2, 0xd2, 0x2, 0x829,
0x831, 0x5, 0x1a4, 0xd3, 0x2, 0x82a, 0x831, 0x5, 0x1a6, 0xd4, 0x2, 0x82b,
0x831, 0x5, 0x1a8, 0xd5, 0x2, 0x82c, 0x831, 0x5, 0x1aa, 0xd6, 0x2, 0x82d,
0x831, 0x5, 0x1ac, 0xd7, 0x2, 0x82e, 0x831, 0x5, 0x1ae, 0xd8, 0x2, 0x82f,
0x831, 0x5, 0x1b0, 0xd9, 0x2, 0x830, 0x7da, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7db, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7dc, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7dd, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7de, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7df, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7e0, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7e1, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7e2, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7e3, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7e4, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7e5, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7e6, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7e7, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7e8, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7e9, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7ea, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7eb, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7ec, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7ed, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7ee, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7ef, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7f0, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7f1, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7f2, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7f3, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7f4, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7f5, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7f6, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7f7, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7f8, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7f9, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7fa, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7fb, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7fc, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7fd, 0x3, 0x2, 0x2, 0x2, 0x830, 0x7fe, 0x3, 0x2, 0x2, 0x2, 0x830,
0x7ff, 0x3, 0x2, 0x2, 0x2, 0x830, 0x800, 0x3, 0x2, 0x2, 0x2, 0x830,
0x801, 0x3, 0x2, 0x2, 0x2, 0x830, 0x802, 0x3, 0x2, 0x2, 0x2, 0x830,
0x803, 0x3, 0x2, 0x2, 0x2, 0x830, 0x804, 0x3, 0x2, 0x2, 0x2, 0x830,
0x805, 0x3, 0x2, 0x2, 0x2, 0x830, 0x806, 0x3, 0x2, 0x2, 0x2, 0x830,
0x807, 0x3, 0x2, 0x2, 0x2, 0x830, 0x808, 0x3, 0x2, 0x2, 0x2, 0x830,
0x809, 0x3, 0x2, 0x2, 0x2, 0x830, 0x80a, 0x3, 0x2, 0x2, 0x2, 0x830,
0x80b, 0x3, 0x2, 0x2, 0x2, 0x830, 0x80c, 0x3, 0x2, 0x2, 0x2, 0x830,
0x80d, 0x3, 0x2, 0x2, 0x2, 0x830, 0x80e, 0x3, 0x2, 0x2, 0x2, 0x830,
0x80f, 0x3, 0x2, 0x2, 0x2, 0x830, 0x810, 0x3, 0x2, 0x2, 0x2, 0x830,
0x811, 0x3, 0x2, 0x2, 0x2, 0x830, 0x812, 0x3, 0x2, 0x2, 0x2, 0x830,
0x813, 0x3, 0x2, 0x2, 0x2, 0x830, 0x814, 0x3, 0x2, 0x2, 0x2, 0x830,
0x815, 0x3, 0x2, 0x2, 0x2, 0x830, 0x816, 0x3, 0x2, 0x2, 0x2, 0x830,
0x817, 0x3, 0x2, 0x2, 0x2, 0x830, 0x818, 0x3, 0x2, 0x2, 0x2, 0x830,
0x819, 0x3, 0x2, 0x2, 0x2, 0x830, 0x81a, 0x3, 0x2, 0x2, 0x2, 0x830,
0x81b, 0x3, 0x2, 0x2, 0x2, 0x830, 0x81c, 0x3, 0x2, 0x2, 0x2, 0x830,
0x81d, 0x3, 0x2, 0x2, 0x2, 0x830, 0x81e, 0x3, 0x2, 0x2, 0x2, 0x830,
0x81f, 0x3, 0x2, 0x2, 0x2, 0x830, 0x820, 0x3, 0x2, 0x2, 0x2, 0x830,
0x821, 0x3, 0x2, 0x2, 0x2, 0x830, 0x822, 0x3, 0x2, 0x2, 0x2, 0x830,
0x823, 0x3, 0x2, 0x2, 0x2, 0x830, 0x824, 0x3, 0x2, 0x2, 0x2, 0x830,
0x825, 0x3, 0x2, 0x2, 0x2, 0x830, 0x826, 0x3, 0x2, 0x2, 0x2, 0x830,
0x827, 0x3, 0x2, 0x2, 0x2, 0x830, 0x828, 0x3, 0x2, 0x2, 0x2, 0x830,
0x829, 0x3, 0x2, 0x2, 0x2, 0x830, 0x82a, 0x3, 0x2, 0x2, 0x2, 0x830,
0x82b, 0x3, 0x2, 0x2, 0x2, 0x830, 0x82c, 0x3, 0x2, 0x2, 0x2, 0x830,
0x82d, 0x3, 0x2, 0x2, 0x2, 0x830, 0x82e, 0x3, 0x2, 0x2, 0x2, 0x830,
0x82f, 0x3, 0x2, 0x2, 0x2, 0x831, 0x1b3, 0x3, 0x2, 0x2, 0x2, 0x832,
0x833, 0x9, 0x2f, 0x2, 0x2, 0x833, 0x1b5, 0x3, 0x2, 0x2, 0x2, 0x834,
0x835, 0x9, 0x30, 0x2, 0x2, 0x835, 0x1b7, 0x3, 0x2, 0x2, 0x2, 0x836,
0x837, 0x9, 0x31, 0x2, 0x2, 0x837, 0x1b9, 0x3, 0x2, 0x2, 0x2, 0x838,
0x839, 0x9, 0x32, 0x2, 0x2, 0x839, 0x1bb, 0x3, 0x2, 0x2, 0x2, 0x83a,
0x83b, 0x9, 0x33, 0x2, 0x2, 0x83b, 0x1bd, 0x3, 0x2, 0x2, 0x2, 0x83c,
0x83d, 0x9, 0x34, 0x2, 0x2, 0x83d, 0x1bf, 0x3, 0x2, 0x2, 0x2, 0x83e,
0x83f, 0x9, 0x35, 0x2, 0x2, 0x83f, 0x1c1, 0x3, 0x2, 0x2, 0x2, 0x840,
0x841, 0x9, 0x36, 0x2, 0x2, 0x841, 0x1c3, 0x3, 0x2, 0x2, 0x2, 0x842,
0x843, 0x9, 0x37, 0x2, 0x2, 0x843, 0x1c5, 0x3, 0x2, 0x2, 0x2, 0x844,
0x845, 0x9, 0x38, 0x2, 0x2, 0x845, 0x846, 0x5, 0x2a8, 0x155, 0x2, 0x846,
0x1c7, 0x3, 0x2, 0x2, 0x2, 0x847, 0x852, 0x5, 0x1b4, 0xdb, 0x2, 0x848,
0x852, 0x5, 0x1b6, 0xdc, 0x2, 0x849, 0x852, 0x5, 0x1b8, 0xdd, 0x2, 0x84a,
0x852, 0x5, 0x1ba, 0xde, 0x2, 0x84b, 0x852, 0x5, 0x1bc, 0xdf, 0x2, 0x84c,
0x852, 0x5, 0x1be, 0xe0, 0x2, 0x84d, 0x852, 0x5, 0x1c0, 0xe1, 0x2, 0x84e,
0x852, 0x5, 0x1c2, 0xe2, 0x2, 0x84f, 0x852, 0x5, 0x1c4, 0xe3, 0x2, 0x850,
0x852, 0x5, 0x1c6, 0xe4, 0x2, 0x851, 0x847, 0x3, 0x2, 0x2, 0x2, 0x851,
0x848, 0x3, 0x2, 0x2, 0x2, 0x851, 0x849, 0x3, 0x2, 0x2, 0x2, 0x851,
0x84a, 0x3, 0x2, 0x2, 0x2, 0x851, 0x84b, 0x3, 0x2, 0x2, 0x2, 0x851,
0x84c, 0x3, 0x2, 0x2, 0x2, 0x851, 0x84d, 0x3, 0x2, 0x2, 0x2, 0x851,
0x84e, 0x3, 0x2, 0x2, 0x2, 0x851, 0x84f, 0x3, 0x2, 0x2, 0x2, 0x851,
0x850, 0x3, 0x2, 0x2, 0x2, 0x852, 0x1c9, 0x3, 0x2, 0x2, 0x2, 0x853,
0x854, 0x5, 0xf2, 0x7a, 0x2, 0x854, 0x855, 0x5, 0x36, 0x1c, 0x2, 0x855,
0x856, 0x7, 0x4c, 0x2, 0x2, 0x856, 0x857, 0x5, 0xa4, 0x53, 0x2, 0x857,
0x1cb, 0x3, 0x2, 0x2, 0x2, 0x858, 0x859, 0x5, 0xf4, 0x7b, 0x2, 0x859,
0x85a, 0x5, 0x36, 0x1c, 0x2, 0x85a, 0x85b, 0x7, 0x4c, 0x2, 0x2, 0x85b,
0x85c, 0x5, 0xa4, 0x53, 0x2, 0x85c, 0x1cd, 0x3, 0x2, 0x2, 0x2, 0x85d,
0x85e, 0x5, 0xf8, 0x7d, 0x2, 0x85e, 0x85f, 0x5, 0x36, 0x1c, 0x2, 0x85f,
0x860, 0x7, 0x4c, 0x2, 0x2, 0x860, 0x861, 0x5, 0xa4, 0x53, 0x2, 0x861,
0x1cf, 0x3, 0x2, 0x2, 0x2, 0x862, 0x868, 0x5, 0x2a, 0x16, 0x2, 0x863,
0x868, 0x5, 0x30, 0x19, 0x2, 0x864, 0x868, 0x5, 0x3c, 0x1f, 0x2, 0x865,
0x868, 0x5, 0x48, 0x25, 0x2, 0x866, 0x868, 0x3, 0x2, 0x2, 0x2, 0x867,
0x862, 0x3, 0x2, 0x2, 0x2, 0x867, 0x863, 0x3, 0x2, 0x2, 0x2, 0x867,
0x864, 0x3, 0x2, 0x2, 0x2, 0x867, 0x865, 0x3, 0x2, 0x2, 0x2, 0x867,
0x866, 0x3, 0x2, 0x2, 0x2, 0x868, 0x1d1, 0x3, 0x2, 0x2, 0x2, 0x869,
0x86f, 0x5, 0x2a, 0x16, 0x2, 0x86a, 0x86f, 0x5, 0x30, 0x19, 0x2, 0x86b,
0x86f, 0x5, 0x3e, 0x20, 0x2, 0x86c, 0x86f, 0x5, 0x48, 0x25, 0x2, 0x86d,
0x86f, 0x3, 0x2, 0x2, 0x2, 0x86e, 0x869, 0x3, 0x2, 0x2, 0x2, 0x86e,
0x86a, 0x3, 0x2, 0x2, 0x2, 0x86e, 0x86b, 0x3, 0x2, 0x2, 0x2, 0x86e,
0x86c, 0x3, 0x2, 0x2, 0x2, 0x86e, 0x86d, 0x3, 0x2, 0x2, 0x2, 0x86f,
0x1d3, 0x3, 0x2, 0x2, 0x2, 0x870, 0x871, 0x5, 0xf2, 0x7a, 0x2, 0x871,
0x872, 0x5, 0x3c, 0x1f, 0x2, 0x872, 0x873, 0x7, 0x4c, 0x2, 0x2, 0x873,
0x874, 0x5, 0x1d0, 0xe9, 0x2, 0x874, 0x1d5, 0x3, 0x2, 0x2, 0x2, 0x875,
0x876, 0x5, 0xf2, 0x7a, 0x2, 0x876, 0x877, 0x5, 0x3e, 0x20, 0x2, 0x877,
0x878, 0x7, 0x4c, 0x2, 0x2, 0x878, 0x879, 0x5, 0x1d2, 0xea, 0x2, 0x879,
0x1d7, 0x3, 0x2, 0x2, 0x2, 0x87a, 0x87b, 0x5, 0x102, 0x82, 0x2, 0x87b,
0x87c, 0x5, 0xa4, 0x53, 0x2, 0x87c, 0x1d9, 0x3, 0x2, 0x2, 0x2, 0x87d,
0x87e, 0x5, 0x102, 0x82, 0x2, 0x87e, 0x87f, 0x5, 0x3c, 0x1f, 0x2, 0x87f,
0x1db, 0x3, 0x2, 0x2, 0x2, 0x880, 0x881, 0x5, 0x102, 0x82, 0x2, 0x881,
0x882, 0x5, 0x3e, 0x20, 0x2, 0x882, 0x1dd, 0x3, 0x2, 0x2, 0x2, 0x883,
0x884, 0x5, 0x104, 0x83, 0x2, 0x884, 0x885, 0x5, 0xa4, 0x53, 0x2, 0x885,
0x1df, 0x3, 0x2, 0x2, 0x2, 0x886, 0x887, 0x5, 0x104, 0x83, 0x2, 0x887,
0x888, 0x5, 0x3c, 0x1f, 0x2, 0x888, 0x1e1, 0x3, 0x2, 0x2, 0x2, 0x889,
0x88a, 0x5, 0x104, 0x83, 0x2, 0x88a, 0x88b, 0x5, 0x3e, 0x20, 0x2, 0x88b,
0x1e3, 0x3, 0x2, 0x2, 0x2, 0x88c, 0x899, 0x5, 0x1ca, 0xe6, 0x2, 0x88d,
0x899, 0x5, 0x1cc, 0xe7, 0x2, 0x88e, 0x899, 0x5, 0x1ce, 0xe8, 0x2, 0x88f,
0x899, 0x5, 0x1d4, 0xeb, 0x2, 0x890, 0x899, 0x5, 0x1d6, 0xec, 0x2, 0x891,
0x899, 0x5, 0x1d6, 0xec, 0x2, 0x892, 0x899, 0x5, 0x1d8, 0xed, 0x2, 0x893,
0x899, 0x5, 0x1da, 0xee, 0x2, 0x894, 0x899, 0x5, 0x1dc, 0xef, 0x2, 0x895,
0x899, 0x5, 0x1de, 0xf0, 0x2, 0x896, 0x899, 0x5, 0x1e0, 0xf1, 0x2, 0x897,
0x899, 0x5, 0x1e2, 0xf2, 0x2, 0x898, 0x88c, 0x3, 0x2, 0x2, 0x2, 0x898,
0x88d, 0x3, 0x2, 0x2, 0x2, 0x898, 0x88e, 0x3, 0x2, 0x2, 0x2, 0x898,
0x88f, 0x3, 0x2, 0x2, 0x2, 0x898, 0x890, 0x3, 0x2, 0x2, 0x2, 0x898,
0x891, 0x3, 0x2, 0x2, 0x2, 0x898, 0x892, 0x3, 0x2, 0x2, 0x2, 0x898,
0x893, 0x3, 0x2, 0x2, 0x2, 0x898, 0x894, 0x3, 0x2, 0x2, 0x2, 0x898,
0x895, 0x3, 0x2, 0x2, 0x2, 0x898, 0x896, 0x3, 0x2, 0x2, 0x2, 0x898,
0x897, 0x3, 0x2, 0x2, 0x2, 0x899, 0x1e5, 0x3, 0x2, 0x2, 0x2, 0x89a,
0x89b, 0x9, 0x39, 0x2, 0x2, 0x89b, 0x1e7, 0x3, 0x2, 0x2, 0x2, 0x89c,
0x89d, 0x9, 0x3a, 0x2, 0x2, 0x89d, 0x1e9, 0x3, 0x2, 0x2, 0x2, 0x89e,
0x89f, 0x9, 0x3b, 0x2, 0x2, 0x89f, 0x1eb, 0x3, 0x2, 0x2, 0x2, 0x8a0,
0x8a1, 0x9, 0x3c, 0x2, 0x2, 0x8a1, 0x1ed, 0x3, 0x2, 0x2, 0x2, 0x8a2,
0x8a3, 0x9, 0x3d, 0x2, 0x2, 0x8a3, 0x1ef, 0x3, 0x2, 0x2, 0x2, 0x8a4,
0x8a5, 0x9, 0x3e, 0x2, 0x2, 0x8a5, 0x1f1, 0x3, 0x2, 0x2, 0x2, 0x8a6,
0x8a7, 0x9, 0x3f, 0x2, 0x2, 0x8a7, 0x1f3, 0x3, 0x2, 0x2, 0x2, 0x8a8,
0x8a9, 0x9, 0x40, 0x2, 0x2, 0x8a9, 0x1f5, 0x3, 0x2, 0x2, 0x2, 0x8aa,
0x8ab, 0x9, 0x41, 0x2, 0x2, 0x8ab, 0x1f7, 0x3, 0x2, 0x2, 0x2, 0x8ac,
0x8ad, 0x9, 0x42, 0x2, 0x2, 0x8ad, 0x1f9, 0x3, 0x2, 0x2, 0x2, 0x8ae,
0x8af, 0x9, 0x43, 0x2, 0x2, 0x8af, 0x1fb, 0x3, 0x2, 0x2, 0x2, 0x8b0,
0x8b1, 0x9, 0x44, 0x2, 0x2, 0x8b1, 0x1fd, 0x3, 0x2, 0x2, 0x2, 0x8b2,
0x8b3, 0x9, 0x45, 0x2, 0x2, 0x8b3, 0x1ff, 0x3, 0x2, 0x2, 0x2, 0x8b4,
0x8b5, 0x9, 0x46, 0x2, 0x2, 0x8b5, 0x201, 0x3, 0x2, 0x2, 0x2, 0x8b6,
0x8b7, 0x5, 0x1ee, 0xf8, 0x2, 0x8b7, 0x8b8, 0x5, 0x5c, 0x2f, 0x2, 0x8b8,
0x203, 0x3, 0x2, 0x2, 0x2, 0x8b9, 0x8ba, 0x5, 0x1ee, 0xf8, 0x2, 0x8ba,
0x8bb, 0x5, 0x4c, 0x27, 0x2, 0x8bb, 0x205, 0x3, 0x2, 0x2, 0x2, 0x8bc,
0x8bd, 0x5, 0x1ee, 0xf8, 0x2, 0x8bd, 0x8be, 0x5, 0x56, 0x2c, 0x2, 0x8be,
0x207, 0x3, 0x2, 0x2, 0x2, 0x8bf, 0x8c0, 0x5, 0x1ee, 0xf8, 0x2, 0x8c0,
0x8c1, 0x5, 0x58, 0x2d, 0x2, 0x8c1, 0x209, 0x3, 0x2, 0x2, 0x2, 0x8c2,
0x8c3, 0x5, 0x1f0, 0xf9, 0x2, 0x8c3, 0x8c4, 0x5, 0x5c, 0x2f, 0x2, 0x8c4,
0x20b, 0x3, 0x2, 0x2, 0x2, 0x8c5, 0x8c6, 0x5, 0x1f0, 0xf9, 0x2, 0x8c6,
0x8c7, 0x5, 0x4c, 0x27, 0x2, 0x8c7, 0x20d, 0x3, 0x2, 0x2, 0x2, 0x8c8,
0x8c9, 0x5, 0x1f0, 0xf9, 0x2, 0x8c9, 0x8ca, 0x5, 0x56, 0x2c, 0x2, 0x8ca,
0x20f, 0x3, 0x2, 0x2, 0x2, 0x8cb, 0x8cc, 0x5, 0x1f0, 0xf9, 0x2, 0x8cc,
0x8cd, 0x5, 0x58, 0x2d, 0x2, 0x8cd, 0x211, 0x3, 0x2, 0x2, 0x2, 0x8ce,
0x8cf, 0x5, 0x1f2, 0xfa, 0x2, 0x8cf, 0x8d0, 0x5, 0x5c, 0x2f, 0x2, 0x8d0,
0x213, 0x3, 0x2, 0x2, 0x2, 0x8d1, 0x8d2, 0x5, 0x1f2, 0xfa, 0x2, 0x8d2,
0x8d3, 0x5, 0x4c, 0x27, 0x2, 0x8d3, 0x215, 0x3, 0x2, 0x2, 0x2, 0x8d4,
0x8d5, 0x5, 0x1f2, 0xfa, 0x2, 0x8d5, 0x8d6, 0x5, 0x56, 0x2c, 0x2, 0x8d6,
0x217, 0x3, 0x2, 0x2, 0x2, 0x8d7, 0x8d8, 0x5, 0x1f2, 0xfa, 0x2, 0x8d8,
0x8d9, 0x5, 0x58, 0x2d, 0x2, 0x8d9, 0x219, 0x3, 0x2, 0x2, 0x2, 0x8da,
0x8db, 0x5, 0x1f4, 0xfb, 0x2, 0x8db, 0x8dc, 0x5, 0x5c, 0x2f, 0x2, 0x8dc,
0x21b, 0x3, 0x2, 0x2, 0x2, 0x8dd, 0x8de, 0x5, 0x1f4, 0xfb, 0x2, 0x8de,
0x8df, 0x5, 0x4c, 0x27, 0x2, 0x8df, 0x21d, 0x3, 0x2, 0x2, 0x2, 0x8e0,
0x8e1, 0x5, 0x1f4, 0xfb, 0x2, 0x8e1, 0x8e2, 0x5, 0x56, 0x2c, 0x2, 0x8e2,
0x21f, 0x3, 0x2, 0x2, 0x2, 0x8e3, 0x8e4, 0x5, 0x1f4, 0xfb, 0x2, 0x8e4,
0x8e5, 0x5, 0x58, 0x2d, 0x2, 0x8e5, 0x221, 0x3, 0x2, 0x2, 0x2, 0x8e6,
0x8e7, 0x5, 0x1f6, 0xfc, 0x2, 0x8e7, 0x8e8, 0x5, 0x5c, 0x2f, 0x2, 0x8e8,
0x223, 0x3, 0x2, 0x2, 0x2, 0x8e9, 0x8ea, 0x5, 0x1f8, 0xfd, 0x2, 0x8ea,
0x8eb, 0x5, 0x5c, 0x2f, 0x2, 0x8eb, 0x225, 0x3, 0x2, 0x2, 0x2, 0x8ec,
0x8ed, 0x5, 0x1fa, 0xfe, 0x2, 0x8ed, 0x8ee, 0x5, 0x5c, 0x2f, 0x2, 0x8ee,
0x227, 0x3, 0x2, 0x2, 0x2, 0x8ef, 0x8f0, 0x5, 0x1fc, 0xff, 0x2, 0x8f0,
0x8f1, 0x5, 0x5c, 0x2f, 0x2, 0x8f1, 0x229, 0x3, 0x2, 0x2, 0x2, 0x8f2,
0x8f3, 0x5, 0x1fe, 0x100, 0x2, 0x8f3, 0x22b, 0x3, 0x2, 0x2, 0x2, 0x8f4,
0x8f5, 0x5, 0x200, 0x101, 0x2, 0x8f5, 0x22d, 0x3, 0x2, 0x2, 0x2, 0x8f6,
0x911, 0x5, 0x1e6, 0xf4, 0x2, 0x8f7, 0x911, 0x5, 0x1e8, 0xf5, 0x2, 0x8f8,
0x911, 0x5, 0x1ea, 0xf6, 0x2, 0x8f9, 0x911, 0x5, 0x1ec, 0xf7, 0x2, 0x8fa,
0x911, 0x5, 0x202, 0x102, 0x2, 0x8fb, 0x911, 0x5, 0x204, 0x103, 0x2,
0x8fc, 0x911, 0x5, 0x206, 0x104, 0x2, 0x8fd, 0x911, 0x5, 0x208, 0x105,
0x2, 0x8fe, 0x911, 0x5, 0x20a, 0x106, 0x2, 0x8ff, 0x911, 0x5, 0x20c,
0x107, 0x2, 0x900, 0x911, 0x5, 0x20e, 0x108, 0x2, 0x901, 0x911, 0x5,
0x210, 0x109, 0x2, 0x902, 0x911, 0x5, 0x212, 0x10a, 0x2, 0x903, 0x911,
0x5, 0x214, 0x10b, 0x2, 0x904, 0x911, 0x5, 0x216, 0x10c, 0x2, 0x905,
0x911, 0x5, 0x218, 0x10d, 0x2, 0x906, 0x911, 0x5, 0x21a, 0x10e, 0x2,
0x907, 0x911, 0x5, 0x21c, 0x10f, 0x2, 0x908, 0x911, 0x5, 0x21e, 0x110,
0x2, 0x909, 0x911, 0x5, 0x220, 0x111, 0x2, 0x90a, 0x911, 0x5, 0x222,
0x112, 0x2, 0x90b, 0x911, 0x5, 0x224, 0x113, 0x2, 0x90c, 0x911, 0x5,
0x226, 0x114, 0x2, 0x90d, 0x911, 0x5, 0x228, 0x115, 0x2, 0x90e, 0x911,
0x5, 0x22a, 0x116, 0x2, 0x90f, 0x911, 0x5, 0x22c, 0x117, 0x2, 0x910,
0x8f6, 0x3, 0x2, 0x2, 0x2, 0x910, 0x8f7, 0x3, 0x2, 0x2, 0x2, 0x910,
0x8f8, 0x3, 0x2, 0x2, 0x2, 0x910, 0x8f9, 0x3, 0x2, 0x2, 0x2, 0x910,
0x8fa, 0x3, 0x2, 0x2, 0x2, 0x910, 0x8fb, 0x3, 0x2, 0x2, 0x2, 0x910,
0x8fc, 0x3, 0x2, 0x2, 0x2, 0x910, 0x8fd, 0x3, 0x2, 0x2, 0x2, 0x910,
0x8fe, 0x3, 0x2, 0x2, 0x2, 0x910, 0x8ff, 0x3, 0x2, 0x2, 0x2, 0x910,
0x900, 0x3, 0x2, 0x2, 0x2, 0x910, 0x901, 0x3, 0x2, 0x2, 0x2, 0x910,
0x902, 0x3, 0x2, 0x2, 0x2, 0x910, 0x903, 0x3, 0x2, 0x2, 0x2, 0x910,
0x904, 0x3, 0x2, 0x2, 0x2, 0x910, 0x905, 0x3, 0x2, 0x2, 0x2, 0x910,
0x906, 0x3, 0x2, 0x2, 0x2, 0x910, 0x907, 0x3, 0x2, 0x2, 0x2, 0x910,
0x908, 0x3, 0x2, 0x2, 0x2, 0x910, 0x909, 0x3, 0x2, 0x2, 0x2, 0x910,
0x90a, 0x3, 0x2, 0x2, 0x2, 0x910, 0x90b, 0x3, 0x2, 0x2, 0x2, 0x910,
0x90c, 0x3, 0x2, 0x2, 0x2, 0x910, 0x90d, 0x3, 0x2, 0x2, 0x2, 0x910,
0x90e, 0x3, 0x2, 0x2, 0x2, 0x910, 0x90f, 0x3, 0x2, 0x2, 0x2, 0x911,
0x22f, 0x3, 0x2, 0x2, 0x2, 0x912, 0x913, 0x9, 0x47, 0x2, 0x2, 0x913,
0x231, 0x3, 0x2, 0x2, 0x2, 0x914, 0x915, 0x9, 0x48, 0x2, 0x2, 0x915,
0x233, 0x3, 0x2, 0x2, 0x2, 0x916, 0x917, 0x9, 0x49, 0x2, 0x2, 0x917,
0x235, 0x3, 0x2, 0x2, 0x2, 0x918, 0x919, 0x5, 0x230, 0x119, 0x2, 0x919,
0x91a, 0x5, 0x2a8, 0x155, 0x2, 0x91a, 0x91b, 0x7, 0x4c, 0x2, 0x2, 0x91b,
0x91c, 0x5, 0x5c, 0x2f, 0x2, 0x91c, 0x237, 0x3, 0x2, 0x2, 0x2, 0x91d,
0x91e, 0x5, 0x230, 0x119, 0x2, 0x91e, 0x91f, 0x5, 0x2a8, 0x155, 0x2,
0x91f, 0x920, 0x7, 0x4c, 0x2, 0x2, 0x920, 0x921, 0x5, 0x4c, 0x27, 0x2,
0x921, 0x239, 0x3, 0x2, 0x2, 0x2, 0x922, 0x923, 0x5, 0x230, 0x119, 0x2,
0x923, 0x924, 0x5, 0x2a8, 0x155, 0x2, 0x924, 0x925, 0x7, 0x4c, 0x2,
0x2, 0x925, 0x926, 0x5, 0x56, 0x2c, 0x2, 0x926, 0x23b, 0x3, 0x2, 0x2,
0x2, 0x927, 0x928, 0x5, 0x230, 0x119, 0x2, 0x928, 0x929, 0x5, 0x2a8,
0x155, 0x2, 0x929, 0x92a, 0x7, 0x4c, 0x2, 0x2, 0x92a, 0x92b, 0x5, 0x58,
0x2d, 0x2, 0x92b, 0x23d, 0x3, 0x2, 0x2, 0x2, 0x92c, 0x92d, 0x5, 0x232,
0x11a, 0x2, 0x92d, 0x92e, 0x5, 0x2a8, 0x155, 0x2, 0x92e, 0x92f, 0x7,
0x4c, 0x2, 0x2, 0x92f, 0x930, 0x5, 0x5c, 0x2f, 0x2, 0x930, 0x23f, 0x3,
0x2, 0x2, 0x2, 0x931, 0x932, 0x5, 0x232, 0x11a, 0x2, 0x932, 0x933, 0x5,
0x2a8, 0x155, 0x2, 0x933, 0x934, 0x7, 0x4c, 0x2, 0x2, 0x934, 0x935,
0x5, 0x4c, 0x27, 0x2, 0x935, 0x241, 0x3, 0x2, 0x2, 0x2, 0x936, 0x937,
0x5, 0x232, 0x11a, 0x2, 0x937, 0x938, 0x5, 0x2a8, 0x155, 0x2, 0x938,
0x939, 0x7, 0x4c, 0x2, 0x2, 0x939, 0x93a, 0x5, 0x56, 0x2c, 0x2, 0x93a,
0x243, 0x3, 0x2, 0x2, 0x2, 0x93b, 0x93c, 0x5, 0x232, 0x11a, 0x2, 0x93c,
0x93d, 0x5, 0x2a8, 0x155, 0x2, 0x93d, 0x93e, 0x7, 0x4c, 0x2, 0x2, 0x93e,
0x93f, 0x5, 0x58, 0x2d, 0x2, 0x93f, 0x245, 0x3, 0x2, 0x2, 0x2, 0x940,
0x941, 0x5, 0x234, 0x11b, 0x2, 0x941, 0x942, 0x5, 0x2a8, 0x155, 0x2,
0x942, 0x943, 0x7, 0x4c, 0x2, 0x2, 0x943, 0x944, 0x5, 0x5c, 0x2f, 0x2,
0x944, 0x247, 0x3, 0x2, 0x2, 0x2, 0x945, 0x946, 0x5, 0x234, 0x11b, 0x2,
0x946, 0x947, 0x5, 0x2a8, 0x155, 0x2, 0x947, 0x948, 0x7, 0x4c, 0x2,
0x2, 0x948, 0x949, 0x5, 0x4c, 0x27, 0x2, 0x949, 0x249, 0x3, 0x2, 0x2,
0x2, 0x94a, 0x94b, 0x5, 0x234, 0x11b, 0x2, 0x94b, 0x94c, 0x5, 0x2a8,
0x155, 0x2, 0x94c, 0x94d, 0x7, 0x4c, 0x2, 0x2, 0x94d, 0x94e, 0x5, 0x56,
0x2c, 0x2, 0x94e, 0x24b, 0x3, 0x2, 0x2, 0x2, 0x94f, 0x950, 0x5, 0x234,
0x11b, 0x2, 0x950, 0x951, 0x5, 0x2a8, 0x155, 0x2, 0x951, 0x952, 0x7,
0x4c, 0x2, 0x2, 0x952, 0x953, 0x5, 0x58, 0x2d, 0x2, 0x953, 0x24d, 0x3,
0x2, 0x2, 0x2, 0x954, 0x961, 0x5, 0x236, 0x11c, 0x2, 0x955, 0x961, 0x5,
0x238, 0x11d, 0x2, 0x956, 0x961, 0x5, 0x23a, 0x11e, 0x2, 0x957, 0x961,
0x5, 0x23c, 0x11f, 0x2, 0x958, 0x961, 0x5, 0x23e, 0x120, 0x2, 0x959,
0x961, 0x5, 0x240, 0x121, 0x2, 0x95a, 0x961, 0x5, 0x242, 0x122, 0x2,
0x95b, 0x961, 0x5, 0x244, 0x123, 0x2, 0x95c, 0x961, 0x5, 0x246, 0x124,
0x2, 0x95d, 0x961, 0x5, 0x248, 0x125, 0x2, 0x95e, 0x961, 0x5, 0x24a,
0x126, 0x2, 0x95f, 0x961, 0x5, 0x24c, 0x127, 0x2, 0x960, 0x954, 0x3,
0x2, 0x2, 0x2, 0x960, 0x955, 0x3, 0x2, 0x2, 0x2, 0x960, 0x956, 0x3,
0x2, 0x2, 0x2, 0x960, 0x957, 0x3, 0x2, 0x2, 0x2, 0x960, 0x958, 0x3,
0x2, 0x2, 0x2, 0x960, 0x959, 0x3, 0x2, 0x2, 0x2, 0x960, 0x95a, 0x3,
0x2, 0x2, 0x2, 0x960, 0x95b, 0x3, 0x2, 0x2, 0x2, 0x960, 0x95c, 0x3,
0x2, 0x2, 0x2, 0x960, 0x95d, 0x3, 0x2, 0x2, 0x2, 0x960, 0x95e, 0x3,
0x2, 0x2, 0x2, 0x960, 0x95f, 0x3, 0x2, 0x2, 0x2, 0x961, 0x24f, 0x3,
0x2, 0x2, 0x2, 0x962, 0x96b, 0x9, 0x4a, 0x2, 0x2, 0x963, 0x96b, 0x9,
0x4b, 0x2, 0x2, 0x964, 0x96b, 0x9, 0x4c, 0x2, 0x2, 0x965, 0x96b, 0x9,
0x4d, 0x2, 0x2, 0x966, 0x96b, 0x9, 0x4e, 0x2, 0x2, 0x967, 0x96b, 0x9,
0x4f, 0x2, 0x2, 0x968, 0x96b, 0x9, 0x50, 0x2, 0x2, 0x969, 0x96b, 0x9,
0x51, 0x2, 0x2, 0x96a, 0x962, 0x3, 0x2, 0x2, 0x2, 0x96a, 0x963, 0x3,
0x2, 0x2, 0x2, 0x96a, 0x964, 0x3, 0x2, 0x2, 0x2, 0x96a, 0x965, 0x3,
0x2, 0x2, 0x2, 0x96a, 0x966, 0x3, 0x2, 0x2, 0x2, 0x96a, 0x967, 0x3,
0x2, 0x2, 0x2, 0x96a, 0x968, 0x3, 0x2, 0x2, 0x2, 0x96a, 0x969, 0x3,
0x2, 0x2, 0x2, 0x96b, 0x251, 0x3, 0x2, 0x2, 0x2, 0x96c, 0x96d, 0x9,
0x52, 0x2, 0x2, 0x96d, 0x253, 0x3, 0x2, 0x2, 0x2, 0x96e, 0x96f, 0x9,
0x53, 0x2, 0x2, 0x96f, 0x255, 0x3, 0x2, 0x2, 0x2, 0x970, 0x971, 0x9,
0x54, 0x2, 0x2, 0x971, 0x257, 0x3, 0x2, 0x2, 0x2, 0x972, 0x973, 0x9,
0x55, 0x2, 0x2, 0x973, 0x259, 0x3, 0x2, 0x2, 0x2, 0x974, 0x975, 0x9,
0x56, 0x2, 0x2, 0x975, 0x25b, 0x3, 0x2, 0x2, 0x2, 0x976, 0x977, 0x9,
0x57, 0x2, 0x2, 0x977, 0x25d, 0x3, 0x2, 0x2, 0x2, 0x978, 0x979, 0x9,
0x58, 0x2, 0x2, 0x979, 0x25f, 0x3, 0x2, 0x2, 0x2, 0x97a, 0x97b, 0x9,
0x59, 0x2, 0x2, 0x97b, 0x261, 0x3, 0x2, 0x2, 0x2, 0x97c, 0x97d, 0x5,
0x252, 0x12a, 0x2, 0x97d, 0x97e, 0x5, 0x2a8, 0x155, 0x2, 0x97e, 0x263,
0x3, 0x2, 0x2, 0x2, 0x97f, 0x980, 0x5, 0x252, 0x12a, 0x2, 0x980, 0x981,
0x5, 0x250, 0x129, 0x2, 0x981, 0x982, 0x5, 0x2a8, 0x155, 0x2, 0x982,
0x265, 0x3, 0x2, 0x2, 0x2, 0x983, 0x984, 0x5, 0x254, 0x12b, 0x2, 0x984,
0x985, 0x5, 0x2a8, 0x155, 0x2, 0x985, 0x267, 0x3, 0x2, 0x2, 0x2, 0x986,
0x987, 0x5, 0x254, 0x12b, 0x2, 0x987, 0x988, 0x5, 0x250, 0x129, 0x2,
0x988, 0x989, 0x5, 0x2a8, 0x155, 0x2, 0x989, 0x269, 0x3, 0x2, 0x2, 0x2,
0x98a, 0x98b, 0x5, 0x252, 0x12a, 0x2, 0x98b, 0x98c, 0x5, 0x36, 0x1c,
0x2, 0x98c, 0x991, 0x3, 0x2, 0x2, 0x2, 0x98d, 0x98e, 0x5, 0x252, 0x12a,
0x2, 0x98e, 0x98f, 0x5, 0x4c, 0x27, 0x2, 0x98f, 0x991, 0x3, 0x2, 0x2,
0x2, 0x990, 0x98a, 0x3, 0x2, 0x2, 0x2, 0x990, 0x98d, 0x3, 0x2, 0x2,
0x2, 0x991, 0x26b, 0x3, 0x2, 0x2, 0x2, 0x992, 0x993, 0x5, 0x252, 0x12a,
0x2, 0x993, 0x994, 0x7, 0x47, 0x2, 0x2, 0x994, 0x995, 0x5, 0x3c, 0x1f,
0x2, 0x995, 0x996, 0x7, 0x48, 0x2, 0x2, 0x996, 0x99b, 0x3, 0x2, 0x2,
0x2, 0x997, 0x998, 0x5, 0x252, 0x12a, 0x2, 0x998, 0x999, 0x5, 0x3c,
0x1f, 0x2, 0x999, 0x99b, 0x3, 0x2, 0x2, 0x2, 0x99a, 0x992, 0x3, 0x2,
0x2, 0x2, 0x99a, 0x997, 0x3, 0x2, 0x2, 0x2, 0x99b, 0x26d, 0x3, 0x2,
0x2, 0x2, 0x99c, 0x99d, 0x5, 0x252, 0x12a, 0x2, 0x99d, 0x99e, 0x7, 0x47,
0x2, 0x2, 0x99e, 0x99f, 0x5, 0x3e, 0x20, 0x2, 0x99f, 0x9a0, 0x7, 0x48,
0x2, 0x2, 0x9a0, 0x9a5, 0x3, 0x2, 0x2, 0x2, 0x9a1, 0x9a2, 0x5, 0x252,
0x12a, 0x2, 0x9a2, 0x9a3, 0x5, 0x3e, 0x20, 0x2, 0x9a3, 0x9a5, 0x3, 0x2,
0x2, 0x2, 0x9a4, 0x99c, 0x3, 0x2, 0x2, 0x2, 0x9a4, 0x9a1, 0x3, 0x2,
0x2, 0x2, 0x9a5, 0x26f, 0x3, 0x2, 0x2, 0x2, 0x9a6, 0x9a7, 0x5, 0x256,
0x12c, 0x2, 0x9a7, 0x9a8, 0x5, 0x2a8, 0x155, 0x2, 0x9a8, 0x271, 0x3,
0x2, 0x2, 0x2, 0x9a9, 0x9aa, 0x5, 0x258, 0x12d, 0x2, 0x9aa, 0x9ab, 0x5,
0x2a8, 0x155, 0x2, 0x9ab, 0x273, 0x3, 0x2, 0x2, 0x2, 0x9ac, 0x9ad, 0x5,
0x258, 0x12d, 0x2, 0x9ad, 0x9ae, 0x5, 0x250, 0x129, 0x2, 0x9ae, 0x9af,
0x5, 0x2a8, 0x155, 0x2, 0x9af, 0x275, 0x3, 0x2, 0x2, 0x2, 0x9b0, 0x9b1,
0x5, 0x25a, 0x12e, 0x2, 0x9b1, 0x277, 0x3, 0x2, 0x2, 0x2, 0x9b2, 0x9b3,
0x5, 0x25a, 0x12e, 0x2, 0x9b3, 0x9b4, 0x5, 0x250, 0x129, 0x2, 0x9b4,
0x279, 0x3, 0x2, 0x2, 0x2, 0x9b5, 0x9b6, 0x5, 0x25c, 0x12f, 0x2, 0x9b6,
0x27b, 0x3, 0x2, 0x2, 0x2, 0x9b7, 0x9b8, 0x5, 0x25e, 0x130, 0x2, 0x9b8,
0x27d, 0x3, 0x2, 0x2, 0x2, 0x9b9, 0x9ba, 0x5, 0x260, 0x131, 0x2, 0x9ba,
0x9bb, 0x5, 0x2a8, 0x155, 0x2, 0x9bb, 0x27f, 0x3, 0x2, 0x2, 0x2, 0x9bc,
0x9cc, 0x5, 0x262, 0x132, 0x2, 0x9bd, 0x9cc, 0x5, 0x264, 0x133, 0x2,
0x9be, 0x9cc, 0x5, 0x266, 0x134, 0x2, 0x9bf, 0x9cc, 0x5, 0x268, 0x135,
0x2, 0x9c0, 0x9cc, 0x5, 0x26a, 0x136, 0x2, 0x9c1, 0x9cc, 0x5, 0x26c,
0x137, 0x2, 0x9c2, 0x9cc, 0x5, 0x26e, 0x138, 0x2, 0x9c3, 0x9cc, 0x5,
0x270, 0x139, 0x2, 0x9c4, 0x9cc, 0x5, 0x272, 0x13a, 0x2, 0x9c5, 0x9cc,
0x5, 0x274, 0x13b, 0x2, 0x9c6, 0x9cc, 0x5, 0x276, 0x13c, 0x2, 0x9c7,
0x9cc, 0x5, 0x278, 0x13d, 0x2, 0x9c8, 0x9cc, 0x5, 0x27a, 0x13e, 0x2,
0x9c9, 0x9cc, 0x5, 0x27c, 0x13f, 0x2, 0x9ca, 0x9cc, 0x5, 0x27e, 0x140,
0x2, 0x9cb, 0x9bc, 0x3, 0x2, 0x2, 0x2, 0x9cb, 0x9bd, 0x3, 0x2, 0x2,
0x2, 0x9cb, 0x9be, 0x3, 0x2, 0x2, 0x2, 0x9cb, 0x9bf, 0x3, 0x2, 0x2,
0x2, 0x9cb, 0x9c0, 0x3, 0x2, 0x2, 0x2, 0x9cb, 0x9c1, 0x3, 0x2, 0x2,
0x2, 0x9cb, 0x9c2, 0x3, 0x2, 0x2, 0x2, 0x9cb, 0x9c3, 0x3, 0x2, 0x2,
0x2, 0x9cb, 0x9c4, 0x3, 0x2, 0x2, 0x2, 0x9cb, 0x9c5, 0x3, 0x2, 0x2,
0x2, 0x9cb, 0x9c6, 0x3, 0x2, 0x2, 0x2, 0x9cb, 0x9c7, 0x3, 0x2, 0x2,
0x2, 0x9cb, 0x9c8, 0x3, 0x2, 0x2, 0x2, 0x9cb, 0x9c9, 0x3, 0x2, 0x2,
0x2, 0x9cb, 0x9ca, 0x3, 0x2, 0x2, 0x2, 0x9cc, 0x281, 0x3, 0x2, 0x2,
0x2, 0x9cd, 0x9ce, 0x9, 0x5a, 0x2, 0x2, 0x9ce, 0x283, 0x3, 0x2, 0x2,
0x2, 0x9cf, 0x9d0, 0x9, 0x5b, 0x2, 0x2, 0x9d0, 0x285, 0x3, 0x2, 0x2,
0x2, 0x9d1, 0x9d2, 0x5, 0x282, 0x142, 0x2, 0x9d2, 0x9d3, 0x5, 0x18,
0xd, 0x2, 0x9d3, 0x9d4, 0x7, 0x4c, 0x2, 0x2, 0x9d4, 0x9d5, 0x5, 0x5a,
0x2e, 0x2, 0x9d5, 0x287, 0x3, 0x2, 0x2, 0x2, 0x9d6, 0x9d7, 0x5, 0x282,
0x142, 0x2, 0x9d7, 0x9d8, 0x5, 0x5c, 0x2f, 0x2, 0x9d8, 0x9d9, 0x7, 0x4c,
0x2, 0x2, 0x9d9, 0x9da, 0x5, 0x54, 0x2b, 0x2, 0x9da, 0x289, 0x3, 0x2,
0x2, 0x2, 0x9db, 0x9dc, 0x9, 0x5c, 0x2, 0x2, 0x9dc, 0x28b, 0x3, 0x2,
0x2, 0x2, 0x9dd, 0x9de, 0x9, 0x5d, 0x2, 0x2, 0x9de, 0x28d, 0x3, 0x2,
0x2, 0x2, 0x9df, 0x9e0, 0x9, 0x5e, 0x2, 0x2, 0x9e0, 0x28f, 0x3, 0x2,
0x2, 0x2, 0x9e1, 0x9e2, 0x9, 0x5f, 0x2, 0x2, 0x9e2, 0x291, 0x3, 0x2,
0x2, 0x2, 0x9e3, 0x9e4, 0x5, 0x284, 0x143, 0x2, 0x9e4, 0x9e5, 0x5, 0x5a,
0x2e, 0x2, 0x9e5, 0x9e6, 0x7, 0x4c, 0x2, 0x2, 0x9e6, 0x9e7, 0x5, 0x18,
0xd, 0x2, 0x9e7, 0x293, 0x3, 0x2, 0x2, 0x2, 0x9e8, 0x9e9, 0x5, 0x284,
0x143, 0x2, 0x9e9, 0x9ea, 0x5, 0x54, 0x2b, 0x2, 0x9ea, 0x9eb, 0x7, 0x4c,
0x2, 0x2, 0x9eb, 0x9ec, 0x5, 0x5c, 0x2f, 0x2, 0x9ec, 0x295, 0x3, 0x2,
0x2, 0x2, 0x9ed, 0x9ee, 0x9, 0x60, 0x2, 0x2, 0x9ee, 0x297, 0x3, 0x2,
0x2, 0x2, 0x9ef, 0x9f0, 0x9, 0x61, 0x2, 0x2, 0x9f0, 0x299, 0x3, 0x2,
0x2, 0x2, 0x9f1, 0x9f2, 0x9, 0x62, 0x2, 0x2, 0x9f2, 0x29b, 0x3, 0x2,
0x2, 0x2, 0x9f3, 0x9f4, 0x9, 0x63, 0x2, 0x2, 0x9f4, 0x29d, 0x3, 0x2,
0x2, 0x2, 0x9f5, 0xa02, 0x5, 0x286, 0x144, 0x2, 0x9f6, 0xa02, 0x5, 0x288,
0x145, 0x2, 0x9f7, 0xa02, 0x5, 0x28a, 0x146, 0x2, 0x9f8, 0xa02, 0x5,
0x28c, 0x147, 0x2, 0x9f9, 0xa02, 0x5, 0x28e, 0x148, 0x2, 0x9fa, 0xa02,
0x5, 0x290, 0x149, 0x2, 0x9fb, 0xa02, 0x5, 0x292, 0x14a, 0x2, 0x9fc,
0xa02, 0x5, 0x294, 0x14b, 0x2, 0x9fd, 0xa02, 0x5, 0x296, 0x14c, 0x2,
0x9fe, 0xa02, 0x5, 0x298, 0x14d, 0x2, 0x9ff, 0xa02, 0x5, 0x29a, 0x14e,
0x2, 0xa00, 0xa02, 0x5, 0x29c, 0x14f, 0x2, 0xa01, 0x9f5, 0x3, 0x2, 0x2,
0x2, 0xa01, 0x9f6, 0x3, 0x2, 0x2, 0x2, 0xa01, 0x9f7, 0x3, 0x2, 0x2,
0x2, 0xa01, 0x9f8, 0x3, 0x2, 0x2, 0x2, 0xa01, 0x9f9, 0x3, 0x2, 0x2,
0x2, 0xa01, 0x9fa, 0x3, 0x2, 0x2, 0x2, 0xa01, 0x9fb, 0x3, 0x2, 0x2,
0x2, 0xa01, 0x9fc, 0x3, 0x2, 0x2, 0x2, 0xa01, 0x9fd, 0x3, 0x2, 0x2,
0x2, 0xa01, 0x9fe, 0x3, 0x2, 0x2, 0x2, 0xa01, 0x9ff, 0x3, 0x2, 0x2,
0x2, 0xa01, 0xa00, 0x3, 0x2, 0x2, 0x2, 0xa02, 0x29f, 0x3, 0x2, 0x2,
0x2, 0xa03, 0xa05, 0x5, 0x2a6, 0x154, 0x2, 0xa04, 0xa06, 0x7, 0xe1,
0x2, 0x2, 0xa05, 0xa04, 0x3, 0x2, 0x2, 0x2, 0xa05, 0xa06, 0x3, 0x2,
0x2, 0x2, 0xa06, 0x2a1, 0x3, 0x2, 0x2, 0x2, 0xa07, 0xa08, 0x9, 0x64,
0x2, 0x2, 0xa08, 0xa09, 0x5, 0x2a8, 0x155, 0x2, 0xa09, 0x2a3, 0x3, 0x2,
0x2, 0x2, 0xa0a, 0xa0b, 0x7, 0xe9, 0x2, 0x2, 0xa0b, 0x2a5, 0x3, 0x2,
0x2, 0x2, 0xa0c, 0xa0d, 0x7, 0xe8, 0x2, 0x2, 0xa0d, 0x2a7, 0x3, 0x2,
0x2, 0x2, 0xa0e, 0xa13, 0x5, 0x2ac, 0x157, 0x2, 0xa0f, 0xa13, 0x5, 0x2aa,
0x156, 0x2, 0xa10, 0xa13, 0x5, 0x2a4, 0x153, 0x2, 0xa11, 0xa13, 0x5,
0x2a6, 0x154, 0x2, 0xa12, 0xa0e, 0x3, 0x2, 0x2, 0x2, 0xa12, 0xa0f, 0x3,
0x2, 0x2, 0x2, 0xa12, 0xa10, 0x3, 0x2, 0x2, 0x2, 0xa12, 0xa11, 0x3,
0x2, 0x2, 0x2, 0xa13, 0x2a9, 0x3, 0x2, 0x2, 0x2, 0xa14, 0xa15, 0x7,
0xe4, 0x2, 0x2, 0xa15, 0x2ab, 0x3, 0x2, 0x2, 0x2, 0xa16, 0xa17, 0x9,
0x65, 0x2, 0x2, 0xa17, 0x2ad, 0x3, 0x2, 0x2, 0x2, 0xa18, 0xa19, 0x7,
0xeb, 0x2, 0x2, 0xa19, 0x2af, 0x3, 0x2, 0x2, 0x2, 0x71, 0x2b3, 0x2b7,
0x2ba, 0x2bd, 0x2c1, 0x2cd, 0x2e2, 0x2e7, 0x2ec, 0x2f9, 0x2fe, 0x303,
0x308, 0x30d, 0x312, 0x317, 0x31c, 0x321, 0x362, 0x3ea, 0x3ee, 0x428,
0x42e, 0x475, 0x49b, 0x4d8, 0x4f6, 0x500, 0x50a, 0x514, 0x51e, 0x528,
0x532, 0x53c, 0x546, 0x550, 0x55a, 0x564, 0x56e, 0x578, 0x582, 0x58c,
0x596, 0x5a0, 0x5aa, 0x5b4, 0x5be, 0x5c8, 0x5d2, 0x5dc, 0x5e6, 0x5f0,
0x5fa, 0x604, 0x60e, 0x618, 0x622, 0x62c, 0x636, 0x640, 0x64a, 0x654,
0x65e, 0x668, 0x672, 0x67c, 0x686, 0x690, 0x69a, 0x6a4, 0x6ae, 0x6b8,
0x6c2, 0x6cc, 0x6d6, 0x6e0, 0x6ea, 0x6f4, 0x6fe, 0x708, 0x712, 0x71c,
0x726, 0x730, 0x73a, 0x744, 0x74e, 0x758, 0x762, 0x76c, 0x776, 0x780,
0x78a, 0x794, 0x79e, 0x7a8, 0x830, 0x851, 0x867, 0x86e, 0x898, 0x910,
0x960, 0x96a, 0x990, 0x99a, 0x9a4, 0x9cb, 0xa01, 0xa05, 0xa12,
};
atn::ATNDeserializer deserializer;
_atn = deserializer.deserialize(_serializedATN);
size_t count = _atn.getNumberOfDecisions();
_decisionToDFA.reserve(count);
for (size_t i = 0; i < count; i++) {
_decisionToDFA.emplace_back(_atn.getDecisionState(i), i);
}
}
Z80Parser::Initializer Z80Parser::_init;
| 35.16819 | 198 | 0.699466 | [
"vector"
] |
95f860ca184b3ffede3cdd82dbda4af3330bb44b | 1,086 | cc | C++ | 1 - Two Sum.cc | Becavalier/leetcode-anwsers | a6071e9a1a5320cc99f6b9b6e9da59516240b391 | [
"MIT"
] | null | null | null | 1 - Two Sum.cc | Becavalier/leetcode-anwsers | a6071e9a1a5320cc99f6b9b6e9da59516240b391 | [
"MIT"
] | null | null | null | 1 - Two Sum.cc | Becavalier/leetcode-anwsers | a6071e9a1a5320cc99f6b9b6e9da59516240b391 | [
"MIT"
] | null | null | null | #include <vector>
#include <unordered_map>
using namespace std;
class Solution {
public:
vector<int> twoSum(vector<int> &nums, int target) {
/**
*
* Dict:
* -----------------
* | 0 | 1 | 2 | 3 | value(indices);
* -----------------
* | | | |
* -----------------
* | 6 | 2 | 3 | 7 | key(real-value);
* -----------------
* ^
* (9) so, searching 3(having 6) from the rest of the values in the map;
*
* Tip: go through from the left to the right with one iteration, -
* using a map to accelerate the querying speed of the complementary number of the given target;
*
*/
unordered_map<int, int> dict;
vector<int> result;
const int size = nums.size();
for (int i = 0; i < size; i++) {
dict[nums[i]] = i;
}
for (int j = 0; j < size; j++) {
const int num = nums[j];
auto search = dict.find(target - num);
if (search != dict.end() && j != search->second) {
result.assign({j, search->second});
}
}
return result;
}
};
| 25.255814 | 100 | 0.480663 | [
"vector"
] |
95fa411bf81ebea148c8a528c9247ad121e65384 | 3,192 | cpp | C++ | stats-test.cpp | clean-code-craft-tcq-2/sense-cpp-SandeshSubramanya | fcbba2a4196e114449817559ed709e092731eaa0 | [
"MIT"
] | null | null | null | stats-test.cpp | clean-code-craft-tcq-2/sense-cpp-SandeshSubramanya | fcbba2a4196e114449817559ed709e092731eaa0 | [
"MIT"
] | null | null | null | stats-test.cpp | clean-code-craft-tcq-2/sense-cpp-SandeshSubramanya | fcbba2a4196e114449817559ed709e092731eaa0 | [
"MIT"
] | null | null | null | #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include "catch.hpp"
#include "stats.h"
#include <cmath>
#include <algorithm>
#include <vector>
TEST_CASE("reports average, minimum and maximum") {
auto computedStats = Statistics::ComputeStatistics({1.5, 8.9, 3.2, 4.5});
float epsilon = (float)0.001;
REQUIRE(std::abs(computedStats.average - 4.525) < (double)epsilon);
REQUIRE(std::abs(computedStats.max - 8.9) < (double)epsilon);
REQUIRE(std::abs(computedStats.min - 1.5) < (double)epsilon);
}
TEST_CASE("average is NaN for empty array") {
auto computedStats = Statistics::ComputeStatistics({});
//All fields of computedStats (average, max, min) must be
//NAN (not-a-number), as defined in math.h
REQUIRE(std::isnan(computedStats.average) == true);
REQUIRE(std::isnan(computedStats.max) == true);
REQUIRE(std::isnan(computedStats.min) == true);
}
TEST_CASE("raises alerts when max is greater than threshold") {
class IAlerter //abstract class
{
// do nothing;
public:
virtual void vSetAlert(bool bNewVal) = 0;
};
class EmailAlert:public IAlerter
{
public:
EmailAlert()
{
emailSent = false; // default
}
void vSetAlert(bool bNewVal)
{
emailSent = bNewVal;
}
bool emailSent; // set to true, if maximum value crosses the threshold.
};
class LEDAlert :public IAlerter
{
public:
LEDAlert()
{
ledGlows = false;
}
void vSetAlert(bool bNewVal)
{
ledGlows = bNewVal;
}
bool ledGlows; // set to true, if maximum value crosses the threshold.
};
class StatsAlerter
{
public:
StatsAlerter(float maxThreshold, const std::vector<IAlerter*> vAlerters)
{
m_maxThreshold = maxThreshold;
m_alerters = vAlerters;
}
void checkAndAlert(const std::vector<double>& rfVectorValues)
{
// get the maximum values from the list.
if (!rfVectorValues.empty())
{
double maximum_value = *std::max_element(rfVectorValues.begin(), rfVectorValues.end());
if (maximum_value > (double)m_maxThreshold)
{
// threshold crossed, set the alerts
if (!m_alerters.empty())
{
for (int index = 0; index < (int)m_alerters.size(); ++index)
{
m_alerters[index]->vSetAlert(true);
}
}
}
}
}
private:
float m_maxThreshold;
std::vector<IAlerter*> m_alerters;
};
EmailAlert emailAlert;
LEDAlert ledAlert;
std::vector<IAlerter*> alerters = {&emailAlert, &ledAlert};
const float maxThreshold = (float)10.2;
StatsAlerter statsAlerter(maxThreshold, alerters);
statsAlerter.checkAndAlert({99.8, 34.2, 4.5, 6.7});
REQUIRE(emailAlert.emailSent == true);
REQUIRE(ledAlert.ledGlows == true);
}
| 28.247788 | 102 | 0.572368 | [
"vector"
] |
95fc8ed7ba3c1ab279aad3543923ca0cdd9342a3 | 45,955 | cpp | C++ | dwm.cpp | castillo055/castle-dwm | 7293c37e50858fbd6c5b031fffbfa8c5207251c5 | [
"MIT"
] | 1 | 2021-11-21T10:22:22.000Z | 2021-11-21T10:22:22.000Z | dwm.cpp | castillo055/castle-dwm | 7293c37e50858fbd6c5b031fffbfa8c5207251c5 | [
"MIT"
] | null | null | null | dwm.cpp | castillo055/castle-dwm | 7293c37e50858fbd6c5b031fffbfa8c5207251c5 | [
"MIT"
] | null | null | null | /* See LICENSE file for copyright and license details.
*
* dynamic window manager is designed like any other X client as well. It is
* driven through handling X events. In contrast to other X clients, a window
* manager selects for SubstructureRedirectMask on the root window, to receive
* events about window (dis-)appearance. Only one X connection at a time is
* allowed to select for this event mask.
*
* The event handlers of dwm are organized in an array which is accessed
* whenever a new event has been fetched. This allows event dispatching
* in O(1) time.
*
* Each child of the root window is called a client, except windows which have
* set the override_redirect flag. Clients are organized in a linked client
* list on each monitor, the focus history is remembered through a stack list
* on each monitor. Each client contains a bit array to indicate the TAGS of a
* client.
*
* Keys and tagging rules are organized as arrays and defined in config.h.
*
* To understand everything else, start reading main().
*/
#include <fcntl.h>
#include <clocale>
#include <unistd.h>
#include <sys/select.h>
#include <sys/wait.h>
#include <X11/cursorfont.h>
#include <X11/keysym.h>
#include <X11/Xproto.h>
#include <X11/Xutil.h>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <program_shell.h>
#ifdef XINERAMA
#include <X11/extensions/Xinerama.h>
#endif /* XINERAMA */
#include "castle-dwm.h"
#include "util.h"
/* variables */
char stext[8096];
static int screen;
int sw, sh; /* X display screen geometry width, height */
int bh, blw = 0; /* bar geometry */
int lrpad; /* sum of left and right padding for text */
static int (*xerrorxlib)(Display *, XErrorEvent *);
unsigned int numlockmask = 0;
Display *dpy;
Atom wmatom[WMLast], netatom[NetLast];
static int running = 1;
static Cur *cursor[CurLast];
Clr **scheme;
Drw *drw;
Monitor *mons, *selmon;
Window root, wmcheckwin;
/*static void (*handler[LASTEvent]) (XEvent *) = {
[ButtonPress] = buttonpress,
[ClientMessage] = clientmessage,
[ConfigureRequest] = configurerequest,
[ConfigureNotify] = configurenotify,
[DestroyNotify] = destroynotify,
[EnterNotify] = enternotify,
[Expose] = expose,
[FocusIn] = focusin,
[KeyPress] = keypress,
[MappingNotify] = mappingnotify,
[MapRequest] = maprequest,
[MotionNotify] = motionnotify,
[PropertyNotify] = propertynotify,
[UnmapNotify] = unmapnotify
};*/
static void (*handler[LASTEvent])(XEvent *) = {
nullptr,nullptr,
keypress,
nullptr,
buttonpress,
nullptr,
motionnotify,
enternotify,
nullptr,
focusin,
nullptr,nullptr,
expose,
nullptr,nullptr,nullptr,nullptr,
destroynotify,
unmapnotify,
nullptr,
maprequest,
nullptr,
configurenotify,
configurerequest,
nullptr,nullptr,nullptr,nullptr,
propertynotify,
nullptr,nullptr,nullptr,nullptr,
clientmessage,
mappingnotify
};
/* compile-time check if all TAGS fit into an unsigned int bit array. */
struct NumTags {
char limitexceeded[LENGTH(TAGS) > 31 ? -1 : 1];
};
/* function implementations */
//===== Main functions =====
void arrange(Monitor *m) {
if (m)
m->stack->showhide();
else
for (m = mons; m; m = m->next)
m->stack->showhide();
if (m) {
m->arrangemon();
m->restack();
} else
for (m = mons; m; m = m->next)
m->arrangemon();
}
void buttonpress(XEvent *e) {
unsigned int i, x, click;
Arg arg = {0};
Client *c;
Monitor *m;
XButtonPressedEvent *ev = &e->xbutton;
click = ClkRootWin;
/* focus monitor if necessary */
if ((m = wintomon(ev->window)) && m != selmon) {
selmon->sel->unfocus(1);
selmon = m;
focusNULL();
}
if (ev->window == selmon->barwin) {
i = x = 0;
do
x += TEXTW(TAGS[i]);
while (ev->x >= x && ++i < LENGTH(TAGS));
if (i < LENGTH(TAGS)) {
click = ClkTagBar;
arg.ui = 1 << i;
} else if (ev->x < x + blw)
click = ClkLtSymbol;
else if (ev->x > selmon->ww - TEXTW(stext))
click = ClkStatusText;
else
click = ClkWinTitle;
} else if ((c = wintoclient(ev->window))) {
c->focus();
selmon->restack();
XAllowEvents(dpy, ReplayPointer, CurrentTime);
click = ClkClientWin;
}
for (i = 0; i < LENGTH(buttons); i++)
if (click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button
&& CLEANMASK(buttons[i].mask) == CLEANMASK(ev->state))
buttons[i].func(click == ClkTagBar && buttons[i].arg.i == 0 ? &arg : &buttons[i].arg);
}
void checkotherwm(void) {
xerrorxlib = XSetErrorHandler(xerrorstart);
/* this causes an error if some other window manager is running */
XSelectInput(dpy, DefaultRootWindow(dpy), SubstructureRedirectMask);
XSync(dpy, False);
XSetErrorHandler(xerror);
XSync(dpy, False);
}
void cleanup(void) {
Arg a = {.ui = (unsigned int) ~0};
Layout foo = {"", NULL};
Monitor *m;
size_t i;
view(&a);
selmon->lt[selmon->sellt] = &foo;
for (m = mons; m; m = m->next)
while (m->stack)
m->stack->unmanage(0);
XUngrabKey(dpy, AnyKey, AnyModifier, root);
while (mons)
cleanupmon(mons);
for (i = 0; i < CurLast; i++)
drw_cur_free(drw, cursor[i]);
for (i = 0; i < LENGTH(colors) + 1; i++)
free(scheme[i]);
XDestroyWindow(dpy, wmcheckwin);
drw_free(drw);
XSync(dpy, False);
XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
XDeleteProperty(dpy, root, netatom[NetActiveWindow]);
}
void cleanupmon(Monitor *mon) {
Monitor *m;
if (mon == mons)
mons = mons->next;
else {
for (m = mons; m && m->next != mon; m = m->next);
m->next = mon->next;
}
XUnmapWindow(dpy, mon->barwin);
XDestroyWindow(dpy, mon->barwin);
free(mon);
}
void clientmessage(XEvent *e) {
XClientMessageEvent *cme = &e->xclient;
Client *c = wintoclient(cme->window);
if (!c)
return;
if (cme->message_type == netatom[NetWMState]) {
if (cme->data.l[1] == netatom[NetWMFullscreen]
|| cme->data.l[2] == netatom[NetWMFullscreen])
c->setfullscreen((cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */
|| (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */ && !c->isfullscreen)));
} else if (cme->message_type == netatom[NetActiveWindow]) {
if (c != selmon->sel && !c->isurgent)
c->seturgent(1);
}
}
void configurenotify(XEvent *e) {
Monitor *m;
Client *c;
XConfigureEvent *ev = &e->xconfigure;
int dirty;
/* TODO: updategeom handling sucks, needs to be simplified */
if (ev->window == root) {
dirty = (sw != ev->width || sh != ev->height);
sw = ev->width;
sh = ev->height;
if (updategeom() || dirty) {
drw_resize(drw, sw, bh);
updatebars();
for (m = mons; m; m = m->next) {
for (c = m->clients; c; c = c->next)
if (c->isfullscreen)
c->resizeclient(m->mx, m->my, m->mw, m->mh);
XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh);
}
focusNULL();
arrange(nullptr);
}
}
}
void configurerequest(XEvent *e) {
Client *c;
Monitor *m;
XConfigureRequestEvent *ev = &e->xconfigurerequest;
XWindowChanges wc;
if ((c = wintoclient(ev->window))) {
if (ev->value_mask & CWBorderWidth)
c->bw = ev->border_width;
else if (c->isfloating || !selmon->lt[selmon->sellt]->arrange_) {
m = c->mon;
if (ev->value_mask & CWX) {
c->oldx = c->x;
c->x = m->mx + ev->x;
}
if (ev->value_mask & CWY) {
c->oldy = c->y;
c->y = m->my + ev->y;
}
if (ev->value_mask & CWWidth) {
c->oldw = c->w;
c->w = ev->width;
}
if (ev->value_mask & CWHeight) {
c->oldh = c->h;
c->h = ev->height;
}
if ((c->x + c->w) > m->mx + m->mw && c->isfloating)
c->x = m->mx + (m->mw / 2 - WIDTH(c) / 2); /* center in x direction */
if ((c->y + c->h) > m->my + m->mh && c->isfloating)
c->y = m->my + (m->mh / 2 - HEIGHT(c) / 2); /* center in y direction */
if ((ev->value_mask & (CWX | CWY)) && !(ev->value_mask & (CWWidth | CWHeight)))
c->configure_();
if (ISVISIBLE(c))
XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h);
} else
c->configure_();
} else {
wc.x = ev->x;
wc.y = ev->y;
wc.width = ev->width;
wc.height = ev->height;
wc.border_width = ev->border_width;
wc.sibling = ev->above;
wc.stack_mode = ev->detail;
XConfigureWindow(dpy, ev->window, ev->value_mask, &wc);
}
XSync(dpy, False);
}
Monitor *createmon() {
Monitor *m;
unsigned int i;
m = (Monitor *) ecalloc(1, sizeof(Monitor));
m->tagset[0] = m->tagset[1] = 1;
m->mfact = mfact;
m->nmaster = nmaster;
m->showbar = showbar;
m->topbar = topbar;
m->gappx = gappx;
m->lt[0] = &layouts[0];
m->lt[1] = &layouts[1 % LENGTH(layouts)];
strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol);
m->pertag = (Pertag *) ecalloc(1, sizeof(Pertag));
m->pertag->curtag = m->pertag->prevtag = 1;
for (i = 0; i <= LENGTH(TAGS); i++) {
m->pertag->nmasters[i] = m->nmaster;
m->pertag->mfacts[i] = m->mfact;
m->pertag->ltidxs[i][0] = m->lt[0];
m->pertag->ltidxs[i][1] = m->lt[1];
m->pertag->sellts[i] = m->sellt;
m->pertag->showbars[i] = m->showbar;
}
return m;
}
void destroynotify(XEvent *e) {
Client *c;
XDestroyWindowEvent *ev = &e->xdestroywindow;
if ((c = wintoclient(ev->window)))
c->unmanage(1);
}
Monitor* dirtomon(int dir) {
Monitor *m = NULL;
if (dir > 0) {
if (!(m = selmon->next))
m = mons;
} else if (selmon == mons)
for (m = mons; m->next; m = m->next);
else
for (m = mons; m->next != selmon; m = m->next);
return m;
}
void drawbars(void) {
Monitor *m;
for (m = mons; m; m = m->next)
m->drawbar();
}
void enternotify(XEvent *e) {
Client *c;
Monitor *m;
XCrossingEvent *ev = &e->xcrossing;
if ((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root)
return;
c = wintoclient(ev->window);
m = c ? c->mon : wintomon(ev->window);
if (m != selmon) {
selmon->sel->unfocus(1);
selmon = m;
} else if (!c || c == selmon->sel)
return;
c->focus();
}
Bool evpredicate() {
return True;
}
void expose(XEvent *e) {
Monitor *m;
XExposeEvent *ev = &e->xexpose;
if (ev->count == 0 && (m = wintomon(ev->window)))
m->drawbar();
}
void focusNULL() {
Client *c;
for (c = selmon->stack; c && !ISVISIBLE(c); c = c->snext);
if (selmon->sel && selmon->sel != c)
selmon->sel->unfocus(0);
if (c) {
if (c->mon != selmon)
selmon = c->mon;
if (c->isurgent)
c->seturgent(0);
c->detachstack();
c->attachstack();
c->grabbuttons(1);
XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel);
c->setfocus();
} else {
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
XDeleteProperty(dpy, root, netatom[NetActiveWindow]);
}
selmon->sel = c;
drawbars();
}
/* there are some broken focus acquiring clients needing extra handling */
void focusin(XEvent *e) {
XFocusChangeEvent *ev = &e->xfocus;
if (selmon->sel && ev->window != selmon->sel->win)
selmon->sel->setfocus();
}
void focusmon(const Arg *arg) {
Monitor *m;
if (!mons->next)
return;
if ((m = dirtomon(arg->i)) == selmon)
return;
selmon->sel->unfocus(0);
selmon = m;
focusNULL();
}
void focusstack(const Arg *arg) {
Client *c = NULL, *i;
if (!selmon->sel)
return;
if (arg->i > 0) {
for (c = selmon->sel->next; c && !ISVISIBLE(c); c = c->next);
if (!c)
for (c = selmon->clients; c && !ISVISIBLE(c); c = c->next);
} else {
for (i = selmon->clients; i != selmon->sel; i = i->next)
if (ISVISIBLE(i))
c = i;
if (!c)
for (; i; i = i->next)
if (ISVISIBLE(i))
c = i;
}
if (c) {
c->focus();
selmon->restack();
}
}
int getrootptr(int *x, int *y) {
int di;
unsigned int dui;
Window dummy;
return XQueryPointer(dpy, root, &dummy, &dummy, x, y, &di, &di, &dui);
}
long getstate(Window w) {
int format;
long result = -1;
unsigned char *p = NULL;
unsigned long n, extra;
Atom real;
if (XGetWindowProperty(dpy, w, wmatom[WMState], 0L, 2L, False, wmatom[WMState],
&real, &format, &n, &extra, (unsigned char **) &p) != Success)
return -1;
if (n != 0)
result = *p;
XFree(p);
return result;
}
int gettextprop(Window w, Atom atom, char *text, unsigned int size) {
char **list = NULL;
int n;
XTextProperty name;
if (!text || size == 0)
return 0;
text[0] = '\0';
if (!XGetTextProperty(dpy, w, &name, atom) || !name.nitems)
return 0;
if (name.encoding == XA_STRING)
strncpy(text, (char *) name.value, size - 1);
else {
if (XmbTextPropertyToTextList(dpy, &name, &list, &n) >= Success && n > 0 && *list) {
strncpy(text, *list, size - 1);
XFreeStringList(list);
}
}
text[size - 1] = '\0';
XFree(name.value);
return 1;
}
void grabkeys(void) {
updatenumlockmask();
{
unsigned int i, j;
unsigned int modifiers[] = {0, LockMask, numlockmask, numlockmask | LockMask};
KeyCode code;
XUngrabKey(dpy, AnyKey, AnyModifier, root);
for (i = 0; i < LENGTH(keys); i++)
if ((code = XKeysymToKeycode(dpy, keys[i].keysym)))
for (j = 0; j < LENGTH(modifiers); j++)
XGrabKey(dpy, code, keys[i].mod | modifiers[j], root,
True, GrabModeAsync, GrabModeAsync);
}
}
void incnmaster(const Arg *arg) {
unsigned int i;
selmon->nmaster = MAX(selmon->nmaster + arg->i, 0);
for (i = 0; i <= LENGTH(TAGS); ++i)
if (selmon->tagset[selmon->seltags] & 1 << i)
selmon->pertag->nmasters[(i + 1) % (LENGTH(TAGS) + 1)] = selmon->nmaster;
arrange(selmon);
}
#ifdef XINERAMA
static int
isuniquegeom(XineramaScreenInfo *unique, size_t n, XineramaScreenInfo *info)
{
while (n--)
if (unique[n].x_org == info->x_org && unique[n].y_org == info->y_org
&& unique[n].width == info->width && unique[n].height == info->height)
return 0;
return 1;
}
#endif /* XINERAMA */
void keypress(XEvent *e) {
unsigned int i;
KeySym keysym;
XKeyEvent *ev;
ev = &e->xkey;
keysym = XKeycodeToKeysym(dpy, (KeyCode) ev->keycode, 0);
for (i = 0; i < LENGTH(keys); i++)
if (keysym == keys[i].keysym
&& CLEANMASK(keys[i].mod) == CLEANMASK(ev->state)
&& keys[i].func)
keys[i].func(&(keys[i].arg));
}
void killclient(const Arg *arg) {
if (!selmon->sel)
return;
if (!sendevent(selmon->sel, wmatom[WMDelete])) {
XGrabServer(dpy);
XSetErrorHandler(xerrordummy);
XSetCloseDownMode(dpy, DestroyAll);
XKillClient(dpy, selmon->sel->win);
XSync(dpy, False);
XSetErrorHandler(xerror);
XUngrabServer(dpy);
}
}
void manage(Window w, XWindowAttributes *wa, int urgent) {
Client *c, *t = NULL;
Window trans = None;
XWindowChanges wc;
c = (Client *) ecalloc(1, sizeof(Client));
c->win = w;
/* geometry */
c->x = c->oldx = wa->x;
c->y = c->oldy = wa->y;
c->w = c->oldw = wa->width;
c->h = c->oldh = wa->height;
c->oldbw = wa->border_width;
c->updatetitle();
if (XGetTransientForHint(dpy, w, &trans) && (t = wintoclient(trans))) {
c->mon = t->mon;
c->tags = t->tags;
} else {
c->mon = selmon;
c->applyrules();
}
if (c->x + WIDTH(c) > c->mon->mx + c->mon->mw)
c->x = c->mon->mx + c->mon->mw - WIDTH(c);
if (c->y + HEIGHT(c) > c->mon->my + c->mon->mh)
c->y = c->mon->my + c->mon->mh - HEIGHT(c);
c->x = MAX(c->x, c->mon->mx);
/* only fix client y-offset, if the client center might cover the bar */
c->y = MAX(c->y, ((c->mon->by == c->mon->my) && (c->x + (c->w / 2) >= c->mon->wx)
&& (c->x + (c->w / 2) < c->mon->wx + c->mon->ww)) ? bh : c->mon->my);
c->bw = borderpx;
wc.border_width = c->bw;
if (c->x == selmon->wx) c->x += (c->mon->ww - WIDTH(c)) / 2 - c->bw;
if (c->y == selmon->wy) c->y += (c->mon->wh - HEIGHT(c)) / 2 - c->bw;
XConfigureWindow(dpy, w, CWBorderWidth, &wc);
XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel);
c->configure_(); /* propagates border_width, if size doesn't change */
c->updatewindowtype();
c->updatesizehints();
c->updatewmhints();
XSelectInput(dpy, w, EnterWindowMask | FocusChangeMask | PropertyChangeMask | StructureNotifyMask);
c->grabbuttons(0);
if (!c->isfloating)
c->isfloating = c->oldstate = trans != None || c->isfixed;
if (c->isfloating)
XRaiseWindow(dpy, c->win);
c->attach();
c->attachstack();
XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
(unsigned char *) &(c->win), 1);
XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */
setclientstate(c, NormalState);
if (c->mon == selmon)
selmon->sel->unfocus(0);
c->mon->sel = c;
arrange(c->mon);
XMapWindow(dpy, c->win);
focusNULL();
c->seturgent(urgent);
}
void mappingnotify(XEvent *e) {
XMappingEvent *ev = &e->xmapping;
XRefreshKeyboardMapping(ev);
if (ev->request == MappingKeyboard)
grabkeys();
}
void maprequest(XEvent *e) {
static XWindowAttributes wa;
XMapRequestEvent *ev = &e->xmaprequest;
if (!XGetWindowAttributes(dpy, ev->window, &wa))
return;
if (wa.override_redirect)
return;
if (!wintoclient(ev->window))
manage(ev->window, &wa, 1);
}
void monocle(Monitor *m) { m->monocle(); }
void motionnotify(XEvent *e) {
static Monitor *mon = nullptr;
Monitor *m;
XMotionEvent *ev = &e->xmotion;
if (ev->window != root)
return;
if ((m = recttomon(ev->x_root, ev->y_root, 1, 1)) != mon && mon) {
selmon->sel->unfocus(1);
selmon = m;
focusNULL();
}
mon = m;
}
void movemouse(const Arg *arg) {
int x, y, ocx, ocy, nx, ny;
Client *c;
Monitor *m;
XEvent ev;
Time lasttime = 0;
if (!(c = selmon->sel))
return;
if (c->isfullscreen) /* no support moving fullscreen windows by mouse */
return;
selmon->restack();
ocx = c->x;
ocy = c->y;
if (XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
None, cursor[CurMove]->cursor, CurrentTime) != GrabSuccess)
return;
if (!getrootptr(&x, &y))
return;
do {
XMaskEvent(dpy, MOUSEMASK | ExposureMask | SubstructureRedirectMask, &ev);
switch (ev.type) {
case ConfigureRequest:
case Expose:
case MapRequest:
handler[ev.type](&ev);
break;
case MotionNotify:
if ((ev.xmotion.time - lasttime) <= (1000 / 60))
continue;
lasttime = ev.xmotion.time;
nx = ocx + (ev.xmotion.x - x);
ny = ocy + (ev.xmotion.y - y);
if (abs(selmon->wx - nx) < snap)
nx = selmon->wx;
else if (abs((selmon->wx + selmon->ww) - (nx + WIDTH(c))) < snap)
nx = selmon->wx + selmon->ww - WIDTH(c);
if (abs(selmon->wy - ny) < snap)
ny = selmon->wy;
else if (abs((selmon->wy + selmon->wh) - (ny + HEIGHT(c))) < snap)
ny = selmon->wy + selmon->wh - HEIGHT(c);
if (!c->isfloating && selmon->lt[selmon->sellt]->arrange_
&& (abs(nx - c->x) > snap || abs(ny - c->y) > snap))
togglefloating(NULL);
if (!selmon->lt[selmon->sellt]->arrange_ || c->isfloating)
c->resize(nx, ny, c->w, c->h, 1);
break;
}
} while (ev.type != ButtonRelease);
XUngrabPointer(dpy, CurrentTime);
if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
sendmon(c, m);
selmon = m;
focusNULL();
}
}
void propertynotify(XEvent *e) {
Client *c;
Window trans;
XPropertyEvent *ev = &e->xproperty;
if ((ev->window == root) && (ev->atom == XA_WM_NAME))
updatestatus();
else if (ev->state == PropertyDelete)
return; /* ignore */
else if ((c = wintoclient(ev->window))) {
switch (ev->atom) {
default:
break;
case XA_WM_TRANSIENT_FOR:
if (!c->ignoretransient && !c->isfloating && (XGetTransientForHint(dpy, c->win, &trans)) &&
(c->isfloating = (wintoclient(trans)) != NULL))
arrange(c->mon);
break;
case XA_WM_NORMAL_HINTS:
c->updatesizehints();
break;
case XA_WM_HINTS:
c->updatewmhints();
drawbars();
break;
}
if (ev->atom == XA_WM_NAME || ev->atom == netatom[NetWMName]) {
c->updatetitle();
if (c == c->mon->sel)
c->mon->drawbar();
}
if (ev->atom == netatom[NetWMWindowType])
c->updatewindowtype();
}
}
void quit(const Arg *arg) {
running = 0;
}
Monitor* recttomon(int x, int y, int w, int h) {
Monitor *m, *r = selmon;
int a, area = 0;
for (m = mons; m; m = m->next)
if ((a = INTERSECT(x, y, w, h, m)) > area) {
area = a;
r = m;
}
return r;
}
void resizemouse(const Arg *arg) {
int ocx, ocy, nw, nh;
Client *c;
Monitor *m;
XEvent ev;
Time lasttime = 0;
if (!(c = selmon->sel))
return;
if (c->isfullscreen) /* no support resizing fullscreen windows by mouse */
return;
selmon->restack();
ocx = c->x;
ocy = c->y;
if (XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
None, cursor[CurResize]->cursor, CurrentTime) != GrabSuccess)
return;
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
do {
XMaskEvent(dpy, MOUSEMASK | ExposureMask | SubstructureRedirectMask, &ev);
switch (ev.type) {
case ConfigureRequest:
case Expose:
case MapRequest:
handler[ev.type](&ev);
break;
case MotionNotify:
if ((ev.xmotion.time - lasttime) <= (1000 / 60))
continue;
lasttime = ev.xmotion.time;
nw = MAX(ev.xmotion.x - ocx - 2 * c->bw + 1, 1);
nh = MAX(ev.xmotion.y - ocy - 2 * c->bw + 1, 1);
if (c->mon->wx + nw >= selmon->wx && c->mon->wx + nw <= selmon->wx + selmon->ww
&& c->mon->wy + nh >= selmon->wy && c->mon->wy + nh <= selmon->wy + selmon->wh) {
if (!c->isfloating && selmon->lt[selmon->sellt]->arrange_
&& (abs(nw - c->w) > snap || abs(nh - c->h) > snap))
togglefloating(NULL);
}
if (!selmon->lt[selmon->sellt]->arrange_ || c->isfloating)
c->resize(c->x, c->y, nw, nh, 1);
break;
}
} while (ev.type != ButtonRelease);
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
XUngrabPointer(dpy, CurrentTime);
while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));
if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
sendmon(c, m);
selmon = m;
focusNULL();
}
}
void run(void) {
XEvent ev;
/* main event loop */
XSync(dpy, False);
while (running) {
XNextEvent(dpy, &ev);
if (handler[ev.type])
handler[ev.type](&ev);
} /* call handler */
}
void scan(void) {
unsigned int i, num;
Window d1, d2, *wins = NULL;
XWindowAttributes wa;
if (XQueryTree(dpy, root, &d1, &d2, &wins, &num)) {
for (i = 0; i < num; i++) {
if (!XGetWindowAttributes(dpy, wins[i], &wa)
|| wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1))
continue;
if (wa.map_state == IsViewable || getstate(wins[i]) == IconicState)
manage(wins[i], &wa, 0);
}
for (i = 0; i < num; i++) { /* now the transients */
if (!XGetWindowAttributes(dpy, wins[i], &wa))
continue;
if (XGetTransientForHint(dpy, wins[i], &d1)
&& (wa.map_state == IsViewable || getstate(wins[i]) == IconicState))
manage(wins[i], &wa, 0);
}
if (wins)
XFree(wins);
}
}
void sendmon(Client *c, Monitor *m) {
if (c->mon == m)
return;
c->unfocus(1);
c->detach();
c->detachstack();
c->mon = m;
c->tags = m->tagset[m->seltags]; /* assign TAGS of target monitor */
c->attach();
c->attachstack();
focusNULL();
arrange(NULL);
}
void setclientstate(Client *c, long state) {
long data[] = {state, None};
XChangeProperty(dpy, c->win, wmatom[WMState], wmatom[WMState], 32,
PropModeReplace, (unsigned char *) data, 2);
}
int sendevent(Client *c, Atom proto) {
int n;
Atom *protocols;
int exists = 0;
XEvent ev;
if (XGetWMProtocols(dpy, c->win, &protocols, &n)) {
while (!exists && n--)
exists = protocols[n] == proto;
XFree(protocols);
}
if (exists) {
ev.type = ClientMessage;
ev.xclient.window = c->win;
ev.xclient.message_type = wmatom[WMProtocols];
ev.xclient.format = 32;
ev.xclient.data.l[0] = proto;
ev.xclient.data.l[1] = CurrentTime;
XSendEvent(dpy, c->win, False, NoEventMask, &ev);
}
return exists;
}
//void
//setgaps(const Arg *arg)
//{
// if ((arg->i == 0) || (selmon->gappx + arg->i < 0))
// selmon->gappx = 0;
// else
// selmon->gappx += arg->i;
// arrange(selmon);
//}
void setlayout(const Arg *arg) {
unsigned int i;
if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
selmon->sellt ^= 1;
if (arg && arg->v)
selmon->lt[selmon->sellt] = (Layout *) arg->v;
strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
for (i = 0; i <= LENGTH(TAGS); ++i)
if (selmon->tagset[selmon->seltags] & 1 << i) {
selmon->pertag->ltidxs[(i + 1) % (LENGTH(TAGS) + 1)][selmon->sellt] = selmon->lt[selmon->sellt];
selmon->pertag->sellts[(i + 1) % (LENGTH(TAGS) + 1)] = selmon->sellt;
}
if (selmon->sel)
arrange(selmon);
else
selmon->drawbar();
}
/* arg > 1.0 will set mfact absolutely */
void setmfact(const Arg *arg) {
float f;
unsigned int i;
if (!arg || !selmon->lt[selmon->sellt]->arrange_)
return;
f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
if (arg->f == 0.0)
f = mfact;
if (f < 0.05 || f > 0.95)
return;
selmon->mfact = f;
for (i = 0; i <= LENGTH(TAGS); ++i)
if (selmon->tagset[selmon->seltags] & 1 << i)
selmon->pertag->mfacts[(i + 1) % (LENGTH(TAGS) + 1)] = f;
arrange(selmon);
}
void settheme() {
/* init appearance */
scheme[LENGTH(colors)] = drw_scm_create(drw, colors[0], 3);
for (int i = 0; i < LENGTH(colors); i++)
scheme[i] = drw_scm_create(drw, colors[i], 3);
}
void setup() {
XSetWindowAttributes wa;
Atom utf8string;
/* clean up any zombies immediately */
sigchld(0);
/* init screen */
screen = DefaultScreen(dpy);
sw = DisplayWidth(dpy, screen);
sh = DisplayHeight(dpy, screen);
root = RootWindow(dpy, screen);
drw = drw_create(dpy, screen, root, sw, sh);
if (!drw_fontset_create(drw, fonts, LENGTH(fonts)))
die("no fonts could be loaded.");
lrpad = drw->fonts->h;
bh = drw->fonts->h + 10;
updategeom();
/* init atoms */
utf8string = XInternAtom(dpy, "UTF8_STRING", False);
wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
wmatom[WMState] = XInternAtom(dpy, "WM_STATE", False);
wmatom[WMTakeFocus] = XInternAtom(dpy, "WM_TAKE_FOCUS", False);
netatom[NetActiveWindow] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False);
netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False);
netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False);
netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False);
netatom[NetWMCheck] = XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", False);
netatom[NetWMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False);
netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False);
netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
/* init cursors */
cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
cursor[CurResize] = drw_cur_create(drw, XC_sizing);
cursor[CurMove] = drw_cur_create(drw, XC_fleur);
settheme();
/* init bars */
updatebars();
updatestatus();
/* supporting window for NetWMCheck */
wmcheckwin = XCreateSimpleWindow(dpy, root, 0, 0, 1, 1, 0, 0, 0);
XChangeProperty(dpy, wmcheckwin, netatom[NetWMCheck], XA_WINDOW, 32,
PropModeReplace, (unsigned char *) &wmcheckwin, 1);
XChangeProperty(dpy, wmcheckwin, netatom[NetWMName], utf8string, 8,
PropModeReplace, (unsigned char *) "dwm", 3);
XChangeProperty(dpy, root, netatom[NetWMCheck], XA_WINDOW, 32,
PropModeReplace, (unsigned char *) &wmcheckwin, 1);
/* EWMH support per view */
XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32,
PropModeReplace, (unsigned char *) netatom, NetLast);
XDeleteProperty(dpy, root, netatom[NetClientList]);
/* select events */
wa.cursor = cursor[CurNormal]->cursor;
wa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask
| ButtonPressMask | PointerMotionMask | EnterWindowMask
| LeaveWindowMask | StructureNotifyMask | PropertyChangeMask;
XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa);
XSelectInput(dpy, root, wa.event_mask);
grabkeys();
focusNULL();
}
void sigchld(int unused) {
if (signal(SIGCHLD, sigchld) == SIG_ERR)
die("can't install SIGCHLD handler:");
while (0 < waitpid(-1, NULL, WNOHANG));
}
void spawn(const Arg *arg) {
if (arg->v == dmenucmd)
dmenumon[0] = '0' + selmon->num;
if (fork() == 0) {
program_shell::stop();
if (dpy)
close(ConnectionNumber(dpy));
setsid();
execvp(((char **) arg->v)[0], (char **) arg->v);
fprintf(stderr, "dwm: execvp %s", ((char **) arg->v)[0]);
perror(" failed");
exit(EXIT_SUCCESS);
}
}
void tag(const Arg *arg) {
if (selmon->sel && arg->ui & TAGMASK) {
selmon->sel->tags = arg->ui & TAGMASK;
focusNULL();
arrange(selmon);
}
}
void tagmon(const Arg *arg) {
if (!selmon->sel || !mons->next)
return;
sendmon(selmon->sel, dirtomon(arg->i));
}
void tile(Monitor *m) { m->tile(); }
void togglebar(const Arg *arg) {
unsigned int i;
selmon->showbar = !selmon->showbar;
for (i = 0; i <= LENGTH(TAGS); ++i)
if (selmon->tagset[selmon->seltags] & 1 << i)
selmon->pertag->showbars[(i + 1) % (LENGTH(TAGS) + 1)] = selmon->showbar;
selmon->updatebarpos();
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
arrange(selmon);
}
void togglefloating(const Arg *arg) {
if (!selmon->sel)
return;
if (selmon->sel->isfullscreen) /* no support for fullscreen windows */
return;
selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed;
if (selmon->sel->isfloating)
selmon->sel->resize(selmon->sel->x, selmon->sel->y,
selmon->sel->w, selmon->sel->h, 0);
arrange(selmon);
}
void toggletag(const Arg *arg) {
unsigned int newtags;
if (!selmon->sel)
return;
newtags = selmon->sel->tags ^ (arg->ui & TAGMASK);
if (newtags) {
selmon->sel->tags = newtags;
focusNULL();
arrange(selmon);
}
}
void toggleview(const Arg *arg) {
unsigned int newtagset = selmon->tagset[selmon->seltags] ^(arg->ui & TAGMASK);
int i;
if (newtagset) {
selmon->tagset[selmon->seltags] = newtagset;
if (newtagset == ~0) {
selmon->pertag->prevtag = selmon->pertag->curtag;
selmon->pertag->curtag = 0;
}
/* test if the user did not select the same tag */
if (!(newtagset & 1 << (selmon->pertag->curtag - 1))) {
selmon->pertag->prevtag = selmon->pertag->curtag;
for (i = 0; !(newtagset & 1 << i); i++);
selmon->pertag->curtag = i + 1;
}
/* apply settings for this view */
selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag];
selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag];
selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
selmon->lt[selmon->sellt ^ 1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt ^ 1];
if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag])
togglebar(NULL);
focusNULL();
arrange(selmon);
}
}
void unmapnotify(XEvent *e) {
Client *c;
XUnmapEvent *ev = &e->xunmap;
if ((c = wintoclient(ev->window))) {
if (ev->send_event)
setclientstate(c, WithdrawnState);
else
c->unmanage(0);
}
}
void updatebars(void) {
Monitor *m;
XSetWindowAttributes wa = {
.background_pixmap = ParentRelative,
.event_mask = ButtonPressMask | ExposureMask,
.override_redirect = True
};
XClassHint ch = {"dwm", "dwm"};
for (m = mons; m; m = m->next) {
if (m->barwin)
continue;
m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, DefaultDepth(dpy, screen),
CopyFromParent, DefaultVisual(dpy, screen),
CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
XDefineCursor(dpy, m->barwin, cursor[CurNormal]->cursor);
XMapRaised(dpy, m->barwin);
XSetClassHint(dpy, m->barwin, &ch);
}
}
void updateclientlist() {
Client *c;
Monitor *m;
XDeleteProperty(dpy, root, netatom[NetClientList]);
for (m = mons; m; m = m->next)
for (c = m->clients; c; c = c->next)
XChangeProperty(dpy, root, netatom[NetClientList],
XA_WINDOW, 32, PropModeAppend,
(unsigned char *) &(c->win), 1);
}
int updategeom(void) {
int dirty = 0;
#ifdef XINERAMA
if (XineramaIsActive(dpy)) {
int i, j, n, nn;
Client *c;
Monitor *m;
XineramaScreenInfo *info = XineramaQueryScreens(dpy, &nn);
XineramaScreenInfo *unique = nullptr;
for (n = 0, m = mons; m; m = m->next, n++);
/* only consider unique geometries as separate screens */
unique = (XineramaScreenInfo*) ecalloc(nn, sizeof(XineramaScreenInfo));
for (i = 0, j = 0; i < nn; i++)
if (isuniquegeom(unique, j, &info[i]))
memcpy(&unique[j++], &info[i], sizeof(XineramaScreenInfo));
XFree(info);
nn = j;
if (n <= nn) { /* new monitors available */
for (i = 0; i < (nn - n); i++) {
for (m = mons; m && m->next; m = m->next);
if (m)
m->next = createmon();
else
mons = createmon();
}
for (i = 0, m = mons; i < nn && m; m = m->next, i++)
if (i >= n
|| unique[i].x_org != m->mx || unique[i].y_org != m->my
|| unique[i].width != m->mw || unique[i].height != m->mh)
{
dirty = 1;
m->num = i;
m->mx = m->wx = unique[i].x_org;
m->my = m->wy = unique[i].y_org;
m->mw = m->ww = unique[i].width;
m->mh = m->wh = unique[i].height;
m->updatebarpos();
}
} else { /* less monitors available nn < n */
for (i = nn; i < n; i++) {
for (m = mons; m && m->next; m = m->next);
while ((c = m->clients)) {
dirty = 1;
m->clients = c->next;
c->detachstack();
c->mon = mons;
c->attach();
c->attachstack();
}
if (m == selmon)
selmon = mons;
cleanupmon(m);
}
}
free(unique);
} else
#endif /* XINERAMA */
{ /* default monitor setup */
if (!mons)
mons = createmon();
if (mons->mw != sw || mons->mh != sh) {
dirty = 1;
mons->mw = mons->ww = sw;
mons->mh = mons->wh = sh;
mons->updatebarpos();
}
}
if (dirty) {
selmon = mons;
selmon = wintomon(root);
}
return dirty;
}
void updatenumlockmask() {
unsigned int i, j;
XModifierKeymap *modmap;
numlockmask = 0;
modmap = XGetModifierMapping(dpy);
for (i = 0; i < 8; i++)
for (j = 0; j < modmap->max_keypermod; j++)
if (modmap->modifiermap[i * modmap->max_keypermod + j]
== XKeysymToKeycode(dpy, XK_Num_Lock))
numlockmask = (1 << i);
XFreeModifiermap(modmap);
}
void updatestatus(void) {
Monitor *m;
if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
strcpy(stext, "dwm-VERSION");
for (m = mons; m; m = m->next)
m->drawbar();
}
void view(const Arg *arg) {
int i;
unsigned int tmptag;
if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
return;
selmon->seltags ^= 1; /* toggle sel tagset */
if (arg->ui & TAGMASK) {
selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
selmon->pertag->prevtag = selmon->pertag->curtag;
if (arg->ui == ~0)
selmon->pertag->curtag = 0;
else {
for (i = 0; !(arg->ui & 1 << i); i++);
selmon->pertag->curtag = i + 1;
}
} else {
tmptag = selmon->pertag->prevtag;
selmon->pertag->prevtag = selmon->pertag->curtag;
selmon->pertag->curtag = tmptag;
}
selmon->nmaster = selmon->pertag->nmasters[selmon->pertag->curtag];
selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag];
selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
selmon->lt[selmon->sellt ^ 1] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt ^ 1];
if (selmon->showbar != selmon->pertag->showbars[selmon->pertag->curtag])
togglebar(NULL);
focusNULL();
arrange(selmon);
}
Client* wintoclient(Window w) {
Client *c;
Monitor *m;
for (m = mons; m; m = m->next)
for (c = m->clients; c; c = c->next)
if (c->win == w)
return c;
return nullptr;
}
Monitor* wintomon(Window w) {
int x, y;
Client *c;
Monitor *m;
if (w == root && getrootptr(&x, &y))
return recttomon(x, y, 1, 1);
for (m = mons; m; m = m->next)
if (w == m->barwin)
return m;
if ((c = wintoclient(w)))
return c->mon;
return selmon;
}
/* There's no way to check accesses to destroyed windows, thus those cases are
* ignored (especially on UnmapNotify's). Other types of errors call Xlibs
* default error handler, which may call exit. */
int xerror(Display *dpy, XErrorEvent *ee) {
if (ee->error_code == BadWindow
|| (ee->request_code == X_SetInputFocus && ee->error_code == BadMatch)
|| (ee->request_code == X_PolyText8 && ee->error_code == BadDrawable)
|| (ee->request_code == X_PolyFillRectangle && ee->error_code == BadDrawable)
|| (ee->request_code == X_PolySegment && ee->error_code == BadDrawable)
|| (ee->request_code == X_ConfigureWindow && ee->error_code == BadMatch)
|| (ee->request_code == X_GrabButton && ee->error_code == BadAccess)
|| (ee->request_code == X_GrabKey && ee->error_code == BadAccess)
|| (ee->request_code == X_CopyArea && ee->error_code == BadDrawable))
return 0;
fprintf(stderr, "dwm: fatal error: request code=%d, error code=%d\n",
ee->request_code, ee->error_code);
return xerrorxlib(dpy, ee); /* may call exit */
}
int xerrordummy(Display *dpy, XErrorEvent *ee) {
return 0;
}
/* Startup Error handler to check if another window manager
* is already running. */
int xerrorstart(Display *dpy, XErrorEvent *ee) {
die("dwm: another window manager is already running");
return -1;
}
void zoom(const Arg *arg) {
Client *c = selmon->sel;
if (!selmon->lt[selmon->sellt]->arrange_
|| (selmon->sel && selmon->sel->isfloating))
return;
if (c == selmon->clients->nexttiled())
if (!c || !(c = c->next->nexttiled()))
return;
c->pop();
}
void resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst) {
char *sdst = nullptr;
int *idst = nullptr;
float *fdst = nullptr;
sdst = (char *) dst;
idst = (int *) dst;
fdst = (float *) dst;
char fullname[256];
char *type;
XrmValue ret;
snprintf(fullname, sizeof(fullname), "%s.%s", "dwm", name);
fullname[sizeof(fullname) - 1] = '\0';
XrmGetResource(db, fullname, "*", &type, &ret);
if (!(ret.addr == nullptr || strncmp("String", type, 64))) {
switch (rtype) {
case STRING:
strcpy(sdst, ret.addr);
break;
case INTEGER:
*idst = strtoul(ret.addr, nullptr, 10);
break;
case FLOAT:
*fdst = strtof(ret.addr, nullptr);
break;
}
}
}
void load_xresources() {
Display *display;
char *resm;
XrmDatabase db;
ResourcePref *p;
display = XOpenDisplay(NULL);
resm = XResourceManagerString(display);
if (!resm)
return;
db = XrmGetStringDatabase(resm);
for (p = resources; p < resources + LENGTH(resources); p++)
resource_load(db, p->name, p->type, p->dst);
XCloseDisplay(display);
settheme();
}
int test(terminal::term_stream& stream, int argc, const char* argv[]) {
stream << "hello world!";
return 0;
}
int restart(terminal::term_stream& stream, int argc, const char* argv[]) {
program_shell::stop();
quit(nullptr);
return 0;
}
int main(int argc, char *argv[]) {
program_shell::set_var("TERM_HEADER", "[C-DWM Shell v0.1]");
program_shell::set_var("TERM_PROMPT", "$ > ");
program_shell::add_cmd("test", test);
program_shell::add_cmd("restart", restart);
int err = program_shell::init(ctl_port);
if (err <0) {
fprintf(stderr, "[program_shell::init] err: %d", err);
}
if (argc == 2 && !strcmp("-v", argv[1]))
die("dwm-VERSION");
else if (argc != 1)
die("usage: dwm [-v]");
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
fputs("warning: no locale support\n", stderr);
if (!(dpy = XOpenDisplay(nullptr)))
die("dwm: cannot open display");
checkotherwm();
XrmInitialize();
scheme = (Clr **) ecalloc(LENGTH(colors) + 1, sizeof(Clr *));
load_xresources();
setup();
#ifdef __OpenBSD__
if (pledge("stdio rpath proc exec", NULL) == -1)
die("pledge");
#endif /* __OpenBSD__ */
scan();
run();
cleanup();
XCloseDisplay(dpy);
return EXIT_SUCCESS;
}
void centeredmaster(Monitor *m) { m->centeredmaster(); }
void centeredfloatingmaster(Monitor *m) { m->centeredfloatingmaster(); }
| 32.27177 | 108 | 0.538614 | [
"geometry"
] |
250b944bcfbe21522b2a833e40870bfb3293bf62 | 7,789 | hpp | C++ | cule/atari/debug.hpp | cg31/cule | 6cd8e06059c3c3a193a4b2e0821dc1b9daeb726c | [
"BSD-3-Clause"
] | 208 | 2019-05-25T21:35:35.000Z | 2022-03-28T17:33:13.000Z | cule/atari/debug.hpp | cg31/cule | 6cd8e06059c3c3a193a4b2e0821dc1b9daeb726c | [
"BSD-3-Clause"
] | 30 | 2019-07-27T08:23:54.000Z | 2022-03-24T18:17:36.000Z | cule/atari/debug.hpp | cg31/cule | 6cd8e06059c3c3a193a4b2e0821dc1b9daeb726c | [
"BSD-3-Clause"
] | 27 | 2019-07-27T05:42:23.000Z | 2022-03-05T03:08:52.000Z | #pragma once
#include <cule/config.hpp>
#include <cule/macros.hpp>
#include <cule/atari/opcodes.hpp>
#include <cule/atari/internals.hpp>
#include <stdarg.h>
#ifdef __CUDACC__
#define WARN(TYPE, SUBTYPE, ...)
#define WARN_IF(E, TYPE, SUBTYPE, ...)
#define ERROR(TYPE, SUBTYPE, ...)
#define ERROR_IF(E, TYPE, SUBTYPE, ...)
#define ERROR_UNLESS(E, TYPE, SUBTYPE, ...)
#define FATAL_ERROR(TYPE, SUBTYPE, ...)
#define FATAL_ERROR_IF(E, TYPE, SUBTYPE, ...)
#define FATAL_ERROR_UNLESS(E, TYPE, SUBTYPE, ...)
#else
#define WARN(TYPE, SUBTYPE, ...) cule::atari::debug::warn(TYPE, SUBTYPE, __FUNCTION__, __LINE__, __VA_ARGS__, 0)
#define WARN_IF(E, TYPE, SUBTYPE, ...) if (E) WARN(TYPE, SUBTYPE, __VA_ARGS__)
#define ERROR(TYPE, SUBTYPE, ...) cule::atari::debug::error(TYPE, SUBTYPE, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__, 0)
#define ERROR_IF(E, TYPE, SUBTYPE, ...) if (E) ERROR(TYPE, SUBTYPE, __VA_ARGS__)
#define ERROR_UNLESS(E, TYPE, SUBTYPE, ...) if (!(E)) ERROR(TYPE, SUBTYPE, __VA_ARGS__)
#define FATAL_ERROR(TYPE, SUBTYPE, ...) cule::atari::debug::fatalError(TYPE, SUBTYPE, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__, 0)
#define FATAL_ERROR_IF(E, TYPE, SUBTYPE, ...) if (E) FATAL_ERROR(TYPE, SUBTYPE, __VA_ARGS__)
#define FATAL_ERROR_UNLESS(E, TYPE, SUBTYPE, ...) if (!(E)) FATAL_ERROR(TYPE, SUBTYPE, __VA_ARGS__)
#endif
namespace cule
{
namespace atari
{
namespace debug
{
static FILE* foutput = stdout;
template<typename MMC_t, typename State>
CULE_ANNOTATION
void printDisassembly(State& s,
const maddr_t pc, const opcode_t opcode,
const _reg8_t rx, const _reg8_t ry,
const maddr_t addr, const operand_t operand)
{
const cule::atari::opcode::M6502_OPCODE op = cule::atari::opcode::decode(opcode);
switch (op.size)
{
case 1:
{
printf("%04X %02X %-4s ", valueOf(pc), opcode, opcode::instName(op.inst));
break;
}
case 2:
{
printf("%04X %02X %02X %-4s ", valueOf(pc), opcode, MMC_t::read(s,maddr_t(pc + 1)), opcode::instName(op.inst));
break;
}
case 3:
{
printf("%04X %02X %02X %02X %-4s", valueOf(pc), opcode, MMC_t::read(s,maddr_t(pc + 1)), MMC_t::read(s,maddr_t(pc + 2)), opcode::instName(op.inst));
break;
}
default:
{
printf("Invalid opcode size : %d\n", int(op.size));
assert(false);
}
}
switch (op.addrmode)
{
case cule::atari::opcode::ADR_IMP:
{
printf(" ");
break;
}
case cule::atari::opcode::ADR_ZP:
case cule::atari::opcode::ADR_ZPX:
case cule::atari::opcode::ADR_ZPY:
{
printf(" $%02X = %02X ", valueOf(addr), operand);
break;
}
case cule::atari::opcode::ADR_REL:
{
printf(" to $%04X ", valueOf(addr));
break;
}
case cule::atari::opcode::ADR_ABS:
case cule::atari::opcode::ADR_ABSX:
case cule::atari::opcode::ADR_ABSY:
case cule::atari::opcode::ADR_INDX:
case cule::atari::opcode::ADR_INDY:
case cule::atari::opcode::ADR_IND:
{
printf(" $%04X = %02X ", valueOf(addr), operand);
break;
}
case cule::atari::opcode::ADR_IMM:
{
printf(" #$%02X ", operand);
break;
}
case cule::atari::opcode::ADR_INDABSX:
case cule::atari::opcode::ADR_INDZP:
case cule::atari::opcode::_ADR_MAX:
case cule::atari::opcode::_ADR_INVALID:
{
printf("UNKNOWN ADDRESSING $%04X", valueOf(addr));
break;
}
}
printf(" ");
}
CULE_ANNOTATION
void printCPUState(const maddr_t pc, const _reg8_t ra, const _reg8_t rx, const _reg8_t ry, const _reg8_t rp, const _reg8_t rsp, const int cyc)
{
printf("[A:%02X X:%02X Y:%02X P:%02X SP:%02X CYC:%3d] -> %04X\n", ra, rx, ry, rp, rsp, cyc, valueOf(pc));
}
void printPPUState(const long long frameNum, const int scanline, const bool vblank, const bool hit, const bool bgmsk, const bool sprmsk)
{
// fprintf(foutput, "----- FR: %I64d SL: %3d VB:%s HIT:%s MSK:%c%c -----\n", frameNum, scanline, vblank?"True":"false", hit?"Yes":"no",
fprintf(foutput, "----- FR: %lld SL: %3d VB:%s HIT:%s MSK:%c%c -----\n", frameNum, scanline, vblank?"True":"false", hit?"Yes":"no",
bgmsk?'B':'_', sprmsk?'S':'_');
}
// a NULL at the end of argv is REQUIRED!
static void printToConsole(int type, const char * typestr, int stype, const char * stypestr, const char * file, const char * function_name, unsigned long line_number, va_list argv)
{
printf("Type: %s (%d)\nSub Type: %s (%d)\nProc: %s:%ld\n", typestr, type, stypestr, stype, function_name, line_number);
if (file != nullptr)
{
printf("File: %s\n", file);
}
// print custom parameters
char* name=nullptr;
while ((name=va_arg(argv, char*))!=nullptr)
{
int value=va_arg(argv, int);
printf("<%s> = %Xh (%d)\n", name, value, value);
}
}
static const char * errorTypeToString(EMUERROR type)
{
switch (type)
{
CASE_ENUM_RETURN_STRING(INVALID_ROM);
CASE_ENUM_RETURN_STRING(INVALID_MEMORY_ACCESS);
CASE_ENUM_RETURN_STRING(INVALID_INSTRUCTION);
CASE_ENUM_RETURN_STRING(ILLEGAL_OPERATION);
default:
return "UNKNOWN";
}
}
static const char * errorSTypeToString(EMUERRORSUBTYPE stype)
{
switch (stype)
{
CASE_ENUM_RETURN_STRING(INVALID_FILE_SIGNATURE);
CASE_ENUM_RETURN_STRING(INVALID_ROM_CONFIG);
CASE_ENUM_RETURN_STRING(UNEXPECTED_END_OFLAG_FILE);
CASE_ENUM_RETURN_STRING(UNSUPPORTED_MAPPER_TYPE);
CASE_ENUM_RETURN_STRING(MAPPER_FAILURE);
CASE_ENUM_RETURN_STRING(ADDRESS_OUT_OFLAG_RANGE);
CASE_ENUM_RETURN_STRING(ILLEGAL_ADDRESS_WARP);
CASE_ENUM_RETURN_STRING(MEMORY_NOT_EXECUTABLE);
CASE_ENUM_RETURN_STRING(MEMORY_CANT_BE_READ);
CASE_ENUM_RETURN_STRING(MEMORY_CANT_BE_WRITTEN);
CASE_ENUM_RETURN_STRING(MEMORY_CANT_BE_COPIED);
CASE_ENUM_RETURN_STRING(INVALID_OPCODE);
CASE_ENUM_RETURN_STRING(INVALID_ADDRESS_MODE);
CASE_ENUM_RETURN_STRING(IRQ_ALREADY_PENDING);
default:
return "UNKNOWN";
}
}
void fatalError(EMUERROR type, EMUERRORSUBTYPE stype, const char * file, const char * function_name, unsigned long line_number, ...)
{
va_list args;
va_start(args, line_number);
printf("[X] Fatal error: \n");
printToConsole(type, errorTypeToString(type), stype, errorSTypeToString(stype), file, function_name, line_number, args);
va_end(args);
fflush(foutput);
#ifndef NDEBUG
assert(0);
#endif
exit(type);
}
void error(EMUERROR type, EMUERRORSUBTYPE stype, const char * file, const char * function_name, unsigned long line_number, ...)
{
va_list args;
va_start(args, line_number);
printf("[X] Error: \n");
printToConsole(type, errorTypeToString(type), stype, errorSTypeToString(stype), file, function_name, line_number, args);
va_end(args);
fflush(foutput);
#ifndef NDEBUG
assert(0);
#else
// __debugbreak();
#endif
}
void warn(EMUERROR type, EMUERRORSUBTYPE stype, const char * function_name, unsigned long line_number, ...)
{
va_list args;
va_start(args, line_number);
printf("[!] Warning: \n");
printToConsole(type, errorTypeToString(type), stype, errorSTypeToString(stype), NULL, function_name, line_number, args);
va_end(args);
}
void setOutputFile(FILE *fp)
{
foutput = fp;
}
} // end namespace debug
} // end namespace atari
} // end namespace cule
| 32.053498 | 180 | 0.628707 | [
"3d"
] |
250c4b0634e61f3334946f30a360ef7465f5f77e | 15,476 | cpp | C++ | Source/CorrespondenceEvaluator.cpp | Team-AllyHyeseongKim/http-image-server4bundle-fusion-scanner | 2a6c196aeb9bacd2c88a0bb6a8bbadd04afca260 | [
"RSA-MD"
] | null | null | null | Source/CorrespondenceEvaluator.cpp | Team-AllyHyeseongKim/http-image-server4bundle-fusion-scanner | 2a6c196aeb9bacd2c88a0bb6a8bbadd04afca260 | [
"RSA-MD"
] | null | null | null | Source/CorrespondenceEvaluator.cpp | Team-AllyHyeseongKim/http-image-server4bundle-fusion-scanner | 2a6c196aeb9bacd2c88a0bb6a8bbadd04afca260 | [
"RSA-MD"
] | null | null | null | #include "stdafx.h"
#include "CorrespondenceEvaluator.h"
#ifdef EVALUATE_SPARSE_CORRESPONDENCES
#include "CUDACache.h"
#include "SiftVisualization.h" //for debugging
const std::string CorrespondenceEvaluator::splitter = ",";
void CorrespondenceEvaluator::computeCachedData(const SIFTImageManager* siftManager, const CUDACache* cudaCache)
{
const unsigned int curFrame = siftManager->getCurrentFrame();
const unsigned int numFrames = siftManager->getNumImages();
const float depthMin = GlobalBundlingState::get().s_denseDepthMin;
const float depthMax = GlobalBundlingState::get().s_denseDepthMax;
const float distThresh = GlobalBundlingState::get().s_projCorrDistThres;
const float normalThresh = GlobalBundlingState::get().s_projCorrNormalThres;
const float colorThresh = GlobalBundlingState::get().s_projCorrColorThresh;
siftManager->getSIFTKeyPointsDEBUG(m_cachedKeys);
m_cacheHasGTCorrByOverlap.resize(numFrames, false);
unsigned int width = cudaCache->getWidth(), height = cudaCache->getHeight();
const auto& cachedFrames = cudaCache->getCacheFrames();
DepthImage32 curDepth(width, height); ColorImageR32 curIntensity(width, height);
MLIB_CUDA_SAFE_CALL(cudaMemcpy(curDepth.getData(), cachedFrames[curFrame].d_depthDownsampled, sizeof(float)*curDepth.getNumPixels(), cudaMemcpyDeviceToHost));
MLIB_CUDA_SAFE_CALL(cudaMemcpy(curIntensity.getData(), cachedFrames[curFrame].d_intensityDownsampled, sizeof(float)*curIntensity.getNumPixels(), cudaMemcpyDeviceToHost));
DepthImage32 prvDepth(width, height); ColorImageR32 prvIntensity(width, height); mat4f transformCurToPrv;
for (unsigned int i = 0; i < numFrames; i++) {
if (i == curFrame) continue;
transformCurToPrv = m_referenceTrajectory[i].getInverse() * m_referenceTrajectory[curFrame]; //TODO still something wrong here?
MLIB_CUDA_SAFE_CALL(cudaMemcpy(prvDepth.getData(), cachedFrames[i].d_depthDownsampled, sizeof(float)*prvDepth.getNumPixels(), cudaMemcpyDeviceToHost));
MLIB_CUDA_SAFE_CALL(cudaMemcpy(prvIntensity.getData(), cachedFrames[i].d_intensityDownsampled, sizeof(float)*prvIntensity.getNumPixels(), cudaMemcpyDeviceToHost));
const vec2ui overlap = computeOverlap(curDepth, curIntensity, prvDepth, prvIntensity, transformCurToPrv,
cudaCache->getIntrinsics(), depthMin, depthMax, distThresh, normalThresh, colorThresh, m_minOverlapThreshForGTCorr,
false);
//(i == 0 && curFrame == 4));
float o = (float)overlap.x / (float)overlap.y;
if (overlap.y > 0 && o > m_minOverlapThreshForGTCorr) {
//std::cout << "gt overlap frames (" << i << ", " << curFrame << "): " << o << " (" << overlap.x << "/" << overlap.y << ")" << std::endl;
m_cacheHasGTCorrByOverlap[i] = true;
}
//else
// std::cout << "no gt overlap for frames (" << i << ", " << curFrame << "): " << o << " (" << overlap.x << "/" << overlap.y << ")" << std::endl;
}
}
CorrEvaluation CorrespondenceEvaluator::evaluate(const SIFTImageManager* siftManager, const CUDACache* cudaCache,
const mat4f& siftIntrinsicsInv, bool filtered, bool recomputeCache, bool clearCache, const std::string& corrType)
{
//TODO: return the vector or the sum or evals?
const unsigned int curFrame = siftManager->getCurrentFrame();
const unsigned int numFrames = siftManager->getNumImages();
const bool useLog = isLoggingToFile();
if (recomputeCache) computeCachedData(siftManager, cudaCache);
std::vector<uint2> keyPointIndices; std::vector<unsigned int> numMatches;
siftManager->getCurrMatchKeyPointIndicesDEBUG(keyPointIndices, numMatches, filtered);
const unsigned int offsetVal = filtered ? MAX_MATCHES_PER_IMAGE_PAIR_FILTERED : MAX_MATCHES_PER_IMAGE_PAIR_RAW;
CorrEvaluation eval;
//evaluate!
for (unsigned int p = 0; p < numFrames; p++) {
if (p == curFrame) continue;
if (m_cacheHasGTCorrByOverlap[p]) {
eval.numTotal++;
if (numMatches[p] > 0) eval.numDetected++;
}
//check individual corrs
unsigned int offset = offsetVal * p;
float maxErr2 = 0.0f;
for (unsigned int m = 0; m < numMatches[p]; m++) {
const SIFTKeyPoint& k0 = m_cachedKeys[keyPointIndices[offset + m].x];
const SIFTKeyPoint& k1 = m_cachedKeys[keyPointIndices[offset + m].y];
const vec3f cp0 = depthToCamera(siftIntrinsicsInv, k0.pos.x, k0.pos.y, k0.depth);
const vec3f cp1 = depthToCamera(siftIntrinsicsInv, k1.pos.x, k1.pos.y, k1.depth);
vec3f err = m_referenceTrajectory[p] * cp0 - m_referenceTrajectory[curFrame] * cp1;
const float err2 = err.lengthSq();
if (err2 > maxErr2) maxErr2 = err2;
////debugging
//if (err2 > m_maxProjErrorForCorrectCorr && filtered) {
// const mat4f transformCurToPrv = m_referenceTrajectory[p].getInverse() * m_referenceTrajectory[curFrame];
// vec3f posPrev = cp0; vec3f posCur = transformCurToPrv * cp1;
// MeshDataf keyPrev = Shapesf::sphere(0.02f, posPrev, 10, 10, vec4f(1.0f, 0.0f, 0.0f, 1.0f)).computeMeshData();
// MeshDataf keyCur = Shapesf::sphere(0.02f, posCur, 10, 10, vec4f(0.0f, 1.0f, 0.0f, 1.0f)).computeMeshData();
// MeshIOf::saveToFile("debug/overlap/key_prev.ply", keyPrev); //prev
// MeshIOf::saveToFile("debug/overlap/key_cur.ply", keyCur); //cur
// static SensorData sd;
// if (sd.m_frames.empty()) sd.loadFromFile("../data/fr1_desk_from20.sens");
// SiftVisualization::printMatch("debug/overlap/match.png", sd, m_cachedKeys, numMatches, keyPointIndices,
// vec2ui(p*10, curFrame*10), offset, filtered, m);
// sd.saveFrameToPointCloud("debug/overlap/frame_prev.ply", p * 10, mat4f::identity());
// sd.saveFrameToPointCloud("debug/overlap/frame_cur.ply", curFrame * 10, transformCurToPrv);
// int a = 5;
//}
////debugging
}
if (numMatches[p] > 0) {
if (maxErr2 < m_maxProjErrorForCorrectCorr) {
if (m_cacheHasGTCorrByOverlap[p])
eval.numCorrect++;
//else {
// std::cout << "WARNING: found corr between frames (" << p << ", " << curFrame << ") but no gt overlap found" << std::endl;
//}
}
else {
if (useLog) m_outStreamIncorrect << numFrames << splitter << curFrame << splitter << p << splitter << corrType << splitter << std::sqrt(maxErr2) << std::endl;
}
}
if (useLog && m_cacheHasGTCorrByOverlap[p] && numMatches[p] == 0) m_outStreamIncorrect << numFrames << splitter << curFrame << splitter << p << splitter << corrType << splitter << -1.0f << std::endl;
} //each im-im corr for the current frame
if (useLog) m_outStreamPerFrame << numFrames << splitter << curFrame << splitter << corrType << splitter << eval.getPrecision() << splitter << eval.getRecall() << splitter << eval.numCorrect << splitter << eval.numDetected << splitter << eval.numTotal << std::endl;
if (clearCache) clearCachedData();
return eval;
}
void CorrespondenceEvaluator::computeCorrespondences(const DepthImage32& depth0, const ColorImageR32& color0,
const DepthImage32& depth1, const ColorImageR32& color1, const mat4f& transform0to1, const mat4f& depthIntrinsics,
float depthMin, float depthMax, float distThresh, float normalThresh, float colorThresh,
float& sumResidual, float& sumWeight, unsigned int& numCorr, unsigned int& numValid, bool debugPrint)
{
const float INVALID = -std::numeric_limits<float>::infinity();
sumResidual = 0.0f;
sumWeight = 0.0f;
numCorr = 0;
numValid = 0;
//camera pos / normals
const mat4f& depthIntrinsicsInverse = depthIntrinsics.getInverse();
PointImage cameraPos0, normal0;
computeCameraSpacePositions(depth0, depthIntrinsicsInverse, cameraPos0);
computeNormals(cameraPos0, depthIntrinsicsInverse, normal0);
PointImage cameraPos1, normal1;
computeCameraSpacePositions(depth1, depthIntrinsicsInverse, cameraPos1);
computeNormals(cameraPos1, depthIntrinsicsInverse, normal1);
const std::string debugDir = "debug/overlap/";
if (debugPrint) {
ColorImageR32G32B32 cp0 = cameraPos0, n0 = normal0, cp1 = cameraPos1, n1 = normal1;
float min0 = std::numeric_limits<float>::infinity(), min1 = std::numeric_limits<float>::infinity();
float max0 = -std::numeric_limits<float>::infinity(), max1 = -std::numeric_limits<float>::infinity();
for (unsigned int i = 0; i < cp0.getNumPixels(); i++) {
const vec3f& c0 = cp0.getData()[i];
if (c0.x != -std::numeric_limits<float>::infinity()) {
if (c0.x < min0) min0 = c0.x;
if (c0.y < min0) min0 = c0.y;
if (c0.z < min0) min0 = c0.z;
if (c0.x > max0) max0 = c0.x;
if (c0.y > max0) max0 = c0.y;
if (c0.z > max0) max0 = c0.z;
}
const vec3f& c1 = cp1.getData()[i];
if (c1.x != -std::numeric_limits<float>::infinity()) {
if (c1.x < min1) min1 = c1.x;
if (c1.y < min1) min1 = c1.y;
if (c1.z < min1) min1 = c1.z;
if (c1.x > max1) max1 = c1.x;
if (c1.y > max1) max1 = c1.y;
if (c1.z > max1) max1 = c1.z;
}
}
for (unsigned int i = 0; i < cp0.getNumPixels(); i++) {
vec3f& c0 = cp0.getData()[i];
if (c0.x != -std::numeric_limits<float>::infinity()) c0 = (c0 - min0) / (max0 - min0);
vec3f& c1 = cp1.getData()[i];
if (c1.x != -std::numeric_limits<float>::infinity()) c1 = (c1 - min1) / (max1 - min1);
n0.getData()[i] = (n0.getData()[i] - 1.0f) / 2.0f;
n1.getData()[i] = (n1.getData()[i] - 1.0f) / 2.0f;
}
FreeImageWrapper::saveImage(debugDir + "campos0.png", cp0);
FreeImageWrapper::saveImage(debugDir + "normal0.png", n0);
FreeImageWrapper::saveImage(debugDir + "campos1.png", cp1);
FreeImageWrapper::saveImage(debugDir + "normal1.png", n1);
}
DepthImage32 corrImage(depth0.getWidth(), depth0.getHeight());
corrImage.setPixels(-std::numeric_limits<float>::infinity());
PointCloudf pc0Trans, pc1, pcCorr;
const vec4f defaultColor(0.5f, 0.5f, 0.5f, 1.0f);
for (unsigned int y = 0; y < depth0.getHeight(); y++) {
for (unsigned int x = 0; x < depth0.getWidth(); x++) {
if (debugPrint) {
float d = depth1(x, y); const vec3f& cp = cameraPos1(x, y); const vec3f& n = normal1(x, y);
if (d > depthMin && d < depthMax && cp.x != INVALID && n.x != INVALID) {
pc1.m_points.push_back(cp);
pc1.m_colors.push_back(vec4f(vec3f(color1(x, y)), 1.0f));
pc1.m_colors.push_back(defaultColor);
}
}
const vec4f p0 = vec4f(cameraPos0(x, y), 1.0f);
const vec4f n0 = vec4f(normal0(x, y), 0.0f);
const float cInput = color0(x, y);
if (p0.x != INVALID && n0.x != INVALID) {
if (depth0(x, y) > depthMin && depth0(x, y) < depthMax) numValid++;
const vec4f pTransInput = transform0to1 * p0;
const vec4f nTransInput = transform0to1 * n0;
if (debugPrint) {
pc0Trans.m_points.push_back(pTransInput.getVec3());
pc0Trans.m_colors.push_back(vec4f(vec3f(color0(x, y)), 1.0f));
pc0Trans.m_colors.push_back(defaultColor);
}
vec2f screenPosf = cameraToDepth(depthIntrinsics, pTransInput.getVec3());
vec2i screenPos = math::round(screenPosf);
if (screenPos.x >= 0 && screenPos.y >= 0 && screenPos.x < (int)depth0.getWidth() && screenPos.y < (int)depth0.getHeight()) {
vec4f pTarget, nTarget; float cTarget;
getBestCorrespondence1x1(screenPos, pTarget, nTarget, cTarget, cameraPos1, normal1, color1);
if (pTarget.x != INVALID && nTarget.x != INVALID) {
float d = (pTransInput - pTarget).length();
float dNormal = nTransInput | nTarget;
float c = (cInput - cTarget);
float projInputDepth = pTransInput.z;//cameraToDepthZ(pTransInput);
float tgtDepth = depth1(screenPos.x, screenPos.y);
//bool b = ((tgtDepth != INVALID && projInputDepth < tgtDepth) && d > distThresh); // bad matches that are known
if ((dNormal >= normalThresh && d <= distThresh /*&& c <= colorThresh*/) /*|| b*/) { // if normal/pos/color correspond or known bad match
const float weight = std::max(0.0f, 0.5f*((1.0f - d / distThresh) + (1.0f - cameraToKinectProjZ(pTransInput.z, depthMin, depthMax)))); // for weighted ICP;
sumResidual += d; //residual
sumWeight += weight; //corr weight
numCorr++; //corr number
if (debugPrint) {
pcCorr.m_points.push_back(pTransInput.getVec3());
pcCorr.m_colors.push_back(vec4f(vec3f(cInput), 1.0f));
pcCorr.m_colors.push_back(defaultColor);
corrImage(x, y) = d;
}
}
} // projected to valid depth
} // inside image
}
} // x
} // y
if (debugPrint) {
PointCloudIOf::saveToFile(debugDir + "pc0trans.ply", pc0Trans);
PointCloudIOf::saveToFile(debugDir + "pc1.ply", pc1);
PointCloudIOf::saveToFile(debugDir + "pcCorr.ply", pcCorr);
FreeImageWrapper::saveImage(debugDir + "corr.png", ColorImageR32G32B32(corrImage));
int a = 5;
}
}
ml::vec2ui CorrespondenceEvaluator::computeOverlap(const DepthImage32& depth0, const ColorImageR32& color0,
const DepthImage32& depth1, const ColorImageR32& color1, const mat4f transform0to1, const mat4f& depthIntrinsics,
float depthMin, float depthMax, float distThresh, float normalThresh, float colorThresh, float earlyOutThresh, bool debugPrint)
{
// 0 -> 1
float sumResidual0 = 0.0f, sumWeight0 = 0.0f; unsigned int numCorr0 = 0, numValid0 = 0;
computeCorrespondences(depth0, color0, depth1, color1, transform0to1,
depthIntrinsics, depthMin, depthMax,
distThresh, normalThresh, colorThresh,
sumResidual0, sumWeight0, numCorr0, numValid0, debugPrint);
float percent0 = (float)numCorr0 / (float)numValid0;
if (percent0 > earlyOutThresh) return vec2ui(numCorr0, numValid0);
unsigned int numCorr1 = 0, numValid1 = 0;
computeCorrespondences(depth1, color1, depth0, color0, transform0to1.getInverse(),
depthIntrinsics, depthMin, depthMax,
distThresh, normalThresh, colorThresh,
sumResidual0, sumWeight0, numCorr1, numValid1, debugPrint);
float percent1 = (float)numCorr1 / (float)numValid1;
if (percent0 > percent1)
return vec2ui(numCorr0, numValid0);
return vec2ui(numCorr1, numValid1);
}
void CorrespondenceEvaluator::computeNormals(const PointImage& cameraPos, const mat4f& intrinsicsInv, PointImage& normal)
{
normal.allocate(cameraPos.getWidth(), cameraPos.getHeight());
for (unsigned int y = 0; y < cameraPos.getHeight(); y++) {
for (unsigned int x = 0; x < cameraPos.getWidth(); x++) {
if (x > 0 && x + 1 < cameraPos.getWidth() && y > 0 && y + 1 < cameraPos.getHeight()) {
const vec3f& CC = cameraPos(x + 0, y + 0);
const vec3f& PC = cameraPos(x + 0, y + 1);
const vec3f& CP = cameraPos(x + 1, y + 0);
const vec3f& MC = cameraPos(x + 0, y - 1);
const vec3f& CM = cameraPos(x - 1, y + 0);
if (CC.x != -std::numeric_limits<float>::infinity() && PC.x != -std::numeric_limits<float>::infinity() &&
CP.x != -std::numeric_limits<float>::infinity() && MC.x != -std::numeric_limits<float>::infinity() &&
CM.x != -std::numeric_limits<float>::infinity())
{
const vec3f n = (PC - MC) ^ (CP - CM);
const float l = n.length();
if (l > 0.0f) normal(x, y) = n / -l;
else normal(x, y) = vec3f(-std::numeric_limits<float>::infinity());
}
}
else {
normal(x, y) = vec3f(-std::numeric_limits<float>::infinity());
}
} //x
} //y
}
void CorrespondenceEvaluator::computeCameraSpacePositions(const DepthImage32& depth, const mat4f& intrinsicsInv, PointImage& cameraPos)
{
cameraPos.allocate(depth.getWidth(), depth.getHeight());
for (unsigned int y = 0; y < depth.getHeight(); y++) {
for (unsigned int x = 0; x < depth.getWidth(); x++) {
const float d = depth(x, y);
if (d == -std::numeric_limits<float>::infinity()) cameraPos(x, y) = vec3f(-std::numeric_limits<float>::infinity());
else cameraPos(x, y) = (intrinsicsInv*vec4f((float)x*d, (float)y*d, d, d)).getVec3();
} //x
} //y
}
#endif | 48.3625 | 266 | 0.688615 | [
"vector"
] |
250efac0b3617d5ea9451637d36a315fea9e62dc | 2,132 | cpp | C++ | C&CPP/00-Code/cpp-program-basic/003-container/vectors.cpp | hiloWang/notes | 64a637a86f734e4e80975f4aa93ab47e8d7e8b64 | [
"Apache-2.0"
] | 2 | 2020-10-08T13:22:08.000Z | 2021-07-28T14:45:41.000Z | C&C++/cplusplus-program/003-container/vectors.cpp | flyfire/Programming-Notes-Code | 4b1bdd74c1ba0c007c504834e4508ec39f01cd94 | [
"Apache-2.0"
] | null | null | null | C&C++/cplusplus-program/003-container/vectors.cpp | flyfire/Programming-Notes-Code | 4b1bdd74c1ba0c007c504834e4508ec39f01cd94 | [
"Apache-2.0"
] | 6 | 2020-08-20T07:19:17.000Z | 2022-03-02T08:16:21.000Z | /*
============================================================================
Author : Ztiany
Description : 对象容器vector
============================================================================
*/
#include <vector>
#include <iostream>
using namespace std;
int sAge = 0;
class A {
private:
int age;
public:
A() {
age = ++sAge;
cout << "create time" << age << endl;
}
int getAge() {
return age;
}
};
//1:创建vector
static void createVector() {
vector<int> vector1;//创建空的vector,执行默认初始化
vector<int> vector2(vector1);//v2中包含所有v1中元素的副本
vector<int> vector3 = vector1;//等价于上面vector2
vector<int> vector4(4, 1);//包含4个1的vector
vector<int> vector5(4);//包含4个执行了值初始化的对象(此处是int类型,将初始化为0)
//列表初始化(c++11)
vector<int> vector6{1, 2, 3, 4, 5, 6, 7};
vector<int> vector7 = {1, 2, 3, 4, 5, 6, 7};//等价于vector5
vector<string> vector8{10};//v8中有十个默认初始化的元素
vector<string> vector9{10, "hi"};//v9中有十个hi
vector<A> vector10(10);
for (A a : vector10) {
cout << a.getAge() << " ";
}
vector<A> vector11 = vector10;
for (A a : vector11) {
cout << a.getAge() << " ";
}
vector<int> c;
}
//2:vector的操作
void vectorOperation() {
vector<int> vector1;
//2.1:向尾部添加元素
for (int i = 0; i < 100; ++i) {
vector1.push_back(i);
}
cout << "vector1 size = " << vector1.size() << endl;//100
//2.2:size和empty函数、访问元素
vector<int>::size_type size = vector1.size();//获取size
bool is_empty = vector1.empty();//是否为空
int index_10 = vector1[10];//访问元素
vector<int> vector2 = vector1;//用v1中的元素拷贝替换v2中的元素
vector1 = {100, 2, 3, 100};//用列表中的元素,替换v1中的元素,虽然vector1范围外的内存依然保持着原有的值,但是vector的size已经变为4了
cout << "vector1 size = " << vector1.size() << endl;//4
//2.3:vector的比较,=、!=、>、<、>=、<=操纵
bool is_same = vector1 == vector2;//当且仅当两个vector的元素数量和对应位置的元素值相等才为true
//2.4 防止脚标越界
cout << "vector1[99] = " << vector1[99];//100
cout << "vector2[100] = " << vector2[101];//位置值,脚标越界。
}
int main() {
createVector();
// vectorOperation();
return EXIT_SUCCESS;
}
| 22.442105 | 94 | 0.542214 | [
"vector"
] |
251beb96a64b9b6d433ab71b9458a0d5cb2e054c | 9,325 | cpp | C++ | others/lccp.cpp | Siyu-ZOUZOU/Project | 9e6b97df35148ad28a547d34debaef13f2c2ebbb | [
"MIT"
] | 1 | 2018-07-18T02:02:47.000Z | 2018-07-18T02:02:47.000Z | others/lccp.cpp | Siyu-ZOUZOU/Project_siyu | 9e6b97df35148ad28a547d34debaef13f2c2ebbb | [
"MIT"
] | null | null | null | others/lccp.cpp | Siyu-ZOUZOU/Project_siyu | 9e6b97df35148ad28a547d34debaef13f2c2ebbb | [
"MIT"
] | null | null | null | // Stdlib
#include <stdlib.h>
#include <cmath>
#include <limits.h>
#include <iterator>
#include <vector>
#include <boost/format.hpp>
#include <stdint.h>
// PCL input/output
#include <pcl/console/parse.h>
#include <pcl/io/pcd_io.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/visualization/point_cloud_color_handlers.h>
//PCL other
#include <pcl/filters/passthrough.h>
#include <pcl/segmentation/supervoxel_clustering.h>
#include <pcl/features/normal_3d_omp.h>
// The segmentation class this example is for
#include <pcl/segmentation/lccp_segmentation.h>
typedef pcl::LCCPSegmentation<pcl::PointXYZ>::SupervoxelAdjacencyList SuperVoxelAdjacencyList;
void
compute_surface_normals (pcl::PointCloud<pcl::PointXYZ>::Ptr &points, float normal_radius,
pcl::PointCloud<pcl::Normal>::Ptr &normals_out)
{
pcl::NormalEstimationOMP<pcl::PointXYZ, pcl::Normal> norm_est;
// Use a FLANN-based KdTree to perform neighborhood searches
//norm_est.setSearchMethod (pcl::KdTreeFLANN<pcl::PointXYZ>::Ptr (new pcl::KdTreeFLANN<pcl::PointXYZ>));
norm_est.setSearchMethod (pcl::search::KdTree<pcl::PointXYZ>::Ptr (new pcl::search::KdTree<pcl::PointXYZ>));
// Specify the size of the local neighborhood to use when computing the surface normals
norm_est.setRadiusSearch (normal_radius);
// Set the input points
norm_est.setInputCloud (points);
// Estimate the surface normals and store the result in "normals_out"
norm_est.compute (*normals_out);
}
int
main (int argc, char** argv)
{
// Fetch point cloud filename in arguments | Works with PCD and PLY files
std::vector<int> filenames;
bool file_is_pcd = false;
filenames = pcl::console::parse_file_extension_argument (argc, argv, ".pcd");
pcl::PointCloud<pcl::PointXYZ>::Ptr input_cloud_ptr (new pcl::PointCloud<pcl::PointXYZ> ());
if (pcl::io::loadPCDFile (argv[filenames[0]], *input_cloud_ptr) < 0)
{
std::cout << "Error loading point cloud " << argv[filenames[0]] << std::endl << std::endl;
return -1;
}
std::cout<< "NUmber of input points" << input_cloud_ptr->size () << std::endl;
/// -----------------------------------| Preparations |-----------------------------------
/// Create variables needed for preparations
std::string outputname ("");
pcl::PointCloud<pcl::Normal>::Ptr input_normals_ptr (new pcl::PointCloud<pcl::Normal>);
float normal_radius = 5.0 ;
compute_surface_normals (input_cloud_ptr, normal_radius, input_normals_ptr);
/// -----------------------------------| Main Computation |-----------------------------------
/// Default values of parameters before parsing
// Supervoxel Stuff
float voxel_resolution = 4.0f;
float seed_resolution = 10.0f;
float color_importance = 0.0f;
float spatial_importance = 1.0f;
float normal_importance = 4.0f;
bool use_single_cam_transform = false;
bool use_supervoxel_refinement = true;
// LCCPSegmentation Stuff
float concavity_tolerance_threshold = 10;
float smoothness_threshold = 0.4;
uint32_t min_segment_size = 4.0;
bool use_extended_convexity = true;
bool use_sanity_criterion = false;
/// Parse Arguments needed for computation
//Supervoxel Stuff
// normals_scale = seed_resolution / 2.0;
// Segmentation Stuff
unsigned int k_factor = 0;
if (use_extended_convexity)
k_factor = 1;
/// Preparation of Input: Supervoxel Oversegmentation
pcl::SupervoxelClustering<pcl::PointXYZ> super (voxel_resolution, seed_resolution);
super.setUseSingleCameraTransform (use_single_cam_transform);
super.setInputCloud (input_cloud_ptr);
super.setNormalCloud (input_normals_ptr);
super.setColorImportance (color_importance);
super.setSpatialImportance (spatial_importance);
super.setNormalImportance (normal_importance);
std::map<uint32_t, pcl::Supervoxel<pcl::PointXYZ>::Ptr> supervoxel_clusters;
PCL_INFO ("Extracting supervoxels\n");
super.extract (supervoxel_clusters);
if (use_supervoxel_refinement)
{
PCL_INFO ("Refining supervoxels\n");
super.refineSupervoxels (2, supervoxel_clusters);
}
std::stringstream temp;
temp << " Nr. Supervoxels: " << supervoxel_clusters.size () << "\n";
PCL_INFO (temp.str ().c_str ());
PCL_INFO ("Getting supervoxel adjacency\n");
std::multimap<uint32_t, uint32_t> supervoxel_adjacency;
super.getSupervoxelAdjacency (supervoxel_adjacency);
/// Get the cloud of supervoxel centroid with normals and the colored cloud with supervoxel coloring (this is used for visulization)
pcl::PointCloud<pcl::PointNormal>::Ptr sv_centroid_normal_cloud = pcl::SupervoxelClustering<pcl::PointXYZ>::makeSupervoxelNormalCloud (supervoxel_clusters);
/// The Main Step: Perform LCCPSegmentation
PCL_INFO ("Starting Segmentation\n");
pcl::LCCPSegmentation<pcl::PointXYZ> lccp;
lccp.setConcavityToleranceThreshold (concavity_tolerance_threshold);
lccp.setSanityCheck (use_sanity_criterion);
lccp.setSmoothnessCheck (true, voxel_resolution, seed_resolution, smoothness_threshold);
lccp.setKFactor (k_factor);
lccp.setInputSupervoxels (supervoxel_clusters, supervoxel_adjacency);
lccp.setMinSegmentSize (min_segment_size);
lccp.segment ();
PCL_INFO ("Interpolation voxel cloud -> input cloud and relabeling\n");
pcl::PointCloud<pcl::PointXYZL>::Ptr sv_labeled_cloud = super.getLabeledCloud ();
pcl::PointCloud<pcl::PointXYZL>::Ptr lccp_labeled_cloud = sv_labeled_cloud->makeShared ();
lccp.relabelCloud (*lccp_labeled_cloud);
SuperVoxelAdjacencyList sv_adjacency_list;
lccp.getSVAdjacencyList (sv_adjacency_list); // Needed for visualization
std::cout<< "number of lccp points : " << lccp_labeled_cloud->size () << std::endl;
// storing all the indices of the LCCP groups
std::vector<uint32_t> index_group;
for (size_t i = 0; i < lccp_labeled_cloud->size (); ++i)
{
std::cout<<"It's round "<< i << ": lable is "<< lccp_labeled_cloud-> at (i).label<< std::endl;
if (i == 0) index_group.push_back(lccp_labeled_cloud-> at (0).label);
else
{
bool flag = false;
for (auto pit : index_group)
{
std::cout<< pit <<std::endl;
if ( pit == lccp_labeled_cloud-> at (i).label) flag = true;
}
if (!flag) index_group.push_back(lccp_labeled_cloud-> at (i).label);
}
}
std::cout << "start!!!!" << std::endl;
for (auto pit : index_group)
{
std::cout<< pit << std::endl;
}
// storing every group of cloud points into the vector
// std::vector<pcl::PointCloud<pcl::PointXYZ>> points_group;
int count = 1;
for (auto pit : index_group)
{
pcl::PointCloud<pcl::PointXYZL>::Ptr cloud_ (new pcl::PointCloud<pcl::PointXYZL> ());
for (size_t i = 0; i < lccp_labeled_cloud->size (); ++i)
{
if (lccp_labeled_cloud-> at (i).label == pit)
{
cloud_->push_back(lccp_labeled_cloud->at(i));
}
}
if (cloud_->size()>10000)
{
std::stringstream name_point;
name_point<<"cloud_group"<< count<<".pcd";
pcl::io::savePCDFileASCII(name_point.str(), *cloud_);
count ++;
}
// points_group.push_back(cloud_);
}
/*
size_t number_max =2000;
//
int count =1;
for (auto pit : points_group)
{
std::stringstream name_point;
name_point<<"cloud_group"<< count;
if (points_group.size() > number_max)
{
pcl::io::savePCDFileASCII(name_point.str(), pit);
}
count ++;
}
*/
/*
typedef pcl::LCCPSegmentation<pcl::PointXYZ>::VertexIterator VertexIterator;
std::pair<VertexIterator, VertexIterator> vertex_iterator_range;
vertex_iterator_range = boost::vertices (sv_adjacency_list);
for (VertexIterator itr = vertex_iterator_range.first; itr != vertex_iterator_range.second; ++itr)
{
const uint32_t sv_label = sv_adjacency_list[*itr];
pcl::PointXYZL group_label = lccp_labeled_cloud->points[ sv_label ];
std::cout << "sv_label: " << sv_label << "; group_label.label: " << group_label.label <<std::endl;
// printf(“%d %d\n”, sv_label, group_label.label); // supervoxel label, segmentation group label
}
/*
/// Creating Colored Clouds and Output
if (lccp_labeled_cloud->size () == input_cloud_ptr->size ())
{
if (output_specified)
{
PCL_INFO ("Saving output\n");
if (add_label_field)
{
if (pcl::getFieldIndex (input_pointcloud2, "label") >= 0)
PCL_WARN ("Input cloud already has a label field. It will be overwritten by the lccp segmentation output.\n");
pcl::PCLPointCloud2 output_label_cloud2, output_concat_cloud2;
pcl::toPCLPointCloud2 (*lccp_labeled_cloud, output_label_cloud2);
pcl::concatenateFields (input_pointcloud2, output_label_cloud2, output_concat_cloud2);
pcl::io::savePCDFile (outputname + "_out.pcd", output_concat_cloud2, Eigen::Vector4f::Zero (), Eigen::Quaternionf::Identity (), save_binary_pcd);
}
else
pcl::io::savePCDFile (outputname + "_out.pcd", *lccp_labeled_cloud, save_binary_pcd);
if (sv_output_specified)
{
pcl::io::savePCDFile (outputname + "_svcloud.pcd", *sv_centroid_normal_cloud, save_binary_pcd);
}
}
}
else
{
PCL_ERROR ("ERROR:: Sizes of input cloud and labeled supervoxel cloud do not match. No output is produced.\n");
}
*/
return (0);
}
| 34.157509 | 158 | 0.692011 | [
"vector"
] |
251f5f535262d9a08382964167833685c05d694d | 369 | cpp | C++ | cpp20_initializers.cpp | dominc8/c_cpp_examples | 3a5579aa848975276772f12ca495ea7ca97c72ce | [
"MIT"
] | null | null | null | cpp20_initializers.cpp | dominc8/c_cpp_examples | 3a5579aa848975276772f12ca495ea7ca97c72ce | [
"MIT"
] | null | null | null | cpp20_initializers.cpp | dominc8/c_cpp_examples | 3a5579aa848975276772f12ca495ea7ca97c72ce | [
"MIT"
] | null | null | null | #include <vector>
#include <iostream>
struct A {
int x;
int y;
int z = 123;
};
int main(void)
{
/* C-style initializers */
A a {.x{1}, .z = 2}; // a.x == 1, a.y == 0, a.z == 2
/* range-based for loop initializers */
for (std::vector v{1, 2, 3}; auto& e : v)
{
std::cout << e << ", ";
}
std::cout << "\n";
return 0;
}
| 14.192308 | 56 | 0.455285 | [
"vector"
] |
254419e13debc21056ad15fec2a3bc13f16b3777 | 3,045 | cpp | C++ | round-trip-through-throw/main.cpp | johnmcfarlane/ehct | 1d08c46d35d970a1cdcd41217b8f7d922b1b39cc | [
"MIT"
] | 3 | 2019-02-14T20:34:40.000Z | 2019-08-25T23:32:24.000Z | round-trip-through-throw/main.cpp | johnmcfarlane/ehct | 1d08c46d35d970a1cdcd41217b8f7d922b1b39cc | [
"MIT"
] | null | null | null | round-trip-through-throw/main.cpp | johnmcfarlane/ehct | 1d08c46d35d970a1cdcd41217b8f7d922b1b39cc | [
"MIT"
] | 1 | 2018-04-11T22:02:19.000Z | 2018-04-11T22:02:19.000Z |
#include <cassert>
#include <type_traits>
#include <vector>
#ifndef ROUND_TRIP_ERRORS_THROUGH_EH
#warning "you should pass -DROUND_TRIP_ERRORS_THROUGH_EH=0 if you want that"
#endif
struct throw_colored_t{};
template<class T>
struct Result {
T value;
int error;
};
#define MAGIC_THROWING(...) \
[&]() { \
auto result = __VA_ARGS__; \
if (result.error) throw result.error; \
return result.value; \
}()
#define MAGIC_UNTHROWING(dummy_result, ...) \
try { __VA_ARGS__ } \
catch (int error) { return {dummy_result, error}; }
namespace stdx {
Result<int> sqrt(int x, throw_colored_t) noexcept {
if (x < 0) return {0, 1};
// Make the compiler's job super easy. Don't even bother to take the square root here.
return {x, 0};
}
// This is the "natively, perhaps conditionally, throw-colored std::transform".
// Notice that it requires work on the metaprogrammer's part.
template<class It, class OutIt, class ThrowColoredUnaryOp>
Result<OutIt> transform(It first, It last, OutIt dest, ThrowColoredUnaryOp f, throw_colored_t) noexcept
{
static_assert(std::is_trivially_copyable<Result<OutIt>>::value, "");
while (first != last) {
auto temp = f(*first);
if (temp.error) return {dest, temp.error};
*dest = temp.value;
++dest;
++first;
}
return {dest, 0};
}
// This is the same old C++03-era std::transform,
// plus our hypothetical "compiler magic" to convert
// throw-colored lambdas into normal-colored ones.
template<class It, class OutIt, class ThrowColoredUnaryOp>
OutIt transform(It first, It last, OutIt dest, ThrowColoredUnaryOp f)
{
while (first != last) {
*dest = MAGIC_THROWING(f(*first));
++dest;
++first;
}
return dest;
}
} // namespace stdx
Result<int> convert_ints_to_sqrts(
int *first, int *last,
int *dst,
throw_colored_t)
{
static_assert(std::is_trivially_copyable<Result<int>>::value, "");
#if ROUND_TRIP_ERRORS_THROUGH_EH
// This is our normal-looking call to std::transform,
// plus the hypothetical compiler magic.
MAGIC_UNTHROWING(0,
stdx::transform(
first, last,
dst,
[](auto&& p) noexcept { return stdx::sqrt(p, throw_colored_t{}); }
);
);
return {0, 0};
#else
// This is a "natively throw-colored" version,
// involving no normal-colored EH machinery at all.
auto result = stdx::transform(
first, last,
dst,
[](auto&& p) noexcept { return stdx::sqrt(p, throw_colored_t{}); },
throw_colored_t{}
);
return {0, result.error};
#endif
}
int main()
{
int src[8] = { 1, 2, 9, -1, 4, -16, 16, 9 };
int dst[8] = {};
auto result = convert_ints_to_sqrts(src, src + 8, dst, throw_colored_t{});
assert(result.error == 1);
assert(dst[0] == 1);
assert(dst[1] == 2);
assert(dst[2] == 9);
assert(dst[3] == 0);
assert(dst[4] == 0);
assert(dst[5] == 0);
assert(dst[6] == 0);
assert(dst[7] == 0);
}
| 26.946903 | 103 | 0.621675 | [
"vector",
"transform"
] |
8583809125812ece7432009f1e7e172e6fb2f666 | 1,559 | cxx | C++ | tests/parser_tests.cxx | lukaszgemborowski/args | cd9ee23c233554d4d8722f958e7339772dc00b18 | [
"MIT"
] | null | null | null | tests/parser_tests.cxx | lukaszgemborowski/args | cd9ee23c233554d4d8722f958e7339772dc00b18 | [
"MIT"
] | null | null | null | tests/parser_tests.cxx | lukaszgemborowski/args | cd9ee23c233554d4d8722f958e7339772dc00b18 | [
"MIT"
] | null | null | null | #include "catch.hpp"
#include <args/args.hpp>
struct CreateArgs
{
CreateArgs(std::initializer_list<std::string> a)
{
args_.push_back({});
for (auto v : a) {
std::vector<char> current{
v.begin(), v.end()};
current.push_back(0);
args_.push_back(current);
}
for (auto &v : args_) {
argv_.push_back(&v[0]);
}
}
int argc() const
{
return args_.size();
}
char** argv()
{
return &argv_[0];
}
private:
std::vector<char *> argv_;
std::vector<std::vector<char>> args_;
};
TEST_CASE("Parse int, value found", "[args][parser]")
{
auto opt_a = args::opt{'a', 12};
auto cmd = CreateArgs{"-a", "42"};
auto parser = args::parser{opt_a};
parser.parse(cmd.argc(), cmd.argv());
REQUIRE(opt_a.found());
REQUIRE(opt_a.value() == 42);
}
TEST_CASE("Parse int, not found", "[args][parser]")
{
auto opt_a = args::opt{'a', 12};
auto cmd = CreateArgs{};
auto parser = args::parser{opt_a};
parser.parse(cmd.argc(), cmd.argv());
REQUIRE(opt_a.found() == false);
REQUIRE(opt_a.value() == 12);
}
TEST_CASE("Parse int, save to variable, value found", "[args][parser]")
{
int val_a = 0;
auto opt_a = args::opt{'a', 12, args::save{val_a}};
auto cmd = CreateArgs{"-a", "42"};
auto parser = args::parser{opt_a};
parser.parse(cmd.argc(), cmd.argv());
REQUIRE(opt_a.found() == true);
REQUIRE(opt_a.value() == 42);
REQUIRE(val_a == 42);
}
| 21.067568 | 71 | 0.543297 | [
"vector"
] |
858430266aa458eceb8a19d61c49b18f6a66d9ad | 774 | cpp | C++ | src/Utilities/Mesh.cpp | BrianErikson/GameEngine | afe798607dda0a6a367867382d628fe02192643c | [
"MIT"
] | null | null | null | src/Utilities/Mesh.cpp | BrianErikson/GameEngine | afe798607dda0a6a367867382d628fe02192643c | [
"MIT"
] | 2 | 2017-04-05T01:23:55.000Z | 2017-04-05T02:29:45.000Z | src/Utilities/Mesh.cpp | BrianErikson/GameEngine | afe798607dda0a6a367867382d628fe02192643c | [
"MIT"
] | null | null | null |
#include "Mesh.h"
Mesh::Mesh(MeshType type) {
this->type = type;
this->mesh = std::vector<Vector3>();
this->polyMesh = std::vector<Polygon>();
}
void Mesh::add(Vector3 vert) {
if (this->type != MeshType::POLYGON) {
this->mesh.push_back(vert);
}
}
void Mesh::add(Polygon polygon) {
if (this->type == MeshType::POLYGON) {
this->polyMesh.push_back(polygon);
}
}
void Mesh::render(const double &deltaTime) {
if (this->type == MeshType::POLYGON) {
for (int i = 0; i < this->polyMesh.size(); i++) {
this->polyMesh[i].render(deltaTime);
}
}
// TODO: Add support for drawing verts instead of polygons
/*
for (int i = 0; i < this->mesh.size(); i++) {
Vector3 vert = this->mesh[i];
glColor3f(0.f, 0.f, 1.f);
glVertex3f(vert.x, vert.y, vert.z);
}*/
} | 22.114286 | 59 | 0.624031 | [
"mesh",
"render",
"vector"
] |
8585edf4dd93c03d3badbd0ac1c015b3acd0ab28 | 2,893 | hpp | C++ | include/merely3d/renderable.hpp | digitalillusions/merely3d | c14326d4bef325b64da25fb8bf79c32665299549 | [
"MIT"
] | 5 | 2019-01-07T12:31:10.000Z | 2020-12-31T04:47:16.000Z | include/merely3d/renderable.hpp | digitalillusions/merely3d | c14326d4bef325b64da25fb8bf79c32665299549 | [
"MIT"
] | 8 | 2018-10-18T13:54:29.000Z | 2019-02-06T13:48:24.000Z | include/merely3d/renderable.hpp | digitalillusions/merely3d | c14326d4bef325b64da25fb8bf79c32665299549 | [
"MIT"
] | 2 | 2019-02-03T19:10:31.000Z | 2019-02-05T14:10:15.000Z | #pragma once
#include <Eigen/Dense>
#include <merely3d/material.hpp>
#include <merely3d/types.hpp>
namespace merely3d
{
template <typename Shape>
struct Renderable
{
Shape shape;
Eigen::Vector3f position;
UnalignedQuaternionf orientation;
Eigen::Vector3f scale;
Material material;
Renderable(Shape shape)
: shape(std::move(shape)),
position(Eigen::Vector3f::Zero()),
orientation(Eigen::Quaternionf::Identity()),
scale(Eigen::Vector3f(1.0f, 1.0f, 1.0f))
{}
Renderable(Shape shape,
const Eigen::Vector3f & position,
const Eigen::Quaternionf & orientation,
const Eigen::Vector3f & scale,
Material material)
: shape(std::move(shape)),
position(position),
orientation(orientation),
scale(scale),
material(material)
{}
template <typename OtherShape>
Renderable<OtherShape> with_shape(OtherShape shape)
{
auto result = Renderable<OtherShape>(std::move(shape));
result.position = position;
result.orientation = orientation;
result.scale = scale;
result.material = material;
return result;
}
Renderable<Shape> with_position(const Eigen::Vector3f & position)
{
auto result = *this;
result.position = position;
return result;
}
Renderable<Shape> with_position(float x, float y, float z)
{
return with_position(Eigen::Vector3f(x, y, z));
}
template <typename IntoOrientation>
Renderable<Shape> with_orientation(const IntoOrientation & orientation)
{
auto result = *this;
result.orientation = orientation;
return result;
}
Renderable<Shape> with_scale(const Eigen::Vector3f & scale)
{
auto result = *this;
result.scale = scale;
return result;
}
Renderable<Shape> with_scale(float x_scale, float y_scale, float z_scale)
{
return with_scale(Eigen::Vector3f(x_scale, y_scale, z_scale));
}
Renderable<Shape> with_uniform_scale(float scale)
{
return with_scale(scale, scale, scale);
}
Renderable<Shape> with_material(const Material & material)
{
auto result = *this;
result.material = material;
return result;
}
};
template <typename Shape>
inline Renderable<Shape> renderable(Shape shape)
{
return Renderable<Shape>(std::move(shape));
}
} | 29.222222 | 81 | 0.538541 | [
"shape"
] |
858c49499a6b14a3482ff2d813ea81a6cca662d1 | 7,146 | cpp | C++ | EngineDX/EngineDX/DrawGui.cpp | khanIdris/DirectX-3D-Mesh-Editor | 0106297e132f4cfa29b6c48c3bc5c1defcd1de39 | [
"MIT"
] | 8 | 2021-09-21T15:26:09.000Z | 2021-12-15T06:29:22.000Z | EngineDX/EngineDX/DrawGui.cpp | IvanParera/DirectX-3D-Mesh-Editor | 0106297e132f4cfa29b6c48c3bc5c1defcd1de39 | [
"MIT"
] | null | null | null | EngineDX/EngineDX/DrawGui.cpp | IvanParera/DirectX-3D-Mesh-Editor | 0106297e132f4cfa29b6c48c3bc5c1defcd1de39 | [
"MIT"
] | 6 | 2021-09-21T15:26:25.000Z | 2021-12-14T18:36:06.000Z | #pragma once
#include "pch.h"
#include "drawgui.h"
#include "SolidShader.h"
#include "CGUI.h"
#include "ModelLoader.h"
// external objects decleared in main.h
extern ModelLoader SLoader;
extern CGUI SGUI;
extern std::vector<CMesh> vMeshString;
extern std::vector<short> vSelectedMeshID;
extern short VertexModelID;
extern short FaceModelID;
extern void UpdateShaderString();
static std::string dir = "C:\\*";
static size_t find_in_Str(const char* str, const char* to_find, size_t str_size, size_t size)
{
for (int i = 0; i < str_size - size; i++)
if(memcmp(&str[i], to_find, size - 1) == 0) return i;
return -1;
}
static int IsExt(std::string str, const char* ext)
{
size_t ext_p = find_in_Str(str.c_str(), ".", str.size(), sizeof("."));
if (ext_p != -1)
{
if (str.substr(ext_p, (str.size() - ext_p)) == ext)
return 1;
}
else return 0;
return -1;
}
void DrawGUI()
{
MainMenu();
}
void MainMenu()
{
static ImGuiDockNodeFlags dockspace_flags = ImGuiDockNodeFlags_None | ImGuiDockNodeFlags_PassthruCentralNode;
ImGuiWindowFlags window_flags = ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_DockNodeHost;
ImGuiViewport* viewport = ImGui::GetMainViewport();
ImGui::SetNextWindowPos(viewport->Pos);
ImGui::SetNextWindowSize(viewport->Size);
ImGui::SetNextWindowViewport(viewport->ID);
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
window_flags |= ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove;
window_flags |= ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoNavFocus;
window_flags |= ImGuiWindowFlags_NoBackground;
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
ImGui::Begin("DockSpace", nullptr, window_flags);
ImGui::PopStyleVar();
ImGui::PopStyleVar(2);
// DockSpace
ImGuiIO& io = ImGui::GetIO();
ImGuiID dockspace_id = ImGui::GetID("DockSpace");
ImGui::DockSpace(dockspace_id, ImVec2(0.0f, 0.0f), dockspace_flags);
if (ImGui::BeginMainMenuBar())
{
FileMenu();
EditMenu();
}
// DockSpace
ImGui::EndMainMenuBar();
//DirectoryPane();
PropertiesPane();
Toolbox();
ImGui::End();
}
void FileMenu()
{
if (ImGui::BeginMenu("File"))
{
if (ImGui::MenuItem("SampleModel"))
{
SLoader.LoadModel("teapot.obj", &vMeshString);
UpdateShaderString();
}
ImGui::EndMenu();
}
}
void EditMenu()
{
if (ImGui::BeginMenu("Edit"))
{
}
}
static int b_size = 50;
static bool anything = false;
static WIN32_FIND_DATA w_data;
static HANDLE* hFind;
//void DirectoryPane()
//{
// hFind = new HANDLE;
// ImGui::Begin("Project Directory");
// ImGui::NewLine();
// //
// //{
// // ImGui::Begin("Drives");
//
// // char* drive = new char[130];
// // GetLogicalDriveStrings(130, drive);
//
// // for (int i = 0; i < 130; i += 4)
// // {
// // if (char(drive[i]) == -52 || char(drive[i]) == 0)
// // break;
// // else
// // {
// // if (ImGui::Button(&drive[i], ImVec2(ImGui::GetWindowWidth() - 15, 20)))
// // {
// // dir = &drive[i];
// // dir += "\*";
// // }
// // }
// // }
// // ImGui::End();
// // if (drive) delete[130] drive;
// //}
// if(ImGui::Button("Back", ImVec2(100, 20)))
// {
// if (dir.length() > 5)
// {
// dir = dir.substr(0, dir.length() - 3);
// dir = dir.substr(0, dir.find("\\", sizeof("\\")) + 1) + "*";
// }
// else dir = "";
// }
// ImGui::SameLine();
// ImGui::SliderInt("Grid", &b_size, 50, 100, "%d");
//
// if ((*hFind = FindFirstFile(dir.c_str(), &w_data)) != INVALID_HANDLE_VALUE)
// {
// while (FindNextFile(*hFind, &w_data) != 0)
// if (IsExt(w_data.cFileName, ".obj") > -1 || IsExt(w_data.cFileName, ".fbx") > -1)
// {
// if (ImGui::GetWindowWidth() > 77 && b_size > 0)
// {
// ImGui::Columns(ImGui::GetWindowWidth() / b_size);
// {
// if (ImGui::Button(std::string(w_data.cFileName).c_str(), ImVec2(b_size - 13, b_size - 13)))
// {
// if (IsExt(w_data.cFileName, ".obj") || IsExt(w_data.cFileName, ".fbx"))
// {
// SLoader.LoadModel(w_data.cFileName, &vMeshString);
// UpdateShaderString();
// }
// else
// {
// dir = dir.substr(0, dir.length() - 1);
// dir.append(w_data.cFileName);
// dir.append("\\*");
// }
// }
// ImGui::TextWrapped(w_data.cFileName);
// ImGui::NextColumn();
// }
// }
// }
// }
// delete[] hFind;
// ImGui::End();
//
//}
void PropertiesPane()
{
ImGui::Begin("Properties");
for (int i = 0; i < vSelectedMeshID.size(); i++)
{
if (ImGui::CollapsingHeader("Details"))
{
if (ImGui::TreeNode("Primitives"))
{
ImGui::Text("Vertices: %d", vMeshString[vSelectedMeshID[i]].GetVerticesCount());
ImGui::Text("Triangles: %d", vMeshString[vSelectedMeshID[i]].GetIndicesCount() / 3);
ImGui::Text("Indices: %d", vMeshString[vSelectedMeshID[i]].GetIndicesCount());
ImGui::TreePop();
}
}
if (ImGui::CollapsingHeader("Transform"))
{
if (ImGui::TreeNode("Translate"))
{
// X translation DragFloat
ImGui::DragFloat("X",
(float*)&vMeshString[vSelectedMeshID[i]].GetModelMatrix().r[3].m128_f32[0],
0.3f,
(float)vMeshString[vSelectedMeshID[i]].GetModelMatrix().r[3].m128_f32[0] - 100.f,
(float)vMeshString[vSelectedMeshID[i]].GetModelMatrix().r[3].m128_f32[0] + 100.f,
"%.3f",
1.0f);
// Y translation DragFloat
vMeshString[vSelectedMeshID[i]].GetModelMatrix();
ImGui::DragFloat("Y",
(float*)&vMeshString[vSelectedMeshID[i]].GetModelMatrix().r[3].m128_f32[1],
0.3f,
(float)vMeshString[vSelectedMeshID[i]].GetModelMatrix().r[3].m128_f32[1] - 100.f,
(float)vMeshString[vSelectedMeshID[i]].GetModelMatrix().r[3].m128_f32[1] + 100.f,
"%.3f",
1.0f);
// Z translation DragFloat
vMeshString[vSelectedMeshID[i]].GetModelMatrix();
ImGui::DragFloat("Z",
(float*)&vMeshString[vSelectedMeshID[i]].GetModelMatrix().r[3].m128_f32[2],
0.3f,
(float)vMeshString[vSelectedMeshID[i]].GetModelMatrix().r[3].m128_f32[2] - 100.f,
(float)vMeshString[vSelectedMeshID[i]].GetModelMatrix().r[3].m128_f32[2] + 100.f,
"%.3f",
1.0f);
ImGui::TreePop();
}
if (ImGui::TreeNode("Rotate"))
{
ImGui::TreePop();
}
if (ImGui::TreeNode("Scale"))
{
ImGui::TreePop();
}
}
if (ImGui::CollapsingHeader("Edit Primitives"))
{
if (ImGui::Button("Edit Vertices", ImVec2(ImGui::GetWindowWidth(), 25)))
{
VertexModelID != vSelectedMeshID[i] ? VertexModelID = vSelectedMeshID[i] : VertexModelID = -1;
}
if(ImGui::Button("Edit Triangles", ImVec2(ImGui::GetWindowWidth(), 25)))
{
FaceModelID != vSelectedMeshID[i] ? FaceModelID = vSelectedMeshID[i] : FaceModelID = -1;
}
}
break;
}
ImGui::End();
}
void Toolbox()
{
ImGui::Begin("Toolbox prototype");
if (ImGui::Button("T", ImVec2(31, 31)))
{
SGUI.GizmoTranslate();
}
ImGui::SameLine();
if (ImGui::Button("R", ImVec2(31, 31)))
{
SGUI.GizmoRotate();
}
ImGui::SameLine();
if (ImGui::Button("S", ImVec2(31, 31)))
{
SGUI.GizmoScale();
}
ImGui::End();
}
| 25.891304 | 129 | 0.624965 | [
"vector",
"transform"
] |
85905af2667651810a5ffd731368bce697406941 | 10,892 | cpp | C++ | src/prod/src/Common/IpUtility.cpp | gridgentoo/ServiceFabricAzure | c3e7a07617e852322d73e6cc9819d266146866a4 | [
"MIT"
] | 2,542 | 2018-03-14T21:56:12.000Z | 2019-05-06T01:18:20.000Z | src/prod/src/Common/IpUtility.cpp | gridgentoo/ServiceFabricAzure | c3e7a07617e852322d73e6cc9819d266146866a4 | [
"MIT"
] | 994 | 2019-05-07T02:39:30.000Z | 2022-03-31T13:23:04.000Z | src/prod/src/Common/IpUtility.cpp | gridgentoo/ServiceFabricAzure | c3e7a07617e852322d73e6cc9819d266146866a4 | [
"MIT"
] | 300 | 2018-03-14T21:57:17.000Z | 2019-05-06T20:07:00.000Z | // ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#include "stdafx.h"
#if defined(PLATFORM_UNIX)
#include <ifaddrs.h>
#include <resolv.h>
#include <arpa/inet.h>
#endif
using namespace std;
using namespace Common;
ErrorCode IpUtility::GetDnsServers(
__out std::vector<std::wstring> & list
)
{
#if !defined(PLATFORM_UNIX)
ByteBuffer buffer;
ULONG bufferSize = 0;
DWORD error = GetNetworkParams((FIXED_INFO*)buffer.data(), /*inout*/&bufferSize);
if (error == ERROR_BUFFER_OVERFLOW)
{
buffer.resize(bufferSize);
error = GetNetworkParams((FIXED_INFO*)buffer.data(), /*inout*/&bufferSize);
}
if (error != ERROR_SUCCESS)
{
return ErrorCode::FromWin32Error(error);
}
FIXED_INFO* pFixedInfo = (FIXED_INFO*)buffer.data();
ASSERT_IFNOT(pFixedInfo != nullptr, "Expected a valid FIXED_INFO buffer");
IP_ADDR_STRING* pIPAddr = &pFixedInfo->DnsServerList;
while (pIPAddr != nullptr)
{
std::string address(pIPAddr->IpAddress.String);
std::wstring addressW;
StringUtility::Utf8ToUtf16(address, addressW);
list.push_back(addressW);
pIPAddr = pIPAddr->Next;
}
#else
struct __res_state state;
int error = res_ninit(/*out*/&state);
if (error == -1)
{
return ErrorCode::FromWin32Error(errno);
}
for (int i = 0; i < state.nscount; i++)
{
SOCKADDR_IN& addr = state.nsaddr_list[i];
char address[INET_ADDRSTRLEN];
Invariant(inet_ntop(AF_INET, &addr.sin_addr, address, sizeof(address)));
std::wstring addressW;
StringUtility::Utf8ToUtf16(address, addressW);
list.push_back(addressW);
}
#endif
return ErrorCode::Success();
}
ErrorCode IpUtility::GetDnsServersPerAdapter(
__out std::map<std::wstring, std::vector<std::wstring>> & map
)
{
#if !defined(PLATFORM_UNIX)
const DWORD flags = GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST | GAA_FLAG_SKIP_UNICAST;
ByteBuffer buffer;
ULONG bufferSize = 0;
DWORD error = GetAdaptersAddresses(AF_INET, flags, NULL, (IP_ADAPTER_ADDRESSES*)buffer.data(), &bufferSize);
if (error == ERROR_BUFFER_OVERFLOW)
{
buffer.resize(bufferSize);
error = GetAdaptersAddresses(AF_INET, flags, NULL, (IP_ADAPTER_ADDRESSES*)buffer.data(), &bufferSize);
}
if (error != ERROR_SUCCESS)
{
return ErrorCode::FromWin32Error(error);
}
IP_ADAPTER_ADDRESSES* pCurrAddresses = reinterpret_cast<IP_ADAPTER_ADDRESSES*>(buffer.data());
while (pCurrAddresses != NULL)
{
std::wstring adapterName = StringUtility::Utf8ToUtf16(pCurrAddresses->AdapterName);
std::vector<std::wstring> addresses;
IP_ADAPTER_DNS_SERVER_ADDRESS* pDnsServer = pCurrAddresses->FirstDnsServerAddress;
while (pDnsServer != NULL)
{
SOCKADDR_IN& dns = (SOCKADDR_IN&)*pDnsServer->Address.lpSockaddr;
WCHAR address[INET_ADDRSTRLEN];
InetNtop(AF_INET, &dns.sin_addr, address, ARRAYSIZE(address));
addresses.push_back(address);
pDnsServer = pDnsServer->Next;
}
if (!addresses.empty())
{
map.insert(std::make_pair(std::move(adapterName), std::move(addresses)));
}
pCurrAddresses = pCurrAddresses->Next;
}
#endif
return ErrorCode::Success();
}
ErrorCode IpUtility::GetIpAddressesPerAdapter(
__out std::map<std::wstring, std::vector<Common::IPPrefix>> & map,
bool byFriendlyName
)
{
#if !defined(PLATFORM_UNIX)
const DWORD flags = GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST | GAA_FLAG_SKIP_DNS_SERVER;
ByteBuffer buffer;
ULONG bufferSize = 0;
DWORD error = GetAdaptersAddresses(AF_INET, flags, NULL, (IP_ADAPTER_ADDRESSES*)buffer.data(), &bufferSize);
if (error == ERROR_BUFFER_OVERFLOW)
{
buffer.resize(bufferSize);
error = GetAdaptersAddresses(AF_INET, flags, NULL, (IP_ADAPTER_ADDRESSES*)buffer.data(), &bufferSize);
}
if (error != ERROR_SUCCESS)
{
return ErrorCode::FromWin32Error(error);
}
IP_ADAPTER_ADDRESSES* pCurrAddresses = reinterpret_cast<IP_ADAPTER_ADDRESSES*>(buffer.data());
while (pCurrAddresses != NULL)
{
std::wstring adapterName = !byFriendlyName ? StringUtility::Utf8ToUtf16(pCurrAddresses->AdapterName) : pCurrAddresses->FriendlyName;
std::vector<IPPrefix> addresses;
IP_ADAPTER_UNICAST_ADDRESS* pUnicast = pCurrAddresses->FirstUnicastAddress;
while (pUnicast != NULL)
{
Endpoint ep(pUnicast->Address);
IPPrefix ipPrefix(ep, pUnicast->OnLinkPrefixLength);
addresses.push_back(ipPrefix);
pUnicast = pUnicast->Next;
}
if (!addresses.empty())
{
map.insert(std::make_pair(std::move(adapterName), std::move(addresses)));
}
pCurrAddresses = pCurrAddresses->Next;
}
#else
struct ifaddrs *ifaddr, *ifa;
if (getifaddrs(&ifaddr) == -1)
{
return ErrorCode::FromWin32Error(errno);
}
ifa = ifaddr;
while (ifa != nullptr)
{
if ((ifa->ifa_addr != nullptr) && (ifa->ifa_addr->sa_family == AF_INET) && (ifa->ifa_netmask != nullptr))
{
SOCKADDR_IN& subnetmask = (SOCKADDR_IN&)*ifa->ifa_netmask;
ULONG mask = subnetmask.sin_addr.s_addr;
int prefix = 0;
// Convert subnet mask to prefix
for (int i = 0; i < 32; i++)
{
if (mask & (1 << i))
{
prefix++;
}
}
std::vector<IPPrefix> addresses;
Endpoint ep(*(ifa->ifa_addr));
IPPrefix ipPrefix(ep, prefix);
addresses.push_back(ipPrefix);
std::wstring adapterName = StringUtility::Utf8ToUtf16(ifa->ifa_name);
if (!addresses.empty())
{
map.insert(std::make_pair(std::move(adapterName), std::move(addresses)));
}
}
ifa = ifa->ifa_next;
}
freeifaddrs(ifaddr);
#endif
return ErrorCode::Success();
}
ErrorCode IpUtility::GetIpAddressOnAdapter(
__in std::wstring adapterName,
ADDRESS_FAMILY addressFamily,
__out std::wstring & ipAddress
)
{
std::map<std::wstring, std::vector<IPPrefix>> adapterIpAddressMap;
auto error = GetIpAddressesPerAdapter(adapterIpAddressMap, true);
if (!error.IsSuccess())
{
return error;
}
for (auto const & ipAdapter : adapterIpAddressMap)
{
if (StringUtility::Contains(ipAdapter.first, adapterName))
{
for (auto const & ip : ipAdapter.second)
{
if ((addressFamily == AF_INET && ip.IsIPV4()) ||
(addressFamily == AF_INET6 && ip.IsIPV6()))
{
ipAddress = ip.GetAddress().GetIpString();
return ErrorCode::Success();
}
}
}
}
return ErrorCode::FromWin32Error(ERROR_NOT_FOUND);
}
ErrorCode IpUtility::GetAdapterAddressOnTheSameNetwork(
__in std::wstring input,
__out std::wstring& output
)
{
Common::Endpoint inputEp;
ErrorCode error = Common::Endpoint::TryParse(input, /*out*/inputEp);
if (!error.IsSuccess())
{
return error;
}
typedef std::map<std::wstring, std::vector<IPPrefix>> IpMap;
IpMap map;
error = GetIpAddressesPerAdapter(map);
if (!error.IsSuccess())
{
return error;
}
for (IpMap::iterator it = map.begin(); it != map.end(); ++it)
{
const std::vector<IPPrefix> & ipAddresses = it->second;
for (int i = 0; i < ipAddresses.size(); i++)
{
const IPPrefix& ip = ipAddresses[i];
if (inputEp.EqualPrefix(ip.GetAddress(), ip.GetPrefixLength()))
{
output = ip.GetAddress().GetIpString();
return ErrorCode::Success();
}
}
}
return ErrorCode::FromWin32Error(ERROR_NOT_FOUND);
}
ErrorCode IpUtility::GetGatewaysPerAdapter(
__out map<wstring, vector<wstring>> &map
)
{
#if !defined(PLATFORM_UNIX)
const DWORD flags = GAA_FLAG_INCLUDE_GATEWAYS;
ByteBuffer buffer;
ULONG bufferSize = 0;
DWORD error = GetAdaptersAddresses(AF_INET, flags, NULL, (IP_ADAPTER_ADDRESSES*)buffer.data(), &bufferSize);
if (error == ERROR_BUFFER_OVERFLOW)
{
buffer.resize(bufferSize);
error = GetAdaptersAddresses(AF_INET, flags, NULL, (IP_ADAPTER_ADDRESSES*)buffer.data(), &bufferSize);
}
if (error != ERROR_SUCCESS)
{
return ErrorCode::FromWin32Error(error);
}
IP_ADAPTER_ADDRESSES* pCurrAddress = reinterpret_cast<IP_ADAPTER_ADDRESSES*>(buffer.data());
while (pCurrAddress)
{
std::wstring adapterName = StringUtility::Utf8ToUtf16(pCurrAddress->AdapterName);
std::vector<std::wstring> addresses;
PIP_ADAPTER_GATEWAY_ADDRESS_LH gatewayAddress = pCurrAddress->FirstGatewayAddress;
while (gatewayAddress)
{
SOCKADDR_IN& sockAddr = (SOCKADDR_IN&)*gatewayAddress->Address.lpSockaddr;
WCHAR ip[16];
InetNtop(AF_INET, &sockAddr.sin_addr, ip, ARRAYSIZE(ip));
addresses.push_back(ip);
gatewayAddress = gatewayAddress->Next;
}
if (!addresses.empty())
{
map.insert(std::make_pair(std::move(adapterName), std::move(addresses)));
}
pCurrAddress = pCurrAddress->Next;
}
return ErrorCodeValue::Success;
#else if
return ErrorCodeValue::NotImplemented;
#endif
}
ErrorCode IpUtility::GetFirstNonLoopbackAddress(
std::map<std::wstring, std::vector<Common::IPPrefix>> addressesPerAdapter,
__out wstring & nonLoopbackIp)
{
std::wregex loopbackaddrIPv4(L"(127.0.0.)(.*)", std::regex::ECMAScript);
std::wregex loopbackaddrIPv6(L"(0000:0000:0000:0000:0000:0000:0000)(.*)", std::regex::ECMAScript);
for (map<wstring, vector<Common::IPPrefix>>::const_iterator it = addressesPerAdapter.begin(); it != addressesPerAdapter.end(); ++it)
{
for (vector<Common::IPPrefix>::const_iterator iit = it->second.begin(); iit != it->second.end(); ++iit)
{
auto address = iit->GetAddress().GetIpString();
if (!regex_match(address, loopbackaddrIPv4) && !regex_match(address, loopbackaddrIPv6))
{
nonLoopbackIp = address;
return ErrorCodeValue::Success;
}
}
}
return ErrorCodeValue::NotFound;
}
| 29.759563 | 140 | 0.615406 | [
"vector"
] |
8593a8eb50b2d9b18dc71678e7968475db39b86b | 11,719 | cc | C++ | tensorflow/c/c_api_experimental.cc | jiongjiongli/mytensorflow | 641f19d880b2f32ac5a11243e0bfbb8e869856d7 | [
"Apache-2.0"
] | 1 | 2018-03-27T17:25:38.000Z | 2018-03-27T17:25:38.000Z | tensorflow/c/c_api_experimental.cc | DandelionCN/tensorflow | 1712002ad02f044f7569224bf465e0ea00e6a6c4 | [
"Apache-2.0"
] | null | null | null | tensorflow/c/c_api_experimental.cc | DandelionCN/tensorflow | 1712002ad02f044f7569224bf465e0ea00e6a6c4 | [
"Apache-2.0"
] | null | null | null | /* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "tensorflow/c/c_api_experimental.h"
#include "tensorflow/c/c_api_internal.h"
#include "tensorflow/compiler/jit/legacy_flags/mark_for_compilation_pass_flags.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/graph/node_builder.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/protobuf/config.pb.h"
using tensorflow::Node;
using tensorflow::NodeBuilder;
using tensorflow::Status;
using tensorflow::Tensor;
// struct TF_Operation { tensorflow::Node node; };
static TF_Operation* ToTF_Operation(Node* node) {
return static_cast<TF_Operation*>(static_cast<void*>(node));
}
void TF_EnableXLACompilation(TF_SessionOptions* options, unsigned char enable) {
tensorflow::ConfigProto& config = options->options.config;
auto* optimizer_options =
config.mutable_graph_options()->mutable_optimizer_options();
if (enable) {
optimizer_options->set_global_jit_level(tensorflow::OptimizerOptions::ON_1);
// These XLA flags are needed to trigger XLA properly from C (more generally
// non-Python) clients. If this API is called again with `enable` set to
// false, it is safe to keep these flag values as is.
tensorflow::legacy_flags::MarkForCompilationPassFlags* flags =
tensorflow::legacy_flags::GetMarkForCompilationPassFlags();
flags->tf_xla_cpu_global_jit = true;
flags->tf_xla_min_cluster_size = 1;
} else {
optimizer_options->set_global_jit_level(tensorflow::OptimizerOptions::OFF);
}
}
void TF_InitializeTPU(TF_Session* session, TF_Status* status) {
VLOG(1) << "Initializing TPU";
TF_Operation* config_op =
TF_GraphOperationByName(session->graph, "ConfigureDistributedTPU");
if (config_op == nullptr) {
status->status = tensorflow::errors::Internal(
"Unable to find node ConfigureDistributedTPU in the TF graph.");
return;
}
TF_Output config_node{config_op, 0};
TF_Tensor* dummy_output;
TF_SessionRun(session, /*run_options*/ nullptr,
// input related parameters
/*inputs*/ nullptr, /*input_values*/ nullptr, /*ninputs*/ 0,
// output related parameters
/*outputs*/ &config_node, /*output_values*/ &dummy_output,
/*noutputs*/ 1,
/*targets*/ nullptr, /*ntargets*/ 0,
/*run_metadata*/ nullptr, status);
if (status->status.ok()) {
TF_DeleteTensor(dummy_output);
}
}
void TF_ShutdownTPU(TF_Session* session, TF_Status* status) {
{
tensorflow::mutex_lock c(session->graph->mu);
VLOG(1) << "Shutting down TPU, with input graph: "
<< session->graph->graph.ToGraphDefDebug().DebugString();
}
TF_Operation* shutdown_op =
TF_GraphOperationByName(session->graph, "ShutdownDistributedTPU");
if (shutdown_op == nullptr) {
status->status = tensorflow::errors::Internal(
"Unable to find node ShutdownDistributedTPU in the TF graph.");
return;
}
TF_SessionRun(session, /*run_options*/ nullptr,
// input related parameters
/*inputs*/ nullptr, /*input_values*/ nullptr, /*ninputs*/ 0,
// output related parameters
/*outputs*/ nullptr, /*output_values*/ nullptr,
/*noutputs*/ 0,
/*targets*/ &shutdown_op, /*ntargets*/ 1,
/*run_metadata*/ nullptr, status);
}
TF_CAPI_EXPORT extern const char* TF_GraphDebugString(TF_Graph* graph,
size_t* len) {
tensorflow::mutex_lock c(graph->mu);
const auto& debug_str = graph->graph.ToGraphDefDebug().DebugString();
*len = debug_str.size();
char* ret = static_cast<char*>(malloc(*len + 1));
memcpy(ret, debug_str.c_str(), *len + 1);
return ret;
}
// TODO(hongm): Replace this will a real implementation.
static tensorflow::Status BuildDatasetTest(TF_Graph* dataset_graph,
Node** dataset_node) {
tensorflow::mutex_lock c(dataset_graph->mu);
Tensor const_t(tensorflow::DT_INT32, tensorflow::TensorShape({}));
const_t.flat<tensorflow::int32>()(0) = 1;
Node* const_node;
TF_RETURN_IF_ERROR(NodeBuilder("Const", "Const")
.Attr("dtype", tensorflow::DT_INT32)
.Attr("value", const_t)
.Finalize(&dataset_graph->graph, &const_node));
std::vector<NodeBuilder::NodeOut> input_list;
input_list.push_back(NodeBuilder::NodeOut(const_node, 0));
return NodeBuilder("TensorDataset", "TensorDataset")
.Input(input_list)
.Attr("Toutput_types", {tensorflow::DT_INT32})
.Attr("output_shapes", {tensorflow::TensorShapeProto()})
.Finalize(&dataset_graph->graph, dataset_node);
}
// On success, returns a newly created TF_Function instance from
// `text_proto`. It must be deleted by calling TF_DeleteFunction.
static TF_Function* CreateFunctionFromTextProto(const char* text_proto,
TF_Status* status) {
tensorflow::FunctionDef fdef;
if (!tensorflow::protobuf::TextFormat::ParseFromString(text_proto, &fdef)) {
status->status = tensorflow::errors::Internal(
"Invalid text proto for FunctionDef: ", text_proto);
return nullptr;
}
std::vector<char> binary_proto_buf(fdef.ByteSizeLong());
fdef.SerializeToArray(binary_proto_buf.data(), binary_proto_buf.size());
return TF_FunctionImportFunctionDef(binary_proto_buf.data(),
binary_proto_buf.size(), status);
}
// On success, returns a newly created TF_Function instance from `proto_file`,
// and sets `dataset_name` to the created dataset name. The returned function
// must be deleted by calling TF_DeleteFunction.
//
// TODO(hongm): Support reading the file given by `proto_file`.
static TF_Function* LoadDatasetFunction(const char* proto_file,
std::string* dataset_name,
TF_Status* status) {
const char* func_def = R"PREFIX(
signature {
name: "_make_dataset_d8de2712"
output_arg {
name: "TensorSliceDataset"
type: DT_VARIANT
}
is_stateful: true
}
node_def {
name: "TensorSliceDataset/tensors/component_0"
op: "Const"
attr {
key: "dtype"
value {
type: DT_FLOAT
}
}
attr {
key: "value"
value {
tensor {
dtype: DT_FLOAT
tensor_shape {
dim {
size: 3
}
}
tensor_content: "\000\000(B\000\000,B\000\0000B"
}
}
}
}
node_def {
name: "TensorSliceDataset"
op: "TensorSliceDataset"
input: "TensorSliceDataset/tensors/component_0:output:0"
attr {
key: "Toutput_types"
value {
list {
type: DT_FLOAT
}
}
}
attr {
key: "output_shapes"
value {
list {
shape {
}
}
}
}
}
ret {
key: "TensorSliceDataset"
value: "TensorSliceDataset:handle:0"
})PREFIX";
*dataset_name = "_make_dataset_d8de2712";
return CreateFunctionFromTextProto(func_def, status);
}
// TODO(hongm): Use `file_path` in the implementation.
TF_Operation* TF_MakeIteratorGetNextWithDatasets(TF_Graph* graph,
const char* file_path,
TF_Function** dataset_func,
TF_Status* status) {
tensorflow::Status s;
// We can parameterize the function name, if we ever need more than 1
// iterators in a graph.
const std::string dataset_name = "UNIQUE_DATASET";
std::unique_ptr<TF_Graph, decltype(&TF_DeleteGraph)> dataset_graph(
TF_NewGraph(), TF_DeleteGraph);
Node* dataset_node = nullptr;
s = BuildDatasetTest(dataset_graph.get(), &dataset_node);
if (!s.ok()) {
status->status = s;
return nullptr;
}
TF_Output output{ToTF_Operation(dataset_node), 0};
std::unique_ptr<TF_Function, decltype(&TF_DeleteFunction)> result_func(
TF_GraphToFunction(dataset_graph.get(), dataset_name.c_str(),
/*append_hash_to_fn_name*/ false,
/*num_opers*/ -1,
/*opers*/ nullptr,
/*numinputs*/ 0,
/*inputs*/ nullptr,
/*noutputs*/ 1,
/*outputs*/ &output,
/*outputnames*/ nullptr,
/*functionoptions*/ nullptr, "", status),
TF_DeleteFunction);
if (!status->status.ok()) {
return nullptr;
}
TF_GraphCopyFunction(graph, result_func.get(), /*gradient*/ nullptr, status);
if (!status->status.ok()) {
return nullptr;
}
tensorflow::mutex_lock c(graph->mu);
tensorflow::NameAttrList func;
func.set_name(dataset_name);
// Run the iterator node on CPU.
Node* oneshot_iterator_node;
std::vector<tensorflow::TensorShapeProto> output_shape_list;
output_shape_list.push_back(tensorflow::TensorShapeProto());
s = NodeBuilder("OneShotIterator", "OneShotIterator")
.Device("/device:CPU:0")
.Attr("container", "")
.Attr("dataset_factory", func)
.Attr("output_types", {tensorflow::DT_INT32})
.Attr("output_shapes", output_shape_list)
.Attr("shared_name", "")
.Finalize(&graph->graph, &oneshot_iterator_node);
if (!s.ok()) {
status->status = s;
return nullptr;
}
// Run shape inference function for each newly added node, so that more
// subsequent nodes can be added to the graph via C API (TF_NewOperation()).
s = graph->refiner.AddNode(oneshot_iterator_node);
if (!s.ok()) {
status->status = s;
return nullptr;
}
// Run the iterator node on CPU.
Node* getnext_node;
s = NodeBuilder("IteratorGetNext", "IteratorGetNext")
.Input(oneshot_iterator_node)
.Device("/device:CPU:0")
.Attr("output_types", {tensorflow::DT_INT32})
.Attr("output_shapes", output_shape_list)
.Finalize(&graph->graph, &getnext_node);
if (!s.ok()) {
status->status = s;
return nullptr;
}
// Run shape inference function for each newly added node, so that more
// subsequent nodes can be added to the graph via C API (TF_NewOperation()).
s = graph->refiner.AddNode(getnext_node);
if (!s.ok()) {
status->status = s;
return nullptr;
}
VLOG(1) << "Output graph: " << graph->graph.ToGraphDefDebug().DebugString();
*dataset_func = result_func.release();
return ToTF_Operation(getnext_node);
}
void TF_GetAttrScalarTensorShapeProto(TF_Buffer* value, TF_Status* status) {
status->status = Status::OK();
auto shape = tensorflow::TensorShape({});
tensorflow::TensorShapeProto shape_proto;
shape.AsProto(&shape_proto);
status->status = MessageToBuffer(shape_proto, value);
}
| 35.620061 | 81 | 0.630515 | [
"shape",
"vector"
] |
8599ab9e2264db23b27706c1d27a834e2c53d70d | 1,642 | cpp | C++ | string/maximum-product-of-the-length-of-two-palindromic-substrings.cpp | Nilesh-Das/mustdogfg | bb39fe6eb9dd4964f97a7ab6d4e65e4c3994fc3f | [
"MIT"
] | null | null | null | string/maximum-product-of-the-length-of-two-palindromic-substrings.cpp | Nilesh-Das/mustdogfg | bb39fe6eb9dd4964f97a7ab6d4e65e4c3994fc3f | [
"MIT"
] | null | null | null | string/maximum-product-of-the-length-of-two-palindromic-substrings.cpp | Nilesh-Das/mustdogfg | bb39fe6eb9dd4964f97a7ab6d4e65e4c3994fc3f | [
"MIT"
] | null | null | null | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define ll int64_t
using namespace std;
// https://leetcode.com/problems/maximum-product-of-the-length-of-two-palindromic-substrings
ll maxProduct(string s) {
int n = s.size();
// no of odd length palindrome with center i
vector<ll> d(n);
// max length of odd palindromes from [0:i]
vector<ll> ltr(n, 1);
for(ll i = 0, l = 0, r = -1; i < n; i++) {
ll k = (i > r) ? 1 : min(d[l + r - i], r - i + 1);
while (0 <= i - k && i + k < n && s[i - k] == s[i + k]) {
ltr[i + k] = 2 * k + 1;
k++;
}
d[i] = k--;
if (i + k > r) {
l = i - k;
r = i + k;
}
}
// max length of odd palindromes from [i:n]
string ns = string(s.rbegin(), s.rend());
vector<int> rtl(n, 1);
for(ll i = 0, l = 0, r = -1; i < n; i++) {
ll k = (i > r) ? 1 : min(d[l + r - i], r - i + 1);
while (0 <= i - k && i + k < n && ns[i - k] == ns[i + k]) {
rtl[i + k] = 2 * k + 1;
k++;
}
d[i] = k--;
if (i + k > r) {
l = i - k;
r = i + k;
}
}
reverse(rtl.begin(), rtl.end());
for(int i = 1; i < n; i++) ltr[i] = max(ltr[i], ltr[i-1]);
for(int i = n-2; i >= 0; i--) rtl[i] = max(rtl[i], rtl[i+1]);
ll res = 0;
for(int i = 1; i < n; i++) res = max(res, ltr[i-1]*rtl[i]);
return res;
}
/*
ababbb
zaaaxbbby
9
9
*/
int main() {
int t;
cin >> t;
while(t--) {
string s;
cin >> s;
cout << maxProduct(s) << '\n';
}
} | 24.507463 | 92 | 0.412911 | [
"vector"
] |
859f9521d77e3edaa19698e20c1887c335aed89e | 2,790 | hpp | C++ | src/Trigonometric.hpp | x4kkk3r/IOMath | 1101090023b57bd2db34e5a3e07a620b9311ac0b | [
"MIT"
] | 3 | 2020-07-23T11:49:35.000Z | 2020-07-24T12:22:28.000Z | src/Trigonometric.hpp | x4kkk3r/IOMath | 1101090023b57bd2db34e5a3e07a620b9311ac0b | [
"MIT"
] | null | null | null | src/Trigonometric.hpp | x4kkk3r/IOMath | 1101090023b57bd2db34e5a3e07a620b9311ac0b | [
"MIT"
] | 1 | 2020-07-23T12:18:58.000Z | 2020-07-23T12:18:58.000Z | /*
MIT License
Copyright (c) 2020 x4kkk3r
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef _IO_MATH_TRIGONOMETRIC_HPP
#define _IO_MATH_TRIGONOMETRIC_HPP
#include "detail/ComputeTrigonometric.hpp"
namespace IOMath
{
template <typename T>
constexpr T Radians(T degrees) noexcept
{
return detail::ComputeRadians(degrees);
}
template <typename T>
constexpr T Degrees(T radians) noexcept
{
return detail::ComputeDegrees(radians);
}
template <size_t S, typename T>
constexpr Types::TVector<S, T> Radians(Types::TVector<S, T> const &object) noexcept
{
return detail::ComputeRadians(object);
}
template <size_t S, typename T>
constexpr Types::TVector<S, T> Degrees(Types::TVector<S, T> const &object) noexcept
{
return detail::ComputeDegrees(object);
}
template <size_t S, typename T>
constexpr Types::TVector<S, T> Sine(Types::TVector<S, T> const &object) noexcept
{
return detail::ComputeSine(object);
}
template <size_t S, typename T>
constexpr Types::TVector<S, T> Cosine(Types::TVector<S, T> const &object) noexcept
{
return detail::ComputeCosine(object);
}
template <size_t S, typename T>
constexpr Types::TVector<S, T> Tangent(Types::TVector<S, T> const &object) noexcept
{
return detail::ComputeTangent(object);
}
template <size_t S, typename T>
constexpr Types::TVector<S, T> Arsine(Types::TVector<S, T> const &object) noexcept
{
return detail::ComputeArcsine(object);
}
template <size_t S, typename T>
constexpr Types::TVector<S, T> Arccosine(Types::TVector<S, T> const &object) noexcept
{
return detail::ComputeArccosine(object);
}
template <size_t S, typename T>
constexpr Types::TVector<S, T> Arctangent(Types::TVector<S, T> const &object) noexcept
{
return detail::ComputeArctangent(object);
}
}
#endif | 30 | 87 | 0.751254 | [
"object"
] |
85a40dcf01219859fb3f76abf2bc622dac1b5f57 | 638 | cpp | C++ | Src/Windows/CommandLine.cpp | cdoty/SuperPlayExtended | 0a9717c44b8e3820afeaf0673f86b152daf88cd7 | [
"MIT"
] | null | null | null | Src/Windows/CommandLine.cpp | cdoty/SuperPlayExtended | 0a9717c44b8e3820afeaf0673f86b152daf88cd7 | [
"MIT"
] | null | null | null | Src/Windows/CommandLine.cpp | cdoty/SuperPlayExtended | 0a9717c44b8e3820afeaf0673f86b152daf88cd7 | [
"MIT"
] | null | null | null | // This is an independent project of an individual developer. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <vector>
#include "CommandLine.h"
#include "CommandLineFlags.h"
#include "Functions.h"
void processCommandLine(const std::string& _strCommandLine)
{
std::vector<std::string> vecParameters = Functions::tokenize(_strCommandLine, ' ');
size_t t_c = vecParameters.size();
for (size_t iLoop = 0; iLoop < t_c; ++iLoop)
{
const std::string& strParameter = vecParameters[iLoop];
if ("TestMode" == strParameter)
{
setFlags(TestModeFlag);
}
}
}
| 24.538462 | 95 | 0.711599 | [
"vector"
] |
85b2eb7aa5ae1109ff822b2e98bdfffe8106ecef | 6,004 | cpp | C++ | oclint-driver/lib/Analytics.cpp | Minlison/oclint_xcode | 1ad5ff0496d0df19b7fdfe0d02e948d1f5bf30ed | [
"MIT"
] | null | null | null | oclint-driver/lib/Analytics.cpp | Minlison/oclint_xcode | 1ad5ff0496d0df19b7fdfe0d02e948d1f5bf30ed | [
"MIT"
] | null | null | null | oclint-driver/lib/Analytics.cpp | Minlison/oclint_xcode | 1ad5ff0496d0df19b7fdfe0d02e948d1f5bf30ed | [
"MIT"
] | null | null | null | #include "oclint/Analytics.h"
#ifndef COUNTLY_ANALYTICS
void oclint::Analytics::send(int) {}
void oclint::Analytics::ruleConfiguration(std::string key, std::string value) {}
void oclint::Analytics::languageOption(clang::LangOptions langOptions) {}
#else
#include <map>
#include <sstream>
#include <countly/Countly.h>
#include <countly/Device.h>
#include <countly/Metrics.h>
#include "oclint/ExitCode.h"
#include "oclint/Options.h"
#include "oclint/RuleSet.h"
#include "oclint/Version.h"
static std::map<std::string, std::string>* _ruleConfigurations = nullptr;
static std::map<std::string, int>* _languageCounter = nullptr;
static std::string hashedWorkingPath()
{
std::string workingPath = oclint::option::workingPath();
if (workingPath == "")
{
return "unknown-project-id";
}
std::ostringstream hashed;
hashed << std::hash<std::string>{}(workingPath);
return hashed.str();
}
static std::string toolchain()
{
std::shared_ptr<FILE> pipe(popen("cc --version", "r"), pclose);
if (pipe)
{
char buffer[128];
if (fgets(buffer, 128, pipe.get()) != NULL)
{
std::string toolchain(buffer);
return toolchain.erase(toolchain.find_last_not_of(" \n\r\t")+1);
}
}
return "unknown-toolchain";
}
static std::string exitCodeToString(int exitCode)
{
switch (exitCode)
{
case SUCCESS: return "success";
case RULE_NOT_FOUND: return "rule_not_found";
case REPORTER_NOT_FOUND: return "reporter_not_found";
case ERROR_WHILE_PROCESSING: return "error_while_processing";
case ERROR_WHILE_REPORTING: return "error_while_reporting";
case VIOLATIONS_EXCEED_THRESHOLD: return "violations_exceed_threshold";
default: return "unknown_exit_status";
}
}
static void sendEnvironment(countly::Countly &cntly)
{
std::map<std::string, std::string> segments;
// anonymous identifiers to deduplicate events
segments["device_id"] = countly::Device::id();
// https://github.com/ryuichis/countly-cpp/blob/master/lib/Device.cpp
// this is a hashed string of this network card's mac address
segments["project_id"] = hashedWorkingPath();
segments["version"] = oclint::Version::identifier();
segments["bin_path"] = oclint::option::binPath();
segments["os"] = countly::Metrics::os() + "/" + countly::Metrics::osVersion();
segments["toolchain"] = toolchain();
cntly.recordEvent("Environment", segments);
}
static void sendConfiguration(countly::Countly &cntly)
{
std::map<std::string, std::string> segments;
segments["report_type"] = oclint::option::reportType();
segments["global_analysis"] = oclint::option::enableGlobalAnalysis() ? "1" : "0";
segments["clang_checker"] = oclint::option::enableClangChecker() ? "1" : "0";
segments["allow_duplications"] = oclint::option::allowDuplicatedViolations() ? "1" : "0";
segments["p1_violations"] = std::to_string(oclint::option::maxP1());
segments["p2_violations"] = std::to_string(oclint::option::maxP2());
segments["p3_violations"] = std::to_string(oclint::option::maxP3());
cntly.recordEvent("Configuration", segments);
}
static void sendLoadedRules(countly::Countly &cntly)
{
std::map<std::string, std::string> segments;
std::vector<std::string> rules = oclint::option::rulesetFilter().filteredRuleNames();
for (int ruleIdx = 0, numRules = oclint::RuleSet::numberOfRules(); ruleIdx < numRules; ruleIdx++)
{
oclint::RuleBase *rule = oclint::RuleSet::getRuleAtIndex(ruleIdx);
std::string ruleId = rule->identifier();
bool enabled = std::find(rules.begin(), rules.end(), ruleId) != rules.end();
segments[ruleId] = enabled ? "1" : "0";
}
cntly.recordEvent("LoadedRules", segments);
}
static void sendRuleConfiguration(countly::Countly &cntly)
{
if (_ruleConfigurations && _ruleConfigurations->size() > 0)
{
cntly.recordEvent("RuleConfigurations", *_ruleConfigurations);
}
}
static void sendLanguageCount(countly::Countly &cntly)
{
if (_languageCounter)
{
std::map<std::string, std::string> segments;
for (auto &lang : *_languageCounter)
{
if (lang.second > 0)
{
segments[lang.first] = std::to_string(lang.second);
}
}
if (segments.size() > 0)
{
cntly.recordEvent("LanguageCount", segments);
}
}
}
static void sendExitStatus(countly::Countly &cntly, int exitCode)
{
std::map<std::string, std::string> segments = {{"exit_code", exitCodeToString(exitCode)}};
cntly.recordEvent("ExitStatus", segments);
}
void oclint::Analytics::send(int exitCode)
{
countly::Countly cntly;
cntly.start("countly.ryuichisaito.com", "873c792b2ead515f27f0ccba01a976ae9a4cc425");
switch (exitCode) //!OCLINT
{
case SUCCESS:
case ERROR_WHILE_REPORTING:
sendLanguageCount(cntly);
case ERROR_WHILE_PROCESSING:
case REPORTER_NOT_FOUND:
sendLoadedRules(cntly);
default:
sendRuleConfiguration(cntly);
sendEnvironment(cntly);
sendConfiguration(cntly);
sendExitStatus(cntly, exitCode);
}
cntly.suspend();
}
void oclint::Analytics::ruleConfiguration(std::string key, std::string value)
{
if (_ruleConfigurations == nullptr)
{
_ruleConfigurations = new std::map<std::string, std::string>();
}
_ruleConfigurations->operator[](key) = value;
}
void oclint::Analytics::languageOption(clang::LangOptions langOpts)
{
if (_languageCounter == nullptr)
{
_languageCounter = new std::map<std::string, int>();
_languageCounter->operator[]("c") = 0;
_languageCounter->operator[]("cpp") = 0;
_languageCounter->operator[]("objc") = 0;
}
if (langOpts.ObjC1 || langOpts.ObjC2)
{
int objc = _languageCounter->operator[]("objc");
_languageCounter->operator[]("objc") = objc + 1;
}
if (langOpts.CPlusPlus)
{
int cpp = _languageCounter->operator[]("cpp");
_languageCounter->operator[]("cpp") = cpp + 1;
}
if (langOpts.C99)
{
int c99 = _languageCounter->operator[]("c");
_languageCounter->operator[]("c") = c99 + 1;
}
}
#endif
| 28.865385 | 99 | 0.685876 | [
"vector"
] |
85b5a58d70422f01972ebfaafac4420410d48be6 | 6,985 | cpp | C++ | tests/dct.cpp | wfus/Fully-Homomorphic-Image-Processing | c4b3231cf299570340d9cdd8d19f7776edea5dbc | [
"MIT"
] | 34 | 2018-05-02T05:13:30.000Z | 2021-12-10T01:00:45.000Z | tests/dct.cpp | wfus/Fully-Homomorphic-Image-Processing | c4b3231cf299570340d9cdd8d19f7776edea5dbc | [
"MIT"
] | 3 | 2019-03-29T05:33:09.000Z | 2021-09-19T09:20:28.000Z | tests/dct.cpp | wfus/Fully-Homomorphic-Image-Processing | c4b3231cf299570340d9cdd8d19f7776edea5dbc | [
"MIT"
] | 7 | 2018-08-12T03:11:21.000Z | 2022-01-04T06:46:27.000Z | #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <chrono>
#include <random>
#include <thread>
#include <mutex>
#include <random>
#include <limits>
#include <fstream>
#include "seal/seal.h"
using namespace seal;
auto start = std::chrono::steady_clock::now();
const std::vector<int> S_ZAG = { 0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63 };
const std::vector<double> S_STD_LUM_QUANT = { 16,11,12,14,12,10,16,14,13,14,18,17,16,19,24,40,26,24,22,22,24,49,35,37,29,40,58,51,61,60,57,51,56,55,64,72,92,78,64,68,87,69,55,56,80,109,81,87,95,98,103,104,103,62,77,113,121,112,100,120,92,101,103,99 };
const std::vector<double> S_STD_CROMA_QUANT = { 17,18,18,24,21,24,47,26,26,47,99,66,56,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99 };
void raymond_average();
void dct(double *data);
std::vector<double> read_image(std::string fname);
void print_parameters(const SEALContext &context) {
std::cout << "/ Encryption parameters:" << std::endl;
std::cout << "| poly_modulus: " << context.poly_modulus().to_string() << std::endl;
/*
Print the size of the true (product) coefficient modulus
*/
std::cout << "| coeff_modulus size: "
<< context.total_coeff_modulus().significant_bit_count() << " bits" << std::endl;
std::cout << "| plain_modulus: " << context.plain_modulus().value() << std::endl;
std::cout << "\\ noise_standard_deviation: " << context.noise_standard_deviation() << std::endl;
std::cout << std::endl;
}
int main()
{
std::cout << "\nTotal memory allocated by global memory pool: "
<< (MemoryPoolHandle::Global().alloc_byte_count() >> 20)
<< " MB" << std::endl;
raymond_average();
return 0;
}
std::vector<double> read_image(std::string fname) {
int w, h;
std::vector<double> im;
std::ifstream myfile;
myfile.open(fname.c_str());
myfile >> w;
myfile >> h;
std::cout << "Read in " << fname << "with dimensions: " << w << " x " << h << std::endl;
float tmp;
for (int i = 0; i < w*h; i++) {
myfile >> tmp;
im.push_back(tmp);
}
return im;
}
const int BLOCK_SIZE = 8;
std::vector<std::vector<double>> split_image_eight_block(std::vector<double> im, int w, int h) {
std::vector<std::vector<double>> lst;
for (int i = 0; i < w; i += BLOCK_SIZE) {
for (int j = 0; j < h; j += BLOCK_SIZE) {
std::vector<double> new_lst;
for (int k = 0; k < BLOCK_SIZE; k++)
for (int l = 0; l < BLOCK_SIZE; l++) {
int index = (j+k)*w + i + l;
new_lst.push_back(im[index]);
}
lst.push_back(new_lst);
}
}
return lst;
}
void print_image(std::vector<double> &im, int w, int h) {
std::cout << "Printing Image dim: (" << w << "," << h << ")" << std::endl;
for (int i = 0; i < im.size(); i++) {
std::cout << std::setw(5) << im[i] << " ";
if ((i + 1) % w == 0) std::cout << std::endl;
}
}
void print_blocks(std::vector<std::vector<double>> &blocks) {
for (int a = 0; a < blocks.size(); a++) {
std::cout << "Printing block " << a << std::endl;
for (int i = 0; i < blocks[a].size(); i++) {
std::cout << std::setw(11) << blocks[a][i] << " ";
if ((i + 1) % BLOCK_SIZE == 0) std::cout << std::endl;
}
std::cout << "---------------" << std::endl;
}
}
void dct_blocks(std::vector<std::vector<double>> &blocks) {
for (int a = 0; a < blocks.size(); a++) {
dct(&blocks[a][0]);
}
}
void raymond_average() {
std::vector<double> im = read_image("../image/kung.txt");
print_image(im, 16, 16);
std::vector<std::vector<double>> blocks = split_image_eight_block(im, 16, 16);
dct_blocks(blocks);
print_blocks(blocks);
return;
}
// Forward DCT
void dct(double *data)
{
double z1, z2, z3, z4, z5, tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp10, tmp11, tmp12, tmp13, *data_ptr;
data_ptr = data;
for (int c=0; c < 8; c++) {
tmp0 = data_ptr[0] + data_ptr[7];
tmp7 = data_ptr[0] - data_ptr[7];
tmp1 = data_ptr[1] + data_ptr[6];
tmp6 = data_ptr[1] - data_ptr[6];
tmp2 = data_ptr[2] + data_ptr[5];
tmp5 = data_ptr[2] - data_ptr[5];
tmp3 = data_ptr[3] + data_ptr[4];
tmp4 = data_ptr[3] - data_ptr[4];
tmp10 = tmp0 + tmp3;
tmp13 = tmp0 - tmp3;
tmp11 = tmp1 + tmp2;
tmp12 = tmp1 - tmp2;
data_ptr[0] = tmp10 + tmp11;
data_ptr[4] = tmp10 - tmp11;
z1 = (tmp12 + tmp13) * 0.541196100;
data_ptr[2] = z1 + tmp13 * 0.765366865;
data_ptr[6] = z1 + tmp12 * - 1.847759065;
z1 = tmp4 + tmp7;
z2 = tmp5 + tmp6;
z3 = tmp4 + tmp6;
z4 = tmp5 + tmp7;
z5 = (z3 + z4) * 1.175875602;
tmp4 *= 0.298631336;
tmp5 *= 2.053119869;
tmp6 *= 3.072711026;
tmp7 *= 1.501321110;
z1 *= -0.899976223;
z2 *= -2.562915447;
z3 *= -1.961570560;
z4 *= -0.390180644;
z3 += z5;
z4 += z5;
data_ptr[7] = tmp4 + z1 + z3;
data_ptr[5] = tmp5 + z2 + z4;
data_ptr[3] = tmp6 + z2 + z3;
data_ptr[1] = tmp7 + z1 + z4;
data_ptr += 8;
}
data_ptr = data;
for (int c=0; c < 8; c++) {
tmp0 = data_ptr[8*0] + data_ptr[8*7];
tmp7 = data_ptr[8*0] - data_ptr[8*7];
tmp1 = data_ptr[8*1] + data_ptr[8*6];
tmp6 = data_ptr[8*1] - data_ptr[8*6];
tmp2 = data_ptr[8*2] + data_ptr[8*5];
tmp5 = data_ptr[8*2] - data_ptr[8*5];
tmp3 = data_ptr[8*3] + data_ptr[8*4];
tmp4 = data_ptr[8*3] - data_ptr[8*4];
tmp10 = tmp0 + tmp3;
tmp13 = tmp0 - tmp3;
tmp11 = tmp1 + tmp2;
tmp12 = tmp1 - tmp2;
data_ptr[8*0] = (tmp10 + tmp11) / 8.0;
data_ptr[8*4] = (tmp10 - tmp11) / 8.0;
z1 = (tmp12 + tmp13) * 0.541196100;
data_ptr[8*2] = (z1 + tmp13 * 0.765366865) / 8.0;
data_ptr[8*6] = (z1 + tmp12 * -1.847759065) / 8.0;
z1 = tmp4 + tmp7;
z2 = tmp5 + tmp6;
z3 = tmp4 + tmp6;
z4 = tmp5 + tmp7;
z5 = (z3 + z4) * 1.175875602;
tmp4 *= 0.298631336;
tmp5 *= 2.053119869;
tmp6 *= 3.072711026;
tmp7 *= 1.501321110;
z1 *= -0.899976223;
z2 *= -2.562915447;
z3 *= -1.961570560;
z4 *= -0.390180644;
z3 += z5;
z4 += z5;
data_ptr[8*7] = (tmp4 + z1 + z3) / 8.0;
data_ptr[8*5] = (tmp5 + z2 + z4) / 8.0;
data_ptr[8*3] = (tmp6 + z2 + z3) / 8.0;
data_ptr[8*1] = (tmp7 + z1 + z4) / 8.0;
data_ptr++;
}
} | 32.640187 | 251 | 0.528418 | [
"vector"
] |
85baca415c71871b2249a639ca29168fa0d0dd04 | 8,317 | cpp | C++ | src/Domain.cpp | asr-ros/asr_intermediate_object_generator | cdd9a50a853c8e74d1c94971443772c7e54105d6 | [
"BSD-3-Clause"
] | 1 | 2019-10-29T13:37:28.000Z | 2019-10-29T13:37:28.000Z | src/Domain.cpp | asr-ros/asr_intermediate_object_generator | cdd9a50a853c8e74d1c94971443772c7e54105d6 | [
"BSD-3-Clause"
] | null | null | null | src/Domain.cpp | asr-ros/asr_intermediate_object_generator | cdd9a50a853c8e74d1c94971443772c7e54105d6 | [
"BSD-3-Clause"
] | null | null | null | /**
Copyright (c) 2016, Borella Jocelyn, Meißner Pascal
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "Domain.h"
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
#include <fstream>
#include <chrono>
#include <ctime>
Domain::Domain()
{
getDomainFromParams();
}
Domain::~Domain()
{
}
void Domain::calcIntermediateObjectsForDomain()
{
//Calculate intermediate object ranking for each object in each scene
for (std::vector<SceneSharedPointer>::iterator sceneIterator = SceneList.begin(); sceneIterator != SceneList.end(); ++sceneIterator)
{
(*sceneIterator)->getObjectFromDb();
(*sceneIterator)->calcAveragePositionForEachObject();
(*sceneIterator)->calcPresenceInSceneForEachObject();
(*sceneIterator)->getObjectAverageDistance();
(*sceneIterator)->normalize();
(*sceneIterator)->rank();
(*sceneIterator)->displayStats();
}
std::list<evalulatorTupleSharedPtr> evaluatorTupleList;
std::list<std::string> sceneList;
ROS_DEBUG_STREAM("Domain::calcIntermediateObjectsForDomain begin scene fusion");
//Creation of an evaluator tuple for all object in all scenes. (1 evaluator tuple per object per scene)
for (std::vector<SceneSharedPointer>::iterator sceneIterator = SceneList.begin(); sceneIterator != SceneList.end(); ++sceneIterator)
{
std::string sceneName = (*sceneIterator)->getSceneName();
sceneList.push_back(sceneName);
std::unordered_map<std::string,ObjectSharedPointer> bufferObjectMap = (*sceneIterator)->getObjectMap();
for (std::unordered_map<std::string,ObjectSharedPointer>::iterator objectMapIterator=bufferObjectMap.begin(); objectMapIterator!=bufferObjectMap.end(); ++objectMapIterator)
{
evaluatorTupleList.push_back(evalulatorTupleSharedPtr(new evalulatorTuple(objectMapIterator->second->getRankValue(),sceneName,objectMapIterator->first,
objectMapIterator->second->getObjectName(),objectMapIterator->second->getObservedId())));
}
}
ROS_DEBUG_STREAM("Domain::calcIntermediateObjectsForDomain scene fusion completed");
ROS_DEBUG_STREAM("Domain::calcIntermediateObjectsForDomain begin from evaluation");
Evaluator evaluator = Evaluator(evaluatorTupleList,sceneList,GainValueThreshold,NBVPath,Scene_path);
IntermediateOjects = evaluator.getIntermediateObjects();
ROS_DEBUG_STREAM("Domain::calcIntermediateObjectsForDomain end from evaluation");
}
void Domain::getDomainFromParams()
{
LocalHandle.getParam(LocalHandle.getNamespace() + "/asr_intermediate_object_generator/RankingMethod",RankingMethod);
LocalHandle.getParam(LocalHandle.getNamespace() + "/asr_intermediate_object_generator/Alpha",Alpha);
LocalHandle.getParam(LocalHandle.getNamespace() + "/asr_intermediate_object_generator/Beta",Beta);
LocalHandle.getParam(LocalHandle.getNamespace() + "/asr_intermediate_object_generator/Gamma",Gamma);
LocalHandle.getParam(LocalHandle.getNamespace() + "/asr_intermediate_object_generator/GainValueThreshold",GainValueThreshold);
LocalHandle.getParam(LocalHandle.getNamespace() + "/asr_intermediate_object_generator/DomainName",DomainName);
LocalHandle.getParam(LocalHandle.getNamespace() + "/asr_intermediate_object_generator/AutomatPath", AutomatPath);
LocalHandle.getParam(LocalHandle.getNamespace() + "/asr_intermediate_object_generator/LogPath", LogPath);
LocalHandle.getParam(LocalHandle.getNamespace() + "/asr_intermediate_object_generator/NBVPath", NBVPath);
LocalHandle.getParam(LocalHandle.getNamespace() + "/asr_intermediate_object_generator/dbfilename", Scene_path);
std::vector<std::string> pathSplit;
boost::split(pathSplit, Scene_path, boost::is_any_of("/"));
std::string dbName = pathSplit[pathSplit.size()-1];
const std::string placeholder = "XXX";
std::string::size_type pos;
if ((pos = AutomatPath.find(placeholder)) != std::string::npos) {
AutomatPath.replace(pos, placeholder.length(), dbName);
}
if ((pos = NBVPath.find(placeholder)) != std::string::npos) {
NBVPath.replace(pos, placeholder.length(), dbName);
}
ROS_DEBUG_STREAM("Domain::getDomainFromParams BEGIN");
ROS_DEBUG_STREAM("Domain::getDomainFromParams RankingMethod : " << RankingMethod);
ROS_DEBUG_STREAM("Domain::getDomainFromParams Alpha : " << Alpha);
ROS_DEBUG_STREAM("Domain::getDomainFromParams Beta : " << Beta);
ROS_DEBUG_STREAM("Domain::getDomainFromParams Gamma : " << Gamma);
ROS_DEBUG_STREAM("Domain::getDomainFromParams GainValueThreshold : " << GainValueThreshold);
ROS_DEBUG_STREAM("Domain::getDomainFromParams AutomatPath : " << AutomatPath);
ROS_DEBUG_STREAM("Domain::getDomainFromParams LogPath : " << LogPath);
ROS_DEBUG_STREAM("Domain::getDomainFromParams NBVPath : " << NBVPath);
ISM::TableHelper tabelHelper(Scene_path);
std::vector<std::string> Scene_patterns = tabelHelper.getRecordedPatternNames();
for(const std::string &name : Scene_patterns)
{
SceneList.push_back(SceneSharedPointer(new Scene(Scene_path, name, RankingMethod, Alpha, Beta, Gamma)));
ROS_DEBUG_STREAM("Domain::getDomainFromParams Adding scene : " << name);
ROS_DEBUG_STREAM("Domain::getDomainFromParams with path : " << Scene_path);
}
ROS_DEBUG_STREAM("Domain::getDomainFromParams END");
}
void Domain::publishLogs()
{
//Publish logs in the log file folder.
std::chrono::time_point<std::chrono::system_clock> start;
start = std::chrono::system_clock::now();
std::time_t start_time = std::chrono::system_clock::to_time_t(start);
std::string filePath = this->LogPath + this->DomainName + ".log";
std::ofstream file(filePath, std::ios::out | std::ios::app);
if(file)
{
file << std::endl <<this->DomainName << " Log file" << std::endl;
file << "Timestamp for the Log " << std::ctime(&start_time) << std::endl;
file << std::endl << "Intermediate Objects for The Domain " << std::endl;
for (const objectTupleSharedPtr &tuple : IntermediateOjects)
{
file << std::get<1>(*tuple) << " : " << std::get<0>(*tuple) << std::endl;
}
file.close();
}
for (std::vector<SceneSharedPointer>::iterator sceneIterator = SceneList.begin(); sceneIterator != SceneList.end(); ++sceneIterator)
{
(*sceneIterator)->publishLogs(filePath);
}
}
void Domain::publishIntermediateObjectToAutomat()
{
//Publish the XML data containing intermediate object for the direct search.
std::string output = "<InterObj>";
for (const objectTupleSharedPtr &tuple : IntermediateOjects)
{
output += "<obj type=\"" + std::get<2>(*tuple) + "\" identifier=\""+ std::get<3>(*tuple) + "\"/>";
}
output += "</InterObj>";
std::ofstream file(AutomatPath, std::ios::out | std::ios::trunc);
if(file)
{
file << output;
file.close();
}
}
| 50.713415 | 755 | 0.735602 | [
"object",
"vector"
] |
85c351db36c3c5d34247006447a417d0b409f199 | 3,753 | cpp | C++ | SpriteSelector.cpp | interdpth/DoubleHelix-2 | d494cc7957b7470b12779d2cde14b13285fa6396 | [
"MIT"
] | 1 | 2021-11-23T13:57:03.000Z | 2021-11-23T13:57:03.000Z | SpriteSelector.cpp | interdpth/DoubleHelix-2 | d494cc7957b7470b12779d2cde14b13285fa6396 | [
"MIT"
] | null | null | null | SpriteSelector.cpp | interdpth/DoubleHelix-2 | d494cc7957b7470b12779d2cde14b13285fa6396 | [
"MIT"
] | 1 | 2021-11-12T22:47:58.000Z | 2021-11-12T22:47:58.000Z | #include "MainHeader.h"
#include "cOAMManager.h"
#include "GlobalVars.h"
#include "resource.h"
#include "SpriteObjectManager.h"
#include "FrameManager.h"
#include "Frames.h"
BOOL CALLBACK SSProc(HWND hWnd, unsigned int message, WPARAM wParam, LPARAM lParam) {
Frame* targetFrame = NULL;
PAINTSTRUCT ps;
HDC hdc;
char buf[256];
switch (message)
{
case WM_INITDIALOG:
hwndSS = hWnd;
dispic = 0;
SpriteTabIndex = 0;
break;
case WM_CTLCOLORDLG:
return (LONG)g_hbrBackground;
case WM_CTLCOLORSTATIC:
{
HDC hdcStatic = (HDC)wParam;
SetTextColor(hdcStatic, RGB(255, 255, 255));
SetBkMode(hdcStatic, TRANSPARENT);
return (LONG)g_hbrBackground;
}
break;
case WM_LBUTTONDOWN:
break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case btnAddObject:
RD1Engine::theGame->mainRoom->mgrSpriteObjects->AddSpriteObject(comboSpriteSet.GetListIndex(), dispic);
RD1Engine::theGame->DrawRoom(GlobalVars::gblVars->TileImage, &GlobalVars::gblVars->BGImage, -1);
UiState::stateManager->ShowObj();
UiState::stateManager->ForceRedraw();
break;
case btnDeleteObj:
RD1Engine::theGame->mainRoom->mgrSpriteObjects->DeleteSpriteObject(comboSpriteSet.GetListIndex(), RD1Engine::theGame->mainRoom->mapMgr->GetState()->GetObjId());
RD1Engine::theGame->mainRoom->mapMgr->GetState()->SetObjId(0);
UiState::stateManager->ShowObj();
UiState::stateManager->ForceRedraw();
break;
case cmdPrev:
if (dispic == 0) return 0;
dispic -= 1;
sprintf(buf, "Sprite: %d", dispic);
SetWindowText(GetDlgItem(hWnd, lblSpriteblah), buf);
InvalidateRect(hwndSS, 0, 1);
break;
case cmdNext:
if (!(dispic < RD1Engine::theGame->mainRoom->mgrSpriteObjects->RoomSprites.size() - 1)) return 0;
dispic += 1;
sprintf(buf, "Sprite: %d", dispic);
SetWindowText(GetDlgItem(hWnd, lblSpriteblah), buf);
InvalidateRect(hwndSS, 0, 1);
break;
case cmdSSOk:
SetCurSprite();
RD1Engine::theGame->DrawRoom(GlobalVars::gblVars->TileImage, &GlobalVars::gblVars->BGImage, -1);
UiState::stateManager->ForceRedraw();
break;
}
break;
case WM_VSCROLL: // exact same idea, but V scroll instead of H scroll
break;
case WM_PAINT:
{
if (RD1Engine::theGame->mainRoom->mgrSpriteObjects->RoomSprites.size() > 0) {
targetFrame = RD1Engine::theGame->mainRoom->mgrSpriteObjects->RoomSprites.at(dispic)->GetStaticFrame();
hdc = BeginPaint(hWnd, &ps);
//GetWindowRect(GetDlgItem(hWnd,fraSpriteSS),&sprdst);
targetFrame->theSprite->PreviewSprite.GetFullImage()->Blit(hdc, 64, 100,
targetFrame->theSprite->Borders.right - targetFrame->theSprite->Borders.left,
targetFrame->theSprite->Borders.bottom - targetFrame->theSprite->Borders.top,
0,
0);
EndPaint(hWnd, &ps);
}
}
break;
case WM_MOVE:
case WM_SIZE:
{
}
break;
case WM_SHOWWINDOW:
LoadCurSprite();
break;
}
//return DefWindowProc(hWnd, message, wParam, lParam);
return 0;
}
int SetCurSprite() {
int beta;
int set = comboSpriteSet.GetListIndex();
vector<MapObjectSprite*> * list = &RD1Engine::theGame->mainRoom->mgrSpriteObjects->SpriteObjects[set];
list->at(SpriteTabIndex)->Creature = list->at(SpriteTabIndex)->Creature & 0xF0 | dispic;
return 0;
}
int LoadCurSprite() { //Sets dispic for starting.
if (SpriteTabIndex == -1)
{
return -1;
}
SpriteObjectManager* mgrSpriteObjects = RD1Engine::theGame->mainRoom->mgrSpriteObjects;;
vector<MapObjectSprite*>* SpriteObjects = NULL;
int newValue = comboSpriteSet.GetListIndex();
if (mgrSpriteObjects)
{
SpriteObjects = &mgrSpriteObjects->SpriteObjects[newValue];
if (SpriteObjects && SpriteObjects->size() != 0)
{
dispic = ((SpriteObjects->at(SpriteTabIndex)->Creature) & 0xf) - 1;
}
}
return 0;
}
| 25.358108 | 163 | 0.706635 | [
"vector"
] |
85cdff7cd54778e5c56621ea7bfcb99733b8b8c8 | 4,483 | hxx | C++ | src/SplineConstant.hxx | ebertolazzi/Splines | 341abc55d5a672976a3e0b6f3eabcc60e221a36e | [
"BSD-2-Clause"
] | 113 | 2015-01-03T09:38:47.000Z | 2022-03-28T04:58:02.000Z | src/SplineConstant.hxx | ebertolazzi/Splines | 341abc55d5a672976a3e0b6f3eabcc60e221a36e | [
"BSD-2-Clause"
] | 3 | 2017-04-10T15:54:51.000Z | 2019-01-09T13:18:20.000Z | src/SplineConstant.hxx | ebertolazzi/Splines | 341abc55d5a672976a3e0b6f3eabcc60e221a36e | [
"BSD-2-Clause"
] | 20 | 2015-03-17T02:38:11.000Z | 2021-12-11T18:26:32.000Z | /*--------------------------------------------------------------------------*\
| |
| Copyright (C) 2016 |
| |
| , __ , __ |
| /|/ \ /|/ \ |
| | __/ _ ,_ | __/ _ ,_ |
| | \|/ / | | | | \|/ / | | | |
| |(__/|__/ |_/ \_/|/|(__/|__/ |_/ \_/|/ |
| /| /| |
| \| \| |
| |
| Enrico Bertolazzi |
| Dipartimento di Ingegneria Industriale |
| Universita` degli Studi di Trento |
| email: enrico.bertolazzi@unitn.it |
| |
\*--------------------------------------------------------------------------*/
/*\
| ____ _ _ ____ _ _
| / ___|___ _ __ ___| |_ __ _ _ __ | |_ ___/ ___| _ __ | (_)_ __ ___
| | | / _ \| '_ \/ __| __/ _` | '_ \| __/ __\___ \| '_ \| | | '_ \ / _ \
| | |__| (_) | | | \__ \ || (_| | | | | |_\__ \___) | |_) | | | | | | __/
| \____\___/|_| |_|___/\__\__,_|_| |_|\__|___/____/| .__/|_|_|_| |_|\___|
| |_|
\*/
namespace Splines {
//! Picewise constants spline class
class ConstantSpline : public Spline {
Utils::Malloc<real_type> m_baseValue;
bool m_external_alloc;
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
using Spline::build;
#endif
ConstantSpline( string const & name = "ConstantSpline" )
: Spline(name)
, m_baseValue(name+"_memory")
, m_external_alloc(false)
{}
~ConstantSpline() override {}
//! Use externally allocated memory for `npts` points
void
reserve_external(
integer n,
real_type * & p_x,
real_type * & p_y
);
// --------------------------- VIRTUALS -----------------------------------
//!
//! \name Build
//!
///@{
void build() override {} // nothing to do
void
build(
real_type const * x, integer incx,
real_type const * y, integer incy,
integer n
) override;
///@}
//!
//! \name Evaluate
//!
///@{
real_type operator () ( real_type x ) const override;
real_type D( real_type ) const override { return 0; }
real_type DD( real_type ) const override { return 0; }
real_type DDD( real_type ) const override { return 0; }
///@}
//!
//! \name Evaluation when segment is known
//!
///@{
real_type id_eval( integer ni, real_type x ) const override;
real_type id_D( integer, real_type ) const override { return 0; }
real_type id_DD( integer, real_type ) const override { return 0; }
real_type id_DDD( integer, real_type ) const override { return 0; }
///@}
void writeToStream( ostream_type & ) const override;
unsigned type() const override { return CONSTANT_TYPE; }
// --------------------------- VIRTUALS -----------------------------------
void reserve( integer npts ) override;
void clear() override;
integer // order
coeffs(
real_type * const cfs,
real_type * const nodes,
bool transpose = false
) const override;
integer order() const override;
void setup( GenericContainer const & gc ) override;
void
y_min_max(
integer & i_min_pos,
real_type & x_min_pos,
real_type & y_min,
integer & i_max_pos,
real_type & x_max_pos,
real_type & y_max
) const override;
void
y_min_max(
vector<integer> & i_min_pos,
vector<real_type> & x_min_pos,
vector<real_type> & y_min,
vector<integer> & i_max_pos,
vector<real_type> & x_max_pos,
vector<real_type> & y_max
) const override;
};
}
// EOF: SplineConstant.hxx
| 32.722628 | 79 | 0.395494 | [
"vector"
] |
85d4a8c02d959d2b72434d8011eb7eb1dc16967b | 223 | cpp | C++ | bricks_falling_when_hit.cpp | spencercjh/sync-leetcode-today-problem-cpp-example | 178a974e5848e3a620f4565170b459d50ecfdd6b | [
"Apache-2.0"
] | null | null | null | bricks_falling_when_hit.cpp | spencercjh/sync-leetcode-today-problem-cpp-example | 178a974e5848e3a620f4565170b459d50ecfdd6b | [
"Apache-2.0"
] | 1 | 2020-12-17T07:54:03.000Z | 2020-12-17T08:00:22.000Z | bricks_falling_when_hit.cpp | spencercjh/sync-leetcode-today-problem-cpp-example | 178a974e5848e3a620f4565170b459d50ecfdd6b | [
"Apache-2.0"
] | null | null | null | /**
* https://leetcode-cn.com/problems/bricks-falling-when-hit/
*
* @author spencercjh
*/
class BricksFallingWhenHit {
public:
vector<int> hitBricks(vector<vector<int>>& grid, vector<vector<int>>& hits) {
}
}
| 17.153846 | 81 | 0.668161 | [
"vector"
] |
85d65338ea0b785b33b5e8a49a3ecb736a50dfe8 | 3,550 | hpp | C++ | Library/Source/EnergyManager/Utility/Logging/Loggable.hpp | NB4444/BachelorProjectEnergyManager | d1fd93dcc83af6d6acd36b7efda364ac2aab90eb | [
"MIT"
] | null | null | null | Library/Source/EnergyManager/Utility/Logging/Loggable.hpp | NB4444/BachelorProjectEnergyManager | d1fd93dcc83af6d6acd36b7efda364ac2aab90eb | [
"MIT"
] | null | null | null | Library/Source/EnergyManager/Utility/Logging/Loggable.hpp | NB4444/BachelorProjectEnergyManager | d1fd93dcc83af6d6acd36b7efda364ac2aab90eb | [
"MIT"
] | null | null | null | #pragma once
#include <string>
#include <vector>
namespace EnergyManager {
namespace Utility {
namespace Logging {
enum class Level;
/**
* Represents an object that can log information.
*/
class Loggable {
protected:
/**
* Generates the headers for logging.
* @return The headers.
*/
virtual std::vector<std::string> generateHeaders() const;
public:
/**
* Creates a new Loggable.
*/
Loggable() = default;
/**
* Gets the headers used for logging.
* @return The headers.
*/
std::vector<std::string> getHeaders() const;
/**
* Logs a message with a variable number of parameters.
* @param level The logging level.
* @param headers The log headers.
* @param format The format of the message.
* @param ... The arguments to use.
*/
void log(const Level& level, const std::vector<std::string>& headers, std::string format, ...) const;
/**
* Logs a trace message.
* @param headers The headers to use.
* @param format The format of the message.
* @param ... The arguments to use.
*/
void logTrace(const std::vector<std::string>& headers, std::string format, ...) const;
/**
* Logs a trace message.
* @param format The format of the message.
* @param ... The arguments to use.
*/
void logTrace(std::string format, ...) const;
/**
* Logs a debug message.
* @param headers The headers to use.
* @param format The format of the message.
* @param ... The arguments to use.
*/
void logDebug(const std::vector<std::string>& headers, std::string format, ...) const;
/**
* Logs a debug message.
* @param format The format of the message.
* @param ... The arguments to use.
*/
void logDebug(std::string format, ...) const;
/**
* Logs an informational message.
* @param headers The headers to use.
* @param format The format of the message.
* @param ... The arguments to use.
*/
void logInformation(const std::vector<std::string>& headers, std::string format, ...) const;
/**
* Logs an informational message.
* @param format The format of the message.
* @param ... The arguments to use.
*/
void logInformation(std::string format, ...) const;
/**
* Logs a warning.
* @param headers The headers to use.
* @param format The format of the message.
* @param ... The arguments to use.
*/
void logWarning(const std::vector<std::string>& headers, std::string format, ...) const;
/**
* Logs a warning.
* @param format The format of the message.
* @param ... The arguments to use.
*/
void logWarning(std::string format, ...) const;
/**
* Logs an error.
* @param headers The headers to use.
* @param format The format of the message.
* @param file The file in which the error occurred.
* @param line The line on which the error occurred.
* @param ... The arguments to use.
*/
void logError(const std::vector<std::string>& headers, const std::string& format, const std::string& file, int line, ...) const;
/**
* Logs an error.
* @param format The format of the message.
* @param file The file in which the error occurred.
* @param line The line on which the error occurred.
* @param ... The arguments to use.
*/
void logError(const std::string& format, const std::string& file, int line, ...) const;
};
}
}
} | 28.629032 | 132 | 0.601127 | [
"object",
"vector"
] |
85d7925d0e571b4d29c5e72108da535224c30585 | 2,843 | cc | C++ | Filters/src/StepPointMCCollectionUpdater_module.cc | sophiemiddleton/Offline | d0c570158c88b7311e758666ab47fafc828f39b0 | [
"Apache-2.0"
] | null | null | null | Filters/src/StepPointMCCollectionUpdater_module.cc | sophiemiddleton/Offline | d0c570158c88b7311e758666ab47fafc828f39b0 | [
"Apache-2.0"
] | 1 | 2019-11-22T14:45:51.000Z | 2019-11-22T14:50:03.000Z | Filters/src/StepPointMCCollectionUpdater_module.cc | sophiemiddleton/Offline | d0c570158c88b7311e758666ab47fafc828f39b0 | [
"Apache-2.0"
] | 2 | 2019-10-14T17:46:58.000Z | 2020-03-30T21:05:15.000Z | // Update StepPointMCs to point to a new SimParticle collection
//
// Andrei Gaponenko, 2016
#include <string>
#include <vector>
#include <memory>
#include <iostream>
#include "cetlib_except/exception.h"
#include "art/Framework/Core/EDProducer.h"
#include "art/Framework/Core/ModuleMacros.h"
#include "art/Framework/Principal/Event.h"
#include "art/Framework/Principal/Handle.h"
#include "MCDataProducts/inc/SimParticleRemapping.hh"
#include "MCDataProducts/inc/StepPointMCCollection.hh"
namespace mu2e {
class StepPointMCCollectionUpdater : public art::EDProducer {
public:
explicit StepPointMCCollectionUpdater(fhicl::ParameterSet const& pset);
void produce(art::Event& evt) override;
private:
typedef std::vector<art::InputTag> InputTags;
art::InputTag remapping_;
InputTags inputs_;
// We create a single data product, so the normal Mu2e policy is
// to not use instance name for it. However when our output is
// fed to FilterG4Out, the latter ignores module labels but keeps
// instance names of "extraHitInputs" collections. If a job runs
// several StepPointMCCollectionUpdater modules and their outputs
// are passed to FilterG4Out, a way to preserve information is to
// use instance names for StepPointMCCollectionUpdater outputs.
std::string outInstanceName_;
};
//================================================================
StepPointMCCollectionUpdater::StepPointMCCollectionUpdater(const fhicl::ParameterSet& pset)
: art::EDProducer{pset}
, remapping_(pset.get<std::string>("remapping"))
, inputs_(pset.get<std::vector<art::InputTag> >("inputs"))
, outInstanceName_(pset.get<std::string>("outInstanceName"))
{
produces<StepPointMCCollection>(outInstanceName_);
}
//================================================================
void StepPointMCCollectionUpdater::produce(art::Event& event) {
std::unique_ptr<StepPointMCCollection> out(new StepPointMCCollection());
auto remap = event.getValidHandle<SimParticleRemapping>(remapping_);
for(const auto& intag : inputs_) {
auto ih = event.getValidHandle<StepPointMCCollection>(intag);
for(const auto& oldStep: *ih) {
const auto oldPtr = oldStep.simParticle();
const auto iter = remap->find(oldPtr);
if(iter != remap->end()) {
out->emplace_back(oldStep);
out->back().simParticle() = iter->second;
}
else {
throw cet::exception("BADCONFIG")
<<"StepPointMCCollectionUpdater: SimParticleRemapping "<<remapping_
<<" does not contain a particle used in StepPointMCCollection "<<intag
<<"\n";
}
}
}
event.put(std::move(out), outInstanceName_);
}
} // namespace mu2e
DEFINE_ART_MODULE(mu2e::StepPointMCCollectionUpdater);
| 35.098765 | 93 | 0.672881 | [
"vector"
] |
85da7bad7db0ed385aa980e78419865b5d0a386c | 2,978 | hpp | C++ | FFG/include/FFG_State.hpp | GarrettGutierrez1/FFG_Engine | ba61887f6db2bdc947118b50beb3388d49eeaad4 | [
"Apache-2.0"
] | null | null | null | FFG/include/FFG_State.hpp | GarrettGutierrez1/FFG_Engine | ba61887f6db2bdc947118b50beb3388d49eeaad4 | [
"Apache-2.0"
] | null | null | null | FFG/include/FFG_State.hpp | GarrettGutierrez1/FFG_Engine | ba61887f6db2bdc947118b50beb3388d49eeaad4 | [
"Apache-2.0"
] | null | null | null | #ifndef FFG_STATE_H_INCLUDED
#define FFG_STATE_H_INCLUDED
#include "FFG_Engine.hpp"
/***************************************************************************//**
* State implementation. Any user-created states should inherit from this. To
* execute them, instantiate them and register them through the FFG_StateManager
* interface prior to the initialization of the engine. The following methods
* should be overwritten in order to define the behavior of a state:
*
* - FFG_State::FFG_State()
* - FFG_State::~FFG_State()
* - FFG_State::init()
* - FFG_State::exit()
* - FFG_State::handle()
* - FFG_State::update()
* - FFG_State::render()
*
* Example usage:
* -----------------------------------------------------------------------------
* TODO: Add example usage.
* -----------------------------------------------------------------------------
******************************************************************************/
class FFG_State {
protected:
/***************************************************************************//**
* The engine.
******************************************************************************/
FFG_Engine& engine;
public:
/***************************************************************************//**
* Constructor.
******************************************************************************/
FFG_State(FFG_Engine& engine) : engine(engine) {}
/***************************************************************************//**
* Destructor.
******************************************************************************/
virtual ~FFG_State() {};
/***************************************************************************//**
* Initializes the FFG_State. Called when a state is initialized by FFG_Engine
* upon state swapping.
******************************************************************************/
virtual void init() = 0;
/***************************************************************************//**
* Uninitializes the FFG_State. Called when a state is uninitialized by
* FFG_Engine upon state swapping.
******************************************************************************/
virtual void exit() = 0;
/***************************************************************************//**
* Handles a single event. Refer to FFG_Event.
******************************************************************************/
virtual void handle() = 0;
/***************************************************************************//**
* Updates the state. Refer to FFG_Timer.
******************************************************************************/
virtual void update() = 0;
/***************************************************************************//**
* Renders the state. Refer to FFG_Renderer.
******************************************************************************/
virtual void render() = 0;
};
#endif // FFG_STATE_H_INCLUDED
| 45.815385 | 81 | 0.322364 | [
"render"
] |
85dfcdaa86485a51f830c36684e1da46aa5425b3 | 5,281 | cpp | C++ | llvm/llvm/lib/Target/FPGA/FPGATargetMachine.cpp | pooyaww/HLS | da538325ea9cb410672be6bb15d6c2e6220bfeb3 | [
"Apache-2.0"
] | 1 | 2021-04-29T08:23:03.000Z | 2021-04-29T08:23:03.000Z | llvm/llvm/lib/Target/FPGA/FPGATargetMachine.cpp | pooyaww/HLS | da538325ea9cb410672be6bb15d6c2e6220bfeb3 | [
"Apache-2.0"
] | null | null | null | llvm/llvm/lib/Target/FPGA/FPGATargetMachine.cpp | pooyaww/HLS | da538325ea9cb410672be6bb15d6c2e6220bfeb3 | [
"Apache-2.0"
] | 1 | 2021-08-02T01:23:35.000Z | 2021-08-02T01:23:35.000Z | // (c) Copyright 2016-2020 Xilinx, Inc.
// All Rights Reserved.
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//===----------------------------------------------------------------------===//
//
// This file defines the FPGA specific subclass of TargetMachine.
//
//===----------------------------------------------------------------------===//
#include "FPGATargetMachine.h"
#include "FPGA.h"
#include "FPGATargetTransformInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Target/TargetOptions.h"
using namespace llvm;
namespace llvm {
void initializeWinEHStatePassPass(PassRegistry &);
}
extern "C" void LLVMInitializeFPGATarget() {
// Register the target.
RegisterTargetMachine<FPGATargetMachine> X(TheFPGA32Target);
RegisterTargetMachine<FPGATargetMachine> Y(TheFPGA64Target);
// Initialize target specific passes
PassRegistry &PR = *PassRegistry::getPassRegistry();
(void)PR;
}
static std::string computeDataLayout(const Triple &TT) {
if (TT.isArch32Bit())
// i786: e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128
// spir: e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024
return
"e-m:e-p:32:32-"
"i64:64-i128:128-i256:256-i512:512-i1024:1024-i2048:2048-i4096:4096-"
"n8:16:32:64-S128-"
"v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024";
// x86_64: e-m:e-i64:64-f80:128-n8:16:32:64-S128
// spir64:
// e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024
return
"e-m:e-"
"i64:64-i128:128-i256:256-i512:512-i1024:1024-i2048:2048-i4096:4096-"
"n8:16:32:64-S128-"
"v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024";
}
static Reloc::Model getEffectiveRelocModel(const Triple &TT,
Optional<Reloc::Model> RM) {
return Reloc::Static;
}
/// Create an FPGA target.
///
FPGATargetMachine::FPGATargetMachine(const Target &T, const Triple &TT,
StringRef CPU, StringRef FS,
const TargetOptions &Options,
Optional<Reloc::Model> RM,
Optional<CodeModel::Model> CM,
CodeGenOpt::Level OL, bool JIT)
: LLVMTargetMachine(T, computeDataLayout(TT), TT, CPU, FS, Options,
getEffectiveRelocModel(TT, RM), CodeModel::Large, OL),
Subtarget(TT, CPU, FS, *this) {}
FPGATargetMachine::~FPGATargetMachine() {}
const FPGASubtarget *
FPGATargetMachine::getSubtargetImpl(const Function &F) const {
Attribute FPGAAttr = F.getFnAttribute("target-cpu");
Attribute FSAttr = F.getFnAttribute("target-features");
StringRef FPGA = !FPGAAttr.hasAttribute(Attribute::None)
? FPGAAttr.getValueAsString()
: (StringRef)TargetCPU;
StringRef FS = !FSAttr.hasAttribute(Attribute::None)
? FSAttr.getValueAsString()
: (StringRef)TargetFS;
SmallString<512> Key;
Key.reserve(FPGA.size() + FS.size());
Key += FPGA;
Key += FS;
auto &I = SubtargetMap[Key];
if (!I) {
resetTargetOptions(F);
I = llvm::make_unique<FPGASubtarget>(TargetTriple, FPGA, FS, *this);
}
return I.get();
}
//===----------------------------------------------------------------------===//
// FPGA TTI query.
//===----------------------------------------------------------------------===//
TargetTransformInfo FPGATargetMachine::getTargetTransformInfo(const Function &F) {
return TargetTransformInfo(FPGATTIImpl(this, F));
}
//===----------------------------------------------------------------------===//
// Pass Pipeline Configuration
//===----------------------------------------------------------------------===//
namespace {
/// FPGA Code Generator Pass Configuration Options.
class FPGAPassConfig : public TargetPassConfig {
public:
FPGAPassConfig(FPGATargetMachine &TM, PassManagerBase &PM)
: TargetPassConfig(TM, PM) {}
FPGATargetMachine &getFPGATargetMachine() const {
return getTM<FPGATargetMachine>();
}
};
} // namespace
TargetPassConfig *FPGATargetMachine::createPassConfig(PassManagerBase &PM) {
return new FPGAPassConfig(*this, PM);
}
| 36.171233 | 103 | 0.616171 | [
"model"
] |
85e62106f52fd1c79207f345c0784c6dce796f00 | 247,626 | cpp | C++ | HololensBuild/Il2CppOutputProject/Source/il2cppOutput/Il2CppCCWs86.cpp | Reality-Hack-2022/TEAM-08 | 25e346560f9b7ea13ac67753ba908f30f4b4af46 | [
"MIT"
] | null | null | null | HololensBuild/Il2CppOutputProject/Source/il2cppOutput/Il2CppCCWs86.cpp | Reality-Hack-2022/TEAM-08 | 25e346560f9b7ea13ac67753ba908f30f4b4af46 | [
"MIT"
] | null | null | null | HololensBuild/Il2CppOutputProject/Source/il2cppOutput/Il2CppCCWs86.cpp | Reality-Hack-2022/TEAM-08 | 25e346560f9b7ea13ac67753ba908f30f4b4af46 | [
"MIT"
] | 2 | 2022-03-24T19:58:31.000Z | 2022-03-24T22:55:43.000Z | #include "pch-cpp.hpp"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
#include <limits>
#include "vm/CachedCCWBase.h"
#include "utils/New.h"
// System.Collections.Generic.List`1<System.Collections.Generic.KeyValuePair`2<System.Int32,UnityEngine.Vector3>>
struct List_1_t2B0E097B69E21EE57E2F2BE84618C81325998FEF;
// System.Collections.Generic.List`1<System.ValueTuple`2<UnityEngine.ComputeBuffer,System.Int32>>
struct List_1_tAA54817B473B022BE89B273FE7105B2BC93D8ED3;
// System.Collections.Generic.List`1<System.ValueTuple`2<UnityEngine.Rendering.RTHandle,System.Int32>>
struct List_1_tFFA5F09DE30D10868B0ED1944BADF3598EA1FD8C;
// System.Collections.Generic.List`1<UnityEngine.Canvas>
struct List_1_t89B5DD33B2DA3295C884E44F5B6C1519FFEC7F9E;
// System.Collections.Generic.List`1<UnityEngine.Color32>
struct List_1_tE21C42BE31D35DD3ECF3322C6CA057E27A81B4D5;
// System.Collections.Generic.List`1<UnityEngine.Component>
struct List_1_tA3929E98F6AC5A6E95EF799D2E3294F214358C0F;
// System.Collections.Generic.List`1<UnityEngine.EventSystems.IEventSystemHandler>
struct List_1_t9F9214BCC9E2E91710F684F76185A72C087B90F5;
// System.Collections.Generic.List`1<UnityEngine.UI.IMaterialModifier>
struct List_1_t9017E23C6E4C64A1E034C9FB3D321A1FBFEDA798;
// System.Collections.Generic.List`1<Microsoft.MixedReality.Toolkit.IMixedRealityService>
struct List_1_tEE673DC2821DB102F60CA7575C587CDA4EB57E40;
// System.Collections.Generic.List`1<UnityEngine.InputSystem.InputAction>
struct List_1_t1A9DEE7C61AA50CC920704B4671771EDF3E8D417;
// System.Collections.Generic.KeyValuePair`2<System.Int32,UnityEngine.Vector3>[]
struct KeyValuePair_2U5BU5D_t3407F4118AFF6185E122FBA58AF46EA1BADD305C;
// System.ValueTuple`2<UnityEngine.ComputeBuffer,System.Int32>[]
struct ValueTuple_2U5BU5D_tA2319799EDFDE6096333CECAFB4E24EDDE9F6B13;
// System.ValueTuple`2<UnityEngine.Rendering.RTHandle,System.Int32>[]
struct ValueTuple_2U5BU5D_tEA08B282D9F4BCAA5AA1BF402F7ECC59B7047514;
// UnityEngine.Canvas[]
struct CanvasU5BU5D_tDD7B86FC4D93626690EB20E44D75AC253F04A5CF;
// UnityEngine.Color32[]
struct Color32U5BU5D_t7FEB526973BF84608073B85CF2D581427F0235E2;
// UnityEngine.Component[]
struct ComponentU5BU5D_t181D1A0F31BD71963DE10ADB58D85A11E19FFF4A;
// UnityEngine.EventSystems.IEventSystemHandler[]
struct IEventSystemHandlerU5BU5D_tE4DAB3CFD6AE3EC24B88B3595771D0425A976B87;
// UnityEngine.UI.IMaterialModifier[]
struct IMaterialModifierU5BU5D_t0AB22B0969CB4BD57AF8EF39AB978386D6409479;
// Microsoft.MixedReality.Toolkit.IMixedRealityService[]
struct IMixedRealityServiceU5BU5D_tDC7BA25E4B85332C438C24B93DAFA8B9EC5BFEEA;
// UnityEngine.InputSystem.InputAction[]
struct InputActionU5BU5D_t612D1F4255E82373FD5E5514AD83FA50B21A6A73;
struct IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8;
struct IBindableIterator_tD7550F1144CFBE58090050457A2BE92B1CAEABBB;
struct IBindableVectorView_tD80A01049DD2609FEA5FACD5E77BF95A875534FA;
struct IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC;
struct IIterable_1_t5F4BD9477DDC56D9428ADFFD61354FCFE2E78588;
struct IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4;
struct IIterator_1_t6407EDB3A3187B31D54D9B4E941F88F529FCE4B3;
struct IIterator_1_t6A46A7244E5AAD0AE4F2A07AF43DA5052D55F4A4;
struct IIterator_1_t76B4F2A2B99659B935148C20E12CDDF5018A3267;
struct IIterator_1_tB1AB5AB497E87D6A397AA084D3D3D6B8D211022C;
struct IIterator_1_tD5C5DE60C4A835F60D32B19C44430B59B26BFA67;
struct IIterator_1_tE49C1648FC94E093BCD82BA18359053328200C9F;
struct IIterator_1_tF6C570C031F6203C0401C0DC0B69FCE361F7062E;
struct IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A;
struct IVectorView_1_tF548FBFC73854E307F2AA2286569F664A1E4591E;
struct List_1U5BU5D_tD693C3BA5E6BD0BD191192640B458E26163A1CCB;
struct List_1U5BU5D_t7EA20830D5762C96622D4E91A3D2D76F49495A16;
struct List_1U5BU5D_tFD3DD6AF97973ECDFB0F8440AA208760D74E6F15;
struct List_1U5BU5D_tFB6A48309329109EF33E9FE7DC7C2FAC014BD1E1;
struct List_1U5BU5D_t2A8F7DFB66A1A6708AB8AD18D644BB17810AD953;
struct List_1U5BU5D_t6AB092E941E652B32E00716408ADBD8A73F4A443;
struct List_1U5BU5D_t1D5013B39B52BAFB9A80B6AFFAC36A53315A390D;
struct List_1U5BU5D_tA8175D394C0A016468764776C7E4CD741F1EFDF2;
struct List_1U5BU5D_t1B1FE87148AEADC3DF1FE33E0D18F5892FD6ABAC;
struct List_1U5BU5D_tCB44329F43445C0C42267BE8C7724E7976D7217A;
IL2CPP_EXTERN_C_BEGIN
IL2CPP_EXTERN_C_END
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Windows.Foundation.Collections.IIterable`1<System.Collections.Generic.IEnumerable`1<System.IDisposable>>
struct NOVTABLE IIterable_1_t65C1CF61727FBB13369E9B777E6EA4756FFD7E3D : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m2B4221348B2704C13FAEA47E445A5266F50F0552(IIterator_1_tE49C1648FC94E093BCD82BA18359053328200C9F** comReturnValue) = 0;
};
// Windows.Foundation.Collections.IIterable`1<System.Collections.Generic.IEnumerable`1<System.Object>>
struct NOVTABLE IIterable_1_tB7611E3565ADF2561FF7521E03A1E3B93F7BD113 : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m1E9A9F6DA2EC9A3A751A6E85F67C9BB40798A879(IIterator_1_tD5C5DE60C4A835F60D32B19C44430B59B26BFA67** comReturnValue) = 0;
};
// Windows.Foundation.Collections.IIterable`1<System.Collections.Generic.IReadOnlyList`1<System.IDisposable>>
struct NOVTABLE IIterable_1_tDA7BDBC19E1812C5ACD6E546F60391ADC6E2CE58 : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m4F1ECE8DFCABEDF6BA2C0C3ABC35C492F13541E6(IIterator_1_tF6C570C031F6203C0401C0DC0B69FCE361F7062E** comReturnValue) = 0;
};
// Windows.Foundation.Collections.IIterable`1<System.Collections.Generic.IReadOnlyList`1<System.Object>>
struct NOVTABLE IIterable_1_t1FE40219CF2EA9D14D69F038AAD3EC908A8FE771 : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m9A24DB3CFEE6B2D8C04AD194AC25CEA2597B8D3F(IIterator_1_t6407EDB3A3187B31D54D9B4E941F88F529FCE4B3** comReturnValue) = 0;
};
// Windows.Foundation.Collections.IIterable`1<System.Collections.IEnumerable>
struct NOVTABLE IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824 : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8(IIterator_1_t6A46A7244E5AAD0AE4F2A07AF43DA5052D55F4A4** comReturnValue) = 0;
};
// Windows.Foundation.Collections.IIterable`1<System.Collections.IList>
struct NOVTABLE IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB(IIterator_1_t76B4F2A2B99659B935148C20E12CDDF5018A3267** comReturnValue) = 0;
};
// Windows.Foundation.Collections.IIterable`1<System.Object>
struct NOVTABLE IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4 : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619(IIterator_1_tB1AB5AB497E87D6A397AA084D3D3D6B8D211022C** comReturnValue) = 0;
};
// Windows.Foundation.Collections.IVectorView`1<System.Collections.Generic.IEnumerable`1<System.IDisposable>>
struct NOVTABLE IVectorView_1_t03B981D4959A85B1286E3AF8D41F475472CBCF00 : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m042A63FF0475CFCEEC8E1915D0D64456FFEAE240(uint32_t ___index0, IIterable_1_t5F4BD9477DDC56D9428ADFFD61354FCFE2E78588** comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mA6B624B6AE7095D63A0C4B0F9663C34A93AB87DC(uint32_t* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mC1F322402A67373D7C1D2E5A2FBDED7E78DD3DB6(IIterable_1_t5F4BD9477DDC56D9428ADFFD61354FCFE2E78588* ___value0, uint32_t* ___index1, bool* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m40DC9455B44C37B0027C9A3F39E5F497BEF595BE(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IIterable_1_t5F4BD9477DDC56D9428ADFFD61354FCFE2E78588** ___items1, uint32_t* comReturnValue) = 0;
};
// Windows.Foundation.Collections.IVectorView`1<System.Collections.Generic.IEnumerable`1<System.Object>>
struct NOVTABLE IVectorView_1_tDF19789741DDFC543BE092FE627C4F581626F001 : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m81C572FE9591C741899BB1DBFCBA0D16F83AFA2B(uint32_t ___index0, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4** comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m17D793E25CDC73C302DC09F9F44E3E945DB6D51B(uint32_t* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mDE5247D2CA481566F3163DD73813D5197E9A8C9F(IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4* ___value0, uint32_t* ___index1, bool* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m8C2CC34D9034DFED1C049E407D18F960E9D41D65(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4** ___items1, uint32_t* comReturnValue) = 0;
};
// Windows.Foundation.Collections.IVectorView`1<System.Collections.Generic.IReadOnlyList`1<System.IDisposable>>
struct NOVTABLE IVectorView_1_tB08ED3F588EC08EABF76F71E5B51C0BA8A8E866C : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m6DC538805182669267B260A6067279BA0DA3685D(uint32_t ___index0, IVectorView_1_tF548FBFC73854E307F2AA2286569F664A1E4591E** comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mBDD582382C6631596C6F7BCF47D28F4191787323(uint32_t* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m67D4C10DF3A1FBCDE003B7ADB152EB93ED9A66EC(IVectorView_1_tF548FBFC73854E307F2AA2286569F664A1E4591E* ___value0, uint32_t* ___index1, bool* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m13D9EBB16BDF2F6D2EADC677094A1F48199B80B3(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IVectorView_1_tF548FBFC73854E307F2AA2286569F664A1E4591E** ___items1, uint32_t* comReturnValue) = 0;
};
// Windows.Foundation.Collections.IVectorView`1<System.Collections.Generic.IReadOnlyList`1<System.Object>>
struct NOVTABLE IVectorView_1_t1FD2829C9595C49EB255C35468812A3793A7AE52 : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_mF5A66157C2B5F0912BF49D82A0244FCC98303D1B(uint32_t ___index0, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A** comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m74F555A9FBE1BA1DED6ECFA905A173A710E07AFD(uint32_t* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mBC65D06B1B6BC3BA18A9EAF3613256E61149328F(IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A* ___value0, uint32_t* ___index1, bool* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_mF8999850078D6CC7D279F2FE5D6253B7DCDEB9E4(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A** ___items1, uint32_t* comReturnValue) = 0;
};
// Windows.Foundation.Collections.IVectorView`1<System.Collections.IEnumerable>
struct NOVTABLE IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E(uint32_t ___index0, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9(uint32_t* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17(IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8* ___value0, uint32_t* ___index1, bool* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** ___items1, uint32_t* comReturnValue) = 0;
};
// Windows.Foundation.Collections.IVectorView`1<System.Collections.IList>
struct NOVTABLE IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2 : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A(uint32_t ___index0, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658(uint32_t* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428(IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC* ___value0, uint32_t* ___index1, bool* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** ___items1, uint32_t* comReturnValue) = 0;
};
// Windows.Foundation.Collections.IVectorView`1<System.Object>
struct NOVTABLE IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260(uint32_t ___index0, Il2CppIInspectable** comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B(uint32_t* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1(uint32_t ___startIndex0, uint32_t ___items1ArraySize, Il2CppIInspectable** ___items1, uint32_t* comReturnValue) = 0;
};
// Windows.UI.Xaml.Interop.IBindableIterable
struct NOVTABLE IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8 : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7(IBindableIterator_tD7550F1144CFBE58090050457A2BE92B1CAEABBB** comReturnValue) = 0;
};
// Windows.UI.Xaml.Interop.IBindableVector
struct NOVTABLE IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC : Il2CppIInspectable
{
static const Il2CppGuid IID;
virtual il2cpp_hresult_t STDCALL IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED(uint32_t ___index0, Il2CppIInspectable** comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9(uint32_t* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38(IBindableVectorView_tD80A01049DD2609FEA5FACD5E77BF95A875534FA** comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) = 0;
virtual il2cpp_hresult_t STDCALL IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213(uint32_t ___index0, Il2CppIInspectable* ___value1) = 0;
virtual il2cpp_hresult_t STDCALL IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5(uint32_t ___index0, Il2CppIInspectable* ___value1) = 0;
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0(uint32_t ___index0) = 0;
virtual il2cpp_hresult_t STDCALL IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F(Il2CppIInspectable* ___value0) = 0;
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3() = 0;
virtual il2cpp_hresult_t STDCALL IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF() = 0;
};
// System.Object
// System.Collections.Generic.List`1<System.Collections.Generic.KeyValuePair`2<System.Int32,UnityEngine.Vector3>>
struct List_1_t2B0E097B69E21EE57E2F2BE84618C81325998FEF : public RuntimeObject
{
public:
// T[] System.Collections.Generic.List`1::_items
KeyValuePair_2U5BU5D_t3407F4118AFF6185E122FBA58AF46EA1BADD305C* ____items_1;
// System.Int32 System.Collections.Generic.List`1::_size
int32_t ____size_2;
// System.Int32 System.Collections.Generic.List`1::_version
int32_t ____version_3;
// System.Object System.Collections.Generic.List`1::_syncRoot
RuntimeObject * ____syncRoot_4;
public:
inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_t2B0E097B69E21EE57E2F2BE84618C81325998FEF, ____items_1)); }
inline KeyValuePair_2U5BU5D_t3407F4118AFF6185E122FBA58AF46EA1BADD305C* get__items_1() const { return ____items_1; }
inline KeyValuePair_2U5BU5D_t3407F4118AFF6185E122FBA58AF46EA1BADD305C** get_address_of__items_1() { return &____items_1; }
inline void set__items_1(KeyValuePair_2U5BU5D_t3407F4118AFF6185E122FBA58AF46EA1BADD305C* value)
{
____items_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____items_1), (void*)value);
}
inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_t2B0E097B69E21EE57E2F2BE84618C81325998FEF, ____size_2)); }
inline int32_t get__size_2() const { return ____size_2; }
inline int32_t* get_address_of__size_2() { return &____size_2; }
inline void set__size_2(int32_t value)
{
____size_2 = value;
}
inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_t2B0E097B69E21EE57E2F2BE84618C81325998FEF, ____version_3)); }
inline int32_t get__version_3() const { return ____version_3; }
inline int32_t* get_address_of__version_3() { return &____version_3; }
inline void set__version_3(int32_t value)
{
____version_3 = value;
}
inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_t2B0E097B69E21EE57E2F2BE84618C81325998FEF, ____syncRoot_4)); }
inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; }
inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; }
inline void set__syncRoot_4(RuntimeObject * value)
{
____syncRoot_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____syncRoot_4), (void*)value);
}
};
struct List_1_t2B0E097B69E21EE57E2F2BE84618C81325998FEF_StaticFields
{
public:
// T[] System.Collections.Generic.List`1::_emptyArray
KeyValuePair_2U5BU5D_t3407F4118AFF6185E122FBA58AF46EA1BADD305C* ____emptyArray_5;
public:
inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_t2B0E097B69E21EE57E2F2BE84618C81325998FEF_StaticFields, ____emptyArray_5)); }
inline KeyValuePair_2U5BU5D_t3407F4118AFF6185E122FBA58AF46EA1BADD305C* get__emptyArray_5() const { return ____emptyArray_5; }
inline KeyValuePair_2U5BU5D_t3407F4118AFF6185E122FBA58AF46EA1BADD305C** get_address_of__emptyArray_5() { return &____emptyArray_5; }
inline void set__emptyArray_5(KeyValuePair_2U5BU5D_t3407F4118AFF6185E122FBA58AF46EA1BADD305C* value)
{
____emptyArray_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____emptyArray_5), (void*)value);
}
};
// System.Collections.Generic.List`1<System.ValueTuple`2<UnityEngine.ComputeBuffer,System.Int32>>
struct List_1_tAA54817B473B022BE89B273FE7105B2BC93D8ED3 : public RuntimeObject
{
public:
// T[] System.Collections.Generic.List`1::_items
ValueTuple_2U5BU5D_tA2319799EDFDE6096333CECAFB4E24EDDE9F6B13* ____items_1;
// System.Int32 System.Collections.Generic.List`1::_size
int32_t ____size_2;
// System.Int32 System.Collections.Generic.List`1::_version
int32_t ____version_3;
// System.Object System.Collections.Generic.List`1::_syncRoot
RuntimeObject * ____syncRoot_4;
public:
inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_tAA54817B473B022BE89B273FE7105B2BC93D8ED3, ____items_1)); }
inline ValueTuple_2U5BU5D_tA2319799EDFDE6096333CECAFB4E24EDDE9F6B13* get__items_1() const { return ____items_1; }
inline ValueTuple_2U5BU5D_tA2319799EDFDE6096333CECAFB4E24EDDE9F6B13** get_address_of__items_1() { return &____items_1; }
inline void set__items_1(ValueTuple_2U5BU5D_tA2319799EDFDE6096333CECAFB4E24EDDE9F6B13* value)
{
____items_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____items_1), (void*)value);
}
inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_tAA54817B473B022BE89B273FE7105B2BC93D8ED3, ____size_2)); }
inline int32_t get__size_2() const { return ____size_2; }
inline int32_t* get_address_of__size_2() { return &____size_2; }
inline void set__size_2(int32_t value)
{
____size_2 = value;
}
inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_tAA54817B473B022BE89B273FE7105B2BC93D8ED3, ____version_3)); }
inline int32_t get__version_3() const { return ____version_3; }
inline int32_t* get_address_of__version_3() { return &____version_3; }
inline void set__version_3(int32_t value)
{
____version_3 = value;
}
inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_tAA54817B473B022BE89B273FE7105B2BC93D8ED3, ____syncRoot_4)); }
inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; }
inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; }
inline void set__syncRoot_4(RuntimeObject * value)
{
____syncRoot_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____syncRoot_4), (void*)value);
}
};
struct List_1_tAA54817B473B022BE89B273FE7105B2BC93D8ED3_StaticFields
{
public:
// T[] System.Collections.Generic.List`1::_emptyArray
ValueTuple_2U5BU5D_tA2319799EDFDE6096333CECAFB4E24EDDE9F6B13* ____emptyArray_5;
public:
inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_tAA54817B473B022BE89B273FE7105B2BC93D8ED3_StaticFields, ____emptyArray_5)); }
inline ValueTuple_2U5BU5D_tA2319799EDFDE6096333CECAFB4E24EDDE9F6B13* get__emptyArray_5() const { return ____emptyArray_5; }
inline ValueTuple_2U5BU5D_tA2319799EDFDE6096333CECAFB4E24EDDE9F6B13** get_address_of__emptyArray_5() { return &____emptyArray_5; }
inline void set__emptyArray_5(ValueTuple_2U5BU5D_tA2319799EDFDE6096333CECAFB4E24EDDE9F6B13* value)
{
____emptyArray_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____emptyArray_5), (void*)value);
}
};
// System.Collections.Generic.List`1<System.ValueTuple`2<UnityEngine.Rendering.RTHandle,System.Int32>>
struct List_1_tFFA5F09DE30D10868B0ED1944BADF3598EA1FD8C : public RuntimeObject
{
public:
// T[] System.Collections.Generic.List`1::_items
ValueTuple_2U5BU5D_tEA08B282D9F4BCAA5AA1BF402F7ECC59B7047514* ____items_1;
// System.Int32 System.Collections.Generic.List`1::_size
int32_t ____size_2;
// System.Int32 System.Collections.Generic.List`1::_version
int32_t ____version_3;
// System.Object System.Collections.Generic.List`1::_syncRoot
RuntimeObject * ____syncRoot_4;
public:
inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_tFFA5F09DE30D10868B0ED1944BADF3598EA1FD8C, ____items_1)); }
inline ValueTuple_2U5BU5D_tEA08B282D9F4BCAA5AA1BF402F7ECC59B7047514* get__items_1() const { return ____items_1; }
inline ValueTuple_2U5BU5D_tEA08B282D9F4BCAA5AA1BF402F7ECC59B7047514** get_address_of__items_1() { return &____items_1; }
inline void set__items_1(ValueTuple_2U5BU5D_tEA08B282D9F4BCAA5AA1BF402F7ECC59B7047514* value)
{
____items_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____items_1), (void*)value);
}
inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_tFFA5F09DE30D10868B0ED1944BADF3598EA1FD8C, ____size_2)); }
inline int32_t get__size_2() const { return ____size_2; }
inline int32_t* get_address_of__size_2() { return &____size_2; }
inline void set__size_2(int32_t value)
{
____size_2 = value;
}
inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_tFFA5F09DE30D10868B0ED1944BADF3598EA1FD8C, ____version_3)); }
inline int32_t get__version_3() const { return ____version_3; }
inline int32_t* get_address_of__version_3() { return &____version_3; }
inline void set__version_3(int32_t value)
{
____version_3 = value;
}
inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_tFFA5F09DE30D10868B0ED1944BADF3598EA1FD8C, ____syncRoot_4)); }
inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; }
inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; }
inline void set__syncRoot_4(RuntimeObject * value)
{
____syncRoot_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____syncRoot_4), (void*)value);
}
};
struct List_1_tFFA5F09DE30D10868B0ED1944BADF3598EA1FD8C_StaticFields
{
public:
// T[] System.Collections.Generic.List`1::_emptyArray
ValueTuple_2U5BU5D_tEA08B282D9F4BCAA5AA1BF402F7ECC59B7047514* ____emptyArray_5;
public:
inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_tFFA5F09DE30D10868B0ED1944BADF3598EA1FD8C_StaticFields, ____emptyArray_5)); }
inline ValueTuple_2U5BU5D_tEA08B282D9F4BCAA5AA1BF402F7ECC59B7047514* get__emptyArray_5() const { return ____emptyArray_5; }
inline ValueTuple_2U5BU5D_tEA08B282D9F4BCAA5AA1BF402F7ECC59B7047514** get_address_of__emptyArray_5() { return &____emptyArray_5; }
inline void set__emptyArray_5(ValueTuple_2U5BU5D_tEA08B282D9F4BCAA5AA1BF402F7ECC59B7047514* value)
{
____emptyArray_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____emptyArray_5), (void*)value);
}
};
// System.Collections.Generic.List`1<UnityEngine.Canvas>
struct List_1_t89B5DD33B2DA3295C884E44F5B6C1519FFEC7F9E : public RuntimeObject
{
public:
// T[] System.Collections.Generic.List`1::_items
CanvasU5BU5D_tDD7B86FC4D93626690EB20E44D75AC253F04A5CF* ____items_1;
// System.Int32 System.Collections.Generic.List`1::_size
int32_t ____size_2;
// System.Int32 System.Collections.Generic.List`1::_version
int32_t ____version_3;
// System.Object System.Collections.Generic.List`1::_syncRoot
RuntimeObject * ____syncRoot_4;
public:
inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_t89B5DD33B2DA3295C884E44F5B6C1519FFEC7F9E, ____items_1)); }
inline CanvasU5BU5D_tDD7B86FC4D93626690EB20E44D75AC253F04A5CF* get__items_1() const { return ____items_1; }
inline CanvasU5BU5D_tDD7B86FC4D93626690EB20E44D75AC253F04A5CF** get_address_of__items_1() { return &____items_1; }
inline void set__items_1(CanvasU5BU5D_tDD7B86FC4D93626690EB20E44D75AC253F04A5CF* value)
{
____items_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____items_1), (void*)value);
}
inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_t89B5DD33B2DA3295C884E44F5B6C1519FFEC7F9E, ____size_2)); }
inline int32_t get__size_2() const { return ____size_2; }
inline int32_t* get_address_of__size_2() { return &____size_2; }
inline void set__size_2(int32_t value)
{
____size_2 = value;
}
inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_t89B5DD33B2DA3295C884E44F5B6C1519FFEC7F9E, ____version_3)); }
inline int32_t get__version_3() const { return ____version_3; }
inline int32_t* get_address_of__version_3() { return &____version_3; }
inline void set__version_3(int32_t value)
{
____version_3 = value;
}
inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_t89B5DD33B2DA3295C884E44F5B6C1519FFEC7F9E, ____syncRoot_4)); }
inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; }
inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; }
inline void set__syncRoot_4(RuntimeObject * value)
{
____syncRoot_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____syncRoot_4), (void*)value);
}
};
struct List_1_t89B5DD33B2DA3295C884E44F5B6C1519FFEC7F9E_StaticFields
{
public:
// T[] System.Collections.Generic.List`1::_emptyArray
CanvasU5BU5D_tDD7B86FC4D93626690EB20E44D75AC253F04A5CF* ____emptyArray_5;
public:
inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_t89B5DD33B2DA3295C884E44F5B6C1519FFEC7F9E_StaticFields, ____emptyArray_5)); }
inline CanvasU5BU5D_tDD7B86FC4D93626690EB20E44D75AC253F04A5CF* get__emptyArray_5() const { return ____emptyArray_5; }
inline CanvasU5BU5D_tDD7B86FC4D93626690EB20E44D75AC253F04A5CF** get_address_of__emptyArray_5() { return &____emptyArray_5; }
inline void set__emptyArray_5(CanvasU5BU5D_tDD7B86FC4D93626690EB20E44D75AC253F04A5CF* value)
{
____emptyArray_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____emptyArray_5), (void*)value);
}
};
// System.Collections.Generic.List`1<UnityEngine.Color32>
struct List_1_tE21C42BE31D35DD3ECF3322C6CA057E27A81B4D5 : public RuntimeObject
{
public:
// T[] System.Collections.Generic.List`1::_items
Color32U5BU5D_t7FEB526973BF84608073B85CF2D581427F0235E2* ____items_1;
// System.Int32 System.Collections.Generic.List`1::_size
int32_t ____size_2;
// System.Int32 System.Collections.Generic.List`1::_version
int32_t ____version_3;
// System.Object System.Collections.Generic.List`1::_syncRoot
RuntimeObject * ____syncRoot_4;
public:
inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_tE21C42BE31D35DD3ECF3322C6CA057E27A81B4D5, ____items_1)); }
inline Color32U5BU5D_t7FEB526973BF84608073B85CF2D581427F0235E2* get__items_1() const { return ____items_1; }
inline Color32U5BU5D_t7FEB526973BF84608073B85CF2D581427F0235E2** get_address_of__items_1() { return &____items_1; }
inline void set__items_1(Color32U5BU5D_t7FEB526973BF84608073B85CF2D581427F0235E2* value)
{
____items_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____items_1), (void*)value);
}
inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_tE21C42BE31D35DD3ECF3322C6CA057E27A81B4D5, ____size_2)); }
inline int32_t get__size_2() const { return ____size_2; }
inline int32_t* get_address_of__size_2() { return &____size_2; }
inline void set__size_2(int32_t value)
{
____size_2 = value;
}
inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_tE21C42BE31D35DD3ECF3322C6CA057E27A81B4D5, ____version_3)); }
inline int32_t get__version_3() const { return ____version_3; }
inline int32_t* get_address_of__version_3() { return &____version_3; }
inline void set__version_3(int32_t value)
{
____version_3 = value;
}
inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_tE21C42BE31D35DD3ECF3322C6CA057E27A81B4D5, ____syncRoot_4)); }
inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; }
inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; }
inline void set__syncRoot_4(RuntimeObject * value)
{
____syncRoot_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____syncRoot_4), (void*)value);
}
};
struct List_1_tE21C42BE31D35DD3ECF3322C6CA057E27A81B4D5_StaticFields
{
public:
// T[] System.Collections.Generic.List`1::_emptyArray
Color32U5BU5D_t7FEB526973BF84608073B85CF2D581427F0235E2* ____emptyArray_5;
public:
inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_tE21C42BE31D35DD3ECF3322C6CA057E27A81B4D5_StaticFields, ____emptyArray_5)); }
inline Color32U5BU5D_t7FEB526973BF84608073B85CF2D581427F0235E2* get__emptyArray_5() const { return ____emptyArray_5; }
inline Color32U5BU5D_t7FEB526973BF84608073B85CF2D581427F0235E2** get_address_of__emptyArray_5() { return &____emptyArray_5; }
inline void set__emptyArray_5(Color32U5BU5D_t7FEB526973BF84608073B85CF2D581427F0235E2* value)
{
____emptyArray_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____emptyArray_5), (void*)value);
}
};
// System.Collections.Generic.List`1<UnityEngine.Component>
struct List_1_tA3929E98F6AC5A6E95EF799D2E3294F214358C0F : public RuntimeObject
{
public:
// T[] System.Collections.Generic.List`1::_items
ComponentU5BU5D_t181D1A0F31BD71963DE10ADB58D85A11E19FFF4A* ____items_1;
// System.Int32 System.Collections.Generic.List`1::_size
int32_t ____size_2;
// System.Int32 System.Collections.Generic.List`1::_version
int32_t ____version_3;
// System.Object System.Collections.Generic.List`1::_syncRoot
RuntimeObject * ____syncRoot_4;
public:
inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_tA3929E98F6AC5A6E95EF799D2E3294F214358C0F, ____items_1)); }
inline ComponentU5BU5D_t181D1A0F31BD71963DE10ADB58D85A11E19FFF4A* get__items_1() const { return ____items_1; }
inline ComponentU5BU5D_t181D1A0F31BD71963DE10ADB58D85A11E19FFF4A** get_address_of__items_1() { return &____items_1; }
inline void set__items_1(ComponentU5BU5D_t181D1A0F31BD71963DE10ADB58D85A11E19FFF4A* value)
{
____items_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____items_1), (void*)value);
}
inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_tA3929E98F6AC5A6E95EF799D2E3294F214358C0F, ____size_2)); }
inline int32_t get__size_2() const { return ____size_2; }
inline int32_t* get_address_of__size_2() { return &____size_2; }
inline void set__size_2(int32_t value)
{
____size_2 = value;
}
inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_tA3929E98F6AC5A6E95EF799D2E3294F214358C0F, ____version_3)); }
inline int32_t get__version_3() const { return ____version_3; }
inline int32_t* get_address_of__version_3() { return &____version_3; }
inline void set__version_3(int32_t value)
{
____version_3 = value;
}
inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_tA3929E98F6AC5A6E95EF799D2E3294F214358C0F, ____syncRoot_4)); }
inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; }
inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; }
inline void set__syncRoot_4(RuntimeObject * value)
{
____syncRoot_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____syncRoot_4), (void*)value);
}
};
struct List_1_tA3929E98F6AC5A6E95EF799D2E3294F214358C0F_StaticFields
{
public:
// T[] System.Collections.Generic.List`1::_emptyArray
ComponentU5BU5D_t181D1A0F31BD71963DE10ADB58D85A11E19FFF4A* ____emptyArray_5;
public:
inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_tA3929E98F6AC5A6E95EF799D2E3294F214358C0F_StaticFields, ____emptyArray_5)); }
inline ComponentU5BU5D_t181D1A0F31BD71963DE10ADB58D85A11E19FFF4A* get__emptyArray_5() const { return ____emptyArray_5; }
inline ComponentU5BU5D_t181D1A0F31BD71963DE10ADB58D85A11E19FFF4A** get_address_of__emptyArray_5() { return &____emptyArray_5; }
inline void set__emptyArray_5(ComponentU5BU5D_t181D1A0F31BD71963DE10ADB58D85A11E19FFF4A* value)
{
____emptyArray_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____emptyArray_5), (void*)value);
}
};
// System.Collections.Generic.List`1<UnityEngine.EventSystems.IEventSystemHandler>
struct List_1_t9F9214BCC9E2E91710F684F76185A72C087B90F5 : public RuntimeObject
{
public:
// T[] System.Collections.Generic.List`1::_items
IEventSystemHandlerU5BU5D_tE4DAB3CFD6AE3EC24B88B3595771D0425A976B87* ____items_1;
// System.Int32 System.Collections.Generic.List`1::_size
int32_t ____size_2;
// System.Int32 System.Collections.Generic.List`1::_version
int32_t ____version_3;
// System.Object System.Collections.Generic.List`1::_syncRoot
RuntimeObject * ____syncRoot_4;
public:
inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_t9F9214BCC9E2E91710F684F76185A72C087B90F5, ____items_1)); }
inline IEventSystemHandlerU5BU5D_tE4DAB3CFD6AE3EC24B88B3595771D0425A976B87* get__items_1() const { return ____items_1; }
inline IEventSystemHandlerU5BU5D_tE4DAB3CFD6AE3EC24B88B3595771D0425A976B87** get_address_of__items_1() { return &____items_1; }
inline void set__items_1(IEventSystemHandlerU5BU5D_tE4DAB3CFD6AE3EC24B88B3595771D0425A976B87* value)
{
____items_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____items_1), (void*)value);
}
inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_t9F9214BCC9E2E91710F684F76185A72C087B90F5, ____size_2)); }
inline int32_t get__size_2() const { return ____size_2; }
inline int32_t* get_address_of__size_2() { return &____size_2; }
inline void set__size_2(int32_t value)
{
____size_2 = value;
}
inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_t9F9214BCC9E2E91710F684F76185A72C087B90F5, ____version_3)); }
inline int32_t get__version_3() const { return ____version_3; }
inline int32_t* get_address_of__version_3() { return &____version_3; }
inline void set__version_3(int32_t value)
{
____version_3 = value;
}
inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_t9F9214BCC9E2E91710F684F76185A72C087B90F5, ____syncRoot_4)); }
inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; }
inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; }
inline void set__syncRoot_4(RuntimeObject * value)
{
____syncRoot_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____syncRoot_4), (void*)value);
}
};
struct List_1_t9F9214BCC9E2E91710F684F76185A72C087B90F5_StaticFields
{
public:
// T[] System.Collections.Generic.List`1::_emptyArray
IEventSystemHandlerU5BU5D_tE4DAB3CFD6AE3EC24B88B3595771D0425A976B87* ____emptyArray_5;
public:
inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_t9F9214BCC9E2E91710F684F76185A72C087B90F5_StaticFields, ____emptyArray_5)); }
inline IEventSystemHandlerU5BU5D_tE4DAB3CFD6AE3EC24B88B3595771D0425A976B87* get__emptyArray_5() const { return ____emptyArray_5; }
inline IEventSystemHandlerU5BU5D_tE4DAB3CFD6AE3EC24B88B3595771D0425A976B87** get_address_of__emptyArray_5() { return &____emptyArray_5; }
inline void set__emptyArray_5(IEventSystemHandlerU5BU5D_tE4DAB3CFD6AE3EC24B88B3595771D0425A976B87* value)
{
____emptyArray_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____emptyArray_5), (void*)value);
}
};
// System.Collections.Generic.List`1<UnityEngine.UI.IMaterialModifier>
struct List_1_t9017E23C6E4C64A1E034C9FB3D321A1FBFEDA798 : public RuntimeObject
{
public:
// T[] System.Collections.Generic.List`1::_items
IMaterialModifierU5BU5D_t0AB22B0969CB4BD57AF8EF39AB978386D6409479* ____items_1;
// System.Int32 System.Collections.Generic.List`1::_size
int32_t ____size_2;
// System.Int32 System.Collections.Generic.List`1::_version
int32_t ____version_3;
// System.Object System.Collections.Generic.List`1::_syncRoot
RuntimeObject * ____syncRoot_4;
public:
inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_t9017E23C6E4C64A1E034C9FB3D321A1FBFEDA798, ____items_1)); }
inline IMaterialModifierU5BU5D_t0AB22B0969CB4BD57AF8EF39AB978386D6409479* get__items_1() const { return ____items_1; }
inline IMaterialModifierU5BU5D_t0AB22B0969CB4BD57AF8EF39AB978386D6409479** get_address_of__items_1() { return &____items_1; }
inline void set__items_1(IMaterialModifierU5BU5D_t0AB22B0969CB4BD57AF8EF39AB978386D6409479* value)
{
____items_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____items_1), (void*)value);
}
inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_t9017E23C6E4C64A1E034C9FB3D321A1FBFEDA798, ____size_2)); }
inline int32_t get__size_2() const { return ____size_2; }
inline int32_t* get_address_of__size_2() { return &____size_2; }
inline void set__size_2(int32_t value)
{
____size_2 = value;
}
inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_t9017E23C6E4C64A1E034C9FB3D321A1FBFEDA798, ____version_3)); }
inline int32_t get__version_3() const { return ____version_3; }
inline int32_t* get_address_of__version_3() { return &____version_3; }
inline void set__version_3(int32_t value)
{
____version_3 = value;
}
inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_t9017E23C6E4C64A1E034C9FB3D321A1FBFEDA798, ____syncRoot_4)); }
inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; }
inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; }
inline void set__syncRoot_4(RuntimeObject * value)
{
____syncRoot_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____syncRoot_4), (void*)value);
}
};
struct List_1_t9017E23C6E4C64A1E034C9FB3D321A1FBFEDA798_StaticFields
{
public:
// T[] System.Collections.Generic.List`1::_emptyArray
IMaterialModifierU5BU5D_t0AB22B0969CB4BD57AF8EF39AB978386D6409479* ____emptyArray_5;
public:
inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_t9017E23C6E4C64A1E034C9FB3D321A1FBFEDA798_StaticFields, ____emptyArray_5)); }
inline IMaterialModifierU5BU5D_t0AB22B0969CB4BD57AF8EF39AB978386D6409479* get__emptyArray_5() const { return ____emptyArray_5; }
inline IMaterialModifierU5BU5D_t0AB22B0969CB4BD57AF8EF39AB978386D6409479** get_address_of__emptyArray_5() { return &____emptyArray_5; }
inline void set__emptyArray_5(IMaterialModifierU5BU5D_t0AB22B0969CB4BD57AF8EF39AB978386D6409479* value)
{
____emptyArray_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____emptyArray_5), (void*)value);
}
};
// System.Collections.Generic.List`1<Microsoft.MixedReality.Toolkit.IMixedRealityService>
struct List_1_tEE673DC2821DB102F60CA7575C587CDA4EB57E40 : public RuntimeObject
{
public:
// T[] System.Collections.Generic.List`1::_items
IMixedRealityServiceU5BU5D_tDC7BA25E4B85332C438C24B93DAFA8B9EC5BFEEA* ____items_1;
// System.Int32 System.Collections.Generic.List`1::_size
int32_t ____size_2;
// System.Int32 System.Collections.Generic.List`1::_version
int32_t ____version_3;
// System.Object System.Collections.Generic.List`1::_syncRoot
RuntimeObject * ____syncRoot_4;
public:
inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_tEE673DC2821DB102F60CA7575C587CDA4EB57E40, ____items_1)); }
inline IMixedRealityServiceU5BU5D_tDC7BA25E4B85332C438C24B93DAFA8B9EC5BFEEA* get__items_1() const { return ____items_1; }
inline IMixedRealityServiceU5BU5D_tDC7BA25E4B85332C438C24B93DAFA8B9EC5BFEEA** get_address_of__items_1() { return &____items_1; }
inline void set__items_1(IMixedRealityServiceU5BU5D_tDC7BA25E4B85332C438C24B93DAFA8B9EC5BFEEA* value)
{
____items_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____items_1), (void*)value);
}
inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_tEE673DC2821DB102F60CA7575C587CDA4EB57E40, ____size_2)); }
inline int32_t get__size_2() const { return ____size_2; }
inline int32_t* get_address_of__size_2() { return &____size_2; }
inline void set__size_2(int32_t value)
{
____size_2 = value;
}
inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_tEE673DC2821DB102F60CA7575C587CDA4EB57E40, ____version_3)); }
inline int32_t get__version_3() const { return ____version_3; }
inline int32_t* get_address_of__version_3() { return &____version_3; }
inline void set__version_3(int32_t value)
{
____version_3 = value;
}
inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_tEE673DC2821DB102F60CA7575C587CDA4EB57E40, ____syncRoot_4)); }
inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; }
inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; }
inline void set__syncRoot_4(RuntimeObject * value)
{
____syncRoot_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____syncRoot_4), (void*)value);
}
};
struct List_1_tEE673DC2821DB102F60CA7575C587CDA4EB57E40_StaticFields
{
public:
// T[] System.Collections.Generic.List`1::_emptyArray
IMixedRealityServiceU5BU5D_tDC7BA25E4B85332C438C24B93DAFA8B9EC5BFEEA* ____emptyArray_5;
public:
inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_tEE673DC2821DB102F60CA7575C587CDA4EB57E40_StaticFields, ____emptyArray_5)); }
inline IMixedRealityServiceU5BU5D_tDC7BA25E4B85332C438C24B93DAFA8B9EC5BFEEA* get__emptyArray_5() const { return ____emptyArray_5; }
inline IMixedRealityServiceU5BU5D_tDC7BA25E4B85332C438C24B93DAFA8B9EC5BFEEA** get_address_of__emptyArray_5() { return &____emptyArray_5; }
inline void set__emptyArray_5(IMixedRealityServiceU5BU5D_tDC7BA25E4B85332C438C24B93DAFA8B9EC5BFEEA* value)
{
____emptyArray_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____emptyArray_5), (void*)value);
}
};
// System.Collections.Generic.List`1<UnityEngine.InputSystem.InputAction>
struct List_1_t1A9DEE7C61AA50CC920704B4671771EDF3E8D417 : public RuntimeObject
{
public:
// T[] System.Collections.Generic.List`1::_items
InputActionU5BU5D_t612D1F4255E82373FD5E5514AD83FA50B21A6A73* ____items_1;
// System.Int32 System.Collections.Generic.List`1::_size
int32_t ____size_2;
// System.Int32 System.Collections.Generic.List`1::_version
int32_t ____version_3;
// System.Object System.Collections.Generic.List`1::_syncRoot
RuntimeObject * ____syncRoot_4;
public:
inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_t1A9DEE7C61AA50CC920704B4671771EDF3E8D417, ____items_1)); }
inline InputActionU5BU5D_t612D1F4255E82373FD5E5514AD83FA50B21A6A73* get__items_1() const { return ____items_1; }
inline InputActionU5BU5D_t612D1F4255E82373FD5E5514AD83FA50B21A6A73** get_address_of__items_1() { return &____items_1; }
inline void set__items_1(InputActionU5BU5D_t612D1F4255E82373FD5E5514AD83FA50B21A6A73* value)
{
____items_1 = value;
Il2CppCodeGenWriteBarrier((void**)(&____items_1), (void*)value);
}
inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_t1A9DEE7C61AA50CC920704B4671771EDF3E8D417, ____size_2)); }
inline int32_t get__size_2() const { return ____size_2; }
inline int32_t* get_address_of__size_2() { return &____size_2; }
inline void set__size_2(int32_t value)
{
____size_2 = value;
}
inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_t1A9DEE7C61AA50CC920704B4671771EDF3E8D417, ____version_3)); }
inline int32_t get__version_3() const { return ____version_3; }
inline int32_t* get_address_of__version_3() { return &____version_3; }
inline void set__version_3(int32_t value)
{
____version_3 = value;
}
inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_t1A9DEE7C61AA50CC920704B4671771EDF3E8D417, ____syncRoot_4)); }
inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; }
inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; }
inline void set__syncRoot_4(RuntimeObject * value)
{
____syncRoot_4 = value;
Il2CppCodeGenWriteBarrier((void**)(&____syncRoot_4), (void*)value);
}
};
struct List_1_t1A9DEE7C61AA50CC920704B4671771EDF3E8D417_StaticFields
{
public:
// T[] System.Collections.Generic.List`1::_emptyArray
InputActionU5BU5D_t612D1F4255E82373FD5E5514AD83FA50B21A6A73* ____emptyArray_5;
public:
inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_t1A9DEE7C61AA50CC920704B4671771EDF3E8D417_StaticFields, ____emptyArray_5)); }
inline InputActionU5BU5D_t612D1F4255E82373FD5E5514AD83FA50B21A6A73* get__emptyArray_5() const { return ____emptyArray_5; }
inline InputActionU5BU5D_t612D1F4255E82373FD5E5514AD83FA50B21A6A73** get_address_of__emptyArray_5() { return &____emptyArray_5; }
inline void set__emptyArray_5(InputActionU5BU5D_t612D1F4255E82373FD5E5514AD83FA50B21A6A73* value)
{
____emptyArray_5 = value;
Il2CppCodeGenWriteBarrier((void**)(&____emptyArray_5), (void*)value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// System.Collections.Generic.List`1<System.Collections.Generic.KeyValuePair`2<System.Int32,UnityEngine.Vector3>>[]
struct List_1U5BU5D_tD693C3BA5E6BD0BD191192640B458E26163A1CCB : public RuntimeArray
{
public:
ALIGN_FIELD (8) List_1_t2B0E097B69E21EE57E2F2BE84618C81325998FEF * m_Items[1];
public:
inline List_1_t2B0E097B69E21EE57E2F2BE84618C81325998FEF * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline List_1_t2B0E097B69E21EE57E2F2BE84618C81325998FEF ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, List_1_t2B0E097B69E21EE57E2F2BE84618C81325998FEF * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
inline List_1_t2B0E097B69E21EE57E2F2BE84618C81325998FEF * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline List_1_t2B0E097B69E21EE57E2F2BE84618C81325998FEF ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, List_1_t2B0E097B69E21EE57E2F2BE84618C81325998FEF * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
};
// System.Collections.Generic.List`1<System.ValueTuple`2<UnityEngine.ComputeBuffer,System.Int32>>[]
struct List_1U5BU5D_t7EA20830D5762C96622D4E91A3D2D76F49495A16 : public RuntimeArray
{
public:
ALIGN_FIELD (8) List_1_tAA54817B473B022BE89B273FE7105B2BC93D8ED3 * m_Items[1];
public:
inline List_1_tAA54817B473B022BE89B273FE7105B2BC93D8ED3 * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline List_1_tAA54817B473B022BE89B273FE7105B2BC93D8ED3 ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, List_1_tAA54817B473B022BE89B273FE7105B2BC93D8ED3 * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
inline List_1_tAA54817B473B022BE89B273FE7105B2BC93D8ED3 * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline List_1_tAA54817B473B022BE89B273FE7105B2BC93D8ED3 ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, List_1_tAA54817B473B022BE89B273FE7105B2BC93D8ED3 * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
};
// System.Collections.Generic.List`1<System.ValueTuple`2<UnityEngine.Rendering.RTHandle,System.Int32>>[]
struct List_1U5BU5D_tFD3DD6AF97973ECDFB0F8440AA208760D74E6F15 : public RuntimeArray
{
public:
ALIGN_FIELD (8) List_1_tFFA5F09DE30D10868B0ED1944BADF3598EA1FD8C * m_Items[1];
public:
inline List_1_tFFA5F09DE30D10868B0ED1944BADF3598EA1FD8C * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline List_1_tFFA5F09DE30D10868B0ED1944BADF3598EA1FD8C ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, List_1_tFFA5F09DE30D10868B0ED1944BADF3598EA1FD8C * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
inline List_1_tFFA5F09DE30D10868B0ED1944BADF3598EA1FD8C * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline List_1_tFFA5F09DE30D10868B0ED1944BADF3598EA1FD8C ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, List_1_tFFA5F09DE30D10868B0ED1944BADF3598EA1FD8C * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
};
// System.Collections.Generic.List`1<UnityEngine.Canvas>[]
struct List_1U5BU5D_tFB6A48309329109EF33E9FE7DC7C2FAC014BD1E1 : public RuntimeArray
{
public:
ALIGN_FIELD (8) List_1_t89B5DD33B2DA3295C884E44F5B6C1519FFEC7F9E * m_Items[1];
public:
inline List_1_t89B5DD33B2DA3295C884E44F5B6C1519FFEC7F9E * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline List_1_t89B5DD33B2DA3295C884E44F5B6C1519FFEC7F9E ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, List_1_t89B5DD33B2DA3295C884E44F5B6C1519FFEC7F9E * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
inline List_1_t89B5DD33B2DA3295C884E44F5B6C1519FFEC7F9E * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline List_1_t89B5DD33B2DA3295C884E44F5B6C1519FFEC7F9E ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, List_1_t89B5DD33B2DA3295C884E44F5B6C1519FFEC7F9E * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
};
// System.Collections.Generic.List`1<UnityEngine.Color32>[]
struct List_1U5BU5D_t2A8F7DFB66A1A6708AB8AD18D644BB17810AD953 : public RuntimeArray
{
public:
ALIGN_FIELD (8) List_1_tE21C42BE31D35DD3ECF3322C6CA057E27A81B4D5 * m_Items[1];
public:
inline List_1_tE21C42BE31D35DD3ECF3322C6CA057E27A81B4D5 * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline List_1_tE21C42BE31D35DD3ECF3322C6CA057E27A81B4D5 ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, List_1_tE21C42BE31D35DD3ECF3322C6CA057E27A81B4D5 * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
inline List_1_tE21C42BE31D35DD3ECF3322C6CA057E27A81B4D5 * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline List_1_tE21C42BE31D35DD3ECF3322C6CA057E27A81B4D5 ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, List_1_tE21C42BE31D35DD3ECF3322C6CA057E27A81B4D5 * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
};
// System.Collections.Generic.List`1<UnityEngine.Component>[]
struct List_1U5BU5D_t6AB092E941E652B32E00716408ADBD8A73F4A443 : public RuntimeArray
{
public:
ALIGN_FIELD (8) List_1_tA3929E98F6AC5A6E95EF799D2E3294F214358C0F * m_Items[1];
public:
inline List_1_tA3929E98F6AC5A6E95EF799D2E3294F214358C0F * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline List_1_tA3929E98F6AC5A6E95EF799D2E3294F214358C0F ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, List_1_tA3929E98F6AC5A6E95EF799D2E3294F214358C0F * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
inline List_1_tA3929E98F6AC5A6E95EF799D2E3294F214358C0F * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline List_1_tA3929E98F6AC5A6E95EF799D2E3294F214358C0F ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, List_1_tA3929E98F6AC5A6E95EF799D2E3294F214358C0F * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
};
// System.Collections.Generic.List`1<UnityEngine.EventSystems.IEventSystemHandler>[]
struct List_1U5BU5D_t1D5013B39B52BAFB9A80B6AFFAC36A53315A390D : public RuntimeArray
{
public:
ALIGN_FIELD (8) List_1_t9F9214BCC9E2E91710F684F76185A72C087B90F5 * m_Items[1];
public:
inline List_1_t9F9214BCC9E2E91710F684F76185A72C087B90F5 * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline List_1_t9F9214BCC9E2E91710F684F76185A72C087B90F5 ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, List_1_t9F9214BCC9E2E91710F684F76185A72C087B90F5 * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
inline List_1_t9F9214BCC9E2E91710F684F76185A72C087B90F5 * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline List_1_t9F9214BCC9E2E91710F684F76185A72C087B90F5 ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, List_1_t9F9214BCC9E2E91710F684F76185A72C087B90F5 * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
};
// System.Collections.Generic.List`1<UnityEngine.UI.IMaterialModifier>[]
struct List_1U5BU5D_tA8175D394C0A016468764776C7E4CD741F1EFDF2 : public RuntimeArray
{
public:
ALIGN_FIELD (8) List_1_t9017E23C6E4C64A1E034C9FB3D321A1FBFEDA798 * m_Items[1];
public:
inline List_1_t9017E23C6E4C64A1E034C9FB3D321A1FBFEDA798 * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline List_1_t9017E23C6E4C64A1E034C9FB3D321A1FBFEDA798 ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, List_1_t9017E23C6E4C64A1E034C9FB3D321A1FBFEDA798 * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
inline List_1_t9017E23C6E4C64A1E034C9FB3D321A1FBFEDA798 * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline List_1_t9017E23C6E4C64A1E034C9FB3D321A1FBFEDA798 ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, List_1_t9017E23C6E4C64A1E034C9FB3D321A1FBFEDA798 * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
};
// System.Collections.Generic.List`1<Microsoft.MixedReality.Toolkit.IMixedRealityService>[]
struct List_1U5BU5D_t1B1FE87148AEADC3DF1FE33E0D18F5892FD6ABAC : public RuntimeArray
{
public:
ALIGN_FIELD (8) List_1_tEE673DC2821DB102F60CA7575C587CDA4EB57E40 * m_Items[1];
public:
inline List_1_tEE673DC2821DB102F60CA7575C587CDA4EB57E40 * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline List_1_tEE673DC2821DB102F60CA7575C587CDA4EB57E40 ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, List_1_tEE673DC2821DB102F60CA7575C587CDA4EB57E40 * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
inline List_1_tEE673DC2821DB102F60CA7575C587CDA4EB57E40 * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline List_1_tEE673DC2821DB102F60CA7575C587CDA4EB57E40 ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, List_1_tEE673DC2821DB102F60CA7575C587CDA4EB57E40 * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
};
// System.Collections.Generic.List`1<UnityEngine.InputSystem.InputAction>[]
struct List_1U5BU5D_tCB44329F43445C0C42267BE8C7724E7976D7217A : public RuntimeArray
{
public:
ALIGN_FIELD (8) List_1_t1A9DEE7C61AA50CC920704B4671771EDF3E8D417 * m_Items[1];
public:
inline List_1_t1A9DEE7C61AA50CC920704B4671771EDF3E8D417 * GetAt(il2cpp_array_size_t index) const
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items[index];
}
inline List_1_t1A9DEE7C61AA50CC920704B4671771EDF3E8D417 ** GetAddressAt(il2cpp_array_size_t index)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
return m_Items + index;
}
inline void SetAt(il2cpp_array_size_t index, List_1_t1A9DEE7C61AA50CC920704B4671771EDF3E8D417 * value)
{
IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length);
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
inline List_1_t1A9DEE7C61AA50CC920704B4671771EDF3E8D417 * GetAtUnchecked(il2cpp_array_size_t index) const
{
return m_Items[index];
}
inline List_1_t1A9DEE7C61AA50CC920704B4671771EDF3E8D417 ** GetAddressAtUnchecked(il2cpp_array_size_t index)
{
return m_Items + index;
}
inline void SetAtUnchecked(il2cpp_array_size_t index, List_1_t1A9DEE7C61AA50CC920704B4671771EDF3E8D417 * value)
{
m_Items[index] = value;
Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value);
}
};
il2cpp_hresult_t IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619_ComCallableWrapperProjectedMethod(RuntimeObject* __this, IIterator_1_tB1AB5AB497E87D6A397AA084D3D3D6B8D211022C** comReturnValue);
il2cpp_hresult_t IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8_ComCallableWrapperProjectedMethod(RuntimeObject* __this, IIterator_1_t6A46A7244E5AAD0AE4F2A07AF43DA5052D55F4A4** comReturnValue);
il2cpp_hresult_t IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB_ComCallableWrapperProjectedMethod(RuntimeObject* __this, IIterator_1_t76B4F2A2B99659B935148C20E12CDDF5018A3267** comReturnValue);
il2cpp_hresult_t IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7_ComCallableWrapperProjectedMethod(RuntimeObject* __this, IBindableIterator_tD7550F1144CFBE58090050457A2BE92B1CAEABBB** comReturnValue);
il2cpp_hresult_t IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___index0, Il2CppIInspectable** comReturnValue);
il2cpp_hresult_t IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t* comReturnValue);
il2cpp_hresult_t IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67_ComCallableWrapperProjectedMethod(RuntimeObject* __this, Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue);
il2cpp_hresult_t IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___startIndex0, uint32_t ___items1ArraySize, Il2CppIInspectable** ___items1, uint32_t* comReturnValue);
il2cpp_hresult_t IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___index0, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** comReturnValue);
il2cpp_hresult_t IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t* comReturnValue);
il2cpp_hresult_t IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17_ComCallableWrapperProjectedMethod(RuntimeObject* __this, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8* ___value0, uint32_t* ___index1, bool* comReturnValue);
il2cpp_hresult_t IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** ___items1, uint32_t* comReturnValue);
il2cpp_hresult_t IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___index0, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** comReturnValue);
il2cpp_hresult_t IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t* comReturnValue);
il2cpp_hresult_t IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428_ComCallableWrapperProjectedMethod(RuntimeObject* __this, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC* ___value0, uint32_t* ___index1, bool* comReturnValue);
il2cpp_hresult_t IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** ___items1, uint32_t* comReturnValue);
il2cpp_hresult_t IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___index0, Il2CppIInspectable** comReturnValue);
il2cpp_hresult_t IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t* comReturnValue);
il2cpp_hresult_t IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38_ComCallableWrapperProjectedMethod(RuntimeObject* __this, IBindableVectorView_tD80A01049DD2609FEA5FACD5E77BF95A875534FA** comReturnValue);
il2cpp_hresult_t IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4_ComCallableWrapperProjectedMethod(RuntimeObject* __this, Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue);
il2cpp_hresult_t IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___index0, Il2CppIInspectable* ___value1);
il2cpp_hresult_t IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___index0, Il2CppIInspectable* ___value1);
il2cpp_hresult_t IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___index0);
il2cpp_hresult_t IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F_ComCallableWrapperProjectedMethod(RuntimeObject* __this, Il2CppIInspectable* ___value0);
il2cpp_hresult_t IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3_ComCallableWrapperProjectedMethod(RuntimeObject* __this);
il2cpp_hresult_t IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF_ComCallableWrapperProjectedMethod(RuntimeObject* __this);
il2cpp_hresult_t IIterable_1_First_m1E9A9F6DA2EC9A3A751A6E85F67C9BB40798A879_ComCallableWrapperProjectedMethod(RuntimeObject* __this, IIterator_1_tD5C5DE60C4A835F60D32B19C44430B59B26BFA67** comReturnValue);
il2cpp_hresult_t IIterable_1_First_m9A24DB3CFEE6B2D8C04AD194AC25CEA2597B8D3F_ComCallableWrapperProjectedMethod(RuntimeObject* __this, IIterator_1_t6407EDB3A3187B31D54D9B4E941F88F529FCE4B3** comReturnValue);
il2cpp_hresult_t IVectorView_1_GetAt_m81C572FE9591C741899BB1DBFCBA0D16F83AFA2B_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___index0, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4** comReturnValue);
il2cpp_hresult_t IVectorView_1_get_Size_m17D793E25CDC73C302DC09F9F44E3E945DB6D51B_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t* comReturnValue);
il2cpp_hresult_t IVectorView_1_IndexOf_mDE5247D2CA481566F3163DD73813D5197E9A8C9F_ComCallableWrapperProjectedMethod(RuntimeObject* __this, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4* ___value0, uint32_t* ___index1, bool* comReturnValue);
il2cpp_hresult_t IVectorView_1_GetMany_m8C2CC34D9034DFED1C049E407D18F960E9D41D65_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___startIndex0, uint32_t ___items1ArraySize, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4** ___items1, uint32_t* comReturnValue);
il2cpp_hresult_t IVectorView_1_GetAt_mF5A66157C2B5F0912BF49D82A0244FCC98303D1B_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___index0, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A** comReturnValue);
il2cpp_hresult_t IVectorView_1_get_Size_m74F555A9FBE1BA1DED6ECFA905A173A710E07AFD_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t* comReturnValue);
il2cpp_hresult_t IVectorView_1_IndexOf_mBC65D06B1B6BC3BA18A9EAF3613256E61149328F_ComCallableWrapperProjectedMethod(RuntimeObject* __this, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A* ___value0, uint32_t* ___index1, bool* comReturnValue);
il2cpp_hresult_t IVectorView_1_GetMany_mF8999850078D6CC7D279F2FE5D6253B7DCDEB9E4_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___startIndex0, uint32_t ___items1ArraySize, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A** ___items1, uint32_t* comReturnValue);
il2cpp_hresult_t IIterable_1_First_m2B4221348B2704C13FAEA47E445A5266F50F0552_ComCallableWrapperProjectedMethod(RuntimeObject* __this, IIterator_1_tE49C1648FC94E093BCD82BA18359053328200C9F** comReturnValue);
il2cpp_hresult_t IIterable_1_First_m4F1ECE8DFCABEDF6BA2C0C3ABC35C492F13541E6_ComCallableWrapperProjectedMethod(RuntimeObject* __this, IIterator_1_tF6C570C031F6203C0401C0DC0B69FCE361F7062E** comReturnValue);
il2cpp_hresult_t IVectorView_1_GetAt_m042A63FF0475CFCEEC8E1915D0D64456FFEAE240_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___index0, IIterable_1_t5F4BD9477DDC56D9428ADFFD61354FCFE2E78588** comReturnValue);
il2cpp_hresult_t IVectorView_1_get_Size_mA6B624B6AE7095D63A0C4B0F9663C34A93AB87DC_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t* comReturnValue);
il2cpp_hresult_t IVectorView_1_IndexOf_mC1F322402A67373D7C1D2E5A2FBDED7E78DD3DB6_ComCallableWrapperProjectedMethod(RuntimeObject* __this, IIterable_1_t5F4BD9477DDC56D9428ADFFD61354FCFE2E78588* ___value0, uint32_t* ___index1, bool* comReturnValue);
il2cpp_hresult_t IVectorView_1_GetMany_m40DC9455B44C37B0027C9A3F39E5F497BEF595BE_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___startIndex0, uint32_t ___items1ArraySize, IIterable_1_t5F4BD9477DDC56D9428ADFFD61354FCFE2E78588** ___items1, uint32_t* comReturnValue);
il2cpp_hresult_t IVectorView_1_GetAt_m6DC538805182669267B260A6067279BA0DA3685D_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___index0, IVectorView_1_tF548FBFC73854E307F2AA2286569F664A1E4591E** comReturnValue);
il2cpp_hresult_t IVectorView_1_get_Size_mBDD582382C6631596C6F7BCF47D28F4191787323_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t* comReturnValue);
il2cpp_hresult_t IVectorView_1_IndexOf_m67D4C10DF3A1FBCDE003B7ADB152EB93ED9A66EC_ComCallableWrapperProjectedMethod(RuntimeObject* __this, IVectorView_1_tF548FBFC73854E307F2AA2286569F664A1E4591E* ___value0, uint32_t* ___index1, bool* comReturnValue);
il2cpp_hresult_t IVectorView_1_GetMany_m13D9EBB16BDF2F6D2EADC677094A1F48199B80B3_ComCallableWrapperProjectedMethod(RuntimeObject* __this, uint32_t ___startIndex0, uint32_t ___items1ArraySize, IVectorView_1_tF548FBFC73854E307F2AA2286569F664A1E4591E** ___items1, uint32_t* comReturnValue);
// COM Callable Wrapper for System.Collections.Generic.List`1<System.Collections.Generic.KeyValuePair`2<System.Int32,UnityEngine.Vector3>>[]
struct List_1U5BU5D_tD693C3BA5E6BD0BD191192640B458E26163A1CCB_ComCallableWrapper IL2CPP_FINAL : il2cpp::vm::CachedCCWBase<List_1U5BU5D_tD693C3BA5E6BD0BD191192640B458E26163A1CCB_ComCallableWrapper>, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4, IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824, IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A, IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A, IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC
{
inline List_1U5BU5D_tD693C3BA5E6BD0BD191192640B458E26163A1CCB_ComCallableWrapper(RuntimeObject* obj) : il2cpp::vm::CachedCCWBase<List_1U5BU5D_tD693C3BA5E6BD0BD191192640B458E26163A1CCB_ComCallableWrapper>(obj) {}
virtual il2cpp_hresult_t STDCALL QueryInterface(const Il2CppGuid& iid, void** object) IL2CPP_OVERRIDE
{
if (::memcmp(&iid, &Il2CppIUnknown::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIInspectable::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIAgileObject::IID, sizeof(Il2CppGuid)) == 0)
{
*object = GetIdentity();
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIManagedObjectHolder::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIManagedObjectHolder*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIMarshal::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIMarshal*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIWeakReferenceSource::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIWeakReferenceSource*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
*object = NULL;
return IL2CPP_E_NOINTERFACE;
}
virtual uint32_t STDCALL AddRef() IL2CPP_OVERRIDE
{
return AddRefImpl();
}
virtual uint32_t STDCALL Release() IL2CPP_OVERRIDE
{
return ReleaseImpl();
}
virtual il2cpp_hresult_t STDCALL GetIids(uint32_t* iidCount, Il2CppGuid** iids) IL2CPP_OVERRIDE
{
Il2CppGuid* interfaceIds = il2cpp_codegen_marshal_allocate_array<Il2CppGuid>(8);
interfaceIds[0] = IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID;
interfaceIds[1] = IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID;
interfaceIds[2] = IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID;
interfaceIds[3] = IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID;
interfaceIds[4] = IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID;
interfaceIds[5] = IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID;
interfaceIds[6] = IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID;
interfaceIds[7] = IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID;
*iidCount = 8;
*iids = interfaceIds;
return IL2CPP_S_OK;
}
virtual il2cpp_hresult_t STDCALL GetRuntimeClassName(Il2CppHString* className) IL2CPP_OVERRIDE
{
return GetRuntimeClassNameImpl(className);
}
virtual il2cpp_hresult_t STDCALL GetTrustLevel(int32_t* trustLevel) IL2CPP_OVERRIDE
{
return ComObjectBase::GetTrustLevel(trustLevel);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619(IIterator_1_tB1AB5AB497E87D6A397AA084D3D3D6B8D211022C** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8(IIterator_1_t6A46A7244E5AAD0AE4F2A07AF43DA5052D55F4A4** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB(IIterator_1_t76B4F2A2B99659B935148C20E12CDDF5018A3267** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7(IBindableIterator_tD7550F1144CFBE58090050457A2BE92B1CAEABBB** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1(uint32_t ___startIndex0, uint32_t ___items1ArraySize, Il2CppIInspectable** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E(uint32_t ___index0, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17(IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A(uint32_t ___index0, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428(IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38(IBindableVectorView_tD80A01049DD2609FEA5FACD5E77BF95A875534FA** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0(uint32_t ___index0) IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F(Il2CppIInspectable* ___value0) IL2CPP_OVERRIDE
{
return IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3() IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF() IL2CPP_OVERRIDE
{
return IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
};
IL2CPP_EXTERN_C Il2CppIUnknown* CreateComCallableWrapperFor_List_1U5BU5D_tD693C3BA5E6BD0BD191192640B458E26163A1CCB(RuntimeObject* obj)
{
void* memory = il2cpp::utils::Memory::Malloc(sizeof(List_1U5BU5D_tD693C3BA5E6BD0BD191192640B458E26163A1CCB_ComCallableWrapper));
if (memory == NULL)
{
il2cpp_codegen_raise_out_of_memory_exception();
}
return static_cast<Il2CppIManagedObjectHolder*>(new(memory) List_1U5BU5D_tD693C3BA5E6BD0BD191192640B458E26163A1CCB_ComCallableWrapper(obj));
}
// COM Callable Wrapper for System.Collections.Generic.List`1<System.ValueTuple`2<UnityEngine.ComputeBuffer,System.Int32>>[]
struct List_1U5BU5D_t7EA20830D5762C96622D4E91A3D2D76F49495A16_ComCallableWrapper IL2CPP_FINAL : il2cpp::vm::CachedCCWBase<List_1U5BU5D_t7EA20830D5762C96622D4E91A3D2D76F49495A16_ComCallableWrapper>, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4, IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824, IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A, IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A, IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC
{
inline List_1U5BU5D_t7EA20830D5762C96622D4E91A3D2D76F49495A16_ComCallableWrapper(RuntimeObject* obj) : il2cpp::vm::CachedCCWBase<List_1U5BU5D_t7EA20830D5762C96622D4E91A3D2D76F49495A16_ComCallableWrapper>(obj) {}
virtual il2cpp_hresult_t STDCALL QueryInterface(const Il2CppGuid& iid, void** object) IL2CPP_OVERRIDE
{
if (::memcmp(&iid, &Il2CppIUnknown::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIInspectable::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIAgileObject::IID, sizeof(Il2CppGuid)) == 0)
{
*object = GetIdentity();
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIManagedObjectHolder::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIManagedObjectHolder*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIMarshal::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIMarshal*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIWeakReferenceSource::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIWeakReferenceSource*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
*object = NULL;
return IL2CPP_E_NOINTERFACE;
}
virtual uint32_t STDCALL AddRef() IL2CPP_OVERRIDE
{
return AddRefImpl();
}
virtual uint32_t STDCALL Release() IL2CPP_OVERRIDE
{
return ReleaseImpl();
}
virtual il2cpp_hresult_t STDCALL GetIids(uint32_t* iidCount, Il2CppGuid** iids) IL2CPP_OVERRIDE
{
Il2CppGuid* interfaceIds = il2cpp_codegen_marshal_allocate_array<Il2CppGuid>(8);
interfaceIds[0] = IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID;
interfaceIds[1] = IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID;
interfaceIds[2] = IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID;
interfaceIds[3] = IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID;
interfaceIds[4] = IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID;
interfaceIds[5] = IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID;
interfaceIds[6] = IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID;
interfaceIds[7] = IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID;
*iidCount = 8;
*iids = interfaceIds;
return IL2CPP_S_OK;
}
virtual il2cpp_hresult_t STDCALL GetRuntimeClassName(Il2CppHString* className) IL2CPP_OVERRIDE
{
return GetRuntimeClassNameImpl(className);
}
virtual il2cpp_hresult_t STDCALL GetTrustLevel(int32_t* trustLevel) IL2CPP_OVERRIDE
{
return ComObjectBase::GetTrustLevel(trustLevel);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619(IIterator_1_tB1AB5AB497E87D6A397AA084D3D3D6B8D211022C** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8(IIterator_1_t6A46A7244E5AAD0AE4F2A07AF43DA5052D55F4A4** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB(IIterator_1_t76B4F2A2B99659B935148C20E12CDDF5018A3267** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7(IBindableIterator_tD7550F1144CFBE58090050457A2BE92B1CAEABBB** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1(uint32_t ___startIndex0, uint32_t ___items1ArraySize, Il2CppIInspectable** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E(uint32_t ___index0, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17(IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A(uint32_t ___index0, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428(IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38(IBindableVectorView_tD80A01049DD2609FEA5FACD5E77BF95A875534FA** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0(uint32_t ___index0) IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F(Il2CppIInspectable* ___value0) IL2CPP_OVERRIDE
{
return IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3() IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF() IL2CPP_OVERRIDE
{
return IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
};
IL2CPP_EXTERN_C Il2CppIUnknown* CreateComCallableWrapperFor_List_1U5BU5D_t7EA20830D5762C96622D4E91A3D2D76F49495A16(RuntimeObject* obj)
{
void* memory = il2cpp::utils::Memory::Malloc(sizeof(List_1U5BU5D_t7EA20830D5762C96622D4E91A3D2D76F49495A16_ComCallableWrapper));
if (memory == NULL)
{
il2cpp_codegen_raise_out_of_memory_exception();
}
return static_cast<Il2CppIManagedObjectHolder*>(new(memory) List_1U5BU5D_t7EA20830D5762C96622D4E91A3D2D76F49495A16_ComCallableWrapper(obj));
}
// COM Callable Wrapper for System.Collections.Generic.List`1<System.ValueTuple`2<UnityEngine.Rendering.RTHandle,System.Int32>>[]
struct List_1U5BU5D_tFD3DD6AF97973ECDFB0F8440AA208760D74E6F15_ComCallableWrapper IL2CPP_FINAL : il2cpp::vm::CachedCCWBase<List_1U5BU5D_tFD3DD6AF97973ECDFB0F8440AA208760D74E6F15_ComCallableWrapper>, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4, IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824, IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A, IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A, IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC
{
inline List_1U5BU5D_tFD3DD6AF97973ECDFB0F8440AA208760D74E6F15_ComCallableWrapper(RuntimeObject* obj) : il2cpp::vm::CachedCCWBase<List_1U5BU5D_tFD3DD6AF97973ECDFB0F8440AA208760D74E6F15_ComCallableWrapper>(obj) {}
virtual il2cpp_hresult_t STDCALL QueryInterface(const Il2CppGuid& iid, void** object) IL2CPP_OVERRIDE
{
if (::memcmp(&iid, &Il2CppIUnknown::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIInspectable::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIAgileObject::IID, sizeof(Il2CppGuid)) == 0)
{
*object = GetIdentity();
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIManagedObjectHolder::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIManagedObjectHolder*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIMarshal::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIMarshal*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIWeakReferenceSource::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIWeakReferenceSource*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
*object = NULL;
return IL2CPP_E_NOINTERFACE;
}
virtual uint32_t STDCALL AddRef() IL2CPP_OVERRIDE
{
return AddRefImpl();
}
virtual uint32_t STDCALL Release() IL2CPP_OVERRIDE
{
return ReleaseImpl();
}
virtual il2cpp_hresult_t STDCALL GetIids(uint32_t* iidCount, Il2CppGuid** iids) IL2CPP_OVERRIDE
{
Il2CppGuid* interfaceIds = il2cpp_codegen_marshal_allocate_array<Il2CppGuid>(8);
interfaceIds[0] = IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID;
interfaceIds[1] = IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID;
interfaceIds[2] = IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID;
interfaceIds[3] = IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID;
interfaceIds[4] = IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID;
interfaceIds[5] = IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID;
interfaceIds[6] = IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID;
interfaceIds[7] = IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID;
*iidCount = 8;
*iids = interfaceIds;
return IL2CPP_S_OK;
}
virtual il2cpp_hresult_t STDCALL GetRuntimeClassName(Il2CppHString* className) IL2CPP_OVERRIDE
{
return GetRuntimeClassNameImpl(className);
}
virtual il2cpp_hresult_t STDCALL GetTrustLevel(int32_t* trustLevel) IL2CPP_OVERRIDE
{
return ComObjectBase::GetTrustLevel(trustLevel);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619(IIterator_1_tB1AB5AB497E87D6A397AA084D3D3D6B8D211022C** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8(IIterator_1_t6A46A7244E5AAD0AE4F2A07AF43DA5052D55F4A4** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB(IIterator_1_t76B4F2A2B99659B935148C20E12CDDF5018A3267** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7(IBindableIterator_tD7550F1144CFBE58090050457A2BE92B1CAEABBB** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1(uint32_t ___startIndex0, uint32_t ___items1ArraySize, Il2CppIInspectable** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E(uint32_t ___index0, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17(IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A(uint32_t ___index0, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428(IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38(IBindableVectorView_tD80A01049DD2609FEA5FACD5E77BF95A875534FA** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0(uint32_t ___index0) IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F(Il2CppIInspectable* ___value0) IL2CPP_OVERRIDE
{
return IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3() IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF() IL2CPP_OVERRIDE
{
return IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
};
IL2CPP_EXTERN_C Il2CppIUnknown* CreateComCallableWrapperFor_List_1U5BU5D_tFD3DD6AF97973ECDFB0F8440AA208760D74E6F15(RuntimeObject* obj)
{
void* memory = il2cpp::utils::Memory::Malloc(sizeof(List_1U5BU5D_tFD3DD6AF97973ECDFB0F8440AA208760D74E6F15_ComCallableWrapper));
if (memory == NULL)
{
il2cpp_codegen_raise_out_of_memory_exception();
}
return static_cast<Il2CppIManagedObjectHolder*>(new(memory) List_1U5BU5D_tFD3DD6AF97973ECDFB0F8440AA208760D74E6F15_ComCallableWrapper(obj));
}
// COM Callable Wrapper for System.Collections.Generic.List`1<UnityEngine.Canvas>[]
struct List_1U5BU5D_tFB6A48309329109EF33E9FE7DC7C2FAC014BD1E1_ComCallableWrapper IL2CPP_FINAL : il2cpp::vm::CachedCCWBase<List_1U5BU5D_tFB6A48309329109EF33E9FE7DC7C2FAC014BD1E1_ComCallableWrapper>, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4, IIterable_1_tB7611E3565ADF2561FF7521E03A1E3B93F7BD113, IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824, IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD, IIterable_1_t1FE40219CF2EA9D14D69F038AAD3EC908A8FE771, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A, IVectorView_1_tDF19789741DDFC543BE092FE627C4F581626F001, IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A, IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2, IVectorView_1_t1FD2829C9595C49EB255C35468812A3793A7AE52, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC
{
inline List_1U5BU5D_tFB6A48309329109EF33E9FE7DC7C2FAC014BD1E1_ComCallableWrapper(RuntimeObject* obj) : il2cpp::vm::CachedCCWBase<List_1U5BU5D_tFB6A48309329109EF33E9FE7DC7C2FAC014BD1E1_ComCallableWrapper>(obj) {}
virtual il2cpp_hresult_t STDCALL QueryInterface(const Il2CppGuid& iid, void** object) IL2CPP_OVERRIDE
{
if (::memcmp(&iid, &Il2CppIUnknown::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIInspectable::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIAgileObject::IID, sizeof(Il2CppGuid)) == 0)
{
*object = GetIdentity();
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIManagedObjectHolder::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIManagedObjectHolder*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_tB7611E3565ADF2561FF7521E03A1E3B93F7BD113::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_tB7611E3565ADF2561FF7521E03A1E3B93F7BD113*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t1FE40219CF2EA9D14D69F038AAD3EC908A8FE771::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t1FE40219CF2EA9D14D69F038AAD3EC908A8FE771*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_tDF19789741DDFC543BE092FE627C4F581626F001::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_tDF19789741DDFC543BE092FE627C4F581626F001*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t1FD2829C9595C49EB255C35468812A3793A7AE52::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t1FD2829C9595C49EB255C35468812A3793A7AE52*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIMarshal::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIMarshal*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIWeakReferenceSource::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIWeakReferenceSource*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
*object = NULL;
return IL2CPP_E_NOINTERFACE;
}
virtual uint32_t STDCALL AddRef() IL2CPP_OVERRIDE
{
return AddRefImpl();
}
virtual uint32_t STDCALL Release() IL2CPP_OVERRIDE
{
return ReleaseImpl();
}
virtual il2cpp_hresult_t STDCALL GetIids(uint32_t* iidCount, Il2CppGuid** iids) IL2CPP_OVERRIDE
{
Il2CppGuid* interfaceIds = il2cpp_codegen_marshal_allocate_array<Il2CppGuid>(12);
interfaceIds[0] = IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID;
interfaceIds[1] = IIterable_1_tB7611E3565ADF2561FF7521E03A1E3B93F7BD113::IID;
interfaceIds[2] = IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID;
interfaceIds[3] = IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID;
interfaceIds[4] = IIterable_1_t1FE40219CF2EA9D14D69F038AAD3EC908A8FE771::IID;
interfaceIds[5] = IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID;
interfaceIds[6] = IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID;
interfaceIds[7] = IVectorView_1_tDF19789741DDFC543BE092FE627C4F581626F001::IID;
interfaceIds[8] = IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID;
interfaceIds[9] = IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID;
interfaceIds[10] = IVectorView_1_t1FD2829C9595C49EB255C35468812A3793A7AE52::IID;
interfaceIds[11] = IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID;
*iidCount = 12;
*iids = interfaceIds;
return IL2CPP_S_OK;
}
virtual il2cpp_hresult_t STDCALL GetRuntimeClassName(Il2CppHString* className) IL2CPP_OVERRIDE
{
return GetRuntimeClassNameImpl(className);
}
virtual il2cpp_hresult_t STDCALL GetTrustLevel(int32_t* trustLevel) IL2CPP_OVERRIDE
{
return ComObjectBase::GetTrustLevel(trustLevel);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619(IIterator_1_tB1AB5AB497E87D6A397AA084D3D3D6B8D211022C** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m1E9A9F6DA2EC9A3A751A6E85F67C9BB40798A879(IIterator_1_tD5C5DE60C4A835F60D32B19C44430B59B26BFA67** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m1E9A9F6DA2EC9A3A751A6E85F67C9BB40798A879_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8(IIterator_1_t6A46A7244E5AAD0AE4F2A07AF43DA5052D55F4A4** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB(IIterator_1_t76B4F2A2B99659B935148C20E12CDDF5018A3267** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m9A24DB3CFEE6B2D8C04AD194AC25CEA2597B8D3F(IIterator_1_t6407EDB3A3187B31D54D9B4E941F88F529FCE4B3** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m9A24DB3CFEE6B2D8C04AD194AC25CEA2597B8D3F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7(IBindableIterator_tD7550F1144CFBE58090050457A2BE92B1CAEABBB** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1(uint32_t ___startIndex0, uint32_t ___items1ArraySize, Il2CppIInspectable** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m81C572FE9591C741899BB1DBFCBA0D16F83AFA2B(uint32_t ___index0, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m81C572FE9591C741899BB1DBFCBA0D16F83AFA2B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m17D793E25CDC73C302DC09F9F44E3E945DB6D51B(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m17D793E25CDC73C302DC09F9F44E3E945DB6D51B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mDE5247D2CA481566F3163DD73813D5197E9A8C9F(IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mDE5247D2CA481566F3163DD73813D5197E9A8C9F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m8C2CC34D9034DFED1C049E407D18F960E9D41D65(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m8C2CC34D9034DFED1C049E407D18F960E9D41D65_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E(uint32_t ___index0, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17(IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A(uint32_t ___index0, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428(IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_mF5A66157C2B5F0912BF49D82A0244FCC98303D1B(uint32_t ___index0, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_mF5A66157C2B5F0912BF49D82A0244FCC98303D1B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m74F555A9FBE1BA1DED6ECFA905A173A710E07AFD(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m74F555A9FBE1BA1DED6ECFA905A173A710E07AFD_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mBC65D06B1B6BC3BA18A9EAF3613256E61149328F(IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mBC65D06B1B6BC3BA18A9EAF3613256E61149328F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_mF8999850078D6CC7D279F2FE5D6253B7DCDEB9E4(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_mF8999850078D6CC7D279F2FE5D6253B7DCDEB9E4_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38(IBindableVectorView_tD80A01049DD2609FEA5FACD5E77BF95A875534FA** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0(uint32_t ___index0) IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F(Il2CppIInspectable* ___value0) IL2CPP_OVERRIDE
{
return IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3() IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF() IL2CPP_OVERRIDE
{
return IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
};
IL2CPP_EXTERN_C Il2CppIUnknown* CreateComCallableWrapperFor_List_1U5BU5D_tFB6A48309329109EF33E9FE7DC7C2FAC014BD1E1(RuntimeObject* obj)
{
void* memory = il2cpp::utils::Memory::Malloc(sizeof(List_1U5BU5D_tFB6A48309329109EF33E9FE7DC7C2FAC014BD1E1_ComCallableWrapper));
if (memory == NULL)
{
il2cpp_codegen_raise_out_of_memory_exception();
}
return static_cast<Il2CppIManagedObjectHolder*>(new(memory) List_1U5BU5D_tFB6A48309329109EF33E9FE7DC7C2FAC014BD1E1_ComCallableWrapper(obj));
}
// COM Callable Wrapper for System.Collections.Generic.List`1<UnityEngine.Color32>[]
struct List_1U5BU5D_t2A8F7DFB66A1A6708AB8AD18D644BB17810AD953_ComCallableWrapper IL2CPP_FINAL : il2cpp::vm::CachedCCWBase<List_1U5BU5D_t2A8F7DFB66A1A6708AB8AD18D644BB17810AD953_ComCallableWrapper>, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4, IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824, IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A, IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A, IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC
{
inline List_1U5BU5D_t2A8F7DFB66A1A6708AB8AD18D644BB17810AD953_ComCallableWrapper(RuntimeObject* obj) : il2cpp::vm::CachedCCWBase<List_1U5BU5D_t2A8F7DFB66A1A6708AB8AD18D644BB17810AD953_ComCallableWrapper>(obj) {}
virtual il2cpp_hresult_t STDCALL QueryInterface(const Il2CppGuid& iid, void** object) IL2CPP_OVERRIDE
{
if (::memcmp(&iid, &Il2CppIUnknown::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIInspectable::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIAgileObject::IID, sizeof(Il2CppGuid)) == 0)
{
*object = GetIdentity();
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIManagedObjectHolder::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIManagedObjectHolder*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIMarshal::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIMarshal*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIWeakReferenceSource::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIWeakReferenceSource*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
*object = NULL;
return IL2CPP_E_NOINTERFACE;
}
virtual uint32_t STDCALL AddRef() IL2CPP_OVERRIDE
{
return AddRefImpl();
}
virtual uint32_t STDCALL Release() IL2CPP_OVERRIDE
{
return ReleaseImpl();
}
virtual il2cpp_hresult_t STDCALL GetIids(uint32_t* iidCount, Il2CppGuid** iids) IL2CPP_OVERRIDE
{
Il2CppGuid* interfaceIds = il2cpp_codegen_marshal_allocate_array<Il2CppGuid>(8);
interfaceIds[0] = IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID;
interfaceIds[1] = IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID;
interfaceIds[2] = IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID;
interfaceIds[3] = IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID;
interfaceIds[4] = IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID;
interfaceIds[5] = IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID;
interfaceIds[6] = IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID;
interfaceIds[7] = IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID;
*iidCount = 8;
*iids = interfaceIds;
return IL2CPP_S_OK;
}
virtual il2cpp_hresult_t STDCALL GetRuntimeClassName(Il2CppHString* className) IL2CPP_OVERRIDE
{
return GetRuntimeClassNameImpl(className);
}
virtual il2cpp_hresult_t STDCALL GetTrustLevel(int32_t* trustLevel) IL2CPP_OVERRIDE
{
return ComObjectBase::GetTrustLevel(trustLevel);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619(IIterator_1_tB1AB5AB497E87D6A397AA084D3D3D6B8D211022C** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8(IIterator_1_t6A46A7244E5AAD0AE4F2A07AF43DA5052D55F4A4** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB(IIterator_1_t76B4F2A2B99659B935148C20E12CDDF5018A3267** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7(IBindableIterator_tD7550F1144CFBE58090050457A2BE92B1CAEABBB** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1(uint32_t ___startIndex0, uint32_t ___items1ArraySize, Il2CppIInspectable** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E(uint32_t ___index0, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17(IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A(uint32_t ___index0, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428(IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38(IBindableVectorView_tD80A01049DD2609FEA5FACD5E77BF95A875534FA** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0(uint32_t ___index0) IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F(Il2CppIInspectable* ___value0) IL2CPP_OVERRIDE
{
return IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3() IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF() IL2CPP_OVERRIDE
{
return IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
};
IL2CPP_EXTERN_C Il2CppIUnknown* CreateComCallableWrapperFor_List_1U5BU5D_t2A8F7DFB66A1A6708AB8AD18D644BB17810AD953(RuntimeObject* obj)
{
void* memory = il2cpp::utils::Memory::Malloc(sizeof(List_1U5BU5D_t2A8F7DFB66A1A6708AB8AD18D644BB17810AD953_ComCallableWrapper));
if (memory == NULL)
{
il2cpp_codegen_raise_out_of_memory_exception();
}
return static_cast<Il2CppIManagedObjectHolder*>(new(memory) List_1U5BU5D_t2A8F7DFB66A1A6708AB8AD18D644BB17810AD953_ComCallableWrapper(obj));
}
// COM Callable Wrapper for System.Collections.Generic.List`1<UnityEngine.Component>[]
struct List_1U5BU5D_t6AB092E941E652B32E00716408ADBD8A73F4A443_ComCallableWrapper IL2CPP_FINAL : il2cpp::vm::CachedCCWBase<List_1U5BU5D_t6AB092E941E652B32E00716408ADBD8A73F4A443_ComCallableWrapper>, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4, IIterable_1_tB7611E3565ADF2561FF7521E03A1E3B93F7BD113, IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824, IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD, IIterable_1_t1FE40219CF2EA9D14D69F038AAD3EC908A8FE771, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A, IVectorView_1_tDF19789741DDFC543BE092FE627C4F581626F001, IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A, IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2, IVectorView_1_t1FD2829C9595C49EB255C35468812A3793A7AE52, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC
{
inline List_1U5BU5D_t6AB092E941E652B32E00716408ADBD8A73F4A443_ComCallableWrapper(RuntimeObject* obj) : il2cpp::vm::CachedCCWBase<List_1U5BU5D_t6AB092E941E652B32E00716408ADBD8A73F4A443_ComCallableWrapper>(obj) {}
virtual il2cpp_hresult_t STDCALL QueryInterface(const Il2CppGuid& iid, void** object) IL2CPP_OVERRIDE
{
if (::memcmp(&iid, &Il2CppIUnknown::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIInspectable::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIAgileObject::IID, sizeof(Il2CppGuid)) == 0)
{
*object = GetIdentity();
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIManagedObjectHolder::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIManagedObjectHolder*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_tB7611E3565ADF2561FF7521E03A1E3B93F7BD113::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_tB7611E3565ADF2561FF7521E03A1E3B93F7BD113*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t1FE40219CF2EA9D14D69F038AAD3EC908A8FE771::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t1FE40219CF2EA9D14D69F038AAD3EC908A8FE771*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_tDF19789741DDFC543BE092FE627C4F581626F001::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_tDF19789741DDFC543BE092FE627C4F581626F001*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t1FD2829C9595C49EB255C35468812A3793A7AE52::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t1FD2829C9595C49EB255C35468812A3793A7AE52*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIMarshal::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIMarshal*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIWeakReferenceSource::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIWeakReferenceSource*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
*object = NULL;
return IL2CPP_E_NOINTERFACE;
}
virtual uint32_t STDCALL AddRef() IL2CPP_OVERRIDE
{
return AddRefImpl();
}
virtual uint32_t STDCALL Release() IL2CPP_OVERRIDE
{
return ReleaseImpl();
}
virtual il2cpp_hresult_t STDCALL GetIids(uint32_t* iidCount, Il2CppGuid** iids) IL2CPP_OVERRIDE
{
Il2CppGuid* interfaceIds = il2cpp_codegen_marshal_allocate_array<Il2CppGuid>(12);
interfaceIds[0] = IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID;
interfaceIds[1] = IIterable_1_tB7611E3565ADF2561FF7521E03A1E3B93F7BD113::IID;
interfaceIds[2] = IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID;
interfaceIds[3] = IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID;
interfaceIds[4] = IIterable_1_t1FE40219CF2EA9D14D69F038AAD3EC908A8FE771::IID;
interfaceIds[5] = IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID;
interfaceIds[6] = IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID;
interfaceIds[7] = IVectorView_1_tDF19789741DDFC543BE092FE627C4F581626F001::IID;
interfaceIds[8] = IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID;
interfaceIds[9] = IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID;
interfaceIds[10] = IVectorView_1_t1FD2829C9595C49EB255C35468812A3793A7AE52::IID;
interfaceIds[11] = IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID;
*iidCount = 12;
*iids = interfaceIds;
return IL2CPP_S_OK;
}
virtual il2cpp_hresult_t STDCALL GetRuntimeClassName(Il2CppHString* className) IL2CPP_OVERRIDE
{
return GetRuntimeClassNameImpl(className);
}
virtual il2cpp_hresult_t STDCALL GetTrustLevel(int32_t* trustLevel) IL2CPP_OVERRIDE
{
return ComObjectBase::GetTrustLevel(trustLevel);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619(IIterator_1_tB1AB5AB497E87D6A397AA084D3D3D6B8D211022C** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m1E9A9F6DA2EC9A3A751A6E85F67C9BB40798A879(IIterator_1_tD5C5DE60C4A835F60D32B19C44430B59B26BFA67** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m1E9A9F6DA2EC9A3A751A6E85F67C9BB40798A879_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8(IIterator_1_t6A46A7244E5AAD0AE4F2A07AF43DA5052D55F4A4** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB(IIterator_1_t76B4F2A2B99659B935148C20E12CDDF5018A3267** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m9A24DB3CFEE6B2D8C04AD194AC25CEA2597B8D3F(IIterator_1_t6407EDB3A3187B31D54D9B4E941F88F529FCE4B3** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m9A24DB3CFEE6B2D8C04AD194AC25CEA2597B8D3F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7(IBindableIterator_tD7550F1144CFBE58090050457A2BE92B1CAEABBB** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1(uint32_t ___startIndex0, uint32_t ___items1ArraySize, Il2CppIInspectable** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m81C572FE9591C741899BB1DBFCBA0D16F83AFA2B(uint32_t ___index0, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m81C572FE9591C741899BB1DBFCBA0D16F83AFA2B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m17D793E25CDC73C302DC09F9F44E3E945DB6D51B(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m17D793E25CDC73C302DC09F9F44E3E945DB6D51B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mDE5247D2CA481566F3163DD73813D5197E9A8C9F(IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mDE5247D2CA481566F3163DD73813D5197E9A8C9F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m8C2CC34D9034DFED1C049E407D18F960E9D41D65(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m8C2CC34D9034DFED1C049E407D18F960E9D41D65_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E(uint32_t ___index0, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17(IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A(uint32_t ___index0, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428(IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_mF5A66157C2B5F0912BF49D82A0244FCC98303D1B(uint32_t ___index0, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_mF5A66157C2B5F0912BF49D82A0244FCC98303D1B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m74F555A9FBE1BA1DED6ECFA905A173A710E07AFD(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m74F555A9FBE1BA1DED6ECFA905A173A710E07AFD_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mBC65D06B1B6BC3BA18A9EAF3613256E61149328F(IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mBC65D06B1B6BC3BA18A9EAF3613256E61149328F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_mF8999850078D6CC7D279F2FE5D6253B7DCDEB9E4(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_mF8999850078D6CC7D279F2FE5D6253B7DCDEB9E4_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38(IBindableVectorView_tD80A01049DD2609FEA5FACD5E77BF95A875534FA** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0(uint32_t ___index0) IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F(Il2CppIInspectable* ___value0) IL2CPP_OVERRIDE
{
return IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3() IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF() IL2CPP_OVERRIDE
{
return IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
};
IL2CPP_EXTERN_C Il2CppIUnknown* CreateComCallableWrapperFor_List_1U5BU5D_t6AB092E941E652B32E00716408ADBD8A73F4A443(RuntimeObject* obj)
{
void* memory = il2cpp::utils::Memory::Malloc(sizeof(List_1U5BU5D_t6AB092E941E652B32E00716408ADBD8A73F4A443_ComCallableWrapper));
if (memory == NULL)
{
il2cpp_codegen_raise_out_of_memory_exception();
}
return static_cast<Il2CppIManagedObjectHolder*>(new(memory) List_1U5BU5D_t6AB092E941E652B32E00716408ADBD8A73F4A443_ComCallableWrapper(obj));
}
// COM Callable Wrapper for System.Collections.Generic.List`1<UnityEngine.EventSystems.IEventSystemHandler>[]
struct List_1U5BU5D_t1D5013B39B52BAFB9A80B6AFFAC36A53315A390D_ComCallableWrapper IL2CPP_FINAL : il2cpp::vm::CachedCCWBase<List_1U5BU5D_t1D5013B39B52BAFB9A80B6AFFAC36A53315A390D_ComCallableWrapper>, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4, IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824, IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A, IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A, IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC
{
inline List_1U5BU5D_t1D5013B39B52BAFB9A80B6AFFAC36A53315A390D_ComCallableWrapper(RuntimeObject* obj) : il2cpp::vm::CachedCCWBase<List_1U5BU5D_t1D5013B39B52BAFB9A80B6AFFAC36A53315A390D_ComCallableWrapper>(obj) {}
virtual il2cpp_hresult_t STDCALL QueryInterface(const Il2CppGuid& iid, void** object) IL2CPP_OVERRIDE
{
if (::memcmp(&iid, &Il2CppIUnknown::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIInspectable::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIAgileObject::IID, sizeof(Il2CppGuid)) == 0)
{
*object = GetIdentity();
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIManagedObjectHolder::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIManagedObjectHolder*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIMarshal::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIMarshal*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIWeakReferenceSource::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIWeakReferenceSource*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
*object = NULL;
return IL2CPP_E_NOINTERFACE;
}
virtual uint32_t STDCALL AddRef() IL2CPP_OVERRIDE
{
return AddRefImpl();
}
virtual uint32_t STDCALL Release() IL2CPP_OVERRIDE
{
return ReleaseImpl();
}
virtual il2cpp_hresult_t STDCALL GetIids(uint32_t* iidCount, Il2CppGuid** iids) IL2CPP_OVERRIDE
{
Il2CppGuid* interfaceIds = il2cpp_codegen_marshal_allocate_array<Il2CppGuid>(8);
interfaceIds[0] = IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID;
interfaceIds[1] = IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID;
interfaceIds[2] = IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID;
interfaceIds[3] = IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID;
interfaceIds[4] = IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID;
interfaceIds[5] = IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID;
interfaceIds[6] = IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID;
interfaceIds[7] = IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID;
*iidCount = 8;
*iids = interfaceIds;
return IL2CPP_S_OK;
}
virtual il2cpp_hresult_t STDCALL GetRuntimeClassName(Il2CppHString* className) IL2CPP_OVERRIDE
{
return GetRuntimeClassNameImpl(className);
}
virtual il2cpp_hresult_t STDCALL GetTrustLevel(int32_t* trustLevel) IL2CPP_OVERRIDE
{
return ComObjectBase::GetTrustLevel(trustLevel);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619(IIterator_1_tB1AB5AB497E87D6A397AA084D3D3D6B8D211022C** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8(IIterator_1_t6A46A7244E5AAD0AE4F2A07AF43DA5052D55F4A4** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB(IIterator_1_t76B4F2A2B99659B935148C20E12CDDF5018A3267** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7(IBindableIterator_tD7550F1144CFBE58090050457A2BE92B1CAEABBB** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1(uint32_t ___startIndex0, uint32_t ___items1ArraySize, Il2CppIInspectable** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E(uint32_t ___index0, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17(IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A(uint32_t ___index0, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428(IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38(IBindableVectorView_tD80A01049DD2609FEA5FACD5E77BF95A875534FA** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0(uint32_t ___index0) IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F(Il2CppIInspectable* ___value0) IL2CPP_OVERRIDE
{
return IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3() IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF() IL2CPP_OVERRIDE
{
return IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
};
IL2CPP_EXTERN_C Il2CppIUnknown* CreateComCallableWrapperFor_List_1U5BU5D_t1D5013B39B52BAFB9A80B6AFFAC36A53315A390D(RuntimeObject* obj)
{
void* memory = il2cpp::utils::Memory::Malloc(sizeof(List_1U5BU5D_t1D5013B39B52BAFB9A80B6AFFAC36A53315A390D_ComCallableWrapper));
if (memory == NULL)
{
il2cpp_codegen_raise_out_of_memory_exception();
}
return static_cast<Il2CppIManagedObjectHolder*>(new(memory) List_1U5BU5D_t1D5013B39B52BAFB9A80B6AFFAC36A53315A390D_ComCallableWrapper(obj));
}
// COM Callable Wrapper for System.Collections.Generic.List`1<UnityEngine.UI.IMaterialModifier>[]
struct List_1U5BU5D_tA8175D394C0A016468764776C7E4CD741F1EFDF2_ComCallableWrapper IL2CPP_FINAL : il2cpp::vm::CachedCCWBase<List_1U5BU5D_tA8175D394C0A016468764776C7E4CD741F1EFDF2_ComCallableWrapper>, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4, IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824, IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A, IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A, IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC
{
inline List_1U5BU5D_tA8175D394C0A016468764776C7E4CD741F1EFDF2_ComCallableWrapper(RuntimeObject* obj) : il2cpp::vm::CachedCCWBase<List_1U5BU5D_tA8175D394C0A016468764776C7E4CD741F1EFDF2_ComCallableWrapper>(obj) {}
virtual il2cpp_hresult_t STDCALL QueryInterface(const Il2CppGuid& iid, void** object) IL2CPP_OVERRIDE
{
if (::memcmp(&iid, &Il2CppIUnknown::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIInspectable::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIAgileObject::IID, sizeof(Il2CppGuid)) == 0)
{
*object = GetIdentity();
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIManagedObjectHolder::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIManagedObjectHolder*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIMarshal::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIMarshal*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIWeakReferenceSource::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIWeakReferenceSource*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
*object = NULL;
return IL2CPP_E_NOINTERFACE;
}
virtual uint32_t STDCALL AddRef() IL2CPP_OVERRIDE
{
return AddRefImpl();
}
virtual uint32_t STDCALL Release() IL2CPP_OVERRIDE
{
return ReleaseImpl();
}
virtual il2cpp_hresult_t STDCALL GetIids(uint32_t* iidCount, Il2CppGuid** iids) IL2CPP_OVERRIDE
{
Il2CppGuid* interfaceIds = il2cpp_codegen_marshal_allocate_array<Il2CppGuid>(8);
interfaceIds[0] = IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID;
interfaceIds[1] = IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID;
interfaceIds[2] = IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID;
interfaceIds[3] = IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID;
interfaceIds[4] = IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID;
interfaceIds[5] = IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID;
interfaceIds[6] = IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID;
interfaceIds[7] = IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID;
*iidCount = 8;
*iids = interfaceIds;
return IL2CPP_S_OK;
}
virtual il2cpp_hresult_t STDCALL GetRuntimeClassName(Il2CppHString* className) IL2CPP_OVERRIDE
{
return GetRuntimeClassNameImpl(className);
}
virtual il2cpp_hresult_t STDCALL GetTrustLevel(int32_t* trustLevel) IL2CPP_OVERRIDE
{
return ComObjectBase::GetTrustLevel(trustLevel);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619(IIterator_1_tB1AB5AB497E87D6A397AA084D3D3D6B8D211022C** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8(IIterator_1_t6A46A7244E5AAD0AE4F2A07AF43DA5052D55F4A4** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB(IIterator_1_t76B4F2A2B99659B935148C20E12CDDF5018A3267** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7(IBindableIterator_tD7550F1144CFBE58090050457A2BE92B1CAEABBB** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1(uint32_t ___startIndex0, uint32_t ___items1ArraySize, Il2CppIInspectable** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E(uint32_t ___index0, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17(IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A(uint32_t ___index0, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428(IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38(IBindableVectorView_tD80A01049DD2609FEA5FACD5E77BF95A875534FA** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0(uint32_t ___index0) IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F(Il2CppIInspectable* ___value0) IL2CPP_OVERRIDE
{
return IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3() IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF() IL2CPP_OVERRIDE
{
return IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
};
IL2CPP_EXTERN_C Il2CppIUnknown* CreateComCallableWrapperFor_List_1U5BU5D_tA8175D394C0A016468764776C7E4CD741F1EFDF2(RuntimeObject* obj)
{
void* memory = il2cpp::utils::Memory::Malloc(sizeof(List_1U5BU5D_tA8175D394C0A016468764776C7E4CD741F1EFDF2_ComCallableWrapper));
if (memory == NULL)
{
il2cpp_codegen_raise_out_of_memory_exception();
}
return static_cast<Il2CppIManagedObjectHolder*>(new(memory) List_1U5BU5D_tA8175D394C0A016468764776C7E4CD741F1EFDF2_ComCallableWrapper(obj));
}
// COM Callable Wrapper for System.Collections.Generic.List`1<Microsoft.MixedReality.Toolkit.IMixedRealityService>[]
struct List_1U5BU5D_t1B1FE87148AEADC3DF1FE33E0D18F5892FD6ABAC_ComCallableWrapper IL2CPP_FINAL : il2cpp::vm::CachedCCWBase<List_1U5BU5D_t1B1FE87148AEADC3DF1FE33E0D18F5892FD6ABAC_ComCallableWrapper>, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4, IIterable_1_t65C1CF61727FBB13369E9B777E6EA4756FFD7E3D, IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824, IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD, IIterable_1_tDA7BDBC19E1812C5ACD6E546F60391ADC6E2CE58, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A, IVectorView_1_t03B981D4959A85B1286E3AF8D41F475472CBCF00, IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A, IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2, IVectorView_1_tB08ED3F588EC08EABF76F71E5B51C0BA8A8E866C, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC
{
inline List_1U5BU5D_t1B1FE87148AEADC3DF1FE33E0D18F5892FD6ABAC_ComCallableWrapper(RuntimeObject* obj) : il2cpp::vm::CachedCCWBase<List_1U5BU5D_t1B1FE87148AEADC3DF1FE33E0D18F5892FD6ABAC_ComCallableWrapper>(obj) {}
virtual il2cpp_hresult_t STDCALL QueryInterface(const Il2CppGuid& iid, void** object) IL2CPP_OVERRIDE
{
if (::memcmp(&iid, &Il2CppIUnknown::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIInspectable::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIAgileObject::IID, sizeof(Il2CppGuid)) == 0)
{
*object = GetIdentity();
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIManagedObjectHolder::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIManagedObjectHolder*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t65C1CF61727FBB13369E9B777E6EA4756FFD7E3D::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t65C1CF61727FBB13369E9B777E6EA4756FFD7E3D*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_tDA7BDBC19E1812C5ACD6E546F60391ADC6E2CE58::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_tDA7BDBC19E1812C5ACD6E546F60391ADC6E2CE58*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t03B981D4959A85B1286E3AF8D41F475472CBCF00::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t03B981D4959A85B1286E3AF8D41F475472CBCF00*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_tB08ED3F588EC08EABF76F71E5B51C0BA8A8E866C::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_tB08ED3F588EC08EABF76F71E5B51C0BA8A8E866C*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIMarshal::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIMarshal*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIWeakReferenceSource::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIWeakReferenceSource*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
*object = NULL;
return IL2CPP_E_NOINTERFACE;
}
virtual uint32_t STDCALL AddRef() IL2CPP_OVERRIDE
{
return AddRefImpl();
}
virtual uint32_t STDCALL Release() IL2CPP_OVERRIDE
{
return ReleaseImpl();
}
virtual il2cpp_hresult_t STDCALL GetIids(uint32_t* iidCount, Il2CppGuid** iids) IL2CPP_OVERRIDE
{
Il2CppGuid* interfaceIds = il2cpp_codegen_marshal_allocate_array<Il2CppGuid>(12);
interfaceIds[0] = IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID;
interfaceIds[1] = IIterable_1_t65C1CF61727FBB13369E9B777E6EA4756FFD7E3D::IID;
interfaceIds[2] = IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID;
interfaceIds[3] = IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID;
interfaceIds[4] = IIterable_1_tDA7BDBC19E1812C5ACD6E546F60391ADC6E2CE58::IID;
interfaceIds[5] = IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID;
interfaceIds[6] = IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID;
interfaceIds[7] = IVectorView_1_t03B981D4959A85B1286E3AF8D41F475472CBCF00::IID;
interfaceIds[8] = IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID;
interfaceIds[9] = IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID;
interfaceIds[10] = IVectorView_1_tB08ED3F588EC08EABF76F71E5B51C0BA8A8E866C::IID;
interfaceIds[11] = IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID;
*iidCount = 12;
*iids = interfaceIds;
return IL2CPP_S_OK;
}
virtual il2cpp_hresult_t STDCALL GetRuntimeClassName(Il2CppHString* className) IL2CPP_OVERRIDE
{
return GetRuntimeClassNameImpl(className);
}
virtual il2cpp_hresult_t STDCALL GetTrustLevel(int32_t* trustLevel) IL2CPP_OVERRIDE
{
return ComObjectBase::GetTrustLevel(trustLevel);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619(IIterator_1_tB1AB5AB497E87D6A397AA084D3D3D6B8D211022C** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m2B4221348B2704C13FAEA47E445A5266F50F0552(IIterator_1_tE49C1648FC94E093BCD82BA18359053328200C9F** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m2B4221348B2704C13FAEA47E445A5266F50F0552_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8(IIterator_1_t6A46A7244E5AAD0AE4F2A07AF43DA5052D55F4A4** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB(IIterator_1_t76B4F2A2B99659B935148C20E12CDDF5018A3267** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m4F1ECE8DFCABEDF6BA2C0C3ABC35C492F13541E6(IIterator_1_tF6C570C031F6203C0401C0DC0B69FCE361F7062E** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m4F1ECE8DFCABEDF6BA2C0C3ABC35C492F13541E6_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7(IBindableIterator_tD7550F1144CFBE58090050457A2BE92B1CAEABBB** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1(uint32_t ___startIndex0, uint32_t ___items1ArraySize, Il2CppIInspectable** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m042A63FF0475CFCEEC8E1915D0D64456FFEAE240(uint32_t ___index0, IIterable_1_t5F4BD9477DDC56D9428ADFFD61354FCFE2E78588** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m042A63FF0475CFCEEC8E1915D0D64456FFEAE240_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mA6B624B6AE7095D63A0C4B0F9663C34A93AB87DC(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_mA6B624B6AE7095D63A0C4B0F9663C34A93AB87DC_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mC1F322402A67373D7C1D2E5A2FBDED7E78DD3DB6(IIterable_1_t5F4BD9477DDC56D9428ADFFD61354FCFE2E78588* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mC1F322402A67373D7C1D2E5A2FBDED7E78DD3DB6_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m40DC9455B44C37B0027C9A3F39E5F497BEF595BE(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IIterable_1_t5F4BD9477DDC56D9428ADFFD61354FCFE2E78588** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m40DC9455B44C37B0027C9A3F39E5F497BEF595BE_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E(uint32_t ___index0, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17(IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A(uint32_t ___index0, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428(IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m6DC538805182669267B260A6067279BA0DA3685D(uint32_t ___index0, IVectorView_1_tF548FBFC73854E307F2AA2286569F664A1E4591E** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m6DC538805182669267B260A6067279BA0DA3685D_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mBDD582382C6631596C6F7BCF47D28F4191787323(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_mBDD582382C6631596C6F7BCF47D28F4191787323_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m67D4C10DF3A1FBCDE003B7ADB152EB93ED9A66EC(IVectorView_1_tF548FBFC73854E307F2AA2286569F664A1E4591E* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m67D4C10DF3A1FBCDE003B7ADB152EB93ED9A66EC_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m13D9EBB16BDF2F6D2EADC677094A1F48199B80B3(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IVectorView_1_tF548FBFC73854E307F2AA2286569F664A1E4591E** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m13D9EBB16BDF2F6D2EADC677094A1F48199B80B3_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38(IBindableVectorView_tD80A01049DD2609FEA5FACD5E77BF95A875534FA** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0(uint32_t ___index0) IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F(Il2CppIInspectable* ___value0) IL2CPP_OVERRIDE
{
return IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3() IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF() IL2CPP_OVERRIDE
{
return IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
};
IL2CPP_EXTERN_C Il2CppIUnknown* CreateComCallableWrapperFor_List_1U5BU5D_t1B1FE87148AEADC3DF1FE33E0D18F5892FD6ABAC(RuntimeObject* obj)
{
void* memory = il2cpp::utils::Memory::Malloc(sizeof(List_1U5BU5D_t1B1FE87148AEADC3DF1FE33E0D18F5892FD6ABAC_ComCallableWrapper));
if (memory == NULL)
{
il2cpp_codegen_raise_out_of_memory_exception();
}
return static_cast<Il2CppIManagedObjectHolder*>(new(memory) List_1U5BU5D_t1B1FE87148AEADC3DF1FE33E0D18F5892FD6ABAC_ComCallableWrapper(obj));
}
// COM Callable Wrapper for System.Collections.Generic.List`1<UnityEngine.InputSystem.InputAction>[]
struct List_1U5BU5D_tCB44329F43445C0C42267BE8C7724E7976D7217A_ComCallableWrapper IL2CPP_FINAL : il2cpp::vm::CachedCCWBase<List_1U5BU5D_tCB44329F43445C0C42267BE8C7724E7976D7217A_ComCallableWrapper>, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4, IIterable_1_tB7611E3565ADF2561FF7521E03A1E3B93F7BD113, IIterable_1_t65C1CF61727FBB13369E9B777E6EA4756FFD7E3D, IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824, IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD, IIterable_1_t1FE40219CF2EA9D14D69F038AAD3EC908A8FE771, IIterable_1_tDA7BDBC19E1812C5ACD6E546F60391ADC6E2CE58, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A, IVectorView_1_tDF19789741DDFC543BE092FE627C4F581626F001, IVectorView_1_t03B981D4959A85B1286E3AF8D41F475472CBCF00, IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A, IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2, IVectorView_1_t1FD2829C9595C49EB255C35468812A3793A7AE52, IVectorView_1_tB08ED3F588EC08EABF76F71E5B51C0BA8A8E866C, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC
{
inline List_1U5BU5D_tCB44329F43445C0C42267BE8C7724E7976D7217A_ComCallableWrapper(RuntimeObject* obj) : il2cpp::vm::CachedCCWBase<List_1U5BU5D_tCB44329F43445C0C42267BE8C7724E7976D7217A_ComCallableWrapper>(obj) {}
virtual il2cpp_hresult_t STDCALL QueryInterface(const Il2CppGuid& iid, void** object) IL2CPP_OVERRIDE
{
if (::memcmp(&iid, &Il2CppIUnknown::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIInspectable::IID, sizeof(Il2CppGuid)) == 0
|| ::memcmp(&iid, &Il2CppIAgileObject::IID, sizeof(Il2CppGuid)) == 0)
{
*object = GetIdentity();
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIManagedObjectHolder::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIManagedObjectHolder*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_tB7611E3565ADF2561FF7521E03A1E3B93F7BD113::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_tB7611E3565ADF2561FF7521E03A1E3B93F7BD113*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t65C1CF61727FBB13369E9B777E6EA4756FFD7E3D::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t65C1CF61727FBB13369E9B777E6EA4756FFD7E3D*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_t1FE40219CF2EA9D14D69F038AAD3EC908A8FE771::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_t1FE40219CF2EA9D14D69F038AAD3EC908A8FE771*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IIterable_1_tDA7BDBC19E1812C5ACD6E546F60391ADC6E2CE58::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IIterable_1_tDA7BDBC19E1812C5ACD6E546F60391ADC6E2CE58*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_tDF19789741DDFC543BE092FE627C4F581626F001::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_tDF19789741DDFC543BE092FE627C4F581626F001*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t03B981D4959A85B1286E3AF8D41F475472CBCF00::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t03B981D4959A85B1286E3AF8D41F475472CBCF00*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_t1FD2829C9595C49EB255C35468812A3793A7AE52::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_t1FD2829C9595C49EB255C35468812A3793A7AE52*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IVectorView_1_tB08ED3F588EC08EABF76F71E5B51C0BA8A8E866C::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IVectorView_1_tB08ED3F588EC08EABF76F71E5B51C0BA8A8E866C*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIMarshal::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIMarshal*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
if (::memcmp(&iid, &Il2CppIWeakReferenceSource::IID, sizeof(Il2CppGuid)) == 0)
{
*object = static_cast<Il2CppIWeakReferenceSource*>(this);
AddRefImpl();
return IL2CPP_S_OK;
}
*object = NULL;
return IL2CPP_E_NOINTERFACE;
}
virtual uint32_t STDCALL AddRef() IL2CPP_OVERRIDE
{
return AddRefImpl();
}
virtual uint32_t STDCALL Release() IL2CPP_OVERRIDE
{
return ReleaseImpl();
}
virtual il2cpp_hresult_t STDCALL GetIids(uint32_t* iidCount, Il2CppGuid** iids) IL2CPP_OVERRIDE
{
Il2CppGuid* interfaceIds = il2cpp_codegen_marshal_allocate_array<Il2CppGuid>(16);
interfaceIds[0] = IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4::IID;
interfaceIds[1] = IIterable_1_tB7611E3565ADF2561FF7521E03A1E3B93F7BD113::IID;
interfaceIds[2] = IIterable_1_t65C1CF61727FBB13369E9B777E6EA4756FFD7E3D::IID;
interfaceIds[3] = IIterable_1_t6359E278A71A51A15FA83695BA7C54F9B3E04824::IID;
interfaceIds[4] = IIterable_1_tDA0D1077EFCD7389A5AD5BF4D598F22A450175CD::IID;
interfaceIds[5] = IIterable_1_t1FE40219CF2EA9D14D69F038AAD3EC908A8FE771::IID;
interfaceIds[6] = IIterable_1_tDA7BDBC19E1812C5ACD6E546F60391ADC6E2CE58::IID;
interfaceIds[7] = IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8::IID;
interfaceIds[8] = IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A::IID;
interfaceIds[9] = IVectorView_1_tDF19789741DDFC543BE092FE627C4F581626F001::IID;
interfaceIds[10] = IVectorView_1_t03B981D4959A85B1286E3AF8D41F475472CBCF00::IID;
interfaceIds[11] = IVectorView_1_t7215C7C44306F73B6AC4A835AEABA3B0222EA80A::IID;
interfaceIds[12] = IVectorView_1_tA88887470E0CCCD43F8D64B6B683CE91E6820CC2::IID;
interfaceIds[13] = IVectorView_1_t1FD2829C9595C49EB255C35468812A3793A7AE52::IID;
interfaceIds[14] = IVectorView_1_tB08ED3F588EC08EABF76F71E5B51C0BA8A8E866C::IID;
interfaceIds[15] = IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC::IID;
*iidCount = 16;
*iids = interfaceIds;
return IL2CPP_S_OK;
}
virtual il2cpp_hresult_t STDCALL GetRuntimeClassName(Il2CppHString* className) IL2CPP_OVERRIDE
{
return GetRuntimeClassNameImpl(className);
}
virtual il2cpp_hresult_t STDCALL GetTrustLevel(int32_t* trustLevel) IL2CPP_OVERRIDE
{
return ComObjectBase::GetTrustLevel(trustLevel);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619(IIterator_1_tB1AB5AB497E87D6A397AA084D3D3D6B8D211022C** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m54AC7E778E98ED35C6B7AD98C35C325B8A3DF619_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m1E9A9F6DA2EC9A3A751A6E85F67C9BB40798A879(IIterator_1_tD5C5DE60C4A835F60D32B19C44430B59B26BFA67** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m1E9A9F6DA2EC9A3A751A6E85F67C9BB40798A879_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m2B4221348B2704C13FAEA47E445A5266F50F0552(IIterator_1_tE49C1648FC94E093BCD82BA18359053328200C9F** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m2B4221348B2704C13FAEA47E445A5266F50F0552_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8(IIterator_1_t6A46A7244E5AAD0AE4F2A07AF43DA5052D55F4A4** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m512126C71D7E9D1C31B56F64455F33E9FEEC89F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB(IIterator_1_t76B4F2A2B99659B935148C20E12CDDF5018A3267** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m5AA74545514CBE1B8F27A3AD8AB35879FA66F2BB_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m9A24DB3CFEE6B2D8C04AD194AC25CEA2597B8D3F(IIterator_1_t6407EDB3A3187B31D54D9B4E941F88F529FCE4B3** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m9A24DB3CFEE6B2D8C04AD194AC25CEA2597B8D3F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IIterable_1_First_m4F1ECE8DFCABEDF6BA2C0C3ABC35C492F13541E6(IIterator_1_tF6C570C031F6203C0401C0DC0B69FCE361F7062E** comReturnValue) IL2CPP_OVERRIDE
{
return IIterable_1_First_m4F1ECE8DFCABEDF6BA2C0C3ABC35C492F13541E6_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7(IBindableIterator_tD7550F1144CFBE58090050457A2BE92B1CAEABBB** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableIterable_First_m91EC6ED0173145266318FDB7F9074798CD766BD7_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m38CCDDE1E25317AEF5170D9818FC01816AF34260_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m33BC340C458F20A80A8B07FF4764CEF1F5513F8B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mFAE432DA0C1902EEF54AB68CFFD3E2182C443F67_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1(uint32_t ___startIndex0, uint32_t ___items1ArraySize, Il2CppIInspectable** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m6AA46969FB50015EB7107EBCC29E48B7AD4BB6B1_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m81C572FE9591C741899BB1DBFCBA0D16F83AFA2B(uint32_t ___index0, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m81C572FE9591C741899BB1DBFCBA0D16F83AFA2B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m17D793E25CDC73C302DC09F9F44E3E945DB6D51B(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m17D793E25CDC73C302DC09F9F44E3E945DB6D51B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mDE5247D2CA481566F3163DD73813D5197E9A8C9F(IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mDE5247D2CA481566F3163DD73813D5197E9A8C9F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m8C2CC34D9034DFED1C049E407D18F960E9D41D65(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IIterable_1_t64693143CE4E5082C6101BC54B0427C21F3C01C4** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m8C2CC34D9034DFED1C049E407D18F960E9D41D65_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m042A63FF0475CFCEEC8E1915D0D64456FFEAE240(uint32_t ___index0, IIterable_1_t5F4BD9477DDC56D9428ADFFD61354FCFE2E78588** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m042A63FF0475CFCEEC8E1915D0D64456FFEAE240_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mA6B624B6AE7095D63A0C4B0F9663C34A93AB87DC(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_mA6B624B6AE7095D63A0C4B0F9663C34A93AB87DC_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mC1F322402A67373D7C1D2E5A2FBDED7E78DD3DB6(IIterable_1_t5F4BD9477DDC56D9428ADFFD61354FCFE2E78588* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mC1F322402A67373D7C1D2E5A2FBDED7E78DD3DB6_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m40DC9455B44C37B0027C9A3F39E5F497BEF595BE(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IIterable_1_t5F4BD9477DDC56D9428ADFFD61354FCFE2E78588** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m40DC9455B44C37B0027C9A3F39E5F497BEF595BE_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E(uint32_t ___index0, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m72849F526862E096635BA971A074D9B06ABFEE1E_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_mB93C08E36F2225BE1862007FAF30C9F2DEE8DAD9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17(IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m3D87181F28EC65303ECB5017476C3B38D0944E17_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableIterable_tF6BD0C070562CD9C91E3C1B1A5F4667E9C3C74A8** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_mE432D0460C5D84FEC9104DF80F5809975EAE32F8_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A(uint32_t ___index0, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m8A2D66D6F27B61C8F26650687B9FF74EC981AB8A_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m2715B11E6635CADBED696FD1960C1E53C863A658_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428(IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m5D5E2AEF6315D36B6A00635C6F1A0D3845FF5428_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IBindableVector_tC070A96258CD93818901E9B7808E1A8EFB64B7EC** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m47281D0A40AED89E6205D41741B118BC31D5C7FD_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_mF5A66157C2B5F0912BF49D82A0244FCC98303D1B(uint32_t ___index0, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_mF5A66157C2B5F0912BF49D82A0244FCC98303D1B_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_m74F555A9FBE1BA1DED6ECFA905A173A710E07AFD(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_m74F555A9FBE1BA1DED6ECFA905A173A710E07AFD_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_mBC65D06B1B6BC3BA18A9EAF3613256E61149328F(IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_mBC65D06B1B6BC3BA18A9EAF3613256E61149328F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_mF8999850078D6CC7D279F2FE5D6253B7DCDEB9E4(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IVectorView_1_t9D427951F2D09C2E6F846759B5273E993F185D4A** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_mF8999850078D6CC7D279F2FE5D6253B7DCDEB9E4_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetAt_m6DC538805182669267B260A6067279BA0DA3685D(uint32_t ___index0, IVectorView_1_tF548FBFC73854E307F2AA2286569F664A1E4591E** comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetAt_m6DC538805182669267B260A6067279BA0DA3685D_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_get_Size_mBDD582382C6631596C6F7BCF47D28F4191787323(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_get_Size_mBDD582382C6631596C6F7BCF47D28F4191787323_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_IndexOf_m67D4C10DF3A1FBCDE003B7ADB152EB93ED9A66EC(IVectorView_1_tF548FBFC73854E307F2AA2286569F664A1E4591E* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_IndexOf_m67D4C10DF3A1FBCDE003B7ADB152EB93ED9A66EC_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IVectorView_1_GetMany_m13D9EBB16BDF2F6D2EADC677094A1F48199B80B3(uint32_t ___startIndex0, uint32_t ___items1ArraySize, IVectorView_1_tF548FBFC73854E307F2AA2286569F664A1E4591E** ___items1, uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IVectorView_1_GetMany_m13D9EBB16BDF2F6D2EADC677094A1F48199B80B3_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___startIndex0, ___items1ArraySize, ___items1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED(uint32_t ___index0, Il2CppIInspectable** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetAt_m33D2170810828C01473D9BDC22745A0354FA4FED_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9(uint32_t* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_get_Size_m45347BCD42A1FE180ED2B377BB9C88C7B50CD7D9_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38(IBindableVectorView_tD80A01049DD2609FEA5FACD5E77BF95A875534FA** comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_GetView_m9736FE93BC8979E0CBF8ED26090D1FE54C2E1A38_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4(Il2CppIInspectable* ___value0, uint32_t* ___index1, bool* comReturnValue) IL2CPP_OVERRIDE
{
return IBindableVector_IndexOf_m2F1A64750D19C5A03E9B65880F4A04275E6AABF4_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0, ___index1, comReturnValue);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_SetAt_mD4C84EC02EAD7F636873B77E6D48E7132055A213_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5(uint32_t ___index0, Il2CppIInspectable* ___value1) IL2CPP_OVERRIDE
{
return IBindableVector_InsertAt_m19A0C885F7C7A7FFA257A46218D7232317E022B5_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0, ___value1);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0(uint32_t ___index0) IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAt_m1AC6E54165809374E91F456B9922A9B24F8652B0_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___index0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F(Il2CppIInspectable* ___value0) IL2CPP_OVERRIDE
{
return IBindableVector_Append_mCA138F8E4026725AC867B607FA63709B6752BB7F_ComCallableWrapperProjectedMethod(GetManagedObjectInline(), ___value0);
}
virtual il2cpp_hresult_t STDCALL IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3() IL2CPP_OVERRIDE
{
return IBindableVector_RemoveAtEnd_mB3178911995D4CC7BAC0EA43720C1280267E54E3_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
virtual il2cpp_hresult_t STDCALL IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF() IL2CPP_OVERRIDE
{
return IBindableVector_Clear_mEF05B40EFF6D42CBB5A5E336B0946FECE7A4A6EF_ComCallableWrapperProjectedMethod(GetManagedObjectInline());
}
};
IL2CPP_EXTERN_C Il2CppIUnknown* CreateComCallableWrapperFor_List_1U5BU5D_tCB44329F43445C0C42267BE8C7724E7976D7217A(RuntimeObject* obj)
{
void* memory = il2cpp::utils::Memory::Malloc(sizeof(List_1U5BU5D_tCB44329F43445C0C42267BE8C7724E7976D7217A_ComCallableWrapper));
if (memory == NULL)
{
il2cpp_codegen_raise_out_of_memory_exception();
}
return static_cast<Il2CppIManagedObjectHolder*>(new(memory) List_1U5BU5D_tCB44329F43445C0C42267BE8C7724E7976D7217A_ComCallableWrapper(obj));
}
| 55.224353 | 1,100 | 0.861158 | [
"object"
] |
85e7ab57c6d0cb38962cdeffbd0b127f557977ca | 2,133 | cpp | C++ | examples/cppx/Interface.cpp | OfekShilon/compiler-explorer | 7ee2ab17f29470575443bd67e5685ac54ce76158 | [
"BSD-2-Clause"
] | 4,668 | 2017-01-02T19:35:10.000Z | 2020-05-16T03:18:45.000Z | examples/cppx/Interface.cpp | OfekShilon/compiler-explorer | 7ee2ab17f29470575443bd67e5685ac54ce76158 | [
"BSD-2-Clause"
] | 1,750 | 2017-01-02T19:37:06.000Z | 2020-05-16T14:54:29.000Z | examples/cppx/Interface.cpp | OfekShilon/compiler-explorer | 7ee2ab17f29470575443bd67e5685ac54ce76158 | [
"BSD-2-Clause"
] | 620 | 2017-01-03T00:29:17.000Z | 2020-05-14T09:27:47.000Z | #include <experimental/meta>
#include <experimental/compiler>
using namespace std::experimental;
//====================================================================
// Library code: implementing the metaclass (once)
consteval void interface(meta::info source) {
for (meta::info mem : meta::member_range(source)) {
meta::compiler.require(!meta::is_data_member(mem), "interfaces may not contain data");
meta::compiler.require(!meta::is_copy(mem) && !meta::is_move(mem),
"interfaces may not copy or move; consider"
" a virtual clone() instead");
if (meta::has_default_access(mem))
meta::make_public(mem);
meta::compiler.require(meta::is_public(mem), "interface functions must be public");
meta::make_pure_virtual(mem);
-> mem;
}
-> fragment struct X { virtual ~X() noexcept {} };
};
//====================================================================
// User code: using the metaclass to write a type (many times)
class(interface) Shape {
int area() const;
void scale_by(double factor);
};
// try putting any of these lines into Shape to see "interface" rules
// enforced => using the metaclass name to declare intent makes
// this code more robust to such changes under maintenance
//
// int i; // error: interfaces may not contain data
// private: void g(); // error: interface functions must be public
// Shape(const Shape&); // error: interfaces may not copy or move;
// // consider a virtual clone() instead
consteval {
meta::compiler.print(reflexpr(Shape));
}
//====================================================================
// And then continue to use it as "just a class" as always... this is
// normal code just as if we'd written Shape not using a metaclass
class Circle : public Shape {
public:
int area() const override { return 1; }
void scale_by(double factor) override { }
};
consteval {
meta::compiler.print(reflexpr(Circle));
}
#include <memory>
int main() {
std::unique_ptr<Shape> shape = std::make_unique<Circle>();
shape->area();
}
| 30.042254 | 90 | 0.595406 | [
"shape"
] |
85eb7918ea4241ca2c094fe25253265edfb267a8 | 344 | cpp | C++ | 27. LeetCode Problems/duplicateZeroes.cpp | Ujjawalgupta42/Hacktoberfest2021-DSA | eccd9352055085973e3d6a1feb10dd193905584b | [
"MIT"
] | 225 | 2021-10-01T03:09:01.000Z | 2022-03-11T11:32:49.000Z | 27. LeetCode Problems/duplicateZeroes.cpp | Ujjawalgupta42/Hacktoberfest2021-DSA | eccd9352055085973e3d6a1feb10dd193905584b | [
"MIT"
] | 252 | 2021-10-01T03:45:20.000Z | 2021-12-07T18:32:46.000Z | 27. LeetCode Problems/duplicateZeroes.cpp | Ujjawalgupta42/Hacktoberfest2021-DSA | eccd9352055085973e3d6a1feb10dd193905584b | [
"MIT"
] | 911 | 2021-10-01T02:55:19.000Z | 2022-02-06T09:08:37.000Z | Problem Link : https://leetcode.com/problems/duplicate-zeros/
class Solution {
public:
void duplicateZeros(vector<int>& arr) {
for(int i=0; i<arr.size(); i++){
if (arr[i] == 0){
arr.insert(arr.begin()+i, 0);
arr.pop_back();
i++;
}
}
}
};
| 20.235294 | 61 | 0.444767 | [
"vector"
] |
85edf5e70585ff6c9cdd0edcede03eb0a0eb0444 | 11,735 | cpp | C++ | C++/hangman/CharList.cpp | stablestud/trainee | 6123095c3855c127dbc98857ca05aacaa12c2200 | [
"MIT"
] | null | null | null | C++/hangman/CharList.cpp | stablestud/trainee | 6123095c3855c127dbc98857ca05aacaa12c2200 | [
"MIT"
] | null | null | null | C++/hangman/CharList.cpp | stablestud/trainee | 6123095c3855c127dbc98857ca05aacaa12c2200 | [
"MIT"
] | null | null | null | #include <exception>
#include <stdexcept>
#include <iostream>
#include "CharList.h"
/*
* @author stablestud
* @date 13-06-2018
*/
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* N O D E -- F U N C T I O N D E F I N I T I O N S *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Constructor: Node - default constructor
* - - - - - - - - - - - - - - - - - - - - -
* Initializes the object with the supplied value
*/
Node::Node ( const int v ) : value ( v ),
next ( nullptr ),
prev ( nullptr ) {}
/*
* Constructor: Node - copy constructor
* - - - - - - - - - - - - - - - - - - - -
* Initilizes the object value copied from another object
*/
Node::Node ( Node& node ) : Node ( node.getValue() ) {}
/*
* Constructor: Node - parameter pointer constructor
* - - - - - - - - - - - - - - - - - - - - - - - - - -
* Initializes the object with a value read from object pointer
*/
Node::Node (Node* node ) : Node ( node->getValue() ) {}
/*
* Function: getValue
* - - - - - - - - - - -
* Read-only Interface to get the value of the Node
*
* returns: value of the element (Node)
*/
const char Node::getValue ( void )
{
return this -> value;
}
/*
* Function: getNext
* - - - - - - - - - -
* Read-only Interface to get the address of the next Node
*
* returns: address of the next Node
*/
const Node* const Node::getNext ( void )
{
return this -> next;
}
/*
* Function: getPrev
* - - - - - - - - - -
* Read-only Interface to get the address of the previous Node
*
* returns: address of the previous Node
*/
const Node* const Node::getPrev ( void )
{
return this -> prev;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
* L I S T -- F U N C T I O N D E F I N I T I O N S *
* * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Function: List - default ctor
* - - - - - - - - - - - - - - - -
* Initialize a new empty object
*/
List::List ( void ) : head ( nullptr ),
tail ( nullptr ),
size ( 0U ) {}
/*
* Deconstructor: List - dtor
* - - - - - - - - - - - - - - -
* Deletes all dynamically created objects after end of this object
*/
List::~List ( void ) throw ( std::out_of_range )
{
while ( this -> getSize() )
this -> remove_at ( this -> getSize() - 1U );
}
/*
* Constructor: List - copy constructor
* - - - - - - - - - - - - - - - - - - - -
* Copies all values from the other List without copying the address,
* thus creating new objects which are being linked to each other.
*
* throws: if memory allocation fails
*/
List::List ( List& list ) throw ( std::bad_alloc ) : List()
{
if ( list.getSize() ) {
/* Go from Node to Node and create a copy, and bind them */
this -> head = new Node ( list.at ( 0 ) );
this -> size = 1U;
Node* current = this -> head;
for ( unsigned i = 1U; i < list.getSize(); i++ ) {
current -> next = new Node ( list.at ( i ) );
Node* prevptr = current;
current = current -> next;
current -> prev = prevptr;
this -> size++;
}
this -> tail = current;
}
}
/*
* Overloaded operator: []
* - - - - - - - - - - - - -
* Synonym for function at()
*
* pos: extract elements value from pos(ition)
*
* returns: elements value
*/
char List::operator[] ( unsigned pos ) throw ( std::out_of_range )
{
return this -> at ( pos ) -> getValue();
}
/*
* Function: push_front
* - - - - - - - - - - - -
* Add a value to the front (head) of the list
*
* value: value that should be added to the list
*
* throws: bad_alloc, if no memory can be allocated
*/
void List::push_front ( const char value ) throw ( std::bad_alloc )
{
Node* new_node;
/* Hope memory can fit a another element */
try {
new_node = new Node ( value );
} catch ( std::bad_alloc ) {
std::cerr << "push_front(): Couldn't allocate memory"
<< std::endl;
throw;
}
new_node -> next = this -> head;
this -> head = new_node;
if ( 0 == this -> getSize() )
this -> tail = new_node;
else
this -> head -> next -> prev = this -> head;
this -> size++;
}
/*
* Function: push_back
* - - - - - - - - - - -
* Add a value to the back (tail) of the list
*
* value: value that should be added to the list
*
* throws: bad_alloc, if no memory can allocated
*/
void List::push_back ( const char value ) throw ( std::bad_alloc )
{
Node* new_node;
/* Hope memory can fit a another element */
try {
new_node = new Node ( value );
} catch ( std::bad_alloc ) {
std::cerr << "push_back(): Couldn't allocate memory"
<< std::endl;
throw;
}
/* If no element before */
if ( 0 == this -> getSize() ) {
this -> head = this -> tail = new_node;
/* Else */
} else {
this -> tail -> next = new_node;
new_node -> prev = this -> tail;
this -> tail = new_node;
}
this -> size++;
}
/*
* Function: pop_front
* - - - - - - - - - - -
* Return a value from the front of the list (head)
*
* returns: value that is on top of the list (head)
* throws: out_of_range, if list is empty
*/
char List::pop_front ( void ) throw ( std::out_of_range )
{
/* List shouldn't be empty */
if ( 0 == this -> getSize() )
throw std::out_of_range ( "pop_front(): List is empty" );
char value = this -> head -> getValue();
/* If last element */
if ( this -> head == this -> tail ) {
delete this -> head;
this -> head = this -> tail = nullptr;
/* Else */
} else {
Node* old_head = this -> head;
this -> head = this -> head -> next;
this -> head -> prev = nullptr;
delete old_head;
}
this -> size--;
return value;
}
/*
* Function: pop_back
* - - - - - - - - - - -
* Return a value from the back of the list (tail)
*
* returns: value that lais on the bottom of the list (tail)
* throws: out_of_range, if list is empty
*/
char List::pop_back ( void ) throw ( std::out_of_range )
{
/* List shouldn't be empty */
if ( 0 == this -> getSize() )
throw std::out_of_range ( "pop_back(): List is empty" );
char value = this -> tail -> getValue();
/* If last element */
if ( this -> head == this -> tail ) {
delete this -> tail;
this -> tail = this -> head = nullptr;
/* Else */
} else {
Node* old_tail = this -> tail;
this -> tail = this -> tail -> prev;
this -> tail -> next = nullptr;
delete old_tail;
}
this -> size--;
return value;
}
/*
* Function: at
* - - - - - - - -
* Get the element of the list at position pos
*
* pos: position of the element that should be returned
*
* returns: pointer to pos element of type Node (Node*)
* throws: out_of_range, if pos was greater than the list length
*/
Node* List::at ( const unsigned pos ) throw ( std::out_of_range )
{
/* Shouldn't access non existing elements */
if ( this -> getSize() <= pos )
throw std::out_of_range ( "at(): Out of range" );
Node* value;
if ( this -> getSize() - 1U == pos ) {
value = this -> tail;
} else {
value = this -> head;
for ( unsigned i = 0U; i < pos; i++ )
value = value -> next;
}
return value;
}
/*
* Function: insert_at
* - - - - - - - - - - -
* Insert a value into the list
*
* pos: position of the list the value should be inserted
* value: value that should be inserted
*
* throws: bad_alloc, memory allocation of the new element has failed
* out_of_range, relaying exception from function at()
*/
void List::insert_at ( const unsigned pos, char value ) throw ( std::bad_alloc,
std::out_of_range )
{
/* Insert at position 0 */
if ( 0U == pos ) {
this -> push_front ( value );
/* Insert behind last element */
} else if ( this -> getSize() == pos ) {
this -> push_back ( value );
/* Somewhere inbetween */
} else {
Node* insert;
/* Hope memory can fit a another element */
try {
insert = new Node ( value );
} catch ( std::bad_alloc& ba ) {
std::cerr << "insert_at(): Couldn't allocate memory"
<< std::endl;
throw;
}
Node* previous = this -> at ( pos );
insert -> next = previous;
insert -> prev = previous -> prev;
previous -> prev -> next = insert;
previous -> prev = insert;
this -> size++;
}
}
/*
* Function: remove_at
* - - - - - - - - - - -
* Remove an element from the list
*
* pos: postion of element that should be deleted
*
* throws: out_of_range, relaying exception from function at()
*
*/
void List::remove_at ( const unsigned pos ) throw ( std::out_of_range )
{
/* If first element */
if ( 0U == pos ) {
this -> pop_front();
/* If last element */
} else if ( this -> getSize() - 1 == pos ) {
this -> pop_back();
/* If inbetween */
} else {
Node* bye = this -> at ( pos );
bye -> prev -> next = bye -> next;
bye -> next -> prev = bye -> prev;
delete bye;
this -> size--;
}
}
/*
* Function: getSize
* - - - - - - - - - -
* Return the amount of stored elements in the list
*/
const unsigned List::getSize ( void )
{
return this -> size;
}
/*
* Function: find
* - - - - - - - - -
* Find a value in the list
*
* search: value to search for
* pos: reference that returns the position of the element
* which holds the searched value
*
* returns: whether the value was found (true) or not (false)
* throws: out_of_range, if list is empty, relaying from function at()
*/
const bool List::find ( const char search, unsigned& pos ) throw ( std::out_of_range )
{
if ( 0 == this -> size )
return false;
for ( unsigned i = 0; i < this -> size; i++ ) {
if ( this -> at ( i ) -> getValue() == search ) {
pos = i;
return true;
}
}
return false;
}
/*
* Function: find
* - - - - - - - - -
* Overloaded find function, does not require a reference parameter
*
* search: value to search for
*
* returns: whether the value was found (true) or not (false)
* throws: out_of_range, relaying from overloaded function find(char, unsigned&)
*/
const bool List::find ( const char search ) throw ( std::out_of_range )
{
unsigned temp;
return find ( search, temp );
}
| 23.47 | 86 | 0.475075 | [
"object"
] |
c803d76a9cd829201b9893f5e2d79cc08cef40fb | 9,115 | cpp | C++ | Kuplung/kuplung/rendering/methods/RenderingSimple.cpp | supudo/Kuplung | f0e11934fde0675fa531e6dc263bedcc20a5ea1a | [
"Unlicense"
] | 14 | 2017-02-17T17:12:40.000Z | 2021-12-22T01:55:06.000Z | Kuplung/kuplung/rendering/methods/RenderingSimple.cpp | supudo/Kuplung | f0e11934fde0675fa531e6dc263bedcc20a5ea1a | [
"Unlicense"
] | null | null | null | Kuplung/kuplung/rendering/methods/RenderingSimple.cpp | supudo/Kuplung | f0e11934fde0675fa531e6dc263bedcc20a5ea1a | [
"Unlicense"
] | 1 | 2019-10-15T08:10:10.000Z | 2019-10-15T08:10:10.000Z | //
// RenderingSimple.cpp
// Kuplung
//
// Created by Sergey Petrov on 12/2/15.
// Copyright © 2015 supudo.net. All rights reserved.
//
#include "RenderingSimple.hpp"
#include <glm/gtc/matrix_inverse.hpp>
#include <glm/gtc/type_ptr.hpp>
RenderingSimple::RenderingSimple(ObjectsManager& managerObjects) : managerObjects(managerObjects) {}
RenderingSimple::~RenderingSimple() {
glDeleteProgram(this->shaderProgram);
}
bool RenderingSimple::init() {
// vertex shader
std::string shaderPath = Settings::Instance()->appFolder() + "/shaders/rendering_simple.vert";
std::string shaderSourceVertex = Settings::Instance()->glUtils->readFile(shaderPath.c_str());
const char* shader_vertex = shaderSourceVertex.c_str();
// tessellation control shader
shaderPath = Settings::Instance()->appFolder() + "/shaders/rendering_simple.tcs";
std::string shaderSourceTCS = Settings::Instance()->glUtils->readFile(shaderPath.c_str());
const char* shader_tess_control = shaderSourceTCS.c_str();
// tessellation evaluation shader
shaderPath = Settings::Instance()->appFolder() + "/shaders/rendering_simple.tes";
std::string shaderSourceTES = Settings::Instance()->glUtils->readFile(shaderPath.c_str());
const char* shader_tess_eval = shaderSourceTES.c_str();
// geometry shader
shaderPath = Settings::Instance()->appFolder() + "/shaders/rendering_simple.geom";
std::string shaderSourceGeometry = Settings::Instance()->glUtils->readFile(shaderPath.c_str());
const char* shader_geometry = shaderSourceGeometry.c_str();
// fragment shader
shaderPath = Settings::Instance()->appFolder() + "/shaders/rendering_simple.frag";
std::string shaderSourceFragment = Settings::Instance()->glUtils->readFile(shaderPath.c_str());
const char* shader_fragment = shaderSourceFragment.c_str();
this->shaderProgram = glCreateProgram();
bool shaderCompilation = true;
shaderCompilation &= Settings::Instance()->glUtils->compileShader(this->shaderProgram, GL_VERTEX_SHADER, shader_vertex);
shaderCompilation &= Settings::Instance()->glUtils->compileShader(this->shaderProgram, GL_TESS_CONTROL_SHADER, shader_tess_control);
shaderCompilation &= Settings::Instance()->glUtils->compileShader(this->shaderProgram, GL_TESS_EVALUATION_SHADER, shader_tess_eval);
shaderCompilation &= Settings::Instance()->glUtils->compileShader(this->shaderProgram, GL_GEOMETRY_SHADER, shader_geometry);
shaderCompilation &= Settings::Instance()->glUtils->compileShader(this->shaderProgram, GL_FRAGMENT_SHADER, shader_fragment);
if (!shaderCompilation)
return false;
glLinkProgram(this->shaderProgram);
GLint programSuccess = GL_TRUE;
glGetProgramiv(this->shaderProgram, GL_LINK_STATUS, &programSuccess);
if (programSuccess != GL_TRUE) {
Settings::Instance()->funcDoLog("[RenderingSimple - initShaders] Error linking program " + std::to_string(this->shaderProgram) + "!");
Settings::Instance()->glUtils->printProgramLog(this->shaderProgram);
return false;
}
else {
#ifdef Def_Kuplung_OpenGL_4x
glPatchParameteri(GL_PATCH_VERTICES, 3);
#endif
this->glVS_MVPMatrix = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "vs_MVPMatrix");
this->glVS_WorldMatrix = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "vs_WorldMatrix");
this->glFS_HasSamplerTexture = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "has_texture");
this->glFS_SamplerTexture = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "sampler_texture");
this->glFS_CameraPosition = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_cameraPosition");
this->glFS_UIAmbient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "fs_UIAmbient");
this->solidLight = std::make_unique<ModelFace_LightSource_Directional>();
this->solidLight->gl_InUse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.inUse");
this->solidLight->gl_Direction = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.direction");
this->solidLight->gl_Ambient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.ambient");
this->solidLight->gl_Diffuse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.diffuse");
this->solidLight->gl_Specular = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.specular");
this->solidLight->gl_StrengthAmbient = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.strengthAmbient");
this->solidLight->gl_StrengthDiffuse = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.strengthDiffuse");
this->solidLight->gl_StrengthSpecular = Settings::Instance()->glUtils->glGetUniform(this->shaderProgram, "solidSkin_Light.strengthSpecular");
}
Settings::Instance()->glUtils->CheckForGLErrors(Settings::Instance()->string_format("%s - %s", __FILE__, __func__));
return true;
}
void RenderingSimple::render(const std::vector<ModelFaceData*>& meshModelFaces, const int& selectedModel) {
glViewport(0, 0, Settings::Instance()->SDL_DrawableSize_Width, Settings::Instance()->SDL_DrawableSize_Height);
this->matrixProjection = this->managerObjects.matrixProjection;
this->matrixCamera = this->managerObjects.camera->matrixCamera;
this->vecCameraPosition = this->managerObjects.camera->cameraPosition;
this->uiAmbientLight = this->managerObjects.Setting_UIAmbientLight;
glUseProgram(this->shaderProgram);
for (size_t i = 0; i < meshModelFaces.size(); i++) {
ModelFaceData* mfd = meshModelFaces[i];
glm::mat4 matrixModel = glm::mat4(1.0);
matrixModel *= this->managerObjects.grid->matrixModel;
// scale
matrixModel = glm::scale(matrixModel, glm::vec3(mfd->scaleX->point, mfd->scaleY->point, mfd->scaleZ->point));
// rotate
matrixModel = glm::translate(matrixModel, glm::vec3(0, 0, 0));
matrixModel = glm::rotate(matrixModel, glm::radians(mfd->rotateX->point), glm::vec3(1, 0, 0));
matrixModel = glm::rotate(matrixModel, glm::radians(mfd->rotateY->point), glm::vec3(0, 1, 0));
matrixModel = glm::rotate(matrixModel, glm::radians(mfd->rotateZ->point), glm::vec3(0, 0, 1));
matrixModel = glm::translate(matrixModel, glm::vec3(0, 0, 0));
// translate
matrixModel = glm::translate(matrixModel, glm::vec3(mfd->positionX->point, mfd->positionY->point, mfd->positionZ->point));
mfd->matrixProjection = this->matrixProjection;
mfd->matrixCamera = this->matrixCamera;
mfd->matrixModel = matrixModel;
mfd->Setting_ModelViewSkin = this->managerObjects.viewModelSkin;
mfd->lightSources = this->managerObjects.lightSources;
mfd->setOptionsFOV(this->managerObjects.Setting_FOV);
mfd->setOptionsOutlineColor(this->managerObjects.Setting_OutlineColor);
mfd->setOptionsOutlineThickness(this->managerObjects.Setting_OutlineThickness);
glm::mat4 mvpMatrix = this->matrixProjection * this->matrixCamera * matrixModel;
glUniformMatrix4fv(this->glVS_MVPMatrix, 1, GL_FALSE, glm::value_ptr(mvpMatrix));
glUniformMatrix4fv(this->glVS_WorldMatrix, 1, GL_FALSE, glm::value_ptr(matrixModel));
glUniform3f(this->glFS_CameraPosition, this->vecCameraPosition.x, this->vecCameraPosition.y, this->vecCameraPosition.z);
glUniform3f(this->glFS_UIAmbient, this->uiAmbientLight.r, this->uiAmbientLight.g, this->uiAmbientLight.b);
glUniform1i(this->solidLight->gl_InUse, 1);
glUniform3f(this->solidLight->gl_Direction, this->managerObjects.SolidLight_Direction.x, this->managerObjects.SolidLight_Direction.y, this->managerObjects.SolidLight_Direction.z);
glUniform3f(this->solidLight->gl_Ambient, this->managerObjects.SolidLight_Ambient.r, this->managerObjects.SolidLight_Ambient.g, this->managerObjects.SolidLight_Ambient.b);
glUniform3f(this->solidLight->gl_Diffuse, this->managerObjects.SolidLight_Diffuse.r, this->managerObjects.SolidLight_Diffuse.g, this->managerObjects.SolidLight_Diffuse.b);
glUniform3f(this->solidLight->gl_Specular, this->managerObjects.SolidLight_Specular.r, this->managerObjects.SolidLight_Specular.g, this->managerObjects.SolidLight_Specular.b);
glUniform1f(this->solidLight->gl_StrengthAmbient, this->managerObjects.SolidLight_Ambient_Strength);
glUniform1f(this->solidLight->gl_StrengthDiffuse, this->managerObjects.SolidLight_Diffuse_Strength);
glUniform1f(this->solidLight->gl_StrengthSpecular, this->managerObjects.SolidLight_Specular_Strength);
if (mfd->vboTextureDiffuse > 0 && mfd->meshModel.ModelMaterial.TextureDiffuse.UseTexture) {
glUniform1i(this->glFS_HasSamplerTexture, 1);
glUniform1i(this->glFS_SamplerTexture, 0);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, mfd->vboTextureDiffuse);
}
else
glUniform1i(this->glFS_HasSamplerTexture, 0);
mfd->renderModel(true);
}
glUseProgram(0);
Settings::Instance()->glUtils->CheckForGLErrors(Settings::Instance()->string_format("%s - %s", __FILE__, __func__));
}
| 55.920245 | 183 | 0.759298 | [
"geometry",
"render",
"vector"
] |
65a9bf9b6485c7c9bc26fade977035815893332f | 1,748 | cpp | C++ | graph/graph_scc_kosaraju.cpp | LuisMBaezCo/cpp-algorithm-snippets | 9736f97437cf52b3c8cdf6bfe00de919448d2e50 | [
"MIT"
] | 7 | 2020-12-11T00:24:42.000Z | 2022-03-14T05:59:35.000Z | graph/graph_scc_kosaraju.cpp | LuisMBaezCo/algorithms-template | 6290ee91eb2dd67e6e367887a815a7aac065fe3a | [
"MIT"
] | 15 | 2021-02-04T23:12:46.000Z | 2022-03-17T01:07:12.000Z | graph/graph_scc_kosaraju.cpp | LuisMBaezCo/cpp-algorithm-snippets | 9736f97437cf52b3c8cdf6bfe00de919448d2e50 | [
"MIT"
] | null | null | null | // graph_graph
// graph_digraph
template <typename T>
class SCC {
private:
digraph<T> g;
digraph<T> g_rev;
vector<bool> visited;
stack<int> toposort;
vector<vector<int>> components;
// Topological Sort
void toposort_dfs(int node) {
visited[node] = true;
for(link<T> neighbor: g.adj[node]) {
if(!visited[neighbor.to]) {
toposort_dfs(neighbor.to);
}
}
toposort.push(node);
}
// dfs Standard
void dfs(int node) {
visited[node] = true;
components.back().push_back(node);
for(link<T> neighbor: g_rev.adj[node]) {
if(!visited[neighbor.to]) {
dfs(neighbor.to);
}
}
}
public:
SCC(digraph<T> gr) : g(0), g_rev(0) {
g = gr;
g_rev = gr.reverse();
visited.resize(g.n, false);
}
// Build Algorithm
vector<vector<int>> find_scc() {
components.clear();
toposort = stack<int>();
for(int node = 0; node < g.n; ++node) {
if(!visited[node]) {
toposort_dfs(node);
}
}
fill(visited.begin(), visited.end(), false);
while(!toposort.empty()) {
int node = toposort.top();
toposort.pop();
if(!visited[node]) {
components.push_back(vector<int>{});
dfs(node);
}
}
return components;
}
};
// Time Complexity: O(|V| + |E|), Space Complexity: O(|V|)
// |V|: Number of vertices
// |E|: Number of edges
// int n = 8;
// digraph<int> g(n);
// g.add(..., ...);
// SCC<int> scc(g);
// vector<vector<int>> comp = scc.find_scc(); { {0, 1, 2}, {3}, {4, 7, 6, 5} } | 23.945205 | 78 | 0.48913 | [
"vector"
] |
65aa5bf1605d644b2bfa6dad7bfc7f9487943944 | 32,118 | cpp | C++ | src/gui/tab.cpp | ctlcltd/e2-sat-editor | 20a14cb8fb6a71afa3e62e2b2456a9b68c7cbce3 | [
"MIT"
] | null | null | null | src/gui/tab.cpp | ctlcltd/e2-sat-editor | 20a14cb8fb6a71afa3e62e2b2456a9b68c7cbce3 | [
"MIT"
] | null | null | null | src/gui/tab.cpp | ctlcltd/e2-sat-editor | 20a14cb8fb6a71afa3e62e2b2456a9b68c7cbce3 | [
"MIT"
] | null | null | null | /*!
* e2-sat-editor/src/gui/tab.cpp
*
* @link https://github.com/ctlcltd/e2-sat-editor
* @copyright e2 SAT Editor Team
* @author Leonardo Laureti
* @version 0.1
* @license MIT License
* @license GNU GPLv3 License
*/
#include <algorithm>
#include <cstdio>
#include <QtGlobal>
#include <QGuiApplication>
#include <QTimer>
#include <QList>
#include <QStyle>
#include <QMessageBox>
#include <QGridLayout>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QSplitter>
#include <QGroupBox>
#include <QToolBar>
#include <QMenu>
#include <QPushButton>
#include <QComboBox>
#include <QClipboard>
#include <QMimeData>
#include "theme.h"
#include "tab.h"
#include "gui.h"
#include "editService.h"
#include "channelBook.h"
#include "ftpcom_gui.h"
#include "todo.h"
using std::to_string, std::sort;
using namespace e2se;
namespace e2se_gui
{
tab::tab(gui* gid, QWidget* wid)
{
this->log = new logger("tab");
debug("tab()");
this->gid = gid;
this->cwid = wid;
this->widget = new QWidget;
widget->setStyleSheet("QGroupBox { spacing: 0; padding: 20px 0 0 0; border: 0 } QGroupBox::title { margin: 0 12px }");
QGridLayout* frm = new QGridLayout(widget);
QHBoxLayout* top = new QHBoxLayout;
QGridLayout* container = new QGridLayout;
QHBoxLayout* bottom = new QHBoxLayout;
//TODO bouquets_box and scrollbar in GTK+
QSplitter* splitterc = new QSplitter;
QVBoxLayout* side_box = new QVBoxLayout;
QVBoxLayout* list_box = new QVBoxLayout;
QWidget* side = new QWidget;
QVBoxLayout* services_box = new QVBoxLayout;
QVBoxLayout* bouquets_box = new QVBoxLayout;
QGroupBox* services = new QGroupBox("Services");
QGroupBox* bouquets = new QGroupBox("Bouquets");
QGroupBox* channels = new QGroupBox("Channels");
services->setFlat(true);
bouquets->setFlat(true);
channels->setFlat(true);
QGridLayout* list_layout = new QGridLayout;
this->list_wrap = new QWidget;
list_wrap->setObjectName("channels_wrap");
list_wrap->setStyleSheet("#channels_wrap { background: transparent }");
this->services_tree = new QTreeWidget;
this->bouquets_tree = new QTreeWidget;
this->list_tree = new QTreeWidget;
services_tree->setStyleSheet("QTreeWidget { background: transparent } ::item { padding: 6px auto }");
bouquets_tree->setStyleSheet("QTreeWidget { background: transparent } ::item { padding: 6px auto }");
list_tree->setStyleSheet("::item { padding: 6px auto }");
services_tree->setHeaderHidden(true);
services_tree->setUniformRowHeights(true);
bouquets_tree->setHeaderHidden(true);
bouquets_tree->setUniformRowHeights(true);
list_tree->setUniformRowHeights(true);
bouquets_tree->setSelectionBehavior(QAbstractItemView::SelectRows);
bouquets_tree->setDropIndicatorShown(true);
bouquets_tree->setDragDropMode(QAbstractItemView::DragDrop);
bouquets_tree->setEditTriggers(QAbstractItemView::NoEditTriggers);
list_tree->setRootIsDecorated(false);
list_tree->setSelectionBehavior(QAbstractItemView::SelectRows);
list_tree->setSelectionMode(QAbstractItemView::ExtendedSelection);
list_tree->setItemsExpandable(false);
list_tree->setExpandsOnDoubleClick(false);
list_tree->setDropIndicatorShown(true);
list_tree->setDragDropMode(QAbstractItemView::InternalMove);
list_tree->setEditTriggers(QAbstractItemView::NoEditTriggers);
QTreeWidgetItem* lheader_item = new QTreeWidgetItem({"", "Index", "Name", "CHID", "TXID", "Type", "Provider", "Frequency", "Polarization", "Symbol Rate", "FEC", "SAT", "System"});
int col = 0;
list_tree->setHeaderItem(lheader_item);
list_tree->setColumnHidden(col++, true);
list_tree->setColumnWidth(col++, 75); // Index
list_tree->setColumnWidth(col++, 200); // Name
if (gid->sets->value("application/debug", true).toBool()) {
list_tree->setColumnWidth(col++, 175); // CHID
list_tree->setColumnWidth(col++, 150); // TXID
}
else
{
list_tree->setColumnHidden(col++, true);
list_tree->setColumnHidden(col++, true);
}
list_tree->setColumnWidth(col++, 85); // Type
list_tree->setColumnWidth(col++, 150); // Provider
list_tree->setColumnWidth(col++, 95); // Frequency
list_tree->setColumnWidth(col++, 85); // Polarization
list_tree->setColumnWidth(col++, 95); // Symbol Rate
list_tree->setColumnWidth(col++, 50); // FEC
list_tree->setColumnWidth(col++, 125); // SAT
list_tree->setColumnWidth(col++, 75); // System
this->lheaderv = list_tree->header();
lheaderv->connect(lheaderv, &QHeaderView::sectionClicked, [=](int column) { this->trickySortByColumn(column); });
list_tree->setContextMenuPolicy(Qt::CustomContextMenu);
list_tree->connect(list_tree, &QTreeWidget::customContextMenuRequested, [=](QPoint pos) { this->showListEditContextMenu(pos); });
QToolBar* top_toolbar = new QToolBar;
top_toolbar->setIconSize(QSize(32, 32));
top_toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
top_toolbar->setStyleSheet("QToolBar { padding: 0 12px } QToolButton { font: 18px }");
QToolBar* bottom_toolbar = new QToolBar;
bottom_toolbar->setStyleSheet("QToolBar { padding: 8px 12px } QToolButton { font: bold 16px }");
QWidget* top_toolbar_spacer = new QWidget;
top_toolbar_spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
QComboBox* profile_combo = new QComboBox;
int profile_sel = gid->sets->value("profile/selected").toInt();
int size = gid->sets->beginReadArray("profile");
for (int i = 0; i < size; i++)
{
gid->sets->setArrayIndex(i);
if (! gid->sets->contains("profileName"))
continue;
profile_combo->addItem(gid->sets->value("profileName").toString(), i + 1); //TODO
}
gid->sets->endArray();
profile_combo->setCurrentIndex(profile_sel);
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
profile_combo->connect(profile_combo, &QComboBox::currentIndexChanged, [=](int index) { this->profileComboChanged(index); });
#else
profile_combo->connect(profile_combo, QOverload<int>::of(&QComboBox::currentIndexChanged), [=](int index) { this->profileComboChanged(index); });
#endif
top_toolbar->addAction(theme::icon("file-open"), "Open", [=]() { this->openFile(); });
top_toolbar->addAction(theme::icon("save"), "Save", [=]() { this->saveFile(false); });
top_toolbar->addSeparator();
top_toolbar->addAction(theme::icon("import"), "Import", [=]() { this->importFile(); });
top_toolbar->addAction(theme::icon("export"), "Export", [=]() { this->exportFile(); });
top_toolbar->addSeparator();
top_toolbar->addAction(theme::icon("settings"), "Settings", [=]() { gid->settings(); });
top_toolbar->addWidget(top_toolbar_spacer);
top_toolbar->addWidget(profile_combo);
top_toolbar->addAction("Connect", [=]() { this->ftpConnect(); });
top_toolbar->addSeparator();
top_toolbar->addAction("Upload", [=]() { this->ftpUpload(); });
top_toolbar->addAction("Download", [=]() { this->ftpDownload(); });
if (gid->sets->value("application/debug", true).toBool())
{
QWidget* bottom_spacer = new QWidget;
bottom_spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
bottom_toolbar->addAction("§ Load seeds", [=]() { this->loadSeeds(); });
bottom_toolbar->addAction("§ Reset", [=]() { this->newFile(); tabChangeName(); });
bottom_toolbar->addWidget(bottom_spacer);
}
QToolBar* bouquets_ats = new QToolBar;
bouquets_ats->setIconSize(QSize(12, 12));
bouquets_ats->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
bouquets_ats->setStyleSheet("QToolButton { font: bold 14px }");
QToolBar* list_ats = new QToolBar;
list_ats->setIconSize(QSize(12, 12));
list_ats->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
list_ats->setStyleSheet("QToolButton { font: bold 14px }");
this->action.list_dnd = new QPushButton;
this->action.list_dnd->setText("Drag&&Drop");
this->action.list_dnd->setDisabled(true);
this->action.list_dnd->connect(this->action.list_dnd, &QPushButton::pressed, [=]() { this->reharmDnD(); });
QWidget* list_ats_spacer = new QWidget;
list_ats_spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
bouquets_ats->addAction(theme::icon("add"), "New Bouquet", todo);
this->action.list_addch = list_ats->addAction(theme::icon("add"), "Add Channel", [=]() { this->addChannel(); });
this->action.list_newch = list_ats->addAction(theme::icon("add"), "New Service", [=]() { this->addService(); });
list_ats->addWidget(list_ats_spacer);
list_ats->addWidget(this->action.list_dnd);
this->action.list_addch->setDisabled(true);
//TODO reindex userbouquets before saving
this->bouquets_evth = new BouquetsEventHandler;
this->list_evth = new ListEventHandler;
this->list_evto = new ListEventObserver;
services_tree->connect(services_tree, &QTreeWidget::currentItemChanged, [=](QTreeWidgetItem* current) { this->servicesItemChanged(current); });
bouquets_evth->setEventCallback([=]() { list_tree->scrollToBottom(); this->visualReindexList(); });
bouquets_tree->viewport()->installEventFilter(bouquets_evth);
bouquets_tree->connect(bouquets_tree, &QTreeWidget::currentItemChanged, [=](QTreeWidgetItem* current) { this->bouquetsItemChanged(current); });
list_tree->installEventFilter(list_evto);
list_tree->viewport()->installEventFilter(list_evth);
list_tree->connect(list_tree, &QTreeWidget::currentItemChanged, [=]() { this->listItemChanged(); });
list_tree->connect(list_tree, &QTreeWidget::itemDoubleClicked, [=]() { this->editService(); });
top->addWidget(top_toolbar);
bottom->addWidget(bottom_toolbar);
services_box->addWidget(services_tree);
services->setLayout(services_box);
//TODO FIX
services_tree->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
bouquets_box->addWidget(bouquets_tree);
bouquets_box->addWidget(bouquets_ats);
bouquets->setLayout(bouquets_box);
side_box->addWidget(services);
side_box->addWidget(bouquets);
side_box->setContentsMargins(0, 0, 0, 0);
side->setLayout(side_box);
list_layout->addWidget(list_tree);
list_layout->setContentsMargins(3, 3, 3, 3);
list_wrap->setLayout(list_layout);
list_box->addWidget(list_wrap);
list_box->addWidget(list_ats);
channels->setLayout(list_box);
side->setMinimumWidth(240);
channels->setMinimumWidth(520);
splitterc->addWidget(side);
splitterc->addWidget(channels);
splitterc->setStretchFactor(0, 1);
splitterc->setStretchFactor(1, 4);
container->addWidget(splitterc, 0, 0, 1, 1);
container->setContentsMargins(8, 8, 8, 8);
frm->setContentsMargins(0, 0, 0, 0);
frm->addLayout(top, 0, 0);
frm->addLayout(container, 1, 0);
frm->addLayout(bottom, 2, 0);
vector<pair<QString, QString>> tree = {
{"chs", "All services"},
{"chs:1", "TV"},
{"chs:2", "Radio"},
{"chs:0", "Data"}
};
for (auto & item : tree)
{
QTreeWidgetItem* titem = new QTreeWidgetItem();
titem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
QVariantMap tdata; //TODO
tdata["id"] = item.first;
titem->setData(0, Qt::UserRole, QVariant (tdata));
titem->setText(0, item.second);
services_tree->addTopLevelItem(titem);
}
newFile();
}
tab::~tab()
{
delete dbih;
//TODO FIX deleting widget removes next tab
// delete widget;
}
void tab::newFile()
{
debug("newFile()");
initialize();
if (this->dbih != nullptr)
delete this->dbih;
this->dbih = new e2db;
load();
}
void tab::openFile()
{
debug("openFile()");
string dirname = gid->openFileDialog();
if (! dirname.empty())
readFile(dirname);
}
void tab::saveFile(bool saveas)
{
debug("saveFile()", "saveas", to_string(saveas));
QMessageBox dial = QMessageBox();
string dirname;
bool overwrite = ! saveas && (! this->state.nwwr || this->state.ovwr);
if (overwrite)
{
this->updateListIndex();
dirname = this->filename;
dial.setText("Files will be overwritten.");
dial.exec();
}
else
{
dirname = gid->saveFileDialog(this->filename);
}
if (! dirname.empty())
{
debug("saveFile()", "overwrite", to_string(overwrite));
debug("saveFile()", "filename", filename);
QGuiApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
bool wr = dbih->write(dirname, overwrite);
QGuiApplication::restoreOverrideCursor();
if (wr) {
dial.setText("Saved!");
dial.exec();
}
else
{
QMessageBox::critical(cwid, NULL, "Error writing files.");
}
}
}
void tab::importFile()
{
debug("importFile()");
vector<string> filenames;
filenames = gid->importFileDialog();
}
void tab::exportFile()
{
debug("exportFile()");
string filename;
string dirname = gid->exportFileDialog(filename);
}
void tab::addChannel()
{
debug("addChannel()");
e2se_gui::channelBook* cb = new e2se_gui::channelBook(dbih);
string curr_chlist = this->state.curr;
QDialog* dial = new QDialog(cwid);
dial->setMinimumSize(760, 420);
dial->setWindowTitle("Add Channel");
//TODO FIX SEGFAULT
// dial->connect(dial, &QDialog::finished, [=]() { delete dial; delete cb; });
QGridLayout* layout = new QGridLayout;
QToolBar* bottom_toolbar = new QToolBar;
bottom_toolbar->setIconSize(QSize(16, 16));
bottom_toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
bottom_toolbar->setStyleSheet("QToolBar { padding: 0 8px } QToolButton { font: 16px }");
QWidget* bottom_spacer = new QWidget;
bottom_spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
bottom_toolbar->addWidget(bottom_spacer);
bottom_toolbar->addAction(theme::icon("add"), "Add", [=]() { auto selected = cb->getSelected(); this->putChannels(selected); });
layout->addWidget(cb->widget);
layout->addWidget(bottom_toolbar);
layout->setContentsMargins(0, 0, 0, 0);
dial->setLayout(layout);
dial->exec();
}
void tab::addService()
{
debug("addService()");
e2se_gui::editService* add = new e2se_gui::editService(dbih);
add->display(cwid);
}
void tab::editService()
{
debug("editService()");
QList<QTreeWidgetItem*> selected = list_tree->selectedItems();
if (selected.empty() || selected.count() > 1)
return;
QTreeWidgetItem* item = selected.first();
string chid = item->data(2, Qt::UserRole).toString().toStdString();
string nw_chid;
bool marker = item->data(1, Qt::UserRole).toBool();
debug("editService()", "chid", chid);
if (! marker && dbih->db.services.count(chid))
{
e2se_gui::editService* add = new e2se_gui::editService(dbih);
add->setEditID(chid);
add->display(cwid);
nw_chid = add->getEditID(); //TODO returned after dial.exec()
add->destroy();
debug("editService()", "nw_chid", nw_chid);
QStringList entry = dbih->entries.services[nw_chid];
entry.prepend(item->text(1));
entry.prepend(item->text(0));
for (int i = 0; i < entry.count(); i++)
item->setText(i, entry[i]);
item->setData(2, Qt::UserRole, QString::fromStdString(nw_chid)); // data: chid
dbih->updateUserbouquetIndexes(chid, nw_chid);
}
}
bool tab::readFile(string filename)
{
debug("readFile()", "filename", filename);
if (filename.empty())
return false;
initialize();
if (this->dbih != nullptr)
delete this->dbih;
this->dbih = new e2db;
QGuiApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
bool rr = dbih->prepare(filename);
QGuiApplication::restoreOverrideCursor();
if (rr)
{
tabChangeName(filename);
}
else
{
tabChangeName();
QMessageBox::critical(cwid, NULL, "Error opening files.");
return false;
}
this->state.nwwr = false;
this->filename = filename;
load();
return true;
}
void tab::load()
{
debug("load()");
sort(dbih->gindex["bss"].begin(), dbih->gindex["bss"].end());
unordered_map<string, QTreeWidgetItem*> bgroups;
for (auto & bsi : dbih->gindex["bss"])
{
debug("load()", "bouquet", bsi.second);
e2db::bouquet gboq = dbih->bouquets[bsi.second];
QString bgroup = QString::fromStdString(bsi.second);
QString bname = QString::fromStdString(gboq.nname.empty() ? gboq.name : gboq.nname);
QTreeWidgetItem* pgroup = new QTreeWidgetItem();
pgroup->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
QMap<QString, QVariant> tdata; //TODO
tdata["id"] = bgroup;
pgroup->setData(0, Qt::UserRole, QVariant (tdata));
pgroup->setText(0, bname);
bouquets_tree->addTopLevelItem(pgroup);
bouquets_tree->expandItem(pgroup);
for (string & ubname : gboq.userbouquets)
bgroups[ubname] = pgroup;
}
for (auto & ubi : dbih->gindex["ubs"])
{
debug("load()", "userbouquet", ubi.second);
e2db::userbouquet uboq = dbih->userbouquets[ubi.second];
QString bgroup = QString::fromStdString(ubi.second);
QTreeWidgetItem* pgroup = bgroups[ubi.second];
// macos: unwanted chars [qt.qpa.fonts] Menlo notice
QString bname;
if (gid->sets->value("preference/fixUnicodeChars").toBool())
bname = QString::fromStdString(uboq.name).remove(QRegularExpression("[^\\p{L}\\p{N}\\p{Sm}\\p{M}\\p{P}\\s]+"));
else
bname = QString::fromStdString(uboq.name);
QTreeWidgetItem* bitem = new QTreeWidgetItem(pgroup);
bitem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | Qt::ItemNeverHasChildren);
QMap<QString, QVariant> tdata; //TODO
tdata["id"] = bgroup;
bitem->setData(0, Qt::UserRole, QVariant (tdata));
bitem->setText(0, bname);
bouquets_tree->addTopLevelItem(bitem);
}
bouquets_tree->setDragEnabled(true);
bouquets_tree->setAcceptDrops(true);
populate(services_tree);
setCounters();
}
void tab::populate(QTreeWidget* side_tree)
{
string curr_chlist;
string prev_chlist;
bool precached = false;
QList<QTreeWidgetItem*> cachep;
if (! cache.empty())
{
for (int i = 0; i < list_tree->topLevelItemCount(); i++)
{
QTreeWidgetItem* item = list_tree->topLevelItem(i);
cachep.append(item->clone());
}
precached = true;
prev_chlist = string (this->state.curr);
}
QTreeWidgetItem* selected = side_tree->currentItem();
if (selected == NULL)
selected = side_tree->topLevelItem(0);
if (selected != NULL)
{
QVariantMap tdata = selected->data(0, Qt::UserRole).toMap();
QString qcurr_bouquet = tdata["id"].toString();
curr_chlist = qcurr_bouquet.toStdString();
this->state.curr = curr_chlist;
}
debug("populate()", "curr_chlist", curr_chlist);
lheaderv->setSortIndicatorShown(true);
lheaderv->setSectionsClickable(false);
list_tree->clear();
if (precached)
{
cache[prev_chlist].swap(cachep);
}
int i = 0;
if (cache[curr_chlist].isEmpty())
{
for (auto & ch : dbih->gindex[curr_chlist])
{
char ci[7];
std::sprintf(ci, "%06d", i++);
bool marker = false;
QString chid = QString::fromStdString(ch.second);
QString x = QString::fromStdString(ci);
QString idx;
QStringList entry;
if (dbih->db.services.count(ch.second))
{
entry = dbih->entries.services[ch.second];
idx = QString::fromStdString(to_string(ch.first));
entry.prepend(idx);
entry.prepend(x);
}
else
{
e2db::channel_reference chref = dbih->userbouquets[curr_chlist].channels[ch.second];
if (chref.marker)
{
marker = true;
entry = dbih->entryMarker(chref);
idx = entry[1];
entry.prepend(x);
}
else
{
//TEST
entry = QStringList({x, "", "", chid, "", "ERROR"});
// idx = 0; //Qt5
error("populate()", "chid", ch.second);
//TEST
}
}
QTreeWidgetItem* item = new QTreeWidgetItem(entry);
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled | Qt::ItemNeverHasChildren);
item->setData(0, Qt::UserRole, idx); // data: Index
item->setData(1, Qt::UserRole, marker); // data: marker flag
item->setData(2, Qt::UserRole, chid); // data: chid
cache[curr_chlist].append(item);
}
}
list_tree->addTopLevelItems(cache[curr_chlist]);
// sorting
if (this->state.sort.first != -1)
{
list_tree->sortByColumn(this->state.sort.first, this->state.sort.second);
// sorting column 0|desc
if (this->state.sort.first == 0 && this->state.sort.second == Qt::DescendingOrder)
lheaderv->setSortIndicator(1, this->state.sort.second);
}
// non-sorting
else if (this->state.dnd)
{
list_tree->setDragEnabled(true);
list_tree->setAcceptDrops(true);
}
lheaderv->setSectionsClickable(true);
setCounters(true);
}
void tab::servicesItemChanged(QTreeWidgetItem* current)
{
debug("servicesItemChanged()");
if (current != NULL)
{
int ti = services_tree->indexOfTopLevelItem(current);
this->action.list_addch->setDisabled(true);
this->action.list_newch->setEnabled(true);
// tv | radio | data
if (ti)
{
disallowDnD();
}
// all
else
{
// sorting default
if (this->state.sort.first == 0)
allowDnD();
}
list_tree->clearSelection();
list_tree->scrollToTop();
}
updateListIndex();
populate(services_tree);
}
void tab::bouquetsItemChanged(QTreeWidgetItem* current)
{
debug("bouquetsItemChanged()");
if (current != NULL)
{
int ti = bouquets_tree->indexOfTopLevelItem(current);
this->state.ti = ti;
// bouquet: tv | radio
if (ti != -1)
{
this->action.list_addch->setDisabled(true);
this->action.list_newch->setEnabled(true);
disallowDnD();
// sorting by
if (this->state.sort.first > 0)
this->action.list_dnd->setDisabled(true);
}
// userbouquet
else
{
this->action.list_addch->setEnabled(true);
this->action.list_newch->setDisabled(true);
// sorting by
if (this->state.sort.first > 0)
this->action.list_dnd->setEnabled(true);
// sorting default
else
allowDnD();
}
list_tree->clearSelection();
list_tree->scrollToTop();
}
updateListIndex();
populate(bouquets_tree);
}
void tab::listItemChanged()
{
if (! list_evto->isChanged()) return;
debug("listItemChanged()");
QTimer::singleShot(0, [=]() { this->visualReindexList(); });
this->state.changed = true;
}
//TODO improve by positions QAbstractItemView::indexAt(x, y) min|max
void tab::visualReindexList()
{
debug("visualReindexList()");
int i = 0, y = 0, idx = 0;
int maxs = list_tree->topLevelItemCount();
do
{
char ci[7];
std::sprintf(ci, "%06d", i + 1);
QString x = QString::fromStdString(ci);
QTreeWidgetItem* item = list_tree->topLevelItem(i);
bool marker = item->data(1, Qt::UserRole).toBool();
if (marker)
{
idx = 0;
}
else
{
y++;
idx = y;
}
item->setText(0, x);
if (! marker)
item->setText(1, QString::fromStdString(to_string(idx)));
i++;
}
while (i != maxs);
}
void tab::trickySortByColumn(int column)
{
debug("trickySortByColumn()", "column", to_string(column));
Qt::SortOrder order = lheaderv->sortIndicatorOrder();
column = column == 1 ? 0 : column;
// sorting by
if (column)
{
list_tree->sortItems(column, order);
disallowDnD();
// userbouquet
if (this->state.ti == -1)
this->action.list_dnd->setEnabled(true);
lheaderv->setSortIndicatorShown(true);
}
// sorting default
else
{
list_tree->sortByColumn(column, order);
lheaderv->setSortIndicator(1, order);
allowDnD();
this->action.list_dnd->setDisabled(true);
// default column 0|asc
if (order == Qt::AscendingOrder)
lheaderv->setSortIndicatorShown(false);
else
lheaderv->setSortIndicatorShown(true);
}
this->state.sort = pair (column, order); //C++17
}
void tab::allowDnD()
{
debug("allowDnd()");
this->list_evth->allowInternalMove();
this->state.dnd = true;
// list_wrap->setStyleSheet("#channels_wrap { background: transparent }");
}
void tab::disallowDnD()
{
debug("disallowDnD()");
this->list_evth->disallowInternalMove();
this->state.dnd = false;
// list_wrap->setStyleSheet("#channels_wrap { background: rgba(255, 192, 0, 20%) }");
}
void tab::reharmDnD()
{
debug("reharmDnD()");
// sorting default 0|asc
list_tree->sortByColumn(0, Qt::AscendingOrder);
list_tree->setDragEnabled(true);
list_tree->setAcceptDrops(true);
this->state.sort = pair (0, Qt::AscendingOrder); //C++17
this->action.list_dnd->setDisabled(true);
}
void tab::listItemCut()
{
debug("listItemCut()");
listItemCopy(true);
}
void tab::listItemCopy(bool cut)
{
debug("listItemCopy()");
QList<QTreeWidgetItem*> selected = list_tree->selectedItems();
if (selected.empty())
return;
QClipboard* clipboard = QGuiApplication::clipboard();
QStringList text;
for (auto & item : selected)
{
QStringList data;
// skip column 0 = x index
for (int i = 1; i < list_tree->columnCount(); i++)
data.append(item->data(i, Qt::DisplayRole).toString());
text.append(data.join(",")); // CSV
}
clipboard->setText(text.join("\n")); // CSV
if (cut)
listItemDelete();
}
void tab::listItemPaste()
{
debug("listItemPaste()");
QTreeWidgetItem* selected = list_tree->currentItem();
if (selected == NULL)
selected = list_tree->topLevelItem(list_tree->topLevelItemCount() - 1);
if (selected != NULL)
{
QClipboard* clipboard = QGuiApplication::clipboard();
const QMimeData* mimeData = clipboard->mimeData();
vector<QString> items;
string curr_chlist = this->state.curr;
if (mimeData->hasText())
{
QStringList list = clipboard->text().split("\n");
for (QString & data : list)
{
//TODO validate
items.emplace_back(data.split(",")[2]);
}
}
if (! items.empty())
putChannels(items);
}
}
void tab::listItemDelete()
{
debug("listItemDelete()");
QList<QTreeWidgetItem*> selected = list_tree->selectedItems();
if (selected.empty())
return;
lheaderv->setSectionsClickable(false);
list_tree->setDragEnabled(false);
list_tree->setAcceptDrops(false);
for (auto & item : selected)
{
int i = list_tree->indexOfTopLevelItem(item);
list_tree->takeTopLevelItem(i);
}
lheaderv->setSectionsClickable(true);
list_tree->setDragEnabled(true);
list_tree->setAcceptDrops(true);
this->state.changed = true;
//TODO FIX sorting default
updateListIndex();
visualReindexList();
setCounters();
}
//TODO focus in
void tab::listItemSelectAll()
{
debug("listItemSelectAll()");
list_tree->selectAll();
}
void tab::listItemAction(int action)
{
debug("listItemAction()", "action", to_string(action));
switch (action)
{
case LIST_EDIT_ATS::Cut:
listItemCut();
break;
case LIST_EDIT_ATS::Copy:
listItemCopy();
break;
case LIST_EDIT_ATS::Paste:
listItemPaste();
break;
case LIST_EDIT_ATS::Delete:
listItemDelete();
break;
case LIST_EDIT_ATS::SelectAll:
listItemSelectAll();
break;
}
}
//TODO allow duplicates
//TODO put in selected place
void tab::putChannels(vector<QString> channels)
{
debug("putChannels()");
lheaderv->setSectionsClickable(false);
list_tree->setDragEnabled(false);
list_tree->setAcceptDrops(false);
QList<QTreeWidgetItem*> clist;
int i = list_tree->topLevelItemCount() + 1;
for (QString & w : channels)
{
string chid = w.toStdString();
char ci[7];
std::sprintf(ci, "%06d", i);
QString x = QString::fromStdString(ci);
QString idx = QString::fromStdString(to_string(i));
QStringList entry;
bool marker = false;
if (dbih->db.services.count(chid))
{
entry = dbih->entries.services[chid];
entry.prepend(idx);
entry.prepend(x);
}
else
{
string chlist;
for (auto & q : dbih->gindex["mks"])
{
if (q.second == chid)
{
for (auto & u : dbih->gindex["ubs"])
{
if (u.first == q.first)
chlist = u.second;
}
}
}
if (chlist.empty())
{
error("putChannels()", "chid", chid);
continue;
}
else
{
e2db::channel_reference chref = dbih->userbouquets[chlist].channels[chid];
marker = true;
entry = dbih->entryMarker(chref);
idx = entry[1];
entry.prepend(x);
}
}
QTreeWidgetItem* item = new QTreeWidgetItem(entry);
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled | Qt::ItemNeverHasChildren);
item->setData(0, Qt::UserRole, idx); // data: Index
item->setData(1, Qt::UserRole, marker); // data: marker flag
item->setData(2, Qt::UserRole, w); // data: chid
clist.append(item);
i++;
}
list_tree->addTopLevelItems(clist);
lheaderv->setSectionsClickable(true);
list_tree->setDragEnabled(true);
list_tree->setAcceptDrops(true);
this->state.changed = true;
updateListIndex();
visualReindexList();
setCounters();
}
void tab::updateListIndex()
{
if (! this->state.changed) return;
int i = 0, y = 0, idx = 0;
int count = list_tree->topLevelItemCount();
string curr_chlist = this->state.curr;
dbih->gindex[curr_chlist].clear();
debug("updateListIndex()", "curr_chlist", curr_chlist);
do
{
QTreeWidgetItem* item = list_tree->topLevelItem(i);
string chid = item->data(2, Qt::UserRole).toString().toStdString();
bool marker = item->data(1, Qt::UserRole).toBool();
if (marker)
{
idx = 0;
}
else
{
y++;
idx = y;
}
dbih->gindex[curr_chlist].emplace_back(pair (idx, chid)); //C++17
i++;
}
while (i != count);
this->state.changed = false;
}
void tab::showListEditContextMenu(QPoint &pos)
{
debug("showListEditContextMenu()");
QMenu* list_edit = new QMenu;
list_edit->addAction("Edit Service", [=]() { this->editService(); });
list_edit->addSeparator();
list_edit->addAction("Cut", [=]() { this->listItemCut(); });
list_edit->addAction("Copy", [=]() { this->listItemCopy(); });
list_edit->addAction("Paste", [=]() { this->listItemPaste(); });
list_edit->addSeparator();
list_edit->addAction("Delete", [=]() { this->listItemDelete(); });
list_edit->exec(list_tree->mapToGlobal(pos));
}
void tab::setCounters(bool channels)
{
debug("setCounters()");
int counters[5] = {0, 0, 0, 0, 0};
if (channels)
{
string curr_chlist = this->state.curr;
counters[4] = dbih->gindex[curr_chlist].size();
}
else
{
counters[0] = dbih->gindex["chs:0"].size(); // data
counters[1] = dbih->gindex["chs:1"].size(); // tv
counters[2] = dbih->gindex["chs:2"].size(); // radio
counters[3] = dbih->gindex["chs"].size(); // all
}
gid->loaded(counters);
}
void tab::setTabId(int ttid)
{
debug("setTabId()", "ttid", to_string(ttid));
this->ttid = ttid;
}
void tab::tabChangeName(string filename)
{
debug("tabChangeName()");
if (ttid != -1)
gid->tabChangeName(ttid, filename);
}
void tab::initialize()
{
debug("initialize()");
this->state.nwwr = true;
this->state.ovwr = false;
this->state.changed = false;
this->state.dnd = true;
this->state.sort = pair (-1, Qt::AscendingOrder); //C++17
bouquets_tree->clear();
bouquets_tree->setDragEnabled(false);
bouquets_tree->setAcceptDrops(false);
bouquets_tree->reset();
list_tree->clear();
list_tree->setDragEnabled(false);
list_tree->setAcceptDrops(false);
list_tree->reset();
lheaderv->setSortIndicatorShown(false);
lheaderv->setSectionsClickable(false);
lheaderv->setSortIndicator(0, Qt::AscendingOrder);
cache.clear();
this->action.list_addch->setDisabled(true);
this->action.list_newch->setEnabled(true);
this->action.list_dnd->setDisabled(true);
gid->reset();
}
void tab::destroy()
{
delete this;
}
void tab::profileComboChanged(int index)
{
debug("profileComboChanged()", "index", to_string(index));
gid->sets->setValue("profile/selected", index);
}
bool tab::ftpHandle()
{
debug("ftpHandle()");
if (ftph == nullptr)
ftph = new ftpcom;
if (ftph->connect())
return true;
else
QMessageBox::critical(nullptr, NULL, "Cannot connect to FTP Server!");
return false;
}
void tab::ftpConnect()
{
debug("ftpConnect()");
if (ftph != nullptr)
{
ftph->disconnect();
delete ftph;
ftph = nullptr;
}
if (ftpHandle())
QMessageBox::information(nullptr, NULL, "Successfully connected!");
}
void tab::ftpUpload()
{
debug("ftpUpload()");
if (ftpHandle())
{
unordered_map<string, e2se_ftpcom::ftpcom_file> files = dbih->get_output();
for (auto & x : files)
debug("ftpUpload()", "file", x.first + " | " + to_string(x.second.size()));
ftph->put_files(files);
}
}
//TODO temporary instance & merge
void tab::ftpDownload()
{
debug("ftpDownload()");
if (ftpHandle())
{
unordered_map<string, e2se_ftpcom::ftpcom_file> files = ftph->get_files();
for (auto & x : files)
debug("ftpDownload()", "file", x.first + " | " + to_string(x.second.size()));
dbih->merge(files);
initialize();
load();
}
}
void tab::loadSeeds()
{
if (gid->sets->contains("application/seeds"))
{
readFile(gid->sets->value("application/seeds").toString().toStdString());
}
else
{
gid->sets->setValue("application/seeds", "");
QMessageBox::information(cwid, NULL, "For debugging purpose, set application.seeds absolute path under Settings > Advanced tab, then restart software.");
}
}
}
| 25.756215 | 180 | 0.689426 | [
"vector"
] |
65acfa4292368381ef284814a130ae790f234e53 | 8,359 | cpp | C++ | src/Engine/StaticSEEngine.cpp | 1c0e/Abacus | 167b826aeef966014f185e3b5d376f39111c9e9e | [
"Apache-2.0"
] | 11 | 2021-01-12T00:45:49.000Z | 2022-01-17T06:22:17.000Z | src/Engine/StaticSEEngine.cpp | 1c0e/Abacus | 167b826aeef966014f185e3b5d376f39111c9e9e | [
"Apache-2.0"
] | 3 | 2021-03-16T08:37:52.000Z | 2022-03-29T14:56:55.000Z | src/Engine/StaticSEEngine.cpp | s3team/Abacus | 31bb80f7ce2b5cf52590c2627cf37e99e7b6a17b | [
"MIT"
] | 3 | 2021-05-09T06:57:42.000Z | 2021-11-23T13:06:17.000Z | #include "StaticSEEngine.hpp"
#include "VarMap.hpp"
#include "error.hpp"
#include "ins_types.hpp"
#include <algorithm>
#include <cassert>
#include <limits.h>
#include <sstream>
#define ERROR(MESSAGE) tana::default_error_handler(__FILE__, __LINE__, MESSAGE)
namespace tana {
bool StaticSEEngine::memory_find(std::string addr) {
auto ii = m_memory.find(addr);
if (ii == m_memory.end())
return false;
else
return true;
}
/*
bool isTree(std::shared_ptr<BitVector> v) {
std::list<std::shared_ptr<BitVector>> list_que;
list_que.push_back(v);
uint32_t count = 0;
while (!list_que.empty()) {
std::shared_ptr<BitVector> v = list_que.front();
list_que.pop_front();
++count;
const std::unique_ptr<Operation> &op = v->opr;
if (op != nullptr) {
if (op->val[0] != nullptr) list_que.push_back(op->val[0]);
if (op->val[1] != nullptr) list_que.push_back(op->val[1]);
if (op->val[2] != nullptr) list_que.push_back(op->val[2]);
}
if ((list_que.size() > FORMULA_MAX_LENGTH) || (count >
FORMULA_MAX_LENGTH)) return false;
}
return true;
}
*/
StaticSEEngine::StaticSEEngine() : SEEngine(false) {
m_ctx = {{"eax", nullptr}, {"ebx", nullptr}, {"ecx", nullptr},
{"edx", nullptr}, {"esi", nullptr}, {"edi", nullptr},
{"esp", nullptr}, {"ebp", nullptr}};
}
void StaticSEEngine::initAllRegSymol(
std::vector<std::unique_ptr<Inst_Base>>::iterator it1,
std::vector<std::unique_ptr<Inst_Base>>::iterator it2) {
m_ctx["eax"] = std::make_shared<BitVector>(ValueType::SYMBOL, "eax");
m_ctx["ebx"] = std::make_shared<BitVector>(ValueType::SYMBOL, "ebx");
m_ctx["ecx"] = std::make_shared<BitVector>(ValueType::SYMBOL, "ecx");
m_ctx["edx"] = std::make_shared<BitVector>(ValueType::SYMBOL, "edx");
m_ctx["esi"] = std::make_shared<BitVector>(ValueType::SYMBOL, "esi");
m_ctx["edi"] = std::make_shared<BitVector>(ValueType::SYMBOL, "edi");
m_ctx["esp"] = std::make_shared<BitVector>(ValueType::SYMBOL, "esp");
m_ctx["ebp"] = std::make_shared<BitVector>(ValueType::SYMBOL, "ebp");
this->start = it1;
this->end = it2;
}
void StaticSEEngine::reset() { this->m_memory.clear(); }
void StaticSEEngine::initFromBlock(std::unique_ptr<StaticBlock> &b) {
this->initAllRegSymol(b->inst_list.begin(), b->inst_list.end());
}
std::vector<std::shared_ptr<BitVector>> StaticSEEngine::getAllOutput() {
std::vector<std::shared_ptr<BitVector>> outputs;
std::shared_ptr<BitVector> v;
// symbols in registers
v = m_ctx["eax"];
if ((v->opr != nullptr))
outputs.push_back(v);
v = m_ctx["ebx"];
if ((v->opr != nullptr))
outputs.push_back(v);
v = m_ctx["ecx"];
if ((v->opr != nullptr))
outputs.push_back(v);
v = m_ctx["edx"];
if ((v->opr != nullptr))
outputs.push_back(v);
v = m_ctx["esi"];
if ((v->opr != nullptr))
outputs.push_back(v);
v = m_ctx["edi"];
if ((v->opr != nullptr))
outputs.push_back(v);
v = m_ctx["esp"];
if ((v->opr != nullptr))
outputs.push_back(v);
v = m_ctx["ebp"];
if ((v->opr != nullptr))
outputs.push_back(v);
// symbols in m_memory
for (auto const &x : m_memory) {
v = x.second;
if (v == nullptr) {
continue;
}
if ((v->opr != nullptr))
outputs.push_back(v);
}
return outputs;
}
std::shared_ptr<BitVector> StaticSEEngine::readReg(const std::string reg) {
x86::x86_reg reg_id = x86::reg_string2id(reg);
auto res = readReg(reg_id);
if (res == nullptr){
return std::make_shared<BitVector>(ValueType::SYMBOL, reg);
}
return readReg(reg_id);
}
std::shared_ptr<BitVector> StaticSEEngine::readReg(const x86::x86_reg reg) {
RegType type = Registers::getRegType(reg);
if (type == FULL) {
auto index = Registers::getRegIndex(reg);
std::string strName = Registers::convertRegID2RegName(index);
std::shared_ptr<BitVector> res = m_ctx[strName];
return res;
}
if (type == HALF) {
auto index = Registers::getRegIndex(reg);
std::string strName = Registers::convertRegID2RegName(index);
std::shared_ptr<BitVector> origin = m_ctx[strName];
std::shared_ptr<BitVector> res = SEEngine::Extract(origin, 1, 16);
return res;
}
if (type == QLOW) {
auto index = Registers::getRegIndex(reg);
std::string strName = Registers::convertRegID2RegName(index);
std::shared_ptr<BitVector> origin = m_ctx[strName];
std::shared_ptr<BitVector> res = SEEngine::Extract(origin, 1, 8);
return res;
}
if (type == QHIGH) {
auto index = Registers::getRegIndex(reg);
std::string strName = Registers::convertRegID2RegName(index);
std::shared_ptr<BitVector> origin = m_ctx[strName];
std::shared_ptr<BitVector> res = SEEngine::Extract(origin, 9, 16);
return res;
}
return nullptr;
}
bool StaticSEEngine::writeReg(const x86::x86_reg reg,
std::shared_ptr<tana::BitVector> v) {
RegType type = Registers::getRegType(reg);
uint32_t reg_index = Registers::getRegIndex(reg);
std::string index_name = Registers::convertRegID2RegName(reg_index);
if (type == FULL) {
m_ctx[index_name] = v;
return true;
}
if (type == HALF) {
auto origin = m_ctx[index_name];
auto reg_part = Extract(origin, 17, 32);
assert(v->size() == (REGISTER_SIZE / 2));
auto v_reg = Concat(reg_part, v);
assert(v_reg->size() == REGISTER_SIZE);
m_ctx[index_name] = v_reg;
return true;
}
if (type == QLOW) {
auto origin = m_ctx[index_name];
auto reg_part = Extract(origin, 9, 32);
assert(v->size() == (REGISTER_SIZE / 4));
auto v_reg = Concat(reg_part, v);
assert(v_reg->size() == REGISTER_SIZE);
m_ctx[index_name] = v_reg;
return true;
}
if (type == QHIGH) {
auto origin = m_ctx[index_name];
auto reg_part1 = Extract(origin, 1, 8);
auto reg_part2 = Extract(origin, 17, 32);
assert(v->size() == (REGISTER_SIZE / 4));
auto v_reg = Concat(reg_part2, v, reg_part1);
assert(v_reg->size() == REGISTER_SIZE);
m_ctx[index_name] = v_reg;
return true;
}
ERROR("Unkown reg type");
return false;
}
bool StaticSEEngine::writeReg(const std::string reg,
std::shared_ptr<tana::BitVector> v) {
x86::x86_reg reg_id = x86::reg_string2id(reg);
return writeReg(reg_id, v);
}
std::shared_ptr<BitVector> StaticSEEngine::readMem(std::string memory_address,
tana_type::T_SIZE size) {
std::shared_ptr<BitVector> v0;
if (memory_find(memory_address)) {
v0 = m_memory[memory_address];
} else {
std::stringstream ss;
ss << "Mem:" << std::hex << memory_address << std::dec;
v0 = std::make_shared<BitVector>(ValueType::SYMBOL, ss.str());
m_memory[memory_address] = v0;
}
if (size == T_BYTE_SIZE * T_DWORD) {
return v0;
}
if (size == T_BYTE_SIZE * T_WORD) {
std::shared_ptr<BitVector> v1 = SEEngine::Extract(v0, 1, 16);
return v1;
}
std::shared_ptr<BitVector> v1 = SEEngine::Extract(v0, 1, 8);
return v1;
}
bool StaticSEEngine::writeMem(std::string memory_address,
tana::tana_type::T_SIZE addr_size,
std::shared_ptr<tana::BitVector> v) {
if (v == nullptr || !addr_size) {
return true;
}
assert(v->size() == addr_size || !v->isSymbol());
std::shared_ptr<BitVector> v0, v_mem;
if (addr_size == T_BYTE_SIZE * T_DWORD) {
m_memory[memory_address] = v;
return true;
}
if (memory_find(memory_address)) {
v0 = m_memory[memory_address];
} else {
std::stringstream ss;
ss << "Mem:" << std::hex << memory_address << std::dec;
v0 = std::make_shared<BitVector>(ValueType::SYMBOL, ss.str());
m_memory[memory_address] = v0;
}
if (addr_size == T_BYTE_SIZE * T_WORD) {
std::shared_ptr<BitVector> v1 = DynSEEngine::Extract(v0, 1, 16);
if (!v->isSymbol()) {
v = SEEngine::Extract(v, 1, 16);
}
v_mem = Concat(v1, v);
m_memory[memory_address] = v_mem;
return true;
}
if (addr_size == T_BYTE_SIZE * T_BYTE) {
std::shared_ptr<BitVector> v1 = DynSEEngine::Extract(v0, 1, 8);
if (!v->isSymbol()) {
v = SEEngine::Extract(v, 1, 8);
}
v_mem = Concat(v1, v);
m_memory[memory_address] = v_mem;
return true;
}
return false;
}
} // namespace tana | 29.433099 | 79 | 0.626151 | [
"vector"
] |
65ad0e152b16b05d8a3a374c591b27453c60f278 | 8,004 | cpp | C++ | Source/TrackViz/Private/TrackVizGameMode.cpp | BrainsGarden/TrackViz | c63c1f041fc4ee124d1e7113772dc3a2e52d7ea6 | [
"MIT"
] | 13 | 2018-12-04T10:40:56.000Z | 2020-07-05T15:48:12.000Z | Source/TrackViz/Private/TrackVizGameMode.cpp | BrainsGarden/TrackViz | c63c1f041fc4ee124d1e7113772dc3a2e52d7ea6 | [
"MIT"
] | null | null | null | Source/TrackViz/Private/TrackVizGameMode.cpp | BrainsGarden/TrackViz | c63c1f041fc4ee124d1e7113772dc3a2e52d7ea6 | [
"MIT"
] | 3 | 2020-03-07T12:53:49.000Z | 2020-07-05T15:48:32.000Z | // Fill out your copyright notice in the Description page of Project Settings.
#include "TrackVizGameMode.h"
#include "TrackVizBPLibrary.h"
#include "Core.h"
#include "EngineUtils.h"
#include "Engine.h"
#include "Engine/GameEngine.h"
#include "GameFramework/PlayerInput.h"
#include "Slate/SceneViewport.h"
#include "MarkerMeshActor.h"
ATrackVizGameMode::ATrackVizGameMode()
{
PrimaryActorTick.bStartWithTickEnabled = true;
PrimaryActorTick.bCanEverTick = true;
UPlayerInput::AddEngineDefinedActionMapping(FInputActionKeyMapping("TrackViz_LMB", EKeys::LeftMouseButton));
UPlayerInput::AddEngineDefinedActionMapping(FInputActionKeyMapping("TrackViz_X", EKeys::X));
UPlayerInput::AddEngineDefinedActionMapping(FInputActionKeyMapping("TrackViz_Z", EKeys::Z));
UPlayerInput::AddEngineDefinedActionMapping(FInputActionKeyMapping("TrackViz_R", EKeys::R));
}
void ATrackVizGameMode::DrawTracks()
{
for (int32 iTrack = 0; iTrack < TrackRecords.Num(); ++iTrack) {
const FTrackRecord& record = TrackRecords[iTrack];
const FColor& color = Colors[iTrack];
UTrackVizBPLibrary::DrawTrackRecord(this, record, startPosition, color, LineThickness);
GEngine->AddOnScreenDebugMessage(static_cast<uint64>(iTrack), 999999, color, record.FileName);
}
}
void ATrackVizGameMode::Reload()
{
FlushPersistentDebugLines(GEngine->GetWorldFromContextObjectChecked(this));
DrawTracks();
}
void ATrackVizGameMode::BeginPlay()
{
PC = UGameplayStatics::GetPlayerController(GetWorld(), 0);
DefaultPawn = PC->GetPawn();
DefaultPawn->SetActorEnableCollision(false);
if (PC) {
PC->bShowMouseCursor = true;
PC->bEnableClickEvents = true;
PC->bEnableMouseOverEvents = true;
PC->ClickEventKeys.Add(EKeys::RightMouseButton);
}
PC->SetIgnoreLookInput(true);
PC->InputComponent->BindAction(FName("TrackViz_LMB"), IE_Pressed, this, &ATrackVizGameMode::OnClick);
PC->InputComponent->BindAction(FName("TrackViz_LMB"), IE_Released, this, &ATrackVizGameMode::OnRelease);
PC->InputComponent->BindAction(FName("TrackViz_X"), IE_Pressed, this, &ATrackVizGameMode::OnPressedX);
PC->InputComponent->BindAction(FName("TrackViz_Z"), IE_Pressed, this, &ATrackVizGameMode::ToggleMarkersVisibility);
PC->InputComponent->BindAction(FName("TrackViz_R"), IE_Pressed, this, &ATrackVizGameMode::Reload);
TActorIterator<APlayerStart> itr(GetWorld());
if (itr) {
startPosition = itr->GetActorLocation();
} else {
GEngine->AddOnScreenDebugMessage(-1, 5, FColor::Red, "Failed to locate PlayerStart, using origin as start position for tracks");
}
const FString& absTracksDir = isRelativePath ? FPaths::ProjectDir() + tracksDir : tracksDir;
if (!FPaths::DirectoryExists(absTracksDir)) {
GEngine->AddOnScreenDebugMessage(-1, 999999, FColor::Red, "Failed to locate tracks directory " + absTracksDir);
return;
}
TrackRecords = UTrackVizBPLibrary::ReadTrackRecordsFromDir(absTracksDir);
Colors = UTrackVizBPLibrary::GetColorsForTrackRecords(TrackRecords);
DrawTracks();
for (int32 iTrack = 0; iTrack < TrackRecords.Num(); ++iTrack) {
const FTrackRecord& record = TrackRecords[iTrack];
const FColor& color = Colors[iTrack];
for (int32 iPoint = 0; iPoint < record.Positions.Num(); ++iPoint) {
const FVector& position = record.Positions[iPoint];
const FRotator& rotator = record.RotatorsKnown ? record.Rotators[iPoint] : FRotator(0, 0, 0);
auto p = GetWorld()->SpawnActor<AMarkerMeshActor>(startPosition + position, rotator, FActorSpawnParameters());
p->TrackIndex = iTrack;
p->PointIndex = iPoint;
p->Color = color;
Markers.Add(p);
p->OnClicked.AddDynamic(this, &ATrackVizGameMode::OnPressedMarker);
UMaterialInterface * Material = p->Mesh->GetMaterial(0);
UMaterialInstanceDynamic* MatInstance = p->Mesh->CreateDynamicMaterialInstance(0, Material);
if (MatInstance) {
MatInstance->SetVectorParameterValue("Color", FLinearColor(color));
}
}
}
bPawnsVisible = true;
TArray<UStaticMeshComponent*> Components;
DefaultPawn->GetComponents<UStaticMeshComponent>(Components);
Components[0]->ToggleVisibility();
ShowTooltip();
}
void ATrackVizGameMode::OnClick()
{
PC->bShowMouseCursor = false;
PC->bEnableClickEvents = false;
PC->bEnableMouseOverEvents = false;
PC->SetIgnoreLookInput(false);
bRotationEnabled = true;
PC->GetLocalPlayer()->ViewportClient->Viewport->GetMousePos(MouseCursorPosition);
}
void ATrackVizGameMode::OnRelease()
{
PC->bShowMouseCursor = true;
PC->bEnableClickEvents = true;
PC->bEnableMouseOverEvents = true;
PC->SetIgnoreLookInput(true);
bRotationEnabled = false;
}
void ATrackVizGameMode::OnPressedX()
{
if (bMarkerPossessed) {
PC->SetIgnoreMoveInput(false);
DefaultPawn->SetActorLocation(SavedDefaultPawnLocation);
PC->SetControlRotation(SavedControlRotation);
SetMarkersVisibility(true);
ShowTooltip();
}
}
void ATrackVizGameMode::Tick(float DeltaSeconds)
{
if (bRotationEnabled) {
APlayerController* PC = UGameplayStatics::GetPlayerController(GetWorld(), 0);
FViewport* viewport = PC->GetLocalPlayer()->ViewportClient->Viewport;
FVector2D ViewportSize;
PC->GetLocalPlayer()->ViewportClient->GetViewportSize(ViewportSize);
viewport->SetMouse(MouseCursorPosition.X, MouseCursorPosition.Y);
}
}
void ATrackVizGameMode::OnPressedMarker(AActor* actor, FKey key)
{
if (!bPawnsVisible) {
return;
}
const auto MarkerActor = dynamic_cast<AMarkerMeshActor*>(actor);
if (key == EKeys::LeftMouseButton) {
SavedDefaultPawnLocation = DefaultPawn->GetActorLocation();
SavedControlRotation = PC->GetControlRotation();
DefaultPawn->SetActorLocation(MarkerActor->GetActorLocation());
PC->SetControlRotation(MarkerActor->GetActorRotation());
PC->SetIgnoreMoveInput(true);
bMarkerPossessed = true;
SetMarkersVisibility(false);
GEngine->AddOnScreenDebugMessage(TrackRecords.Num(), 999999, FColor::White, "Press X to go back");
return;
}
if (key == EKeys::RightMouseButton) {
const FTrackRecord& MarkerTrackRecord = TrackRecords[MarkerActor->TrackIndex];
const FVector& MarkerPosition = MarkerTrackRecord.Positions[MarkerActor->PointIndex];
if (MarkerTrackRecord.RotatorsKnown) {
UTrackVizBPLibrary::DrawArrow(
this,
startPosition + MarkerPosition,
MarkerTrackRecord.Rotators[MarkerActor->PointIndex],
MarkerActor->Color,
true,
ArrowThickness
);
}
if (MarkerActor->TrackIndex != -1 && MarkerActor->PointIndex != -1) {
for (int OtherTrackIndex = 0; OtherTrackIndex < TrackRecords.Num(); ++OtherTrackIndex)
{
const FTrackRecord& OtherTrackRecord = TrackRecords[OtherTrackIndex];
if (OtherTrackIndex == MarkerActor->TrackIndex
|| OtherTrackRecord.Positions.Num() != MarkerTrackRecord.Positions.Num())
{
continue;
}
FVector from = MarkerPosition;
FVector to = OtherTrackRecord.Positions[MarkerActor->PointIndex];
UTrackVizBPLibrary::DrawLine(this, startPosition + from, startPosition + to, FColor(120, 120, 120), true, ConnectionThickness);
if (OtherTrackRecord.RotatorsKnown) {
UTrackVizBPLibrary::DrawArrow(
this,
startPosition + to,
OtherTrackRecord.Rotators[MarkerActor->PointIndex],
Colors[OtherTrackIndex],
true,
ArrowThickness
);
}
}
}
}
}
void ATrackVizGameMode::SetMarkersVisibility(bool visibility)
{
bPawnsVisible = visibility;
for (const AMarkerMeshActor* marker : Markers) {
TArray<UStaticMeshComponent*> Components;
marker->GetComponents<UStaticMeshComponent>(Components);
for (auto c : Components) {
c->SetVisibility(bPawnsVisible);
}
Components[0]->SetVisibility(bPawnsVisible);
}
}
void ATrackVizGameMode::ToggleMarkersVisibility()
{
SetMarkersVisibility(!bPawnsVisible);
}
void ATrackVizGameMode::ShowTooltip()
{
GEngine->AddOnScreenDebugMessage(
TrackRecords.Num(),
999999,
FColor::White,
"LMB to possess a point; RMB to match points between tracks with equal number of points and show track rotators; R to hide matches; Z to hide point markers"
);
}
| 33.772152 | 158 | 0.751749 | [
"mesh"
] |
65b598c5154c385bd44b591c296fe3514c139f2f | 807 | cpp | C++ | api/src/SAM_eqns.cpp | bje-/SAM | a52536b211c90a8e5fb15e4998212f313abcbfbe | [
"BSD-3-Clause"
] | 1 | 2021-04-27T23:06:44.000Z | 2021-04-27T23:06:44.000Z | api/src/SAM_eqns.cpp | bje-/SAM | a52536b211c90a8e5fb15e4998212f313abcbfbe | [
"BSD-3-Clause"
] | null | null | null | api/src/SAM_eqns.cpp | bje-/SAM | a52536b211c90a8e5fb15e4998212f313abcbfbe | [
"BSD-3-Clause"
] | 1 | 2021-09-15T11:15:24.000Z | 2021-09-15T11:15:24.000Z | #include <string>
#include <utility>
#include <vector>
#include <memory>
#include <iostream>
#include <ssc/sscapi.h>
#include <ssc/cmod_windpower_eqns.h>
#include <ssc/cmod_pvsamv1_eqns.h>
#include <ssc/cmod_merchantplant_eqns.h>
#include "SAM_api.h"
#include "SAM_eqns.h"
#include "ErrorHandler.h"
SAM_EXPORT void SAM_windpower_turbine_powercurve_eqn(ssc_data_t data, SAM_error* err){
translateExceptions(err, [&]{
Turbine_calculate_powercurve(data);
});
}
SAM_EXPORT void SAM_Reopt_size_battery_post_eqn(ssc_data_t data, SAM_error* err){
translateExceptions(err, [&]{
Reopt_size_battery_params(data);
});
}
SAM_EXPORT void SAM_mp_ancillary_services_eqn(ssc_data_t data, SAM_error* err){
translateExceptions(err, [&]{
mp_ancillary_services(data);
});
} | 24.454545 | 86 | 0.738538 | [
"vector"
] |
65c594294367a16f9e0337ea1fd4338682a39cf8 | 5,651 | hpp | C++ | include/fidstr/AprilTagGenerator.hpp | Humhu/FiducialStream | 51b534f64f030b685a78b3be734b6109a14c7279 | [
"AFL-3.0"
] | null | null | null | include/fidstr/AprilTagGenerator.hpp | Humhu/FiducialStream | 51b534f64f030b685a78b3be734b6109a14c7279 | [
"AFL-3.0"
] | null | null | null | include/fidstr/AprilTagGenerator.hpp | Humhu/FiducialStream | 51b534f64f030b685a78b3be734b6109a14c7279 | [
"AFL-3.0"
] | null | null | null | // Implementation for AprilTagGenerator
template <int N>
AprilTagGenerator<N>::AprilTagGenerator( unsigned int _minHammingDistance,
unsigned int _minComplexity,
unsigned long long _searchStride ) :
minHammingDistance( _minHammingDistance ),
minComplexity( _minComplexity ),
searchStride( _searchStride ),
threadReturns( 0 ),
threadDispatcher( 0 ) {}
template <int N>
std::vector<unsigned long long> AprilTagGenerator<N>::GenerateCodes( unsigned int numThreads ) {
unsigned long index = 0;
indStrideSize = numThreads;
boost::thread_group pool;
for( unsigned int i = 0; i < numThreads; i++ ) {
pool.create_thread( boost::bind( &AprilTagGenerator<N>::SearchThread, this, i ) );
}
startIndAssignments = std::vector<unsigned int>( numThreads );
while( true ) {
for( unsigned int i = 0; i < numThreads; i++ ) {
startIndAssignments[i] = index++;
}
latestIndex = 0;
// std::cout << "Dispatching threads..." << std::endl;
for( unsigned int i = 0; i < numThreads; i++ ) {
threadDispatcher.Increment();
}
// std::cout << "Waiting on threads to return..." << std::endl;
for( unsigned int i = 0; i < numThreads; i++ ) {
threadReturns.Decrement();
}
// std::cout << "Found code " << latestCode << " at index " << latestIndex << std::endl;
if( codes.size() % 100 == 0 ) {
std::cout << "Found " << codes.size() << " codes so far." << std::endl;
}
if( !resultFound ) {
pool.interrupt_all();
return codes;
}
resultFound = false;
codes.push_back( latestCode );
TagBits bits( latestCode );
TagMatrix mat = BitsToMatrix( bits );
TagMatrix rot1 = mat.transpose();
TagMatrix rot2 = rot1.transpose();
TagMatrix rot3 = rot2.transpose();
TagBits bits1 = MatrixToBits( rot1 );
TagBits bits2 = MatrixToBits( rot2 );
TagBits bits3 = MatrixToBits( rot3 );
rotatedCodes.push_back( latestCode );
rotatedCodes.push_back( bits1.to_ullong() );
rotatedCodes.push_back( bits2.to_ullong() );
rotatedCodes.push_back( bits3.to_ullong() );
index = latestIndex + 1;
}
pool.interrupt_all();
return codes;
}
template <int N>
typename AprilTagGenerator<N>::TagMatrix AprilTagGenerator<N>::BitsToMatrix( const TagBits& bits ) {
unsigned int index = 0;
TagMatrix matrix = TagMatrix::Zero();
for( int i = N-1; i >= 0 ; i-- ) {
for( int j = N-1; j >= 0; j-- ) {
matrix( i, j ) = bits[ index ] ? 1 : 0;
index++;
}
}
return matrix;
}
template <int N>
typename AprilTagGenerator<N>::TagBits AprilTagGenerator<N>::MatrixToBits( const TagMatrix& matrix ) {
unsigned int index = 0;
TagBits bits;
for( unsigned int i = N-1; i <= 0; i-- ) {
for( unsigned int j = N-1; j <= 0; j-- ) {
bits[ index ] = matrix( i, j );
}
}
return bits;
}
template <int N>
unsigned int AprilTagGenerator<N>::CalculateHammingDistance( TagCode code1, TagCode code2 ) {
// XOR finds positions where bits are different
TagCode difference = code1 ^ code2;
TagBits differentBits( difference );
// Hamming distance is simply number of different bits
return differentBits.count();
}
template <int N>
unsigned int AprilTagGenerator<N>::CalculateComplexity( TagCode code ) {
TagBits bits( code );
TagMatrix matrix = BitsToMatrix( bits );
Eigen::FullPivLU<TagMatrix> lu( matrix );
return lu.rank();
}
template <int N>
bool AprilTagGenerator<N>::CheckCode( TagCode code ) const {
unsigned int complexity = CalculateComplexity( code );
if( complexity < minComplexity ) {
return false;
}
TagBits bits( code );
TagMatrix mat = BitsToMatrix( bits );
TagMatrix rot1 = mat.transpose();
TagMatrix rot2 = rot1.transpose();
TagMatrix rot3 = rot2.transpose();
TagBits bits1 = MatrixToBits( rot1 );
TagBits bits2 = MatrixToBits( rot2 );
TagBits bits3 = MatrixToBits( rot3 );
unsigned int hamming1 = CalculateHammingDistance( code, bits1.to_ullong() );
unsigned int hamming2 = CalculateHammingDistance( code, bits2.to_ullong() );
unsigned int hamming3 = CalculateHammingDistance( code, bits3.to_ullong() );
if( hamming1 < minHammingDistance || hamming2 < minHammingDistance
|| hamming3 < minHammingDistance ) { return false; }
BOOST_FOREACH( TagCode rotatedCode, rotatedCodes ) {
unsigned int hamming = CalculateHammingDistance( code, rotatedCode );
if( hamming < minHammingDistance ) {
return false;
}
}
return true;
}
template <int N>
void AprilTagGenerator<N>::SearchThread( unsigned int threadID ) {
while( true ) {
threadDispatcher.Decrement(); // Block until dispatched
// This routine performs modular multiplication to avoid overflow
unsigned long query = 0;
unsigned long acc = searchStride;
unsigned int ind = startIndAssignments.at( threadID );
unsigned long bitmask = (1L << numBits) - 1;
while( ind > 0 ) {
if( (ind & 1) > 0 ) {
query += acc;
query &= bitmask;
}
acc *= 2;
acc &= bitmask;
ind = ind >> 1;
}
ind = startIndAssignments.at( threadID );
unsigned int prevInd = ind;
while( !ResultFound() ) {
if( CheckCode( query ) ) {
ReportResult( query, ind );
break;
}
query += indStrideSize*searchStride;
query &= bitmask;
ind += indStrideSize;
ind &= bitmask;
if( ind < prevInd ) {
break;
}
prevInd = ind;
}
threadReturns.Increment();
}
}
template <int N>
bool AprilTagGenerator<N>::ResultFound() const {
boost::shared_lock<Mutex> lock( mutex );
return resultFound;
}
template <int N>
void AprilTagGenerator<N>::ReportResult( TagCode code, unsigned int index ) {
boost::unique_lock<Mutex> lock( mutex );
if( index >= latestIndex ) {
resultFound = true;
latestCode = code;
latestIndex = index;
}
}
| 25.454955 | 102 | 0.672447 | [
"vector"
] |
65c728af12555a083c73279eaf11a6cc2dc678d7 | 24,151 | cpp | C++ | firmware/main/menus/wifi_menu.cpp | cmdc0de/LEDSensorClock | 80f57f0668024461ee9e9c6d72d9716c6f50c12f | [
"MIT"
] | null | null | null | firmware/main/menus/wifi_menu.cpp | cmdc0de/LEDSensorClock | 80f57f0668024461ee9e9c6d72d9716c6f50c12f | [
"MIT"
] | null | null | null | firmware/main/menus/wifi_menu.cpp | cmdc0de/LEDSensorClock | 80f57f0668024461ee9e9c6d72d9716c6f50c12f | [
"MIT"
] | null | null | null | #include "wifi_menu.h"
#include "../app.h"
#include "calibration_menu.h"
#include "gui_list_processor.h"
#include <app/display_message_state.h>
#include <esp_log.h>
#include <esp_event.h>
#include <esp_wifi.h>
#include "menu_state.h"
#include <math/rectbbox.h>
#include <cJSON.h>
#include <system.h>
#include <net/utilities.h>
#include <time.h>
#include "../config.h"
using libesp::ErrorType;
using libesp::BaseMenu;
using libesp::XPT2046;
using libesp::Point2Ds;
using libesp::TouchNotification;
using libesp::RGBColor;
using libesp::System;
const char *WiFiMenu::WIFIAPSSID = "LEDClockSensor";
const char *WiFiMenu::LOGTAG = "WIFIMENU";
const char *WiFiMenu::MENUHEADER = "Connection Log";
const char *WiFiMenu::WIFISID = "WIFISID";
const char *WiFiMenu::WIFIPASSWD = "WPASSWD";
const char *WiFiMenu::TZKEY = "TZKEY";
const char *WiFiMenu::CLKNAME = "My Sensor Clock";
static etl::vector<libesp::WiFiAPRecord,16> ScanResults;
static const uint32_t FILE_PATH_MAX = 128;
static const char *SettingArray[] = {
"SecondsOnMainScreen"
, "SecondsInGameOfLife"
, "SecondsIn3D"
, "SecondsShowingDrawings"
};
static const int SettingArrayDefault[] = {300,300,300,120};
static const uint32_t SettingArraySize = (sizeof(SettingArray)/sizeof(SettingArray[0]));
void time_sync_cb(struct timeval *tv) {
ESP_LOGI(WiFiMenu::LOGTAG, "Notification of a time synchronization event");
}
struct RequestContextInfo {
enum HandlerType {
ROOT
, SCAN
, SET_CON_DATA
, CALIBRATION
, RESET_CALIBRATION
, SYSTEM_INFO
, GET_TZ
, SET_TZ
, GET_SETTINGS
, SET_SETTINGS
};
HandlerType HType;
RequestContextInfo(const HandlerType &ht) : HType(ht) {}
esp_err_t go(httpd_req_t *r) {
switch(HType) {
case ROOT:
return MyApp::get().getWiFiMenu()->handleRoot(r);
break;
case SCAN:
return MyApp::get().getWiFiMenu()->handleScan(r);
break;
break;
case SET_CON_DATA:
return MyApp::get().getWiFiMenu()->handleSetConData(r);
break;
case CALIBRATION:
return MyApp::get().getWiFiMenu()->handleCalibration(r);
break;
case RESET_CALIBRATION:
return MyApp::get().getWiFiMenu()->handleResetCalibration(r);
break;
case SYSTEM_INFO:
return MyApp::get().getWiFiMenu()->handleSystemInfo(r);
break;
case GET_TZ:
return MyApp::get().getWiFiMenu()->handleGetTZ(r);
break;
case SET_TZ:
return MyApp::get().getWiFiMenu()->handleSetTZ(r);
break;
case GET_SETTINGS:
return MyApp::get().getWiFiMenu()->handleGetSettings(r);
break;
case SET_SETTINGS:
return MyApp::get().getWiFiMenu()->handleSetSettings(r);
break;
default:
return ESP_OK;
break;
}
}
};
static RequestContextInfo RootCtx(RequestContextInfo::HandlerType::ROOT);
static RequestContextInfo ScanCtx(RequestContextInfo::HandlerType::SCAN);
static RequestContextInfo SetConCtx(RequestContextInfo::HandlerType::SET_CON_DATA);
static RequestContextInfo CalibrationCtx(RequestContextInfo::HandlerType::CALIBRATION);
static RequestContextInfo ResetCalCtx(RequestContextInfo::HandlerType::RESET_CALIBRATION);
static RequestContextInfo SystemInfoCtx(RequestContextInfo::HandlerType::SYSTEM_INFO);
static RequestContextInfo GetTZCtx(RequestContextInfo::HandlerType::GET_TZ);
static RequestContextInfo SetTZCtx(RequestContextInfo::HandlerType::SET_TZ);
static RequestContextInfo GetSettingsCtx(RequestContextInfo::HandlerType::GET_SETTINGS);
static RequestContextInfo SetSettingsCtx(RequestContextInfo::HandlerType::SET_SETTINGS);
static esp_err_t http_handler(httpd_req_t *req) {
RequestContextInfo *rci = reinterpret_cast<RequestContextInfo *>(req->user_ctx);
return rci->go(req);
}
#define CHECK_FILE_EXTENSION(filename, ext) (strcasecmp(&filename[strlen(filename) - strlen(ext)], ext) == 0)
void WiFiMenu::setContentTypeFromFile(httpd_req_t *req, const char *filepath) {
const char *type = "text/plain";
if (CHECK_FILE_EXTENSION(filepath, ".html")) {
type = "text/html";
} else if (CHECK_FILE_EXTENSION(filepath, ".js")) {
type = "application/javascript";
} else if (CHECK_FILE_EXTENSION(filepath, ".css")) {
type = "text/css";
} else if (CHECK_FILE_EXTENSION(filepath, ".png")) {
type = "image/png";
} else if (CHECK_FILE_EXTENSION(filepath, ".ico")) {
type = "image/x-icon";
} else if (CHECK_FILE_EXTENSION(filepath, ".svg")) {
type = "text/xml";
}
ESP_LOGI(LOGTAG, "Contet Type set to %s", type);
httpd_resp_set_type(req, type);
}
esp_err_t WiFiMenu::readHttp(httpd_req_t *req, char *buf, uint32_t bufLen) {
int total_len = req->content_len;
int cur_len = 0;
int received = 0;
if (total_len >= bufLen) {
ESP_LOGE(LOGTAG,"content too long");
return ESP_FAIL;
}
while (cur_len < total_len) {
received = httpd_req_recv(req, buf + cur_len, total_len);
if (received <= 0) {
ESP_LOGE(LOGTAG,"Failed to post control value");
return ESP_FAIL;
}
cur_len += received;
}
buf[total_len] = '\0';
return ESP_OK;
}
esp_err_t WiFiMenu::handleSetSettings(httpd_req_t *req) {
ESP_LOGI(LOGTAG,"handleSetSettings");
ErrorType et = ESP_OK;
char buf[128];
et = readHttp(req, &buf[0], sizeof(buf));
if(et.ok()) {
ESP_LOGI(LOGTAG,"before decode: %s", &buf[0]);
char decodeBuf[128];
urlDecode(&buf[0], &decodeBuf[0], sizeof(decodeBuf));
ESP_LOGI(LOGTAG,"after decode: %s", &decodeBuf[0]);
char Name[64] = {'\0'};
char strValue[16] = {'\0'};
int32_t value = 0;
if(ESP_OK==httpd_query_key_value(&decodeBuf[0],"name", &Name[0], sizeof(Name) )) {
if(ESP_OK==httpd_query_key_value(&decodeBuf[0],"value", &strValue[0], sizeof(strValue) )) {
et = MyApp::get().getConfig().setSetting(&Name[0],&strValue[0]);
if(et.ok()) {
static const char *pageData = "<html><head><title>Set Setting</title><meta http-equiv=\"refresh\" content=\"5;URL='/setting'\"/></head><body><p>Setting Saved Successfully</p></body></html>";
httpd_resp_sendstr(req, pageData);
} else {
ESP_LOGI(LOGTAG,"failed to save setting %s with value %d", &Name[0], value);
}
} else {
httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "value");
}
} else {
httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "name");
}
} else {
/* Respond with 500 Internal Server Error */
httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed read data");
}
return et.getErrT();
}
esp_err_t WiFiMenu::handleGetSettings(httpd_req_t *req) {
cJSON *root = cJSON_CreateArray();
MyApp::get().getConfig().getAllSettings(root);
const char *info = cJSON_Print(root);
ESP_LOGI(LOGTAG, "%s", info);
httpd_resp_sendstr(req, info);
free((void *)info);
cJSON_Delete(root);
return ESP_OK;
}
esp_err_t WiFiMenu::handleRoot(httpd_req_t *req) {
ESP_LOGI(LOGTAG, "HANDLE ROOT");
char filepath[FILE_PATH_MAX];
strlcpy(filepath, "/www", sizeof(filepath));
if (req->uri[strlen(req->uri) - 1] == '/') {
strlcat(filepath, "/index.html", sizeof(filepath));
} else {
strlcat(filepath, req->uri, sizeof(filepath));
}
int fd = open(filepath, O_RDONLY, 0);
if (fd == -1) {
ESP_LOGE(LOGTAG, "Failed to open file : %s", filepath);
/* Respond with 500 Internal Server Error */
httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed to read existing file");
return ESP_FAIL;
} else {
ESP_LOGI(LOGTAG, "File opened %s", filepath);
}
setContentTypeFromFile(req, filepath);
char scratchBuffer[1024];
char *chunk = &scratchBuffer[0];
ssize_t read_bytes;
do {
/* Read file in chunks into the scratch buffer */
read_bytes = read(fd, chunk, sizeof(scratchBuffer));
if (read_bytes == -1) {
ESP_LOGE(LOGTAG, "Failed to read file : %s", filepath);
} else if (read_bytes > 0) {
/* Send the buffer contents as HTTP response chunk */
if (httpd_resp_send_chunk(req, chunk, read_bytes) != ESP_OK) {
close(fd);
ESP_LOGE(LOGTAG, "File sending failed!");
/* Abort sending file */
httpd_resp_sendstr_chunk(req, NULL);
/* Respond with 500 Internal Server Error */
httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed to send file");
return ESP_FAIL;
}
}
} while (read_bytes > 0);
/* Close file after sending complete */
close(fd);
ESP_LOGI(LOGTAG, "File sending complete");
/* Respond with an empty chunk to signal HTTP response completion */
httpd_resp_send_chunk(req, NULL, 0);
return ESP_OK;
}
WiFiMenu::WiFiMenu() : WiFiEventHandler(), MyWiFi()
, NTPTime(), SSID(), Password(), Flags(0), ReTryCount(0), WebServer(), TimeZone() {
memset(&TimeZone[0],0,sizeof(TimeZone));
strcpy(&TimeZone[0],"Etc/GMT");
}
ErrorType WiFiMenu::hasWiFiBeenSetup() {
ESP_LOGI(LOGTAG,"hasWiFiBeenSetup");
char data[128] = {'\0'};
uint32_t len = sizeof(data);
ErrorType et = MyApp::get().getNVS().getValue(WIFISID, &data[0], len);
if(et.ok()) {
SSID = data;
len = sizeof(data);
et = MyApp::get().getNVS().getValue(WIFIPASSWD, &data[0], len);
if(et.ok()) {
Password = &data[0];
ESP_LOGI(LOGTAG, "ssid %s: pass: %s", SSID.c_str(), Password.c_str());
} else {
ESP_LOGI(LOGTAG, "error getting password: %u %d %s", len, et.getErrT(), et.toString());
}
} else {
ESP_LOGI(LOGTAG,"failed to load wifisid: %u %d %s", len, et.getErrT(), et.toString());
}
return et;
}
ErrorType WiFiMenu::setWiFiConnectionData(const char *ssid, const char *pass) {
ESP_LOGI(LOGTAG,"con data %s %s", ssid,pass);
libesp::NVSStackCommit nvssc(&MyApp::get().getNVS());
ErrorType et = MyApp::get().getNVS().setValue(WIFISID, ssid);
if(et.ok()) {
et = MyApp::get().getNVS().setValue(WIFIPASSWD,pass);
}
return et;
}
ErrorType WiFiMenu::clearConnectData() {
libesp::NVSStackCommit nvssc(&MyApp::get().getNVS());
ErrorType et = MyApp::get().getNVS().eraseKey(WIFISID);
if(!et.ok()) {
ESP_LOGI(LOGTAG,"failed to erase key ssid: %d %s", et.getErrT(), et.toString());
}
et = MyApp::get().getNVS().eraseKey(WIFIPASSWD);
if(!et.ok()) {
ESP_LOGI(LOGTAG,"failed to erase key password: %d %s", et.getErrT(), et.toString());
}
if(et.ok()) {
ESP_LOGI(LOGTAG, "connection data cleared from NVS storage!");
}
return et;
}
void WiFiMenu::setTZ() {
setenv("TZ", &TimeZone[0], 1);
tzset();
ESP_LOGI(LOGTAG,"Timezone set to: %s", &TimeZone[0]);
}
ErrorType WiFiMenu::initWiFi() {
MyWiFi.setWifiEventHandler(this);
ErrorType et = MyWiFi.init(WIFI_MODE_APSTA);
if(et.ok()) {
et = NTPTime.init(MyApp::get().getNVS(),true,time_sync_cb);
if(et.ok()) {
extern const unsigned char cacert_pem_start[] asm("_binary_cacert_pem_start");
extern const unsigned char cacert_pem_end[] asm("_binary_cacert_pem_end");
extern const unsigned char prvtkey_pem_start[] asm("_binary_prvtkey_pem_start");
extern const unsigned char prvtkey_pem_end[] asm("_binary_prvtkey_pem_end");
et = WebServer.init(cacert_pem_start, (cacert_pem_end-cacert_pem_start), prvtkey_pem_start, (prvtkey_pem_end-prvtkey_pem_start));
}
}
uint32_t len = sizeof(TimeZone);
et = MyApp::get().getNVS().getValue(TZKEY, &TimeZone[0], len);
if(!et.ok()) {
strcpy(&TimeZone[0],"Etc/GMT");
ESP_LOGI(LOGTAG,"Timezone not set, defaulting to %s", &TimeZone[0]);
} else {
ESP_LOGI(LOGTAG,"Timezone loaded: %s", &TimeZone[0]);
}
setTZ();
return et;
}
ErrorType WiFiMenu::connect() {
ErrorType et = MyWiFi.connect(SSID,Password,WIFI_AUTH_OPEN);
if(et.ok()) {
Flags|=CONNECTING;
}
return et;
}
bool WiFiMenu::isConnected() {
return (Flags&CONNECTED)!=0;
}
WiFiMenu::~WiFiMenu() {
}
ErrorType WiFiMenu::startAP() {
return MyWiFi.startAP(WIFIAPSSID, ""); //start AP
}
bool WiFiMenu::stopAP() {
return MyWiFi.stopWiFi();
}
esp_err_t WiFiMenu::handleScan(httpd_req_t *req) {
ESP_LOGI(LOGTAG,"handleScan");
httpd_resp_set_type(req, "application/json");
cJSON *root = cJSON_CreateArray();
ErrorType et = MyWiFi.scan(ScanResults,false);
for(uint32_t i = 0;i<ScanResults.size();++i) {
cJSON *sr = cJSON_CreateObject();
cJSON_AddNumberToObject(sr, "id", i);
cJSON_AddStringToObject(sr, "ssid", ScanResults[i].getSSID().c_str());
cJSON_AddNumberToObject(sr, "rssi", ScanResults[i].getRSSI());
cJSON_AddNumberToObject(sr, "channel", ScanResults[i].getPrimary());
cJSON_AddStringToObject(sr, "authMode", ScanResults[i].getAuthModeString());
cJSON_AddItemToArray(root,sr);
}
const char *info = cJSON_Print(root);
ESP_LOGI(LOGTAG, "%s", info);
httpd_resp_sendstr(req, info);
free((void *)info);
cJSON_Delete(root);
return et.getErrT();
}
esp_err_t WiFiMenu::handleSetConData(httpd_req_t *req) {
ESP_LOGI(LOGTAG,"handleSetConData");
ErrorType et = ESP_OK;
char buf[128];
et = readHttp(req, buf, sizeof(buf));
if(et.ok()) {
ESP_LOGI(LOGTAG,"before decode: %s", &buf[0]);
char decodeBuf[128];
urlDecode(&buf[0], &decodeBuf[0], sizeof(decodeBuf));
ESP_LOGI(LOGTAG,"after decode: %s", &decodeBuf[0]);
char idVal[8] = {'\0'};
int id = -1;
char pass[64] = {'\0'};
if((et=httpd_query_key_value(&decodeBuf[0],"id", &idVal[0], sizeof(idVal))).ok()) {
id = atoi(&idVal[0]);
if((et=httpd_query_key_value(&decodeBuf[0],"password", &pass[0], sizeof(pass))).ok()) {
et = setWiFiConnectionData(ScanResults[id].getSSID().c_str(), &pass[0]);
if(et.ok()) {
static const char *pageData = "<html><head><title>TZ Set</title><meta http-equiv=\"refresh\" content=\"5;URL='/index.html'\"/></head><body><p>Connect Data Saved Successfully</p></body></html>";
httpd_resp_sendstr(req, pageData);
}
} else {
httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "invalid ID");
}
} else {
httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "invalid ID");
}
} else {
/* Respond with 500 Internal Server Error */
httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed to read");
}
return et.getErrT();
}
esp_err_t WiFiMenu::handleCalibration(httpd_req_t *req) {
esp_err_t et = ESP_OK;
httpd_resp_set_type(req, "application/json");
cJSON *root = cJSON_CreateObject();
MyApp::get().getCalibrationMenu()->calibrationData(root);
const char *info = cJSON_Print(root);
ESP_LOGI(LOGTAG, "%s", info);
httpd_resp_sendstr(req, info);
free((void *)info);
cJSON_Delete(root);
return et;
}
esp_err_t WiFiMenu::handleResetCalibration(httpd_req_t *req) {
esp_err_t et = ESP_OK;
MyApp::get().getCalibrationMenu()->eraseCalibration();
httpd_resp_set_type(req, "text/html");
const char *info = "<html><body><div><h2>ESP 32 is rebooting and will enter touch calibration mode</h2></div></body></html>";
httpd_resp_sendstr(req, info);
vTaskDelay(1000 / portTICK_RATE_MS);
libesp::System::get().restart();
return et;
}
esp_err_t WiFiMenu::handleGetTZ(httpd_req_t *req) {
httpd_resp_set_type(req, "application/json");
uint32_t len = sizeof(TimeZone);
ErrorType et = MyApp::get().getNVS().getValue(TZKEY, &TimeZone[0], len);
if(!et.ok()) {
strcpy(&TimeZone[0],"Etc/GMT");
}
cJSON *root = cJSON_CreateObject();
cJSON_AddStringToObject(root, "TZ", &TimeZone[0]);
const char *info = cJSON_Print(root);
httpd_resp_sendstr(req, info);
free((void *)info);
cJSON_Delete(root);
return ESP_OK;
}
esp_err_t WiFiMenu::handleSetTZ(httpd_req_t *req) {
ESP_LOGI(LOGTAG,"handleSetTZ");
ErrorType et = ESP_OK;
char buf[128];
et = readHttp(req, buf, sizeof(buf));
if(et.ok()) {
ESP_LOGI(LOGTAG,"Posted JSON: %s", &buf[0]);
cJSON *root = cJSON_Parse(&buf[0]);
int offset = cJSON_GetObjectItem(root,"offset")->valueint;
offset*=-1;//not sure why I have to do this??? AZ is UTC - 7 but must be set as UTC+7
sprintf(&TimeZone[0],"UTC%d",offset);
et = MyApp::get().getNVS().setValue(TZKEY, &TimeZone[0]);
cJSON_Delete(root);
if(et.ok()) {
setTZ();
static const char *pageData = "{result: 'ok'}";
httpd_resp_sendstr(req, pageData);
} else {
httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "failed to save TimeZone");
}
} else {
/* Respond with 500 Internal Server Error */
httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed to read");
}
return et.getErrT();
}
esp_err_t WiFiMenu::handleSystemInfo(httpd_req_t *req) {
ESP_LOGI(LOGTAG,"handleSystemInfo");
httpd_resp_set_type(req, "application/json");
esp_chip_info_t ChipInfo;
esp_chip_info(&ChipInfo);
cJSON *root = cJSON_CreateObject();
cJSON_AddNumberToObject(root, "Free HeapSize", System::get().getFreeHeapSize());
cJSON_AddNumberToObject(root, "Free Min HeapSize",System::get().getMinimumFreeHeapSize());
cJSON_AddNumberToObject(root, "Free 32 Bit HeapSize",heap_caps_get_free_size(MALLOC_CAP_32BIT));
cJSON_AddNumberToObject(root, "Free 32 Bit Min HeapSize",heap_caps_get_minimum_free_size(MALLOC_CAP_32BIT));
cJSON_AddNumberToObject(root, "Free DMA HeapSize",heap_caps_get_free_size(MALLOC_CAP_DMA));
cJSON_AddNumberToObject(root, "Free DMA Min HeapSize",heap_caps_get_minimum_free_size(MALLOC_CAP_DMA));
cJSON_AddNumberToObject(root, "Free Internal HeapSize",heap_caps_get_free_size(MALLOC_CAP_INTERNAL));
cJSON_AddNumberToObject(root, "Free Internal Min HeapSize",heap_caps_get_minimum_free_size(MALLOC_CAP_INTERNAL));
cJSON_AddNumberToObject(root, "Free Default HeapSize",heap_caps_get_free_size(MALLOC_CAP_DEFAULT));
cJSON_AddNumberToObject(root, "Free Default Min HeapSize",heap_caps_get_minimum_free_size(MALLOC_CAP_DEFAULT));
cJSON_AddNumberToObject(root, "Free Exec",heap_caps_get_free_size(MALLOC_CAP_EXEC));
cJSON_AddNumberToObject(root, "Free Exec Min",heap_caps_get_minimum_free_size(MALLOC_CAP_EXEC));
cJSON_AddNumberToObject(root, "Model", ChipInfo.model);
cJSON_AddNumberToObject(root, "Features", ChipInfo.features);
cJSON_AddNumberToObject(root, "EMB_FLASH", (ChipInfo.features&CHIP_FEATURE_EMB_FLASH)!=0);
cJSON_AddNumberToObject(root, "WIFI_BGN", (ChipInfo.features&CHIP_FEATURE_WIFI_BGN)!=0);
cJSON_AddNumberToObject(root, "BLE", (ChipInfo.features&CHIP_FEATURE_BLE)!=0);
cJSON_AddNumberToObject(root, "BT", (ChipInfo.features&CHIP_FEATURE_BT)!=0);
cJSON_AddNumberToObject(root, "Cores", (int)ChipInfo.cores);
cJSON_AddNumberToObject(root, "Revision", (int)ChipInfo.revision);
cJSON_AddStringToObject(root, "IDF Version", ::esp_get_idf_version());
const char *sys_info = cJSON_Print(root);
httpd_resp_sendstr(req, sys_info);
free((void *)sys_info);
cJSON_Delete(root);
return ESP_OK;
}
// wifi handler
ErrorType WiFiMenu::staStart() {
ErrorType et;
//ESP_LOGI(LOGTAG, __PRETTY_FUNCTION__ );
return et;
}
ErrorType WiFiMenu::staStop() {
ErrorType et;
//ESP_LOGI(LOGTAG,__FUNCTION__);
return et;
}
ErrorType WiFiMenu::wifiReady() {
ErrorType et;
//ESP_LOGI(LOGTAG,__FUNCTION__);
Flags|=WIFI_READY;
return et;
}
ErrorType WiFiMenu::apStaConnected(wifi_event_ap_staconnected_t *info) {
ErrorType et;
Flags|=CONNECTED;
Flags=(Flags&~CONNECTING);
ESP_LOGI(LOGTAG,"apstaConnected");
return et;
}
ErrorType WiFiMenu::apStaDisconnected(wifi_event_ap_stadisconnected_t *info) {
ErrorType et;
Flags=(Flags&~(CONNECTED|HAS_IP));
ESP_LOGI(LOGTAG,"apstaDisconnected");
NTPTime.stop();
if(++ReTryCount<MAX_RETRY_CONNECT_COUNT) {
return connect();
}
return ErrorType(ErrorType::MAX_RETRIES);
}
const httpd_uri_t scan = {
.uri = "/wifiscan",
.method = HTTP_GET,
.handler = http_handler,
.user_ctx = &ScanCtx
};
const httpd_uri_t conData = {
.uri = "/setcon",
.method = HTTP_POST,
.handler = http_handler,
.user_ctx = &SetConCtx
};
const httpd_uri_t cal = {
.uri = "/calibration",
.method = HTTP_GET,
.handler = http_handler,
.user_ctx = &CalibrationCtx
};
const httpd_uri_t resetcal = {
.uri = "/resetcal",
.method = HTTP_POST,
.handler = http_handler,
.user_ctx = &ResetCalCtx
};
const httpd_uri_t SysInfo = {
.uri = "/systeminfo",
.method = HTTP_GET,
.handler = http_handler,
.user_ctx = &SystemInfoCtx
};
const httpd_uri_t GetTZURI = {
.uri = "/tz",
.method = HTTP_GET,
.handler = http_handler,
.user_ctx = &GetTZCtx
};
const httpd_uri_t SetTZURI = {
.uri = "/settz",
.method = HTTP_POST,
.handler = http_handler,
.user_ctx = &SetTZCtx
};
const httpd_uri_t GetSettings = {
.uri = "/settings",
.method = HTTP_GET,
.handler = http_handler,
.user_ctx = &GetSettingsCtx
};
const httpd_uri_t SetSettings = {
.uri = "/setsetting",
.method = HTTP_POST,
.handler = http_handler,
.user_ctx = &SetSettingsCtx
};
static const httpd_uri_t root = {
.uri = "/",
.method = HTTP_GET,
.handler = http_handler,
.user_ctx = &RootCtx
};
static const httpd_uri_t st = {
.uri = "/static/*",
.method = HTTP_GET,
.handler = http_handler,
.user_ctx = &RootCtx
};
ErrorType WiFiMenu::apStart() {
ErrorType et;
Flags|=AP_START;
ESP_LOGI(LOGTAG,"AP Started");
et = WebServer.start();
if(et.ok()) {
et = WebServer.registerHandle(scan);
if(et.ok()) et = WebServer.registerHandle(conData);
else ESP_LOGI(LOGTAG,"registering handle: %d: %s", et.getErrT(), et.toString());
if(et.ok()) et = WebServer.registerHandle(cal);
else ESP_LOGI(LOGTAG,"registering handle: %d: %s", et.getErrT(), et.toString());
if(et.ok()) et = WebServer.registerHandle(resetcal);
else ESP_LOGI(LOGTAG,"registering handle: %d: %s", et.getErrT(), et.toString());
if(et.ok()) et = WebServer.registerHandle(SysInfo);
else ESP_LOGI(LOGTAG,"registering handle: %d: %s", et.getErrT(), et.toString());
if(et.ok()) et = WebServer.registerHandle(GetTZURI);
else ESP_LOGI(LOGTAG,"registering handle: %d: %s", et.getErrT(), et.toString());
if(et.ok()) et = WebServer.registerHandle(SetTZURI);
else ESP_LOGI(LOGTAG,"registering handle: %d: %s", et.getErrT(), et.toString());
if(et.ok()) et = WebServer.registerHandle(GetSettings);
else ESP_LOGI(LOGTAG,"registering handle: %d: %s", et.getErrT(), et.toString());
if(et.ok()) et = WebServer.registerHandle(SetSettings);
else ESP_LOGI(LOGTAG,"registering handle: %d: %s", et.getErrT(), et.toString());
if(et.ok()) et = WebServer.registerHandle(root);
else ESP_LOGI(LOGTAG,"registering handle: %d: %s", et.getErrT(), et.toString());
if(et.ok()) et = WebServer.registerHandle(st);
else ESP_LOGI(LOGTAG,"registering handle: %d: %s", et.getErrT(), et.toString());
} else {
ESP_LOGI(LOGTAG,"Error starting web server: %d: %s", et.getErrT(), et.toString());
}
return et;
}
ErrorType WiFiMenu::apStop() {
ErrorType et;
Flags=Flags&~AP_START;
ESP_LOGI(LOGTAG,"AP Stopped");
//stop web server
return et;
}
ErrorType WiFiMenu::staConnected(system_event_sta_connected_t *info) {
ErrorType et;
Flags|=CONNECTED;
Flags=(Flags&~CONNECTING);
ReTryCount = 0;
ESP_LOGI(LOGTAG,"staConnected");
return et;
}
ErrorType WiFiMenu::staDisconnected(system_event_sta_disconnected_t *info) {
ESP_LOGI(LOGTAG,"staDisconnected");
Flags=(Flags&~(CONNECTED|HAS_IP));
NTPTime.stop();
if(++ReTryCount<MAX_RETRY_CONNECT_COUNT) {
return connect();
}
return ErrorType(ErrorType::MAX_RETRIES);
}
ErrorType WiFiMenu::staGotIp(system_event_sta_got_ip_t *info) {
ErrorType et;
ESP_LOGI(LOGTAG,"Have IP");
Flags|=HAS_IP;
ReTryCount = 0;
NTPTime.start();
return et;
}
ErrorType WiFiMenu::staScanDone(system_event_sta_scan_done_t *info) {
ErrorType et;
ESP_LOGI(LOGTAG,"Scan Complete");
Flags|=SCAN_COMPLETE;
return et;
}
ErrorType WiFiMenu::staAuthChange(system_event_sta_authmode_change_t *info) {
ErrorType et;
//ESP_LOGI(LOGTAG,__FUNCTION__);
return et;
}
| 33.083562 | 204 | 0.681918 | [
"vector",
"model"
] |
65cd2f60da1a5e69a3da568c859aa009d73bcd8c | 8,108 | hh | C++ | DdsJs/DomainParticipantWrap.hh | rjnieves/DdsJs | 90939e43b2f62d908b1f43dc61dc4fa54ba4c1e4 | [
"Apache-2.0"
] | 1 | 2019-11-13T01:22:39.000Z | 2019-11-13T01:22:39.000Z | DdsJs/DomainParticipantWrap.hh | rjnieves/DdsJs | 90939e43b2f62d908b1f43dc61dc4fa54ba4c1e4 | [
"Apache-2.0"
] | null | null | null | DdsJs/DomainParticipantWrap.hh | rjnieves/DdsJs | 90939e43b2f62d908b1f43dc61dc4fa54ba4c1e4 | [
"Apache-2.0"
] | 2 | 2019-11-04T01:54:10.000Z | 2019-11-12T20:03:47.000Z | /**
* \file DomainParticipantWrap.hh
* \brief Contains the definition of the \c DomainParticipantWrap class.
* \author Rolando J. Nieves
* \date 2014-07-28 16:02:00
*/
#ifndef _DOMAIN_PARTICIPANT_WRAP_HH_
#define _DOMAIN_PARTICIPANT_WRAP_HH_
#include <node.h>
#include <node_object_wrap.h>
#include <DdsJs/dds_provider.h>
namespace DdsJs {
/**
* \brief Wrap the \c DDS::DomainParticipant class for Node.js
*
* The \c DomainParticipantWrap class is used to create a JavaScript object
* prototype and host the appropriate behavior of object instances that
* eventually utilize the \c DDS::DomainParticipant class provided by
* CoreDX.
*/
class DomainParticipantWrap : public node::ObjectWrap
{
public:
/**
* Class-wide constructor function used by Node.js when a new instance of
* this \c DDS::DomainParticpant wrapper is created.
*/
static v8::Persistent<v8::Function> constructor;
/**
* \brief Initialize the prototype used to create \c DomainParticipant instances in JavaScript.
*
* The \c Init() class method creates a new JavaScript object prototype
* that will later be used by Node.js to create instances of objects
* whose behavior is defined by \c DDS::DomainParticipant, via this
* class.
*
* \param exports {inout} Contains the created \c DomainParticipant prototype as an
* exported object.
*/
static void Init(v8::Local<v8::Object> exports);
private:
/**
* Reference to the actual C++ \c DDS::DomainParticipant instance.
*/
DDS::DomainParticipant *m_theParticipant;
/**
* \brief Initialize all instance fields.
*
* The default constructor for the \c DomainParticipantWrap class is not meant to
* be called externally, hence it is protected.
*/
DomainParticipantWrap();
/**
* \brief Reset all instance fields.
*
* The destructor for the \c DomainParticipantWrap class is not meant to be called
* externally (i.e., only \c DomainParticipantWrap is allowed to create and
* destroy \c DomainParticipantWrap instances), hence it is protected.
*/
virtual ~DomainParticipantWrap();
/**
* \brief Create a new \c DomainParticipant instance.
*
* The \c New() method is called by Node.js when a JavaScript script
* creates a new instance of the JavaScript class prototype created by this
* object wrapper in the \c Init() class method.
*
* \param args {in} Contains the arguments included in the JavaScript
* \c new invocation.
*/
static void New(v8::FunctionCallbackInfo<v8::Value> const& args);
/**
* \brief Wrap the \c DDS::DomainParticipant::create_publisher() C++ call
*
* The \c CreatePublisher() class method is called whenever a Node.js
* JavaScript script calls the \c createPublisher() method in an object
* instance created by this class' \c New() class method.
*
* \param args {in} Contains the arguments provided in the JavaScript
* method call.
*/
static void CreatePublisher(v8::FunctionCallbackInfo<v8::Value> const& args);
/**
* \brief Wrap the \c DDS::DomainParticipant::create_subscriber() C++ call
*
* The \c CreateSubscriber() class method is called whenever a Node.js
* JavaScript script calls the \c createSubscriber() method in an object
* instance created by this class' \c New() class method.
*
* \param args {in} Contains the arguments provided in the JavaScript
* method call.
*/
static void CreateSubscriber(v8::FunctionCallbackInfo<v8::Value> const& args);
/**
* \brief Wrap the \c DDS::DomainParticipant::create_topic() C++ call
*
* The \c CreateTopic() class method is called whenever a Node.js
* JavaScript script calls the \c createTopic() method in an object
* instance created by this class' \c New() class method.
*
* \param args {in} Contains the arguments provided in the JavaScript
* method call.
*/
static void CreateTopic(v8::FunctionCallbackInfo<v8::Value> const& args);
/**
* \brief Wrap the \c DDS::DomainParticipant::get_discovered_participants() C++ call
*
* The \c GetDiscoveredParticipants() class method is called whenever a Node.js
* JavaScript script calls the \c getDiscoveredParticipants() method in an object
* instance created by this class' \c New() class method.
*
* \param args {in} Contains the arguments provided in the JavaScript
* method call.
*/
static void GetDiscoveredParticipants(v8::FunctionCallbackInfo<v8::Value> const& args);
/**
* \brief Wrap the \c DDS::DomainParticipant::get_discoverd_participant_data() C++ call
*
* The \c GetDiscoveredParticipantData() class method is called whenever a Node.js
* JavaScript script calls the \c getDiscoveredParticipantData() method in an object
* instance created by this class' \c New() class method.
*
* \param args {in} Contains the arguments provided in the JavaScript
* method call.
*/
static void GetDiscoveredParticipantData(v8::FunctionCallbackInfo<v8::Value> const& args);
/**
* \brief Convert discovered participant data into participant name and IP address.
*
* The \c GetDiscoveredParticipantNameAndIp() class method is called whenever a Node.js
* JavaScript script calls the \c getDiscoveredParticipantNameAndIp() method in an object
* instance created by this class' \c New() class method.
*
* \param args {in} Contains the arguments provided in the JavaScript
* method call.
*/
static void GetDiscoveredParticipantNameAndIp(v8::FunctionCallbackInfo<v8::Value> const& args);
/**
* \brief Wrap the \c DDS::DomainParticipant::delete_contained_entities() C++ call
*
* The \c DeleteContainedEntities() class method is called whenever a Node.js
* JavaScript script calls the \c deleteContainedEntities() method in an object
* instance created by this class' \c New() class method.
*
* \param args {in} Contains the arguments provided in the JavaScript
* method call.
*/
static void DeleteContainedEntities(v8::FunctionCallbackInfo<v8::Value> const& args);
/**
* \brief Wrap the \c DDS::DomainParticipant::enable() C++ call
*
* The \c Enable() class method is called whenever a Node.js JavaScript
* script calls the \c enable() method in an object instance created by
* this class' \c New() class method.
*
* \param args {in} Contains the arguments provided in the JavaScript
* method call.
*/
static void Enable(v8::FunctionCallbackInfo< v8::Value > const& args);
/**
* \brief Wrap the \c DDS::DomainParticipant::get_instance_handle() C++ call
*
* The \c GetInstanceHandle() class method is called whenever a Node.js
* JavaScript script calls the \c getInstanceHandle() method in an object
* instance created by this class' \c New() class method.
*
* \param args {in} Contains the arguments provided in the JavaScript
* method call.
*/
static void GetInstanceHandle(v8::FunctionCallbackInfo< v8::Value > const& args);
/**
* \brief Wrap the \c DDS::DomainParticipant::ignore_participant() C++ call
*
* The \c IgnoreParticipant() class method is called whenever a Node.js
* JavaScript script calls the \c ignoreParticipant() method in an object
* instance created by this class' \c New() class method.
*
* \param args {in} Contains the arguments provided in the JavaScript
* method call.
*/
static void IgnoreParticipant(v8::FunctionCallbackInfo< v8::Value > const& args);
};
} // end namespace DdsJs
#endif /* _DOMAIN_PARTICIPANT_WRAP_HH_ */
| 39.359223 | 99 | 0.660335 | [
"object"
] |
65cde1b16a48e5316bfb63c9851b9654f9efbcb4 | 3,960 | cpp | C++ | source/engine/rendering/util/SATGenerator.cpp | NTForked/VoxelConeTracingGI | 97867fce3cb1c14bd168359b40b54b7313166ab3 | [
"MIT"
] | 252 | 2016-12-05T08:08:01.000Z | 2022-03-26T14:47:34.000Z | source/engine/rendering/util/SATGenerator.cpp | NTForked/VoxelConeTracingGI | 97867fce3cb1c14bd168359b40b54b7313166ab3 | [
"MIT"
] | 3 | 2019-10-08T06:34:05.000Z | 2019-11-22T20:47:39.000Z | source/engine/rendering/util/SATGenerator.cpp | compix/CUDA-Path-Tracer | 429334456d75e8c939b94e1db288a51542f70926 | [
"MIT"
] | 29 | 2017-03-08T02:34:09.000Z | 2022-03-13T14:46:30.000Z | #include "SATGenerator.h"
#include <engine/rendering/util/GLUtil.h>
#include <engine/geometry/Rect.h>
#include <engine/resource/ResourceManager.h>
#include <engine/rendering/renderer/MeshRenderers.h>
SATGenerator::SATGenerator(int texWidth, int texHeight)
: m_width(texWidth), m_height(texHeight)
{
m_fullscreenQuadRenderer = MeshRenderers::fullscreenQuad();
m_shader = ResourceManager::getShader("shaders/util/generateSAT.vert", "shaders/util/generateSAT.frag");
m_quadShader = ResourceManager::getShader("shaders/simple/fullscreenQuad.vert", "shaders/simple/fullscreenQuad.frag", {"in_pos"});
m_quadShaderToInteger = ResourceManager::getShader("shaders/util/fullscreenQuadToInteger.vert", "shaders/util/fullscreenQuadToInteger.frag");
createFramebuffers(m_width, m_height);
}
GLuint SATGenerator::generateSAT(GLuint texture)
{
// Algorithm according to "Fast Summed-Area Table Generation and its Applications" by Hensley et al.
float w = float(m_width);
float h = float(m_height);
int numTextureFetches = 16;
float logN = log(float(numTextureFetches));
int n = static_cast<int>(ceil(log(w) / logN));
int m = static_cast<int>(ceil(log(h) / logN));
glDisable(GL_DEPTH_TEST);
// Render texture to the first buffer
m_framebuffers[0]->bind();
GL::setViewport(Rect(0.f, 0.f, w, h));
m_quadShaderToInteger->bind();
m_quadShaderToInteger->setFloat("u_isGrayscale", 0.f);
m_quadShaderToInteger->bindTexture2D(texture, "u_textureDiffuse");
m_fullscreenQuadRenderer->bindAndRender();
m_framebuffers[0]->unbind();
m_shader->bind();
m_shader->setVector("u_textureSize", glm::vec2(w, h));
m_shader->setInt("u_isHorizontalPhase", 1);
m_curBufferIdx = 0;
// Horizontal phase
for (int i = 0; i < n; ++i)
{
auto fb = getBackBuffer();
fb->bind();
GL::setViewport(Rect(0.f, 0.f, w, h));
m_shader->bindTexture2D(m_framebuffers[m_curBufferIdx]->getRenderTexture(GL_COLOR_ATTACHMENT0), "u_texture");
m_shader->setInt("u_passIdx", i);
m_fullscreenQuadRenderer->bindAndRender();
swapBuffers();
fb->unbind();
}
m_shader->setInt("u_isHorizontalPhase", 0);
// Vertical phase
for (int i = 0; i < m; ++i)
{
auto fb = getBackBuffer();
fb->bind();
GL::setViewport(Rect(0.f, 0.f, w, h));
m_shader->bindTexture2D(m_framebuffers[m_curBufferIdx]->getRenderTexture(GL_COLOR_ATTACHMENT0), "u_texture");
m_shader->setInt("u_passIdx", i);
m_fullscreenQuadRenderer->bindAndRender();
swapBuffers();
fb->unbind();
}
return m_framebuffers[m_curBufferIdx]->getRenderTexture(GL_COLOR_ATTACHMENT0);
}
void SATGenerator::swapBuffers()
{
m_curBufferIdx = (m_curBufferIdx + 1) % 2;
}
void SATGenerator::createFramebuffers(int width, int height)
{
for (int i = 0; i < 2; ++i)
{
m_framebuffers[i] = std::make_unique<Framebuffer>();
m_framebuffers[i]->bind();
std::shared_ptr<Texture2D> tex = std::make_shared<Texture2D>();
//tex->create(width, height, GL_RGBA32F, GL_RGBA, GL_FLOAT, Texture2DSettings::Custom);
tex->create(width, height, GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT, Texture2DSettings::Custom);
tex->bind();
tex->setParameteri(GL_TEXTURE_MIN_FILTER, GL_NEAREST);
tex->setParameteri(GL_TEXTURE_MAG_FILTER, GL_NEAREST);
tex->setParameteri(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
tex->setParameteri(GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
//float zero[4]{ 0.f, 0.f, 0.f, 0.f };
//glTextureParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, zero);
GL_ERROR_CHECK();
m_framebuffers[i]->attachRenderTexture2D(tex, GL_COLOR_ATTACHMENT0);
m_framebuffers[i]->setDrawBuffers();
m_framebuffers[i]->checkFramebufferStatus();
m_framebuffers[i]->unbind();
}
}
| 35.357143 | 145 | 0.682071 | [
"geometry",
"render"
] |
65e322b966e37733fdb508aea5937cf21e9cf049 | 5,298 | cpp | C++ | API/Driver/OpenGL/src/RenderPass.cpp | Gpinchon/OCRA | 341bb07facc616f1f8a27350054d1e86f022d7c6 | [
"Apache-2.0"
] | null | null | null | API/Driver/OpenGL/src/RenderPass.cpp | Gpinchon/OCRA | 341bb07facc616f1f8a27350054d1e86f022d7c6 | [
"Apache-2.0"
] | null | null | null | API/Driver/OpenGL/src/RenderPass.cpp | Gpinchon/OCRA | 341bb07facc616f1f8a27350054d1e86f022d7c6 | [
"Apache-2.0"
] | null | null | null | #include <RenderPass.hpp>
#include <GL/FrameBuffer.hpp>
#include <GL/RenderPass.hpp>
#include <GL/Command/Buffer.hpp>
#include <GL/Command/ExecutionState.hpp>
#include <GL/glew.h>
#include <vector>
#include <cassert>
OCRA_DECLARE_WEAK_HANDLE(OCRA::Device);
namespace OCRA::RenderPass
{
static inline auto GetClearOps(const Info& a_Info)
{
std::vector<ClearBufferOp> clearOps;
for (uint32_t i = 0; i < a_Info.colorAttachments.size(); ++i) {
const auto& colorAttachment = a_Info.colorAttachments.at(i);
if (colorAttachment.loadOp == LoadOperation::Clear) {
ClearBufferOp op{};
op.buffer = GL_COLOR;
op.drawBuffer = i;
clearOps.push_back(op);
}
}
if (a_Info.depthAttachment.loadOp == LoadOperation::Clear) {
ClearBufferOp op{};
op.buffer = GL_DEPTH;
op.drawBuffer = 0;
clearOps.push_back(op);
}
if (a_Info.stencilAttachment.loadOp == LoadOperation::Clear) {
ClearBufferOp op{};
op.buffer = GL_STENCIL;
op.drawBuffer = 0;
clearOps.push_back(op);
}
return clearOps;
}
static inline auto GetSubPassDrawBuffers(const Info& a_Info, const SubPassDescription& a_Description)
{
std::vector<GLenum> drawBuffers;
for (uint32_t i = 0; i < a_Description.colorAttachments.size(); ++i) {
const auto& renderPassColorAttachment = a_Info.colorAttachments.at(i);
const auto& subPassColorAtachment = a_Description.colorAttachments.at(i);
if (renderPassColorAttachment.storeOp == StoreOperation::Store) {
if (subPassColorAtachment.location == -1) drawBuffers.push_back(uint32_t(GL_NONE));
else drawBuffers.push_back(GL_COLOR_ATTACHMENT0 + subPassColorAtachment.location);
}
}
return drawBuffers;
}
static inline auto CreateSubPasses(const Info& a_Info)
{
std::vector<SubPass> subPasses;
for (const auto& subPass : a_Info.subPasses) {
SubPass newSubPass{ GetSubPassDrawBuffers(a_Info, subPass) };
subPasses.push_back(newSubPass);
}
return subPasses;
}
Impl::Impl(const Device::Handle& a_Device, const Info& a_Info)
: device(a_Device)
, info(a_Info)
, clearOps(GetClearOps(a_Info))
, subPasses(CreateSubPasses(a_Info))
{}
void Impl::BeginRenderPass(const Command::Buffer::ExecutionState& a_ExecutionState) const
{
const auto& renderPass = a_ExecutionState.renderPass;
glViewport(renderPass.renderArea.offset.x, renderPass.renderArea.offset.y,
renderPass.renderArea.extent.width, renderPass.renderArea.extent.height);
if (info.depthAttachment.storeOp == StoreOperation::DontCare)
glDepthMask(false);
if (info.stencilAttachment.storeOp == StoreOperation::DontCare)
glStencilMask(0);
}
void Impl::BeginSubPass(const Command::Buffer::ExecutionState& a_ExecutionState) const
{
subPasses.at(a_ExecutionState.subpassIndex).Begin();
ApplyClearOps(a_ExecutionState);
}
void Impl::ApplyClearOps(const Command::Buffer::ExecutionState& a_ExecutionState) const
{
const auto& renderPass = a_ExecutionState.renderPass;
if (info.depthAttachment.loadOp == LoadOperation::Clear)
glClearBufferfv(GL_DEPTH, 0, &renderPass.depthClearValue);
if (info.stencilAttachment.loadOp == LoadOperation::Clear)
glClearBufferiv(GL_STENCIL, 0, &renderPass.stencilClearValue);
for (uint32_t i = 0; i < clearOps.size(); ++i)
{
const auto& clearOp = clearOps.at(i);
const auto& clearValue = renderPass.colorClearValues.at(i);
//TODO use correct clearValue type
glClearBufferfv(
clearOp.buffer,
clearOp.drawBuffer,
clearValue.float32);
}
}
void SubPass::Begin() const
{
glTextureBarrier();
glDrawBuffers(drawBuffers.size(), drawBuffers.data());
}
Handle Create(const Device::Handle& a_Device, const Info& a_Info)
{
return Handle(new Impl(a_Device, a_Info));
}
}
namespace OCRA::Command
{
void BeginRenderPass(const Buffer::Handle& a_CommandBuffer, const RenderPassBeginInfo& a_BeginInfo, const SubPassContents& a_SubPassContents)
{
assert(a_BeginInfo.framebuffer->info.renderPass == a_BeginInfo.renderPass); //check if FB & RP are compatible
a_CommandBuffer->PushCommand([beginInfo = a_BeginInfo](Buffer::ExecutionState& a_ExecutionState) {
a_ExecutionState.renderPass.renderPass = beginInfo.renderPass;
a_ExecutionState.renderPass.framebuffer = beginInfo.framebuffer;
a_ExecutionState.renderPass.renderArea = beginInfo.renderArea;
a_ExecutionState.renderPass.colorClearValues = beginInfo.colorClearValues;
a_ExecutionState.renderPass.depthClearValue = beginInfo.depthClearValue;
a_ExecutionState.renderPass.stencilClearValue = beginInfo.stencilClearValue;
a_ExecutionState.renderPass.framebuffer->Bind();
a_ExecutionState.renderPass.renderPass->BeginRenderPass(a_ExecutionState);
});
}
void NextSubPass(const Command::Buffer::Handle& a_CommandBuffer, const SubPassContents& a_SubPassContents)
{
a_CommandBuffer->PushCommand([](Buffer::ExecutionState& a_ExecutionState) {
a_ExecutionState.subpassIndex++;
a_ExecutionState.renderPass.renderPass->BeginSubPass(a_ExecutionState);
});
}
void EndRenderPass(const Buffer::Handle& a_CommandBuffer)
{
a_CommandBuffer->PushCommand([](Buffer::ExecutionState& a_ExecutionState) {
a_ExecutionState.renderPass.framebuffer->Unbind();
a_ExecutionState.renderPass = {};
});
}
} | 34.627451 | 141 | 0.746131 | [
"vector"
] |
65ed9307f1ee48e422844379c4ccb16393213044 | 4,378 | cpp | C++ | tests/ambient_occlusion.cpp | jdumas/aabb_benchmark | b63e43394508b2cc53f206a46472a0d7dbf917cb | [
"MIT"
] | 4 | 2019-07-18T21:48:00.000Z | 2021-01-04T18:15:07.000Z | tests/ambient_occlusion.cpp | jdumas/aabb_benchmark | b63e43394508b2cc53f206a46472a0d7dbf917cb | [
"MIT"
] | 1 | 2019-11-19T20:03:12.000Z | 2021-10-16T22:55:19.000Z | tests/ambient_occlusion.cpp | jdumas/aabb_benchmark | b63e43394508b2cc53f206a46472a0d7dbf917cb | [
"MIT"
] | null | null | null | #include "ambient_occlusion.h"
#include "utils.h"
#include <igl/Timer.h>
#include <igl/avg_edge_length.h>
#include <igl/embree/ambient_occlusion.h>
#include <igl/opengl/glfw/Viewer.h>
#include <igl/per_vertex_normals.h>
#include <igl/read_triangle_mesh.h>
#include <igl/embree/EmbreeIntersector.h>
#include <geogram/mesh/mesh_AABB.h>
#include <CLI/CLI.hpp>
#include <iostream>
#undef IGL_STATIC_LIBRARY // Missing template instantiation in libigl, temporary fix
#include <igl/ambient_occlusion.h>
// Mesh
Eigen::MatrixXd V;
Eigen::MatrixXi F;
Eigen::VectorXd AO;
// It allows to change the degree of the field when a number is pressed
bool key_down(igl::opengl::glfw::Viewer& viewer, unsigned char key, int modifier)
{
using namespace Eigen;
using namespace std;
const RowVector3d color(0.9, 0.85, 0.9);
switch (key) {
case '1':
// Show the mesh without the ambient occlusion factor
viewer.data().set_colors(color);
break;
case '2': {
// Show the mesh with the ambient occlusion factor
MatrixXd C = color.replicate(V.rows(), 1);
for (unsigned i = 0; i < C.rows(); ++i)
C.row(i) *= AO(i); // std::min<double>(AO(i)+0.2,1);
viewer.data().set_colors(C);
break;
}
case '.':
viewer.core().lighting_factor += 0.1;
break;
case ',':
viewer.core().lighting_factor -= 0.1;
break;
default:
break;
}
viewer.core().lighting_factor = std::min(std::max(viewer.core().lighting_factor, 0.f), 1.f);
return false;
}
template <Method M>
void run(Eigen::MatrixXd& V, Eigen::MatrixXi& F, int samples, Eigen::VectorXd& AO)
{
using TreeType = typename TreeTraits<M>::type;
TreeType tree;
GEO::Mesh mesh;
tree_from_mesh<M>(V, F, mesh, tree);
Eigen::MatrixXd N;
igl::per_vertex_normals(V, F, N);
igl::Timer timer;
timer.start();
ambient_occlusion(V, F, tree, V, N, samples, AO);
timer.stop();
double t = timer.getElapsedTime();
AO = 1.0 - AO.array();
std::cout << "-- Took " << t << " s" << std::endl;
}
int main(int argc, char* argv[])
{
// Default arguments
struct {
std::string input = TUTORIAL_SHARED_PATH "/fertility.off";
Method method = Method::Igl;
int samples = 500;
} args;
// Parse arguments
CLI::App app{"ambient_occlusion"};
app.add_option("input,-i,--input", args.input, "Input mesh.")->check(CLI::ExistingFile);
app.add_option("-s,--samples", args.samples, "Number of samples.")->check(CLI::PositiveNumber);
app.add_option("-m,--method", args.method, "Acceleration method")
->transform(CLI::CheckedTransformer(map, CLI::ignore_case));
try {
app.parse(argc, argv);
}
catch (const CLI::ParseError& e) {
return app.exit(e);
}
std::cout << "Press 1 to turn off Ambient Occlusion" << std::endl
<< "Press 2 to turn on Ambient Occlusion" << std::endl
<< "Press . to turn up lighting" << std::endl
<< "Press , to turn down lighting" << std::endl;
// Load a triangle mesh
igl::read_triangle_mesh(args.input, V, F);
// Compute AO
// clang-format off
switch (args.method) {
case Method::Igl: run<Method::Igl>(V, F, args.samples, AO); break;
case Method::Embree: run<Method::Embree>(V, F, args.samples, AO); break;
case Method::Geogram: run<Method::Geogram>(V, F, args.samples, AO); break;
case Method::Ours: run<Method::Ours>(V, F, args.samples, AO); break;
case Method::Morton: run<Method::Morton>(V, F, args.samples, AO); break;
case Method::Hilbert: run<Method::Hilbert>(V, F, args.samples, AO); break;
case Method::OursBinary: run<Method::OursBinary>(V, F, args.samples, AO); break;
case Method::MortonBinary: run<Method::MortonBinary>(V, F, args.samples, AO); break;
case Method::HilbertBinary: run<Method::HilbertBinary>(V, F, args.samples, AO); break;
}
// clang-format on
// Show mesh
igl::opengl::glfw::Viewer viewer;
viewer.data().set_mesh(V, F);
viewer.callback_key_down = &key_down;
key_down(viewer, '2', 0);
viewer.data().show_lines = false;
viewer.core().lighting_factor = 0.0f;
viewer.launch();
}
| 34.203125 | 99 | 0.611695 | [
"mesh",
"transform"
] |
65ee9d8f926c63125570aa21df2892a3b7d98644 | 1,156 | cpp | C++ | backup/2/codewars/c++/sum-of-a-beach.cpp | yangyanzhan/code-camp | 4272564e916fc230a4a488f92ae32c07d355dee0 | [
"Apache-2.0"
] | 21 | 2019-11-16T19:08:35.000Z | 2021-11-12T12:26:01.000Z | backup/2/codewars/c++/sum-of-a-beach.cpp | yangyanzhan/code-camp | 4272564e916fc230a4a488f92ae32c07d355dee0 | [
"Apache-2.0"
] | 1 | 2022-02-04T16:02:53.000Z | 2022-02-04T16:02:53.000Z | backup/2/codewars/c++/sum-of-a-beach.cpp | yangyanzhan/code-camp | 4272564e916fc230a4a488f92ae32c07d355dee0 | [
"Apache-2.0"
] | 4 | 2020-05-15T19:39:41.000Z | 2021-10-30T06:40:31.000Z | // Hi, I'm Yanzhan. For more algothmic problems, visit my Youtube Channel (Yanzhan Yang's Youtube Channel) : https://www.youtube.com/channel/UCDkz-__gl3frqLexukpG0DA?view_as=subscriber or my Twitter Account (Yanzhan Yang's Twitter) : https://twitter.com/YangYanzhan or my GitHub HomePage (Yanzhan Yang's GitHub HomePage) : https://yanzhan.site .
// For this specific algothmic problem, visit my Youtube Video : .
// It's fascinating to solve algothmic problems, follow Yanzhan to learn more!
// Blog URL for this problem: https://yanzhan.site/codewars/sum-of-a-beach.html .
using namespace std;
int sum_of_a_beach(string s) {
vector<string> words = {"sand", "water", "fish", "sun"};
for (auto &ch : s) {
ch = tolower(ch);
}
int res = 0;
int idx = 0;
while (idx < s.size()) {
bool found = false;
for (auto word : words) {
int idx1 = s.find(word, idx);
if (idx1 == idx) {
found = true;
idx += word.size();
res++;
break;
}
}
if (!found) {
idx++;
}
}
return res;
}
| 36.125 | 345 | 0.57872 | [
"vector"
] |
65f28211ddbd51b84b17642187ec2c607ed58cc2 | 635 | cpp | C++ | chapter-14/14.43.cpp | zero4drift/Cpp-Primer-5th-Exercises | d3d0f0d228e8c2c5a3b3fe1fd03ce34e0894e93f | [
"MIT"
] | null | null | null | chapter-14/14.43.cpp | zero4drift/Cpp-Primer-5th-Exercises | d3d0f0d228e8c2c5a3b3fe1fd03ce34e0894e93f | [
"MIT"
] | null | null | null | chapter-14/14.43.cpp | zero4drift/Cpp-Primer-5th-Exercises | d3d0f0d228e8c2c5a3b3fe1fd03ce34e0894e93f | [
"MIT"
] | null | null | null | #include <vector>
#include <functional>
#include <iostream>
#include <algorithm>
using std::vector;
using std::modulus;
using std::placeholders::_1;
using std::cin;
using std::cout;
using std::endl;
using std::find_if;
int main()
{
int i;
vector<int> vi;
cout << "Please input integers: " << endl;
while(cin >> i)
vi.push_back(i);
cin.clear();
int j;
cout << "Please input a interger to test: " << endl;
cin >> j;
auto modulus_left = bind(modulus<int>(), j, _1);
auto iter = find_if(vi.cbegin(), vi.cend(), modulus_left);
if(iter == vi.cend())
cout << "ok" << endl;
else
cout << "bad" << endl;
}
| 19.242424 | 60 | 0.618898 | [
"vector"
] |
5a0e757777486336b925995499bb538cdecbcd4b | 15,258 | cc | C++ | psqlmatcher.cc | caomw/map_matching_plus | 319f78302fed812c771d3210e81b6e7d70b0328a | [
"BSD-3-Clause"
] | 3 | 2018-08-23T22:48:59.000Z | 2019-08-08T06:51:21.000Z | psqlmatcher.cc | caomw/map_matching_plus | 319f78302fed812c771d3210e81b6e7d70b0328a | [
"BSD-3-Clause"
] | null | null | null | psqlmatcher.cc | caomw/map_matching_plus | 319f78302fed812c771d3210e81b6e7d70b0328a | [
"BSD-3-Clause"
] | 2 | 2018-02-13T07:08:54.000Z | 2019-11-02T11:32:48.000Z | // -*- mode: c++ -*-
#include <unordered_map>
#include <vector>
#include <cassert>
#include <iostream>
// boost
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
// psql
// #include <postgresql/libpq-fe.h>
#include <pqxx/pqxx>
// geos
#include <geos/io/WKBReader.h>
#include <geos/geom/CoordinateSequence.h>
#include <geos/geom/Geometry.h>
// sqlite3
#include <sqlite3.h>
// valhalla
#include <valhalla/midgard/pointll.h>
#include <valhalla/midgard/aabb2.h>
#include <valhalla/midgard/logging.h>
#include <valhalla/baldr/graphreader.h>
#include <valhalla/baldr/graphid.h>
using namespace valhalla;
#include "costings.h"
#include "map_matching.h"
namespace {
constexpr float kDefaultSigmaZ = 4.07;
constexpr float kDefaultBeta = 3;
constexpr float kDefaultSquaredSearchRadius = 25 * 25; // 25 meters
constexpr int kSqliteMaxCompoundSelect = 5000;
constexpr size_t kMaxGridCacheSize = 64;
}
using BoundingBox = midgard::AABB2<midgard::PointLL>;
using Sequence = std::vector<Measurement>;
inline std::string
joinbbox(const BoundingBox& bbox)
{
return std::to_string(bbox.minx())
+ " "
+ std::to_string(bbox.miny())
+ ", "
+ std::to_string(bbox.maxx())
+ " "
+ std::to_string(bbox.maxy());
}
// Convert a linestring's Well-Known Binary to a sequence (a vector of
// measurements)
Sequence to_sequence(std::istringstream& wkb)
{
geos::geom::GeometryFactory factory;
geos::io::WKBReader reader(factory);
auto geometry = reader.read(wkb);
Sequence sequence;
auto coords = geometry->getCoordinates();
for (decltype(coords->size()) idx = 0; idx < coords->size(); idx++) {
const auto& coord = coords->getAt(idx);
sequence.emplace_back(PointLL{coord.x, coord.y});
}
return sequence;
}
inline Sequence to_sequence(const std::string& wkb)
{
std::istringstream is(wkb);
return to_sequence(is);
}
using SequenceId = uint32_t;
// Query all sequences within the bounding box
std::unordered_map<SequenceId, Sequence>
query_sequences(pqxx::connection& conn, const BoundingBox& bbox)
{
pqxx::work txn(conn);
auto bbox_clause = txn.quote("BOX(" + joinbbox(bbox) + ")") + "::box2d";
std::string statement = "SELECT id, ST_AsBinary(path_gm) AS geom FROM sequences WHERE "
+ bbox_clause + " && path_gm AND NOT ST_IsEmpty(path_gm)"
+ " LIMIT " + std::to_string(std::numeric_limits<uint32_t>::max());
LOG_INFO("Querying: " + statement);
// Send query
auto tuples = txn.exec(statement);
std::unordered_map<SequenceId, Sequence> sequences;
for (auto it = tuples.begin(); it != tuples.end(); it++) {
auto sid = it->at("id").as<SequenceId>();
auto bs = pqxx::binarystring(it->at("geom"));
sequences[sid] = to_sequence(bs.str());
}
return sequences;
}
// Collect all tile IDs
std::vector<uint32_t>
collect_local_tileids(const baldr::TileHierarchy& tile_hierarchy,
const std::unordered_set<uint32_t>& excluded_tileids)
{
auto local_level = tile_hierarchy.levels().rbegin()->second.level;
const auto& tiles = tile_hierarchy.levels().rbegin()->second.tiles;
std::vector<uint32_t> queue;
for (uint32_t id = 0; id < tiles.TileCount(); id++) {
// If tile exists add it to the queue
GraphId graphid(id, local_level, 0);
if (baldr::GraphReader::DoesTileExist(tile_hierarchy, graphid)
&& excluded_tileids.find(id) == excluded_tileids.end()) {
queue.push_back(graphid.tileid());
}
}
return queue;
}
// Tell you which tile this sequence belongs to
inline uint32_t
which_tileid(const baldr::TileHierarchy& tile_hierarchy,
const Sequence& sequence)
{
auto local_level = tile_hierarchy.levels().rbegin()->second.level;
auto graphid = tile_hierarchy.GetGraphId(sequence[0].lnglat(), local_level);
if (graphid.Is_Valid()) {
return graphid.tileid();
}
baldr::GraphId id;
return id.tileid();
}
bool create_tiles_table(sqlite3* db_handle)
{
char *err_msg;
std::string sql = "CREATE TABLE IF NOT EXISTS tiles"
" (id INTEGER PRIMARY KEY, matched_count INTEGER, total_count INTEGER)";
auto ret = sqlite3_exec(db_handle, sql.c_str(), NULL, NULL, &err_msg);
if (ret != SQLITE_OK) {
LOG_ERROR("Error: " + std::string(err_msg));
sqlite3_free(err_msg);
return false;
}
return true;
}
// <sequence_id, coordinate_index, graphid, graphtype> no invalid
// graphid guaranteed
using Result = std::tuple<SequenceId, uint32_t, baldr::GraphId, GraphType>;
bool create_scores_table(sqlite3* db_handle)
{
char *err_msg;
std::string sql = "CREATE TABLE IF NOT EXISTS scores"
" (sequence_id INTEGER, coordinate_index INTEGER, graphid BIGINT, graphtype SMALLINT)";
auto ret = sqlite3_exec(db_handle, sql.c_str(), NULL, NULL, &err_msg);
if (ret != SQLITE_OK) {
LOG_ERROR("Error: " + std::string(err_msg));
sqlite3_free(err_msg);
return false;
}
return true;
}
bool read_finished_tiles(sqlite3* db_handle,
std::unordered_set<uint32_t>& tileids)
{
sqlite3_stmt* stmt;
std::string sql = "SELECT id FROM tiles";
int ret = sqlite3_prepare_v2(db_handle, sql.c_str(), sql.length(), &stmt, nullptr);
if (SQLITE_OK != ret) {
sqlite3_finalize(stmt);
return false;
}
do {
ret = sqlite3_step(stmt);
if (SQLITE_ROW == ret) {
int sequence_id = sqlite3_column_int(stmt, 0);
if (sequence_id >= 0) {
tileids.insert(static_cast<uint32_t>(sequence_id));
} else {
LOG_ERROR("Found negative sequence ID which is not good");
}
}
// Try again if busy
} while (SQLITE_ROW == ret || SQLITE_BUSY == ret);
if (SQLITE_DONE != ret) {
LOG_ERROR("Expect SQLITE_DONE to return, but you got " + std::to_string(ret));
sqlite3_finalize(stmt);
return false;
}
sqlite3_finalize(stmt);
return true;
}
bool write_results_segment(sqlite3* db_handle,
const std::vector<Result>::const_iterator cbegin,
const std::vector<Result>::const_iterator cend)
{
if (cbegin == cend) {
return true;
}
std::string sql = "INSERT INTO scores VALUES ";
for (auto result = cbegin; result != cend; result++) {
sql += "(";
sql += std::to_string(std::get<0>(*result)) + ", "; // sequence_id
sql += std::to_string(std::get<1>(*result)) + ", "; // coordinate_index
sql += std::to_string(std::get<2>(*result)) + ", "; // graphid
sql += std::to_string(static_cast<uint8_t>(std::get<3>(*result))); // graphtype
sql += "),";
}
sql.pop_back(); // Pop out the last comma
char *err_msg;
int ret = sqlite3_exec(db_handle, sql.c_str(), NULL, NULL, &err_msg);
if (SQLITE_OK != ret) {
LOG_ERROR("Error: " + std::string(err_msg));
sqlite3_free(err_msg);
return false;
}
return true;
}
bool write_results(sqlite3* db_handle,
size_t segment_size,
const std::vector<Result>& results,
uint32_t tileid,
uint32_t matched_count,
uint32_t total_count)
{
if (segment_size <= 0) {
throw std::invalid_argument("Expect segment size to be positive " + std::to_string(segment_size));
}
{ // Start transaction
std::string sql = "BEGIN";
char *err_msg;
int ret = sqlite3_exec(db_handle, sql.c_str(), NULL, NULL, &err_msg);
if (SQLITE_OK != ret) {
LOG_ERROR("Error: " + std::string(err_msg));
sqlite3_free(err_msg);
return false;
}
}
// Insert (sequence_id, coordinate_index, graphid, graphtype) into scores
for (decltype(results.size()) i = 0; i < results.size(); i += segment_size) {
const auto cbegin = std::next(results.cbegin(), i),
cend = (i + segment_size) < results.size()? std::next(cbegin, segment_size) : results.cend();
bool ok = write_results_segment(db_handle, cbegin, cend);
if (!ok) {
// TODO rollback?
return false;
}
}
{ // Insert (tileid, matched_count, total_count) into tiles
std::string sql = "INSERT INTO tiles VALUES (";
sql += std::to_string(tileid) + ", ";
sql += std::to_string(matched_count) + ", ";
sql += std::to_string(total_count) + ");\n";
char *err_msg;
int ret = sqlite3_exec(db_handle, sql.c_str(), NULL, NULL, &err_msg);
if (SQLITE_OK != ret) {
LOG_ERROR("Error: " + std::string(err_msg));
sqlite3_free(err_msg);
// TODO rollback?
return false;
}
}
{ // End transaction
std::string sql = "END";
char *err_msg;
int ret = sqlite3_exec(db_handle, sql.c_str(), NULL, NULL, &err_msg);
if (SQLITE_OK != ret) {
LOG_ERROR("Error: " + std::string(err_msg));
sqlite3_free(err_msg);
return false;
}
}
return true;
}
int main(int argc, char *argv[])
{
//////////////////////////////////
// Parse arguments
if (argc < 4) {
std::cerr << "usage: psqlmatcher CONF_FILE_PATH PSQL_URI SQLITE3_FILE_PATH" << std::endl << std::endl;
std::cerr << "example: psqlmatcher conf/valhalla.json \"dbname=sequence user=postgres password=secret host=localhost\" results.sqlite3" << std::endl;
std::cerr << "It will read ALL GPS sequences from the psql database and write results into results.sqlite3." << std::endl;
return 1;
}
std::string config_file_path(argv[1]);
std::string psql_uri(argv[2]);
std::string sqlite3_file_path(argv[3]);
/////////////////////////////////
// Initialize
boost::property_tree::ptree pt;
boost::property_tree::read_json(config_file_path.c_str(), pt);
std::shared_ptr<sif::DynamicCost> mode_costing[4] = {
nullptr, // CreateAutoCost(*config.get_child_optional("costing_options.auto")),
nullptr, // CreateAutoShorterCost(*config.get_child_optional("costing_options.auto_shorter")),
nullptr, // CreateBicycleCost(*config.get_child_optional("costing_options.bicycle")),
CreatePedestrianCost(*pt.get_child_optional("costing_options.pedestrian"))
};
sif::TravelMode travel_mode = static_cast<sif::TravelMode>(3);
baldr::GraphReader reader(pt.get_child("mjolnir.hierarchy"));
// TODO read them from config
auto sigma_z = kDefaultSigmaZ;
auto beta = kDefaultBeta;
MapMatching mm(sigma_z, beta, reader, mode_costing, travel_mode);
const auto& tile_hierarchy = reader.GetTileHierarchy();
const auto& tiles = tile_hierarchy.levels().rbegin()->second.tiles;
auto tile_size = tiles.TileSize();
CandidateGridQuery grid(reader, tile_size/1000, tile_size/1000);
LOG_INFO("Config: tile size = " + std::to_string(tile_size));
LOG_INFO("Config: sigma_z = " + std::to_string(sigma_z));
LOG_INFO("Config: beta = " + std::to_string(beta));
////////////////////////
// Prepare sqlite3 database for writing results
sqlite3* db_handle;
int ret = sqlite3_open_v2(sqlite3_file_path.c_str(), &db_handle, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, nullptr);
if (SQLITE_OK != ret) {
LOG_ERROR("Failed to open sqlite3 database at " + sqlite3_file_path);
return 2;
}
int segment_size = kSqliteMaxCompoundSelect;
#if SQLITE_VERSION_NUMBER < 3008008
// SQLite under 3.8.8 has limitation on the number of rows in a VALUES clause
// See https://www.sqlite.org/changes.html
sqlite3_limit(db_handle, SQLITE_LIMIT_COMPOUND_SELECT, kSqliteMaxCompoundSelect);
// Read the true value back
segment_size = sqlite3_limit(db_handle, SQLITE_LIMIT_COMPOUND_SELECT, -1);
#endif
LOG_INFO("Config: segment_size = " + std::to_string(segment_size));
if (segment_size <= 0) {
LOG_ERROR("Expect SQLITE_LIMIT_COMPOUND_SELECT to be positive " + std::to_string(segment_size));
return 3;
}
{
bool ok = create_tiles_table(db_handle);
if (!ok) {
sqlite3_close(db_handle);
return 2;
}
}
{
bool ok = create_scores_table(db_handle);
if (!ok) {
sqlite3_close(db_handle);
return 2;
}
}
////////////////////////
// Collect tiles
std::unordered_set<uint32_t> finished_tileids;
{
bool ok = read_finished_tiles(db_handle, finished_tileids);
if (!ok) {
sqlite3_close(db_handle);
return 2;
}
}
auto tileids = collect_local_tileids(tile_hierarchy, finished_tileids);
LOG_INFO("The number of tiles collected: " + std::to_string(tileids.size()) + " (excluded " + std::to_string(finished_tileids.size()) + " finished tiles)");
//////////////////////
// For each tile:
// 1. Query all sequences within bounding box of this tile
// 2. For each sequence:
// Offline match the sequence
// 3. Insert rows [sequence's id, coordinate's index, edge's GraphId] into sqlite3
uint64_t stat_matched_count_totally = 0;
uint64_t stat_measurement_count_totally = 0;
pqxx::connection conn(psql_uri.c_str());
for (auto tileid : tileids) {
std::vector<Result> results;
uint32_t stat_matched_count_of_tile = 0;
uint32_t stat_measurement_count_of_tile = 0;
const auto& bbox = tiles.TileBounds(tileid);
for (const auto& sequencepair : query_sequences(conn, bbox)) {
auto sid = sequencepair.first;
const auto& sequence = sequencepair.second;
// Too verbose
// LOG_INFO("Got sequence: id = " + std::to_string(sid) + " size = " + std::to_string(sequence.size()));
if (sequence.empty()) {
continue;
}
// Skip sequences that don't belong to this tile
if (which_tileid(tile_hierarchy, sequence) != tileid) {
continue;
}
const auto& match_results = OfflineMatch(mm, grid, sequence, kDefaultSquaredSearchRadius);
assert(match_results.size() == sequence.size());
if (reader.OverCommitted()) {
reader.Clear();
}
if (grid.size() > kMaxGridCacheSize) {
grid.Clear();
}
uint32_t stat_matched_count_of_sequence = 0;
uint32_t coord_idx = 0;
for (auto result = match_results.cbegin(); result != match_results.cend(); result++, coord_idx++) {
if (result->graphid().Is_Valid()) {
results.emplace_back(sid, coord_idx, result->graphid(), result->graphtype());
stat_matched_count_of_sequence++;
}
}
stat_matched_count_of_tile += stat_matched_count_of_sequence;
stat_measurement_count_of_tile += sequence.size();
// Too verbose
// LOG_INFO("Matched " + std::to_string(stat_matched_count_of_sequence) + "/" + std::to_string(sequence.size()));
}
stat_matched_count_totally += stat_matched_count_of_tile;
stat_measurement_count_totally += stat_measurement_count_of_tile;
{
bool ok = write_results(db_handle, segment_size, results, tileid, stat_matched_count_of_tile, stat_measurement_count_of_tile);
if (!ok) {
sqlite3_close(db_handle);
return 2;
}
}
LOG_INFO("Tile " + std::to_string(tileid) + " wrote " + std::to_string(stat_matched_count_of_tile) + "/" + std::to_string(stat_measurement_count_of_tile) + " points");
}
LOG_INFO("============= Summary ==================");
LOG_INFO("Matched: " + std::to_string(stat_matched_count_totally) + "/" + std::to_string(stat_measurement_count_totally) + " points");
sqlite3_close(db_handle);
return 0;
}
| 31.075356 | 171 | 0.655984 | [
"geometry",
"vector"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.