Giter Club home page Giter Club logo

slang's Introduction

slang - SystemVerilog Language Services

codecov License: MIT Join the chat at https://gitter.im/MikePopoloski/slang

slang is a software library that provides various components for lexing, parsing, type checking, and elaborating SystemVerilog code. It comes with an executable tool that can compile and lint any SystemVerilog project, but it is also intended to be usable as a front end for synthesis tools, simulators, linters, code editors, and refactoring tools.

slang is the fastest and most compliant SystemVerilog frontend (according to the open source chipsalliance test suite).

Full documentation is available on the website: https://sv-lang.com

Features

  • Fully parse, analyze, and elaborate all SystemVerilog features - see this page for current status.
  • Be robust about compilation, no matter how broken the source text. This makes the compiler usable in editor highlighting and completion scenarios, where the code is likely to be broken because the user is still writing it.
  • The parse tree should round trip back to the original source, making it easy to write refactoring and code generation tools.
  • Provide great error messages, ala clang.
  • Be fast and robust in the face of production-scale projects.

Use Cases

Some examples of things you can use slang for:

  • Very fast syntax checking and linting tool
  • Dumping the AST of your project to JSON
  • Source code introspection via included Python bindings
  • SystemVerilog code generation and refactoring
  • As the engine for an editor language server
  • As a fast and robust preprocessor that sits in front of downstream tools
  • As a frontend for a synthesis or simulation tool, by including slang as a library

Getting Started

Instructions on building slang from source are here.

The slang binary can be run on your code right out of the box; check out the user manual for more information about how it works.

If you're looking to use slang as a library, please read through the developer guide.

Try It Out

Experiment with parsing, type checking, and error detection live on the web (inspired by Matt Godbolt's excellent Compiler Explorer).

Contact & Support

If you encounter a bug, have questions, or want to contribute, please get in touch by opening a GitHub issue or discussion thread.

Contributions are welcome, whether they be in the form of bug reports, comments, suggestions, documentation improvements, or full fledged new features via pull requests.

License

slang is licensed under the MIT license:

Copyright (c) 2015-2024 Michael Popoloski

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

slang's People

Contributors

mikepopoloski avatar denisrr avatar pre-commit-ci[bot] avatar drsam94 avatar evanbryantmiller avatar hungmingwu avatar thingkingland avatar kuree avatar sustrak avatar tdp2110 avatar udif avatar jameshanlon avatar jrudess avatar tgorochowik avatar likeamahoney avatar pleroux0 avatar vjschneid avatar jesec avatar baranowski avatar nickg avatar suzizecat avatar vowstar avatar cbalint13 avatar oddball avatar zachd-hrt avatar godblesszhouzhou avatar pistoletpierre avatar eggman79 avatar alexeyvoh avatar adream307 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.