In a computer language, a reserved word (also known as a reserved identifier) is a word that cannot be used as an identifier, such as the name of a variable, function, or label – it is "reserved from use". This is a syntactic definition, and a reserved word may have no user-defined meaning. A closely related and often conflated notion is a keyword, which is a word with special meaning in a particular context. This is a semantic definition. By contrast, names in a standard library but not built into a language are not considered reserved words or keywords. The terms "reserved word" and "keyword" are often used interchangeably – one may say that a reserved word is "reserved for use as a keyword" – and formal use varies from language to language. For this article, we distinguish as above. In general reserved words and keywords need not coincide, but in most modern languages keywords are a subset of reserved words, as this makes parsing easier, since keywords cannot be confused with identifiers. In some languages, like C or Python, reserved words and keywords coincide, while in other languages, like Java, all keywords are reserved words, but some reserved words are not keywords, being reserved for future use. In yet other languages, such as the older languages ALGOL, FORTRAN, and PL/I, there are keywords but no reserved words, with keywords being distinguished from identifiers by other means. The sets of reserved words and keywords in a language often coincide or are almost equal, and the distinction is subtle, so the terms are often used interchangeably. However, in careful use they are distinguished. Making keywords be reserved words makes lexing easier, as a string of characters will unambiguously be either a keyword or an identifier, without depending on context; thus keywords are usually a subset of reserved words. However, reserved words need not be keywords. For example, in Java, goto is a reserved word, but has no meaning and does not appear in any production rules in the grammar.

À propos de ce résultat
Cette page est générée automatiquement et peut contenir des informations qui ne sont pas correctes, complètes, à jour ou pertinentes par rapport à votre recherche. Il en va de même pour toutes les autres pages de ce site. Veillez à vérifier les informations auprès des sources officielles de l'EPFL.
Cours associés (1)
BIO-645: Introduction to Applied Data Science (I2ADS)
The "Introduction to Applied Data Science" (I2ADS) course is aimed at students of all levels to train them in the core computer science software stack and techniques forming the pillars of open & repr
Séances de cours associées (31)
Multithreading : génération de code et vérification de type
Couvre le multithreading, la génération de code et la vérification de type dans l'implémentation du compilateur.
WireGuard : protocole cryptographique pour les VPN
Explore le protocole WireGuard, un remplacement VPN moderne pour IPsec et OpenVPN, en se concentrant sur les tunnels cryptés et les propriétés de sécurité.
Les bases d'AutoCAD : Vault View
Introduit les fonctions de base d'AutoCAD pour créer des élévations de voûte et travailler avec des modifications paramétriques et des couches.
Afficher plus
Publications associées (9)

Developing Attitude Measures Based on Respondents’ Representations of Unfamiliar Objects

Stéphane Joost, Alain Clémence

A key challenge in the design of effective survey questionnaires is to write questions that respondents can understand consistently. Recommendations in the questionnaire design literature propose the use of respondents’ own terminology to facilitate compre ...
2018

Query Refinement Using Conversational Context: A Method and an Evaluation Resource

Andrei Popescu-Belis, Maryam Habibi

This paper introduces a query refinement method applied to queries asked by users during a meeting or a conversation. The proposed method does not require further clarifications from users, to avoid distracting them from their conversation, but leverages i ...
Springer-Verlag Berlin2015

Integrating Defect Data, Code Review Data, and Version Control Data for Defect Analysis and Prediction

Tao-Chun Lee

In this thesis, we present a new approach to integrating software system defect data: Defect reports, code reviews and code commits. We propose to infer defect types by keywords. We index defect reports into groups by the keywords found in the descriptions ...
2013
Afficher plus
Concepts associés (22)
Portée (informatique)
En informatique, la portée (scope en anglais) d'un identifiant est l'étendue au sein de laquelle cet identifiant est lié. Cette portée peut être lexicale ou dynamique. Portée lexicale Une portée lexicale est définie par une portion du code source. Au sein de cette portion, l'identifiant n'a qu'une seule liaison. Un identifiant à portée globale est lié dans l'ensemble du code source (parfois seulement après sa déclaration ou sa définition). Dans de nombreux langages de programmation, toutes les fonctions ont une portée globale (exemple : C).
Statement (computer science)
In computer programming, a statement is a syntactic unit of an imperative programming language that expresses some action to be carried out. A program written in such a language is formed by a sequence of one or more statements. A statement may have internal components (e.g. expressions). Many programming languages (e.g. Ada, Algol 60, C, Java, Pascal) make a distinction between statements and definitions/declarations. A definition or declaration specifies the data on which a program is to operate, while a statement specifies the actions to be taken with that data.
Analyse lexicale
En informatique, l’analyse lexicale, lexing, segmentation ou tokenization est la conversion d’une chaîne de caractères (un texte) en une liste de symboles (tokens en anglais). Elle fait partie de la première phase de la chaîne de compilation. Ces symboles sont ensuite consommés lors de l'analyse syntaxique. Un programme réalisant une analyse lexicale est appelé un analyseur lexical, tokenizer ou lexer. Un analyseur lexical est généralement combiné à un analyseur syntaxique pour analyser la syntaxe d'un texte.
Afficher plus

Graph Chatbot

Chattez avec Graph Search

Posez n’importe quelle question sur les cours, conférences, exercices, recherches, actualités, etc. de l’EPFL ou essayez les exemples de questions ci-dessous.

AVERTISSEMENT : Le chatbot Graph n'est pas programmé pour fournir des réponses explicites ou catégoriques à vos questions. Il transforme plutôt vos questions en demandes API qui sont distribuées aux différents services informatiques officiellement administrés par l'EPFL. Son but est uniquement de collecter et de recommander des références pertinentes à des contenus que vous pouvez explorer pour vous aider à répondre à vos questions.