cell!, red-value!, red-block! red-string! etc. On the one side I would like a paper version, so an index and all. On the other side a little referential program to help you look up items fast and not searching through the sources yourself, but maybe it should use the sources.
Gregg
Ah, Red/System datatypes, got it. Using the source is often a lot of work. All clues help people contribute.
Endo
That would be helpful Arnold.
Arnold
Looking for the right datastructure to get the information in, get it presented and perhaps also have it autofilled from the sources?
; Now can select the definition of a type declaration parse _allocator [to "int-array!" copy desc thru [end-alias | empty-line] to end]
; And keep some string for all aliases in the source type-list: parse _allocator [collect any [to "alias" keep to "^/"]]
; But I want type-list: parse _allocator [collect any [to "alias" keep backto "^/"]] As with a list if the strings before the alias I can do something more useful than the end of the strings after 'alias'.
Gregg
You'll have to collect the comments first. You could set markers, but collecting them first is probably eaiser. e.g.:
The "=" prefix/suffix convention is one I use to mark parse rules and vars.
Arnold
I was creating the pieces of the puzzle that seemed easiest first. list: parse _allocator [collect any [[ahead [not [any newline] to "alias" ] keep to "alias" | newline]]] BuUt this only gets me [] So i'll try your construction now.
Very nice Gregg!
Arnold
Though I think it is much simpler just to use read/lines and work from there: _allocator: read/lines %../red-master/runtime/allocator.reds __allocator: make block! 200 foreach line _allocator [if find line "alias" [append __allocator line]]
Arnold
And the file in runtime/datatypes/structures.reds that collects the definitions will also be helpful.
Arnold
word-first-char=: complement charset {/\^^,{}"#%$@:;} ; " is incomplete? because it does not exclude digits? red>> parse "0" [word-first-char=] == true
Gregg
Good catch Arnold. I was pulling things together quickly.