Subject: | Parsing bug |
Date: | Sat, 11 Feb 2017 01:27:14 +0100 |
To: | bug-MarpaX-Languages-C-AST [...] rt.cpan.org |
From: | Kai Henningsen <kai.extern [...] gmail.com> |
I'm trying to parse the libuv headers:
my $scan = MarpaX::Languages::C::Scan->new(content => "\n#include
<uv.h>\n", filename_filter => qr[/uv]);
Noticed:
1. Parsing from a string is broken:
MarpaX/Languages/C/AST/Grammar/ISO_ANSI_C_2011/Scan.pm:
- print($self->{_content2fh}, $opts{content});
+ print {$self->{_content2fh}} $opts{content};
2. The parser has serious problems with function pointer types. First
example:
"struct uv__work {\n void (*work)(struct uv__work *w);\n void
(*done)(struct uv__work *w, int status);\n struct uv_loop_s* loop;\n
void* wq[2];\n}"
No, that is not one function with three parameters named w, w, and status,
returning a struct uv__work.
--
Show quoted text
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT d s+: a++ C++ UL++++ P+++ L+++ E--- W++@ N@ !o !K w(++) O-@ M-@
V-- PS++@ PE- Y+ PGP+@ t- 5 X- !tv b++>+++ D--- G e+ h-- !r y?
------END GEEK CODE BLOCK------