<commit_before>/*! \file uparser.h
 *******************************************************************************

 File: uparser.h\n
 Definition of the UParser class used to make flex/bison reentrant.

 This file is based on an example provided by <NAME>:
 See: "reent" at http://www.oefai.at/~markus

 This file is part of 
 %URBI Kernel, version __kernelversion__\n
 (c) <NAME>, 2004-2005.

 Permission to use, copy, modify, and redistribute this software for
 non-commercial use is hereby granted.

 This software is provided "as is" without warranty of any kind,
 either expressed or implied, including but not limited to the
 implied warranties of fitness for a particular purpose.

 For more information, comments, bug reports: http://www.urbiforge.net

 **************************************************************************** */

#ifndef UPARSER_H_DEFINED
#define UPARSER_H_DEFINED

#include <strstream> 
#include <sstream>
#include <algorithm>
#include <string>

#include "utypes.h"
#include "bison/FlexLexer.h"
#include "bison/location.hh"

// FIXME: When Bison is fixed, replace yy::parser::token::yytokentype
// by yy::parser::token_type.
#undef  YY_DECL
#define YY_DECL                                                 \
  yy::parser::token::yytokentype 			 	\
  yyFlexLexer::yylex(yy::parser::semantic_type* valp,		\
                     yy::location* locp, UParser& uparser)

// Parse function of 'bison' is defined externally
extern char errorMessage[1024];
extern UString** globalDelete;

//! Control class for a flex-scanner
/*! It has a pointer to the uparser in which it is contained
 */<commit_msg>added a undef IN in uparser.h to fix a windows compile error<commit_after>/*! \file uparser.h
 *******************************************************************************

 File: uparser.h\n
 Definition of the UParser class used to make flex/bison reentrant.

 This file is based on an example provided by Markus Mottl:
 See: "reent" at http://www.oefai.at/~markus

 This file is part of 
 %URBI Kernel, version __kernelversion__\n
 (c) <NAME>, 2004-2005.

 Permission to use, copy, modify, and redistribute this software for
 non-commercial use is hereby granted.

 This software is provided "as is" without warranty of any kind,
 either expressed or implied, including but not limited to the
 implied warranties of fitness for a particular purpose.

 For more information, comments, bug reports: http://www.urbiforge.net

 **************************************************************************** */

#ifndef UPARSER_H_DEFINED
#define UPARSER_H_DEFINED

#include <strstream> 
#include <sstream>
#include <algorithm>
#include <string>

#include "utypes.h"
#undef IN
#include "bison/FlexLexer.h"
#include "bison/location.hh"

// FIXME: When Bison is fixed, replace yy::parser::token::yytokentype
// by yy::parser::token_type.
#undef  YY_DECL
#define YY_DECL                                                 \
  yy::parser::token::yytokentype 			 	\
  yyFlexLexer::yylex(yy::parser::semantic_type* valp,		\
                     yy::location* locp, UParser& uparser)

// Parse function of 'bison' is defined externally
extern char errorMessage[1024];
extern UString** globalDelete;

//! Control class for a flex-scanner
/*! It has a pointer to the uparser in which it is contained
 */
{'fraction_non_alphanumeric': 0.1817084213703592, 'fraction_numerical': 0.00724418955629339, 'mean_word_length': 3.975975975975976, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6912140', 'n_tokens_mistral': 1008, 'n_tokens_neox': 919, 'n_words': 334}