org.capml.quasi
Class XMLQuasiParser

java.lang.Object
  |
  +--org.capml.quasi.XMLQuasiParser

Deprecated. Use Term trees instead.

public final class XMLQuasiParser
extends Object

Safe: A StaticMaker on this class is bound to "xml__quasiParser" in the universal namespace, enabling sml`...` expressions in E containing quasi-literal Minimal-XML (which used to be known as SML).

Each parse is actually performed by an instance of this class.

Author:
Mark S. Miller

Field Summary
private  int myPos
          Deprecated. The position of the *next* character
private  char[] mySource
          Deprecated. The entire source as a single char array for speed.
private static IdentityCacheTable OurCache
          Deprecated. Caches previous simple parses (as is used for quasi-parsing)
static StaticMaker XMLQuasiParserMaker
          Deprecated. Enabled:
 
Constructor Summary
private XMLQuasiParser(char[] source)
          Deprecated. Should eventually provide source filename and pos mappings for debugging info.
 
Method Summary
private  void endTag(Object startTag)
          Deprecated.  
private  void expect(char c)
          Deprecated. Either c is the next char and we eat it, or we die.
private static QuasiContent gatherContent(FlexList qcList, StringBuffer textBuf)
          Deprecated.  
private static void gatherText(FlexList qcList, StringBuffer textBuf)
          Deprecated. If there's any text in textBuf, make a QuasiText out of it, push it on qcList, and reset textBuf.
static QuasiContent matchMaker(Twine pattern)
          Deprecated. Enabled: Given a string representing a pattern, written in post-extraction quasi-literal XML syntax, return a MatchMaker which will matchBind against concrete XML trees that match that pattern.
private  String name()
          Deprecated.  
private  int number(char terminator)
          Deprecated. Eat digits followed by terminator.
private  QuasiContent parse()
          Deprecated.  
private  QuasiContent quasiContent()
          Deprecated. Top of recursive descent parser.
private  QuasiElement quasiElement()
          Deprecated.  
private  void skipWS()
          Deprecated.  
private  Object startTag()
          Deprecated.  
private  void syntaxError(String err)
          Deprecated.  
static QuasiContent valueMaker(Twine template)
          Deprecated. Enabled: Given a string representing a template, written in post-extraction quasi-literal XML syntax, return a ValueMaker which will substitute arguments into the template in order to construct a concrete XML content (list of Nodes), based on that template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XMLQuasiParserMaker

public static final StaticMaker XMLQuasiParserMaker
Deprecated. 
Enabled:


OurCache

private static final IdentityCacheTable OurCache
Deprecated. 
Caches previous simple parses (as is used for quasi-parsing)


mySource

private final char[] mySource
Deprecated. 
The entire source as a single char array for speed.


myPos

private int myPos
Deprecated. 
The position of the *next* character

Constructor Detail

XMLQuasiParser

private XMLQuasiParser(char[] source)
Deprecated. 
Should eventually provide source filename and pos mappings for debugging info.

Method Detail

valueMaker

public static QuasiContent valueMaker(Twine template)
Deprecated. 
Enabled: Given a string representing a template, written in post-extraction quasi-literal XML syntax, return a ValueMaker which will substitute arguments into the template in order to construct a concrete XML content (list of Nodes), based on that template.


matchMaker

public static QuasiContent matchMaker(Twine pattern)
Deprecated. 
Enabled: Given a string representing a pattern, written in post-extraction quasi-literal XML syntax, return a MatchMaker which will matchBind against concrete XML trees that match that pattern.


parse

private QuasiContent parse()
Deprecated. 

syntaxError

private void syntaxError(String err)
Deprecated. 

gatherText

private static void gatherText(FlexList qcList,
                               StringBuffer textBuf)
Deprecated. 
If there's any text in textBuf, make a QuasiText out of it, push it on qcList, and reset textBuf.


gatherContent

private static QuasiContent gatherContent(FlexList qcList,
                                          StringBuffer textBuf)
Deprecated. 

quasiContent

private QuasiContent quasiContent()
Deprecated. 
Top of recursive descent parser. Gets a list of content until it runs into an unmatched outer endTag or the end of the source.


number

private int number(char terminator)
Deprecated. 
Eat digits followed by terminator. Return the resulting int.


expect

private void expect(char c)
Deprecated. 
Either c is the next char and we eat it, or we die.


quasiElement

private QuasiElement quasiElement()
Deprecated. 

skipWS

private void skipWS()
Deprecated. 

startTag

private Object startTag()
Deprecated. 

name

private String name()
Deprecated. 

endTag

private void endTag(Object startTag)
Deprecated. 


comments?