Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d9f5f5e
Work in progress
sfkleach Sep 26, 2021
3a2eac1
Examples for unit testing
sfkleach Sep 26, 2021
cb18c45
Work in progress - rudimentary listing in results file
sfkleach Sep 28, 2021
dd4b01b
Incremental improvement in quality of error reporting - work in progress
sfkleach Sep 28, 2021
3210f1e
Move function to correct section of file - for later extraction
sfkleach Sep 28, 2021
2782bd9
Additional debugging support
sfkleach Sep 28, 2021
f3669db
Fix undeclared variables
sfkleach Sep 28, 2021
2dddad2
More incremental progress [ci skip]
sfkleach Sep 28, 2021
356b729
More incremental progress [ci skip]
sfkleach Sep 29, 2021
5889fb3
Work in progress
sfkleach Oct 1, 2021
8ee71c0
Corrected bug
sfkleach Oct 1, 2021
c1ae342
Numerous small fixes [ci skip]
sfkleach Oct 1, 2021
2282540
new_list_builder in progress
sfkleach Oct 1, 2021
61cc7c9
Add library new_list_builder
sfkleach Oct 1, 2021
67f3ea9
Add more documentation
sfkleach Oct 1, 2021
86ea1d0
Fix issue with semi-colon being eaten [ci skip]
sfkleach Oct 1, 2021
07f844e
Replacing up_from with an autoloadable list_from, anticipating the re…
sfkleach Oct 2, 2021
e43b797
Splitting up the main file
sfkleach Oct 2, 2021
18931af
Implemented with_data [ci skip]
sfkleach Oct 2, 2021
58d4653
Improved reporting on the unittest context
sfkleach Oct 2, 2021
759ce22
Remove examples folder
sfkleach Oct 2, 2021
4b46560
Make the unittest code more fully autoloadable
sfkleach Oct 2, 2021
a7a0ea3
Fixes for better context in failure messages and extra unit tests for…
sfkleach Oct 2, 2021
b23692b
Remove early test file [ci skip]
sfkleach Oct 2, 2021
cb9ec50
Ensure that nested tests default to lvars
sfkleach Oct 2, 2021
be4b2a6
Add files for demo
sfkleach Oct 3, 2021
73a6294
Isolate the print routines from pop_pr_quotes for demo
sfkleach Oct 3, 2021
fca3317
Isolate the print routines from pop_pr_quotes for demo
sfkleach Oct 3, 2021
8004528
Fixed expect_mishap and improved the reporting
sfkleach Oct 8, 2021
16b7c17
Adding unit tests
sfkleach Oct 15, 2021
b6f8f46
Cosmetic improvements
sfkleach Oct 15, 2021
78b2a51
Split off define:testsuite from define:unittest
sfkleach Oct 15, 2021
3d4904f
Added utilities
sfkleach Sep 7, 2021
8b19ba2
Bring in restack from GOSPL plus 1 dependency read_variables
sfkleach Mar 5, 2022
f93c2ae
Implementing lib dict
sfkleach Sep 5, 2021
b06cacc
Adding some autoloadable functions
sfkleach Sep 5, 2021
4dd476a
Work in progress
sfkleach Sep 5, 2021
98d372d
Help file for dict
sfkleach Sep 5, 2021
8eda01a
First draft of documentation of dict
sfkleach Sep 5, 2021
784451f
Documenting dicts and adding support for named closures
sfkleach Sep 5, 2021
bda516f
Added concatenation of dictionaries
sfkleach Sep 7, 2021
be56cb8
Minor fix-ups for previous renaming
sfkleach Sep 7, 2021
4fe2e4b
Bug fix for autoloadable dict functions
sfkleach Aug 10, 2024
15a262b
[skip ci] Update corepop results
Aug 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
__pycache__
.ropeproject
report.xml
/base/pop/getpoploglib/scrapbook/
66 changes: 66 additions & 0 deletions base/pop/getpoploglib/auto/$.p
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
section dollar => $;

;;; Initially tried with '$_' and hit a lot of problems with '$_{'.
lconstant autoload_prefix = 'dollar_';
lconstant autoload_class_suffix = '_key';

;;; This procedure provides an extension mechanism for the $ITEM syntax.
;;; It maps from 'items' from the Pop-11 itemizer (words, string, numbers)
;;; or keys (word_key, string_key, number keys) into code-planting
;;; procedures.

define lconstant lookup( item );
if item.isword then
lvars w = consword( autoload_prefix <> item.word_string );
lvars wid = word_identifier( w, pop_section, true );
if wid then
wid.valof
else
if sys_autoload( w ) then
word_identifier( w, pop_section, true ).valof
else
false
endif
endif
else
lvars w = consword( autoload_prefix <> item.datakey.class_name.word_string <> autoload_class_suffix );
lvars wid = word_identifier( w, pop_section, true );
[try to autoload ^w] =>
if sys_autoload( w ) then
[ succeeded] =>
word_identifier( w, pop_section, true ).valof
else
false
endif;
endif
enddefine;

define lconstant is_viable_shell_variable( w );
returnif( w.datalength <= 0 )( false );
lvars w1 = subscrw( 1, w );
returnunless( w1.isalphacode or w1 == `_` )( false );
lvars i;
for i from 2 to w.datalength do
lvars ch = subscrw( i, w );
returnunless( ch.isalphacode or ch.isnumbercode or ch == `_` )( false )
endfor;
return( true )
enddefine;

define global syntax $ ;
lvars item = readitem();
if item.isword and item.is_viable_shell_variable then
sysPUSHQ( item.word_string );
sysCALL -> pop_expr_inst;
"systranslate" -> pop_expr_item;
else
lvars p = lookup( item );
if p then
p( item )
else
mishap( 'Unexpected item after $', [^item] )
endif
endif
enddefine;

endsection;
1 change: 1 addition & 0 deletions base/pop/getpoploglib/auto/assert.p
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uses define_unittest;
Loading