[SimpleParse] RE: More Simpleparse advice
Brought to you by:
mcfletch
From: Paul P. <pau...@ho...> - 2003-08-18 05:42:14
|
Mike C. Fletcher wrote: > > Paul Paterson wrote: > > > > >... And <a bad line here> doesn't parse, then the "line" > doesn't match > >and so I get a report that the "sub_definition" doesn't > match. This is > >entirely correct, but quite hard for the end-user to work > out what is > >going wrong in a long subroutine. > > > You are probably looking for a construct like so: > block := blockstart, !, blockcontent?, blockend > > or more concretely... > > ifblock := 'If', condition, !, blockcontent, 'End',ts,'If' > > That is, once you hit a block-start, you must hit a block-end > or there's > a syntax error, so you include the cut and a syntax error > will be raised > when the system can't find the rest of the construct. This is exactly what I was looking for! Many thanks again! Paul |