Home Help

Supported Script Grammar

<program>:[( <globaldecl>)][( {<subroutine>|<function>})] <main>

<main>:[( <statement>[ :])]

<subroutine>:sub <label> <inputargs>{ <forward>|( <statement>[ :]) end sub}

<function>:function <label> <inputargs>{ <forward>|( <statement>[ :]) end function}

<inputargs>:["(" {<byref>|<byval>}[( , {<byref>|<byval>})] ")"]

<forward>:forward

<byref>:byref <id>

<byval>:[byval] <id>

<vardecl>:dim <id>[( , <id>)]

<globaldecl>:{public|private|dim} <id>[( , <id>)]

<statement>:{<vardecl>|<globaldecl>|<if>|<for>|<do_loop>|<whileend>|<assign>|<try>|<call>|<case>|<exit>|<with>}

<call>:<id><arg_list><indexing><call_code>[.<call>]

<call_code>:

<data_val>:<id><arg_list><indexing><data_val_code>[.<data_val>]

<data_val_code>:

<data_ref>:<id><arg_list><indexing><data_ref_code>[.<data_ref>]

<data_ref_code>:

<arg_list>:[ "(" [<expression> [(, <expression> )]]")"]

<indexing>:[( "[" <expression> [(, <expression> )]"]")]

<assign>R:["set "] <data_ref> = <expression>

<push_output>:

<for>:<for_control>[ step <step>][( <statement>[ :])] next

<for_control>:for <id> = <expression> to <expression>

<step>:[{-|+}](#)[.(#)][e[{-|+}](#)]

<do_loop>:do {<test_loop>|<loop_test>}

<test_loop>:<test_loop_expr>[( <statement>[ :])] loop

<test_loop_expr>:{<while>|<until>} <expression>

<loop_test>:[( <statement>[ :])] loop <loop_test_expr>

<loop_test_expr>:{<while>|<until>} <expression>

<while>:while

<until>:until

<whileend>:while <whileend_expr>[( <statement>[ :])] end while

<whileend_expr>:<expression>

<if>:if <expression> <then> [<else>] end if

<then>:then( <statement>[ :])

<else>:else( <statement>[ :])

<expression>:{[<unary>]{<data_val>|"(" <expression> ")"}|<hex>|<real>|<string>|<vector>}[( <operator> {[<Unary>]{<data_val>|"(" <expression> ")"}|<hex>|<real>|<string>|<vector>})]

<operator>:{^|*|/|and~|+|-|or~|"<>"|">="|"<="|"="|">"|"<"|"&"|div~|mod~|xor~|shl~|shr~|is~}

<unary>:{not~ |-|+}

<label>:<id>

<id>:{@|_}[({@|#|_})]

<real>:[{-|+}](#)[<frac>][<exp>]

<hex>:"0x"({#|a|b|c|d|e|f})

<frac>:.(#)

<exp>:e[{-|+}](#)

<string>:$

<vector>:"[" [<expression> [(, <expression> )]]"]"

<try>:try <try_statements> {<finally>|<except>} <try_upshot> end[ :]

<finally>:finally

<except>:except

<try_statements>:[( <statement>[ :])]

<try_upshot>:[( <statement>[ :])]

<case>:select case <case_expr> <case_branch> end select

<case_expr>:<expression>

<case_branch>:[{case else( <statement>[ :])|case <case_test>[( , <case_test>)] <case_match>[ <case_branch>]}]

<case_test>:<expression>

<case_match>:[( <statement>[ :])]

<exit>:exit {<exit_sub>|<exit_function>|<exit_do>|<exit_for>}

<exit_sub>:sub

<exit_function>:function

<exit_do>:do

<exit_for>:for

<with>:with <with_obj>[( <statement>[ :])] end with

<with_obj>:<data_val>