String Grammar
   HOME

TheInfoList



OR:

The term "string grammar" in
computational linguistics Computational linguistics is an interdisciplinary field concerned with the computational modelling of natural language, as well as the study of appropriate computational approaches to linguistic questions. In general, computational linguistics ...
(and
computer languages A computer language is a formal language used to communicate with a computer. Types of computer languages include: * Construction language – all forms of communication by which a human can specify an executable problem solution to a comput ...
) refers to the structure of a specific language, such that it can be formatted as a single continuous string of text, without the need to have line-breaks (or newlines) to alter the meaning. The appearance of any text in "column 1" (or any column) of a line does not change the meaning of that text in a string
grammar In linguistics, grammar is the set of rules for how a natural language is structured, as demonstrated by its speakers or writers. Grammar rules may concern the use of clauses, phrases, and words. The term may also refer to the study of such rul ...
. A string grammar can be used to describe the structure of some
natural language A natural language or ordinary language is a language that occurs naturally in a human community by a process of use, repetition, and change. It can take different forms, typically either a spoken language or a sign language. Natural languages ...
s, such as English or French, as well as for some computer languages. Note that the string-based structure is for defining the
grammar In linguistics, grammar is the set of rules for how a natural language is structured, as demonstrated by its speakers or writers. Grammar rules may concern the use of clauses, phrases, and words. The term may also refer to the study of such rul ...
of a language, rather than the formatting of the language itself. The production rules, of the grammar, are in the form of continuous text strings.


Benefits of using a string grammar

When a ''string grammar'' is used to define a computer language, some string-grammar
parsing Parsing, syntax analysis, or syntactic analysis is a process of analyzing a String (computer science), string of Symbol (formal), symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal gramm ...
tools and compiler-generator tools can be used to more easily create a
compiler In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
software system for that particular computer language. Because other grammars can be more difficult to use for parsing text written in a specific computer language, using a string grammar is a means to seek simplicity in language processing.


Unrelated terms that may be confused

Sometimes the word "string" precedes "grammar" in unrelated terms. An example is " address string grammar", which is a grammar for
Internet Protocol The Internet Protocol (IP) is the network layer communications protocol in the Internet protocol suite for relaying datagrams across network boundaries. Its routing function enables internetworking, and essentially establishes the Internet. IP ...
address strings. Another is the term "numeric string grammar" which refers to ''numeric strings'' (strings which denote numbers or numerals).


See also

*
Formal grammar A formal grammar is a set of Terminal and nonterminal symbols, symbols and the Production (computer science), production rules for rewriting some of them into every possible string of a formal language over an Alphabet (formal languages), alphabe ...
*
Tree-adjoining grammar Tree-adjoining grammar (TAG) is a grammar formalism defined by Aravind Joshi. Tree-adjoining grammars are somewhat similar to context-free grammars, but the elementary unit of rewriting is the tree rather than the symbol. Whereas context-free gr ...
*
Context-free grammar In formal language theory, a context-free grammar (CFG) is a formal grammar whose production rules can be applied to a nonterminal symbol regardless of its context. In particular, in a context-free grammar, each production rule is of the fo ...
*
LALR In computer science, an LALR parser (look-ahead, left-to-right, rightmost derivation parser) is part of the compiling process where human readable text is converted into a structured representation to be read by computers. An LALR parser is a soft ...


References

{{Reflist Computational linguistics Compiler construction