jbcc 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
jbcc-0.1.0/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.pyc
2
+ .pytest_cache/
3
+ .testmondata
4
+ .testmondata-*
5
+ /dist/
jbcc-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alexander Demin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
jbcc-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,39 @@
1
+ Metadata-Version: 2.5
2
+ Name: jbcc
3
+ Version: 0.1.0
4
+ Summary: An experimental jBC/jBASE to C compiler
5
+ Project-URL: Homepage, https://github.com/jbc-lang/jbcc
6
+ Project-URL: Documentation, https://jbc-lang.org/
7
+ Project-URL: Issues, https://github.com/jbc-lang/jbcc/issues
8
+ License-Expression: MIT AND Unicode-3.0
9
+ License-File: LICENSE
10
+ License-File: THIRD-PARTY-NOTICES.md
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Software Development :: Compilers
16
+ Requires-Python: >=3.8
17
+ Description-Content-Type: text/markdown
18
+
19
+ # jbcc
20
+
21
+ jbcc is an experimental compiler for jBC, the MultiValue BASIC dialect used
22
+ in jBASE and Temenos T24. It translates jBC to standalone C99.
23
+
24
+ ```sh
25
+ printf '%s\n' 'CRT "Hello, jBC!"' > hello.b
26
+ uvx jbcc hello.b -o hello.c
27
+ uvx jbcc --run hello.b
28
+ ```
29
+
30
+ Native builds with `--exe` or `--run` need a C99 compiler on PATH. jbcc uses
31
+ `cc` by default. Set `CC` and `CC_FLAGS` to override the compiler and flags.
32
+
33
+ The parser has been tested against T24 R07 and R10 sources. Parts of the
34
+ jBASE runtime are still to be implemented.
35
+
36
+ - [Compiler source and examples](https://github.com/jbc-lang/jbcc)
37
+ - [jBC language guide](https://jbc-lang.org/)
38
+ - [MIT license for the original code](https://github.com/jbc-lang/jbcc/blob/main/LICENSE)
39
+ - [Unicode notice for the CP037 tables](https://github.com/jbc-lang/jbcc/blob/main/THIRD-PARTY-NOTICES.md)
@@ -0,0 +1,21 @@
1
+ # jbcc
2
+
3
+ jbcc is an experimental compiler for jBC, the MultiValue BASIC dialect used
4
+ in jBASE and Temenos T24. It translates jBC to standalone C99.
5
+
6
+ ```sh
7
+ printf '%s\n' 'CRT "Hello, jBC!"' > hello.b
8
+ uvx jbcc hello.b -o hello.c
9
+ uvx jbcc --run hello.b
10
+ ```
11
+
12
+ Native builds with `--exe` or `--run` need a C99 compiler on PATH. jbcc uses
13
+ `cc` by default. Set `CC` and `CC_FLAGS` to override the compiler and flags.
14
+
15
+ The parser has been tested against T24 R07 and R10 sources. Parts of the
16
+ jBASE runtime are still to be implemented.
17
+
18
+ - [Compiler source and examples](https://github.com/jbc-lang/jbcc)
19
+ - [jBC language guide](https://jbc-lang.org/)
20
+ - [MIT license for the original code](https://github.com/jbc-lang/jbcc/blob/main/LICENSE)
21
+ - [Unicode notice for the CP037 tables](https://github.com/jbc-lang/jbcc/blob/main/THIRD-PARTY-NOTICES.md)
@@ -0,0 +1,50 @@
1
+ # Third-party notices
2
+
3
+ ## IBM CP037 mapping
4
+
5
+ The CP037 conversion tables in [src/jbcc/jbc.c](src/jbcc/jbc.c) contain
6
+ the CP037-to-ISO-8859-1 mapping and its inverse. They are derived from the
7
+ [CP037 mapping published by the Unicode Consortium](https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/EBCDIC/CP037.TXT)
8
+ and distributed under the [Unicode License v3](https://www.unicode.org/license.txt).
9
+
10
+ ```text
11
+ UNICODE LICENSE V3
12
+
13
+ COPYRIGHT AND PERMISSION NOTICE
14
+
15
+ Copyright © 1991-2026 Unicode, Inc.
16
+
17
+ NOTICE TO USER: Carefully read the following legal agreement. BY
18
+ DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
19
+ SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
20
+ TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
21
+ DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
22
+
23
+ Permission is hereby granted, free of charge, to any person obtaining a
24
+ copy of data files and any associated documentation (the "Data Files") or
25
+ software and any associated documentation (the "Software") to deal in the
26
+ Data Files or Software without restriction, including without limitation
27
+ the rights to use, copy, modify, merge, publish, distribute, and/or sell
28
+ copies of the Data Files or Software, and to permit persons to whom the
29
+ Data Files or Software are furnished to do so, provided that either (a)
30
+ this copyright and permission notice appear with all copies of the Data
31
+ Files or Software, or (b) this copyright and permission notice appear in
32
+ associated Documentation.
33
+
34
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
35
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
37
+ THIRD PARTY RIGHTS.
38
+
39
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
40
+ BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
41
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
44
+ FILES OR SOFTWARE.
45
+
46
+ Except as contained in this notice, the name of a copyright holder shall
47
+ not be used in advertising or otherwise to promote the sale, use or other
48
+ dealings in these Data Files or Software without prior written
49
+ authorization of the copyright holder.
50
+ ```
jbcc-0.1.0/jbcc ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env python3
2
+ """Run jbcc from a source checkout."""
3
+
4
+ import sys
5
+ from pathlib import Path
6
+
7
+ sys.path.insert(0, str(Path(__file__).resolve().parent / 'src'))
8
+
9
+ from jbcc.compiler import main # noqa: E402
10
+
11
+ if __name__ == '__main__':
12
+ sys.exit(main())
@@ -0,0 +1,48 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.27"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "jbcc"
7
+ version = "0.1.0"
8
+ description = "An experimental jBC/jBASE to C compiler"
9
+ readme = "README-PYPI.md"
10
+ requires-python = ">=3.8"
11
+ license = "MIT AND Unicode-3.0"
12
+ license-files = ["LICENSE", "THIRD-PARTY-NOTICES.md"]
13
+ dependencies = []
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Operating System :: MacOS",
17
+ "Operating System :: POSIX :: Linux",
18
+ "Programming Language :: Python :: 3",
19
+ "Topic :: Software Development :: Compilers",
20
+ ]
21
+
22
+ [project.urls]
23
+ Homepage = "https://github.com/jbc-lang/jbcc"
24
+ Documentation = "https://jbc-lang.org/"
25
+ Issues = "https://github.com/jbc-lang/jbcc/issues"
26
+
27
+ [project.scripts]
28
+ jbcc = "jbcc.compiler:main"
29
+
30
+ [tool.hatch.build.targets.wheel]
31
+ packages = ["src/jbcc"]
32
+
33
+ [tool.hatch.build.targets.sdist]
34
+ only-include = [
35
+ "src/jbcc",
36
+ "jbcc",
37
+ "pyproject.toml",
38
+ "README-PYPI.md",
39
+ "LICENSE",
40
+ "THIRD-PARTY-NOTICES.md",
41
+ ]
42
+
43
+ [tool.ruff]
44
+ line-length = 80
45
+ target-version = "py38"
46
+
47
+ [tool.ruff.format]
48
+ quote-style = "preserve"
@@ -0,0 +1 @@
1
+ """The jbcc compiler package."""