Created
April 18, 2014 21:02
-
-
Save MrSmith33/11064293 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dasm < stmt* eoi | |
lines <- (stmt )* | |
stmt <- basicOpcode / specOpcode / preStmt | |
preStmt <- | |
basicOpcode <- opcode expr, expr | |
specOpcode <- opcode expr | |
expr <- Arithmetic / Id | |
Id <- | |
.include "file" | |
.include <file> | |
.incbin "file" | |
.incbin <file> | |
.def name [expr] | |
.define name [expr] | |
.equ name expr | |
.undef name | |
.dw expr [,expr...] | |
.dp expr [,expr...] | |
.fill count[,expr] | |
.ascii [flags kszxap][<expr>]"string" | |
.macro name([param [,param...]]) | |
code | |
.end | |
name([param [,param...]]) | |
.rep times | |
code | |
.end | |
.if expr | |
codeTrue | |
.elif expr | |
codeElseTrue | |
.elseif expr | |
codeElseTrue | |
.else | |
codeElse | |
.end | |
.ifdef definition | |
.ifndef definition | |
isdef(definition) | |
.align boundary | |
.org address | |
.echo message | |
.error message | |
:label1 [A-Za-z](([A-Za-z0-9._])*[A-Za-z0-9_])? | |
_locallabel1: _(([A-Za-z0-9._])*[A-Za-z0-9_])?;colon at the end is preffered | |
operators | |
+ - * / % ! () | |
& ^ | ~ << >> | |
== != <> < . <= >= & ^ | && || ^^ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment