Hi,
I'm projecting writing a compiler that would allow syntax extensions (some kind of compile-time metaprogramming). I don't want to have a very powerful system, so I've thought about just having:
{syntax: while (condition) do code}
while (condition, code) => // actual execution
and replace every pattern that matches the syntax with a call to the function.
However, I don't know where to start to get the lexer and parser running, because usual tools such as Flex/Bison or ANTLR (I would like to write the compiler in C#) don't seem to allow this.
Could you provide me any direction on where to go next? I've also read that Scheme or Haskell could be better languages to achieve this task. And of course, I'm open to any suggestion about the actual idea to implement them.
Recent comments
22 weeks 3 hours ago
22 weeks 7 hours ago
22 weeks 7 hours ago
44 weeks 1 day ago
48 weeks 3 days ago
50 weeks 15 hours ago
50 weeks 15 hours ago
1 year 4 days ago
1 year 5 weeks ago
1 year 5 weeks ago