Jump to content

Partically complete Lexer+Symbol table+Parser for the autoit language


 Share

Recommended Posts

The title/subtitle says it all.

WARNING!

This code was originally a personal proof of concept. It is neither complete nor fully compliant with the autoit language. (For example, several keywords such as IN or ENUM are not supported) Do NOT expect anything amazing nor inspirational!

I am meerly posting this in the hope that some may find this code useful.

https://bitbucket.org/hyperzap/bleb-autoit-compiler/src

All the compiler code is in /compiler.au3 and /engine/. /Build/ is what is generated by the compiler.

I have tried to break things up as much as possible - you will find a lot of comments everywhere, particually in large blocks.

A good place to start is /compiler.au3 and /engine/general.au3.

I hope someone finds this useful.

Regards,

Twitchyliquid64.

Edited by twitchyliquid64

ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

Link to comment
Share on other sites

Reading through it all know... This is sexy. Keep going on, i might help, too

e: How are you going to handle internal autoit function commands? ie. consolewrite and such - if you ever planned to go so far? :mellow:

Edited by Shaggi

Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG

Link to comment
Share on other sites

Reading through it all know... This is sexy. Keep going on, i might help, too

e: How are you going to handle internal autoit function commands? ie. consolewrite and such - if you ever planned to go so far? :mellow:

the original idea was that there would be some kind of modular plugin system which would be used when a function call was used, and the code would be emitted from that.

obviously, someone needs to rewrite all the builtin functions in c.

ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

Link to comment
Share on other sites

the original idea was that there would be some kind of modular plugin system which would be used when a function call was used, and the code would be emitted from that.

obviously, someone needs to rewrite all the builtin functions in c.

Well the easy way would be to use autoitx dll linking..

But rewriting the functions shouldn't be that hard, seiing as a lot is just wrappers and a lot of the source can be retrieved from old au3 source and ahk.

Have you thought of moving to c++? tcc kinda sucks

Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG

Link to comment
Share on other sites

moving to c++ involves using a c++ compiler for final code generation. there are no c++ compilers that are sufficiently lightweight for my purposes.

tcc does an excellent job of converting c code into instructions with only the most essential optimisations, something i need to get enough control of the build process.

autoitx would be amazing...if it supported all the functions. it supports the hard automating functions though, so it will be incorporated.

ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

Link to comment
Share on other sites

moving to c++ involves using a c++ compiler for final code generation. there are no c++ compilers that are sufficiently lightweight for my purposes.

tcc does an excellent job of converting c code into instructions with only the most essential optimisations, something i need to get enough control of the build process.

autoitx would be amazing...if it supported all the functions. it supports the hard automating functions though, so it will be incorporated.

ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

Link to comment
Share on other sites

moving to c++ involves using a c++ compiler for final code generation. there are no c++ compilers that are sufficiently lightweight for my purposes.

tcc does an excellent job of converting c code into instructions with only the most essential optimisations, something i need to get enough control of the build process.

autoitx would be amazing...if it supported all the functions. it supports the hard automating functions though, so it will be incorporated.

What's left is I/O, math, type conversion and little else that every language supports and therefore wont be hard to implement. Only thing thats missing is the GUI system Edited by Shaggi

Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...