Changeset 48

Show
Ignore:
Timestamp:
04/20/05 17:34:03 (4 years ago)
Author:
pragma
Message:

- Began new DSP parser design under /dsp. The A2 compiler (under core) will be going away shortly.
- Began DSP conformance suite under /dspconf
- Added sundry fixes to XML parser
- Added DSP rudimentary dsp test /dsptest.d

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/xml/BaseParser.d

    r47 r48  
    8484        lex.tokenize(stream); 
    8585        tokens = lex.getTokens(); 
    86         startParse(); 
     86        try{ 
     87            startParse(); 
     88        } 
     89        catch(XMLParserException e){ 
     90            throw e; 
     91        }        
     92        catch(Exception e){ 
     93            throw new XMLParserException(e,this,peek().pos,"General parser error"); 
     94        } 
     95 
    8796    } 
    8897     
  • trunk/xml/XMLException.d

    r46 r48  
    3636 
    3737class XMLException : Exception{ 
    38     XMLException cause; 
     38    Exception cause; 
    3939     
    4040    public this(char[] reason){ 
     
    4242    } 
    4343     
    44     public this(XMLException cause,char[] reason){ 
     44    public this(Exception cause,char[] reason){ 
    4545        super(reason); 
    4646        this.cause = cause;  
     
    6565    } 
    6666     
    67     public this(XMLException cause,BaseLexer lex,ILexerStream stream,char[] reason){ 
     67    public this(Exception cause,BaseLexer lex,ILexerStream stream,char[] reason){ 
    6868        super(cause,reason); 
    6969        this.lex = lex; 
     
    8989    } 
    9090     
    91     public this(XMLException cause,BaseParser parser,Position pos,char[] reason){ 
     91    public this(Exception cause,BaseParser parser,Position pos,char[] reason){ 
    9292        super(cause,reason); 
    9393        this.parser = parser; 
  • trunk/xml/XMLParser.d

    r46 r48  
    120120                    break; 
    121121                } 
    122                 else return; // something other than a PI, let parent worry about it 
     122                else{ 
     123                    return; // something other than a PI, let parent worry about it 
     124                } 
     125                break; 
    123126                 
    124127            default: 
    125                 throw new XMLParserException(this,peek().pos,"expected processing instruction"); 
     128                return; // let parent worry about it 
    126129            } 
    127130        } 
  • trunk/xml/xmlns/XMLNamespaceParser.d

    r47 r48  
    180180        foreach(char[] name, char[] value; attribs){ 
    181181            // handle default namespace 
    182             if(name == "xmlns"){                
     182            if(name == "xmlns"){ 
    183183                popNamespace(""); 
    184184                consumer.xmlEndNamespace("",value);