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 1,059 of 2,753   
   Joachim Durchholz to jamin.hanson@googlemail.com   
   Re: Precedence Rules for '$' and '^'   
   13 Sep 07 07:52:30   
   
   From: jo@durchholz.org   
      
   jamin.hanson@googlemail.com schrieb:   
   > Hi there,   
   >   
   > I am author of lexertl (http://www.benhanson.net/lexertl.html), a   
   > lexer generator library, and I have recently added support for '^' and   
   > '$'.  As position matching in regex is not described in any books I   
   > have looked at, does anyone know what the precedence rules should be?   
      
   I think Perl regexes are what people expect, so I'd stick with the   
   precedences that PCRE uses.   
      
   > If an earlier rule starts with '$', does that mean that a subsequent   
   > rule starting with '^' has the '^' ignored?   
      
   I didn't understand that. A concrete example might help.   
      
   Regards,   
   Jo   
   [I don't understand it either.  My understanding of typical REs is   
   that they special case ^ at the beginning of a pattern or chunk   
   that could match at the beginning, and $ at the end. -John]   
      
   --- 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