Applications of context free grammars in real life?

What are the applications of context free grammars in real life? Whatt are the applications of DFA and CFG?

749k 144 144 gold badges 942 942 silver badges 1.3k 1.3k bronze badges asked Dec 30, 2017 at 19:57 Wadood Jaan Wadood Jaan 11 1 1 gold badge 1 1 silver badge 3 3 bronze badges

1 Answer 1

Context-free grammars are used in compilers and in particular for parsing, taking a string-based program and figuring out what it means. Typically, CFGs are used to define the high-level structure of a programming language. Figuring out how a particular string was derived tells us about its structure and meaning. These course notes give a good overview of this idea.

Finite state machines such as DFAs are used to model the behavior of everyday objects and processes such as circuits and network protocols. One example of this is a standard HTML button.

answered Aug 2, 2018 at 20:33 roctothorpe roctothorpe 301 1 1 silver badge 9 9 bronze badges

Related

Hot Network Questions

Subscribe to RSS

Question feed

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Site design / logo © 2024 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2024.9.17.15358