
| keyword | type | mini example | Text= must always be the first keyword of an EDIT call: |
| Text | txt | tx=sample | The string to be worked on by all following options |
| keyword | type | mini example | Keywords to change or remember the actual location Loc: |
| Right | txt | r=$CR | move Loc right to next $CR
|
| [1] | r=72 | move Loc right 72 bytes | |
| Left | txt | l=$TAB | move Loc left to next $TAB |
| [1] | l | move Loc left 1 character | |
| Begin | --- | b | set Loc to 1st nonblank in string |
| End | --- | e | set Loc to byte after last nonblank in string
|
| Mark1 | --- | M1 | remember start position for parse / delete / replace / copy / lowercase / uppercase string
|
| Mark2 | --- | M2 | remember end position M2 for string operations |
| Word | num | word=n | set Loc to 1st byte of n-th word right (n>0) or left (n<0) of current word. For n=0 Loc is set to the 1st byte of current word. Word boundaries can be adjusted by SePaRators |
| WordEnd | txt | we | implicitely set Mark1 and Mark2 to 1st and last byte of current word. If txt is set it will be a separator for the APpendTo command. |
| GetPosition | NUM | gp=j |
|
| vec | gp=pVec | pVec(DOindex) is set to byte location | |
| SetPosition | num | sp=j | set byte location to Loc>0 and Loc<=LEN(string)
|
| vec | sp=pVec | move Loc to pVec(DOindex) | |
| ScanFor | txt | sf=".:!" | scan right for next "." or ":" or "!"
|
| ScaNnot | txt | sn='123' | scan for next byte that is nor 1 or 2 or 3 |
| ScanForLeft | txt | sfl='xy' | scan backward for next x or y |
| ScaNnotLeft | txt | snl=' ' | scan backward for next non-blank |
| ITeM | num | itm=5 | set Loc to item start (count SePaRators hits)
|
| RaNge | txt | RN=$CRLF | repeat all in ranges 1...$CRLF...$CRLF.., each new range also restarts DO
|
| num | RN=4 | character ranges 1..4 5..8 9..12 ..
| |
| RangeBegin | --- | rb | set Loc to begin of range |
| txt | rb='SUBR' | MOVE SCRIPT to next 'SUBR', Count=lineNR and/or Option=... may follow) | |
| RangEend | --- | re | Loc to end range (string end if no range) |
Keywords to change the original string: | |||
| Delete | --- | d | delete_substring (m1:m2) if m1,m2 are set
|
| txt | d=' ' | move Loc to next ' ' and delete this blank | |
| num | d=3 | delete 3 characters starting at current location Loc | |
| Insert | txt | i=$CRLF | insert_string $CRLF at Loc. Note: Characters exceeding the length of string are dropped |
| RePLaceby | txt | rpl='x' | replace string : after either of Right, Left, ScanFor, ScanForLeft, ScanNot, ScanNotLeft, or M1 and M2
|
| UpperCase | --- | UC | uppercase_string : capitalize characters in the range M1 and M2:
|
| [1] | uc=3 | capitalize 3 characters
| |
| LowerCase | lowercase_string corresponding to uppercase string | ||
| TabiFyfont | txt | TF=3 | tabify string :
|
Keywords to extract information: | |||
| Parse | txt | p=subtxt | parse_string to individual substrings: M1>0: subtxt + string(m1:Loc) share memory
|
| CoPyTo | TXT | cpt=word | copy_string set word to string(m1:m2) if m1 and m2 are set |
| APpendTo | TXT | apt=str | append separator and string to the variable str. Default separator is a blank, it can be changed with WordEnd=new_separator |
| Count | --- | c | count_occurences : If the word-option is set (Option=2) the total number of words in string is returned:
|
| num | c=byte1 | set count start position to byte1 | |
| txt | c=txt | n=txt's in string(start:Loc), NOTE: set Loc to the end position, e.g. End!
| |
Keywords to control command execution | |||
| Option | num | o=1 | search options : case=1, word=2, scan=8, trailing blanks=16, best match=32, verify=64, RegEx=128, Count=256, Alphabetical order=512. For examples click here. |
| SePaRators | txt | spr='.!' | default is ' .,(+-*/^;="\<>!:)', bar, $CR, $LF, RangeBegin, RangeEnd |
| num | spr=d | separate string in d bytes for sorting etc | |
| DO | num | do [=n] |
|
| IF | --- | IF, R=8 | next commands up to ELSE or ENDIF only if R=8 OK
|
| txt | IF='@' | continue (max to ELSE ) only if string(loc) == @ | |
| ELSE | [T] | ELSE | next commands only if error after IF |
| ContInueiF | txt | cif='az' | next keyword only IF a <= string(loc) <= z |
| ENDIF | --- | endif | closes IF..ELSE... clause if needed |
| EXit | [T] | ex | exit range scan |
| ERror | LBL | er=99 | (on error jump to label 99) |
| lexical commands : see LeXicon | |||
| inverted index commands : see Inverted_Index | |||
| IDentification | txt | ID=name | include a name (e.g. file name) in InvIdx (default is "noID") |
| ID1 | --- | id1 | marks start position of an ID-string in the "ORIGINAL" |
| ID2 | --- | id2 | marks its end position |
| OFfSet | num | ofs=p1 | added to InvIdx positions. Useful if ORIGINAL is just a separate clipping of the complete document generated by another statement. |
| SorTSequence | num | sts=32 | sorted query result (32 means: first column3, then column2) |
| InvertedIndex | txt | ii=invidx | receives the inverted index. If the name ID is already indexed, inv_idx updates the existing index. |
| sort string commands | |||
| SorTtoIndex | num | sti=vec | indices of sorted words goes to vec
|
| SorTedtext | txt | st=lex |
|
| SortDelDbls | txt | sdd=lex | lex is sorted, remove double entries
|
| SortFromIndex | num | sfi=vec | sort words in string along vec (no lower case conversion)
|
| SorTColumn1 | num | stc1=2 | sort starts in word positions 2 (disregard 1st character)
|