Question

today I got a homework on my 'Programming Languages' class and I'm having trouble. Here is the full question;

For the grammars given below, draw transition diagram and transition table. Provide 3 valid example strings.

And this is the one I'm having trouble with;

1?1.(0|1)+

I don't really know what the question mark (?) stands for on this example, and I couldn't find an online paper. I don't want any help on diagram or the table, I could make them if I knew what '?' means. Please help me with this, thanks in advance.

Was it helpful?

Solution

Usually the question mark ? stands for 0 or 1 time

So 1? will match "" (empty) and "1"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top