Xref: utzoo comp.lang.c:29233 comp.unix.wizards:22218 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!ditmela!yarra!bohra!ejp From: ejp@bohra.cpg.oz (Esmond Pitt) Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: Lex and initial start conditions Message-ID: <116@bohra.cpg.oz> Date: 31 May 90 05:07:00 GMT References: <6342@crabcake> <1990May30.174745.1161@csrd.uiuc.edu> Reply-To: ejp@bohra.cpg.oz.au (Esmond Pitt) Organization: Computer Power Group, Melb, Australia Lines: 24 In article <1990May30.174745.1161@csrd.uiuc.edu> pommu@iis.ethz.ch (Claude Pommerell) writes: > >There is a way to solve your problem, Jack. There are two even simpler ways. Instead of effectively changing the initial condition to , either: 1. Ensure each start-state is equipped with enough rules to handle any possible input, and, as the documentation does state, place all the unlabelled rules after all the labelled rules, and/or 2. Label all the rules you only want applied in the INITAL state with , so they won't be applied as defaults in other states. Placing non-labelled rules before labelled rules is probably the single most common error in writing LEX scripts, even after 15 years. I don't know why. -- Esmond Pitt, Computer Power Group ejp@bohra.cpg.oz D