Citron is an LALR parser generator for Swift. For a given input grammar, Citron creates a reentrant type-safe parser in Swift.
Citron's parser generation engine is based on Lemon.
Citron requires Swift 4.
The Citron documentation can be found here.
{
"name": "citron",
"path": "/usr/src/package",
"targets": [
{
"name": "functype_ec",
"path": "examples/functype_ec",
"type": "executable",
"c99name": "functype_ec",
"sources": [
"ErrorReporter.swift",
"main.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"functype_ec"
],
"target_dependencies": [
"CitronParserModule",
"CitronLexerModule",
"CitronParserGenerator"
]
},
{
"name": "functype",
"path": "examples/functype",
"type": "executable",
"c99name": "functype",
"sources": [
"main.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"functype"
],
"target_dependencies": [
"CitronParserModule",
"CitronLexerModule",
"CitronParserGenerator"
]
},
{
"name": "expr_ec",
"path": "examples/expr_ec",
"type": "executable",
"c99name": "expr_ec",
"sources": [
"main.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"expr_ec"
],
"target_dependencies": [
"CitronParserModule",
"CitronLexerModule",
"CitronParserGenerator"
]
},
{
"name": "expr",
"path": "examples/expr",
"type": "executable",
"c99name": "expr",
"sources": [
"main.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"expr"
],
"target_dependencies": [
"CitronParserModule",
"CitronLexerModule",
"CitronParserGenerator"
]
},
{
"name": "citron",
"path": "Sources/citron",
"type": "executable",
"c99name": "citron",
"sources": [
"main.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"citron",
"CitronParserGenerator",
"functype_ec",
"functype",
"expr_ec",
"expr"
],
"target_dependencies": [
"CitronCLibrary"
]
},
{
"name": "CitronTests",
"path": "Tests/CitronTests",
"type": "test",
"c99name": "CitronTests",
"sources": [
"CitronTests.swift"
],
"module_type": "SwiftTarget",
"target_dependencies": [
"expr",
"expr_ec",
"functype",
"functype_ec"
]
},
{
"name": "CitronParserModule",
"path": "Sources/CitronParserModule",
"type": "library",
"c99name": "CitronParserModule",
"sources": [
"CitronParser.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"CitronParserModule",
"functype_ec",
"functype",
"expr_ec",
"expr"
]
},
{
"name": "CitronParserGenerator",
"path": "Plugins/CitronParserGenerator",
"type": "plugin",
"c99name": "CitronParserGenerator",
"sources": [
"CitronParserGenerator.swift",
"SPMBuildToolSupport.swift"
],
"module_type": "PluginTarget",
"plugin_capability": {
"type": "buildTool"
},
"product_memberships": [
"CitronParserGenerator",
"functype_ec",
"functype",
"expr_ec",
"expr"
],
"target_dependencies": [
"citron"
]
},
{
"name": "CitronLexerModule",
"path": "Sources/CitronLexerModule",
"type": "library",
"c99name": "CitronLexerModule",
"sources": [
"CitronLexer.swift",
"Scanner.swift",
"SourceRegion.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"CitronLexerModule",
"functype_ec",
"functype",
"expr_ec",
"expr"
]
},
{
"name": "CitronCLibrary",
"path": "Sources/CitronCLibrary",
"type": "library",
"c99name": "CitronCLibrary",
"sources": [
"main_.c"
],
"module_type": "ClangTarget",
"product_memberships": [
"citron",
"CitronParserGenerator",
"functype_ec",
"functype",
"expr_ec",
"expr"
]
}
],
"products": [
{
"name": "citron",
"type": {
"executable": null
},
"targets": [
"citron"
]
},
{
"name": "CitronParserModule",
"type": {
"library": [
"automatic"
]
},
"targets": [
"CitronParserModule"
]
},
{
"name": "CitronLexerModule",
"type": {
"library": [
"automatic"
]
},
"targets": [
"CitronLexerModule"
]
},
{
"name": "CitronParserGenerator",
"type": {
"plugin": null
},
"targets": [
"CitronParserGenerator"
]
},
{
"name": "functype_ec",
"type": {
"executable": null
},
"targets": [
"functype_ec"
]
},
{
"name": "functype",
"type": {
"executable": null
},
"targets": [
"functype"
]
},
{
"name": "expr_ec",
"type": {
"executable": null
},
"targets": [
"expr_ec"
]
},
{
"name": "expr",
"type": {
"executable": null
},
"targets": [
"expr"
]
}
],
"platforms": [],
"dependencies": [],
"tools_version": "5.6",
"manifest_display_name": "citron"
}
{
"name": "citron",
"traits": [],
"targets": [
{
"name": "citron",
"type": "executable",
"exclude": [],
"settings": [],
"resources": [],
"dependencies": [
{
"byName": [
"CitronCLibrary",
null
]
}
],
"packageAccess": false
},
{
"name": "CitronParserModule",
"type": "regular",
"exclude": [
"LICENSE.txt"
],
"settings": [],
"resources": [],
"dependencies": [],
"packageAccess": false
},
{
"name": "CitronLexerModule",
"type": "regular",
"exclude": [
"LICENSE.txt"
],
"settings": [],
"resources": [],
"dependencies": [],
"packageAccess": false
},
{
"name": "CitronCLibrary",
"type": "regular",
"exclude": [],
"settings": [],
"resources": [],
"dependencies": [],
"packageAccess": false
},
{
"name": "CitronParserGenerator",
"type": "plugin",
"exclude": [],
"settings": [],
"resources": [],
"dependencies": [
{
"byName": [
"citron",
null
]
}
],
"packageAccess": false,
"pluginCapability": {
"buildTool": null
}
},
{
"name": "expr",
"path": "examples/expr",
"type": "executable",
"exclude": [
"README.md",
"Makefile"
],
"settings": [],
"resources": [],
"dependencies": [
{
"byName": [
"CitronParserModule",
null
]
},
{
"byName": [
"CitronLexerModule",
null
]
}
],
"pluginUsages": [
{
"plugin": [
"CitronParserGenerator",
null
]
}
],
"packageAccess": false
},
{
"name": "expr_ec",
"path": "examples/expr_ec",
"type": "executable",
"exclude": [
"README.md",
"Makefile"
],
"settings": [],
"resources": [],
"dependencies": [
{
"byName": [
"CitronParserModule",
null
]
},
{
"byName": [
"CitronLexerModule",
null
]
}
],
"pluginUsages": [
{
"plugin": [
"CitronParserGenerator",
null
]
}
],
"packageAccess": false
},
{
"name": "functype",
"path": "examples/functype",
"type": "executable",
"exclude": [
"README.md",
"Makefile"
],
"settings": [],
"resources": [],
"dependencies": [
{
"byName": [
"CitronParserModule",
null
]
},
{
"byName": [
"CitronLexerModule",
null
]
}
],
"pluginUsages": [
{
"plugin": [
"CitronParserGenerator",
null
]
}
],
"packageAccess": false
},
{
"name": "functype_ec",
"path": "examples/functype_ec",
"type": "executable",
"exclude": [
"README.md",
"Makefile"
],
"settings": [],
"resources": [],
"dependencies": [
{
"byName": [
"CitronParserModule",
null
]
},
{
"byName": [
"CitronLexerModule",
null
]
}
],
"pluginUsages": [
{
"plugin": [
"CitronParserGenerator",
null
]
}
],
"packageAccess": false
},
{
"name": "CitronTests",
"type": "test",
"exclude": [],
"settings": [],
"resources": [],
"dependencies": [
{
"byName": [
"expr",
null
]
},
{
"byName": [
"expr_ec",
null
]
},
{
"byName": [
"functype",
null
]
},
{
"byName": [
"functype_ec",
null
]
}
],
"packageAccess": false
}
],
"products": [
{
"name": "citron",
"type": {
"executable": null
},
"targets": [
"citron"
]
},
{
"name": "CitronParserModule",
"type": {
"library": [
"automatic"
]
},
"targets": [
"CitronParserModule"
]
},
{
"name": "CitronLexerModule",
"type": {
"library": [
"automatic"
]
},
"targets": [
"CitronLexerModule"
]
},
{
"name": "CitronParserGenerator",
"type": {
"plugin": null
},
"targets": [
"CitronParserGenerator"
]
}
],
"pkgConfig": null,
"platforms": [],
"providers": null,
"packageKind": {
"root": [
"/usr/src/package"
]
},
"dependencies": [],
"toolsVersion": {
"_version": "5.6.0"
},
"cLanguageStandard": null,
"cxxLanguageStandard": null,
"swiftLanguageVersions": null
}
{
"url": "/usr/src/package",
"name": "citron",
"path": "/usr/src/package",
"version": "unspecified",
"identity": "package",
"dependencies": []
}