AntKrotov / oberon-07-compiler

Oberon-07 compiler for x64 (Windows, Linux), x86 (Windows, Linux, KolibriOS), MSP430x{1,2}xx, STM32 Cortex-M3
BSD 2-Clause "Simplified" License
63 stars 6 forks source link

New functions and native modules. #24

Open Spoiledpay opened 11 months ago

Spoiledpay commented 11 months ago

Hello! Thinking about expanding the functionalities, I imagine there is something related to new modules for the language such as: *If any module suggestions already exist, you may have a separate folder of examples. This helps the adoption of the language. The more examples the better.

1 - File manipulation module (read files, write files, delete files, search files, create directories, delete directories); 2 - Module with time, date, year function; 3 - Module for windows Gui (Windows, buttons, menus, message box); 4 - Text Window Gui Module console and Color function in the console and text mode windows;

Does your compiler support the functions of pure version 7 of Oberon? We can conclude this. And in this case, is it a natural compiler or does it make a transpiler for C. And does it use GCC to compile the .c into .exe? I note that we need a bunch of additional examples.

Thank you for your work. This above is a suggestion for improvement.

AntKrotov commented 11 months ago

The compiler translates only into machine code. GCC is not used.

The compiler supports Oberon07 edition 2016 + some extensions:

  1. The SYSTEM pseudo-module has been expanded
  2. The symbol "_" is allowed in identifiers
  3. Added system flags
  4. The CASE operator has been improved (constant expressions have been added to option labels and an optional ELSE branch)
  5. The set of standard procedures has been expanded
  6. Type guarding/checking semantics clarified for null pointer
  7. Added one-line comments (starting with a pair of characters "//")
  8. Inheritance from a pointer type is allowed
  9. Added syntax for importing procedures from external libraries
  10. "Strings" can also be enclosed in single quotes: 'string'
  11. Added WCHAR type
  12. Added operation of concatenation of string and character constants
  13. It is possible to import modules specifying the path and file name
  14. Added special syntax for conditional compilation
  15. The name of the procedure at the end of the declaration (after END) is optional
  16. Allow lowercase for keywords