/*
 * Generated by ./misc/optlib2c from optlib/forth.ctags, Don't edit this manually.
 */
#include "general.h"
#include "parse.h"
#include "routines.h"
#include "field.h"
#include "xtag.h"
#include "selectors.h"


static void initializeForthParser (const langType language CTAGS_ATTR_UNUSED)
{
}

extern parserDefinition* ForthParser (void)
{
	static const char *const extensions [] = {
		"fth",
		"forth",
		"fs",
		"4th",
		"f",
		NULL
	};

	static const char *const aliases [] = {
		NULL
	};

	static const char *const patterns [] = {
		NULL
	};

	static kindDefinition ForthKindTable [] = {
		{
		  true, 'w', "word", "words",
		},
		{
		  true, 'v', "variable", "variables",
		},
		{
		  true, 'c', "constant", "constants",
		},
	};
	static tagRegexTable ForthTagRegexTable [] = {
		{"^[[:space:]]*\\\\.*", "",
		"", "{exclusive}", NULL, false},
		{"^:[[:space:]]+([^[:space:]]+)", "\\1",
		"w", "{exclusive}", NULL, false},
		{"^variable[[:space:]]+([^[:space:]]+)", "\\1",
		"v", "{exclusive}{icase}", NULL, false},
		{"^[[:alnum:]]+[[:space:]]+constant[[:space:]]+([^[:space:]]+)", "\\1",
		"c", "{exclusive}{icase}", NULL, false},
	};

	static selectLanguage selectors[] = { selectFortranOrForthByForthMarker, NULL };

	parserDefinition* const def = parserNew ("Forth");

	def->versionCurrent= 0;
	def->versionAge    = 0;
	def->enabled       = true;
	def->extensions    = extensions;
	def->patterns      = patterns;
	def->aliases       = aliases;
	def->selectLanguage= selectors;
	def->method        = METHOD_NOT_CRAFTED|METHOD_REGEX;
	def->kindTable     = ForthKindTable;
	def->kindCount     = ARRAY_SIZE(ForthKindTable);
	def->tagRegexTable = ForthTagRegexTable;
	def->tagRegexCount = ARRAY_SIZE(ForthTagRegexTable);
	def->initialize    = initializeForthParser;

	return def;
}
