About 50 results
Open links in new tab
  1. regex - What is a Context Free Grammar? - Stack Overflow

    A context free grammar is a grammar which satisfies certain properties. In computer science, grammars describe languages; specifically, they describe formal languages.

  2. Tips for creating "Context Free Grammar" - Stack Overflow

    Feb 28, 2013 · The rules will help you to write Grammar for New Languages. One different approach is to first draw automata, then convert automata to Grammar. We have predefined techniques to write …

  3. Regular vs Context Free Grammars - Stack Overflow

    Feb 18, 2009 · Regular grammar is either right or left linear, whereas context free grammar is basically any combination of terminals and non-terminals. Hence you can see that regular grammar is a …

  4. What are terminal and nonterminal symbols? - Stack Overflow

    Sep 12, 2019 · Definitions of terminal and non-terminal symbols are not Parse-specific, but are concerned with grammars in general. Things like this wiki page or intro in Grune's book explain them …

  5. Context-free grammars versus context-sensitive grammars?

    Nov 23, 2011 · Context-sensitive grammar is a formal grammar in which left-hand sides and right hand sides of any production (rewrite) rules may be surrounded by a context of terminal and nonterminal …

  6. What programming languages are context-free? - Stack Overflow

    May 22, 2009 · To address your sub-question a little differently, Which programming languages are defined by a context-free grammar? Most real-world programming languages are defined by their …

  7. How to construct a CFG based on a given regular expression

    Another way to construct a context-free grammar for a given regular expression is: Construct a finite state machine which accepts the same language as the regular expression.

  8. NLTK Context Free Grammar Genaration - Stack Overflow

    Jul 17, 2013 · P -> "in" | "on" | "by" | "with" In my app, I am supposed to minimize hard coding with the use of a rule-based grammar. For example, I can assume any word ending with -ed or -ing as a verb. …

  9. Is C++ context-free or context-sensitive? - Stack Overflow

    Jan 30, 2013 · If you look up the definition of context-free languages, it will basically tell you that all grammar rules must have left-hand sides that consist of exactly one non-terminal symbol. Context …

  10. Context-free grammar for this language - Stack Overflow

    Mar 4, 2025 · Your grammar S->0S01 | e is correct, and will produce the language you describe. That is: a sequence of '0's followed by the same number of '01's. The grammar is context free and also LL …