from Hacker News

OBNC – Oberon-07 Compiler

by AlexeyBrin on 5/17/25, 12:00 PM with 23 comments

  • by jll29 on 5/17/25, 4:05 PM

      Oberon-2 -> C compiler
      ======================
    
      (release 0.17.2)
    
        220 LEX source files (scanner for lexical analysis) src/*.l
      4,192 YACC source files (parser for syntactic and semantic analysis
            and part of code generation) src/*.y
        809 C header files (misc. definitions and interfaces) src/*.h
      9,197 C implementation code files (main driver,
            command line handling, symbol table, other auxiliary data types
            and runtime system/library implementation) src/*.c
        707 build, install, and test scripts (sh)
      ------
      15,125 < 16K LOC
      ======
    
      (+6,299 lines of Oberon-2 test code)
    
    Such a very compact code base! Oberon-2 may never have reached the distribution that Pascal had (which was an issue of timing as well due to influential distributions like P-System Pascal and Borland Turbo-Pascal/Delphi), but it's a great exercise in minimalism.
  • by johnisgood on 5/17/25, 2:43 PM

    Is Oberon used anywhere, if so, where? Is it picked for new projects?