SEBA-421 Print error messages to stderr, not stdout;
Add Makefile
Change-Id: I7d4285a343d723ff3fc2aa2f7b1abfb806de8966
diff --git a/src/plyxproto/parser.py b/src/plyxproto/parser.py
index aabf2eb..f96125c 100755
--- a/src/plyxproto/parser.py
+++ b/src/plyxproto/parser.py
@@ -37,6 +37,7 @@
from .helpers import LexHelper, LU
from .logicparser import FOLParser, FOLLexer, FOLParsingError
import ast
+import sys
class PythonError(Exception):
@@ -155,7 +156,8 @@
def t_error(self, t):
print(("Illegal character '{}' ({}) in line {}".format(
- t.value[0], hex(ord(t.value[0])), t.lexer.lineno)))
+ t.value[0], hex(ord(t.value[0])), t.lexer.lineno)),
+ file=sys.stderr)
t.lexer.skip(1)