<commit_before>/*
 *	Copyright 2020 <NAME>, <NAME>
 *
 *	Licensed under the Apache License, Version 2.0 (the "License");
 *	you may not use this file except in compliance with the License.
 *	You may obtain a copy of the License at
 *
 *		http://www.apache.org/licenses/LICENSE-2.0
 *
 *	Unless required by applicable law or agreed to in writing, software
 *	distributed under the License is distributed on an "AS IS" BASIS,
 *	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *	See the License for the specific language governing permissions and
 *	limitations under the License.
 */

#pragma once

#include "defs.h"


#ifdef __cplusplus
extern "C" {
#endif

/** Global vars definition */
typedef struct syntax
{
	// mem, pc & iniprocs - usage here only for codes printing

	int mem[MAXMEMSIZE];		/**< Memory */
	int pc;						/**< Program counter */

	int iniprocs[INIPROSIZE];	/**< Init processes */
	int procd;					/**< Process management daemon */

	int functions[FUNCSIZE];	/**< Functions table */
	int funcnum;				/**< Number of functions */

	int identab[MAXIDENTAB];	/**< Identifiers table */
	int id;						/**< Number of identifiers */

	int modetab[MAXMODETAB];	/**< Modes table */
	int startmode;				/**< Start of last record in modetab */
	int md;						/**< Number of modes */
	
	int tree[MAXTREESIZE];		/**< Tree */
	int tc;						/**< Tree counter */

	int reprtab[MAXREPRTAB];	/**< Representations table */
	int rp;						/**< Representations size */
	int repr;					/**< Representations position */

	int maxdisplg;				/**< Max displacement */
	int wasmain;				/**< Main function flag */

	int anstdispl;				/**< Stack displacement */
} syntax;


/**
 *	Create Syntax structure
 *
 *	@return	Syntax structure
 */
syntax sx_create();


int check_mode_duplicates(syntax *sx);

/**
 *	Add new record to modetab
 *
 *	@param	sx	Syntax structure
 *	@param	size	Size of the new record
 *	@param	new_record	The new record itself
 *	@return	Pointer to new record
 */
int modetab_add(syntax *const sx, const int size, const int new_record[]);

/**
 *	Add new record of array or pointer to modetab
 *
 *	@param	sx	Syntax structure
 *	@param	type	Type of record: @c MARRAY or @c MPOINT
 *	@param	elemtype	Type of element
 *	@return	Pointer to new record
 */
int newdecl(syntax *const sx, const int type, const int elemtype);

#ifdef __cplusplus
} /* extern "C" */
#endif
<commit_msg>Устранено ненужное предописание фукнции check_mode_duplicates<commit_after>/*
 *	Copyright 2020 <NAME>, <NAME>
 *
 *	Licensed under the Apache License, Version 2.0 (the "License");
 *	you may not use this file except in compliance with the License.
 *	You may obtain a copy of the License at
 *
 *		http://www.apache.org/licenses/LICENSE-2.0
 *
 *	Unless required by applicable law or agreed to in writing, software
 *	distributed under the License is distributed on an "AS IS" BASIS,
 *	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *	See the License for the specific language governing permissions and
 *	limitations under the License.
 */

#pragma once

#include "defs.h"


#ifdef __cplusplus
extern "C" {
#endif

/** Global vars definition */
typedef struct syntax
{
	// mem, pc & iniprocs - usage here only for codes printing

	int mem[MAXMEMSIZE];		/**< Memory */
	int pc;						/**< Program counter */

	int iniprocs[INIPROSIZE];	/**< Init processes */
	int procd;					/**< Process management daemon */

	int functions[FUNCSIZE];	/**< Functions table */
	int funcnum;				/**< Number of functions */

	int identab[MAXIDENTAB];	/**< Identifiers table */
	int id;						/**< Number of identifiers */

	int modetab[MAXMODETAB];	/**< Modes table */
	int startmode;				/**< Start of last record in modetab */
	int md;						/**< Number of modes */
	
	int tree[MAXTREESIZE];		/**< Tree */
	int tc;						/**< Tree counter */

	int reprtab[MAXREPRTAB];	/**< Representations table */
	int rp;						/**< Representations size */
	int repr;					/**< Representations position */

	int maxdisplg;				/**< Max displacement */
	int wasmain;				/**< Main function flag */

	int anstdispl;				/**< Stack displacement */
} syntax;


/**
 *	Create Syntax structure
 *
 *	@return	Syntax structure
 */
syntax sx_create();

/**
 *	Add new record to modetab
 *
 *	@param	sx	Syntax structure
 *	@param	size	Size of the new record
 *	@param	new_record	The new record itself
 *	@return	Pointer to new record
 */
int modetab_add(syntax *const sx, const int size, const int new_record[]);

/**
 *	Add new record of array or pointer to modetab
 *
 *	@param	sx	Syntax structure
 *	@param	type	Type of record: @c MARRAY or @c MPOINT
 *	@param	elemtype	Type of element
 *	@return	Pointer to new record
 */
int newdecl(syntax *const sx, const int type, const int elemtype);

#ifdef __cplusplus
} /* extern "C" */
#endif

{'fraction_non_alphanumeric': 0.11974311166355915, 'fraction_numerical': 0.0033146882121400456, 'mean_word_length': 3.295373665480427, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6236968', 'n_tokens_mistral': 1693, 'n_tokens_neox': 1543, 'n_words': 575}