Python Forum
ALMA pyconv : converter for ALMA Python syntax
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ALMA pyconv : converter for ALMA Python syntax
#1
This is my project named ALMA pyconv. It is a converter for Python 2 source files written in ALMA Python syntax. I developed it for myself but I also published it so anyone else can use it.

This script :

- as web script, does a conversion on Python source files
(for example for run them by Skuplt),
so that the source can be written in ALMA Python syntax.

- as console script, does some additional jobs around Python source file
conversion before running pindent.py,
so that the source can be written in ALMA Python syntax.

A block does not need any indentation, but it can have free indentation style.
So the programmer have not worry about white spaces at all.

For example it is a valid ALMA Python code :

a_ = 0

while a_ < 100 :

c_ = ""

if a_ = round(a_/2)*2 :

print a_

for b_ in range(a_) :
c_ = c_ + "*"
endfor

print c_

endif

a_ = a_ + 1

endwhile
The programmer can apply any indentation style, for example :

a_ = 0
        while a_ < 100 :
        c_ = ""
                if a_ = round(a_/2)*2 :
                print a_
                        for b_ in range(a_) :
                        c_ = c_ + "*"
                        endfor
                print c_
                endif
        a_ = a_ + 1
        endwhile
This is the sourceforge.net project page :

sourceforge.net/projects/alma-pyconv

This is my latest test page :

teanarancs.net16.net/converter/converter.php

Recently it is only written in PHP 5. Later I maybe will write a much more faster version in FreeBASIC, but I am not sure, as this PHP script is good enough for me. (But for runnig in one step an ALMA Python script, the best option for me should be writing the FreeBASIC version though. Another option for speed up is to convert pyconv.php by phc, but I am not sure about it. In both cases the script converts the source script firstly then runs the Python interprerter.)
Reply
#2
(Mar-02-2017, 02:34 PM)teanarancs Wrote: endfor
Oh god why
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  propositional logic formula converter bobsmith76 8 4,943 Dec-04-2018, 02:54 AM
Last Post: bobsmith76
  Decimal to binary weighted number converter hobbyprogrammer 1 2,357 Nov-28-2018, 12:38 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020