void SetDecl() { CharSet s; Notify(5); // Coco-Plugin: notify parsercustomization Expect(1); string name = t.val; CharClass c = tab.FindCharClass(name); if (c != null) { SemErr("name declared twice"); } Expect(17); Set(out s); if (s.Elements() == 0) { SemErr("character set must not be empty"); } tab.NewCharClass(name, s); Expect(18); Notify(9); // Coco-Plugin: notify parsercustomization }
void SetDecl() { CharSet s; Expect(1); string name = t.val; CharClass c = tab.FindCharClass(name); if (c != null) { SemErr("name declared twice"); } Expect(17); Set(out s); if (s.Elements() == 0) { SemErr("character set must not be empty"); } tab.NewCharClass(name, s); Expect(18); }
public void ShiftWith(CharSet s, Tab tab) { if (s.Elements() == 1) { typ = Node.chr; sym = s.First(); } else { CharClass c = tab.FindCharClass(s); if (c == null) { c = tab.NewCharClass("#", s); // class with dummy name } typ = Node.clas; sym = c.n; } }
public void ShiftWith(CharSet s, Tab tab) { if (s.Elements() == 1) { typ = Node.chr; sym = s.First(); } else { CharClass c = tab.FindCharClass(s); if (c == null) c = tab.NewCharClass("#", s); // class with dummy name typ = Node.clas; sym = c.n; } }