Orb/Doxygen/src/doctokenizer.l
changeset 4 468f4c8d3d5b
parent 0 42188c7ea2d9
equal deleted inserted replaced
3:d8fccb2cd802 4:468f4c8d3d5b
     1 /******************************************************************************
     1 /******************************************************************************
     2  *
     2  *
     3  * 
     3  * 
     4  *
     4  *
     5  *
     5  *
     6  * Copyright (C) 1997-2008 by Dimitri van Heesch.
     6  * Copyright (C) 1997-2010 by Dimitri van Heesch.
     7  *
     7  *
     8  * Permission to use, copy, modify, and distribute this software and its
     8  * Permission to use, copy, modify, and distribute this software and its
     9  * documentation under the terms of the GNU General Public License is hereby 
     9  * documentation under the terms of the GNU General Public License is hereby 
    10  * granted. No representations are made about the suitability of this software 
    10  * granted. No representations are made about the suitability of this software 
    11  * for any purpose. It is provided "as is" without express or implied warranty.
    11  * for any purpose. It is provided "as is" without express or implied warranty.
   295 OPTSTARS ("//"{BLANK}*)?"*"*{BLANK}*
   295 OPTSTARS ("//"{BLANK}*)?"*"*{BLANK}*
   296 LISTITEM {BLANK}*{OPTSTARS}"-"("#")?{WS}
   296 LISTITEM {BLANK}*{OPTSTARS}"-"("#")?{WS}
   297 ENDLIST  {BLANK}*{OPTSTARS}"."{BLANK}*\n
   297 ENDLIST  {BLANK}*{OPTSTARS}"."{BLANK}*\n
   298 ATTRIB   {ID}{WS}*("="{WS}*(("\""[^\"]*"\"")|("'"[^\']*"'")|[^ \t\r\n'"><]+))?
   298 ATTRIB   {ID}{WS}*("="{WS}*(("\""[^\"]*"\"")|("'"[^\']*"'")|[^ \t\r\n'"><]+))?
   299 URLCHAR   [a-z_A-Z0-9\!\~\,\:\;\'\$\?\@\&\%\#\.\-\+\/\=]
   299 URLCHAR   [a-z_A-Z0-9\!\~\,\:\;\'\$\?\@\&\%\#\.\-\+\/\=]
   300 URLMASK   (([a-z_A-Z][^\>\"\n]*{URLCHAR})|({URLCHAR}+))([({]{URLCHAR}*[)}])?
   300 URLMASK   ({URLCHAR}+([({]{URLCHAR}*[)}])?)*
   301 FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+]
   301 FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+]
   302 FILEECHAR [a-z_A-Z0-9\-\+]
   302 FILEECHAR [a-z_A-Z0-9\-\+]
   303 HFILEMASK ("."{FILESCHAR}*{FILEECHAR}+)*
   303 HFILEMASK ("."{FILESCHAR}*{FILEECHAR}+)*
   304 FILEMASK  ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|{HFILEMASK}
   304 FILEMASK  ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|{HFILEMASK}
   305 LINKMASK  [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"){BLANK}+)? 
   305 LINKMASK  [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"){BLANK}+)? 
   325 OPCAST    {BLANK}+[^<(\r\n.,][^(\r\n.,]*
   325 OPCAST    {BLANK}+[^<(\r\n.,][^(\r\n.,]*
   326 OPMASK    ({BLANK}*{OPNORM}{FUNCARG})
   326 OPMASK    ({BLANK}*{OPNORM}{FUNCARG})
   327 OPMASKOPT ({BLANK}*{OPNORM}{FUNCARG}?)|({OPCAST}{FUNCARG})
   327 OPMASKOPT ({BLANK}*{OPNORM}{FUNCARG}?)|({OPCAST}{FUNCARG})
   328 LNKWORD1  ("::"|"#")?{SCOPEMASK}
   328 LNKWORD1  ("::"|"#")?{SCOPEMASK}
   329 CVSPEC    {BLANK}*("const"|"volatile")
   329 CVSPEC    {BLANK}*("const"|"volatile")
   330 LNKWORD2  ({SCOPEPRE}*"operator"{OPMASK})|({SCOPEPRE}"operator"{OPMASKOPT})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOPT})
   330 LNKWORD2  (({SCOPEPRE}*"operator"{OPMASK})|({SCOPEPRE}"operator"{OPMASKOPT})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOPT})){CVSPEC}?
   331 LNKWORD3  ([0-9a-z_A-Z\-]+("/"|"\\"))*[0-9a-z_A-Z\-]+("."[0-9a-z_A-Z]+)+
   331 LNKWORD3  ([0-9a-z_A-Z\-]+("/"|"\\"))*[0-9a-z_A-Z\-]+("."[0-9a-z_A-Z]+)+
   332 CHARWORDQ [^ \t\n\r\\@<>()\[\]:;\?{}&%$#,."]
   332 CHARWORDQ [^ \t\n\r\\@<>()\[\]:;\?{}&%$#,."]
   333 WORD1     "%"?{CHARWORDQ}+|"{"|"}"|("\""[^"\n]*\n?[^"\n]*"\"")
   333 WORD1     "%"?{CHARWORDQ}+|"{"|"}"|"'\"'"|("\""[^"\n]*\n?[^"\n]*"\"")
   334 WORD2     "."|","|"("|")"|"["|"]"|":"|";"|"\?"
   334 WORD2     "."|","|"("|")"|"["|"]"|":"|";"|"\?"
   335 WORD1NQ   "%"?{CHARWORDQ}+
   335 WORD1NQ   "%"?{CHARWORDQ}+
   336 WORD2NQ   "."|","|"("|")"|"["|"]"|":"|";"|"\?"
   336 WORD2NQ   "."|","|"("|")"|"["|"]"|":"|";"|"\?"
   337 HTMLTAG   "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">" 
   337 HTMLTAG   "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">" 
   338 HTMLKEYL  "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"
   338 HTMLKEYL  "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"
   470 			 return TK_URL;
   470 			 return TK_URL;
   471                        }
   471                        }
   472 <St_Para>"$"{ID}":"[^\n$]+"$" { /* RCS tag */
   472 <St_Para>"$"{ID}":"[^\n$]+"$" { /* RCS tag */
   473                          QString tagName(yytext+1);
   473                          QString tagName(yytext+1);
   474 			 int index=tagName.find(':');
   474 			 int index=tagName.find(':');
   475   			 g_token->name = tagName.left(index);
   475   			 g_token->name = tagName.left(index+1);
   476 			 g_token->text = tagName.mid(index+1,tagName.length()-index-2);
   476 			 g_token->text = tagName.mid(index+2,tagName.length()-index-3);
   477 			 return TK_RCSTAG;
   477 			 return TK_RCSTAG;
   478   		       }
   478   		       }
   479 <St_Para,St_HtmlOnly>"$("{ID}")"   { /* environment variable */
   479 <St_Para,St_HtmlOnly>"$("{ID}")"   { /* environment variable */
   480                          QCString name = &yytext[2];
   480                          QCString name = &yytext[2];
   481 			 name = name.left(name.length()-1);
   481 			 name = name.left(name.length()-1);