Sign in to follow this  
Followers 0

Build your own programming language!

8 posts in this topic

#1 ·  Posted (edited)

Right now, this is only a concept, to see if it's worth doing it.

The idea is: build a script to build a programming language, with a predefined syntax, but with a configurable list of commands. Please tell if you'd like/want/don't want it.

EDIT: I posted it here because, if it's worth making it, I will post it in this thread.

Edited by GiulioM

Share this post

Link to post
Share on other sites

With a predefined syntax but custom commands sounds like AutoIt with either a preprocessor or just #includes. Far more interesting with customizable syntax:

There are quite a lot of tools already like this. Do a bit of reading on BNF as that is the most common syntax. Tools like Yacc and Lex (and their variants) are the most used tools. One of my favourites is a lexer generator called Ragel, I've used it quite a lot in the passed.

In any case the best advice is to do some reading on the theory. I got the dragon book (Compilers: Principles, Techniques and Tools) which is a very definitive reference, that also covers the tools listed above in addition to most of the common algorithms. After that do some more research, as compiler construction (and so compiler compiler construction) is a huge topic. There are lots of really clever variations on the common algorithms like Top Down Operator Precedence Parsers.

Share this post

Link to post
Share on other sites


I am moving this to "Developer Chat" as there is no AutoIt example code as yet. Good luck! :)


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:


ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area


Share this post

Link to post
Share on other sites

#6 ·  Posted (edited)

I wrote Runner. It's a hotkey macro program. Build your own macro with thousands of commands using close to 50 macro command types. Use constant or variable data, read and write to file. React to picture or mathematical comparison, programs running, move mouse, send keys, play file, talk. It's a scripting language written with a scripting language or it's a can of whoop ass with a can of whoop ass inside. I didn't know how to do it until I found AutoIt a few years back.

So my macro is a programming language, no I'm serious it's pretty nice.

Posted Image

I could make a macro that makes a notepad window, send a line of Cake Sheep goto Heaven lyrics file, then narrate the line with Microsoft Sam. Increment the variable line of file to read. Repeat from send line until end of lyric file. I could do it in less then 20 macro commands without calling other macros as functions. Maybe switch narrators every line or two. Not going to clutter this post with a video, plus I never finished the macro. Developers know there isn't enough time.

I forgot Runner is free to forum members joining before 2012. An interested person runs the software and tells me the user_id returned by songersoft. I can then return a key that only runs on your system. Runner is also inexpensive at $9.99+0.7 sales tax ($10.70 or something), Paypal IPN handles that key generation same thing but scripted.

Edited by Xandy
1 person likes this

Share this post

Link to post
Share on other sites

I must say that looks very impressive Xandy. Although I need to absorb it a little. The website also looks good. You've obviously put a lot of work into this. Thanks for sharing it. :)

Share this post

Link to post
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
Sign in to follow this  
Followers 0

  • Similar Content

    • okolaris
      By okolaris
      Hey everyone,
      I thought I might share my little Language UDF plus the more powerful SciTE Tool to ship Strings from SciTE into the xml file. While I haven't had the time to fully adapt the small UDF to one of the big XML-UDFs the so called "Language Transmitter" that basically writes the XML file for you runs mostly on "XML DOM wrapper (COM)" by eltorro. The Transmitter should work with other XML-Language-UDFs depending on their encoding.
      First let's start with the UDF, there are two functions of interest: _LangInit($sFilePath) and s($sString) As you will have guessed, _LangInit($sFilePath) is called once to initialize the UDF and s($sString) is used to receive the string to your key. Plain and simple.
      Now to the actual "new" part, the Language Transmitter. It basically allows you to transfer a selected String from SciTE into a xml file. While doing so it will scan for AutoIt variables, macros etc. and parse the string to fit StringFormat(). It then saves the formatted string in the xml file and returns the formatted call into SciTE. If the selected string is already defined it will directly parse the key into SciTE. To change the default output file, you can either edit the ini-file in the @ScriptDir of the LanguageTransmitter.exe or press Alt+A on empty space again and keep clicking cancel/no until the Transmitter let's you select the current output file. Standard output is strings.xml in the current opened AutoIt Script.
      ; given the line: MsgBox(16, 'Error', 'Error message') ; select 'Error' run the Transmitter follow the instructions, repeat with 'Error message'. Outcome (e.g.): MsgBox(16, s('Error'), s('Error_msg')) ; Variables and Macro example: $sString = "Value: " & $iValue & @CRLF & 'Another value: '& $iValue2 ; Select the full string including all AutoIt variables and macros etc. in SciTE and press Alt+A (default) to run the LanguageTransmitter ; follow the instructions and it will then paste a formatted string like that into SciTE: $sVar = StringFormat(s('Key'), $iValue, $iValue2) ; the correlating xml entry should look like that: ; <string name="Key">Value: %s\r\nAnother value: %s</string> ; as you can see @CRLF has been replaced with \r\n as well. If you are working on a project and want to directly add a string to the xml file just start the Language Transmitter without selecting any text, enter your string and a key.
      Since xml files are required all examples can be found in the zip file. There are two examples, one includes a language selection interface.
      Language File Checker
      I added a script to check whether the xml file contains all required strings or even unnecessary strings.
      Hope you like my little helper!
      UDF -
    • nacerbaaziz
      By nacerbaaziz
      Hi dear
      I have a question
      about the display language of the system
      How can I get the current display language and how can I change it by autoit
      Of course, if this is possible
      Greetings to all and hope you help me
    • nacerbaaziz
      By nacerbaaziz
      Hi friends, I have a question, please.
      I have created a window containing a edit box
      I need to know how to change the keyboard language,
      e.g :
      if a user open the  script  it will be change the keyBord language   in window automatically into English
      I found more examples but didn't work with me .
       I use the windows 10 os
      Please help me .
      thanks in advance to all
      with my Greetings and my appreciation for all users and admins
    • GreenSparks
      By GreenSparks
      I post here because i was wonderring if someone in this forum could help me with my script.
      What i'm trying to do, is to basically install a new keyboard layout in Windows and activate it. I want to acheive by the registry or the command line, but not with the autoit automation tools, i don't find it stable...
      Thanks for your help and have a good day!
    • pinkfoyd
      By pinkfoyd
      Here is a tool coded in AutoIt to edit multiple ini files ( up to 8 at the same time) to include multilanguage support in your script.

      The script himself have multilanguage support, simply by using :
      To change language, i read my global.ini file witch inform me what ini file i had to use...
      ConsoleWrite ( _string_lang(19) ) Func _string_lang($number) $number = _StringRepeat("0",6-StringLen($number)) & $number $string = IniRead($my_ini_folder & $interface_ini_file,"STRING",$number,"NOT_FOUND") Return($string) EndFunc  
      where 19 is the 19 string in ini file witch look like this :
      Todo : Initial ini file not necessarily "english.ini"
      Feel free to use it, give me idea, critical or bug found.....
      As i am french please be gently