

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer

Reading the Go language specs, I read in the intro:

"The grammar is compact and regular, allowing for easy analysis by automatic tools such as integrated development environments."

Is the word "regular" here a technical term, or should it be interpreted just as a vague English word?

share|improve this question
up vote 7 down vote accepted

It's a technical term, but not the technical term you are thinking of.

In this case, "regular" means composed of few rules with with few corner cases.

The term for a grammar that describes a regular language is usually left-linear or right-linear, "regular grammar" in this sense is rather uncommon. A compact notation for describing regular languages are regular expressions.

Go's grammar is not in CH-3, i.e. not regular in that sense of the word, but it has a lot less corner cases than, say, Java, C#, C++ or C, so it is a lot more regular (in the other sense) than those.

share|improve this answer

"Regular" is a technical term for grammars, but I strongly doubt it is used with that meaning here as a regular grammar can describe only regular languages, which may also be described by regular expressions.

share|improve this answer

Your Answer


