Nepedia
Back to Discover
Independent Reader
💻

Metasyntax

technology Maturity 11-13 Next article →

Rules tell us how to build sentences. Some rules describe how to use other rules. This is called a metasyntax.

Metasyntax helps define a language. This can be a human language or computer code. It uses three main parts. First are terminal symbols. These are stand-alone parts like a single word. Second are nonterminal symbols. These represent a group of parts. Third are metasymbols. These are marks that give extra information.

Different systems use different marks. One system is called Backus–Naur form, or BNF. It uses angle brackets for groups. It uses quotes for words. Another system is called EBNF. It adds more features. It uses square brackets for optional parts. It uses curly brackets for parts that repeat.

Some systems do not use many marks. They might use different fonts instead. For example, the Ada language uses font styles. C and Java use italics for groups. These new ways make rules easier to read. They help stop any confusion. This makes the rules clear for everyone.

169 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.