/*
 * Generated by /usr/src/ctags/ctags-6.1.0-1.x86_64/src/universal-ctags-6.1.0/misc/optlib2c from /usr/src/ctags/ctags-6.1.0-1.x86_64/src/universal-ctags-6.1.0/optlib/terraform.ctags, Don't edit this manually.
 */
#include "general.h"
#include "parse.h"
#include "routines.h"
#include "field.h"
#include "xtag.h"


static void initializeTerraformParser (const langType language CTAGS_ATTR_UNUSED)
{
}

extern parserDefinition* TerraformParser (void)
{
	static const char *const extensions [] = {
		"tf",
		NULL
	};

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

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

	static roleDefinition TerraformVariableRoleTable [] = {
		{ true, "assigned", "assigned in Variable Definitions (.tfvars) files" },
	};
	static kindDefinition TerraformKindTable [] = {
		{
		  true, 'r', "resource", "resources",
		},
		{
		  true, 'd', "data", "data",
		},
		{
		  true, 'v', "variable", "variables",
		  ATTACH_ROLES(TerraformVariableRoleTable),
		},
		{
		  true, 'p', "provider", "providers",
		},
		{
		  true, 'm', "module", "modules",
		},
		{
		  true, 'o', "output", "output",
		},
	};
	static tagRegexTable TerraformTagRegexTable [] = {
		{"^[[:space:]]*(#|//)\"", "",
		"", "{exclusive}", NULL, false},
		{"^resource[[:space:]]\"([^\"]+)\"[[:space:]]\"([^\"]+)\"", "\\2",
		"r", "{exclusive}", NULL, false},
		{"^data[[:space:]]\"([^\"]+)\"[[:space:]]\"([^\"]+)\"", "\\2",
		"d", "{exclusive}", NULL, false},
		{"^variable[[:space:]]\"([^\"]+)\"", "\\1",
		"v", "{exclusive}", NULL, false},
		{"^provider[[:space:]]\"([^\"]+)\"", "\\1",
		"p", "{exclusive}", NULL, false},
		{"^module[[:space:]]\"([^\"]+)\"", "\\1",
		"m", "{exclusive}", NULL, false},
		{"^output[[:space:]]\"([^\"]+)\"", "\\1",
		"o", "{exclusive}", NULL, false},
	};


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

	def->versionCurrent= 0;
	def->versionAge    = 0;
	def->enabled       = true;
	def->extensions    = extensions;
	def->patterns      = patterns;
	def->aliases       = aliases;
	def->method        = METHOD_NOT_CRAFTED|METHOD_REGEX;
	def->kindTable     = TerraformKindTable;
	def->kindCount     = ARRAY_SIZE(TerraformKindTable);
	def->tagRegexTable = TerraformTagRegexTable;
	def->tagRegexCount = ARRAY_SIZE(TerraformTagRegexTable);
	def->initialize    = initializeTerraformParser;

	return def;
}
