He earned both BA and MA

Semantic VS syntax errors

  • errors occur during the parsing of input code, and are caused by grammatically incorrect statements. Typical errors might be an illegal character in the input, a missing operator, two operators in a row, two statements on the same line with no intervening semicolon, unbalanced parentheses, a misplaced reserved word, etc.
  • Semantic errors occur during the execution of the code, after it has been parsed as grammatically correct. These have to do not with how statements are constructed, but with what they mean. Such things as incorrect variable types or sizes, nonexistent variables, subscripts out of range, and the like, are semantic errors.

Basis is a single-pass parser, that is, it looks at its input only once. It also is a one-look ahead parser, meaning that at the most it is never looking more than one symbol ahead of the current context. By the time a syntax error has been detected, it is likely that a lot of the context information to the left of the error has already been lost. The diagnostic information that Basis gives attempts to be as useful as possible, but because of the very limited context information available, it is far from perfect.

Semantic errors are often possible to diagnose more precisely. We have attempted to make the semantic error information supplied as useful as possible. Sometimes some of the information is only useful to someone familiar with the internals of Basis; but we hope that in most cases it will help you find your error.

See also:
Shlok Consulatants GK Basic General Knowledge
Mobile Application (Shlok Consulatants)
  • General knowledge has been defined in differential psychology as culturally valued knowledge communicated by a range of non-specialist media and encompassing a...
  • This definition excludes highly specialized learning that can only be obtained with extensive training and information confined to a single medium. General knowledge...
  • A number of studies have found that males tend to have greater overall general knowledge than females, perhaps due to gender differences in interests rather than...
  • This is the general knowledge questions and answers section on Basic General Knowledge with explanation for various interview, competitive examination
Related Posts