The PLanG programming language is an educational programming language used at the Faculty of Information Technology of the Péter Pázmány Catholic University, Hungary, for teaching the very basics of programming in the first semester. The language and the small IDE/interpreter accompanying it was designed and implemented by László Lövei in the summer of 2005, based on a pseudocode language used earlier to describe algorithms on paper. A Pascal-like language, its main distinguishing feature is that its keywords are in Hungarian.
It's a small language: while it's Turing-complete (of course), it lacks subroutines, records, user-defined types, and it doesn't even have elsif.
XPLanG (eXtended PLanG) is an extended version of that language. Having taken a course in compiler construction at ELTE, I chose extending PLanG as the topic for my self-directed laboratory project, then I chose to continue the project for my BSc thesis. The first release candidate is due to be released at the beginning of November 2019.
The dream lives on.
You will need Java 8 Runtime Environment (or later). Just install the latest JRE from Oracle's download page.
The latest release is available here on Github, while the latest build can be downloaded from the homepage.
Start the XPLanG interpreter by running bin/XPLanG (Unix-like systems) or bin/XPLanG.bat (Windows).
XPLanG [options] SOURCE_FILE
SOURCE_FIE should be a PLanG program.
Valid options:
--dry-runPerform a dry run: parse and analyse the source, displaying any errors, but do not interpret it.--print-astPrint the Abstract Syntax Tree after parsing the program--dump-memoryDump the contents of the memory to the StdOut after running the program--source-encodingthe encoding of the source code (UTF8 or LATIN1)--output-encodingThe encoding of the standard output (UTF8 or LATIN1). When not set, the system default will be used.--helpdisplay usage information and exit--versiondisplay version information and exit
XPLanG comes with its own small editor/IDE. Start the XPLanG Editor by running bin/XPLanG-editor (Unix-like systems) or bin/XPLanG-editor.bat (Windows). When starting from the command line, you can specify a single file as an argument, that file will be opened in the editor.
You will need
Make sure to have these in your PATH, then restart your terminal.
To get the source code, type git clone https://github.com/Botffy/XPLanG.git in your terminal, in the directory where you'd like your copy of the repo to be created.
gradle classesdownloads all dependencies and compiles the whole thing.gradle assemblecreates the actual product. The distribution packages are put in thebuild/distributions.gradle testruns the JUnit tests.gradle javadocgenerates the Javadoc documentation, putting it indocs/javadoc.gradle checkinvokes Checkstyle in addition to running the tests.gradle jacocoinvokes the JaCoCo code coverage tool.gradle runruns the interpreter. Pass arguements to XPLanG via Gradle through the-PappArgscommand line argument as a list of strings. Trygradle run -PappArgs="['examples/guessing_game.plang']".gradle runGuistarts the editor GUI. Specify the file to be opened on startup by using the-PappArgsargument.
You can find the build reports in build/reports.