Commit eb3cf47c authored by LiberIT's avatar LiberIT

minor modifications in preparation for quote support

should we do quote support?
I mean we could get away with a lot without it...
but it would be much better
parent a665b57e
......@@ -259,8 +259,8 @@ LGO & long grammar word denote overflow\\
\bottomrule
\end{tabular}
The quote denote is 5 bits long, leaving 11 bits.\
the next 2 bits is used to indicate bit thickness of quote scalar (s),
the following 3 bits is used to indicate the magnitude of the vector (s),
The next 2 bits is used to indicate bit thickness of quote scalar (s),
The following 3 bits is used to indicate the magnitude of the vector (s),
1 bit for name or literal
\begin{description}
\item[letter] l \_letter
......@@ -285,8 +285,9 @@ unsigned shorts each short containing a word, intialized to repeating sequence
of ``hello \_vocative\_case'')
\end{description}
In the case of a referential, or variable name, the name can be (up to) four
words long, that way it fits in a 64bit area --- similar to a 64bit address.
In the case of a referential, or relative variable block address, the address can
be (up to) four words long, that way it fits in a 64bit area --- similar to a
64bit address.
\subsection{Sequence Extension}
......@@ -332,15 +333,16 @@ third-dimension-pointer. Which is more similar to the C implementation anyways.
The variable pile is a statically allocated area in the
code. All pointers in the code are relative to the local variable pile, effectively
making it a sandbox. Attempts to read or write to pointer locations outside the local variable pile
will return 0, or errors if possible.
making it a sandbox. Attempts to read or write to pointer locations outside
the local variable pile will return 0, or errors if possible.
Each recipe (function) has it's own variable pile for locally used variables.
The variable pile is primarily for storing variables that don't fit in a
sentence. So any variable whose phrase wont fit in a standard short vector.
Assuming 1 short for the quote, one for the index and one for the phrase,
that leaves 13 for the value, or 12 if it is a sequence.
that leaves 13 for the value, or 12 if it is a sequence. Generally anything that
takes more than 64bits at this time.
Also variables that are defined in a sentence should be inserted without
breaking across a vector boundary, so if the phrase would break, then it should
......
......@@ -9,6 +9,9 @@
#include "seed.h"
#include "sort.h"
/** phrase_encode
* is a secondary encoding pass, where number words are turned into numbers,
* and variable names are turned into their values */
struct Phrase /* produce */ phrase_encode(word_t number, struct Phrase input) {
switch (number) {
case number_GRAMMAR:
......@@ -18,11 +21,6 @@ struct Phrase /* produce */ phrase_encode(word_t number, struct Phrase input) {
input = number_grammar_encode(input);
break;
// it's a hash name, so can use something like in the normal name
// case conditional_mood_GRAMMAR:
// input.length = input.length - 1;
// input = addenda_theGrammarWord_toThePhrase(number, input);
// input.length += 1;
// break;
default:
if (is_grammatical_case_word(number) == truth_WORD) {
input.length = input.length - 1;
......@@ -757,6 +755,9 @@ fyakyi_hwusti_hpamhtinka_kfontu(struct Phrase htikya, struct Text hkakhnikya) {
// struct Text firstWord = read_theTextZFirstWord(theText);
return htikya;
}
/** independentClause_encoding does the bulk of the encoding process,
* passing various subroutines to other functions. */
struct Paragraph /* produce */
neo_independentClause_encoding(const struct Text text,
struct Paragraph tablet,
......@@ -816,7 +817,14 @@ neo_independentClause_encoding(const struct Text text,
if (derived_word_magnitude > 0) {
number = 0;
word_number_encode(derived_word_magnitude, derived_word, &number);
if (number != 0) {
// if (number == quoted_GRAMMAR) {
// //process quote
// // find quote type
// // find end of quote
// // encode quote
// // adjust indexFinger accordingly
// } else
if (number != 0 ) {
string_zero(WORD_LONG, word);
input = tablet;
input.begin = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment