Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision a4a7127dadf79ebf0deacf49f70ed9e588c40596 authored by yaroslav-o on 25 September 2019, 12:44:54 UTC, committed by Eli Bendersky on 25 September 2019, 12:44:54 UTC
Recognize integer multicharacter constants like 'ABCD' (#350)
Recognize integer multicharacter constants like 'ABCD'

The feature I am adding is defined here - 5th case.
https://en.cppreference.com/w/c/language/character_constant
Also here: 6.4.4.4.10 of C99.

Put simply, pycparser thought a statement like this is an error:
int a = 'ABCD';
However it is not.

It is likely possible to just modify char_const regular expression in c_lexer.py:240 to allow longer characters, but the way it is done in this PR - multicharacter constants are clearly separated. I am also limiting the length of multicharacter const integers to 4 characters - this matches VS compiler behavior (gcc allows any length with a warning) and lets pycparser NOT consider lengthy single-quoted strings as integers - these would be nonsensical anyway.
1 parent 62ee4ba
  • Files
  • Changes
  • 5f2c3d9
  • /
History
Cook and download a directory from the Software Heritage Vault

You have requested the cooking of the directory with identifier swh:1:dir:5f2c3d980c653b644f3f357b63a896a91d597847 into a standard tar.gz archive.

Are you sure you want to continue ?

Download a directory from the Software Heritage Vault

You have requested the download of the directory with identifier swh:1:dir:5f2c3d980c653b644f3f357b63a896a91d597847 as a standard tar.gz archive.

Are you sure you want to continue ?

Cook and download a revision from the Software Heritage Vault

You have requested the cooking of the history heading to revision with identifier swh:1:rev:a4a7127dadf79ebf0deacf49f70ed9e588c40596 into a bare git archive.

Are you sure you want to continue ?

Download a revision from the Software Heritage Vault

You have requested the download of the history heading to revision with identifier swh:1:rev:a4a7127dadf79ebf0deacf49f70ed9e588c40596 as a bare git archive.

Are you sure you want to continue ?

Invalid Email !

The provided email is not well-formed.

Download link has expired

The requested archive is no longer available for download from the Software Heritage Vault.

Do you want to cook it again ?

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
revision badge
swh:1:rev:a4a7127dadf79ebf0deacf49f70ed9e588c40596
directory badge Iframe embedding
swh:1:dir:5f2c3d980c653b644f3f357b63a896a91d597847
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
FileModeSize
examples
pycparser
tests
utils
.gitattributes -rw-r--r--32 bytes
.gitignore -rw-r--r--144 bytes
.travis.yml -rw-r--r--286 bytes
.vimrc -rw-r--r--274 bytes
CHANGES -rw-r--r--9.9 KB
CONTRIBUTORS -rw-r--r--598 bytes
LICENSE -rw-r--r--1.5 KB
MANIFEST.in -rw-r--r--335 bytes
README.rst -rw-r--r--8.7 KB
TODO.txt -rw-r--r--1.4 KB
_clean_tables.py -rw-r--r--871 bytes
appveyor.yml -rw-r--r--213 bytes
setup.cfg -rw-r--r--63 bytes
setup.py -rw-r--r--2.3 KB
tox.ini -rw-r--r--88 bytes

The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

README.rst

swh spinner

Loading README.rst ...

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top