We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic: could not match regexp with string
When attempting to run c2go transpile, the AvailabilityAttr items in the AST cause a panic.
c2go transpile
AvailabilityAttr
panic: could not match regexp with string ^(?P<address>[0-9a-fx]+) <(?P<position>.*)>(?P<inherited> Inherited)? (?P<os>\w+) (?P<version>[\d.]+) (?P<unknown1>[\d.]+) (?P<unknown2>[\d.]+)(?P<unavalable> Unavailable)? "(?P<message1>.*?)"(?P<message2> ".*?")?[\s]*$ 0x7fc5ba891778 <col:108, col:143> macos 10.7 0 0 "" "" 0 goroutine 98 [running]: github.com/elliotchance/c2go/ast.groupsFromRegex(0xc0006e42a0, 0xdb, 0xc00099de9c, 0x38, 0xc00099de8b) /Users/morganharvey/go/src/github.com/elliotchance/c2go/ast/ast.go:310 +0x360 github.com/elliotchance/c2go/ast.parseAvailabilityAttr(0xc00099de9c, 0x38, 0x12b3340) /Users/morganharvey/go/src/github.com/elliotchance/c2go/ast/availability_attr.go:24 +0x62 github.com/elliotchance/c2go/ast.Parse(0xc00099de8b, 0x49, 0x12adcd4, 0x5) /Users/morganharvey/go/src/github.com/elliotchance/c2go/ast/ast.go:86 +0x2701 main.convertLinesToNodes(0xc00011ecb0, 0x2cc, 0x29f4, 0x0, 0x0, 0x0) /Users/morganharvey/go/src/github.com/elliotchance/c2go/main.go:89 +0x1a6 main.convertLinesToNodesParallel.func1.2(0xc000118000, 0xc00011a028, 0xc00011ecb0, 0x2cc, 0x29f4, 0x0) /Users/morganharvey/go/src/github.com/elliotchance/c2go/main.go:121 +0x53 created by main.convertLinesToNodesParallel.func1 /Users/morganharvey/go/src/github.com/elliotchance/c2go/main.go:119 +0x1b5
I've included the full AST in case it helps with debugging.
ast.txt
The text was updated successfully, but these errors were encountered:
This happens when c2go can't understand a particular line of the clang AWS output. You can fix this by adding a test and modifying the regep. Here is an example: https://github.com/elliotchance/c2go/pull/840/files
Sorry, something went wrong.
That appears to be pretty straightforward. Thanks for the pointer. I'll throw a PR your way as my week allows.
No branches or pull requests
When attempting to run
c2go transpile
, theAvailabilityAttr
items in the AST cause a panic.I've included the full AST in case it helps with debugging.
ast.txt
The text was updated successfully, but these errors were encountered: