Pebaz / RGB

Does 95% of the Work Required to Port C Libraries to Red/System by Converting C Header Files to Red/System Code.
MIT License
14 stars 1 forks source link

winbase.h trial ;) #2

Open hiiamboris opened 6 years ago

hiiamboris commented 6 years ago

it might be too heavy a task idk, but here's what it prints:

>set C_INCLUDE_PATH=D:\gear\dm\include 
>set CPLUS_INCLUDE_PATH=D:\gear\dm\include 
>py src\main.py gen D:\gear\dm\include\WIN32\winbase.h  D:\gear\LLVM\bin\ c:\windows\System32\kernel32.dll

Traceback (most recent call last):
  File "src\main.py", line 56, in <module>
    fire.Fire(CLI)
  File "C:\Users\1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\fire\core.py", line 127, in Fire
    component_trace = _Fire(component, args, context, name)
  File "C:\Users\1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\fire\core.py", line 366, in _Fire
    component, remaining_args)
  File "C:\Users\1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\fire\core.py", line 542, in _CallCallable
    result = fn(*varargs, **kwargs)
  File "src\main.py", line 52, in gen
    rgb_compiler.compile()
  File "D:\usr\RGB\src\rgb.py", line 83, in compile
    results = self.__parse_all(self.declarations)
  File "D:\usr\RGB\src\rgb.py", line 151, in __parse_all
    i.parse()
  File "D:\usr\RGB\src\compilers\struct.py", line 125, in parse
    ender = StructEnd.parseString(line.strip())[0]
  File "C:\Users\1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyparsing.py", line 1632, in parseString
    raise exc
  File "C:\Users\1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyparsing.py", line 1622, in parseString
    loc, tokens = self._parse( instring, 0 )
  File "C:\Users\1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "C:\Users\1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyparsing.py", line 3395, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "C:\Users\1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "C:\Users\1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyparsing.py", line 3717, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "C:\Users\1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "C:\Users\1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyparsing.py", line 3395, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "C:\Users\1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyparsing.py", line 1383, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "C:\Users\1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyparsing.py", line 3717, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "C:\Users\1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyparsing.py", line 1383, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "C:\Users\1\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyparsing.py", line 2413, in parseImpl
    raise ParseException(instring, loc, self.errmsg, self)
pyparsing.ParseException: Expected ";" (at char 14), (line:1, col:15)
Pebaz commented 6 years ago

Thank you very much for trying out RGB!

I have taken a look at the codebase and have attempted to reproduce this output but have been unable to.

Is there any way to submit the out/Output.txt file?

Here is a screenshot of a little test I did. It represents the syntax that is supported by my struct parser.

image

Unless there is some obscure C struct syntax I have overlooked, this should handle it.