0

What's the difference between terminal & non-terminal symbols in system programming with examples?

kjhughes
  • 106,133
  • 27
  • 181
  • 240
user5441403
  • 13
  • 1
  • 4
  • 1
    Possible duplicate of [BSON | terminal and non-terminal](http://stackoverflow.com/questions/13206423/bson-terminal-and-non-terminal) – Will Sheppard Oct 13 '15 at 15:00
  • Duplicate, with a much more substantive answer: [What are terminal and nonterminal symbols?](https://stackoverflow.com/questions/57908662/what-are-terminal-and-nonterminal-symbols) – kjhughes Jul 20 '22 at 23:20

1 Answers1

1

A terminal symbol represents a single element of the language, and a non-terminal symbol represents several elements.

terminal and nonterminal symbols are the lexical elements used in specifying the production rules constituting a formal grammar. Terminal symbols are the elementary symbols of the language defined by a formal grammar. Nonterminal symbols (or syntactic variables) are replaced by groups of terminal symbols according to the production rules.

source: http://en.wikipedia.org/wiki/Terminal_and_nonterminal_symbols

Will Sheppard
  • 3,272
  • 2
  • 31
  • 41