Skip to content

Commit

Permalink
- removed comments
Browse files Browse the repository at this point in the history
- removed unnecessary columns from TableMap
  • Loading branch information
romantoda committed May 9, 2020
1 parent ad351ad commit 5bdcf1c
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 11 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Roman Toda
Peter Wyatt
Frantisek Forgac
Binary file modified PDF20Grammar.ods
Binary file not shown.
Binary file modified TestGrammar/bin/x64/TestGrammar.exe
Binary file not shown.
Binary file modified TestGrammar/bin/x86/TestGrammar.exe
Binary file not shown.
6 changes: 0 additions & 6 deletions TestGrammar/src/GrammarFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ const std::vector<std::vector<std::string>>& CGrammarReader::get_data()
- correct # of columns
- correct headings (first line)
- correct basic types 1st column
//todo: ked mam possible values a aj link tak musi byt rovnaky pocet
*/
bool CGrammarReader::check(std::ostream &report_stream) {
if (data_list.empty()) {
Expand All @@ -107,7 +106,6 @@ bool CGrammarReader::check(std::ostream &report_stream) {
// check basic types (ignoring first line)
// check existing link
// check duplicate keys
//todo: skontrolovat vyber link podla value (rovnaky pocet musi byt)
std::vector<std::string> processed;
for (auto i = 1; i < data_list.size(); i++) {
std::vector<std::string> vc = data_list[i];
Expand Down Expand Up @@ -191,10 +189,6 @@ bool CGrammarReader::check(std::ostream &report_stream) {

//if we have more types, check pattern in Required, default and possible values
if (types.size() > 1) {
// if (vc[6] != "")
// report_stream << "More types, but REQUIRED defined in:" << file_name << "::" << vc[0] << std::endl;
// if (vc[7] != "")
// report_stream << "More types, but DEFAULT VALUE defined in:" << file_name << "::" << vc[0] << std::endl;
if (vc[8] != "") {
std::vector<std::string> poss_val = split(vc[8], ';');
if (types.size()!=poss_val.size())
Expand Down
2 changes: 1 addition & 1 deletion TestGrammar/src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

void show_help() {
std::cout << "TestGrammar ver." << TestGrammar_VERSION << std::endl;
std::cout << "Validates PDF file against grammar defined by list of TSV files. more info:https://github.com/romantoda/PDF20_Grammar" << std::endl;
std::cout << "Validates PDF file against grammar defined by list of TSV files." << std::endl;
std::cout << std::endl;
std::cout << "to validate single pdf file:" << std::endl;
std::cout << " testgrammar <input_file> <grammar_folder> <report_file>" << std::endl;
Expand Down
3 changes: 0 additions & 3 deletions TestGrammar/src/ParseObjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,6 @@ void CParsePDF::parse_number_tree(PdsDictionary* obj, const std::string &links,
// we have tupples number, value. value has to be validated
//todo check syntax here
int key = array_obj->GetInteger(i);
//if (key == 277) {
// output << "Tu" ;
//}
i++;
PdsDictionary* item = array_obj->GetDictionary(i);
i++;
Expand Down
2 changes: 1 addition & 1 deletion TestGrammar/src/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ bool folder_exists(const std::wstring& path) {
if (s.st_mode & S_IFDIR) return true;
}
#endif

return false;
}

bool file_exists(const std::string& path) {
Expand Down

0 comments on commit 5bdcf1c

Please sign in to comment.