Lexical grammar

Lexical grammar

In computer science, a lexical grammar can be thought of as the syntax of tokens. That is, the rules governing how a character sequence is divided up into subsequences of characters, each of which represents an individual token.

For instance, the lexical grammar for many programming languages specifies that a string starts with a " character and continues until a matching " is found, that an identifier is a sequence of letters and digits, and that a number is a sequence of digits. So in the following character sequence "abc" xyz1 23 the tokens are "string", "identifier" and "number" (because the space character terminates the sequence of characters forming the identifier.)


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Lexical analysis — In computer science, lexical analysis is the process of converting a sequence of characters into a sequence of tokens. Programs performing lexical analysis are called lexical analyzers or lexers. A lexer is often organized as separate scanner and …   Wikipedia

  • Lexical functional grammar — (LFG) is a grammar framework in theoretical linguistics, a variety of generative grammar. The development of the theory was initiated by Joan Bresnan and Ronald Kaplan in the 1970s, in reaction to the direction research in the area of… …   Wikipedia

  • Lexical item — Lexical items are single words or words that are grouped in a language s lexicon. Examples are cat , traffic light , take care of , by the way , and don t count your chickens before they hatch . Lexical items are those which can be generally… …   Wikipedia

  • Grammar — is the field of linguistics that covers the rules governing the use of any given natural language. It includes morphology and syntax, often complemented by phonetics, phonology, semantics, and pragmatics. Each language has its own distinct… …   Wikipedia

  • Lexical category — In grammar, a lexical category (also word class, lexical class, or in traditional grammar part of speech) is a linguistic category of words (or more precisely lexical items ), which is generally defined by the syntactic or morphological behaviour …   Wikipedia

  • Grammar framework — In theoretical linguistics, the following fundamental approaches towards constructing grammar frameworks for natural languages are distinguished:*Generative grammar: algorithmic (phrase structure grammars) **Transformational grammar (1960s)… …   Wikipedia

  • lexical — adjective Date: 1836 1. of or relating to words or the vocabulary of a language as distinguished from its grammar and construction 2. of or relating to a lexicon or to lexicography • lexicality noun • lexically adverb …   New Collegiate Dictionary

  • HEBREW GRAMMAR — The following entry is divided into two sections: an Introduction for the non specialist and (II) a detailed survey. [i] HEBREW GRAMMAR: AN INTRODUCTION There are four main phases in the history of the Hebrew language: the biblical or classical,… …   Encyclopedia of Judaism

  • English grammar — is a body of rules (grammar) specifying how phrases and sentences are constructed in the English language. Accounts of English grammar tend to fall into two groups: the descriptivist , which describes the grammatical system of English; and the… …   Wikipedia

  • Systemic functional grammar — (SFG) or systemic functional linguistics (SFL) is a model of grammar that was developed by Michael Halliday in the 1960s. [http://www.isfla.org/Systemics/Definition/definition.html, accessed 30 July 2008] It is part of a broad social semiotic… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”