문제

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