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.

62 lines
3.4 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. ## P# Interpreter
  2. P# is an Open Source, general-purpose, object-oriented scripting language suited also for web development as well as
  3. embedded environments. It implements a highly-efficient bytecode compiler and a virtual machine. Its syntax draws
  4. upon C#, Java and PHP.
  5. P# 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. P# 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 P# 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 P# Specification can be found on the [Wiki Pages](
  17. ## P# - Modern PHP
  18. The name of the language was created analogically to C++ or C#. The ++ oerator in all C-style languages, including PHP means
  19. an increase. Thus as C# is more than C++, and C++ is more than C, the P# is more than PHP.
  20. Despite, that P# syntax draws among others upon PHP, it is not fully compatible with it. P# is a modern, pure Object-Oriented
  21. Language. The distinctive features and powerful extensions to the PHP programming language are:
  22. * Strict, full OOP,
  23. * Method overloading,
  24. * Strict, full type hinting,
  25. * Introducing comma expressions,
  26. * Improved operator precedences,
  27. * 64-bit integer arithmetic for all platforms,
  28. * Smart exception mechanism,
  29. * Native UTF-8 support,
  30. * Built-in standard library and extensions support,
  31. * Garbage Collected via Advanced Reference Counting,
  32. * Correct and consistent implementation of the ternary operator,
  33. * Consistent Boolean evaluation,
  34. * Introducing the $_HEADER superglobal array which holds all HTTP MIME headers.
  35. ## Build Instructions
  36. P# is a multi-platform software, that can be built on any Operating System. On Unix-like. macOS and Cygwin it is as
  37. easy as to fetch the source code and issue single command:
  38. make [debug/release]
  39. Above command will build a P# interpreter with all its SAPI and modules with debug information or basic release optimization,
  40. depending on the chosen option. All object files produced by compiler and binaries, produced by linker will appear in ./build/
  41. directory.
  42. On Windows, it is required to install MingW32 or MingW64 to build the P# Interpreter using Makefile. However, it is also possible
  43. to use other C compiler, especially MSVC.
  44. ## Licensing
  45. P# and the PH7 Engine are OpenSource projects. That is, the complete source code of the engine, interpreter, language
  46. specification, the official documentation and related utilities are available to download. P# is licensed under the
  47. [GNU General Public License v3.0]( with a permission of Symisc Systems
  48. to redistrubute PH7 Engine under the GPLv3.