@@ -0,0 +1,1410 @@
+package org.peg4d;%0A%0Aimport java.io.UnsupportedEncodingException;%0A%0Aimport org.peg4d.model.ParsingModel;%0Aimport org.peg4d.vm.Opcode;%0A%0Apublic class SimpleVmParsingContext extends ParsingContext %7B%0A%09%0A%09public SimpleVmParsingContext(ParsingObject left, ParsingSource s, long pos) %7B%0A%09%09super(left, s, pos);%0A%09%7D%0A%09%0A%09public void opMatchCharset(byte%5B%5D bdata) %7B%0A%09%09try %7B%0A%09%09%09String text = new String(bdata, %22UTF-8%22);%0A%09%09%09ParsingCharset u = ParsingCharset.newParsingCharset(text);%0A%09%09%09this.opMatchCharset(u);%0A%09%09%7D catch (UnsupportedEncodingException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%7D%0A%09%0A%09public void opConnectObject(int index) %7B%0A%09%09ParsingObject parent = this.opop();%0A%09%09parent.setLength(parent.getLength() + this.left.getLength());%0A%09%09parent.set(parent.size(), this.left);%0A%09%09this.left = parent;%0A%09%7D%0A%09%0A%09public void opNewObject() %7B%0A%09%09if(this.canTransCapture()) %7B%0A%09%09%09ParsingModel model = new ParsingModel();%0A%09%09%09this.left = new ParsingObject(model.get(%22#empty%22), this.source, this.pos);%0A%09%09%7D%0A%09%7D%0A%09%0A%09public void opTagging(Opcode op) %7B%0A%09%09if(this.canTransCapture()) %7B%0A%09%09%09String tagName;%0A%09%09%09try %7B%0A%09%09%09%09tagName = new String(op.bdata, %22UTF-8%22);%0A%09%09%09%09ParsingTag tag = new ParsingTag(tagName);%0A%09%09%09%09this.left.setTag(tag.tagging());%0A%09%09%09%09this.left.setSourcePosition(lstack%5Blstacktop - 1%5D);%0A%09%09%09%09this.left.setLength((int) (this.pos - this.lstack%5Bthis.lstacktop - 1%5D));%0A%09%09%09%7D catch (UnsupportedEncodingException e) %7B%0A%09%09%09%09e.printStackTrace();%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%7D%0A

add SimpleVmParsingContext