Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] ANTLR+LLVM example for simple C"
2009 Jul 11
0
[LLVMdev] ANTLR?
When you create a parser via ANTLR you specify the output language of the
resulting recursive descent parser, at the moment there exists no C++ output
template to my knowledge, thus you would have to generate the parser as C
code for which a template exists.
The runtime support should be there, at least partially but it won't use
things like exceptions, nor will it have a very modular design
2009 Jul 11
0
[LLVMdev] ANTLR?
Hi,
I've not got any experience using ANTLR to parse C++, however, you will find
that there only exists a C code generator for ANTLR and NOT a C++ one. Over
the years numerous people have requested a C++ code generation template but
alas there is still only a C one. Just a heads up.
Granville
2009/7/11 Vikram S. Adve <vadve at cs.uiuc.edu>
> We are looking for an open source C++
2009 Jul 11
0
[LLVMdev] ANTLR?
For a LL(1) parser, it might be a little bit difficult to parse complex
grammar like C++, but it might work.
ANTLR worked great when other codes were written in Java, but it was a
little bit painful when using other languages like python.
I worked on it two years ago. I guess they might have some improvement now.
Haohui
On 07/11/2009 02:40 PM, Vikram S. Adve wrote:
> We are looking for an
2009 Jul 11
2
[LLVMdev] ANTLR?
That sounds like a problem. Just so I understand, do you mean there
isn't the run-time support etc. to write back ends for the C++
language, or that the compiler IR is also somehow insufficient to
write a code generator?
--Vikram
Associate Professor, Computer Science
University of Illinois at Urbana-Champaign
http://llvm.org/~vadve
On Jul 11, 2009, at 3:00 PM, Granville Barnett
2009 Jul 11
0
[LLVMdev] ANTLR?
On Jul 11, 2009, at 12:40 PM, Vikram S. Adve wrote:
> We are looking for an open source C++ parser other than g++ if
> possible. Clang would be great but its C++ support is still some
> way away and we need something that works or nearly works now. Does
> anyone have any experience with ANTLR for parsing C++ and for
> extending their C++ parser? Any other feedback on
2011 Jan 24
3
[LLVMdev] LLVM grammar for ANTLR
Has anyone written a grammar for LLVM for ANTLR. I mean an ANTLR
grammar that parses LLVM instructions. Is an LLVM grammar available
for any other parsing tool?
Surinder
2011 Jan 24
0
[LLVMdev] LLVM grammar for ANTLR
Hello Surinder,
The existing hand-written parser is callable from almost anywhere so the only
reason you'd need to have a parser for it would be to extend it. Originally it
was written using Flex and Bison but Chris Lattner rewrote it from scratch to
catch more errors at the parsing stage.
The only feature I've found to be missing from the existing LLVM-AS utility was
an include
2011 Jan 25
1
[LLVMdev] LLVM grammar for ANTLR
Hi Sam,
Thanks for your reply.
I am implementing my research
(http://www.it.usyd.edu.au/~suri/Detecting%20Buffer%20Over.pdf), a
translation of LLVM to a simple non-deterministic language to detect
buffer overflows. It involves
(1) printing a control flow graph of basic blocks of a function (easily done)
(2) translating each llvm statement to a corresponding data flow
language (needs ASTs to
2008 Apr 23
2
[LLVMdev] templates vs code to generate IR
Gordon reminded me that most people seem to generate code using code,
whereas it has become natural for me to use templates to generate
code. Let me include an example from an article I'm working on (Java
centric). The same argument goes for LLVM IR templates versus using
the C++ interface. Generating LLVM IR for me is super simple. Here
are a few of my templates for generating IR
2009 Jul 11
2
[LLVMdev] ANTLR?
Right, I understand that. I was hoping there was such an
implementation using ANTLR since it looks like a fairly mature project.
I'm not sure how stable or mature Elsa is (but comments to clarify
that would be appreciated.). E.g., a quick scan of their Web page
shows the comment that they only have a partial type checker. It also
says their template instantiation is incomplete.
2009 Jul 12
0
[LLVMdev] ANTLR?
I've done extensive research on the subject and if you want to parse ALL of
C++, there are only two options, g++ or the Edison Design Group C++
front-end. Both of these have projects designed to make this easier LLVM
(as you know) and Rose (http://www.rosecompiler.org/), which works with the
EDG compiler. AspectC++, OpenC++, Antler, TLX, all work with only a portion
of the grammer.
On Sat,
2009 Jul 11
10
[LLVMdev] ANTLR?
We are looking for an open source C++ parser other than g++ if
possible. Clang would be great but its C++ support is still some way
away and we need something that works or nearly works now. Does
anyone have any experience with ANTLR for parsing C++ and for
extending their C++ parser? Any other feedback on ANTLR in general
would be welcome too. Thanks,
--Vikram
Associate Professor,
2013 Aug 14
2
[LLVMdev] gerate LLVM IR from an AST output from ANTLR
Hi,
I am a complete newbie to LLVM. I have an ANTLR parser, that outputs an
AST. I want to comvert this AST to a LLVM IR, Can someone point me some
relevant documentation/examples/ etc. on how to go about doing this?
TIA.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130814/919cb805/attachment.html>
2008 Apr 22
3
[LLVMdev] getting closer!
Ok, I *might* be getting this from the assembly code. The assembly
code has:
L_llvm_gc_root_chain$non_lazy_ptr:
.indirect_symbol _llvm_gc_root_chain
.long 0
and I see it being used in the function preamble. Is that a ref to an
extern symbol or the def? I.e., is it referring to
StackEntry *llvm_gc_root_chain;
that I must have in my GC C code? (semispace.c has it)
SO!
2009 Jul 11
0
[LLVMdev] ANTLR?
On Jul 11, 2009, at 1:41 PM, Vikram S. Adve wrote:
> Right, I understand that. I was hoping there was such an
> implementation using ANTLR since it looks like a fairly mature
> project.
Not that I'm aware of.
> I'm not sure how stable or mature Elsa is (but comments to clarify
> that would be appreciated.). E.g., a quick scan of their Web page
> shows the
2013 Aug 14
0
[LLVMdev] gerate LLVM IR from an AST output from ANTLR
On Wed, Aug 14, 2013 at 12:31 PM, emily thomas <emilythomas007 at gmail.com>wrote:
> Hi,
> I am a complete newbie to LLVM. I have an ANTLR parser, that outputs an
> AST. I want to comvert this AST to a LLVM IR, Can someone point me some
> relevant documentation/examples/ etc. on how to go about doing this?
> TIA.
>
>
http://llvm.org/docs/tutorial/LangImpl3.html
-Eli
2013 Aug 15
1
[LLVMdev] gerate LLVM IR from an AST output from ANTLR
Thanks. So, in this tutorial, the LLVM IR generation code is embedded in
the parser. I already have an AST, and if I dont want to touch the parser
code, is there a way to generate the IR? or do I just walk the tree and
generate the iR?
On Wed, Aug 14, 2013 at 3:36 PM, Eli Friedman <eli.friedman at gmail.com>wrote:
> On Wed, Aug 14, 2013 at 12:31 PM, emily thomas <emilythomas007 at
2009 Jan 21
1
Sieve regex match problem
I'm trying to make a regex to match common mailing list addresses and file messages to
corresponding folders.
I'm using sieve-test to try and understand what is happening. The sieve script is:
require [ "fileinto", "regex", "variables" ];
if header :regex ["Sender"]
["(.*>[ \\t]*,?[ \\t]*)?([^-@]*)-([^-@]*)(-bounces)?@antlr.org"] {
2007 Mar 20
1
[LLVMdev] Google SOC - Idea
On 20 Mar 2007, at 15:45, Jeff Cohen wrote:
> Duncan Sands wrote:
>>> If that fails, I will build a front-end using ANTLR [http://
>>> antlr.org] a parser generator with which I am familiar and for
>>> which a FORTRAN grammar is already available (targeting an
>>> obsolete version of ANTLR, but it should not be too difficult to
>>> update).
2008 Apr 24
0
[LLVMdev] templates vs code to generate IR
Hi Terence,
The reason I remarked, actually, is that for LLVM in particular the C+
+ API offers more safety, and emitting .ll generally requires at least
partially reimplementing the IR object model. I think this is a topic
in the FAQ. But both are perfectly valid approaches!
- Gordon
On Apr 23, 2008, at 14:04, Terence Parr <parrt at cs.usfca.edu> wrote:
> Gordon reminded me that