|
From: | mobi phil |
Subject: | Re: [Tinycc-devel] llvm IR target |
Date: | Wed, 12 Mar 2014 14:36:53 +0100 |
Another option is to just pull out the TCC parser into a separate
piece of code. The actual parser code is fairly straightforward, so
once copied into another project/sub-project/file it should be fairly
easy to extend. If your extensions are going to have similar syntax to
existing TCC constructs (e.g. if class/object declarations are similar
to structure declarations) then you should even be able to copy&paste
syntax forms. From that point you would just need to provide the
function that the parser actually calls. I assume that this would also
be a good way to dip your toes into compiler design without jumping
into the deep end all at once.
[Prev in Thread] | Current Thread | [Next in Thread] |