Posted By:
Jonathan_Sergent
Posted On:
Saturday, April 14, 2001 09:11 PM
How do I match something like this: protected A: 'a'..'z' | '0'..'9'; protected B: A | '-'; protected Name: (A (B)*)? A; Name can only have hyphens if they are not the first or last character. The use of Name is always followed by ':' or '/'. The above is ambiguous with the exit from (B)* on A. How do I do this with k=1? I want to use a syntactic predicate with the (B)*: protected Name: (A ((B B)=>B)*)? A; But of course there's only one alternative. What's the trick here? I'm missing something obvious, I think. I'm trying to avoid recursion and k=2.
More>>
How do I match something like this:
protected A: 'a'..'z' | '0'..'9';
protected B: A | '-';
protected Name: (A (B)*)? A;
Name can only have hyphens if they are not the first or last character.
The use of Name is always followed by ':' or '/'.
The above is ambiguous with the exit from (B)*
on A.
How do I do this with k=1?
I want to use a syntactic predicate with the (B)*:
protected Name: (A ((B B)=>B)*)? A;
But of course there's only one alternative.
What's the trick here? I'm missing something obvious, I think.
I'm trying to avoid recursion and k=2.
<<Less