Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross platform build using cmake (Linux, Windows, MacOS) and update license from GPL/LGPL v3 to BSD 3-clause #42

Merged
merged 9 commits into from
Aug 8, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge application main and library
  • Loading branch information
gbesancon-schlumberger committed Jul 6, 2019
commit 2b96dfa7114cbd325f07987931f4e1ccea0d1d76
47 changes: 47 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"configurations": [
{
"name": "Win32",
"browse": {
"path": [
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
},
"includePath": [
"${workspaceFolder}",
"${workspaceFolder}/libraries/VAL/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "msvc-x64",
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
},
{
"name": "WSL",
"includePath": [
"${workspaceRoot}"
],
"defines": [
"__linux__",
"__x86_64__"
],
"browse": {
"path": [
"${workspaceRoot}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}
51 changes: 51 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) validate",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/bin/Validate.exe",
"args": ["-t", "0.001", "${workspaceFolder}/samples/IPC/Depots/Strips/Depots.pddl"
, "${workspaceFolder}/samples/IPC/Depots/Strips/pfile1"
, "${workspaceFolder}/samples/IPC/Depots/Strips/pfile1.plan"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build/bin",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(gdb) valstep",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/bin/ValStep.exe",
"args": ["${workspaceFolder}/samples/IPC/Depots/Strips/Depots.pddl"
, "${workspaceFolder}/samples/IPC/Depots/Strips/pfile1"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build/bin",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
65 changes: 65 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"cmake.generator": "MinGW Makefiles",
"cmake.preferredGenerators": [
"MinGW Makefiles",
"Unix Makefiles"
],
"files.associations": {
"vector": "cpp",
"iosfwd": "cpp",
"map": "cpp",
"memory": "cpp",
"string": "cpp",
"xstring": "cpp",
"xlocale": "cpp",
"system_error": "cpp",
"algorithm": "cpp",
"cmath": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"deque": "cpp",
"exception": "cpp",
"fstream": "cpp",
"functional": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"ios": "cpp",
"iostream": "cpp",
"istream": "cpp",
"iterator": "cpp",
"limits": "cpp",
"list": "cpp",
"new": "cpp",
"numeric": "cpp",
"ostream": "cpp",
"set": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"utility": "cpp",
"xfacet": "cpp",
"xhash": "cpp",
"xiosbase": "cpp",
"xlocinfo": "cpp",
"xlocmon": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"xmemory": "cpp",
"xmemory0": "cpp",
"xstddef": "cpp",
"xtr1common": "cpp",
"xtree": "cpp",
"xutility": "cpp",
"atomic": "cpp",
"queue": "cpp"
}
}
104 changes: 49 additions & 55 deletions libraries/VAL/src/Analysis.cpp → applications/Analyse/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,77 +38,71 @@
Strathclyde Planning Group
*/

#include "Analyser.h"
#include "FlexLexer.h"
#include "ptree.h"
#include <cstdio>
#include <iostream>
#include <fstream>
#include "ptree.h"
#include "FlexLexer.h"
#include "Analyser.h"
#include <iostream>

extern int yyparse();
extern int yydebug;


using std::ifstream;
using std::ofstream;

namespace VAL {

parse_category* top_thing=NULL;
extern parse_category *top_thing;

analysis an_analysis;
analysis* current_analysis;
extern analysis an_analysis;
extern analysis *current_analysis;

yyFlexLexer* yfl;
extern yyFlexLexer *yfl;

};
}; // namespace VAL

char * current_filename;
extern char *current_filename;
using namespace VAL;

int main(int argc,char * argv[])
{
current_analysis= &an_analysis;
an_analysis.pred_tab.replaceFactory<extended_pred_symbol>();

ifstream* current_in_stream;
yydebug=0; // Set to 1 to output yacc trace

yfl= new yyFlexLexer;

// Loop over given args
for (int a=1; a<argc; ++a)
{
current_filename= argv[a];
cout << "File: " << current_filename << '\n';
current_in_stream= new ifstream(current_filename);
if (current_in_stream->bad())
{
// Output a message now
cout << "Failed to open\n";

// Log an error to be reported in summary later
line_no= 0;
log_error(E_FATAL,"Failed to open file");
}
else
{
line_no= 1;

// Switch the tokeniser to the current input stream
yfl->switch_streams(current_in_stream,&cout);
yyparse();

// Output syntax tree
//if (top_thing) top_thing->display(0);
}
delete current_in_stream;
int main(int argc, char *argv[]) {
current_analysis = &an_analysis;
an_analysis.pred_tab.replaceFactory< extended_pred_symbol >();

ifstream *current_in_stream;
yydebug = 0; // Set to 1 to output yacc trace

yfl = new yyFlexLexer;

// Loop over given args
for (int a = 1; a < argc; ++a) {
current_filename = argv[a];
cout << "File: " << current_filename << '\n';
current_in_stream = new ifstream(current_filename);
if (current_in_stream->bad()) {
// Output a message now
cout << "Failed to open\n";

// Log an error to be reported in summary later
line_no = 0;
log_error(E_FATAL, "Failed to open file");
} else {
line_no = 1;

// Switch the tokeniser to the current input stream
yfl->switch_streams(current_in_stream, &cout);
yyparse();

// Output syntax tree
// if (top_thing) top_thing->display(0);
}
// Output the errors from all input files
current_analysis->error_list.report();
delete yfl;
Analyser a;
current_analysis->the_problem->visit(&a);
current_analysis->the_domain->visit(&a);
current_analysis->the_domain->predicates->visit(&a);
delete current_in_stream;
}
// Output the errors from all input files
current_analysis->error_list.report();
delete yfl;
Analyser a;
current_analysis->the_problem->visit(&a);
current_analysis->the_domain->visit(&a);
current_analysis->the_domain->predicates->visit(&a);
}
Loading