ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/02/17/07:37:29

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: <DBBCAC6D93 AT mis DOT scitec DOT com DOT au>

In article <DBBCAC6D93 AT mis DOT scitec DOT com DOT au>,
Bryan Russell  <BRYAN-R AT mis DOT scitec DOT com DOT au> 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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019