Add full type coverage for return types and variables

This introduces type parsing for all types used within the scripting
documentation. This improves the generated JSON output and also
validates new code via the unit test.
This commit is contained in:
asarium committed 2021-02-26 22:37:37 +01:00
1 parent 2ac85f3172
commit 0fb712ed39
45 files changed
+1249 -500

No files matched your search

+91 -16
View File
@@ -507,7 +507,6 @@ std::unique_ptr<DocumentationElement> ade_table_entry::ToDocumentationElement(
return std::unique_ptr<DocumentationElement>();
}
// WMC - Hack
std::unique_ptr<DocumentationElement> element;
//***Begin entry
@@ -543,10 +542,22 @@ std::unique_ptr<DocumentationElement> ade_table_entry::ToDocumentationElement(
obj->type = ElementType::Function;
}
obj->returnType = ReturnType;
auto typeNames = ade_manager::getInstance()->getTypeNames();
if (ReturnType != nullptr) {
type_parser type_parser(typeNames);
if (type_parser.parse(ReturnType)) {
obj->returnType = type_parser.getType();
} else {
if (errorReporter) {
errorReporter(GetFullPath() + "(Return Type):\n" + type_parser.getErrorMessage());
}
obj->returnType = ade_type_info();
}
} else {
obj->returnType = ade_type_info();
}
for (const auto& overload : Arguments.overloads()) {
DocumentationElementFunction::argument_list overloadArgList;
argument_list_parser arg_parser(typeNames);
@@ -564,9 +575,8 @@ std::unique_ptr<DocumentationElement> ade_table_entry::ToDocumentationElement(
}
} else {
if (errorReporter) {
errorReporter(arg_parser.getErrorMessage());
errorReporter(GetFullPath() + "(Arguments):\n" + arg_parser.getErrorMessage());
}
overloadArgList.simple.assign(overload);
}
@@ -584,9 +594,37 @@ std::unique_ptr<DocumentationElement> ade_table_entry::ToDocumentationElement(
std::unique_ptr<DocumentationElementProperty> obj(new DocumentationElementProperty());
obj->type = ElementType::Property;
auto typeNames = ade_manager::getInstance()->getTypeNames();
//***Type Name(ShortName)
obj->getterType = ReturnType;
obj->setterType = Arguments.overloads().front();
if (ReturnType != nullptr) {
type_parser type_parser(typeNames);
if (type_parser.parse(ReturnType)) {
obj->getterType = type_parser.getType();
} else {
if (errorReporter) {
errorReporter(GetFullPath() + "(Getter Type):\n" + type_parser.getErrorMessage());
}
obj->getterType = ade_type_info();
}
} else {
obj->getterType = ade_type_info();
}
const SCP_string setterType = Arguments.overloads().front();
if (!setterType.empty()) {
type_parser type_parser(typeNames);
if (type_parser.parse(setterType)) {
obj->setterType = type_parser.getType();
} else {
if (errorReporter) {
errorReporter(GetFullPath() + "(Setter Type):\n" + type_parser.getErrorMessage());
}
obj->setterType = ade_type_info();
}
} else {
obj->setterType = ade_type_info();
}
if (ReturnDescription != nullptr) {
obj->returnDocumentation = ReturnDescription;
@@ -630,6 +668,33 @@ std::unique_ptr<DocumentationElement> ade_table_entry::ToDocumentationElement(
return element;
}
const char* ade_table_entry::GetName() const
{
if (Name != nullptr) {
return Name;
} else {
return ShortName;
}
}
SCP_string ade_table_entry::GetFullPath() const
{
SCP_string path(GetName());
size_t currentIdx = ParentIdx;
while (currentIdx != UINT_MAX) {
const auto entry = ade_manager::getInstance()->getEntry(currentIdx);
SCP_string entryName(entry.GetName());
// Not very efficient but should not be used at runtime so this is fine
path.insert(path.begin(), '.');
path.insert(path.begin(), entryName.cbegin(), entryName.cend());
currentIdx = entry.ParentIdx;
}
return path;
}
ade_lib::ade_lib(const char* in_name, const ade_lib_handle* parent, const char* in_shortname, const char* in_desc) {
ade_table_entry ate;
@@ -666,7 +731,7 @@ ade_func::ade_func(const char* name,
const ade_lib_handle& parent,
ade_overload_list args,
const char* desc,
ade_type_info ret_type,
const char* ret_type,
const char* ret_desc,
const gameversion::version& deprecation_version,
const char* deprecation_message)
@@ -681,7 +746,7 @@ ade_func::ade_func(const char* name,
ate.Function = func;
ate.Arguments = std::move(args);
ate.Description = desc;
ate.ReturnType = std::move(ret_type);
ate.ReturnType = ret_type;
ate.ReturnDescription = ret_desc;
ate.DeprecationVersion = deprecation_version;
ate.DeprecationMessage = deprecation_message;
@@ -689,9 +754,15 @@ ade_func::ade_func(const char* name,
LibIdx = ade_manager::getInstance()->getEntry(parent.GetIdx()).AddSubentry(ate);
}
ade_virtvar::ade_virtvar(const char* name, lua_CFunction func, const ade_lib_handle& parent, const char* args,
const char* desc, ade_type_info ret_type, const char* ret_desc,
const gameversion::version& deprecation_version, const char* deprecation_message)
ade_virtvar::ade_virtvar(const char* name,
lua_CFunction func,
const ade_lib_handle& parent,
const char* args,
const char* desc,
const char* ret_type,
const char* ret_desc,
const gameversion::version& deprecation_version,
const char* deprecation_message)
{
Assertion(strcmp(name, "__gc") != 0, "__gc is a reserved function name! An API function may not use it!");
@@ -703,7 +774,7 @@ ade_virtvar::ade_virtvar(const char* name, lua_CFunction func, const ade_lib_han
ate.Function = func;
ate.Arguments = args;
ate.Description = desc;
ate.ReturnType = std::move(ret_type);
ate.ReturnType = ret_type;
ate.ReturnDescription = ret_desc;
ate.DeprecationVersion = deprecation_version;
ate.DeprecationMessage = deprecation_message;
@@ -711,8 +782,12 @@ ade_virtvar::ade_virtvar(const char* name, lua_CFunction func, const ade_lib_han
LibIdx = ade_manager::getInstance()->getEntry(parent.GetIdx()).AddSubentry(ate);
}
ade_indexer::ade_indexer(lua_CFunction func, const ade_lib_handle& parent, ade_overload_list overloads, const char* desc,
ade_type_info ret_type, const char* ret_desc)
ade_indexer::ade_indexer(lua_CFunction func,
const ade_lib_handle& parent,
ade_overload_list overloads,
const char* desc,
const char* ret_type,
const char* ret_desc)
{
// Add function for meta
ade_table_entry ate;
@@ -723,7 +798,7 @@ ade_indexer::ade_indexer(lua_CFunction func, const ade_lib_handle& parent, ade_o
ate.Function = func;
ate.Arguments = std::move(overloads);
ate.Description = desc;
ate.ReturnType = std::move(ret_type);
ate.ReturnType = ret_type;
ate.ReturnDescription = ret_desc;
LibIdx = ade_manager::getInstance()->getEntry(parent.GetIdx()).AddSubentry(ate);
+4 -2
View File
@@ -131,7 +131,7 @@ class ade_table_entry {
//Metadata
ade_overload_list Arguments;
const char* Description = nullptr;
ade_type_info ReturnType;
const char* ReturnType;
const char* ReturnDescription = nullptr;
gameversion::version DeprecationVersion;
const char* DeprecationMessage = nullptr;
@@ -160,7 +160,9 @@ class ade_table_entry {
const scripting::DocumentationErrorReporter& errorReporter);
//*****Get
const char* GetName() { if (Name != NULL) { return Name; } else { return ShortName; }}
const char* GetName() const;
SCP_string GetFullPath() const;
};
/**
+24 -8
View File
@@ -230,9 +230,15 @@ class ade_lib : public ade_lib_handle {
*/
class ade_func : public ade_lib_handle {
public:
ade_func(const char* name, lua_CFunction func, const ade_lib_handle& parent, ade_overload_list args, const char* desc,
ade_type_info ret_type, const char* ret_desc, const gameversion::version& deprecation_version,
const char* deprecation_message);
ade_func(const char* name,
lua_CFunction func,
const ade_lib_handle& parent,
ade_overload_list args,
const char* desc,
const char* ret_type,
const char* ret_desc,
const gameversion::version& deprecation_version,
const char* deprecation_message);
};
/**
@@ -283,9 +289,15 @@ class ade_func : public ade_lib_handle {
*/
class ade_virtvar : public ade_lib_handle {
public:
ade_virtvar(const char* name, lua_CFunction func, const ade_lib_handle& parent, const char* args, const char* desc,
ade_type_info ret_type, const char* ret_desc, const gameversion::version& deprecation_version,
const char* deprecation_message);
ade_virtvar(const char* name,
lua_CFunction func,
const ade_lib_handle& parent,
const char* args,
const char* desc,
const char* ret_type,
const char* ret_desc,
const gameversion::version& deprecation_version,
const char* deprecation_message);
};
/**
@@ -337,8 +349,12 @@ class ade_virtvar : public ade_lib_handle {
*/
class ade_indexer : public ade_lib_handle {
public:
ade_indexer(lua_CFunction func, const ade_lib_handle& parent, ade_overload_list overloads = ade_overload_list(),
const char* desc = nullptr, ade_type_info ret_type = ade_type_info(), const char* ret_desc = nullptr);
ade_indexer(lua_CFunction func,
const ade_lib_handle& parent,
ade_overload_list overloads,
const char* desc,
const char* ret_type,
const char* ret_desc);
};
/**
+5 -3
View File
@@ -4,10 +4,9 @@
namespace scripting {
ade_type_info::ade_type_info(std::initializer_list<ade_type_info> tuple_types)
: _type(ade_type_info_type::Tuple), _elements(tuple_types)
ade_type_info::ade_type_info(const ade_type_tuple& tupleType)
: _type(ade_type_info_type::Tuple), _elements(tupleType.getElementTypes())
{
Assertion(tuple_types.size() >= 1, "Tuples must have more than one element!");
}
ade_type_info::ade_type_info(const char* single_type) : _type(ade_type_info_type::Simple)
{
@@ -111,6 +110,9 @@ const ade_type_info& ade_type_iterator::getElementType() const { return _element
ade_type_alternative::ade_type_alternative(SCP_vector<ade_type_info> elements) : _elements(std::move(elements)) {}
const SCP_vector<ade_type_info>& ade_type_alternative::getElementTypes() const { return _elements; }
ade_type_tuple::ade_type_tuple(SCP_vector<ade_type_info> elements) : _elements(std::move(elements)) {}
const SCP_vector<ade_type_info>& ade_type_tuple::getElementTypes() const { return _elements; }
ade_type_function::ade_type_function(ade_type_info returnType, SCP_vector<ade_type_info> argumentTypes)
: _returnType(std::move(returnType)), _argumentTypes(std::move(argumentTypes))
{
+11 -1
View File
@@ -24,6 +24,7 @@ class ade_type_alternative;
class ade_type_function;
class ade_type_generic;
class ade_type_varargs;
class ade_type_tuple;
/**
* @brief A definition of a type used in the ADE system
@@ -39,7 +40,7 @@ class ade_type_info {
ade_type_info() = default;
/*implicit*/ ade_type_info(const char* single_type); // NOLINT(hicpp-explicit-conversions)
/*implicit*/ ade_type_info(SCP_string single_type);
/*implicit*/ ade_type_info(std::initializer_list<ade_type_info> tuple_types);
/*implicit*/ ade_type_info(const ade_type_tuple& tupleType);
/*implicit*/ ade_type_info(const ade_type_array& listType);
/*implicit*/ ade_type_info(const ade_type_map& listType);
/*implicit*/ ade_type_info(const ade_type_iterator& iteratorType);
@@ -115,6 +116,15 @@ class ade_type_alternative {
const SCP_vector<ade_type_info>& getElementTypes() const;
};
class ade_type_tuple {
SCP_vector<ade_type_info> _elements;
public:
explicit ade_type_tuple(SCP_vector<ade_type_info> elements);
const SCP_vector<ade_type_info>& getElementTypes() const;
};
class ade_type_function {
ade_type_info _returnType;
SCP_vector<ade_type_info> _argumentTypes;
+1 -1
View File
@@ -218,7 +218,7 @@ ADE_FUNC(await,
l_Async,
"promise",
"Suspends an asynchronous coroutine until the passed promise resolves.",
"unknown",
"any",
"The resolve value of the promise")
{
// await cannot be used on the main thread since there is nothing that will wait for the promise
+1 -1
View File
@@ -175,7 +175,7 @@ ADE_FUNC(findIntersection,
l_Base,
"vector line1_point1, vector line1_point2, vector line2_point1, vector line2_point2",
"Determines the point at which two lines intersect. (The lines are assumed to extend infinitely in both directions; the intersection will not necessarily be between the points.)",
ade_type_info({ "vector", "number" }),
"vector, number",
"Returns two arguments. The first is the point of intersection, if it exists and is unique (otherwise it will be NIL). The second is the find_intersection return value: 0 for a unique intersection, -1 if the lines are colinear, and -2 if the lines do not intersect.")
{
vec3d *p0 = nullptr, *p0_end = nullptr, *p1 = nullptr, *p1_end = nullptr;
+1 -1
View File
@@ -57,7 +57,7 @@ ADE_FUNC(fileExists, l_CFile, "string Filename, [string Path = \"\", boolean Che
ADE_FUNC(listFiles, l_CFile, "string directory, string filter",
"Lists all the files in the specified directory and optionally applies a filter. The filter must have the "
"format \"*<rest>\" (the wildcard has to appear at the start).",
ade_type_array("string"), "A table with all files in the directory or nil on error")
"string[]", "A table with all files in the directory or nil on error")
{
using namespace luacpp;
+3 -3
View File
@@ -841,7 +841,7 @@ ADE_FUNC(drawTargetingBrackets, l_Graphics, "object Object, [boolean draw=true,
"Gets the edge positions of targeting brackets for the specified object. The brackets will only be drawn if "
"draw is true or the default value of draw is used. Brackets are drawn with the current color. The brackets "
"will have a padding (distance from the actual bounding box); the default value (used elsewhere in FS2) is 5.",
ade_type_info({"number", "number", "number", "number"}),
"number, number, number, number",
"Left, top, right, and bottom positions of the brackets, or nil if invalid")
{
if(!Gr_inited) {
@@ -950,7 +950,7 @@ ADE_FUNC(
drawSubsystemTargetingBrackets, l_Graphics, "subsystem subsys, [boolean draw=true, boolean setColor=false]",
"Gets the edge position of the targeting brackets drawn for a subsystem as if they were drawn on the HUD. Only "
"actually draws the brackets if <i>draw</i> is true, optionally sets the color the as if it was drawn on the HUD",
ade_type_info({"number", "number", "number", "number"}),
"number, number, number, number",
"Left, top, right, and bottom positions of the brackets, or nil if invalid or off-screen")
{
if(!Gr_inited) {
@@ -1001,7 +1001,7 @@ ADE_FUNC(drawOffscreenIndicator, l_Graphics, "object Object, [boolean draw=true,
"Draws an off-screen indicator for the given object. The indicator will not be drawn if draw=false, but the "
"coordinates will be returned in either case. The indicator will be drawn using the current color if "
"setColor=true and using the IFF color of the object if setColor=false.",
ade_type_info({"number", "number"}),
"number, number",
"Coordinates of the indicator (at the very edge of the screen), or nil if object is on-screen")
{
object_h *objh = NULL;
+12 -4
View File
@@ -81,8 +81,12 @@ ADE_FUNC(setHUDGaugeColor, l_HUD,
return ADE_RETURN_TRUE;
}
ADE_FUNC(getHUDGaugeColor, l_HUD, "number gaugeIndex", "Color specified in the config to draw the gauge",
ade_type_info({"number", "number", "number", "number"}), "Red, green, blue, and alpha of the gauge")
ADE_FUNC(getHUDGaugeColor,
l_HUD,
"number gaugeIndex",
"Color specified in the config to draw the gauge",
"number, number, number, number",
"Red, green, blue, and alpha of the gauge")
{
int idx = -1;
@@ -118,8 +122,12 @@ ADE_FUNC(setHUDGaugeColorInMission, l_HUD,
return ADE_RETURN_TRUE;
}
ADE_FUNC(getHUDGaugeColorInMission, l_HUD, "number gaugeIndex", "Color currently used to draw the gauge",
ade_type_info({"number", "number", "number", "number"}), "Red, green, blue, and alpha of the gauge")
ADE_FUNC(getHUDGaugeColorInMission,
l_HUD,
"number gaugeIndex",
"Color currently used to draw the gauge",
"number, number, number, number",
"Red, green, blue, and alpha of the gauge")
{
int idx = -1;
+1 -1
View File
@@ -1508,7 +1508,7 @@ ADE_FUNC(getArrivalList,
l_Mission,
nullptr,
"Get the list of yet to arrive ships for this mission",
ade_type_iterator("parse_object"),
"iterator<parse_object>",
"An iterator across all the yet to arrive ships. Can be used in a for .. in loop")
{
return ade_set_args(L, "u*o", luacpp::LuaFunction::createFromCFunction(L, arrivalListIter),
+8 -5
View File
@@ -12,7 +12,7 @@ namespace api {
//**********LIBRARY: Mission
ADE_LIB(l_Options, "Options", "opt", "Options library");
ADE_VIRTVAR(Options, l_Options, nullptr, "The available options.", ade_type_array("option"), "A table of all the options.")
ADE_VIRTVAR(Options, l_Options, nullptr, "The available options.", "option[]", "A table of all the options.")
{
using namespace luacpp;
@@ -29,10 +29,13 @@ ADE_VIRTVAR(Options, l_Options, nullptr, "The available options.", ade_type_arra
return ade_set_args(L, "t", &table);
}
ADE_FUNC(persistChanges, l_Options, nullptr,
"Persist any changes made to the options system. Options can be incapable of applying changes immediately in "
"which case they are returned here.",
ade_type_array("option"), "The options that did not support changing their value")
ADE_FUNC(persistChanges,
l_Options,
nullptr,
"Persist any changes made to the options system. Options can be incapable of applying changes immediately in "
"which case they are returned here.",
"option[]",
"The options that did not support changing their value")
{
using namespace luacpp;
+5 -5
View File
@@ -133,7 +133,7 @@ ADE_VIRTVAR(ErrorCount, l_UserInterface_PilotSelect, nullptr, "The amount of err
}
ADE_FUNC(enumeratePilots, l_UserInterface_PilotSelect, nullptr,
"Lists all pilots available for the pilot selection<br>", ade_type_array("string"),
"Lists all pilots available for the pilot selection<br>", "string[]",
"A table containing the pilots (without a file extension) or nil on error")
{
using namespace luacpp;
@@ -243,7 +243,7 @@ ADE_LIB_DERIV(l_UserInterface_Barracks, "Barracks", nullptr,
l_UserInterface);
ADE_FUNC(listPilotImages, l_UserInterface_Barracks, nullptr, "Lists the names of the available pilot images.",
ade_type_array("string"), "The list of pilot filenames or nil on error")
"string[]", "The list of pilot filenames or nil on error")
{
pilot_load_pic_list();
@@ -257,7 +257,7 @@ ADE_FUNC(listPilotImages, l_UserInterface_Barracks, nullptr, "Lists the names of
}
ADE_FUNC(listSquadImages, l_UserInterface_Barracks, nullptr, "Lists the names of the available squad images.",
ade_type_array("string"), "The list of squad filenames or nil on error")
"string[]", "The list of squad filenames or nil on error")
{
pilot_load_squad_pic_list();
@@ -326,7 +326,7 @@ ADE_FUNC(getCampaignList,
l_UserInterface_Campaign,
nullptr,
"Get the campaign name and description lists",
ade_type_info({ade_type_array("string"), ade_type_array("string"), ade_type_array("string")}),
"string[], string[], string[]",
"Three tables with the names, file names, and descriptions of the campaigns")
{
luacpp::LuaTable nameTable = luacpp::LuaTable::create(L);
@@ -394,7 +394,7 @@ ADE_VIRTVAR(ColorTags,
l_UserInterface_CmdBrief,
nullptr,
"The available tagged colors",
ade_type_map("string", "color"),
"{ string => color ... }",
"A mapping from tag string to color value")
{
using namespace luacpp;
+7 -1
View File
@@ -16,7 +16,13 @@ bool lua_sexp_h::isValid() {
ADE_OBJ(l_LuaSEXP, lua_sexp_h, "LuaSEXP", "Lua SEXP handle");
ADE_VIRTVAR(Action, l_LuaSEXP, "function action", "The action of this SEXP", "function", "The action function or nil on error") {
ADE_VIRTVAR(Action,
l_LuaSEXP,
"function(any... args) => void action",
"The action of this SEXP",
"function(any... args) => void action",
"The action function or nil on error")
{
lua_sexp_h lua_sexp;
luacpp::LuaFunction action_arg;
if (!ade_get_args(L, "o|u", l_LuaSEXP.Get(&lua_sexp), &action_arg)) {
+24 -8
View File
@@ -123,8 +123,12 @@ ADE_FUNC(getBackgroundFileName, l_DisplayInfo, NULL, "Gets the file name of the
return ade_set_args(L, "s", cdi->bg_filename);
}
ADE_FUNC(getSize, l_DisplayInfo, nullptr, "Gets the size of this cockpit display", ade_type_info({"number", "number"}),
"Width and height of the display or -1, -1 on error")
ADE_FUNC(getSize,
l_DisplayInfo,
nullptr,
"Gets the size of this cockpit display",
"number, number",
"Width and height of the display or -1, -1 on error")
{
cockpit_disp_info_h *cdh = NULL;
@@ -142,8 +146,12 @@ ADE_FUNC(getSize, l_DisplayInfo, nullptr, "Gets the size of this cockpit display
return ade_set_args(L, "ii", cdi->size[0], cdi->size[1]);
}
ADE_FUNC(getOffset, l_DisplayInfo, nullptr, "Gets the offset of this cockpit display",
ade_type_info({"number", "number"}), "x and y offset of the display or -1, -1 on error")
ADE_FUNC(getOffset,
l_DisplayInfo,
nullptr,
"Gets the offset of this cockpit display",
"number, number",
"x and y offset of the display or -1, -1 on error")
{
cockpit_disp_info_h *cdh = NULL;
@@ -304,8 +312,12 @@ ADE_FUNC(getForegroundTexture, l_CockpitDisplay, NULL, "Gets the foreground text
return ade_set_args(L, "o", l_Texture.Set(texture_h(cd->foreground)));
}
ADE_FUNC(getSize, l_CockpitDisplay, nullptr, "Gets the size of this cockpit display",
ade_type_info({"number", "number"}), "Width and height of the display or -1, -1 on error")
ADE_FUNC(getSize,
l_CockpitDisplay,
nullptr,
"Gets the size of this cockpit display",
"number, number",
"Width and height of the display or -1, -1 on error")
{
cockpit_display_h *cdh = NULL;
@@ -323,8 +335,12 @@ ADE_FUNC(getSize, l_CockpitDisplay, nullptr, "Gets the size of this cockpit disp
return ade_set_args(L, "ii", cd->size[0], cd->size[1]);
}
ADE_FUNC(getOffset, l_CockpitDisplay, nullptr, "Gets the offset of this cockpit display",
ade_type_info({"number", "number"}), "x and y offset of the display or -1, -1 on error")
ADE_FUNC(getOffset,
l_CockpitDisplay,
nullptr,
"Gets the offset of this cockpit display",
"number, number",
"x and y offset of the display or -1, -1 on error")
{
cockpit_display_h *cdh = NULL;
+18 -7
View File
@@ -298,8 +298,12 @@ ADE_FUNC(clearLuaButtonInfo, l_Control_Info, NULL, "Clears the lua button contro
return ADE_RETURN_NIL;
}
ADE_FUNC(getButtonInfo, l_Control_Info, nullptr, "Access the four bitfields containing the button info",
ade_type_info({"number", "number", "number", "number"}), "Four bitfields")
ADE_FUNC(getButtonInfo,
l_Control_Info,
nullptr,
"Access the four bitfields containing the button info",
"number, number, number, number",
"Four bitfields")
{
int i;
int bi_status[4];
@@ -314,9 +318,12 @@ ADE_FUNC(getButtonInfo, l_Control_Info, nullptr, "Access the four bitfields cont
return ade_set_args(L, "iiii", bi_status[0], bi_status[1], bi_status[2], bi_status[3]);
}
ADE_FUNC(accessButtonInfo, l_Control_Info, "number, number, number, number",
"Access the four bitfields containing the button info",
ade_type_info({"number", "number", "number", "number"}), "Four bitfields")
ADE_FUNC(accessButtonInfo,
l_Control_Info,
"number, number, number, number",
"Access the four bitfields containing the button info",
"number, number, number, number",
"Four bitfields")
{
int i;
int bi_status[4];
@@ -423,8 +430,12 @@ ADE_VIRTVAR(AllButtonPolling, l_Control_Info, "boolean", "Toggles the all button
return ADE_RETURN_FALSE;
}
ADE_FUNC(pollAllButtons, l_Control_Info, nullptr, "Access the four bitfields containing the button info",
ade_type_info({"number", "number", "number", "number"}), "Four bitfields")
ADE_FUNC(pollAllButtons,
l_Control_Info,
nullptr,
"Access the four bitfields containing the button info",
"number, number, number, number",
"Four bitfields")
{
int i;
int bi_status[4];
+1 -1
View File
@@ -108,7 +108,7 @@ ADE_FUNC(read,
"<li>\"*a\" - Reads the rest of the file and returns it as a string.</li>"
"<li>\"*l\" - Reads a line. Skips the end of line markers.</li>"
"<li>(number) - Reads given number of characters, then returns them as a string.</li></ul>",
ade_type_varargs(ade_type_alternative({"number", "string"})),
"number|string...",
"Requested data, or nil if the function fails")
{
cfile_h* cfp = nullptr;
+1 -1
View File
@@ -803,7 +803,7 @@ ADE_FUNC(getNormal, l_Dockingbay, "number index", "Gets the normal of a docking
ADE_FUNC(computeDocker, l_Dockingbay, "dockingbay",
"Computes the final position and orientation of a docker bay that docks with this bay.",
ade_type_info({"vector", "orientation"}),
"vector, orientation",
"The local location and orientation of the docker vessel in the reference to the vessel of the docking bay "
"handle, or a nil value on error")
{
+1 -1
View File
@@ -392,7 +392,7 @@ ADE_FUNC(
checkRayCollision, l_Object, "vector StartPoint, vector EndPoint, [boolean Local=false]",
"Checks the collisions between the polygons of the current object and a ray. Start and end vectors are in world "
"coordinates",
ade_type_info({"vector", "collision_info"}),
"vector, collision_info",
"World collision point (local if boolean is set to true) and the specific collsision info, nil if no collisions")
{
object_h *objh = NULL;
+8 -5
View File
@@ -158,7 +158,7 @@ ADE_VIRTVAR(Flags,
"<li><b>ForceMultiValueSelection:</b> If true, a selection option with two values should be displayed the "
"same as an option with more possible values</li>"
"</ul>",
ade_type_map("string", "boolean"),
"{ string => boolean ... }",
"The table of flags values.")
{
option_h* opt;
@@ -216,10 +216,13 @@ ADE_FUNC(getInterpolantFromValue, l_Option, "ValueDescription value",
}
return ade_set_args(L, "f", opt->get()->getInterpolantFromValue(*value));
}
ADE_FUNC(getValidValues, l_Option, nullptr,
"Gets the valid values of this option. The order or the returned values must be maintained in the UI. This is "
"only valid for selection or boolean options.",
ade_type_array("ValueDescription"), "A table containing the possible values or nil on error.")
ADE_FUNC(getValidValues,
l_Option,
nullptr,
"Gets the valid values of this option. The order or the returned values must be maintained in the UI. This is "
"only valid for selection or boolean options.",
"ValueDescription[]",
"A table containing the possible values or nil on error.")
{
option_h* opt;
if (!ade_get_args(L, "o", l_Option.GetPtr(&opt))) {
+5 -5
View File
@@ -196,7 +196,7 @@ ADE_VIRTVAR(MainStatus, l_ParseObject, nullptr,
}
ADE_VIRTVAR(Subsystems, l_ParseObject, nullptr, "Get the list of subsystems of this parse object",
ade_type_array("parse_subsystem"), "An array of the parse subsystems of this object")
"parse_subsystem[]", "An array of the parse subsystems of this object")
{
parse_object_h* poh = nullptr;
if (!ade_get_args(L, "o", l_ParseObject.GetPtr(&poh)))
@@ -299,7 +299,7 @@ ADE_VIRTVAR(Damage, l_ParseSubsystem, "number", "The percentage to what the subs
return ade_set_args(L, "f", poh->getSubsys()->percent);
}
ADE_VIRTVAR(PrimaryBanks, l_ParseSubsystem, nullptr, "The overridden primary banks", ade_type_array("weaponclass"),
ADE_VIRTVAR(PrimaryBanks, l_ParseSubsystem, nullptr, "The overridden primary banks", "weaponclass[]",
"The primary bank weapons or nil if not changed from default")
{
parse_subsys_h* poh = nullptr;
@@ -337,7 +337,7 @@ ADE_VIRTVAR(PrimaryBanks, l_ParseSubsystem, nullptr, "The overridden primary ban
}
ADE_VIRTVAR(PrimaryAmmo, l_ParseSubsystem, nullptr, "The overridden primary ammunition, as a percentage of the default",
ade_type_array("weaponclass"), "The primary bank ammunition percantage or nil if not changed from default")
"weaponclass[]", "The primary bank ammunition percantage or nil if not changed from default")
{
parse_subsys_h* poh = nullptr;
float newPercentage = -1.0f;
@@ -374,7 +374,7 @@ ADE_VIRTVAR(PrimaryAmmo, l_ParseSubsystem, nullptr, "The overridden primary ammu
return ade_set_args(L, "t", tbl);
}
ADE_VIRTVAR(SecondaryBanks, l_ParseSubsystem, nullptr, "The overridden secondary banks", ade_type_array("weaponclass"),
ADE_VIRTVAR(SecondaryBanks, l_ParseSubsystem, nullptr, "The overridden secondary banks", "weaponclass[]",
"The secondary bank weapons or nil if not changed from default")
{
parse_subsys_h* poh = nullptr;
@@ -412,7 +412,7 @@ ADE_VIRTVAR(SecondaryBanks, l_ParseSubsystem, nullptr, "The overridden secondary
}
ADE_VIRTVAR(SecondaryAmmo, l_ParseSubsystem, nullptr, "The overridden secondary ammunition, as a percentage of the default",
ade_type_array("weaponclass"), "The secondary bank ammunition percantage or nil if not changed from default")
"weaponclass[]", "The secondary bank ammunition percantage or nil if not changed from default")
{
parse_subsys_h* poh = nullptr;
float newPercentage = -1.0f;
+2 -2
View File
@@ -113,7 +113,7 @@ ADE_FUNC(getValue,
l_Promise,
nullptr,
"Gets the resolved value of this promise. Causes an error when used on an unresolved or errored promise!",
"unknown",
"any",
"The resolved values.")
{
LuaPromise* promise = nullptr;
@@ -143,7 +143,7 @@ ADE_FUNC(getErrorValue,
l_Promise,
nullptr,
"Gets the error value of this promise. Causes an error when used on an unresolved or resolved promise!",
"unknown",
"any",
"The error values.")
{
LuaPromise* promise = nullptr;
+1 -1
View File
@@ -362,7 +362,7 @@ ADE_VIRTVAR(HitpointsMax, l_Shipclass, "number", "Ship class hitpoints", "number
return ade_set_args(L, "f", Ship_info[idx].max_hull_strength);
}
ADE_VIRTVAR(Species, l_Shipclass, "Species", "Ship class species", "species", "Ship class species, or invalid species handle if shipclass handle is invalid")
ADE_VIRTVAR(Species, l_Shipclass, "species", "Ship class species", "species", "Ship class species, or invalid species handle if shipclass handle is invalid")
{
int idx;
int sidx = -1;
+8 -5
View File
@@ -81,11 +81,14 @@ ADE_FUNC(getDuration, l_SoundEntry, NULL, "Gives the length of the sound in seco
return ade_set_args(L, "f", (i2fl(gamesnd_get_max_duration(seh->Get())) / 1000.0f));
}
ADE_FUNC(get3DValues, l_SoundEntry, "vector Postion, [number radius=0.0]",
"Computes the volume and the panning of the sound when it would be played from the specified position.<br>"
"If range is given then the volume will diminish when the listener is withing that distance to the source.<br>"
"The position of the listener is always the the current viewing position.",
ade_type_info({"number", "number"}), "The volume and the panning, in that sequence, or both -1 on error")
ADE_FUNC(get3DValues,
l_SoundEntry,
"vector Postion, [number radius=0.0]",
"Computes the volume and the panning of the sound when it would be played from the specified position.<br>"
"If range is given then the volume will diminish when the listener is withing that distance to the source.<br>"
"The position of the listener is always the the current viewing position.",
"number, number",
"The volume and the panning, in that sequence, or both -1 on error")
{
sound_entry_h *seh = NULL;
vec3d *sourcePos = NULL;
+4 -4
View File
@@ -40,7 +40,7 @@ streaminganim_h& streaminganim_h::operator=(streaminganim_h&& other) noexcept {
//**********HANDLE: streamingAnimation
ADE_OBJ(l_streaminganim, streaminganim_h, "streaminganim", "Streaming Animation handle");
ADE_VIRTVAR(Loop, l_streaminganim, "[boolean loop]", "Make the streaming animation loop.", "boolean", "Is the animation looping, or nil if anim invalid")
ADE_VIRTVAR(Loop, l_streaminganim, "boolean", "Make the streaming animation loop.", "boolean", "Is the animation looping, or nil if anim invalid")
{
streaminganim_h* sah;
bool loop = false;
@@ -61,7 +61,7 @@ ADE_VIRTVAR(Loop, l_streaminganim, "[boolean loop]", "Make the streaming animati
return ((sah->ga.direction & GENERIC_ANIM_DIRECTION_NOLOOP) == false ? ADE_RETURN_TRUE : ADE_RETURN_FALSE);
}
ADE_VIRTVAR(Pause, l_streaminganim, "[boolean pause]", "Pause the streaming animation.", "boolean", "Is the animation paused, or nil if anim invalid")
ADE_VIRTVAR(Pause, l_streaminganim, "boolean", "Pause the streaming animation.", "boolean", "Is the animation paused, or nil if anim invalid")
{
streaminganim_h* sah;
bool pause = false;
@@ -82,7 +82,7 @@ ADE_VIRTVAR(Pause, l_streaminganim, "[boolean pause]", "Pause the streaming anim
return ((sah->ga.direction & GENERIC_ANIM_DIRECTION_PAUSED) ? ADE_RETURN_TRUE : ADE_RETURN_FALSE);
}
ADE_VIRTVAR(Reverse, l_streaminganim, "[boolean reverse]", "Make the streaming animation play in reverse.", "boolean", "Is the animation playing in reverse, or nil if anim invalid")
ADE_VIRTVAR(Reverse, l_streaminganim, "boolean", "Make the streaming animation play in reverse.", "boolean", "Is the animation playing in reverse, or nil if anim invalid")
{
streaminganim_h* sah;
bool reverse = false;
@@ -103,7 +103,7 @@ ADE_VIRTVAR(Reverse, l_streaminganim, "[boolean reverse]", "Make the streaming a
return ((sah->ga.direction & GENERIC_ANIM_DIRECTION_BACKWARDS) ? ADE_RETURN_TRUE : ADE_RETURN_FALSE);
}
ADE_VIRTVAR(Grayscale, l_streaminganim, "[boolean flag]", "Whether the streaming animation is drawn as grayscale multiplied by the current color (the HUD method).", "boolean", "Boolean flag")
ADE_VIRTVAR(Grayscale, l_streaminganim, "boolean", "Whether the streaming animation is drawn as grayscale multiplied by the current color (the HUD method).", "boolean", "Boolean flag")
{
streaminganim_h* sah;
bool grayscale = false;
+2 -2
View File
@@ -690,7 +690,7 @@ ADE_FUNC(getTurretHeading, l_Subsystem, NULL, "Returns the turrets forward vecto
return ade_set_args(L, "o", l_Vector.Set(out));
}
ADE_FUNC(getFOVs, l_Subsystem, nullptr, "Returns current turrets FOVs", ade_type_info({"number", "number", "number"}),
ADE_FUNC(getFOVs, l_Subsystem, nullptr, "Returns current turrets FOVs", "number, number, number",
"Standard FOV, maximum barrel elevation, turret base fov.")
{
ship_subsys_h *sso;
@@ -713,7 +713,7 @@ ADE_FUNC(getFOVs, l_Subsystem, nullptr, "Returns current turrets FOVs", ade_type
ADE_FUNC(
getNextFiringPosition, l_Subsystem, nullptr,
"Retrieves the next position and firing normal this turret will fire from. This function returns a world position",
ade_type_info({"vector", "vector"}), "vector or null vector on error")
"vector, vector", "vector or null vector on error")
{
ship_subsys_h *sso;
if(!ade_get_args(L, "o", l_Subsystem.GetPtr(&sso)))
+6 -2
View File
@@ -39,8 +39,12 @@ ADE_VIRTVAR(Name, l_Team, "string", "Team name", "string", "Team name, or empty
return ade_set_args(L, "s", Iff_info[tdx].iff_name);
}
ADE_FUNC(getColor, l_Team, nullptr, "Gets the IFF color of the specified Team",
ade_type_info({"number", "number", "number"}), "rgb color for the specified team or nil if invalid")
ADE_FUNC(getColor,
l_Team,
nullptr,
"Gets the IFF color of the specified Team",
"number, number, number",
"rgb color for the specified team or nil if invalid")
{
int idx;
int r,g,b;
+7 -3
View File
@@ -549,8 +549,12 @@ ADE_FUNC(getCrossProduct,
return ade_set_args(L, "o", l_Vector.Set(v3r));
}
ADE_FUNC(getScreenCoords, l_Vector, nullptr, "Gets screen cordinates of a world vector",
ade_type_info({"number", "number"}), "X (number), Y (number), or false if off-screen")
ADE_FUNC(getScreenCoords,
l_Vector,
nullptr,
"Gets screen cordinates of a world vector",
"number, number",
"X (number), Y (number), or false if off-screen")
{
vec3d v3;
if (!ade_get_args(L, "o", l_Vector.Get(&v3))) {
@@ -639,7 +643,7 @@ ADE_FUNC(findNearestPointOnLine,
l_Vector,
"vector point1, vector point2",
"Finds the point on the line defined by point1 and point2 that is closest to this point. (The line is assumed to extend infinitely in both directions; the closest point will not necessarily be between the two points.)",
ade_type_info({ "vector", "number" }),
"vector, number",
"Returns two arguments. The first is the nearest point, and the second is a value indicating where on the line the point lies. From the code: '0.0 means nearest_point is p1; 1.0 means it's p2; 2.0 means it's beyond p2 by 2x; -1.0 means it's \"before\" p1 by 1x'.")
{
vec3d *point, *p0, *p1;
+9 -4
View File
@@ -168,6 +168,9 @@ void ade_output_type_link(FILE* fp, const ade_type_info& type_info)
fputs("...", fp);
break;
}
default:
Assertion(false, "Unhandled type!");
break;
}
}
@@ -265,8 +268,6 @@ void OutputElement(FILE* fp,
if (!el->shortName.empty())
fprintf(fp, " (%s)", el->shortName.c_str());
fputs("</h2>\n", fp);
if (el->type == ElementType::Class) {
const auto classEl = static_cast<DocumentationElementClass*>(el.get());
@@ -277,6 +278,8 @@ void OutputElement(FILE* fp,
classEl->superClass.c_str());
}
}
fputs("</h2>\n", fp);
}
fputs("</dt>\n", fp);
@@ -385,8 +388,10 @@ void OutputElement(FILE* fp,
fputs(propEl->shortName.c_str(), fp);
fputs("</b>\n", fp);
}
if (!propEl->setterType.empty())
fprintf(fp, " = <i>%s</i>", propEl->setterType.c_str());
if (!propEl->setterType.isEmpty()) {
fprintf(fp, " = ");
ade_output_type_link(fp, propEl->setterType);
}
fputs("</dt>\n", fp);
//***Description
+1 -1
View File
@@ -154,7 +154,7 @@ static void json_doc_generate_function(json_t* elObj, const DocumentationElement
static void json_doc_generate_property(json_t* elObj, const DocumentationElementProperty* lib)
{
json_object_set_new(elObj, "getterType", json_doc_generate_return_type(lib->getterType));
json_object_set_new(elObj, "setterType", json_string(lib->setterType.c_str()));
json_object_set_new(elObj, "setterType", json_doc_generate_return_type(lib->setterType));
json_object_set_new(elObj, "returnDocumentation", json_string(lib->returnDocumentation.c_str()));
}
static json_t* json_doc_generate_elements(const SCP_vector<std::unique_ptr<DocumentationElement>>& elements);
+139 -12
View File
@@ -34,54 +34,86 @@ ade_type_info merge_alternatives(const ade_type_info& left, const ade_type_info&
}
class BaseVisitor : public ArgumentListVisitor {
static void failure()
{
throw std::runtime_error("Unhandled node encountered!");
}
public:
antlrcpp::Any visitArg_list(ArgumentListParser::Arg_listContext* /*context*/) override
{
throw std::runtime_error("Unhandled node encountered!");
failure();
return antlrcpp::Any();
}
antlrcpp::Any visitStandalone_type(ArgumentListParser::Standalone_typeContext* /*context*/) override
{
failure();
return antlrcpp::Any();
}
antlrcpp::Any visitMap_type(ArgumentListParser::Map_typeContext* /*context*/) override
{
failure();
return antlrcpp::Any();
}
antlrcpp::Any visitIterator_type(ArgumentListParser::Iterator_typeContext* /*context*/) override
{
failure();
return antlrcpp::Any();
}
antlrcpp::Any visitSimple_type(ArgumentListParser::Simple_typeContext* /*context*/) override
{
throw std::runtime_error("Unhandled node encountered!");
failure();
return antlrcpp::Any();
}
antlrcpp::Any visitType(ArgumentListParser::TypeContext* /*context*/) override
{
throw std::runtime_error("Unhandled node encountered!");
failure();
return antlrcpp::Any();
}
antlrcpp::Any visitBoolean(ArgumentListParser::BooleanContext* /*context*/) override
{
throw std::runtime_error("Unhandled node encountered!");
failure();
return antlrcpp::Any();
}
antlrcpp::Any visitValue(ArgumentListParser::ValueContext* /*context*/) override
{
throw std::runtime_error("Unhandled node encountered!");
failure();
return antlrcpp::Any();
}
antlrcpp::Any visitActual_argument(ArgumentListParser::Actual_argumentContext* /*context*/) override
{
throw std::runtime_error("Unhandled node encountered!");
failure();
return antlrcpp::Any();
}
antlrcpp::Any visitOptional_argument(ArgumentListParser::Optional_argumentContext* /*context*/) override
{
throw std::runtime_error("Unhandled node encountered!");
failure();
return antlrcpp::Any();
}
antlrcpp::Any visitArgument(ArgumentListParser::ArgumentContext* /*context*/) override
{
throw std::runtime_error("Unhandled node encountered!");
failure();
return antlrcpp::Any();
}
antlrcpp::Any visitFunc_arg(ArgumentListParser::Func_argContext* /*context*/) override
{
throw std::runtime_error("Unhandled node encountered!");
failure();
return antlrcpp::Any();
}
antlrcpp::Any visitFunc_arglist(ArgumentListParser::Func_arglistContext* /*context*/) override
{
throw std::runtime_error("Unhandled node encountered!");
failure();
return antlrcpp::Any();
}
antlrcpp::Any visitFunction_type(ArgumentListParser::Function_typeContext* /*context*/) override
{
throw std::runtime_error("Unhandled node encountered!");
failure();
return antlrcpp::Any();
}
antlrcpp::Any visitVarargs_or_simple_type(ArgumentListParser::Varargs_or_simple_typeContext* /*context*/) override
{
throw std::runtime_error("Unhandled node encountered!");
failure();
return antlrcpp::Any();
}
};
@@ -143,6 +175,20 @@ class TypeVisitor : public BaseVisitor {
{
return visitChildren(context);
}
antlrcpp::Any visitStandalone_type(ArgumentListParser::Standalone_typeContext* context) override
{
const auto typeValue = visitChildren(context).as<ade_type_info>();
// We can't properly distinguish between alternate types and tuple types in aggregateResult so instead we do
// that here. For a single type, we just return that type
if (!context->COMMA().empty()) {
// We saw a comma in our rule so this is a tuple type
return ade_type_info(ade_type_tuple(typeValue.elements()));
}
// Otherwise just pass through the originally parsed type
return typeValue;
}
antlrcpp::Any visitFunction_type(ArgumentListParser::Function_typeContext* context) override
{
@@ -154,6 +200,21 @@ class TypeVisitor : public BaseVisitor {
return ade_type_info(ade_type_function(std::move(retType), std::move(argTypes)));
}
antlrcpp::Any visitMap_type(ArgumentListParser::Map_typeContext* context) override
{
const auto keyType = visit(context->type(0)).as<ade_type_info>();
const auto valueType = visit(context->type(1)).as<ade_type_info>();
return ade_type_info(ade_type_map(keyType, valueType));
}
antlrcpp::Any visitIterator_type(ArgumentListParser::Iterator_typeContext* context) override
{
const auto valueType = visit(context->type()).as<ade_type_info>();
return ade_type_info(ade_type_iterator(valueType));
}
antlrcpp::Any visitErrorNode(antlr4::tree::ErrorNode* /*node*/) override { return ade_type_info("<error type>"); }
protected:
@@ -281,6 +342,18 @@ class TypeCheckVisitor : public BaseVisitor {
{
return visitChildren(context);
}
antlrcpp::Any visitStandalone_type(ArgumentListParser::Standalone_typeContext* context) override
{
return visitChildren(context);
}
antlrcpp::Any visitMap_type(ArgumentListParser::Map_typeContext* context) override
{
return visitChildren(context);
}
antlrcpp::Any visitIterator_type(ArgumentListParser::Iterator_typeContext* context) override
{
return visitChildren(context);
}
antlrcpp::Any visitFunc_arg(ArgumentListParser::Func_argContext* context) override
{
@@ -386,4 +459,58 @@ const SCP_string& argument_list_parser::getErrorMessage() const
return _errorMessage;
}
type_parser::type_parser(const SCP_vector<SCP_string>& validTypeNames)
: _validTypeNames(validTypeNames.begin(), validTypeNames.end())
{
}
bool type_parser::parse(const SCP_string& type)
{
antlr4::ANTLRInputStream input(type);
ArgumentListLexer lexer(&input);
antlr4::CommonTokenStream tokens(&lexer);
ArgumentListParser parser(&tokens);
// By default we log to stderr which we do not want
parser.removeErrorListeners();
libs::antlr::ErrorListener errListener;
parser.addErrorListener(&errListener);
// Tuple type is the entry point for a standalone type
antlr4::tree::ParseTree* tree = parser.standalone_type();
TypeCheckVisitor typeChecker(&parser, _validTypeNames);
tree->accept(&typeChecker);
// If there were errors, output them
if (!errListener.diagnostics.empty()) {
SCP_stringstream outStream;
for (const auto& diag : errListener.diagnostics) {
SCP_string tokenUnderline;
if (diag.tokenLength > 1) {
tokenUnderline = SCP_string(diag.tokenLength - 1, '~');
}
outStream << type << "\n"
<< SCP_string(diag.columnInLine, ' ') << "^" << tokenUnderline << "\n"
<< diag.errorMessage << "\n";
}
_errorMessage = outStream.str();
} else {
TypeVisitor typeVisitor;
const auto typeAny = tree->accept(&typeVisitor);
_parsedType = typeAny.as<ade_type_info>();
}
return errListener.diagnostics.empty();
}
const ade_type_info& type_parser::getType() const
{
return _parsedType;
}
const SCP_string& type_parser::getErrorMessage() const
{
return _errorMessage;
}
} // namespace scripting
+17
View File
@@ -31,4 +31,21 @@ class argument_list_parser {
SCP_string _errorMessage;
};
class type_parser {
public:
explicit type_parser(const SCP_vector<SCP_string>& validTypeNames);
bool parse(const SCP_string& type);
const ade_type_info& getType() const;
const SCP_string& getErrorMessage() const;
private:
SCP_unordered_set<SCP_string> _validTypeNames;
ade_type_info _parsedType;
SCP_string _errorMessage;
};
} // namespace scripting
+1 -1
View File
@@ -43,7 +43,7 @@ struct DocumentationElementProperty : public DocumentationElement {
~DocumentationElementProperty() override = default;
scripting::ade_type_info getterType;
SCP_string setterType;
scripting::ade_type_info setterType;
SCP_string returnDocumentation;
};
+15 -4
View File
@@ -2,6 +2,9 @@ grammar ArgumentList;
arg_list: argument? EOF;
// This is used for parsing standalone types. Tuples are not valid in argument lists
standalone_type: type (COMMA type)*;
simple_type
: ID
| NIL
@@ -18,9 +21,16 @@ func_arglist
function_type: FUNCTION L_PAREN func_arglist R_PAREN ARROW type;
map_type: L_CURLY type ARROW type VARARGS_SPECIFIER R_CURLY;
iterator_type: ITERATOR L_ANGLE_BRACKET type R_ANGLE_BRACKET;
type
: varargs_or_simple_type
| function_type
| map_type
| iterator_type
| type L_BRACKET R_BRACKET // array types
| type (TYPE_ALT type)+ // Alternative types
;
@@ -51,10 +61,6 @@ STRING
| '\'' (~['\r\n])* '\''
;
PLACEHOLDER
: '<' (~[>])* '>'
;
NIL: 'nil';
TRUE: 'true';
@@ -83,8 +89,13 @@ R_BRACKET: ']';
L_PAREN: '(';
R_PAREN: ')';
L_CURLY: '{';
R_CURLY: '}';
ARROW: '=>';
ITERATOR: 'iterator';
L_ANGLE_BRACKET: '<';
R_ANGLE_BRACKET: '>';
@@ -3,7 +3,6 @@ null
','
'='
null
null
'nil'
'true'
'false'
@@ -15,7 +14,10 @@ null
']'
'('
')'
'{'
'}'
'=>'
'iterator'
'<'
'>'
null
@@ -28,7 +30,6 @@ null
COMMA
EQUALS
STRING
PLACEHOLDER
NIL
TRUE
FALSE
@@ -40,7 +41,10 @@ L_BRACKET
R_BRACKET
L_PAREN
R_PAREN
L_CURLY
R_CURLY
ARROW
ITERATOR
L_ANGLE_BRACKET
R_ANGLE_BRACKET
ARG_COMMENT
@@ -50,11 +54,14 @@ OTHER
rule names:
arg_list
standalone_type
simple_type
varargs_or_simple_type
func_arg
func_arglist
function_type
map_type
iterator_type
type
boolean
value
@@ -64,4 +71,4 @@ argument
atn:
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 24, 108, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 3, 2, 5, 2, 28, 10, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 5, 4, 36, 10, 4, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 7, 6, 45, 10, 6, 12, 6, 14, 6, 48, 11, 6, 5, 6, 50, 10, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 5, 8, 62, 10, 8, 3, 8, 3, 8, 3, 8, 6, 8, 67, 10, 8, 13, 8, 14, 8, 68, 7, 8, 71, 10, 8, 12, 8, 14, 8, 74, 11, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 83, 10, 10, 3, 11, 3, 11, 5, 11, 87, 10, 11, 3, 11, 3, 11, 5, 11, 91, 10, 11, 3, 11, 5, 11, 94, 10, 11, 3, 11, 3, 11, 5, 11, 98, 10, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 5, 13, 106, 10, 13, 3, 13, 2, 3, 14, 14, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 2, 4, 4, 2, 7, 7, 22, 22, 3, 2, 8, 9, 2, 111, 2, 27, 3, 2, 2, 2, 4, 31, 3, 2, 2, 2, 6, 33, 3, 2, 2, 2, 8, 37, 3, 2, 2, 2, 10, 49, 3, 2, 2, 2, 12, 51, 3, 2, 2, 2, 14, 61, 3, 2, 2, 2, 16, 75, 3, 2, 2, 2, 18, 82, 3, 2, 2, 2, 20, 84, 3, 2, 2, 2, 22, 99, 3, 2, 2, 2, 24, 105, 3, 2, 2, 2, 26, 28, 5, 24, 13, 2, 27, 26, 3, 2, 2, 2, 27, 28, 3, 2, 2, 2, 28, 29, 3, 2, 2, 2, 29, 30, 7, 2, 2, 3, 30, 3, 3, 2, 2, 2, 31, 32, 9, 2, 2, 2, 32, 5, 3, 2, 2, 2, 33, 35, 5, 4, 3, 2, 34, 36, 7, 11, 2, 2, 35, 34, 3, 2, 2, 2, 35, 36, 3, 2, 2, 2, 36, 7, 3, 2, 2, 2, 37, 38, 5, 14, 8, 2, 38, 39, 7, 22, 2, 2, 39, 9, 3, 2, 2, 2, 40, 50, 3, 2, 2, 2, 41, 46, 5, 8, 5, 2, 42, 43, 7, 3, 2, 2, 43, 45, 5, 8, 5, 2, 44, 42, 3, 2, 2, 2, 45, 48, 3, 2, 2, 2, 46, 44, 3, 2, 2, 2, 46, 47, 3, 2, 2, 2, 47, 50, 3, 2, 2, 2, 48, 46, 3, 2, 2, 2, 49, 40, 3, 2, 2, 2, 49, 41, 3, 2, 2, 2, 50, 11, 3, 2, 2, 2, 51, 52, 7, 10, 2, 2, 52, 53, 7, 16, 2, 2, 53, 54, 5, 10, 6, 2, 54, 55, 7, 17, 2, 2, 55, 56, 7, 18, 2, 2, 56, 57, 5, 14, 8, 2, 57, 13, 3, 2, 2, 2, 58, 59, 8, 8, 1, 2, 59, 62, 5, 6, 4, 2, 60, 62, 5, 12, 7, 2, 61, 58, 3, 2, 2, 2, 61, 60, 3, 2, 2, 2, 62, 72, 3, 2, 2, 2, 63, 66, 12, 3, 2, 2, 64, 65, 7, 13, 2, 2, 65, 67, 5, 14, 8, 2, 66, 64, 3, 2, 2, 2, 67, 68, 3, 2, 2, 2, 68, 66, 3, 2, 2, 2, 68, 69, 3, 2, 2, 2, 69, 71, 3, 2, 2, 2, 70, 63, 3, 2, 2, 2, 71, 74, 3, 2, 2, 2, 72, 70, 3, 2, 2, 2, 72, 73, 3, 2, 2, 2, 73, 15, 3, 2, 2, 2, 74, 72, 3, 2, 2, 2, 75, 76, 9, 3, 2, 2, 76, 17, 3, 2, 2, 2, 77, 83, 7, 5, 2, 2, 78, 83, 7, 7, 2, 2, 79, 83, 7, 12, 2, 2, 80, 83, 7, 22, 2, 2, 81, 83, 5, 16, 9, 2, 82, 77, 3, 2, 2, 2, 82, 78, 3, 2, 2, 2, 82, 79, 3, 2, 2, 2, 82, 80, 3, 2, 2, 2, 82, 81, 3, 2, 2, 2, 83, 19, 3, 2, 2, 2, 84, 86, 5, 14, 8, 2, 85, 87, 7, 22, 2, 2, 86, 85, 3, 2, 2, 2, 86, 87, 3, 2, 2, 2, 87, 90, 3, 2, 2, 2, 88, 89, 7, 4, 2, 2, 89, 91, 5, 18, 10, 2, 90, 88, 3, 2, 2, 2, 90, 91, 3, 2, 2, 2, 91, 93, 3, 2, 2, 2, 92, 94, 7, 21, 2, 2, 93, 92, 3, 2, 2, 2, 93, 94, 3, 2, 2, 2, 94, 97, 3, 2, 2, 2, 95, 96, 7, 3, 2, 2, 96, 98, 5, 24, 13, 2, 97, 95, 3, 2, 2, 2, 97, 98, 3, 2, 2, 2, 98, 21, 3, 2, 2, 2, 99, 100, 7, 14, 2, 2, 100, 101, 5, 20, 11, 2, 101, 102, 7, 15, 2, 2, 102, 23, 3, 2, 2, 2, 103, 106, 5, 20, 11, 2, 104, 106, 5, 22, 12, 2, 105, 103, 3, 2, 2, 2, 105, 104, 3, 2, 2, 2, 106, 25, 3, 2, 2, 2, 15, 27, 35, 46, 49, 61, 68, 72, 82, 86, 90, 93, 97, 105]
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 26, 139, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 3, 2, 5, 2, 34, 10, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 7, 3, 41, 10, 3, 12, 3, 14, 3, 44, 11, 3, 3, 4, 3, 4, 3, 5, 3, 5, 5, 5, 50, 10, 5, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 59, 10, 7, 12, 7, 14, 7, 62, 11, 7, 5, 7, 64, 10, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 5, 11, 90, 10, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 6, 11, 98, 10, 11, 13, 11, 14, 11, 99, 7, 11, 102, 10, 11, 12, 11, 14, 11, 105, 11, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 114, 10, 13, 3, 14, 3, 14, 5, 14, 118, 10, 14, 3, 14, 3, 14, 5, 14, 122, 10, 14, 3, 14, 5, 14, 125, 10, 14, 3, 14, 3, 14, 5, 14, 129, 10, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 5, 16, 137, 10, 16, 3, 16, 2, 3, 20, 17, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 2, 4, 4, 2, 6, 6, 24, 24, 3, 2, 7, 8, 2, 143, 2, 33, 3, 2, 2, 2, 4, 37, 3, 2, 2, 2, 6, 45, 3, 2, 2, 2, 8, 47, 3, 2, 2, 2, 10, 51, 3, 2, 2, 2, 12, 63, 3, 2, 2, 2, 14, 65, 3, 2, 2, 2, 16, 72, 3, 2, 2, 2, 18, 79, 3, 2, 2, 2, 20, 89, 3, 2, 2, 2, 22, 106, 3, 2, 2, 2, 24, 113, 3, 2, 2, 2, 26, 115, 3, 2, 2, 2, 28, 130, 3, 2, 2, 2, 30, 136, 3, 2, 2, 2, 32, 34, 5, 30, 16, 2, 33, 32, 3, 2, 2, 2, 33, 34, 3, 2, 2, 2, 34, 35, 3, 2, 2, 2, 35, 36, 7, 2, 2, 3, 36, 3, 3, 2, 2, 2, 37, 42, 5, 20, 11, 2, 38, 39, 7, 3, 2, 2, 39, 41, 5, 20, 11, 2, 40, 38, 3, 2, 2, 2, 41, 44, 3, 2, 2, 2, 42, 40, 3, 2, 2, 2, 42, 43, 3, 2, 2, 2, 43, 5, 3, 2, 2, 2, 44, 42, 3, 2, 2, 2, 45, 46, 9, 2, 2, 2, 46, 7, 3, 2, 2, 2, 47, 49, 5, 6, 4, 2, 48, 50, 7, 10, 2, 2, 49, 48, 3, 2, 2, 2, 49, 50, 3, 2, 2, 2, 50, 9, 3, 2, 2, 2, 51, 52, 5, 20, 11, 2, 52, 53, 7, 24, 2, 2, 53, 11, 3, 2, 2, 2, 54, 64, 3, 2, 2, 2, 55, 60, 5, 10, 6, 2, 56, 57, 7, 3, 2, 2, 57, 59, 5, 10, 6, 2, 58, 56, 3, 2, 2, 2, 59, 62, 3, 2, 2, 2, 60, 58, 3, 2, 2, 2, 60, 61, 3, 2, 2, 2, 61, 64, 3, 2, 2, 2, 62, 60, 3, 2, 2, 2, 63, 54, 3, 2, 2, 2, 63, 55, 3, 2, 2, 2, 64, 13, 3, 2, 2, 2, 65, 66, 7, 9, 2, 2, 66, 67, 7, 15, 2, 2, 67, 68, 5, 12, 7, 2, 68, 69, 7, 16, 2, 2, 69, 70, 7, 19, 2, 2, 70, 71, 5, 20, 11, 2, 71, 15, 3, 2, 2, 2, 72, 73, 7, 17, 2, 2, 73, 74, 5, 20, 11, 2, 74, 75, 7, 19, 2, 2, 75, 76, 5, 20, 11, 2, 76, 77, 7, 10, 2, 2, 77, 78, 7, 18, 2, 2, 78, 17, 3, 2, 2, 2, 79, 80, 7, 20, 2, 2, 80, 81, 7, 21, 2, 2, 81, 82, 5, 20, 11, 2, 82, 83, 7, 22, 2, 2, 83, 19, 3, 2, 2, 2, 84, 85, 8, 11, 1, 2, 85, 90, 5, 8, 5, 2, 86, 90, 5, 14, 8, 2, 87, 90, 5, 16, 9, 2, 88, 90, 5, 18, 10, 2, 89, 84, 3, 2, 2, 2, 89, 86, 3, 2, 2, 2, 89, 87, 3, 2, 2, 2, 89, 88, 3, 2, 2, 2, 90, 103, 3, 2, 2, 2, 91, 92, 12, 4, 2, 2, 92, 93, 7, 13, 2, 2, 93, 102, 7, 14, 2, 2, 94, 97, 12, 3, 2, 2, 95, 96, 7, 12, 2, 2, 96, 98, 5, 20, 11, 2, 97, 95, 3, 2, 2, 2, 98, 99, 3, 2, 2, 2, 99, 97, 3, 2, 2, 2, 99, 100, 3, 2, 2, 2, 100, 102, 3, 2, 2, 2, 101, 91, 3, 2, 2, 2, 101, 94, 3, 2, 2, 2, 102, 105, 3, 2, 2, 2, 103, 101, 3, 2, 2, 2, 103, 104, 3, 2, 2, 2, 104, 21, 3, 2, 2, 2, 105, 103, 3, 2, 2, 2, 106, 107, 9, 3, 2, 2, 107, 23, 3, 2, 2, 2, 108, 114, 7, 5, 2, 2, 109, 114, 7, 6, 2, 2, 110, 114, 7, 11, 2, 2, 111, 114, 7, 24, 2, 2, 112, 114, 5, 22, 12, 2, 113, 108, 3, 2, 2, 2, 113, 109, 3, 2, 2, 2, 113, 110, 3, 2, 2, 2, 113, 111, 3, 2, 2, 2, 113, 112, 3, 2, 2, 2, 114, 25, 3, 2, 2, 2, 115, 117, 5, 20, 11, 2, 116, 118, 7, 24, 2, 2, 117, 116, 3, 2, 2, 2, 117, 118, 3, 2, 2, 2, 118, 121, 3, 2, 2, 2, 119, 120, 7, 4, 2, 2, 120, 122, 5, 24, 13, 2, 121, 119, 3, 2, 2, 2, 121, 122, 3, 2, 2, 2, 122, 124, 3, 2, 2, 2, 123, 125, 7, 23, 2, 2, 124, 123, 3, 2, 2, 2, 124, 125, 3, 2, 2, 2, 125, 128, 3, 2, 2, 2, 126, 127, 7, 3, 2, 2, 127, 129, 5, 30, 16, 2, 128, 126, 3, 2, 2, 2, 128, 129, 3, 2, 2, 2, 129, 27, 3, 2, 2, 2, 130, 131, 7, 13, 2, 2, 131, 132, 5, 26, 14, 2, 132, 133, 7, 14, 2, 2, 133, 29, 3, 2, 2, 2, 134, 137, 5, 26, 14, 2, 135, 137, 5, 28, 15, 2, 136, 134, 3, 2, 2, 2, 136, 135, 3, 2, 2, 2, 137, 31, 3, 2, 2, 2, 17, 33, 42, 49, 60, 63, 89, 99, 101, 103, 113, 117, 121, 124, 128, 136]
@@ -1,36 +1,41 @@
COMMA=1
EQUALS=2
STRING=3
PLACEHOLDER=4
NIL=5
TRUE=6
FALSE=7
FUNCTION=8
VARARGS_SPECIFIER=9
NUMBER=10
TYPE_ALT=11
L_BRACKET=12
R_BRACKET=13
L_PAREN=14
R_PAREN=15
ARROW=16
L_ANGLE_BRACKET=17
R_ANGLE_BRACKET=18
ARG_COMMENT=19
ID=20
SPACE=21
OTHER=22
NIL=4
TRUE=5
FALSE=6
FUNCTION=7
VARARGS_SPECIFIER=8
NUMBER=9
TYPE_ALT=10
L_BRACKET=11
R_BRACKET=12
L_PAREN=13
R_PAREN=14
L_CURLY=15
R_CURLY=16
ARROW=17
ITERATOR=18
L_ANGLE_BRACKET=19
R_ANGLE_BRACKET=20
ARG_COMMENT=21
ID=22
SPACE=23
OTHER=24
','=1
'='=2
'nil'=5
'true'=6
'false'=7
'function'=8
'...'=9
'['=12
']'=13
'('=14
')'=15
'=>'=16
'<'=17
'>'=18
'nil'=4
'true'=5
'false'=6
'function'=7
'...'=8
'['=11
']'=12
'('=13
')'=14
'{'=15
'}'=16
'=>'=17
'iterator'=18
'<'=19
'>'=20
@@ -19,6 +19,10 @@ public:
return visitChildren(ctx);
}
virtual antlrcpp::Any visitStandalone_type(ArgumentListParser::Standalone_typeContext *ctx) override {
return visitChildren(ctx);
}
virtual antlrcpp::Any visitSimple_type(ArgumentListParser::Simple_typeContext *ctx) override {
return visitChildren(ctx);
}
@@ -39,6 +43,14 @@ public:
return visitChildren(ctx);
}
virtual antlrcpp::Any visitMap_type(ArgumentListParser::Map_typeContext *ctx) override {
return visitChildren(ctx);
}
virtual antlrcpp::Any visitIterator_type(ArgumentListParser::Iterator_typeContext *ctx) override {
return visitChildren(ctx);
}
virtual antlrcpp::Any visitType(ArgumentListParser::TypeContext *ctx) override {
return visitChildren(ctx);
}
+135 -129
View File
@@ -60,10 +60,11 @@ atn::ATN ArgumentListLexer::_atn;
std::vector<uint16_t> ArgumentListLexer::_serializedATN;
std::vector<std::string> ArgumentListLexer::_ruleNames = {
u8"COMMA", u8"EQUALS", u8"STRING", u8"PLACEHOLDER", u8"NIL", u8"TRUE",
u8"FALSE", u8"FUNCTION", u8"VARARGS_SPECIFIER", u8"NUMBER", u8"TYPE_ALT",
u8"L_BRACKET", u8"R_BRACKET", u8"L_PAREN", u8"R_PAREN", u8"ARROW", u8"L_ANGLE_BRACKET",
u8"R_ANGLE_BRACKET", u8"ARG_COMMENT", u8"ID", u8"SPACE", u8"OTHER"
u8"COMMA", u8"EQUALS", u8"STRING", u8"NIL", u8"TRUE", u8"FALSE", u8"FUNCTION",
u8"VARARGS_SPECIFIER", u8"NUMBER", u8"TYPE_ALT", u8"L_BRACKET", u8"R_BRACKET",
u8"L_PAREN", u8"R_PAREN", u8"L_CURLY", u8"R_CURLY", u8"ARROW", u8"ITERATOR",
u8"L_ANGLE_BRACKET", u8"R_ANGLE_BRACKET", u8"ARG_COMMENT", u8"ID", u8"SPACE",
u8"OTHER"
};
std::vector<std::string> ArgumentListLexer::_channelNames = {
@@ -75,16 +76,17 @@ std::vector<std::string> ArgumentListLexer::_modeNames = {
};
std::vector<std::string> ArgumentListLexer::_literalNames = {
"", u8"','", u8"'='", "", "", u8"'nil'", u8"'true'", u8"'false'", u8"'function'",
u8"'...'", "", "", u8"'['", u8"']'", u8"'('", u8"')'", u8"'=>'", u8"'<'",
u8"'>'"
"", u8"','", u8"'='", "", u8"'nil'", u8"'true'", u8"'false'", u8"'function'",
u8"'...'", "", "", u8"'['", u8"']'", u8"'('", u8"')'", u8"'{'", u8"'}'",
u8"'=>'", u8"'iterator'", u8"'<'", u8"'>'"
};
std::vector<std::string> ArgumentListLexer::_symbolicNames = {
"", u8"COMMA", u8"EQUALS", u8"STRING", u8"PLACEHOLDER", u8"NIL", u8"TRUE",
u8"FALSE", u8"FUNCTION", u8"VARARGS_SPECIFIER", u8"NUMBER", u8"TYPE_ALT",
u8"L_BRACKET", u8"R_BRACKET", u8"L_PAREN", u8"R_PAREN", u8"ARROW", u8"L_ANGLE_BRACKET",
u8"R_ANGLE_BRACKET", u8"ARG_COMMENT", u8"ID", u8"SPACE", u8"OTHER"
"", u8"COMMA", u8"EQUALS", u8"STRING", u8"NIL", u8"TRUE", u8"FALSE", u8"FUNCTION",
u8"VARARGS_SPECIFIER", u8"NUMBER", u8"TYPE_ALT", u8"L_BRACKET", u8"R_BRACKET",
u8"L_PAREN", u8"R_PAREN", u8"L_CURLY", u8"R_CURLY", u8"ARROW", u8"ITERATOR",
u8"L_ANGLE_BRACKET", u8"R_ANGLE_BRACKET", u8"ARG_COMMENT", u8"ID", u8"SPACE",
u8"OTHER"
};
dfa::Vocabulary ArgumentListLexer::_vocabulary(_literalNames, _symbolicNames);
@@ -108,129 +110,133 @@ ArgumentListLexer::Initializer::Initializer() {
_serializedATN = {
0x3, 0x608b, 0xa72a, 0x8133, 0xb9ed, 0x417c, 0x3be7, 0x7786, 0x5964,
0x2, 0x18, 0xb0, 0x8, 0x1, 0x4, 0x2, 0x9, 0x2, 0x4, 0x3, 0x9, 0x3, 0x4,
0x2, 0x1a, 0xb8, 0x8, 0x1, 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, 0x3, 0x2,
0x3, 0x2, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x4, 0x7, 0x4, 0x36, 0xa,
0x4, 0xc, 0x4, 0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x7, 0x2, 0x2, 0xad, 0xac, 0x3, 0x2, 0x2, 0x2,
0xae, 0xb1, 0x3, 0x2, 0x2, 0x2, 0xaf, 0xad, 0x3, 0x2, 0x2, 0x2, 0xaf,
0xb0, 0x3, 0x2, 0x2, 0x2, 0xb0, 0x2e, 0x3, 0x2, 0x2, 0x2, 0xb1, 0xaf,
0x3, 0x2, 0x2, 0x2, 0xb2, 0xb3, 0x9, 0x8, 0x2, 0x2, 0xb3, 0xb4, 0x3,
0x2, 0x2, 0x2, 0xb4, 0xb5, 0x8, 0x18, 0x2, 0x2, 0xb5, 0x30, 0x3, 0x2,
0x2, 0x2, 0xb6, 0xb7, 0xb, 0x2, 0x2, 0x2, 0xb7, 0x32, 0x3, 0x2, 0x2,
0x2, 0xe, 0x2, 0x3b, 0x43, 0x47, 0x66, 0x6b, 0x70, 0x76, 0x7d, 0x7f,
0xa5, 0xaf, 0x3, 0x8, 0x2, 0x2,
};
atn::ATNDeserializer deserializer;
@@ -12,11 +12,11 @@
class ArgumentListLexer : public antlr4::Lexer {
public:
enum {
COMMA = 1, EQUALS = 2, STRING = 3, PLACEHOLDER = 4, NIL = 5, TRUE = 6,
FALSE = 7, FUNCTION = 8, VARARGS_SPECIFIER = 9, NUMBER = 10, TYPE_ALT = 11,
L_BRACKET = 12, R_BRACKET = 13, L_PAREN = 14, R_PAREN = 15, ARROW = 16,
L_ANGLE_BRACKET = 17, R_ANGLE_BRACKET = 18, ARG_COMMENT = 19, ID = 20,
SPACE = 21, OTHER = 22
COMMA = 1, EQUALS = 2, STRING = 3, NIL = 4, TRUE = 5, FALSE = 6, FUNCTION = 7,
VARARGS_SPECIFIER = 8, NUMBER = 9, TYPE_ALT = 10, L_BRACKET = 11, R_BRACKET = 12,
L_PAREN = 13, R_PAREN = 14, L_CURLY = 15, R_CURLY = 16, ARROW = 17,
ITERATOR = 18, L_ANGLE_BRACKET = 19, R_ANGLE_BRACKET = 20, ARG_COMMENT = 21,
ID = 22, SPACE = 23, OTHER = 24
};
ArgumentListLexer(antlr4::CharStream *input);
@@ -3,7 +3,6 @@ null
','
'='
null
null
'nil'
'true'
'false'
@@ -15,7 +14,10 @@ null
']'
'('
')'
'{'
'}'
'=>'
'iterator'
'<'
'>'
null
@@ -28,7 +30,6 @@ null
COMMA
EQUALS
STRING
PLACEHOLDER
NIL
TRUE
FALSE
@@ -40,7 +41,10 @@ L_BRACKET
R_BRACKET
L_PAREN
R_PAREN
L_CURLY
R_CURLY
ARROW
ITERATOR
L_ANGLE_BRACKET
R_ANGLE_BRACKET
ARG_COMMENT
@@ -52,7 +56,6 @@ rule names:
COMMA
EQUALS
STRING
PLACEHOLDER
NIL
TRUE
FALSE
@@ -64,7 +67,10 @@ L_BRACKET
R_BRACKET
L_PAREN
R_PAREN
L_CURLY
R_CURLY
ARROW
ITERATOR
L_ANGLE_BRACKET
R_ANGLE_BRACKET
ARG_COMMENT
@@ -80,4 +86,4 @@ mode names:
DEFAULT_MODE
atn:
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 24, 176, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 7, 4, 54, 10, 4, 12, 4, 14, 4, 57, 11, 4, 3, 4, 3, 4, 3, 4, 7, 4, 62, 10, 4, 12, 4, 14, 4, 65, 11, 4, 3, 4, 5, 4, 68, 10, 4, 3, 5, 3, 5, 7, 5, 72, 10, 5, 12, 5, 14, 5, 75, 11, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 5, 11, 108, 10, 11, 3, 11, 6, 11, 111, 10, 11, 13, 11, 14, 11, 112, 3, 11, 6, 11, 116, 10, 11, 13, 11, 14, 11, 117, 3, 11, 3, 11, 7, 11, 122, 10, 11, 12, 11, 14, 11, 125, 11, 11, 3, 11, 3, 11, 6, 11, 129, 10, 11, 13, 11, 14, 11, 130, 5, 11, 133, 10, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 7, 20, 156, 10, 20, 12, 20, 14, 20, 159, 11, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 7, 21, 166, 10, 21, 12, 21, 14, 21, 169, 11, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 157, 2, 24, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 3, 2, 10, 5, 2, 12, 12, 15, 15, 36, 36, 5, 2, 12, 12, 15, 15, 41, 41, 3, 2, 64, 64, 3, 2, 50, 59, 4, 2, 49, 49, 126, 126, 5, 2, 67, 92, 97, 97, 99, 124, 6, 2, 50, 60, 67, 92, 97, 97, 99, 124, 5, 2, 11, 12, 15, 15, 34, 34, 2, 188, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 3, 47, 3, 2, 2, 2, 5, 49, 3, 2, 2, 2, 7, 67, 3, 2, 2, 2, 9, 69, 3, 2, 2, 2, 11, 78, 3, 2, 2, 2, 13, 82, 3, 2, 2, 2, 15, 87, 3, 2, 2, 2, 17, 93, 3, 2, 2, 2, 19, 102, 3, 2, 2, 2, 21, 107, 3, 2, 2, 2, 23, 134, 3, 2, 2, 2, 25, 136, 3, 2, 2, 2, 27, 138, 3, 2, 2, 2, 29, 140, 3, 2, 2, 2, 31, 142, 3, 2, 2, 2, 33, 144, 3, 2, 2, 2, 35, 147, 3, 2, 2, 2, 37, 149, 3, 2, 2, 2, 39, 151, 3, 2, 2, 2, 41, 163, 3, 2, 2, 2, 43, 170, 3, 2, 2, 2, 45, 174, 3, 2, 2, 2, 47, 48, 7, 46, 2, 2, 48, 4, 3, 2, 2, 2, 49, 50, 7, 63, 2, 2, 50, 6, 3, 2, 2, 2, 51, 55, 7, 36, 2, 2, 52, 54, 10, 2, 2, 2, 53, 52, 3, 2, 2, 2, 54, 57, 3, 2, 2, 2, 55, 53, 3, 2, 2, 2, 55, 56, 3, 2, 2, 2, 56, 58, 3, 2, 2, 2, 57, 55, 3, 2, 2, 2, 58, 68, 7, 36, 2, 2, 59, 63, 7, 41, 2, 2, 60, 62, 10, 3, 2, 2, 61, 60, 3, 2, 2, 2, 62, 65, 3, 2, 2, 2, 63, 61, 3, 2, 2, 2, 63, 64, 3, 2, 2, 2, 64, 66, 3, 2, 2, 2, 65, 63, 3, 2, 2, 2, 66, 68, 7, 41, 2, 2, 67, 51, 3, 2, 2, 2, 67, 59, 3, 2, 2, 2, 68, 8, 3, 2, 2, 2, 69, 73, 7, 62, 2, 2, 70, 72, 10, 4, 2, 2, 71, 70, 3, 2, 2, 2, 72, 75, 3, 2, 2, 2, 73, 71, 3, 2, 2, 2, 73, 74, 3, 2, 2, 2, 74, 76, 3, 2, 2, 2, 75, 73, 3, 2, 2, 2, 76, 77, 7, 64, 2, 2, 77, 10, 3, 2, 2, 2, 78, 79, 7, 112, 2, 2, 79, 80, 7, 107, 2, 2, 80, 81, 7, 110, 2, 2, 81, 12, 3, 2, 2, 2, 82, 83, 7, 118, 2, 2, 83, 84, 7, 116, 2, 2, 84, 85, 7, 119, 2, 2, 85, 86, 7, 103, 2, 2, 86, 14, 3, 2, 2, 2, 87, 88, 7, 104, 2, 2, 88, 89, 7, 99, 2, 2, 89, 90, 7, 110, 2, 2, 90, 91, 7, 117, 2, 2, 91, 92, 7, 103, 2, 2, 92, 16, 3, 2, 2, 2, 93, 94, 7, 104, 2, 2, 94, 95, 7, 119, 2, 2, 95, 96, 7, 112, 2, 2, 96, 97, 7, 101, 2, 2, 97, 98, 7, 118, 2, 2, 98, 99, 7, 107, 2, 2, 99, 100, 7, 113, 2, 2, 100, 101, 7, 112, 2, 2, 101, 18, 3, 2, 2, 2, 102, 103, 7, 48, 2, 2, 103, 104, 7, 48, 2, 2, 104, 105, 7, 48, 2, 2, 105, 20, 3, 2, 2, 2, 106, 108, 7, 47, 2, 2, 107, 106, 3, 2, 2, 2, 107, 108, 3, 2, 2, 2, 108, 132, 3, 2, 2, 2, 109, 111, 9, 5, 2, 2, 110, 109, 3, 2, 2, 2, 111, 112, 3, 2, 2, 2, 112, 110, 3, 2, 2, 2, 112, 113, 3, 2, 2, 2, 113, 133, 3, 2, 2, 2, 114, 116, 9, 5, 2, 2, 115, 114, 3, 2, 2, 2, 116, 117, 3, 2, 2, 2, 117, 115, 3, 2, 2, 2, 117, 118, 3, 2, 2, 2, 118, 119, 3, 2, 2, 2, 119, 123, 7, 48, 2, 2, 120, 122, 9, 5, 2, 2, 121, 120, 3, 2, 2, 2, 122, 125, 3, 2, 2, 2, 123, 121, 3, 2, 2, 2, 123, 124, 3, 2, 2, 2, 124, 133, 3, 2, 2, 2, 125, 123, 3, 2, 2, 2, 126, 128, 7, 48, 2, 2, 127, 129, 9, 5, 2, 2, 128, 127, 3, 2, 2, 2, 129, 130, 3, 2, 2, 2, 130, 128, 3, 2, 2, 2, 130, 131, 3, 2, 2, 2, 131, 133, 3, 2, 2, 2, 132, 110, 3, 2, 2, 2, 132, 115, 3, 2, 2, 2, 132, 126, 3, 2, 2, 2, 133, 22, 3, 2, 2, 2, 134, 135, 9, 6, 2, 2, 135, 24, 3, 2, 2, 2, 136, 137, 7, 93, 2, 2, 137, 26, 3, 2, 2, 2, 138, 139, 7, 95, 2, 2, 139, 28, 3, 2, 2, 2, 140, 141, 7, 42, 2, 2, 141, 30, 3, 2, 2, 2, 142, 143, 7, 43, 2, 2, 143, 32, 3, 2, 2, 2, 144, 145, 7, 63, 2, 2, 145, 146, 7, 64, 2, 2, 146, 34, 3, 2, Line truncated
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 26, 184, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 7, 4, 58, 10, 4, 12, 4, 14, 4, 61, 11, 4, 3, 4, 3, 4, 3, 4, 7, 4, 66, 10, 4, 12, 4, 14, 4, 69, 11, 4, 3, 4, 5, 4, 72, 10, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 5, 10, 103, 10, 10, 3, 10, 6, 10, 106, 10, 10, 13, 10, 14, 10, 107, 3, 10, 6, 10, 111, 10, 10, 13, 10, 14, 10, 112, 3, 10, 3, 10, 7, 10, 117, 10, 10, 12, 10, 14, 10, 120, 11, 10, 3, 10, 3, 10, 6, 10, 124, 10, 10, 13, 10, 14, 10, 125, 5, 10, 128, 10, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 7, 22, 164, 10, 22, 12, 22, 14, 22, 167, 11, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 7, 23, 174, 10, 23, 12, 23, 14, 23, 177, 11, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 165, 2, 26, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 3, 2, 9, 5, 2, 12, 12, 15, 15, 36, 36, 5, 2, 12, 12, 15, 15, 41, 41, 3, 2, 50, 59, 4, 2, 49, 49, 126, 126, 5, 2, 67, 92, 97, 97, 99, 124, 6, 2, 50, 60, 67, 92, 97, 97, 99, 124, 5, 2, 11, 12, 15, 15, 34, 34, 2, 195, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 3, 51, 3, 2, 2, 2, 5, 53, 3, 2, 2, 2, 7, 71, 3, 2, 2, 2, 9, 73, 3, 2, 2, 2, 11, 77, 3, 2, 2, 2, 13, 82, 3, 2, 2, 2, 15, 88, 3, 2, 2, 2, 17, 97, 3, 2, 2, 2, 19, 102, 3, 2, 2, 2, 21, 129, 3, 2, 2, 2, 23, 131, 3, 2, 2, 2, 25, 133, 3, 2, 2, 2, 27, 135, 3, 2, 2, 2, 29, 137, 3, 2, 2, 2, 31, 139, 3, 2, 2, 2, 33, 141, 3, 2, 2, 2, 35, 143, 3, 2, 2, 2, 37, 146, 3, 2, 2, 2, 39, 155, 3, 2, 2, 2, 41, 157, 3, 2, 2, 2, 43, 159, 3, 2, 2, 2, 45, 171, 3, 2, 2, 2, 47, 178, 3, 2, 2, 2, 49, 182, 3, 2, 2, 2, 51, 52, 7, 46, 2, 2, 52, 4, 3, 2, 2, 2, 53, 54, 7, 63, 2, 2, 54, 6, 3, 2, 2, 2, 55, 59, 7, 36, 2, 2, 56, 58, 10, 2, 2, 2, 57, 56, 3, 2, 2, 2, 58, 61, 3, 2, 2, 2, 59, 57, 3, 2, 2, 2, 59, 60, 3, 2, 2, 2, 60, 62, 3, 2, 2, 2, 61, 59, 3, 2, 2, 2, 62, 72, 7, 36, 2, 2, 63, 67, 7, 41, 2, 2, 64, 66, 10, 3, 2, 2, 65, 64, 3, 2, 2, 2, 66, 69, 3, 2, 2, 2, 67, 65, 3, 2, 2, 2, 67, 68, 3, 2, 2, 2, 68, 70, 3, 2, 2, 2, 69, 67, 3, 2, 2, 2, 70, 72, 7, 41, 2, 2, 71, 55, 3, 2, 2, 2, 71, 63, 3, 2, 2, 2, 72, 8, 3, 2, 2, 2, 73, 74, 7, 112, 2, 2, 74, 75, 7, 107, 2, 2, 75, 76, 7, 110, 2, 2, 76, 10, 3, 2, 2, 2, 77, 78, 7, 118, 2, 2, 78, 79, 7, 116, 2, 2, 79, 80, 7, 119, 2, 2, 80, 81, 7, 103, 2, 2, 81, 12, 3, 2, 2, 2, 82, 83, 7, 104, 2, 2, 83, 84, 7, 99, 2, 2, 84, 85, 7, 110, 2, 2, 85, 86, 7, 117, 2, 2, 86, 87, 7, 103, 2, 2, 87, 14, 3, 2, 2, 2, 88, 89, 7, 104, 2, 2, 89, 90, 7, 119, 2, 2, 90, 91, 7, 112, 2, 2, 91, 92, 7, 101, 2, 2, 92, 93, 7, 118, 2, 2, 93, 94, 7, 107, 2, 2, 94, 95, 7, 113, 2, 2, 95, 96, 7, 112, 2, 2, 96, 16, 3, 2, 2, 2, 97, 98, 7, 48, 2, 2, 98, 99, 7, 48, 2, 2, 99, 100, 7, 48, 2, 2, 100, 18, 3, 2, 2, 2, 101, 103, 7, 47, 2, 2, 102, 101, 3, 2, 2, 2, 102, 103, 3, 2, 2, 2, 103, 127, 3, 2, 2, 2, 104, 106, 9, 4, 2, 2, 105, 104, 3, 2, 2, 2, 106, 107, 3, 2, 2, 2, 107, 105, 3, 2, 2, 2, 107, 108, 3, 2, 2, 2, 108, 128, 3, 2, 2, 2, 109, 111, 9, 4, 2, 2, 110, 109, 3, 2, 2, 2, 111, 112, 3, 2, 2, 2, 112, 110, 3, 2, 2, 2, 112, 113, 3, 2, 2, 2, 113, 114, 3, 2, 2, 2, 114, 118, 7, 48, 2, 2, 115, 117, 9, 4, 2, 2, 116, 115, 3, 2, 2, 2, 117, 120, 3, 2, 2, 2, 118, 116, 3, 2, 2, 2, 118, 119, 3, 2, 2, 2, 119, 128, 3, 2, 2, 2, 120, 118, 3, 2, 2, 2, 121, 123, 7, 48, 2, 2, 122, 124, 9, 4, 2, 2, 123, 122, 3, 2, 2, 2, 124, 125, 3, 2, 2, 2, 125, 123, 3, 2, 2, 2, 125, 126, 3, 2, 2, 2, 126, 128, 3, 2, 2, 2, 127, 105, 3, 2, 2, 2, 127, 110, 3, 2, 2, 2, 127, 121, 3, 2, 2, 2, 128, 20, 3, 2, 2, 2, 129, 130, 9, 5, 2, 2, 130, 22, 3, 2, 2, 2, 131, 132, 7, 93, 2, 2, 132, 24, 3, 2, 2, 2, 133, 134, 7, 95, 2, 2, 134, 26, 3, 2, 2, 2, 135, 136, 7, 42, 2, 2, 136, 28, 3, 2, 2, 2, 137, 138, 7, 43, 2, 2, 138, 30, 3, 2, 2, 2, 139, 140, 7, 125, 2, 2, 140, 32, 3, 2, 2, 2, 141, 142, 7, 127, 2, 2, 142, 34, 3, 2, 2, 2, 143, 144, 7, 63, 2, 2, 144, 145, 7, 64, 2, 2, 145, 36Line truncated
@@ -1,36 +1,41 @@
COMMA=1
EQUALS=2
STRING=3
PLACEHOLDER=4
NIL=5
TRUE=6
FALSE=7
FUNCTION=8
VARARGS_SPECIFIER=9
NUMBER=10
TYPE_ALT=11
L_BRACKET=12
R_BRACKET=13
L_PAREN=14
R_PAREN=15
ARROW=16
L_ANGLE_BRACKET=17
R_ANGLE_BRACKET=18
ARG_COMMENT=19
ID=20
SPACE=21
OTHER=22
NIL=4
TRUE=5
FALSE=6
FUNCTION=7
VARARGS_SPECIFIER=8
NUMBER=9
TYPE_ALT=10
L_BRACKET=11
R_BRACKET=12
L_PAREN=13
R_PAREN=14
L_CURLY=15
R_CURLY=16
ARROW=17
ITERATOR=18
L_ANGLE_BRACKET=19
R_ANGLE_BRACKET=20
ARG_COMMENT=21
ID=22
SPACE=23
OTHER=24
','=1
'='=2
'nil'=5
'true'=6
'false'=7
'function'=8
'...'=9
'['=12
']'=13
'('=14
')'=15
'=>'=16
'<'=17
'>'=18
'nil'=4
'true'=5
'false'=6
'function'=7
'...'=8
'['=11
']'=12
'('=13
')'=14
'{'=15
'}'=16
'=>'=17
'iterator'=18
'<'=19
'>'=20
@@ -68,7 +68,7 @@ ArgumentListParser::Arg_listContext* ArgumentListParser::arg_list() {
});
try {
enterOuterAlt(_localctx, 1);
setState(25);
setState(31);
_errHandler->sync(this);
_la = _input->LA(1);
@@ -76,11 +76,13 @@ ArgumentListParser::Arg_listContext* ArgumentListParser::arg_list() {
((1ULL << _la) & ((1ULL << ArgumentListParser::NIL)
| (1ULL << ArgumentListParser::FUNCTION)
| (1ULL << ArgumentListParser::L_BRACKET)
| (1ULL << ArgumentListParser::L_CURLY)
| (1ULL << ArgumentListParser::ITERATOR)
| (1ULL << ArgumentListParser::ID))) != 0)) {
setState(24);
setState(30);
argument();
}
setState(27);
setState(33);
match(ArgumentListParser::EOF);
}
@@ -93,6 +95,76 @@ ArgumentListParser::Arg_listContext* ArgumentListParser::arg_list() {
return _localctx;
}
//----------------- Standalone_typeContext ------------------------------------------------------------------
ArgumentListParser::Standalone_typeContext::Standalone_typeContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
std::vector<ArgumentListParser::TypeContext *> ArgumentListParser::Standalone_typeContext::type() {
return getRuleContexts<ArgumentListParser::TypeContext>();
}
ArgumentListParser::TypeContext* ArgumentListParser::Standalone_typeContext::type(size_t i) {
return getRuleContext<ArgumentListParser::TypeContext>(i);
}
std::vector<tree::TerminalNode *> ArgumentListParser::Standalone_typeContext::COMMA() {
return getTokens(ArgumentListParser::COMMA);
}
tree::TerminalNode* ArgumentListParser::Standalone_typeContext::COMMA(size_t i) {
return getToken(ArgumentListParser::COMMA, i);
}
size_t ArgumentListParser::Standalone_typeContext::getRuleIndex() const {
return ArgumentListParser::RuleStandalone_type;
}
antlrcpp::Any ArgumentListParser::Standalone_typeContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<ArgumentListVisitor*>(visitor))
return parserVisitor->visitStandalone_type(this);
else
return visitor->visitChildren(this);
}
ArgumentListParser::Standalone_typeContext* ArgumentListParser::standalone_type() {
Standalone_typeContext *_localctx = _tracker.createInstance<Standalone_typeContext>(_ctx, getState());
enterRule(_localctx, 2, ArgumentListParser::RuleStandalone_type);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(35);
type(0);
setState(40);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == ArgumentListParser::COMMA) {
setState(36);
match(ArgumentListParser::COMMA);
setState(37);
type(0);
setState(42);
_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;
}
//----------------- Simple_typeContext ------------------------------------------------------------------
ArgumentListParser::Simple_typeContext::Simple_typeContext(ParserRuleContext *parent, size_t invokingState)
@@ -122,7 +194,7 @@ antlrcpp::Any ArgumentListParser::Simple_typeContext::accept(tree::ParseTreeVisi
ArgumentListParser::Simple_typeContext* ArgumentListParser::simple_type() {
Simple_typeContext *_localctx = _tracker.createInstance<Simple_typeContext>(_ctx, getState());
enterRule(_localctx, 2, ArgumentListParser::RuleSimple_type);
enterRule(_localctx, 4, ArgumentListParser::RuleSimple_type);
size_t _la = 0;
auto onExit = finally([=] {
@@ -130,7 +202,7 @@ ArgumentListParser::Simple_typeContext* ArgumentListParser::simple_type() {
});
try {
enterOuterAlt(_localctx, 1);
setState(29);
setState(43);
_la = _input->LA(1);
if (!(_la == ArgumentListParser::NIL
@@ -181,21 +253,21 @@ antlrcpp::Any ArgumentListParser::Varargs_or_simple_typeContext::accept(tree::Pa
ArgumentListParser::Varargs_or_simple_typeContext* ArgumentListParser::varargs_or_simple_type() {
Varargs_or_simple_typeContext *_localctx = _tracker.createInstance<Varargs_or_simple_typeContext>(_ctx, getState());
enterRule(_localctx, 4, ArgumentListParser::RuleVarargs_or_simple_type);
enterRule(_localctx, 6, ArgumentListParser::RuleVarargs_or_simple_type);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(31);
setState(45);
simple_type();
setState(33);
setState(47);
_errHandler->sync(this);
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 1, _ctx)) {
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 2, _ctx)) {
case 1: {
setState(32);
setState(46);
match(ArgumentListParser::VARARGS_SPECIFIER);
break;
}
@@ -241,16 +313,16 @@ antlrcpp::Any ArgumentListParser::Func_argContext::accept(tree::ParseTreeVisitor
ArgumentListParser::Func_argContext* ArgumentListParser::func_arg() {
Func_argContext *_localctx = _tracker.createInstance<Func_argContext>(_ctx, getState());
enterRule(_localctx, 6, ArgumentListParser::RuleFunc_arg);
enterRule(_localctx, 8, ArgumentListParser::RuleFunc_arg);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(35);
setState(49);
type(0);
setState(36);
setState(50);
match(ArgumentListParser::ID);
}
@@ -300,14 +372,14 @@ antlrcpp::Any ArgumentListParser::Func_arglistContext::accept(tree::ParseTreeVis
ArgumentListParser::Func_arglistContext* ArgumentListParser::func_arglist() {
Func_arglistContext *_localctx = _tracker.createInstance<Func_arglistContext>(_ctx, getState());
enterRule(_localctx, 8, ArgumentListParser::RuleFunc_arglist);
enterRule(_localctx, 10, ArgumentListParser::RuleFunc_arglist);
size_t _la = 0;
auto onExit = finally([=] {
exitRule();
});
try {
setState(47);
setState(61);
_errHandler->sync(this);
switch (_input->LA(1)) {
case ArgumentListParser::R_PAREN: {
@@ -318,19 +390,21 @@ ArgumentListParser::Func_arglistContext* ArgumentListParser::func_arglist() {
case ArgumentListParser::NIL:
case ArgumentListParser::FUNCTION:
case ArgumentListParser::L_CURLY:
case ArgumentListParser::ITERATOR:
case ArgumentListParser::ID: {
enterOuterAlt(_localctx, 2);
setState(39);
setState(53);
func_arg();
setState(44);
setState(58);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == ArgumentListParser::COMMA) {
setState(40);
setState(54);
match(ArgumentListParser::COMMA);
setState(41);
setState(55);
func_arg();
setState(46);
setState(60);
_errHandler->sync(this);
_la = _input->LA(1);
}
@@ -396,24 +470,24 @@ antlrcpp::Any ArgumentListParser::Function_typeContext::accept(tree::ParseTreeVi
ArgumentListParser::Function_typeContext* ArgumentListParser::function_type() {
Function_typeContext *_localctx = _tracker.createInstance<Function_typeContext>(_ctx, getState());
enterRule(_localctx, 10, ArgumentListParser::RuleFunction_type);
enterRule(_localctx, 12, ArgumentListParser::RuleFunction_type);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(49);
setState(63);
match(ArgumentListParser::FUNCTION);
setState(50);
setState(64);
match(ArgumentListParser::L_PAREN);
setState(51);
setState(65);
func_arglist();
setState(52);
setState(66);
match(ArgumentListParser::R_PAREN);
setState(53);
setState(67);
match(ArgumentListParser::ARROW);
setState(54);
setState(68);
type(0);
}
@@ -426,6 +500,144 @@ ArgumentListParser::Function_typeContext* ArgumentListParser::function_type() {
return _localctx;
}
//----------------- Map_typeContext ------------------------------------------------------------------
ArgumentListParser::Map_typeContext::Map_typeContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* ArgumentListParser::Map_typeContext::L_CURLY() {
return getToken(ArgumentListParser::L_CURLY, 0);
}
std::vector<ArgumentListParser::TypeContext *> ArgumentListParser::Map_typeContext::type() {
return getRuleContexts<ArgumentListParser::TypeContext>();
}
ArgumentListParser::TypeContext* ArgumentListParser::Map_typeContext::type(size_t i) {
return getRuleContext<ArgumentListParser::TypeContext>(i);
}
tree::TerminalNode* ArgumentListParser::Map_typeContext::ARROW() {
return getToken(ArgumentListParser::ARROW, 0);
}
tree::TerminalNode* ArgumentListParser::Map_typeContext::VARARGS_SPECIFIER() {
return getToken(ArgumentListParser::VARARGS_SPECIFIER, 0);
}
tree::TerminalNode* ArgumentListParser::Map_typeContext::R_CURLY() {
return getToken(ArgumentListParser::R_CURLY, 0);
}
size_t ArgumentListParser::Map_typeContext::getRuleIndex() const {
return ArgumentListParser::RuleMap_type;
}
antlrcpp::Any ArgumentListParser::Map_typeContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<ArgumentListVisitor*>(visitor))
return parserVisitor->visitMap_type(this);
else
return visitor->visitChildren(this);
}
ArgumentListParser::Map_typeContext* ArgumentListParser::map_type() {
Map_typeContext *_localctx = _tracker.createInstance<Map_typeContext>(_ctx, getState());
enterRule(_localctx, 14, ArgumentListParser::RuleMap_type);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(70);
match(ArgumentListParser::L_CURLY);
setState(71);
type(0);
setState(72);
match(ArgumentListParser::ARROW);
setState(73);
type(0);
setState(74);
match(ArgumentListParser::VARARGS_SPECIFIER);
setState(75);
match(ArgumentListParser::R_CURLY);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- Iterator_typeContext ------------------------------------------------------------------
ArgumentListParser::Iterator_typeContext::Iterator_typeContext(ParserRuleContext *parent, size_t invokingState)
: ParserRuleContext(parent, invokingState) {
}
tree::TerminalNode* ArgumentListParser::Iterator_typeContext::ITERATOR() {
return getToken(ArgumentListParser::ITERATOR, 0);
}
tree::TerminalNode* ArgumentListParser::Iterator_typeContext::L_ANGLE_BRACKET() {
return getToken(ArgumentListParser::L_ANGLE_BRACKET, 0);
}
ArgumentListParser::TypeContext* ArgumentListParser::Iterator_typeContext::type() {
return getRuleContext<ArgumentListParser::TypeContext>(0);
}
tree::TerminalNode* ArgumentListParser::Iterator_typeContext::R_ANGLE_BRACKET() {
return getToken(ArgumentListParser::R_ANGLE_BRACKET, 0);
}
size_t ArgumentListParser::Iterator_typeContext::getRuleIndex() const {
return ArgumentListParser::RuleIterator_type;
}
antlrcpp::Any ArgumentListParser::Iterator_typeContext::accept(tree::ParseTreeVisitor *visitor) {
if (auto parserVisitor = dynamic_cast<ArgumentListVisitor*>(visitor))
return parserVisitor->visitIterator_type(this);
else
return visitor->visitChildren(this);
}
ArgumentListParser::Iterator_typeContext* ArgumentListParser::iterator_type() {
Iterator_typeContext *_localctx = _tracker.createInstance<Iterator_typeContext>(_ctx, getState());
enterRule(_localctx, 16, ArgumentListParser::RuleIterator_type);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(77);
match(ArgumentListParser::ITERATOR);
setState(78);
match(ArgumentListParser::L_ANGLE_BRACKET);
setState(79);
type(0);
setState(80);
match(ArgumentListParser::R_ANGLE_BRACKET);
}
catch (RecognitionException &e) {
_errHandler->reportError(this, e);
_localctx->exception = std::current_exception();
_errHandler->recover(this, _localctx->exception);
}
return _localctx;
}
//----------------- TypeContext ------------------------------------------------------------------
ArgumentListParser::TypeContext::TypeContext(ParserRuleContext *parent, size_t invokingState)
@@ -440,6 +652,14 @@ ArgumentListParser::Function_typeContext* ArgumentListParser::TypeContext::funct
return getRuleContext<ArgumentListParser::Function_typeContext>(0);
}
ArgumentListParser::Map_typeContext* ArgumentListParser::TypeContext::map_type() {
return getRuleContext<ArgumentListParser::Map_typeContext>(0);
}
ArgumentListParser::Iterator_typeContext* ArgumentListParser::TypeContext::iterator_type() {
return getRuleContext<ArgumentListParser::Iterator_typeContext>(0);
}
std::vector<ArgumentListParser::TypeContext *> ArgumentListParser::TypeContext::type() {
return getRuleContexts<ArgumentListParser::TypeContext>();
}
@@ -448,6 +668,14 @@ ArgumentListParser::TypeContext* ArgumentListParser::TypeContext::type(size_t i)
return getRuleContext<ArgumentListParser::TypeContext>(i);
}
tree::TerminalNode* ArgumentListParser::TypeContext::L_BRACKET() {
return getToken(ArgumentListParser::L_BRACKET, 0);
}
tree::TerminalNode* ArgumentListParser::TypeContext::R_BRACKET() {
return getToken(ArgumentListParser::R_BRACKET, 0);
}
std::vector<tree::TerminalNode *> ArgumentListParser::TypeContext::TYPE_ALT() {
return getTokens(ArgumentListParser::TYPE_ALT);
}
@@ -480,8 +708,8 @@ ArgumentListParser::TypeContext* ArgumentListParser::type(int precedence) {
ArgumentListParser::TypeContext *_localctx = _tracker.createInstance<TypeContext>(_ctx, parentState);
ArgumentListParser::TypeContext *previousContext = _localctx;
(void)previousContext; // Silence compiler, in case the context is not used by generated code.
size_t startState = 12;
enterRecursionRule(_localctx, 12, ArgumentListParser::RuleType, precedence);
size_t startState = 18;
enterRecursionRule(_localctx, 18, ArgumentListParser::RuleType, precedence);
@@ -491,63 +719,96 @@ ArgumentListParser::TypeContext* ArgumentListParser::type(int precedence) {
try {
size_t alt;
enterOuterAlt(_localctx, 1);
setState(59);
setState(87);
_errHandler->sync(this);
switch (_input->LA(1)) {
case ArgumentListParser::NIL:
case ArgumentListParser::ID: {
setState(57);
setState(83);
varargs_or_simple_type();
break;
}
case ArgumentListParser::FUNCTION: {
setState(58);
setState(84);
function_type();
break;
}
case ArgumentListParser::L_CURLY: {
setState(85);
map_type();
break;
}
case ArgumentListParser::ITERATOR: {
setState(86);
iterator_type();
break;
}
default:
throw NoViableAltException(this);
}
_ctx->stop = _input->LT(-1);
setState(70);
setState(101);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 6, _ctx);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 8, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
if (!_parseListeners.empty())
triggerExitRuleEvent();
previousContext = _localctx;
_localctx = _tracker.createInstance<TypeContext>(parentContext, parentState);
pushNewRecursionContext(_localctx, startState, RuleType);
setState(61);
if (!(precpred(_ctx, 1))) throw FailedPredicateException(this, "precpred(_ctx, 1)");
setState(64);
setState(99);
_errHandler->sync(this);
alt = 1;
do {
switch (alt) {
case 1: {
setState(62);
match(ArgumentListParser::TYPE_ALT);
setState(63);
type(0);
break;
}
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 7, _ctx)) {
case 1: {
_localctx = _tracker.createInstance<TypeContext>(parentContext, parentState);
pushNewRecursionContext(_localctx, startState, RuleType);
setState(89);
default:
throw NoViableAltException(this);
}
setState(66);
if (!(precpred(_ctx, 2))) throw FailedPredicateException(this, "precpred(_ctx, 2)");
setState(90);
match(ArgumentListParser::L_BRACKET);
setState(91);
match(ArgumentListParser::R_BRACKET);
break;
}
case 2: {
_localctx = _tracker.createInstance<TypeContext>(parentContext, parentState);
pushNewRecursionContext(_localctx, startState, RuleType);
setState(92);
if (!(precpred(_ctx, 1))) throw FailedPredicateException(this, "precpred(_ctx, 1)");
setState(95);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 5, _ctx);
} while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER);
alt = 1;
do {
switch (alt) {
case 1: {
setState(93);
match(ArgumentListParser::TYPE_ALT);
setState(94);
type(0);
break;
}
default:
throw NoViableAltException(this);
}
setState(97);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 6, _ctx);
} while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER);
break;
}
}
}
setState(72);
setState(103);
_errHandler->sync(this);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 6, _ctx);
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 8, _ctx);
}
}
catch (RecognitionException &e) {
@@ -587,7 +848,7 @@ antlrcpp::Any ArgumentListParser::BooleanContext::accept(tree::ParseTreeVisitor
ArgumentListParser::BooleanContext* ArgumentListParser::boolean() {
BooleanContext *_localctx = _tracker.createInstance<BooleanContext>(_ctx, getState());
enterRule(_localctx, 14, ArgumentListParser::RuleBoolean);
enterRule(_localctx, 20, ArgumentListParser::RuleBoolean);
size_t _la = 0;
auto onExit = finally([=] {
@@ -595,7 +856,7 @@ ArgumentListParser::BooleanContext* ArgumentListParser::boolean() {
});
try {
enterOuterAlt(_localctx, 1);
setState(73);
setState(104);
_la = _input->LA(1);
if (!(_la == ArgumentListParser::TRUE
@@ -658,39 +919,39 @@ antlrcpp::Any ArgumentListParser::ValueContext::accept(tree::ParseTreeVisitor *v
ArgumentListParser::ValueContext* ArgumentListParser::value() {
ValueContext *_localctx = _tracker.createInstance<ValueContext>(_ctx, getState());
enterRule(_localctx, 16, ArgumentListParser::RuleValue);
enterRule(_localctx, 22, ArgumentListParser::RuleValue);
auto onExit = finally([=] {
exitRule();
});
try {
setState(80);
setState(111);
_errHandler->sync(this);
switch (_input->LA(1)) {
case ArgumentListParser::STRING: {
enterOuterAlt(_localctx, 1);
setState(75);
setState(106);
match(ArgumentListParser::STRING);
break;
}
case ArgumentListParser::NIL: {
enterOuterAlt(_localctx, 2);
setState(76);
setState(107);
match(ArgumentListParser::NIL);
break;
}
case ArgumentListParser::NUMBER: {
enterOuterAlt(_localctx, 3);
setState(77);
setState(108);
match(ArgumentListParser::NUMBER);
break;
}
case ArgumentListParser::ID: {
enterOuterAlt(_localctx, 4);
setState(78);
setState(109);
match(ArgumentListParser::ID);
break;
}
@@ -698,7 +959,7 @@ ArgumentListParser::ValueContext* ArgumentListParser::value() {
case ArgumentListParser::TRUE:
case ArgumentListParser::FALSE: {
enterOuterAlt(_localctx, 5);
setState(79);
setState(110);
boolean();
break;
}
@@ -766,7 +1027,7 @@ antlrcpp::Any ArgumentListParser::Actual_argumentContext::accept(tree::ParseTree
ArgumentListParser::Actual_argumentContext* ArgumentListParser::actual_argument() {
Actual_argumentContext *_localctx = _tracker.createInstance<Actual_argumentContext>(_ctx, getState());
enterRule(_localctx, 18, ArgumentListParser::RuleActual_argument);
enterRule(_localctx, 24, ArgumentListParser::RuleActual_argument);
size_t _la = 0;
auto onExit = finally([=] {
@@ -774,42 +1035,42 @@ ArgumentListParser::Actual_argumentContext* ArgumentListParser::actual_argument(
});
try {
enterOuterAlt(_localctx, 1);
setState(82);
setState(113);
type(0);
setState(84);
setState(115);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == ArgumentListParser::ID) {
setState(83);
setState(114);
match(ArgumentListParser::ID);
}
setState(88);
setState(119);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == ArgumentListParser::EQUALS) {
setState(86);
setState(117);
match(ArgumentListParser::EQUALS);
setState(87);
setState(118);
value();
}
setState(91);
setState(122);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == ArgumentListParser::ARG_COMMENT) {
setState(90);
setState(121);
match(ArgumentListParser::ARG_COMMENT);
}
setState(95);
setState(126);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == ArgumentListParser::COMMA) {
setState(93);
setState(124);
match(ArgumentListParser::COMMA);
setState(94);
setState(125);
argument();
}
@@ -856,18 +1117,18 @@ antlrcpp::Any ArgumentListParser::Optional_argumentContext::accept(tree::ParseTr
ArgumentListParser::Optional_argumentContext* ArgumentListParser::optional_argument() {
Optional_argumentContext *_localctx = _tracker.createInstance<Optional_argumentContext>(_ctx, getState());
enterRule(_localctx, 20, ArgumentListParser::RuleOptional_argument);
enterRule(_localctx, 26, ArgumentListParser::RuleOptional_argument);
auto onExit = finally([=] {
exitRule();
});
try {
enterOuterAlt(_localctx, 1);
setState(97);
setState(128);
match(ArgumentListParser::L_BRACKET);
setState(98);
setState(129);
actual_argument();
setState(99);
setState(130);
match(ArgumentListParser::R_BRACKET);
}
@@ -909,27 +1170,29 @@ antlrcpp::Any ArgumentListParser::ArgumentContext::accept(tree::ParseTreeVisitor
ArgumentListParser::ArgumentContext* ArgumentListParser::argument() {
ArgumentContext *_localctx = _tracker.createInstance<ArgumentContext>(_ctx, getState());
enterRule(_localctx, 22, ArgumentListParser::RuleArgument);
enterRule(_localctx, 28, ArgumentListParser::RuleArgument);
auto onExit = finally([=] {
exitRule();
});
try {
setState(103);
setState(134);
_errHandler->sync(this);
switch (_input->LA(1)) {
case ArgumentListParser::NIL:
case ArgumentListParser::FUNCTION:
case ArgumentListParser::L_CURLY:
case ArgumentListParser::ITERATOR:
case ArgumentListParser::ID: {
enterOuterAlt(_localctx, 1);
setState(101);
setState(132);
actual_argument();
break;
}
case ArgumentListParser::L_BRACKET: {
enterOuterAlt(_localctx, 2);
setState(102);
setState(133);
optional_argument();
break;
}
@@ -950,7 +1213,7 @@ ArgumentListParser::ArgumentContext* ArgumentListParser::argument() {
bool ArgumentListParser::sempred(RuleContext *context, size_t ruleIndex, size_t predicateIndex) {
switch (ruleIndex) {
case 6: return typeSempred(dynamic_cast<TypeContext *>(context), predicateIndex);
case 9: return typeSempred(dynamic_cast<TypeContext *>(context), predicateIndex);
default:
break;
@@ -960,7 +1223,8 @@ bool ArgumentListParser::sempred(RuleContext *context, size_t ruleIndex, size_t
bool ArgumentListParser::typeSempred(TypeContext *_localctx, size_t predicateIndex) {
switch (predicateIndex) {
case 0: return precpred(_ctx, 1);
case 0: return precpred(_ctx, 2);
case 1: return precpred(_ctx, 1);
default:
break;
@@ -977,21 +1241,22 @@ atn::ATN ArgumentListParser::_atn;
std::vector<uint16_t> ArgumentListParser::_serializedATN;
std::vector<std::string> ArgumentListParser::_ruleNames = {
"arg_list", "simple_type", "varargs_or_simple_type", "func_arg", "func_arglist",
"function_type", "type", "boolean", "value", "actual_argument", "optional_argument",
"argument"
"arg_list", "standalone_type", "simple_type", "varargs_or_simple_type",
"func_arg", "func_arglist", "function_type", "map_type", "iterator_type",
"type", "boolean", "value", "actual_argument", "optional_argument", "argument"
};
std::vector<std::string> ArgumentListParser::_literalNames = {
"", "','", "'='", "", "", "'nil'", "'true'", "'false'", "'function'",
"'...'", "", "", "'['", "']'", "'('", "')'", "'=>'", "'<'", "'>'"
"", "','", "'='", "", "'nil'", "'true'", "'false'", "'function'", "'...'",
"", "", "'['", "']'", "'('", "')'", "'{'", "'}'", "'=>'", "'iterator'",
"'<'", "'>'"
};
std::vector<std::string> ArgumentListParser::_symbolicNames = {
"", "COMMA", "EQUALS", "STRING", "PLACEHOLDER", "NIL", "TRUE", "FALSE",
"FUNCTION", "VARARGS_SPECIFIER", "NUMBER", "TYPE_ALT", "L_BRACKET", "R_BRACKET",
"L_PAREN", "R_PAREN", "ARROW", "L_ANGLE_BRACKET", "R_ANGLE_BRACKET", "ARG_COMMENT",
"ID", "SPACE", "OTHER"
"", "COMMA", "EQUALS", "STRING", "NIL", "TRUE", "FALSE", "FUNCTION", "VARARGS_SPECIFIER",
"NUMBER", "TYPE_ALT", "L_BRACKET", "R_BRACKET", "L_PAREN", "R_PAREN",
"L_CURLY", "R_CURLY", "ARROW", "ITERATOR", "L_ANGLE_BRACKET", "R_ANGLE_BRACKET",
"ARG_COMMENT", "ID", "SPACE", "OTHER"
};
dfa::Vocabulary ArgumentListParser::_vocabulary(_literalNames, _symbolicNames);
@@ -1014,77 +1279,97 @@ ArgumentListParser::Initializer::Initializer() {
_serializedATN = {
0x3, 0x608b, 0xa72a, 0x8133, 0xb9ed, 0x417c, 0x3be7, 0x7786, 0x5964,
0x3, 0x18, 0x6c, 0x4, 0x2, 0x9, 0x2, 0x4, 0x3, 0x9, 0x3, 0x4, 0x4, 0x9,
0x3, 0x1a, 0x8b, 0x4, 0x2, 0x9, 0x2, 0x4, 0x3, 0x9, 0x3, 0x4, 0x4, 0x9,
0x4, 0x4, 0x5, 0x9, 0x5, 0x4, 0x6, 0x9, 0x6, 0x4, 0x7, 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e, 0x2,
0x87, 0x89, 0x5, 0x1c, 0xf, 0x2, 0x88, 0x86, 0x3, 0x2, 0x2, 0x2, 0x88,
0x87, 0x3, 0x2, 0x2, 0x2, 0x89, 0x1f, 0x3, 0x2, 0x2, 0x2, 0x11, 0x21,
0x2a, 0x31, 0x3c, 0x3f, 0x59, 0x63, 0x65, 0x67, 0x71, 0x75, 0x79, 0x7c,
0x80, 0x88,
};
atn::ATNDeserializer deserializer;
@@ -12,18 +12,18 @@
class ArgumentListParser : public antlr4::Parser {
public:
enum {
COMMA = 1, EQUALS = 2, STRING = 3, PLACEHOLDER = 4, NIL = 5, TRUE = 6,
FALSE = 7, FUNCTION = 8, VARARGS_SPECIFIER = 9, NUMBER = 10, TYPE_ALT = 11,
L_BRACKET = 12, R_BRACKET = 13, L_PAREN = 14, R_PAREN = 15, ARROW = 16,
L_ANGLE_BRACKET = 17, R_ANGLE_BRACKET = 18, ARG_COMMENT = 19, ID = 20,
SPACE = 21, OTHER = 22
COMMA = 1, EQUALS = 2, STRING = 3, NIL = 4, TRUE = 5, FALSE = 6, FUNCTION = 7,
VARARGS_SPECIFIER = 8, NUMBER = 9, TYPE_ALT = 10, L_BRACKET = 11, R_BRACKET = 12,
L_PAREN = 13, R_PAREN = 14, L_CURLY = 15, R_CURLY = 16, ARROW = 17,
ITERATOR = 18, L_ANGLE_BRACKET = 19, R_ANGLE_BRACKET = 20, ARG_COMMENT = 21,
ID = 22, SPACE = 23, OTHER = 24
};
enum {
RuleArg_list = 0, RuleSimple_type = 1, RuleVarargs_or_simple_type = 2,
RuleFunc_arg = 3, RuleFunc_arglist = 4, RuleFunction_type = 5, RuleType = 6,
RuleBoolean = 7, RuleValue = 8, RuleActual_argument = 9, RuleOptional_argument = 10,
RuleArgument = 11
RuleArg_list = 0, RuleStandalone_type = 1, RuleSimple_type = 2, RuleVarargs_or_simple_type = 3,
RuleFunc_arg = 4, RuleFunc_arglist = 5, RuleFunction_type = 6, RuleMap_type = 7,
RuleIterator_type = 8, RuleType = 9, RuleBoolean = 10, RuleValue = 11,
RuleActual_argument = 12, RuleOptional_argument = 13, RuleArgument = 14
};
ArgumentListParser(antlr4::TokenStream *input);
@@ -37,11 +37,14 @@ public:
class Arg_listContext;
class Standalone_typeContext;
class Simple_typeContext;
class Varargs_or_simple_typeContext;
class Func_argContext;
class Func_arglistContext;
class Function_typeContext;
class Map_typeContext;
class Iterator_typeContext;
class TypeContext;
class BooleanContext;
class ValueContext;
@@ -63,6 +66,22 @@ public:
Arg_listContext* arg_list();
class Standalone_typeContext : public antlr4::ParserRuleContext {
public:
Standalone_typeContext(antlr4::ParserRuleContext *parent, size_t invokingState);
virtual size_t getRuleIndex() const override;
std::vector<TypeContext *> type();
TypeContext* type(size_t i);
std::vector<antlr4::tree::TerminalNode *> COMMA();
antlr4::tree::TerminalNode* COMMA(size_t i);
virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override;
};
Standalone_typeContext* standalone_type();
class Simple_typeContext : public antlr4::ParserRuleContext {
public:
Simple_typeContext(antlr4::ParserRuleContext *parent, size_t invokingState);
@@ -139,14 +158,52 @@ public:
Function_typeContext* function_type();
class Map_typeContext : public antlr4::ParserRuleContext {
public:
Map_typeContext(antlr4::ParserRuleContext *parent, size_t invokingState);
virtual size_t getRuleIndex() const override;
antlr4::tree::TerminalNode *L_CURLY();
std::vector<TypeContext *> type();
TypeContext* type(size_t i);
antlr4::tree::TerminalNode *ARROW();
antlr4::tree::TerminalNode *VARARGS_SPECIFIER();
antlr4::tree::TerminalNode *R_CURLY();
virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override;
};
Map_typeContext* map_type();
class Iterator_typeContext : public antlr4::ParserRuleContext {
public:
Iterator_typeContext(antlr4::ParserRuleContext *parent, size_t invokingState);
virtual size_t getRuleIndex() const override;
antlr4::tree::TerminalNode *ITERATOR();
antlr4::tree::TerminalNode *L_ANGLE_BRACKET();
TypeContext *type();
antlr4::tree::TerminalNode *R_ANGLE_BRACKET();
virtual antlrcpp::Any accept(antlr4::tree::ParseTreeVisitor *visitor) override;
};
Iterator_typeContext* iterator_type();
class TypeContext : public antlr4::ParserRuleContext {
public:
TypeContext(antlr4::ParserRuleContext *parent, size_t invokingState);
virtual size_t getRuleIndex() const override;
Varargs_or_simple_typeContext *varargs_or_simple_type();
Function_typeContext *function_type();
Map_typeContext *map_type();
Iterator_typeContext *iterator_type();
std::vector<TypeContext *> type();
TypeContext* type(size_t i);
antlr4::tree::TerminalNode *L_BRACKET();
antlr4::tree::TerminalNode *R_BRACKET();
std::vector<antlr4::tree::TerminalNode *> TYPE_ALT();
antlr4::tree::TerminalNode* TYPE_ALT(size_t i);
@@ -21,6 +21,8 @@ public:
*/
virtual antlrcpp::Any visitArg_list(ArgumentListParser::Arg_listContext *context) = 0;
virtual antlrcpp::Any visitStandalone_type(ArgumentListParser::Standalone_typeContext *context) = 0;
virtual antlrcpp::Any visitSimple_type(ArgumentListParser::Simple_typeContext *context) = 0;
virtual antlrcpp::Any visitVarargs_or_simple_type(ArgumentListParser::Varargs_or_simple_typeContext *context) = 0;
@@ -31,6 +33,10 @@ public:
virtual antlrcpp::Any visitFunction_type(ArgumentListParser::Function_typeContext *context) = 0;
virtual antlrcpp::Any visitMap_type(ArgumentListParser::Map_typeContext *context) = 0;
virtual antlrcpp::Any visitIterator_type(ArgumentListParser::Iterator_typeContext *context) = 0;
virtual antlrcpp::Any visitType(ArgumentListParser::TypeContext *context) = 0;
virtual antlrcpp::Any visitBoolean(ArgumentListParser::BooleanContext *context) = 0;
+37
View File
@@ -239,3 +239,40 @@ TEST_F(ArgumentListParserTest, CommentOnArgWithFolliwingArg) {
ASSERT_EQ("", arglist[1].comment);
}
TEST_F(ArgumentListParserTest, MapType) {
ASSERT_TRUE(parser.parse("{ string => number ... } mapArg"));
const auto arglist = parser.getArgList();
ASSERT_EQ(1, static_cast<int>(arglist.size()));
const auto mapType = arglist[0].type;
ASSERT_EQ(ade_type_info_type::Map, mapType.getType());
ASSERT_EQ(2, static_cast<int>(mapType.elements().size()));
ASSERT_TRUE(mapType.elements()[0].isSimple());
ASSERT_STREQ("string", mapType.elements()[0].getIdentifier());
ASSERT_TRUE(mapType.elements()[1].isSimple());
ASSERT_STREQ("number", mapType.elements()[1].getIdentifier());
ASSERT_EQ("mapArg", arglist[0].name);
ASSERT_EQ("", arglist[0].def_val);
ASSERT_FALSE(arglist[0].optional);
ASSERT_EQ("", arglist[0].comment);
}
TEST_F(ArgumentListParserTest, IteratorType) {
ASSERT_TRUE(parser.parse("iterator<string> iteratorArg"));
const auto arglist = parser.getArgList();
ASSERT_EQ(1, static_cast<int>(arglist.size()));
const auto mapType = arglist[0].type;
ASSERT_EQ(ade_type_info_type::Iterator, mapType.getType());
ASSERT_EQ(1, static_cast<int>(mapType.elements().size()));
ASSERT_TRUE(mapType.elements()[0].isSimple());
ASSERT_STREQ("string", mapType.elements()[0].getIdentifier());
ASSERT_EQ("iteratorArg", arglist[0].name);
ASSERT_EQ("", arglist[0].def_val);
ASSERT_FALSE(arglist[0].optional);
ASSERT_EQ("", arglist[0].comment);
}