C# Class Ypsilon.Assembler.Parser

Exibir arquivo Open project: ZaneDubya/YCPU Class Usage Examples

Public Methods

Method Description
CanDecodeLiteral ( string param ) : bool
Parse ( string code, string workingDirectory ) : List
ParseParam ( string originalParam ) : Param
Parser ( ) : System

Private Methods

Method Description
AddMessageLine ( string input ) : void
AssembleADC ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleADD ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleADI ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleALU ( ushort opcode, string param1, string param2, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleAND ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleASL ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleASR ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleBAW ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleBCC ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleBCS ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleBEQ ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleBMI ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleBNE ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleBPL ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleBRA ( ushort opcode, string param1, ParserState state ) : List
AssembleBSG ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleBTC ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleBTI ( ushort opcode, string param1, string param2 ) : List
AssembleBTS ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleBTT ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleBTX ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleBUG ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleBVC ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleBVS ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleCLF ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleCMP ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleDEC ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleDIV ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleDVI ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleEOR ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleFLG ( ushort opcode, List param ) : List
AssembleHWI ( ushort opcode, string param1 ) : List
AssembleHWQ ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleIMM ( ushort opcode, string param1, string param2 ) : List
AssembleINC ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleJMI ( ushort opcode, string param1, string param2, ParserState state ) : List
AssembleJMP ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleJSR ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleLOD ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleLSG ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleLSL ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleLSR ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleLine ( int lineIndex, string line, ParserState state ) : void
AssembleMDI ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleMLI ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleMMU ( ushort opcode, string param1, ParserState state ) : List
AssembleMOD ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleMUL ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleNEG ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleNOP ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleNOT ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleORR ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssemblePOP ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssemblePSH ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleRNL ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleRNR ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleROL ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleROR ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleRTI ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleRTS ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleSBC ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleSBI ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleSEF ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleSEI ( ushort opcode, string param1, string param2 ) : List
AssembleSET ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleSFL ( ushort opcode, string param1 ) : List
AssembleSHF ( ushort opcode, string param1, string param2 ) : List
AssembleSLP ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleSSG ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleSTK ( ushort opcode, List param, bool general_first ) : List
AssembleSTO ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleSTX ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleSUB ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleSWI ( List param, OpcodeFlag opcodeFlag, ParserState state ) : List
AssembleSWO ( ushort opcode, string param1, string param2, string param3 ) : List
GenerateMachineCodeForDataFields ( IList dataFields, DataFieldTypes dataType, ParserState state ) : void
GetBytesFromFile ( string path ) : byte[]
IncludeAsm ( List tokens, ParserState state ) : bool
IncludeBinary ( List tokens, ParserState state ) : bool
InitOpcodeDictionary ( ) : void
InitRegisterDictionary ( ) : void
Initialize ( ) : void
IsAcceptableSETValue ( Param input ) : bool
IsHex ( char c ) : bool
ParseData16 ( string line, ParserState state ) : void
ParseData8 ( string line, ParserState state ) : void
ParseLabel ( string line, ParserState state ) : int
ParseOpcodeFlag ( string value, OpcodeFlag &opcodeFlag ) : bool
ParsePragma ( int lineIndex, string line, string opcode, List tokens, ParserState state ) : bool
StripComments ( string line ) : string

Strip comments from line. If line is empty, returns empty string.

Tokenize ( string data ) : List
TryGetSETValue ( Param input, ushort &value, ushort &alternateValueBit ) : bool
TryParseLiteralParameter ( Param parsedOpcode, string originalParam ) : bool
getFileContents ( string in_path ) : string
isParamBracketed ( string param ) : bool
removeBrackets ( string param ) : string

Method Details

CanDecodeLiteral() public method

public CanDecodeLiteral ( string param ) : bool
param string
return bool

Parse() public method

public Parse ( string code, string workingDirectory ) : List
code string
workingDirectory string
return List

ParseParam() public method

public ParseParam ( string originalParam ) : Param
originalParam string
return Param

Parser() public method

public Parser ( ) : System
return System