
#ifndef __ERRORS_H
#define __ERRORS_H

/*
This file was automatically generated. Do not modify it,
or your changes will be lost!
You can manually run the script 'sync_translation.py'
to generate a new version, based on errors.cpp
*/

// define error codes
namespace Aseba
{
	enum ErrorCode
	{
		// compiler.cpp
		ERROR_BROKEN_TARGET = 0,
		ERROR_STACK_OVERFLOW,
		ERROR_SCRIPT_TOO_BIG,
		// identifier-lookup.cpp
		ERROR_VARIABLE_NOT_DEFINED,
		ERROR_VARIABLE_NOT_DEFINED_GUESS,
		ERROR_FUNCTION_NOT_DEFINED,
		ERROR_FUNCTION_NOT_DEFINED_GUESS,
		ERROR_CONSTANT_NOT_DEFINED,
		ERROR_CONSTANT_NOT_DEFINED_GUESS,
		ERROR_EVENT_NOT_DEFINED,
		ERROR_EVENT_NOT_DEFINED_GUESS,
		ERROR_EMIT_LOCAL_EVENT,
		ERROR_SUBROUTINE_NOT_DEFINED,
		ERROR_SUBROUTINE_NOT_DEFINED_GUESS,
		// lexer.cpp
		ERROR_LINE,
		ERROR_COL,
		ERROR_UNBALANCED_COMMENT_BLOCK,
		ERROR_SYNTAX,
		ERROR_INVALID_IDENTIFIER,
		ERROR_INVALID_HEXA_NUMBER,
		ERROR_INVALID_BINARY_NUMBER,
		ERROR_NUMBER_INVALID_BASE,
		ERROR_IN_NUMBER,
		// parser.cpp
		ERROR_INTERNAL,
		ERROR_EXPECTING,
		ERROR_UINT12_OUT_OF_RANGE,
		ERROR_UINT16_OUT_OF_RANGE,
		ERROR_PINT16_OUT_OF_RANGE,
		ERROR_INT16_OUT_OF_RANGE,
		ERROR_PCONSTANT_OUT_OF_RANGE,
		ERROR_CONSTANT_OUT_OF_RANGE,
		ERROR_EXPECTING_ONE_OF,
		ERROR_NOT_ENOUGH_TEMP_SPACE,
		ERROR_MISPLACED_VARDEF,
		ERROR_EXPECTING_IDENTIFIER,
		ERROR_CONST_ALREADY_DEFINED,
		ERROR_VAR_ALREADY_DEFINED,
		ERROR_VAR_CONST_COLLISION,
		ERROR_UNDEFINED_SIZE,
		ERROR_NOT_ENOUGH_SPACE,
		ERROR_EXPECTING_ASSIGNMENT,
		ERROR_FOR_NULL_STEPS,
		ERROR_FOR_START_HIGHER_THAN_END,
		ERROR_FOR_START_LOWER_THAN_END,
		ERROR_FOR_INVALID_INC_END_INDEX,
		ERROR_FOR_INVALID_DEC_END_INDEX,
		ERROR_EVENT_ALREADY_IMPL,
		ERROR_EVENT_ARG_TOO_BIG,
		ERROR_EVENT_WRONG_ARG_SIZE,
		ERROR_SUBROUTINE_ALREADY_DEF,
		ERROR_INDEX_EXPECTING_CONSTANT,
		ERROR_INDEX_WRONG_END,
		ERROR_SIZE_IS_NEGATIVE,
		ERROR_SIZE_IS_NULL,
		ERROR_NOT_CONST_EXPR,
		ERROR_FUNCTION_HAS_NO_ARG,
		ERROR_FUNCTION_NO_ENOUGH_ARG,
		ERROR_FUNCTION_WRONG_ARG_SIZE,
		ERROR_FUNCTION_WRONG_ARG_SIZE_TEMPLATE,
		ERROR_FUNCTION_TOO_MANY_ARG,
		// tree-build.cpp
		ERROR_UNARY_ARITH_BUILD_UNEXPECTED,
		// tree-expand.cpp
		ERROR_INCORRECT_LEFT_VALUE,
		ERROR_ARRAY_OUT_OF_BOUND,
		ERROR_ARRAY_SIZE_MISMATCH,
		ERROR_IF_VECTOR_CONDITION,
		ERROR_WHILE_VECTOR_CONDITION,
		ERROR_ARRAY_ILLEGAL_ACCESS,
		// tree-optimize.cpp
		ERROR_INFINITE_LOOP,
		ERROR_DIVISION_BY_ZERO,
		ERROR_ABS_NOT_POSSIBLE,
		ERROR_ARRAY_OUT_OF_BOUND_READ,
		ERROR_ARRAY_OUT_OF_BOUND_WRITE,
		// tree-typecheck.cpp
		ERROR_EXPECTING_TYPE,
		ERROR_EXPECTING_CONDITION,
		// lexer.cpp Token::typeName()
		ERROR_TOKEN_END_OF_STREAM,
		ERROR_TOKEN_STR_when,
		ERROR_TOKEN_STR_emit,
		ERROR_TOKEN_STR_hidden_emit,
		ERROR_TOKEN_STR_for,
		ERROR_TOKEN_STR_in,
		ERROR_TOKEN_STR_step,
		ERROR_TOKEN_STR_while,
		ERROR_TOKEN_STR_do,
		ERROR_TOKEN_STR_if,
		ERROR_TOKEN_STR_then,
		ERROR_TOKEN_STR_else,
		ERROR_TOKEN_STR_elseif,
		ERROR_TOKEN_STR_end,
		ERROR_TOKEN_STR_var,
		ERROR_TOKEN_STR_const,
		ERROR_TOKEN_STR_call,
		ERROR_TOKEN_STR_sub,
		ERROR_TOKEN_STR_callsub,
		ERROR_TOKEN_STR_onevent,
		ERROR_TOKEN_STR_abs,
		ERROR_TOKEN_STR_return,
		ERROR_TOKEN_STRING_LITERAL,
		ERROR_TOKEN_INT_LITERAL,
		ERROR_TOKEN_PAR_OPEN,
		ERROR_TOKEN_PAR_CLOSE,
		ERROR_TOKEN_BRACKET_OPEN,
		ERROR_TOKEN_BRACKET_CLOSE,
		ERROR_TOKEN_COLON,
		ERROR_TOKEN_COMMA,
		ERROR_TOKEN_ASSIGN,
		ERROR_TOKEN_OP_OR,
		ERROR_TOKEN_OP_AND,
		ERROR_TOKEN_OP_NOT,
		ERROR_TOKEN_OP_BIT_OR,
		ERROR_TOKEN_OP_BIT_XOR,
		ERROR_TOKEN_OP_BIT_AND,
		ERROR_TOKEN_OP_BIT_NOT,
		ERROR_TOKEN_OP_BIT_OR_EQUAL,
		ERROR_TOKEN_OP_BIT_XOR_EQUAL,
		ERROR_TOKEN_OP_BIT_AND_EQUAL,
		ERROR_TOKEN_OP_EQUAL,
		ERROR_TOKEN_OP_NOT_EQUAL,
		ERROR_TOKEN_OP_BIGGER,
		ERROR_TOKEN_OP_BIGGER_EQUAL,
		ERROR_TOKEN_OP_SMALLER,
		ERROR_TOKEN_OP_SMALLER_EQUAL,
		ERROR_TOKEN_OP_SHIFT_LEFT,
		ERROR_TOKEN_OP_SHIFT_RIGHT,
		ERROR_TOKEN_OP_SHIFT_LEFT_EQUAL,
		ERROR_TOKEN_OP_SHIFT_RIGHT_EQUAL,
		ERROR_TOKEN_OP_ADD,
		ERROR_TOKEN_OP_NEG,
		ERROR_TOKEN_OP_ADD_EQUAL,
		ERROR_TOKEN_OP_NEG_EQUAL,
		ERROR_TOKEN_OP_PLUS_PLUS,
		ERROR_TOKEN_OP_MINUS_MINUS,
		ERROR_TOKEN_OP_MULT,
		ERROR_TOKEN_OP_DIV,
		ERROR_TOKEN_OP_MOD,
		ERROR_TOKEN_OP_MULT_EQUAL,
		ERROR_TOKEN_OP_DIV_EQUAL,
		ERROR_TOKEN_OP_MOD_EQUAL,
		ERROR_TOKEN_UNKNOWN,
		ERROR_UNKNOWN_ERROR,

		ERROR_END
	};
};

#endif // __ERRORS_H
