home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 788 of 2,753   
   zebedee to John Millaway   
   Re: How to determine if a given line is    
   12 Sep 06 20:02:19   
   
   From: zebedee@zebedee.net   
      
   John Millaway wrote:   
   > We added a few common regexps to an appendix in the latest flex   
   > manual, including C99 strings and comments, only because we saw so   
   > many scanners doing it wrong.   
      
   [...]   
      
   > C99 String Literal   
   >   
   > `L?\"([^\"\\\n]|(\\['\"?\\abfnrtv])|(\\([0123456]{1,3}))|(\\x[   
   :xdigit:]]+)|(\\u([[:xdigit:]]{4}))|(\\U([[:xdigit:]]{8})))*\"'   
   >   
   > C99 Comment   
   >      `("/*"([^*]|"*"[^/])*"*/")|("/"(\\\n)*"/"[^\n]*)'   
   >   
   >      Note that in C99, a `//'-style comment may be split across lines,   
   >      and, contrary to popular belief, does not include the trailing   
   >      `\n' character.   
   >   
      
   These are only correct if you ignore trigraphs and escaped newlines.  C   
   and C++ were not designed for quick and easy analysis.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca