GfmlFrame.java 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. XOWA: the XOWA Offline Wiki Application
  3. Copyright (C) 2012 gnosygnu@gmail.com
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU Affero General Public License as
  6. published by the Free Software Foundation, either version 3 of the
  7. License, or (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Affero General Public License for more details.
  12. You should have received a copy of the GNU Affero General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. package gplx.gfml; import gplx.*;
  16. import gplx.core.lists.*; /*StackAdp*/
  17. public interface GfmlFrame {
  18. GfmlLxr Lxr(); // each frame has only one lxr
  19. int FrameType();
  20. GfmlObjList WaitingTkns();
  21. void Build_end(GfmlBldr bldr, GfmlFrame ownerFrame);
  22. GfmlFrame MakeNew(GfmlLxr newLxr);
  23. }
  24. class GfmlFrameStack {
  25. public int Count() {return stack.Count();}
  26. public void Push(GfmlFrame frame) {stack.Push(frame);}
  27. public GfmlFrame Pop() {return (GfmlFrame)stack.Pop();}
  28. public GfmlFrame Peek() {return (GfmlFrame)stack.Peek();}
  29. public void Clear() {stack.Clear();}
  30. StackAdp stack = StackAdp_.new_();
  31. public static GfmlFrameStack new_() {return new GfmlFrameStack();} GfmlFrameStack() {}
  32. }