tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Beginner's tinycc questions


From: I B
Subject: [Tinycc-devel] Beginner's tinycc questions
Date: Thu, 21 Jan 2021 21:23:29 +0000 (UTC)

Hi,

I am just beginning to play with tinycc. I want to modify the compiler
and add some new language features (for leaning purposes).

I have a few questions:
1. What is the status of tinycc being re-entrant? Has that
been merged?

2. I want to do some compiler time evaluation. For example
(@comptime is just my simple parsing extension)

..... regular C code ....

@comptime {

  .... some code ....

}

..... continue C code

I want to evaluate code inside @comptime{ } while parsing. The code inside
can generate some more C code and inject it back (and it needs to be compiled).

Question: What's the best way to do this with tinycc? 
Parse and compile the entire file first, then execute the code and create a 
source new file?
(so, there would be two passes)

Or is there a way to inject new source while tinycc is parsing?

Any suggestions are appreciated.

Thanks.
 
Ivan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]