Commit 2db45c8a authored by Alexander Alekhin's avatar Alexander Alekhin

hdr_parser: ignore lines with 'CV__' macros

parent a84a5e8f
...@@ -769,7 +769,7 @@ class CppHeaderParser(object): ...@@ -769,7 +769,7 @@ class CppHeaderParser(object):
for l0 in linelist: for l0 in linelist:
self.lineno += 1 self.lineno += 1
#print self.lineno #print(state, self.lineno, l0)
l = l0.strip() l = l0.strip()
...@@ -798,8 +798,13 @@ class CppHeaderParser(object): ...@@ -798,8 +798,13 @@ class CppHeaderParser(object):
l = l[pos+2:] l = l[pos+2:]
state = SCAN state = SCAN
if l.startswith('CV__'): # just ignore this lines
#print('IGNORE: ' + l)
state = SCAN
continue
if state != SCAN: if state != SCAN:
print("Error at %d: invlid state = %d" % (self.lineno, state)) print("Error at %d: invalid state = %d" % (self.lineno, state))
sys.exit(-1) sys.exit(-1)
while 1: while 1:
...@@ -848,6 +853,7 @@ class CppHeaderParser(object): ...@@ -848,6 +853,7 @@ class CppHeaderParser(object):
stmt = (block_head + " " + l[:pos]).strip() stmt = (block_head + " " + l[:pos]).strip()
stmt = " ".join(stmt.split()) # normalize the statement stmt = " ".join(stmt.split()) # normalize the statement
#print(stmt)
stack_top = self.block_stack[-1] stack_top = self.block_stack[-1]
if stmt.startswith("@"): if stmt.startswith("@"):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment