<commit_before>/*=============================================================================
# Filename: QueryParser.h
# Author: <NAME>
# Mail: <EMAIL>
# Last Modified: 2016-07-14
# Description:
=============================================================================*/

#ifndef QUERYPARSER_H_
#define QUERYPARSER_H_

#include "../Util/Util.h"
#include "../Query/QueryTree.h"
#include "SparqlParser.h"
#include "SparqlLexer.h"

class QueryParser{
private:
	std::map<std::string,std::string> _prefix_map;

	int printNode(pANTLR3_BASE_TREE node,int dep = 0);

	void parseWorkload(pANTLR3_BASE_TREE node, QueryTree &querytree);

	void parseQuery(pANTLR3_BASE_TREE node, QueryTree &querytree);
	void parsePrologue(pANTLR3_BASE_TREE node);
	void parsePrefix(pANTLR3_BASE_TREE node);
	void replacePrefix(std::string &str);
	void parseSelectClause(pANTLR3_BASE_TREE node, QueryTree &querytree);
	void parseSelectVar(pANTLR3_BASE_TREE node, QueryTree &querytree);
	void parseSelectAggregateFunction(pANTLR3_BASE_TREE node, QueryTree &querytree);
	void parseGroupPattern(pANTLR3_BASE_TREE node, QueryTree::GroupPattern &grouppattern);
	void parsePattern(pANTLR3_BASE_TREE node, QueryTree::GroupPattern &grouppattern);
	void parseOptionalOrMinus(pANTLR3_BASE_TREE node, QueryTree::GroupPattern &grouppattern);
	void parseUnion(pANTLR3_BASE_TREE node, QueryTree::GroupPattern &grouppattern);<commit_msg>test QueryParser.h<commit_after>/*=============================================================================
# Filename: QueryParser.h
# Author: <NAME>
# Mail: <EMAIL>
# Last Modified: 2016-07-14
# Description:qunimade
=============================================================================*/

#ifndef QUERYPARSER_H_
#define QUERYPARSER_H_

#include "../Util/Util.h"
#include "../Query/QueryTree.h"
#include "SparqlParser.h"
#include "SparqlLexer.h"

class QueryParser{
private:
	std::map<std::string,std::string> _prefix_map;

	int printNode(pANTLR3_BASE_TREE node,int dep = 0);

	void parseWorkload(pANTLR3_BASE_TREE node, QueryTree &querytree);

	void parseQuery(pANTLR3_BASE_TREE node, QueryTree &querytree);
	void parsePrologue(pANTLR3_BASE_TREE node);
	void parsePrefix(pANTLR3_BASE_TREE node);
	void replacePrefix(std::string &str);
	void parseSelectClause(pANTLR3_BASE_TREE node, QueryTree &querytree);
	void parseSelectVar(pANTLR3_BASE_TREE node, QueryTree &querytree);
	void parseSelectAggregateFunction(pANTLR3_BASE_TREE node, QueryTree &querytree);
	void parseGroupPattern(pANTLR3_BASE_TREE node, QueryTree::GroupPattern &grouppattern);
	void parsePattern(pANTLR3_BASE_TREE node, QueryTree::GroupPattern &grouppattern);
	void parseOptionalOrMinus(pANTLR3_BASE_TREE node, QueryTree::GroupPattern &grouppattern);
	void parseUnion(pANTLR3_BASE_TREE node, QueryTree::GroupPattern &grouppattern);
{'fraction_non_alphanumeric': 0.20384204909284953, 'fraction_numerical': 0.014941302027748132, 'mean_word_length': 9.692015209125476, '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': '7514567', 'n_tokens_mistral': 966, 'n_tokens_neox': 934, 'n_words': 174}