diff --git a/wcclparser/main.cpp b/wcclparser/main.cpp
index 4ba829ed1e231b203b1dd8f77458aa746c84b050..1ee27d4eeb86cc3cd825fe9041917e94d44081dc 100644
--- a/wcclparser/main.cpp
+++ b/wcclparser/main.cpp
@@ -10,9 +10,9 @@
 #include <antlr/MismatchedTokenException.hpp>
 // ----------------------------------------------------------------------------
 
-//#ifdef HAVE_LIBEDIT
+#ifdef HAVE_LIBEDIT
 #include <histedit.h>
-//#endif
+#endif
 
 /**
  * @desc A simple command line tester for testing operators
@@ -34,6 +34,15 @@ void std_read_loop(boost::function<bool (const std::string&)>& line_cb)
 	}
 }
 
+int clear_screen()
+{
+#ifdef _WINDOWS
+	return std::system("cls");
+#else
+	return std::system("clear");
+#endif
+}
+
 #ifdef HAVE_LIBEDIT
 const char* query_prompt(EditLine*) {
 	return _prompt;
@@ -81,7 +90,7 @@ bool process_line(const std::string& line, Parser& parser)
 	if (line.empty() || line == "exit" || line == "quit") {
 		return true;
 	} else if (line == "clear" || line == "cls") {
-		if (system("clear")) {}
+		if (clear_screen()) {}
 		return false;
 	}
 
@@ -158,7 +167,7 @@ int main(int argc, char** argv)
 	const Corpus2::Tagset& tagset = Corpus2::get_named_tagset(tagset_load);
 	Parser parser(tagset);
 
-	if (system("clear")) {
+	if (clear_screen()) {
 		//
 	}