<commit_before>//
//  MGSSyntaxParserClient.h
//  Fragaria
//
//  Created by <NAME> on 30/10/2018.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN


/** Syntax groups are tags for identifying tokens in the text that must be
 *  coloured. */
typedef NSString * const SMLSyntaxGroup NS_STRING_ENUM;
extern SMLSyntaxGroup SMLSyntaxGroupNumber;
extern SMLSyntaxGroup SMLSyntaxGroupCommand;
extern SMLSyntaxGroup SMLSyntaxGroupInstruction;
extern SMLSyntaxGroup SMLSyntaxGroupKeyword;
extern SMLSyntaxGroup SMLSyntaxGroupAutoComplete;
extern SMLSyntaxGroup SMLSyntaxGroupVariable;
extern SMLSyntaxGroup SMLSyntaxGroupString;
extern SMLSyntaxGroup SMLSyntaxGroupAttribute;
extern SMLSyntaxGroup SMLSyntaxGroupComment;


/** MGSSyntaxParserClient specifies the methods used by MGSSyntaxParser
 *  to inspect existing parse results, and to apply the resulting tokenization
 *  to the text.
 *
 *  This protocol does not need to be implemented when creating a
 *  new parser; it is already implemented by an object internal to Fragaria which
 *  is passed to MGSSyntaxParser as needed. */
@protocol MGSSyntaxParserClient <NSObject>


#pragma mark - Retrieving the String to Parse
/// @name Retrieving the String to Parse


/** The string currently being parsed */
@property (nonatomic, readonly) NSString *stringToParse;<commit_msg>Change SMLSyntaxGroup to an extensible enum<commit_after>//
//  MGSSyntaxParserClient.h
//  Fragaria
//
//  Created by <NAME> on 30/10/2018.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN


/** Syntax groups are tags for identifying tokens in the text that must be
 *  coloured. */
typedef NSString * const SMLSyntaxGroup NS_EXTENSIBLE_STRING_ENUM;
extern SMLSyntaxGroup SMLSyntaxGroupNumber;
extern SMLSyntaxGroup SMLSyntaxGroupCommand;
extern SMLSyntaxGroup SMLSyntaxGroupInstruction;
extern SMLSyntaxGroup SMLSyntaxGroupKeyword;
extern SMLSyntaxGroup SMLSyntaxGroupAutoComplete;
extern SMLSyntaxGroup SMLSyntaxGroupVariable;
extern SMLSyntaxGroup SMLSyntaxGroupString;
extern SMLSyntaxGroup SMLSyntaxGroupAttribute;
extern SMLSyntaxGroup SMLSyntaxGroupComment;


/** MGSSyntaxParserClient specifies the methods used by MGSSyntaxParser
 *  to inspect existing parse results, and to apply the resulting tokenization
 *  to the text.
 *
 *  This protocol does not need to be implemented when creating a
 *  new parser; it is already implemented by an object internal to Fragaria which
 *  is passed to MGSSyntaxParser as needed. */
@protocol MGSSyntaxParserClient <NSObject>


#pragma mark - Retrieving the String to Parse
/// @name Retrieving the String to Parse


/** The string currently being parsed */
@property (nonatomic, readonly) NSString *stringToParse;
{'fraction_non_alphanumeric': 0.05815237394184763, 'fraction_numerical': 0.005888847994111152, 'mean_word_length': 5.350467289719626, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4129245', 'n_tokens_mistral': 814, 'n_tokens_neox': 754, 'n_words': 272}