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.

有帮助吗?

解决方案

Usually the question mark ? stands for 0 or 1 time

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top