• neos Universal Compiler and Tree-sitter

    From Mr Flibble@flibble@red-dwarf.jmc.corp to comp.lang.c++,comp.theory on Wed Apr 9 19:56:10 2025
    From Newsgroup: comp.lang.c++

    Hi!

    Interestingly whilst my project, neos (the universal compiler that can
    compile any programming language) is still a WIP I have already
    implemented functionality equivalent to what Tree-sitter provides: mapping between AST and original source code so you can do things such as syntax highlighting in a code editor.

    /Flibble
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From candycanearter07@candycanearter07@candycanearter07.nomail.afraid to comp.lang.c++,comp.theory on Wed Apr 9 23:30:03 2025
    From Newsgroup: comp.lang.c++

    Mr Flibble <flibble@red-dwarf.jmc.corp> wrote at 19:56 this Wednesday (GMT):
    Hi!

    Interestingly whilst my project, neos (the universal compiler that can compile any programming language) is still a WIP I have already
    implemented functionality equivalent to what Tree-sitter provides: mapping between AST and original source code so you can do things such as syntax highlighting in a code editor.

    /Flibble


    Can we see an example?
    --
    user <candycane> is generated from /dev/urandom
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Mr Flibble@flibble@red-dwarf.jmc.corp to comp.lang.c++,comp.theory on Wed Apr 9 23:43:35 2025
    From Newsgroup: comp.lang.c++

    On Wed, 09 Apr 2025 23:30:03 +0000, candycanearter07 wrote:

    Mr Flibble <flibble@red-dwarf.jmc.corp> wrote at 19:56 this Wednesday
    (GMT):
    Hi!

    Interestingly whilst my project, neos (the universal compiler that can
    compile any programming language) is still a WIP I have already
    implemented functionality equivalent to what Tree-sitter provides:
    mapping between AST and original source code so you can do things such
    as syntax highlighting in a code editor.

    /Flibble


    Can we see an example?

    Yes.

    https://github.com/i42output/neos/blob/master/languages/neoscript.neos https://github.com/i42output/neos/blob/master/languages/examples/neoscript/ fibonacci.neo

    /Flibble
    --- Synchronet 3.20c-Linux NewsLink 1.2