Deterministic grammar without context and grammar without context?

I read my notes for my class of comparative languages, and I'm a little confused ...

What is the difference between context-free grammar and deterministic context-free grammar? I specifically read about how parsers are O (n ^ 3) for CFG, and compilers are O (n) for DCFG, and I don’t really understand how the difference in time complexity can be so big (not to mention that I am still confused about what characteristics do CFG DCFG).

Thank you so much in advance!

+4
source share
1 answer

. - - , BNF. DCFG - , .

DCFG. , "" , , , . LR() 1960- , DCFG. , LALR (1) LL (1), , , , .

BNF, . Yacc, Bison ANTLR - .

NDCFG, , . , .


, , , DCFG. C/++, . , , "" .


, NDCFG , . . , , , , - . NDCFG , , - . .

NDCFG. LL(), LR().

+2

Source: https://habr.com/ru/post/1532586/


All Articles