"Name" = 'Enter the name of the grammar' "Author" = 'Enter your name' "Version" = 'The version of the grammar and/or language' "About" = 'A short description of the grammar' "Start Symbol" = ! ------------------------------------------------- ! Character Sets ! ------------------------------------------------- {WS} = {Whitespace} - {CR} - {LF} ! =================================================================== ! Comments ! =================================================================== Comment Start = '/*' Comment End = '*/' Comment Line = ';' ! ------------------------------------------------- ! Terminals ! ------------------------------------------------- ! The following defines the Whitespace terminal using the {WS} ! set - which excludes the carriage return and line feed ! characters Whitespace = {WS}+ NewLine = {CR}{LF}|{CR} Opcode = nop OpcodeCBA = moveh|add|sub|and|or|xor|bic|asr|lsr|lsl|fadd_fead|fsub_fead|fmul_fead|fdiv_fead|mul_fead OpcodeBA = cmplo|cmplos|cmple|cmples|rqld|rqldw|jmp|cmpeq|fcmpeq|fcmpne|fcmpgt|fcmpgte|fcmplt|fcmplte|fead OpcodeBAS = st|stw OpcodeCA = move|gpc OpcodeCB = fsqrt_fead|fitof_fead|fftoi_fead|fabs_fead OpcodeA = br OpcodeC = ld|ldw|ldws|mul|fadd|fsub|fmul|fdiv|fsqrt|fitof|fftoi|fabs Cc = ev|ts|tc|ne Command = word|org Comma = [,] Register = ([r]|[R])[012345678]+ Identifier = {Letter}{Letter}{AlphaNumeric}* Integer = [0123456789]+ HexInteger = [$][0123456789ABDEFabcdef]+ BinInteger = [%][01]+ ! ------------------------------------------------- ! Rules ! ------------------------------------------------- ::= ::=