I want to add command line (shell) like statement to C is it possible to implement this syntax by clang and llvm? The syntax is like func arg1 arg2 ... argn; and define func like void func( int arg1, int arg2, ..., int argn) { ...} Charlie -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090929/750811c0/attachment.html>
On Sep 29, 2009, at 6:58 PM, Charlie Li wrote:> I want to add command line (shell) like statement to C is it > possible to implement this syntax by clang and llvm?If you're asking if you can change the clang source code repository like that, no, would be the basic answer. If you're asking do you have the skill to implement that with clang, I don't know, do you? If you're asking is it possible do modify clang to support this syntax, yes, it can be done.
Chris Lattner
2009-Sep-30 15:13 UTC
[LLVMdev] Can I modify C syntax by using Clang and LLVM?
On Sep 29, 2009, at 6:58 PM, Charlie Li wrote:> I want to add command line (shell) like statement to C is it > possible to implement this syntax by clang and llvm? The syntax is > like > > func arg1 arg2 ... argn; > > and define func like > > void func( int arg1, int arg2, ..., int argn) > { ...}Hi Charlie, You definitely could hack clang to allow syntax like this, it would be a straight-forward parser extension. Why would you want to do this though? -Chris
Maybe Matching Threads
- [LLVMdev] CallInst constructor interface
- How to insert instructions before each function calls?
- [LLVMdev] Proposing a new 'alloca' parameter attribute to implement the Microsoft C++ ABI
- How to insert instructions before each function calls?
- How to insert instructions before each function calls?