Giter VIP home page Giter VIP logo

Comments (3)

marianoapp avatar marianoapp commented on July 20, 2024

We could get some stuff using reflection but there are a lot of other things (like keywords) that exists only in the grammar definition.
I think a better approach would be to have a document with all the keywords, system variables, built-in functions, etc. but that is manually maintained.
Since the grammar doesn't change that much from a release to the next it shouldn't be difficult to keep it up to date. I think we could even make mandatory to include updates to this file for any change that affects the grammar.

For the special variables and their suffixes we could use some sort of script to generate a hierarchical structure (Json, XML) with the data, but I don't think we can use reflection in this case since all the suffixes are just entries in a switch statement.

from kos.

Dunbaratu avatar Dunbaratu commented on July 20, 2024

Doing it manually is probably possible, although I'm loathe to have to maintain two different documentations that contain almost the same information but phrased two different ways. There's already KOS-DOC that @erendrake set up, and it would be a bit annoying to have to maintain both that and also the syntax def file too... I wonder if it's possible to maintain the syntax def file and the KOS-DOC in some combined way. Some of the human-readable syntax docs and the machine-readable syntax defs could be combined, perhaps. If a standard format was designed and adhered to, then it may be possible to have software parse through the .md files of KOS-DOC ... I'll have to think about it.

from kos.

Dunbaratu avatar Dunbaratu commented on July 20, 2024

I labeled it as "refactor" because that's what would be required to implement it. It would require rearranging the suffixes system to allow them to be statically queried without the presence of an instance of the object (i.e. learn what the suffixes of Vessel are when you have no vessels in existence).

from kos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.