Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

List of all rebol words

 [1/7] from: gchillemi::aliceposta::it at: 8-Dec-2007 2:08


Hello, I whish to recreate the Rebol Word Files for UltraEdit as the one available is uptaded only to to 2001. Is there a way to have from Rebol/View a list of all the words ? Thank you in advance Giuseppe Chillemi

 [2/7] from: Izkata:Comcast at: 7-Dec-2007 21:04


I think this works:
>> first system/words
== [end! unset! error! datatype! context! native! action! routine! op! function! object! struct! library! port! any-type! any-word!...
>> length? first system/words
== 2488 On Sat, 2007-12-08 at 02:08 +0100, Giuseppe Chillemi wrote:

 [3/7] from: Tom::Conlin::gmail::com at: 7-Dec-2007 19:52


Giuseppe Chillemi wrote:
> Hello, > I whish to recreate the Rebol Word Files for UltraEdit as the one > available is uptaded only to to 2001. Is there a way to have from Rebol/View > a list of all the words ? > Thank you in advance > > Giuseppe Chillemi
I used this to generate syntax files for emedit I like to color code by native/action, function, datatype ... haven't run it recently but I imagine it is still rebol[ File: %gen-syntx.r Author: "Tom Conlin" Date: 10-Apr-2003 Title: "generate syntx" Library: [ level: 'intermediate platform: 'all type: [function reference tool] domain: [text ] tested-under: none support: none license: none see-also: none ] Purpose: { generate the list of defined 'words separated by their 'type I used the list as a basis for syntax coloring in an editor works with versions before core 2.5.5 but does not return natives in core 2.5.5 } to-use: {run the script then use the contents the file 'xyz-f'} ] echo %xyz-f help datatype! echo none xyz-a: read/lines %xyz-f remove xyz-a xyz-c: rejoin [";;;" tab system/product tab system/version tab now/date newline] foreach xyz-d xyz-a [ xyz-d: pick parse xyz-d none 1 echo %xyz-f do rejoin ["help " xyz-d] echo none xyz-b: read/lines %xyz-f ;print [xyz-d xyz-b/1] if equal? "Found these words:" trim xyz-b/1 [ remove xyz-b insert tail xyz-c rejoin [";;;;;;;;;;;;;;;;;; " uppercase copy xyz-d newline] xyz-e: rejoin ["(" head remove back tail copy xyz-d ")"];;; pre /core-2.5.5 foreach xyz-g xyz-b [ xyz-g: parse xyz-g none print [xyz-g/1 xyz-g/2] if all[ (string? xyz-g/1) (not equal? xyz-g/1 "") (not equal? "xyz-" copy/part xyz-g/1 4) any [xyz-g/2 = xyz-e xyz-g/2 = xyz-d]] [ if equal? xyz-e "(op)" [insert xyz-g/1 " " insert tail xyz-g/1 " "] insert tail xyz-c join xyz-g/1 [newline] ] ] ] ] write %xyz-f xyz-c

 [4/7] from: gchillemi:aliceposta:it at: 8-Dec-2007 9:53


> I think this works: > > >> first system/words > == [end! unset! error! datatype! context! native! action! routine! op! > function! object! struct! library! port! any-type! any-word!... > >> length? first system/words > == 2488
We have no description, no category, nothing... I need something more. Giuseppe Chillemi

 [5/7] from: luca::truffarelli::it at: 8-Dec-2007 10:06


-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Take a look at anamonitor.r. Giuseppe Chillemi wrote:
>> I think this works: >>
<<quoted lines omitted: 5>>
> We have no description, no category, nothing... I need something more. > Giuseppe Chillemi
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHWl58U4grFviuxVQRAh5ZAJ9A8/tDCot0kWvQ2h79QXyo3TyG1wCfQ4Ss sf6dVrRm7X6Ueyc6CiYkLhU=DFiV -----END PGP SIGNATURE-----

 [6/7] from: gchillemi::aliceposta::it at: 8-Dec-2007 16:00


> I used this to generate syntax files for emedit I like to > color code by native/action, function, datatype ... > haven't run it recently but I imagine it is still
It works in rebol 2.7.5, thanks. I will use it as the basis for the creation of the new dictionary. Giuseppe Chillemi

 [7/7] from: tim-johnsons::web::com at: 8-Dec-2007 8:32


On Friday 07 December 2007, Giuseppe Chillemi wrote:
> > I think this works: > > >> first system/words
<<quoted lines omitted: 6>>
> > == 2488 > We have no description, no category, nothing... I need something more.
Hi Giuseppe: FYI: I transitioned from coding rebol in windows with Boxer, to coding in linux with vim and then a few years ago, I started using emacs and wrote a major emacs editing mode for rebol. I'm speaking for emacs here not to encourage any debate about the best editor but to qualify the approach that I used. Since rebol doesn't distinguish between code and data and control structures are functions with return values one might tailor the approach to their own special needs. In emacs, syntax highlighting groups are data structures which can be exploited for things like cursor movement and selection routines. I iterated thru first system words somewhat like this: foreach word first system/words[ ,,,,,,, ] I started by programmatically capturing all of the type- words, which are identified by #"!" = last to-string word ;; UC = untested code and built a temporary data structure of coerced strings as in integer! => "integer" and so forth. So now I had a collection of type words and a collection of comparison strings. Then I iterated again and pulled out the type predicate words with something like this: ws: to-string word ;; UC all[ #"?" = last ws (find ws coerced-string) = ws] ;; UC comparing "integer" and integer? So now I had a list of types and type predicates Then one can use either function? or any-function? to gather the functions, =46rom that one can gather constants like newline, true, off etc. A certain amount of hand editing was used, because control words, loop words etc can evaluate to functions right? I hope I've given you some ideas. I'm sure you want to tailor your edit to both your needs and the editor's functionality. HTH

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted