diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-12-10 16:16:43 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-12-10 16:16:43 +0000 |
commit | f2795201de43e1751c6b927b1ab2da0ee88ab840 (patch) | |
tree | 5b3a9b1d8a7432d8034e3e9d36c9c7a8948fc4cb | |
parent | b0711f41c3c7791937570727916e9d0dc5d4c736 (diff) |
INTEGRATION: CWS gh9 (1.5.14); FILE MERGED
2004/12/07 15:24:49 gh 1.5.14.3: compare tags to sourcelanguage only if sourcelanguage is given
2004/11/25 14:42:21 gh 1.5.14.2: generate error in case of single \< without \>
2004/11/23 12:02:28 gh 1.5.14.1: check for pairs of \" tags
ignore \\
check for end of tag (not end of line)
close error and ok files on exit
-rw-r--r-- | transex3/inc/tagtest.hxx | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/transex3/inc/tagtest.hxx b/transex3/inc/tagtest.hxx index b5ed22c8d527..9cbed19a0f51 100644 --- a/transex3/inc/tagtest.hxx +++ b/transex3/inc/tagtest.hxx @@ -2,9 +2,9 @@ * * $RCSfile: tagtest.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: rt $ $Date: 2004-09-20 12:30:33 $ + * last change: $Author: rt $ $Date: 2004-12-10 17:16:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -222,29 +222,6 @@ public: } }; -class SimpleParser -{ -private: - USHORT nPos; - ByteString aSource; - ByteString aLastToken; -// static ByteString aLastUnknownToken; - TokenList aTokenList; - - TokenInfo aNextTag; // to store closetag in case of combined tags like <br/> - - ByteString GetNextTokenString(); - -public: - SimpleParser(); - void Parse( ByteString PaSource ); - TokenInfo GetNextToken(); - ByteString GetTokenText(); - static ByteString GetLexem( TokenInfo const &aToken ); - USHORT GetScanningPosition(){ return nPos; } - TokenList GetTokenList(){ return aTokenList; } -}; - class ParserMessage { USHORT nErrorNr; @@ -268,6 +245,29 @@ public: DECLARE_LIST( ParserMessageList, ParserMessage* ); +class SimpleParser +{ +private: + USHORT nPos; + ByteString aSource; + ByteString aLastToken; +// static ByteString aLastUnknownToken; + TokenList aTokenList; + + TokenInfo aNextTag; // to store closetag in case of combined tags like <br/> + + ByteString GetNextTokenString( ParserMessageList &rErrorList ); + +public: + SimpleParser(); + void Parse( ByteString PaSource ); + TokenInfo GetNextToken( ParserMessageList &rErrorList ); + ByteString GetTokenText(); + static ByteString GetLexem( TokenInfo const &aToken ); + USHORT GetScanningPosition(){ return nPos; } + TokenList GetTokenList(){ return aTokenList; } +}; + class TokenParser { BOOL match( const TokenInfo &aCurrentToken, const TokenId &aExpectedToken ); @@ -299,7 +299,7 @@ public: TokenParser(); void Parse( const ByteString &aCode ); ParserMessageList& GetErrors(){ return aErrorList; } - BOOL HasErrors(){ return ( aErrorList.Count() ); } + BOOL HasErrors(){ return ( aErrorList.Count() > 0 ); } TokenList GetTokenList(){ return aParser.GetTokenList(); } }; @@ -314,7 +314,7 @@ private: BOOL IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens ); public: BOOL ReferenceOK( const ByteString &aReference ); - BOOL TesteeOK( const ByteString &aTestee ); + BOOL TesteeOK( const ByteString &aTestee, BOOL bHasSourceLine ); ParserMessageList& GetReferenceErrors(){ return aReferenceParser.GetErrors(); } BOOL HasReferenceErrors(){ return aReferenceParser.HasErrors(); } @@ -323,6 +323,6 @@ public: BOOL HasTesteeErrors(){ return aTesteeParser.HasErrors(); } ParserMessageList& GetCompareWarnings(){ return aCompareWarningList; } - BOOL HasCompareWarnings(){ return ( aCompareWarningList.Count() ); } + BOOL HasCompareWarnings(){ return ( aCompareWarningList.Count() > 0 ); } }; |