compiler with python

Mark Lawrence breamoreboy at yahoo.co.uk
Sun Mar 7 16:16:25 CET 2010


Alf and Steven Howe, please don't top post, it makes it all but 
impossible to follow a thread.  Darn!:)

Mark Lawrence.

Alf P. Steinbach wrote:
> Since Mohamed is talking about compilation I think it's more likely he's 
> talking about an intermediate program represention based on quad tuples 
> like
> 
>   (OP, DESTINATION, ARG1, ARG2)
> 
> Cheers,
> 
> - Alf
> 
> 
> * Steven Howe:
>> Is it possible he's talking about a 'quad core'? as in a CPU? In that 
>> case I think he wants
>> to optimize a python program for a multiprocessor core with four 
>> processors.
>>
>> sph
>>
>>
>> On 03/06/2010 07:56 AM, Dave Angel wrote:
>>> mohamed issolah wrote:
>>>>
>>>> 2010/3/6 Dave Angel <davea at ieee.org>
>>>>
>>>>> mohamed issolah wrote:
>>>>>
>>>>>> hey,
>>>>>>
>>>>>> How can I construct a compiler with python just for informatiom ., 
>>>>>> I have
>>>>>> habit to construct it with C language,
>>>>>>
>>>>>> sorry for my english ;-)
>>>>>>
>>>>>>
>>>>> You need to tell us what you're really trying to do, what tools you're
>>>>> willing to use, and probably why you want it.  And if you're not 
>>>>> sure about
>>>>> your English, keep the sentence structure straightforward.
>>>>>
>>>>> Let me make a couple of wild guesses:
>>>>>
>>>>
>>>>
>>>>> You want to design and build a compiler that takes xml information 
>>>>> as its
>>>>> source code, and compiles those xml files into Intel x86 machine 
>>>>> code.  The
>>>>> compiler and the resulting executable needs to run on an x86 Linux 
>>>>> machine.
>>>>>  Your previous experience was in doing this sort of thing in C, but 
>>>>> you want
>>>>> to try it with Python instead.  You want to do it without using the 
>>>>> lxml
>>>>> libraries.
>>>>>
>>>>> You want to build a python compiler, that takes python source code and
>>>>> produces Java byte code files.  You'd like to do this in C, but 
>>>>> don't want
>>>>> to use any of the available existing CPython or Jython source 
>>>>> code.  Your
>>>>> goal is not to make a commercially viable product, but to learn as 
>>>>> much as
>>>>> possible in the process.
>>>>>
>>>>>
>>>>> DaveA
>>>>>
>>>>
>>>> hey,
>>>>
>>>> I want to create a compiler which transform a code like pascal code 
>>>> (that
>>>> what I do in C) to "quad"
>>>> In C, I use BISON and FLEX tools.
>>>>
>>>>
>>> I've forwarded your message to the list, and fixed your top-posting 
>>> by moving your response to the bottom.  I don't have a clue what 
>>> "quad" is, unless it's a synonym for Forth.
>>>
>>> You haven't specified the OS you'll be using to run the compiler, nor 
>>> the one you're targeting, so some of these choices may not be 
>>> useful.  For example, the first one is Linux only.
>>>
>>> http://www.freenet.org.nz/python/pybison/
>>>     PyBison - Python binding for Bison/Flex
>>>
>>> http://freshmeat.net/projects/yeanpypa/
>>> http://www.slash-me.net/dev/snippets/yeanpypa/documentation.html
>>>
>>> http://www.python.org/community/sigs/retired/parser-sig/towards-standard/ 
>>>
>>>
>>> Or you could go here, which has links to (most of) these and others.
>>> http://wiki.python.org/moin/LanguageParsing
>>>
>>> DaveA




More information about the Python-list mailing list