public void ParseMemoryAddress(string value, bool expected) { var grammer = new AsmBaseGrammar(); var p = new ParserState(value); Assert.That(grammer.memoryAddress.Match(p), Is.EqualTo(expected)); ParseNode node = p.GetRoot(); Console.WriteLine(node.Value); }
public void ParseOpCode(string value, bool expected) { var grammer = new AsmBaseGrammar(); var printer = new CppStructuralOutputAsXml(); var p = new ParserState(value); Assert.That(grammer.opcode.Match(p), Is.EqualTo(expected)); ParseNode node = p.GetRoot(); Console.WriteLine(node.Value); }
public void ParseComment(string value, bool expected) { var grammer = new AsmBaseGrammar(); var p = new ParserState(value); Assert.That(grammer.comment.Match(p), Is.EqualTo(expected)); var printer = new CppStructuralOutputAsXml(); printer.Print(p.GetRoot()); Console.WriteLine(printer.AsXml()); }