diff options
Diffstat (limited to 'filetypes/ctypefiles.py')
-rw-r--r-- | filetypes/ctypefiles.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/filetypes/ctypefiles.py b/filetypes/ctypefiles.py index 32cb32d..ef6cbc5 100644 --- a/filetypes/ctypefiles.py +++ b/filetypes/ctypefiles.py @@ -122,6 +122,16 @@ def scanincludes(string,inclst,curdir): ifdef[p[1]] = p[2] p[0] = [set(),set(),ifdef] + def p_ifdefempty(p): + """ + includes : includes IFDEF ENDIF + | IFDEF ENDIF + """ + if len(p) == 4: + p[0] = p[1] + else: + p[0] = [set(),set(),{}] + def p_ginc(p): "includes : ginc" globinc = set() @@ -146,7 +156,7 @@ def scanincludes(string,inclst,curdir): p[0] = p[1] def p_error(p): - #print("syntax error at '%s'" % p.type) + print("syntax error at '%s'" % p.type) pass yacc.yacc() @@ -161,7 +171,7 @@ def scanincludes(string,inclst,curdir): def islocalinc(inc, curdir): """Checks if this is a local include - Checks if the file can be found with the path the is supplied. + Checks if the file can be found with the path that is supplied. If not this is probably a global include and thus return False """ |