; Standard Basic V2
;
; structure of each line:
;    tokenname, token [, syntax="..." [, indent=# [, linetype=# [, additional=#]]]]
; where
;    tokenname = PETSCII-sequence of token
;    token = byte or word
;    indent = # of TABs to indent after token (if positive) - uses TABWIDTH in BasEdit.Ini
;    indent = # of TABs to de-indent before token (if negative) - uses TABWIDTH in BasEdit.Ini
;    linetype = # type of line# following the token
;               0 = no line#
;               1 = single line#, like in GOTO 100 
;               2 = list of line# like in ON a GOSUB 100,200,300
;    additional = # of extra bytes to read and write during de-/tokenizing
;    syntax = "..." description for syntax-check
;                   t$xx      = token with value $xx
;                   c         = command
;                   f         = function - numeric 
;                   f$        = function - string
;                   <var_any> = any numeric or string variable incl. arrays
;                   <var_num> = any numeric variable (int/float) incl. arrays
;                   <var_str> = any string variable incl. arrays
;                   <var>     = any real variable incl. arrays
;                   <var_any_simple> = any numeric or string variable NO arrays
;                   <var_simple> = any float variable NO arrays
;                   <num>     = any numeric expression (examples: 1, 2+3, 1+b+c(5), LEN(a$))
;                   <num_lit> = numeric literal / constant value (examples: 1, 10) 
;                   <str>     = any string expression (examples "A", LEFT$(A$,1), MID$(A$,LEN(B$)))
;                   <str_lit> = string literal / constant (example: "HELLO")
;                   <log>     = logical expression (examples: I=10, X$<>"")
;                   <skip>    = anything until : or line end
;                   <cmd>     = any command (examples: END, A=5)
;                   <print>   = commandlist for print

; missing syntax parts
; tab(   : missing check for usage only with print!
; spc(   : missing check for usage only with print!
;
; special:
; sys    : ignore everything until next : or end of line

description=Basic V2

end,      $80, syntax="c"                                                       
for,      $81, syntax="c<var_simple>t$B2<num>t$A4<num>[t$A9<num>]", indent=1    
next,     $82, syntax="c[<var_simple>[,<var_simple>...]]", indent=-1                              
data,     $83, syntax="c<skip>"                                                 
input#,   $84, syntax="c<num>,<var_any>[,<var_any>...]"                         
input,    $85, syntax="c[<str_lit>;]<var_any>[,<var_any>...]"                   
dim,      $86, syntax="c<var_any>[,<var_any>...]"             
read,     $87, syntax="c<var_any>[,<var_any>...]"                               
let,      $88, syntax="c<assign>"                                               
goto,     $89, syntax="c<num_lit>[,<num_lit>...]", linetype=2                   
run,      $8A, syntax="c[<num>]", linetype=1                                
if,       $8B, syntax="c<log>{t$A7{<num_lit>|<cmd>}|t$89<num_lit>}"                                         
restore,  $8C, syntax="c", linetype=2                                           
gosub,    $8D, syntax="c<num_lit>[,<num_lit>...]", linetype=2                   
return,   $8E, syntax="c"                                                       
rem,      $8F, syntax="c"                                                       
stop,     $90, syntax="c"                                                       
on,       $91, syntax="c<num>{t$89|t$8D}<num_lit>[,<num_lit>...]"                                         
wait,     $92, syntax="c<num>,<num>[,<num>]" 
load,     $93, syntax="c<str>[,<num>[,<num>]]" 
save,     $94, syntax="c<str>[,<num>[,<num>]]" 
verify,   $95, syntax="c<str>[,<num>[,<num>]]"  
def,      $96, syntax="ct$A5<var_simple>(<var_simple>)t$B2<num>" 
poke,     $97, syntax="c<num>,<num>" 
print#,   $98, syntax="c<num>[,<print>]" 
print,    $99, syntax="c<print>" 
cont,     $9A, syntax="c" 
list,     $9B, syntax="c[<num_lit>][t$AB][<num_lit>]", linetype=2 
clr,      $9C, syntax="c" 
cmd,      $9D, syntax="c<num>[<print>]" 
sys,      $9E, syntax="c<num><skip>" 
open,     $9F, syntax="c<num>,<num>[,<num>[,<str>]]" 
close,    $A0, syntax="c<num>" 
get,      $A1, syntax="c[#<num>,]<var_any>" 
new,      $A2, syntax="c" 
tab(,     $A3, syntax="f$<num>)" 
to,       $A4
fn,       $A5, syntax="f<var_simple>(<num>)" 
spc(,     $A6, syntax="f$<num>)" 
then,     $A7, linetype=1 
not,      $A8
step,     $A9
+,        $AA 
-,        $AB
*,        $AC 
/,        $AD 
^,        $AE 
and,      $AF 
or,       $B0 
>,        $B1 
=,        $B2 
<,        $B3 
sgn,      $B4, syntax="f(<num>)" 
int,      $B5, syntax="f(<num>)" 
abs,      $B6, syntax="f(<num>)"  
usr,      $B7, syntax="f(<num>)"  
fre,      $B8, syntax="f([<num>])"  
pos,      $B9, syntax="f(<num>)"   
sqr,      $BA, syntax="f(<num>)"   
rnd,      $BB, syntax="f([<num>])"   
log,      $BC, syntax="f(<num>)"    
exp,      $BD, syntax="f(<num>)"    
cos,      $BE, syntax="f(<num>)"    
sin,      $BF, syntax="f(<num>)"    
tan,      $C0, syntax="f(<num>)"   
atn,      $C1, syntax="f(<num>)"    
peek,     $C2, syntax="f(<num>)"    
len,      $C3, syntax="f(<str>)"    
str$,     $C4, syntax="f$(<num>)"    
val,      $C5, syntax="f(<str>)"    
asc,      $C6, syntax="f(<str>)"    
chr$,     $C7, syntax="f$(<num>)"    
left$,    $C8, syntax="f$(<str>,<num>)"    
right$,   $C9, syntax="f$(<str>,<num>)"     
mid$,     $CA, syntax="f$(<str>,<num>[,<num>])"     
go,       $CB, syntax="c<num_lit>"     
PI,       $FF
