Comments (3)
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.
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.
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)
- Strange "too many arguments" error when calling iterator:next.
- TERRAINHEIGHT can still error when a scanner arm exists. Change to mask so it uses trigger flag.
- Infernal Robotics Addon not Available
- DLC robotics parts return half value for mass when iterated over HOT 1
- issue with duplicate module field names HOT 2
- KOSDelegate.InsertPreBoundArgs: Stack arg bottom missing. HOT 1
- RCS:THRUSTVECTORS lists available vectors from all part variants HOT 1
- PIDLoop parameters in SteeringManager:PITCHPID/YAWPID change inconsistently HOT 7
- Update docs "Creating GUIs", examples use gui as a variable HOT 1
- (RP-1 only) probe core is 6x heavier in flight scene than in VAB (disk space mass calculated wrong). HOT 3
- Borken links [DOCUMENTATION]
- Can't set SASMODE... maybe RemoteTech-related
- Stack misalignment bug HOT 3
- Scope seems to be considered differently 'on board' and 'in Archive' HOT 4
- Resizing terminal repeatedly causes a memory leak [BUG]
- Feature Request: "On Script Error" setting on controller part
- Setting part module field value has no effect for some mods
- docs:"make latexpdf" generates only 19 pages (and they are almost empty) HOT 1
- Some system monospace fonts are not recognized by kOS terminal HOT 2
- Redundancy in compiled form of UNTIL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kos.