Aer Interpreter Source
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
5.8 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. ## Aer Interpreter
  2. Aer (/ɛə/ from Latin: aer, meaning air) is a lightweight, OpenSource, general-purpose, object-oriented scripting programming
  3. language suited also for web development as well as embedded environments. It implements a highly-efficient bytecode compiler
  4. and a virtual machine. The term Aer is used interchangeably with AerScript. Its syntax draws upon C++, C#, Java and PHP.
  5. Aer is the ideal language interpreter for writing enhanced web applications like blog, CMS, search engine, etc. or
  6. embedded solutions with dynamic web interfaces like routers, set-top-boxes, or smart home solutions. Aer Interpreter
  7. is based on PH7 Engine and thus it is 100% hand-coded, written in pure C software, that compiles unmodified and runs
  8. on any platform including restricted embedded device with a C compiler.
  9. ## Syntax
  10. The core syntax of Aer language is similar to that of other C-style languages such as C++, C#, Java or PHP. In particular:
  11. * Semicolons are used to denote the end of a statement.
  12. * Curly brackets are used to group statements. Statements are commonly grouped into methods (functions), methods into
  13. classes, and classes into namespaces.
  14. * Variables are assigned using an equals sign, but compared using two consecutive equals signs.
  15. * Square brackets are used with arrays, both to declare them and to get a value at a given index in one of them.
  16. Full Aer Specification can be found on the [Wiki Pages](
  17. ## AerScript - Modern PHP
  18. Despite, that Aer syntax draws among others upon PHP, it is not fully compatible with it. Aer is a modern, pure Object-Oriented
  19. Language. The distinctive features and powerful extensions to the PHP programming language are:
  20. * Strict, full OOP,
  21. * Method overloading,
  22. * Strict, full type hinting,
  23. * Introducing comma expressions,
  24. * Improved operator precedences,
  25. * 64-bit integer arithmetic for all platforms,
  26. * Smart exception mechanism,
  27. * Native UTF-8 support,
  28. * Built-in standard library and extensions support,
  29. * Garbage Collected via Advanced Reference Counting,
  30. * Correct and consistent implementation of the ternary operator,
  31. * Consistent Boolean evaluation,
  32. * Introducing the $_HEADER superglobal array which holds all HTTP MIME headers.
  33. ## 64-Bit Integer Arithmetic For All Platforms
  34. Unless most scripting and programming languages, Aer have standardized the size of an integer and is always stored in 8 bytes
  35. regardless of the host environment. Because there is no cross-platform way to specify 64-bit integer types Aer includes typedefs
  36. for 64-bit signed integers. Thanks to that, integers can store values between -9223372036854775808 and +9223372036854775807
  37. inclusive, both on 32-bit and on 64-bit host OS.
  38. ## Native UTF-8 Support
  39. Aer has builtin native support for UTF-8 characters. That is, you are not restricted to use only plain-English to name variables
  40. or methods. Any UTF-8 encoded natural language can be used without the need for ICU or any other internationalization package.
  41. ## Hand-Coded Project
  42. The reason why performance rocks under AerScript and its PH7 Engine relies in the fact that is a hand-coded project. That is,
  43. Aer does not use any external tools to generate it's lexical analyzer such as lex or flex, nor does not use LALR(1) parsers such
  44. as Bison or YACC to generate it's parser. By acting so, the lexer and the parser are thread-safe, full re-entrant, generate
  45. better error message, takes less space in the source tree and are easier to maintain.
  46. Aer is written in C. It compiles and runs unmodified on any platform including restricted embedded device with a C compiler.
  47. The PH7 Engine have been extensively tested under Windows and UNIX including Linux and FreeBSD. If you have successfully compiled
  48. and tested Aer in an exotic environment or a proprietary UNIX, please let us know.
  49. ## Build Instructions
  50. Aer is a multi-platform software, that can be built on any Operating System. On Unix-like. macOS and Cygwin it is as
  51. easy as to fetch the source code and issue single command:
  52. make [debug/release]
  53. Above command will build a Aer interpreter with all its SAPI and modules with debug information or basic release optimization,
  54. depending on the chosen option. All object files produced by compiler and binaries, produced by linker will appear in ./build/
  55. directory.
  56. On Windows, it is required to install MingW32 or MingW64 to build the Aer Interpreter using Makefile. However, it is also possible
  57. to use other C compiler, especially MSVC.
  58. ## Bug Reporting
  59. While doing our best, we know there are still a lot of obscure bugs in AerScript. To help us make Aer the stable and solid
  60. product we want it to be, we need bug reports and bug fixes. If you can't fix a bug yourself and submit a fix for it, try
  61. to report an as detailed report. When reporting a bug, you should include all information that will help us understand what's
  62. wrong, what you expected to happen and how to repeat the bad behavior. You therefore need to tell us:
  63. * your operating system's name and version
  64. * what version of Aer Interpreter you're using
  65. * anything and everything else you think matters.
  66. Tell us what you expected to happen, what did happen and how you could make it work another way. Dig around, try out and test.
  67. Then, please include all the tiny bits and pieces in your report. You will benefit from this, as it will enable us to help you
  68. quicker and more accurately.
  69. ## Licensing
  70. Aer and the PH7 Engine are OpenSource projects. That is, the complete source code of the engine, interpreter, language
  71. specification, the official documentation and related utilities are available to download. Aer is licensed under the
  72. [GNU General Public License v3.0]( with a permission of Symisc Systems
  73. to redistribute PH7 Engine under the GPLv3.