Commit Graph

44 Commits

Author SHA1 Message Date
Kartik K. Agaram 9d7d99fe6c snapshot
This is going better than expected; just 3 failing tests among the new
ones.
2021-06-20 20:36:47 -07:00
Kartik K. Agaram 29795a0db4 start emitting indent tokens 2021-06-18 21:42:01 -07:00
Kartik K. Agaram e5cf570890 redo next-token in more high-level terms 2021-06-18 20:39:33 -07:00
Kartik K. Agaram 80fb9ca9f4 . 2021-06-18 20:12:32 -07:00
Kartik K. Agaram c6cb360544 . 2021-06-18 20:08:19 -07:00
Kartik K. Agaram 93e2e3f934 start emitting token for newline 2021-06-18 20:00:29 -07:00
Kartik K. Agaram 24275c3828 newlines are now a token 2021-06-18 19:54:01 -07:00
Kartik K. Agaram dd133c2a09 start implementing indent-sensitivity
General plan:
  stop skipping newlines during tokenization
  introduce a new indent token, initially skip it transparently
  start doing cleverer things
2021-06-18 19:52:54 -07:00
Kartik K. Agaram b5306cabd3 . 2021-06-18 19:40:35 -07:00
Kartik K. Agaram 2acc00f9b9 . 2021-06-18 07:54:24 -07:00
Kartik K. Agaram 0f2d0d6abe shell: stop punning tokens as cells 2021-06-18 06:53:55 -07:00
Kartik K. Agaram 8014210316 shell: support negative integer literals
We still don't support _any_ fractional literals, positive or negative.
2021-06-06 12:39:03 -07:00
Kartik K. Agaram 79a80f7774 . 2021-06-05 23:12:13 -07:00
Kartik K. Agaram 961ce67569 . 2021-05-30 17:20:42 -07:00
Kartik K. Agaram 40c6066324 . 2021-05-30 16:41:38 -07:00
Kartik K. Agaram 9b131ce02b . 2021-05-29 16:22:08 -07:00
Kartik K. Agaram 7b84872380 shell: non-stream tokens are now small 2021-05-29 16:07:39 -07:00
Kartik K. Agaram 0bba6ccfc2 . 2021-05-29 16:04:30 -07:00
Kartik K. Agaram aceb526b50 . 2021-05-29 16:01:50 -07:00
Kartik K. Agaram c2e59bbf9d . 2021-05-29 16:00:59 -07:00
Kartik K. Agaram 6b212ed6e7 . 2021-05-29 15:54:41 -07:00
Kartik K. Agaram d8f306c30c . 2021-05-29 15:53:31 -07:00
Kartik K. Agaram 2ad0a98f94 . 2021-05-29 15:53:21 -07:00
Kartik K. Agaram 56c621b6f1 shell: start reducing the waste in tokenize 2021-05-29 15:49:58 -07:00
Kartik K. Agaram 119e661f20 a second place with lousy storage management 2021-05-19 23:23:49 -07:00
Kartik K. Agaram e2ab1b30b1 disallow null traces
We now use traces everywhere for error-checking. Null traces introduce
the possibility of changing a functions error response, and therefore its
semantics.
2021-05-19 20:56:37 -07:00
Kartik K. Agaram 7105b73fd3 give up on nested backquotes for now 2021-05-07 09:22:54 -07:00
Kartik K. Agaram a1cfadc749 first passing test for macroexpand
In the process I spent a long time tracking down a stray TODO in 108write.subx
that I thought would abort but didn't since the switch to baremetal.

Then after I reintroduced that assertion I had to go track down a bunch
of buffer sizes. Stream sizes continue to be a huge mess.
2021-05-06 21:38:02 -07:00
Kartik K. Agaram a54c6f2ee7 belatedly migrate stale example definitions
Also bare-bones syntax highlighting for .limg files. Doesn't work when
.limg file is first file opened with Vim.
2021-05-06 16:42:08 -07:00
Kartik K. Agaram 93f1bee02c reading and printing backquotes and unquotes 2021-05-03 12:02:12 -07:00
Kartik K. Agaram d46c4b06b2 shell: comments 2021-04-29 23:48:36 -07:00
Kartik K. Agaram 24883b04f5 . 2021-04-29 23:43:17 -07:00
Kartik K. Agaram 05879d4f99 load large definitions 2021-04-29 16:10:30 -07:00
Kartik K. Agaram d5d3e02ad4 shell: bugfix for stream literals
I was forgetting that callers sometimes reuse outputs between successive
tokens.
2021-04-28 16:34:40 -07:00
Kartik K. Agaram 55cde01edf shell: stream literals 2021-04-27 23:10:30 -07:00
Kartik K. Agaram 6ecd9920ca shell: tokenizing stream (string) literals
We're calling them streams since they support appending.
2021-04-27 22:48:16 -07:00
Kartik K. Agaram 16f51dd76d . 2021-04-27 22:14:08 -07:00
Kartik K. Agaram d0578257cd shell: dot token 2021-04-15 08:48:53 -07:00
Kartik K. Agaram 126a0390f5 . 2021-04-15 08:47:58 -07:00
Kartik K. Agaram 26a1849895 shell: quote 2021-04-06 09:40:13 -07:00
Kartik K. Agaram d124be9cb6 strip spaces when tokenizing
Thanks Max Bernstein for reporting this.
2021-03-08 17:54:07 -08:00
Kartik Agaram 1a1a1671ed 7866 2021-03-07 19:46:21 -08:00
Kartik K. Agaram bcde6be528 7857 - shell: first function call 2021-03-05 15:18:46 -08:00
Kartik K. Agaram 71e4f38129 7842 - new directory organization
Baremetal is now the default build target and therefore has its sources
at the top-level. Baremetal programs build using the phase-2 Mu toolchain
that requires a Linux kernel. This phase-2 codebase which used to be at
the top-level is now under the linux/ directory. Finally, the phase-2 toolchain,
while self-hosting, has a way to bootstrap from a C implementation, which
is now stored in linux/bootstrap. The bootstrap C implementation uses some
literate programming tools that are now in linux/bootstrap/tools.

So the whole thing has gotten inverted. Each directory should build one
artifact and include the main sources (along with standard library). Tools
used for building it are relegated to sub-directories, even though those
tools are often useful in their own right, and have had lots of interesting
programs written using them.

A couple of things have gotten dropped in this process:
  - I had old ways to run on just a Linux kernel, or with a Soso kernel.
    No more.
  - I had some old tooling for running a single test at the cursor. I haven't
    used that lately. Maybe I'll bring it back one day.

The reorg isn't done yet. Still to do:
  - redo documentation everywhere. All the README files, all other markdown,
    particularly vocabulary.md.
  - clean up how-to-run comments at the start of programs everywhere
  - rethink what to do with the html/ directory. Do we even want to keep
    supporting it?

In spite of these shortcomings, all the scripts at the top-level, linux/
and linux/bootstrap are working. The names of the scripts also feel reasonable.
This is a good milestone to take stock at.
2021-03-03 22:21:03 -08:00