Klaas-Jan Stol wrote:
This ticket doesn't seem to be closeable as is.Would it be good enough
if pmc2c.pl spit out an error on the above definition, or is this even
something that pmc2c.pl should be concerned about?

The goal of the ticket should be for pmc2c.pl to entirely parse the
input PMC files. Either passing through uncooked C, or doing
transformations. Silently dropping code on the floor is not
acceptable.

Pmc2c is just a series of regular expressions. It looks for specific patterns, and if it finds them, builds relevant C code out of them.

It has no ability to check for arbitrary syntax that *doesn't* match a pattern. It's a preprocessor (macro substitution), not a language parser.

What could be done is have it dump anything leftover after the extraction into the resulting C file. Then you'd get a C error on compilation.


wouldn't a PGE-based compiler be helpful?

Yes, certainly desirable, but we're not shooting for that level of bootstrapping in the 1.0 release. When we eliminate all dependencies on Perl, we'll move over to a PGE-based compiler, and keep the generated C code checked into the repository like we keep the generated flex/bison files checked in.

Allison

Reply via email to