That is fan-flipping-tastic. This is going to be one loaded and super useful Wiki!I think so. I only have about 30 more pages to do of the help files and then I can move back to the tutorial. You will be able to load the Wiki in one tab and the Help files in the other for easy reference. Both have links to each other at the top of their nav boxes. I imagine many will have them loaded in their browsers as they work on their SCI projects.
| Abbr | Type | Explanation |
| ---- | ------------ | ----------- |
| Pred | Non-terminal | Predicate part: This identifies the first part of a sentence |
| Subj | Non-terminal | Subject part: This identifies the second part of a sentence |
| Suff | Non-terminal | Suffix part: This identifies the third and last part of a sentence |
| Refe | Non-terminal | Reference part: This identifies words that reference another word in the same sentence part |
| mCla | Terminal | Match on class mask |
| mWor | Terminal | Match on word group ---Note, does not appear in this grammar |
| Forc | Terminal | Force storage: Apparently, this was only used for debugging. ---nor does this |
| Step | Grammar Rule | Notes |
| 01. | 013f -> 013c | Really just a placeholder. It instructs us to proceed to rule 013c. |
| 02. | 013c -> 013b | The first rule in the 013c 'set' instructs us to proceed to rule 13b. |
| 03. | 013b -> 0136, 013b | The first rule in the 013b 'set' instructs us to proceed to rule 0136. |
| 04. | 0136 is a terminal rule, the 'indicative verb' | Not a match to our first word in our input string (looking for an imperative verb). |
| 05. | 013b -> 0136, 0130, 013b | 0136 is no match (same as #4 above) |
| 06. | 013b -> 0136 | 0136 is no match, skip |
| 07. | 013b -> 0136 0133 012f | 0136 is no match, skip |
| 08. | 013b -> 0136 0133 0133 013f | 0136 is no match, skip |
| 09. | 013b -> 012f | |
| 10. | 012f is a terminal rule - the 'imperative verb' | A match for our 1st token in our input string! |
| 11. | Now the 2nd token in our input string | Start back at the beginning of the parse rules... |
| 12. | 013f -> 013c | |
| 13. | 013c -> 013b | skip all (9) 013b rules dead-end with no match on our noun terminal (0130). Details removed for brevity... |
| 14. | 013c -> 013d | proceed to rule 013d |
| 15. | 013d -> 0131, 0139 | skip - we don't have enough input tokens left to fulfill this rule |
| 16. | 013d -> 0131, 013a, 0139 | skip, not enough input tokens |
| 17. | 013d -> 013a | skip - ultimately dead-ends with no 0130 to match our noun... |
| 18. | 013d -> 0139 | proceed to this rule... |
| 19. | 0139 -> 0130, 0135, 013d | skip, not enough tokens |
| 20. | 0139 -> 0130, 0139 | skip, not enough tokens |
| 21. | 0139 -> 0130 | proceed... |
| 22. | 0130 is a terminal rule - the 'noun' | a match for our 2nd token in our input string! |
| 23. | Finished. No more tokens. |
| Step | Input string | Next rule / notes |
| 0. | open door | Before parse... |
| 1. | 013f door | (next rule: 013c) |
| 9. | 013c door | (next rule: 012f) |
| 10. | 012f door | (terminal, imp,verb - done with token 1) |
| 12. | 012f 013f | (starting at beginning of parse tree with 2nd token) |
| 14. | 012f 013c | (next rule: 013d) |
| 18. | 012f 013d | (next rule: 0139) |
| 21. | 012f 0139 | (next rule: 0130) |
| 22. | 012f 0130 | (terminal, noun - done with token 2) |
| 23. | Done |
Doesn't SCI have a VM that the scripts compile to? And it's object oriented as well. Sounds very much like Java.
To be honest I never spent much time looking into decoding SCI back when I was writing all those tools and specs for AGI. But having worked as a Java developer for the past 13 years, it occurs to me now that the way SCI works seems to be quite similar to Java. Doesn't SCI have a VM that the scripts compile to? And it's object oriented as well. Sounds very much like Java.
I guess the only difference is the Lisp syntax. Nowadays we have languages like Clojure that are lisp-like and compile to the Java VM, so that's even closer.
Yes, Sierra were definitely way ahead of their time. They were building the SCI system back in 1987 but Sun didn't build Java until around 1991 (Oak language as it was called then).
There is a comment on this web site by someone who describes the SCI language as being like Smalltalk. Don't know what their source is:
http://multimedia.cx/eggs/the-interpreter/
Here's the quote:
"And quite an interesting fact: old games used byte-code so it would be easier to parse and run. For example, SCI
What kills me is that all things I hated (and swore would not apply in my future) during my higher education are coming back to haunt me. Push-down automatons, context-insensitive grammars - I never thought I would ever see them in my professional career. Of course, I have not. But in my hobbies? You bet...Since I wrote the "black box" document, I thought I'd reply to this. I wrote the document at a time when I had no formal CS education. But this file contains essentially a context-free grammar for the language understood by the parser. It's complicated a bit by some things that are hard-coded in the parser, so you probably couldn't change the black box file easily (not without being mindful of the limitations of the parser code... which we don't have).
Since I wrote the "black box" document, I thought I'd reply to this. I wrote the document at a time when I had no formal CS education. But this file contains essentially a context-free grammar for the language understood by the parser. It's complicated a bit by some things that are hard-coded in the parser, so you probably couldn't change the black box file easily (not without being mindful of the limitations of the parser code... which we don't have).I was wondering about that - adding rules into the grammar. There is only a couple (reasonable) input strings that I couldn't get to parse (of the form verb/noun/prep/prep/noun & noun-verb/noun/adverb/prep/noun). I thought I would give it go, but I guess I won't be too surprised if it doesn't work.
Don't you just wish that some ex-Sierra employee somewhere still has the SCI source code somewhere? Maybe even the source for a game or two...
I looked through both the 3rd and fourth editions page by page and found nothing. I believe the original KQ book was called something else, but that would have been pre SCI.
Don't you just wish that some ex-Sierra employee somewhere still has the SCI source code somewhere? Maybe even the source for a game or two...
I looked through both the 3rd and fourth editions page by page and found nothing. I believe the original KQ book was called something else, but that would have been pre SCI.
I have a copy of "The Official Book of King's Quest", which did indeed have some AGI source code in it. The person who told me that there was SCI source code in King's Quest Companion was an ex-Sierra employee. But I think it was based on a memory that is nearly 20 years old. There must be some basis to it though. When I showed him a snippet of script code from SCI Companion, he asked if some of that syntax came from the SCI snippets shown in King's Quest Companion. It may be that he is remembering the AGI code snippets in the earlier King's Quest book. I'll go back to him and check.
I doubt that an ex-Sierra employee would release the original source code in a way that would end up making it public. I've been discussing the original syntax with two ex-Sierra employees over the past week and even though they worked very closely with the system, they can't recall the exact syntax anymore. But they've given me a rough idea.
It sounds like we'll need to find a first edition copy of King's Quest Companion in order to verify this. I went back to double check the title and, although it is possible the title is incorrect, apparently the SCI code was only it the first edition of the book in question. Apparently there was a law suit and all proprietry information was removed from later editions.
Could she scan it for us?