1
0
Fork 0
cl-sites/lisp-docs.github.io/cl-language-reference/chap-2/c-b-character-syntax.html

124 lines
No EOL
67 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-chap-2/c-b-character-syntax" data-has-hydrated="false">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.0.1">
<title data-rh="true">2.1 Character Syntax | Common Lisp (New) Language Reference</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://lisp-docs.github.io/cl-language-reference/img/1024px-Lisp_logo.svg.png"><meta data-rh="true" name="twitter:image" content="https://lisp-docs.github.io/cl-language-reference/img/1024px-Lisp_logo.svg.png"><meta data-rh="true" property="og:url" content="https://lisp-docs.github.io/cl-language-reference/chap-2/c-b-character-syntax"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="google-site-verification" content="Vzaw013_bfdKeUVG89Ch3W1zC9_vH9ID2dPB9Dz0vr0"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="2.1 Character Syntax | Common Lisp (New) Language Reference"><meta data-rh="true" name="description" content="2.1.1 Readtables"><meta data-rh="true" property="og:description" content="2.1.1 Readtables"><link data-rh="true" rel="icon" href="../img/favicon.ico"><link data-rh="true" rel="canonical" href="c-b-character-syntax.html"><link data-rh="true" rel="alternate" href="c-b-character-syntax.html" hreflang="en"><link data-rh="true" rel="alternate" href="c-b-character-syntax.html" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://C1F2Q5VM6X-dsn.algolia.net" crossorigin="anonymous"><link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.googletagmanager.com">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-8TJCE4NSF8"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-8TJCE4NSF8",{})</script>
<link rel="search" type="application/opensearchdescription+xml" title="Common Lisp (New) Language Reference" href="../opensearch.xml"><link rel="stylesheet" href="../assets/css/styles.f13b59fe.css">
<script src="../assets/js/runtime~main.02699c25.js" defer="defer"></script>
<script src="../assets/js/main.4f0a7a76.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return localStorage.getItem("theme")}catch(t){}}();t(null!==e?e:"light")}(),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="c-b-character-syntax.html#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a href="../../index.html" target="_blank" rel="noopener noreferrer" class="navbar__brand"><div class="navbar__logo"><img src="../img/logo.svg" alt="Lisp Logo" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="../img/logo.svg" alt="Lisp Logo" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div><b class="navbar__title text--truncate">Common Lisp Docs</b></a><a href="../../docs/tutorial/index.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Tutorial</a><a href="../index.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Technical Reference</a><a href="../../docs/whylisp.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Why Lisp?</a><a href="../../docs/howto.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Guides</a></div><div class="navbar__items navbar__items--right"><a href="../../docs/contribute.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Contribute!</a><a href="../../docs/help.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Getting Help</a><a href="../../docs/about.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">About</a><a href="../../blog.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Blog</a><a href="https://github.com/lisp-docs" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="Switch between dark and light mode (currently light mode)" aria-label="Switch between dark and light mode (currently light mode)" aria-live="polite"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="navbarSearchContainer_Bca1"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0"><div class="docsWrapper_hBAB"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docRoot_UBD9"><aside class="theme-doc-sidebar-container docSidebarContainer_YfHR"><div class="sidebarViewport_aRkj"><div class="sidebar_njMd"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="../index.html">Introduction</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-0/intro.html">Contents and Figures</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-1/b-b-scope-purpose-and-history.html">1. Introduction</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" href="c-b-character-syntax.html">2. Syntax</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="c-b-character-syntax.html">2.1 Character Syntax</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="c-c-reader-algorithm.html">2.2 Reader Algorithm</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="c-d-interpretation-of-tokens.html">2.3 Interpretation of Tokens</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="c-e-standard-macro-characters.html">2.4 Standard Macro Characters</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-3/d-b-evaluation.html">3. Evaluation and Compilation</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-4/e-b-introduction.html">4. Types and Classes</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-5/f-b-generalized-reference.html">5. Data and Control Flow</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-6/g-b-the-loop-facility.html">6. Iteration</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-7/h-b-object-creation-and-initialization.html">7. Objects</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../category/81-structures-dictionary.html">8. Structures</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-9/j-b-condition-system-concepts.html">9. Conditions</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-10/ba-b-symbol-concepts.html">10. Symbols</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-11/bb-b-package-concepts.html">11. Packages</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-12/bc-b-number-concepts.html">12. Numbers</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-13/bd-b-character-concepts.html">13. Characters</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-14/be-b-cons-concepts.html">14. Conses</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-15/bf-b-array-concepts.html">15. Arrays</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-16/bg-b-string-concepts.html">16. Strings</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-17/bh-b-sequence-concepts.html">17. Sequences</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-18/bi-b-hash-table-concepts.html">18. Hash Tables</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-19/bj-b-overview-of-filenames.html">19. Filenames</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-20/ca-b-file-system-concepts.html">20. Files</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-21/cb-b-stream-concepts.html">21. Streams</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-22/cc-b-the-lisp-printer.html">22. Printer</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-23/cd-b-reader-concepts.html">23. Reader</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-24/ce-b-system-construction-concepts.html">24. System Construction</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-25/cf-b-the-external-environment.html">25. External Environment</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../environments.html">26. Environments</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../meta-object-protocol.html">27. Meta Object Protocol</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../data-structures.html">28. Data Structures</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../portability/trivial-packages.html">29. Portability</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="../dictionary-entries.html">dictionary-entries</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="../chap-26/intro.html">Glossary</a></div></li></ul></nav></div></div></aside><main class="docMainContainer_TBSr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="../index.html"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">2. Syntax</span><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">2.1 Character Syntax</span><meta itemprop="position" content="2"></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><h1>2.1 Character Syntax</h1>
<!-- -->
<p>The <em>Lisp reader</em> takes <span><i>characters</i></span> from a <span><i>stream</i></span>, interprets them as a printed representation of an <span><i>object</i></span>, constructs that <span><i>object</i></span>, and returns it.</p>
<p>The syntax described by this chapter is called the <span><i>standard syntax</i></span>. Operations are provided by Common Lisp so that various aspects of the syntax information represented by a <span><i>readtable</i></span> can be modified under program control; see Chapter 23 (Reader). Except as explicitly stated otherwise, the syntax used throughout this document is <span><i>standard syntax</i></span> .</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="211-readtables">2.1.1 Readtables<a href="c-b-character-syntax.html#211-readtables" class="hash-link" aria-label="Direct link to 2.1.1 Readtables" title="Direct link to 2.1.1 Readtables"></a></h2>
<!-- -->
<p>Syntax information for use by the <em>Lisp reader</em> is embodied in an <span><i>object</i></span> called a <span><i>readtable</i></span>. Among other things, the <span><i>readtable</i></span> contains the association between <span><i>characters</i></span> and <span><i>syntax types</i></span>.</p>
<p>Figure 21 lists some <span><i>defined names</i></span> that are applicable to <span><i>readtables</i></span>.</p>
<p>|</p><p><strong>*readtable* readtable-case</strong> </p><p><strong>copy-readtable readtablep</strong> </p><p><strong>get-dispatch-macro-character set-dispatch-macro-character get-macro-character set-macro-character</strong> </p><p><strong>make-dispatch-macro-character set-syntax-from-char</strong></p>|<p></p>
<p>| :- |</p>
<p><strong>Figure 21. Readtable defined names</strong></p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="2111-the-current-readtable">2.1.1.1 The Current Readtable<a href="c-b-character-syntax.html#2111-the-current-readtable" class="hash-link" aria-label="Direct link to 2.1.1.1 The Current Readtable" title="Direct link to 2.1.1.1 The Current Readtable"></a></h3>
<!-- -->
<p>Several <span><i>readtables</i></span> describing different syntaxes can exist, but at any given time only one, called the <span><i>current readtable</i></span>, affects the way in which <span><i>expressions</i></span><sub>2</sub> are parsed into <span><i>objects</i></span> by the <em>Lisp reader</em> . The <span><i>current readtable</i></span> in a given <span><i>dynamic environment</i></span> is the <span><i>value</i></span> of <span><b>*readtable*</b></span> in that <span><i>environment</i></span>. To make a different <span><i>readtable</i></span> become the <span><i>current readtable</i></span>, <span><b>*readtable*</b></span> can be <em>assigned</em> or <span><i>bound</i></span>.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="2112-the-standard-readtable">2.1.1.2 The Standard Readtable<a href="c-b-character-syntax.html#2112-the-standard-readtable" class="hash-link" aria-label="Direct link to 2.1.1.2 The Standard Readtable" title="Direct link to 2.1.1.2 The Standard Readtable"></a></h3>
<!-- -->
<p>The <span><i>standard readtable</i></span> conforms to <span><i>standard syntax</i></span> . The consequences are undefined if an attempt is made to modify the <span><i>standard readtable</i></span>. To achieve the effect of altering or extending <span><i>standard syntax</i></span> , a copy of the <span><i>standard readtable</i></span> can be created; see the <span><i>function</i></span> <span><b>copy-readtable</b></span>.</p>
<p>The <span><i>readtable case</i></span> of the <span><i>standard readtable</i></span> is <!-- -->:upcase<!-- -->.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="2113-the-initial-readtable">2.1.1.3 The Initial Readtable<a href="c-b-character-syntax.html#2113-the-initial-readtable" class="hash-link" aria-label="Direct link to 2.1.1.3 The Initial Readtable" title="Direct link to 2.1.1.3 The Initial Readtable"></a></h3>
<!-- -->
<p>The <span><i>initial readtable</i></span> is the <span><i>readtable</i></span> that is the <span><i>current readtable</i></span> at the time when the <em>Lisp image</em> starts. At that time, it conforms to <span><i>standard syntax</i></span> . The <span><i>initial readtable</i></span> is <span><i>distinct</i></span> from the <span><i>standard readtable</i></span>. It is permissible for a <span><i>conforming program</i></span> to modify the <span><i>initial readtable</i></span>.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="212-variables-that-affect-the-lisp-reader">2.1.2 Variables that affect the Lisp Reader<a href="c-b-character-syntax.html#212-variables-that-affect-the-lisp-reader" class="hash-link" aria-label="Direct link to 2.1.2 Variables that affect the Lisp Reader" title="Direct link to 2.1.2 Variables that affect the Lisp Reader"></a></h2>
<!-- -->
<p>The <em>Lisp reader</em> is influenced not only by the <span><i>current readtable</i></span>, but also by various <span><i>dynamic variables</i></span>. Figure 22 lists the <span><i>variables</i></span> that influence the behavior of the <em>Lisp reader</em> .</p>
<p>|<strong>*package* *read-default-float-format* *readtable* *read-base* *read-suppress*</strong>|</p>
<p>| :- |</p>
<p><strong>Figure 22. Variables that influence the Lisp reader.</strong></p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="213-standard-characters">2.1.3 Standard Characters<a href="c-b-character-syntax.html#213-standard-characters" class="hash-link" aria-label="Direct link to 2.1.3 Standard Characters" title="Direct link to 2.1.3 Standard Characters"></a></h2>
<!-- -->
<p>All <span><i>implementations</i></span> must support a <em>character repertoire</em> called <span><b>standard-char</b></span>; <span><i>characters</i></span> that are members of that <span><i>repertoire</i></span> are called <span><i>standard characters</i></span>.</p>
<p>The <span><b>standard-char</b></span> <span><i>repertoire</i></span> consists of the <em>non-graphic character newline</em>, the <em>graphic character space</em>, and the following additional ninety-four <em>graphic characters</em> or their equivalents:</p>
<p>|<strong>Graphic ID Glyph Description Graphic ID Glyph Description</strong>|</p>
<p>| -: |</p>
<p>|LA01 a small a LN01 n small n LA02 A capital A LN02 N capital N LB01 b small b LO01 o small o LB02 B capital B LO02 O capital O LC01 c small c LP01 p small p LC02 C capital C LP02 P capital P LD01 d small d LQ01 q small q LD02 D capital D LQ02 Q capital Q LE01 e small e LR01 r small r LE02 E capital E LR02 R capital R LF01 f small f LS01 s small s LF02 F capital F LS02 S capital S LG01 g small g LT01 t small t LG02 G capital G LT02 T capital T LH01 h small h LU01 u small u LH02 H capital H LU02 U capital U LI01 i small i LV01 v small v LI02 I capital I LV02 V capital V LJ01 j small j LW01 w small w LJ02 J capital J LW02 W capital W LK01 k small k LX01 x small x LK02 K capital K LX02 X capital X LL01 l small l LY01 y small y LL02 L capital L LY02 Y capital Y LM01 m small m LZ01 z small z LM02 M capital M LZ02 Z capital Z|</p>
<p><strong>Figure 23. Standard Character Subrepertoire (Part 1 of 3: Latin Characters)</strong></p>
<p>|<strong>Graphic ID Glyph Description Graphic ID Glyph Description</strong>|</p>
<p>| -: |</p>
<p>|ND01 1 digit 1 ND06 6 digit 6 ND02 2 digit 2 ND07 7 digit 7 ND03 3 digit 3 ND08 8 digit 8 ND04 4 digit 4 ND09 9 digit 9 ND05 5 digit 5 ND10 0 digit 0|</p>
<p><strong>Figure 24. Standard Character Subrepertoire (Part 2 of 3: Numeric Characters)</strong></p>
<p>|<strong>Graphic ID Glyph Description</strong>|</p>
<p>| :- |</p>
<p>|</p><p>SP02 ! exclamation mark </p><p>SC03 $ dollar sign </p><p>SP04 &quot; quotation mark, or double quote SP05 apostrophe, or [single] quote </p><p>SP06 ( left parenthesis, or open parenthesis SP07 ) right parenthesis, or close parenthesis SP08 , comma </p><p>SP09 low line, or underscore </p><p>SP10 - hyphen, or minus [sign] </p><p>SP11 . full stop, period, or dot </p><p>SP12 / solidus, or slash </p><p>SP13 : colon </p><p>SP14 ; semicolon </p><p>SP15 ? question mark </p><p>SA01 + plus [sign] </p><p>SA03 &lt; less-than [sign] </p><p>SA04 = equals [sign] </p><p>SA05 &gt; greater-than [sign] </p><p>SM01 # number sign, or sharp[sign] </p><p>SM02 % percent [sign] </p><p>SM03 &amp; ampersand </p><p>SM04 * asterisk, or star </p><p>SM05 @ commercial at, or at-sign </p><p>SM06 [ left [square] bracket </p><p>SM07 \ reverse solidus, or backslash </p><p>SM08 ] right [square] bracket </p><p>SM11 { left curly bracket, or left brace </p><p>SM13 | vertical bar </p><p>SM14 } right curly bracket, or right brace SD13 grave accent, or backquote </p><p>SD15 <i><sup></sup></i> circumflex accent </p><p>SD19 ~ tilde</p>|<p></p>
<p><strong>Figure 25. Standard Character Subrepertoire (Part 3 of 3: Special Characters)</strong></p>
<p>The graphic IDs are not used within Common Lisp, but are provided for cross reference purposes with ISO 6937/2. Note that the first letter of the graphic ID categorizes the character as follows: L—Latin, N—Numeric, S—Special.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="214-character-syntax-types">2.1.4 Character Syntax Types<a href="c-b-character-syntax.html#214-character-syntax-types" class="hash-link" aria-label="Direct link to 2.1.4 Character Syntax Types" title="Direct link to 2.1.4 Character Syntax Types"></a></h2>
<!-- -->
<p>The <em>Lisp reader</em> constructs an <span><i>object</i></span> from the input text by interpreting each <span><i>character</i></span> according to its <span><i>syntax type</i></span>. The <em>Lisp reader</em> cannot accept as input everything that the <em>Lisp printer</em></p>
<p>produces, and the <em>Lisp reader</em> has features that are not used by the <em>Lisp printer</em> . The <em>Lisp reader</em> can be used as a lexical analyzer for a more general user-written parser.</p>
<p>When the <em>Lisp reader</em> is invoked, it reads a single character from the <em>input stream</em> and dispatches according to the <span><i>syntax type</i></span> of that <span><i>character</i></span> . Every <span><i>character</i></span> that can appear in the <em>input stream</em> is of one of the <span><i>syntax types</i></span> shown in Figure 26.</p>
<p>|</p><p><em>constituent macro character single escape</em> </p><p><em>invalid multiple escape whitespace</em><sub>2</sub></p>|<p></p>
<p>| :- |</p>
<p><strong>Figure 26. Possible Character Syntax Types</strong></p>
<p>The <span><i>syntax type</i></span> of a <span><i>character</i></span> in a <span><i>readtable</i></span> determines how that character is interpreted by the <em>Lisp reader</em> while that <span><i>readtable</i></span> is the <span><i>current readtable</i></span>. At any given time, every character has exactly one <span><i>syntax type</i></span>.</p>
<p>Figure 27 lists the <span><i>syntax type</i></span> of each <span><i>character</i></span> in <span><i>standard syntax</i></span> .</p>
<p>|<strong>character syntax type character syntax type</strong>|</p>
<p>| :- |</p>
<p>|Backspace <i>constituent</i> 09 <i>constituent</i> Tab <i>whitespace</i><sub>2</sub> : <i>constituent</i> Newline <i>whitespace</i><sub>2</sub> ; <i>terminating macro char</i> Linefeed <i>whitespace</i><sub>2</sub> &lt; <i>constituent</i> Page <i>whitespace</i><sub>2</sub> = <i>constituent</i> Return <i>whitespace</i><sub>2</sub> &gt; <i>constituent</i> Space <i>whitespace</i><sub>2</sub> ? <i>constituent</i>* ! <i>constituent</i>* @ <i>constituent</i> &quot; <i>terminating macro char</i> AZ <i>constituent</i> # <i>non-terminating macro char</i> [ <i>constituent</i>* $ <i>constituent</i> \ <i>single escape</i> % <i>constituent</i> ] <i>constituent</i>* &amp; <i>constituent <sup></sup> constituent</i> <i>terminating macro char constituent</i> ( <i>terminating macro char</i> <i>terminating macro char</i> ) <i>terminating macro char</i> az <i>constituent</i> * <i>constituent</i> { <i>constituent</i>* + <i>constituent</i> | <i>multiple escape</i> , <i>terminating macro char</i> } <i>constituent</i>* - <i>constituent</i> ~ <i>constituent</i> . <i>constituent</i> Rubout <i>constituent</i> / <i>constituent</i>|</p>
<p><strong>Figure 27. Character Syntax Types in Standard Syntax</strong></p>
<p>The characters marked with an asterisk (*) are initially <span><i>constituents</i></span>, but they are not used in any standard Common Lisp notations. These characters are explicitly reserved to the <span><i>programmer</i></span> . ~ is not used in Common Lisp, and reserved to implementors. $ and % are <span><i>alphabetic</i></span><sub>2</sub> <span><i>characters</i></span>, but are not used in the names of any standard Common Lisp <span><i>defined names</i></span>.</p>
<p><span><i>Whitespace</i></span><sub>2</sub> characters serve as separators but are otherwise ignored. <span><i>Constituent</i></span> and <em>escape characters</em> are accumulated to make a <span><i>token</i></span>, which is then interpreted as a <span><i>number</i></span> or <span><i>symbol</i></span>. <span><i>Macro characters</i></span> trigger the invocation of <span><i>functions</i></span> (possibly user-supplied) that can perform arbitrary parsing actions. <span><i>Macro characters</i></span> are divided into two kinds, <span><i>terminating</i></span> and <em>non</em></p>
<p><span><i>terminating</i></span>, depending on whether or not they terminate a <span><i>token</i></span>. The following are descriptions of each kind of <span><i>syntax type</i></span>.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="2141-constituent-characters">2.1.4.1 Constituent Characters<a href="c-b-character-syntax.html#2141-constituent-characters" class="hash-link" aria-label="Direct link to 2.1.4.1 Constituent Characters" title="Direct link to 2.1.4.1 Constituent Characters"></a></h3>
<!-- -->
<p><em>Constituent characters</em> are used in <span><i>tokens</i></span>. A <span><i>token</i></span> is a representation of a <span><i>number</i></span> or a <span><i>symbol</i></span>. Examples of <em>constituent characters</em> are letters and digits.</p>
<p>Letters in symbol names are sometimes converted to letters in the opposite <span><i>case</i></span> when the name is read; see Section 23.1.2 (Effect of Readtable Case on the Lisp Reader). <span><i>Case</i></span> conversion can be suppressed by the use of <span><i>single escape</i></span> or <span><i>multiple escape</i></span> characters.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="2142-constituent-traits">2.1.4.2 Constituent Traits<a href="c-b-character-syntax.html#2142-constituent-traits" class="hash-link" aria-label="Direct link to 2.1.4.2 Constituent Traits" title="Direct link to 2.1.4.2 Constituent Traits"></a></h3>
<!-- -->
<p>Every <span><i>character</i></span> has one or more <span><i>constituent traits</i></span> that define how the <span><i>character</i></span> is to be interpreted by the <em>Lisp reader</em> when the <span><i>character</i></span> is a <em>constituent character</em> . These <span><i>constituent traits</i></span> are <span><i>alphabetic</i></span><sub>2</sub>, digit, <span><i>package marker</i></span> , plus sign, minus sign, dot, decimal point, <span><i>ratio marker</i></span> , <span><i>exponent marker</i></span> , and <span><i>invalid</i></span>. Figure 28 shows the <span><i>constituent traits</i></span> of the <span><i>standard characters</i></span> and of certain <em>semi-standard characters</em>; no mechanism is provided for changing the <span><i>constituent trait</i></span> of a <span><i>character</i></span> . Any <span><i>character</i></span> with the alphadigit <span><i>constituent trait</i></span> in that figure is a digit if the <span><i>current input base</i></span> is greater than that characters digit value, otherwise the <span><i>character</i></span> is <span><i>alphabetic</i></span><sub>2</sub>. Any <span><i>character</i></span> quoted by a <span><i>single escape</i></span> is treated as an <span><i>alphabetic</i></span><sub>2</sub> constituent, regardless of its normal syntax.</p>
<p>|</p><p><strong>constituent traits constituent traits</strong> </p><p><strong>character character</strong></p>|<p></p>
<p>| :- |</p>
<p>|</p><p>Backspace <span><i>invalid</i></span> { <span><i>alphabetic</i></span><sub>2</sub> </p><p>Tab <span><i>invalid</i></span>* } <span><i>alphabetic</i></span><sub>2</sub> </p><p>Newline <span><i>invalid</i></span>* + <span><i>alphabetic</i></span><sub>2</sub>, plus sign Linefeed <span><i>invalid</i></span>* - <span><i>alphabetic</i></span><sub>2</sub>, minus sign Page <span><i>invalid</i></span>* . <span><i>alphabetic</i></span><sub>2</sub>, dot, decimal point Return <span><i>invalid</i></span>* / <span><i>alphabetic</i></span><sub>2</sub>, <span><i>ratio marker</i></span> Space <span><i>invalid</i></span>* A, a alphadigit </p><p>! <span><i>alphabetic</i></span><sub>2</sub> B, b alphadigit </p><p>&quot; <span><i>alphabetic</i></span><sub>2</sub>* C, c alphadigit </p><p># <span><i>alphabetic</i></span><sub>2</sub>* D, d alphadigit, double-float <span><i>exponent marker</i></span> $ <span><i>alphabetic</i></span><sub>2</sub> E, e alphadigit, float <span><i>exponent marker</i></span> % <span><i>alphabetic</i></span><sub>2</sub> F, f alphadigit, single-float <span><i>exponent marker</i></span> &amp; <span><i>alphabetic</i></span><sub>2</sub> G, g alphadigit </p><p> <span><i>alphabetic</i></span><sub>2</sub>* H, h alphadigit </p><p>( <span><i>alphabetic</i></span><sub>2</sub>* I, i alphadigit </p><p>) <span><i>alphabetic</i></span><sub>2</sub>* J, j alphadigit </p><p>* <span><i>alphabetic</i></span><sub>2</sub> K, k alphadigit </p><p>, <span><i>alphabetic</i></span><sub>2</sub>* L, l alphadigit, long-float <span><i>exponent marker</i></span> 0-9 alphadigit M, m alphadigit </p><p>: <span><i>package marker</i></span> N, n alphadigit </p><p>; <span><i>alphabetic</i></span><sub>2</sub>* O, o alphadigit </p><p>&lt; <span><i>alphabetic</i></span><sub>2</sub> P, p alphadigit </p><p>= <span><i>alphabetic</i></span><sub>2</sub> Q, q alphadigit </p><p>&gt; <span><i>alphabetic</i></span><sub>2</sub> R, r alphadigit </p><p>? <span><i>alphabetic</i></span><sub>2</sub> S, s alphadigit, short-float <span><i>exponent marker</i></span> @ <span><i>alphabetic</i></span><sub>2</sub> T, t alphadigit </p><p>[ <span><i>alphabetic</i></span><sub>2</sub> U, u alphadigit </p><p>\ <span><i>alphabetic</i></span><sub>2</sub>* V, v alphadigit </p><p>] <span><i>alphabetic</i></span><sub>2</sub> W, w alphadigit </p><p><i><sup></sup> alphabetic</i><sub>2</sub> X, x alphadigit </p><p><span><i>alphabetic</i></span><sub>2</sub> Y, y alphadigit </p><p> <span><i>alphabetic</i></span><sub>2</sub>* Z, z alphadigit </p><p>| <span><i>alphabetic</i></span><sub>2</sub>* Rubout <span><i>invalid</i></span> </p><p>~ <span><i>alphabetic</i></span><sub>2</sub></p>|<p></p>
<p><strong>Figure 28. Constituent Traits of Standard Characters and Semi-Standard Characters</strong></p>
<p>The interpretations in this table apply only to <span><i>characters</i></span> whose <span><i>syntax type</i></span> is <span><i>constituent</i></span>. Entries marked with an asterisk (*) are normally <em>shadowed</em> <sub>2</sub> because the indicated <span><i>characters</i></span> are of <em>syntax type whitespace</em><sub>2</sub>, <span><i>macro character</i></span> , <span><i>single escape</i></span>, or <span><i>multiple escape</i></span>; these <span><i>constituent traits</i></span> apply to them only if their <span><i>syntax types</i></span> are changed to <span><i>constituent</i></span>.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="2143-invalid-characters">2.1.4.3 Invalid Characters<a href="c-b-character-syntax.html#2143-invalid-characters" class="hash-link" aria-label="Direct link to 2.1.4.3 Invalid Characters" title="Direct link to 2.1.4.3 Invalid Characters"></a></h3>
<!-- -->
<p><span><i>Characters</i></span> with the <em>constituent trait invalid</em> cannot ever appear in a <span><i>token</i></span> except under the control of a <em>single escape character</em> . If an <em>invalid character</em> is encountered while an <span><i>object</i></span> is being read, an error of <span><i>type</i></span> <span><b>reader-error</b></span> is signaled. If an <em>invalid character</em> is preceded by a <em>single escape character</em> , it is treated as an <span><i>alphabetic</i></span><sub>2</sub> <span><i>constituent</i></span> instead.</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="2144-macro-characters">2.1.4.4 Macro Characters<a href="c-b-character-syntax.html#2144-macro-characters" class="hash-link" aria-label="Direct link to 2.1.4.4 Macro Characters" title="Direct link to 2.1.4.4 Macro Characters"></a></h3>
<!-- -->
<p>When the <em>Lisp reader</em> encounters a <span><i>macro character</i></span> on an <em>input stream</em>, special parsing of subsequent <span><i>characters</i></span> on the <em>input stream</em> is performed.</p>
<p>A <span><i>macro character</i></span> has an associated <span><i>function</i></span> called a <span><i>reader macro function</i></span> that implements its specialized parsing behavior. An association of this kind can be established or modified under control of a <span><i>conforming program</i></span> by using the <span><i>functions</i></span> <span><b>set-macro-character</b></span> and <strong>set-dispatch-macro-character</strong>.</p>
<p>Upon encountering a <span><i>macro character</i></span> , the <em>Lisp reader</em> calls its <span><i>reader macro function</i></span>, which parses one specially formatted object from the <em>input stream</em>. The <span><i>function</i></span> either returns the parsed <span><i>object</i></span>, or else it returns no <span><i>values</i></span> to indicate that the characters scanned by the <span><i>function</i></span> are being ignored (<em>e.g.</em>, in the case of a comment). Examples of <span><i>macro characters</i></span> are <span><i>backquote</i></span>, <span><i>single-quote</i></span>, <span><i>left-parenthesis</i></span>, and <span><i>right-parenthesis</i></span>.</p>
<p>A <span><i>macro character</i></span> is either <span><i>terminating</i></span> or <span><i>non-terminating</i></span>. The difference between <span><i>terminating</i></span> and <em>non-terminating macro characters</em> lies in what happens when such characters occur in the middle of a <span><i>token</i></span>. If a <em>non-terminating macro character</em> occurs in the middle of a <span><i>token</i></span>, the <span><i>function</i></span> associated with the <em>non-terminating macro character</em> is not called, and the <em>non terminating macro character</em> does not terminate the <span><i>token</i></span>s name; it becomes part of the name as if the <span><i>macro character</i></span> were really a constituent character. A <em>terminating macro character</em> terminates any <span><i>token</i></span>, and its associated <span><i>reader macro function</i></span> is called no matter where the <span><i>character</i></span> appears. The only <em>non-terminating macro character</em> in <span><i>standard syntax</i></span> is <span><i>sharpsign</i></span>.</p>
<p>If a <span><i>character</i></span> is a <em>dispatching macro character C</em><sub>1</sub>, its <span><i>reader macro function</i></span> is a <span><i>function</i></span> supplied by the <span><i>implementation</i></span>. This <span><i>function</i></span> reads decimal <em>digit characters</em> until a non-<em>digit C</em><sub>2</sub> is read. If any <span><i>digits</i></span> were read, they are converted into a corresponding <em>integer</em> infix parameter <em>P</em>; otherwise, the infix parameter <em>P</em> is <span><b>nil</b></span>. The terminating non-<em>digit C</em><sub>2</sub> is a <span><i>character</i></span> (sometimes called a “sub-character” to emphasize its subordinate role in the dispatching) that is looked up in the dispatch table associated with the <em>dispatching macro character C</em><sub>1</sub>. The <span><i>reader macro function</i></span> associated with the sub-character <em>C</em><sub>2</sub> is invoked with three arguments: the <span><i>stream</i></span>, the sub-character <em>C</em><sub>2</sub>, and the infix parameter <em>P</em>. For more information about dispatch characters, see the <span><i>function</i></span> <strong>set-dispatch-macro-character</strong>.</p>
<p>For information about the <span><i>macro characters</i></span> that are available in <span><i>standard syntax</i></span> , see Section 2.4 (Standard Macro Characters).</p>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="2145-multiple-escape-characters">2.1.4.5 Multiple Escape Characters<a href="c-b-character-syntax.html#2145-multiple-escape-characters" class="hash-link" aria-label="Direct link to 2.1.4.5 Multiple Escape Characters" title="Direct link to 2.1.4.5 Multiple Escape Characters"></a></h3>
<!-- -->
<p>A pair of <em>multiple escape characters</em> is used to indicate that an enclosed sequence of characters, including possible <span><i>macro characters</i></span> and <span><i>whitespace</i></span><sub>2</sub> <span><i>characters</i></span>, are to be treated as <span><i>alphabetic</i></span><sub>2</sub> <span><i>characters</i></span> with <span><i>case</i></span> preserved. Any <span><i>single escape</i></span> and <em>multiple escape characters</em> that are to appear in the sequence must be preceded by a <em>single escape character</em> .</p>
<p><span><i>Vertical-bar</i></span> is a <em>multiple escape character</em> in <span><i>standard syntax</i></span> .</p>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="21451-examples-of-multiple-escape-characters">2.1.4.5.1 Examples of Multiple Escape Characters<a href="c-b-character-syntax.html#21451-examples-of-multiple-escape-characters" class="hash-link" aria-label="Direct link to 2.1.4.5.1 Examples of Multiple Escape Characters" title="Direct link to 2.1.4.5.1 Examples of Multiple Escape Characters"></a></h4>
<!-- -->
<div class="language-lisp codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-lisp codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token comment" style="color:#999988;font-style:italic">;; The following examples assume the readtable case of \*readtable\* </span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#999988;font-style:italic">;; and \*print-case\* are both :upcase. </span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">(</span><span class="token car">eq</span><span class="token plain"> abc ABC</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> → true </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">(</span><span class="token car">eq</span><span class="token plain"> abc |ABC|</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> → true </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">(</span><span class="token car">eq</span><span class="token plain"> abc a|B|c</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> → true </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">(</span><span class="token car">eq</span><span class="token plain"> abc |abc|</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> → false </span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="2146-single-escape-character">2.1.4.6 Single Escape Character<a href="c-b-character-syntax.html#2146-single-escape-character" class="hash-link" aria-label="Direct link to 2.1.4.6 Single Escape Character" title="Direct link to 2.1.4.6 Single Escape Character"></a></h3>
<!-- -->
<p>A <span><i>single escape</i></span> is used to indicate that the next <span><i>character</i></span> is to be treated as an <span><i>alphabetic</i></span><sub>2</sub> <span><i>character</i></span> with its <span><i>case</i></span> preserved, no matter what the <span><i>character</i></span> is or which <span><i>constituent traits</i></span> it has.</p>
<p><span><i>Backslash</i></span> is a <em>single escape character</em> in <span><i>standard syntax</i></span> .</p>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="21461-examples-of-single-escape-characters">2.1.4.6.1 Examples of Single Escape Characters<a href="c-b-character-syntax.html#21461-examples-of-single-escape-characters" class="hash-link" aria-label="Direct link to 2.1.4.6.1 Examples of Single Escape Characters" title="Direct link to 2.1.4.6.1 Examples of Single Escape Characters"></a></h4>
<!-- -->
<div class="language-lisp codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-lisp codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token comment" style="color:#999988;font-style:italic">;; The following examples assume the readtable case of \*readtable\* </span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token comment" style="color:#999988;font-style:italic">;; and \*print-case\* are both :upcase. </span><span class="token plain"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">(</span><span class="token car">eq</span><span class="token plain"> abc \A\B\C</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> → true </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">(</span><span class="token car">eq</span><span class="token plain"> abc a\Bc</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> → true </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">(</span><span class="token car">eq</span><span class="token plain"> abc \ABC</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> → true </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">(</span><span class="token car">eq</span><span class="token plain"> abc \abc</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"> → false </span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<h3 class="anchor anchorWithStickyNavbar_LWe7" id="2147-whitespace-characters">2.1.4.7 Whitespace Characters<a href="c-b-character-syntax.html#2147-whitespace-characters" class="hash-link" aria-label="Direct link to 2.1.4.7 Whitespace Characters" title="Direct link to 2.1.4.7 Whitespace Characters"></a></h3>
<!-- -->
<p><span><i>Whitespace</i></span><sub>2</sub> <span><i>characters</i></span> are used to separate <span><i>tokens</i></span>.</p>
<p><span><i>Space</i></span> and <span><i>newline</i></span> are <span><i>whitespace</i></span><sub>2</sub> <span><i>characters</i></span> in <span><i>standard syntax</i></span> .</p>
<h4 class="anchor anchorWithStickyNavbar_LWe7" id="21471-examples-of-whitespace-characters">2.1.4.7.1 Examples of Whitespace Characters<a href="c-b-character-syntax.html#21471-examples-of-whitespace-characters" class="hash-link" aria-label="Direct link to 2.1.4.7.1 Examples of Whitespace Characters" title="Direct link to 2.1.4.7.1 Examples of Whitespace Characters"></a></h4>
<!-- -->
<!-- -->
<div class="language-lisp codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-lisp codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token punctuation" style="color:#393A34">(</span><span class="token car">length</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">(</span><span class="token car">this-that</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><span class="token number" style="color:#36acaa">1</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">(</span><span class="token car">length</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">(</span><span class="token car">this</span><span class="token plain"> - that</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><span class="token number" style="color:#36acaa">3</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">(</span><span class="token car">length</span><span class="token plain"> </span><span class="token punctuation" style="color:#393A34">(</span><span class="token car">a</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> b</span><span class="token punctuation" style="color:#393A34">)</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><span class="token number" style="color:#36acaa">2</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">(</span><span class="token car">+</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">34</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><span class="token number" style="color:#36acaa">34</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"></span><span class="token punctuation" style="color:#393A34">(</span><span class="token car">+</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">3</span><span class="token plain"> </span><span class="token number" style="color:#36acaa">4</span><span class="token punctuation" style="color:#393A34">)</span><span class="token plain"></span><span class="token number" style="color:#36acaa">7</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/lisp-docs/cl-language-reference/tree/main/docs/chap-2/c-b-character-syntax.md" target="_blank" rel="noopener noreferrer" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_vwxv"><span class="theme-last-updated">Last updated<!-- --> by <b>daninus14</b></span></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="../chap-1/b-j-symbols-in-the-commonlisp-package.html"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">1.9 Symbols in the COMMON</div></a><a class="pagination-nav__link pagination-nav__link--next" href="c-c-reader-algorithm.html"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">2.2 Reader Algorithm</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="c-b-character-syntax.html#211-readtables" class="table-of-contents__link toc-highlight">2.1.1 Readtables</a><ul><li><a href="c-b-character-syntax.html#2111-the-current-readtable" class="table-of-contents__link toc-highlight">2.1.1.1 The Current Readtable</a></li><li><a href="c-b-character-syntax.html#2112-the-standard-readtable" class="table-of-contents__link toc-highlight">2.1.1.2 The Standard Readtable</a></li><li><a href="c-b-character-syntax.html#2113-the-initial-readtable" class="table-of-contents__link toc-highlight">2.1.1.3 The Initial Readtable</a></li></ul></li><li><a href="c-b-character-syntax.html#212-variables-that-affect-the-lisp-reader" class="table-of-contents__link toc-highlight">2.1.2 Variables that affect the Lisp Reader</a></li><li><a href="c-b-character-syntax.html#213-standard-characters" class="table-of-contents__link toc-highlight">2.1.3 Standard Characters</a></li><li><a href="c-b-character-syntax.html#214-character-syntax-types" class="table-of-contents__link toc-highlight">2.1.4 Character Syntax Types</a><ul><li><a href="c-b-character-syntax.html#2141-constituent-characters" class="table-of-contents__link toc-highlight">2.1.4.1 Constituent Characters</a></li><li><a href="c-b-character-syntax.html#2142-constituent-traits" class="table-of-contents__link toc-highlight">2.1.4.2 Constituent Traits</a></li><li><a href="c-b-character-syntax.html#2143-invalid-characters" class="table-of-contents__link toc-highlight">2.1.4.3 Invalid Characters</a></li><li><a href="c-b-character-syntax.html#2144-macro-characters" class="table-of-contents__link toc-highlight">2.1.4.4 Macro Characters</a></li><li><a href="c-b-character-syntax.html#2145-multiple-escape-characters" class="table-of-contents__link toc-highlight">2.1.4.5 Multiple Escape Characters</a><ul><li><a href="c-b-character-syntax.html#21451-examples-of-multiple-escape-characters" class="table-of-contents__link toc-highlight">2.1.4.5.1 Examples of Multiple Escape Characters</a></li></ul></li><li><a href="c-b-character-syntax.html#2146-single-escape-character" class="table-of-contents__link toc-highlight">2.1.4.6 Single Escape Character</a><ul><li><a href="c-b-character-syntax.html#21461-examples-of-single-escape-characters" class="table-of-contents__link toc-highlight">2.1.4.6.1 Examples of Single Escape Characters</a></li></ul></li><li><a href="c-b-character-syntax.html#2147-whitespace-characters" class="table-of-contents__link toc-highlight">2.1.4.7 Whitespace Characters</a><ul><li><a href="c-b-character-syntax.html#21471-examples-of-whitespace-characters" class="table-of-contents__link toc-highlight">2.1.4.7.1 Examples of Whitespace Characters</a></li></ul></li></ul></li></ul></div></div></div></div></main></div></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a href="../../docs/tutorial.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Common Lisp Tutorial</a></li><li class="footer__item"><a href="../index.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Common Lisp Technical Reference</a></li><li class="footer__item"><a href="../../docs/help.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Help</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://stackoverflow.com/questions/tagged/common-lisp" target="_blank" rel="noopener noreferrer" class="footer__link-item">Stack Overflow<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://discord.gg/hhk46CE" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://www.reddit.com/r/common_lisp" target="_blank" rel="noopener noreferrer" class="footer__link-item">Reddit<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://irclog.tymoon.eu/libera/commonlisp" target="_blank" rel="noopener noreferrer" class="footer__link-item">IRC<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="col footer__col"><div class="footer__title">More</div><ul class="footer__items clean-list"><li class="footer__item"><a href="../../blog.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Blog</a></li><li class="footer__item"><a href="https://github.com/lisp-docs/lisp-docs.github.io" target="_blank" rel="noopener noreferrer" class="footer__link-item">Tutorial and General Content GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://github.com/lisp-docs/cl-language-reference/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Technical Reference GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="../../docs/contribute.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Contribute to the Docs</a></li></ul></div><div class="col footer__col"><div class="footer__title">Common Lisp Docs</div><ul class="footer__items clean-list"><li class="footer__item"><a href="../../docs/about.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">About</a></li><li class="footer__item"><a href="../../docs/whylisp.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Why Lisp</a></li><li class="footer__item"><a href="../../docs/getting-started.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Getting Started</a></li><li class="footer__item"><a href="../../docs/faq.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">FAQ</a></li><li class="footer__item"><a href="../../docs/help.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">Getting Help</a></li><li class="footer__item"><a href="../../docs/howto.html" target="_blank" rel="noopener noreferrer" class="footer__link-item">How To Guides</a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 Common Lisp Docs, MIT License (see GitHub Repo).</div></div></div></footer></div>
</body>
</html>