Lesson plan

Syntax (programming languages)

code is shown with coloring that highlights syntactic aspects. The syntax of computer source code is code structured and ordered restricted to computer language rules. Like a natural language, a computer language (i.e. a programming language) defines the syntax that is valid for that language. A syntax error occurs when syntactically invalid source code is processed by a tool such as a compiler or interpreter. The most commonly used languages are text-based with syntax based on strings. Alternatively, the syntax of a visual programming language is based on relationships between graphical elements. When designing syntax, a designer of any language might start by writing down examples of both legal and illegal strings, before trying to figure out the general rules from those examples in use. Such that its general structure of syntax can be determined through its form of composition, so to yield semantically valid ranges everytime for each possible alteration. Or else, it returns errors, and warnings, for each invalid input.

Back to article

Article summary

code is shown with coloring that highlights syntactic aspects. The syntax of computer source code is code structured and ordered restricted to computer language rules. Like a natural language, a computer language (i.e. a programming language) defines the syntax that is valid for that language. A syntax error occurs when syntactically invalid source code is processed by a tool such as a compiler or interpreter. The most commonly used languages are text-based with syntax based on strings. Alternatively, the syntax of a visual programming language is based on relationships between graphical elements. When designing syntax, a designer of any language might start by writing down examples of both legal and illegal strings, before trying to figure out the general rules from those examples in use. Such that its general structure of syntax can be determined through its form of composition, so to yield semantically valid ranges everytime for each possible alteration. Or else, it returns errors, and warnings, for each invalid input.

Key claims

No claims recorded.

Discussion questions

  1. Summarise the article in your own words. Which single claim would you verify first, and why?
  2. Which claim in this article is most likely to be revised as the sources update? How would you check its current status?
  3. If two sources disagreed about one of these facts, what would you need in order to trust one over the other?

Bibliography

No sources recorded.

Key claims and bibliography are generated from the same tracked claims and sources as the article page.