To: djgpp AT sun DOT soe DOT clarkson DOT edu Path: mantis!not-for-mail From: olly AT mantis DOT co DOT uk (Olly Betts) Newsgroups: mail.djgpp Subject: Re: Flex rules Date: 17 Feb 1995 11:38:17 -0000 Organization: Mantis Consultants Ltd, Cambridge, UK Lines: 18 References: In article , Bryan Russell wrote: >"sclex.l", line 577: unrecognized rule > >and the rule was really [A-Z][A-Za-z0-9-_] which is supposed to read as >Starting letter of A to Z, the rest of the leters consisting of A to Z or a to >z or - or _. I now know why the resulting script compiler didn't work as the >first line of the test source script had a '-' in it. > >Is there some sort of special delimiter to include '-' in the rule or should >the context sort it out? In ed at any rate you put it first (after an initial ^ if any) or last, so [-A-Za-z0-9_] or [A-Za-z0-9_-] would do the job you want. Olly -- Putting the "Ol" in technology.