Skip to content

Tags: droyo/APL

Tags

error-reporting

Toggle error-reporting's commit message
Some tidying. Threw in an error check for applying functions.

garbage-collector

Toggle garbage-collector's commit message
added catenate (,) to list of functions.

nested-expressions

Toggle nested-expressions's commit message
disp.c - changed display of empty character to '⍝'

Removed some token types; braces, brackets, and semicolons are out, conforming with 'A dictionary of APL'. } and { will be operators for accessing array slots.
Restructured the parser to be more robust. It now receives a start and end pointer. It creates two mstacks, one that shrinks to the left, and one that grows to the left. This parser handles nested expressions correctly. I also threw in a debug function to show the interaction between the two stacks. I'm pretty proud of it.

rudimentary-parser

Toggle rudimentary-parser's commit message
THE PARSER WORKS!!

very exciting, i got the table-based parseing scheme from the J source code to work! All rules are firing at the right times. I will need to add a rule for array indexes (a[2], etc), and throw in recursion to parse nested expressions as well, but I made great progress.

parser-complete

Toggle parser-complete's commit message
Extended scanner to recognize dyadic operators '.', and '∘' and ddtre…

…at '∘' in '∘.' as a function.

Also forgot to add disp.c which contains routines for displaying arrays

common-array

Toggle common-array's commit message
Fixed segfaults and pointer typos; Scanned words are now all stored i…

…n an array structure. Temporary storage is taken from a memory stack managed in scan.c. Space separated number literals are combined into a list of numbers.

tokenizer-complete

Toggle tokenizer-complete's commit message
Factored out the scanning code into one function for each type of tok…

…en. Still not very short, but easier to modify. Threw all declarations in a header file, and changed some variable names: lex -> scan, parse -> eval, etc. The parser still just echoes the token stream.