Code Monkey home page Code Monkey logo

Comments (9)

bob-carpenter avatar bob-carpenter commented on July 29, 2024

from stanc3.

VMatthijs avatar VMatthijs commented on July 29, 2024

Note that it would be reusing the lexer, parser and AST of the compiler. Also, standalone would give us an extra thing to distribute. So I think it would be more work to have it be standalone.
What's your thinking for wanting it to be standalone?

from stanc3.

bob-carpenter avatar bob-carpenter commented on July 29, 2024

from stanc3.

VMatthijs avatar VMatthijs commented on July 29, 2024

Sure! The same is currently already true for the auto-formatter in stanc3. That would also not proceed to code generation. Would something similar work for the linter?

from stanc3.

bob-carpenter avatar bob-carpenter commented on July 29, 2024

Yes. We'll have to think about how to call an executable that has many sub-executables. Are you imaginging something along the lines of the way git formulates commands, e.g.,

git commit -a -m "hi there"

where git invokes the executable and commit tells it which command to run, then the rest are arguments to the command?

from stanc3.

VMatthijs avatar VMatthijs commented on July 29, 2024

Currently, I was just using a bunch of command line options --<=optional-argument>, which can be combined in any way. I had imagined the behaviour that if you use the --lint or --auto-format options, it goes into linting or pretty-printing mode after semantic check, rather than code generation.

from stanc3.

bob-carpenter avatar bob-carpenter commented on July 29, 2024

from stanc3.

VMatthijs avatar VMatthijs commented on July 29, 2024

Right. That makes sense. What about a --no-generate-cpp option that will turn off code generation? I feel like the default situation is that you do want to generate code and you don't want to pretty print/lint. I feel the options should make the common use case easy. But I agree that it's nicer if all the functionality of the compiler is orthogonal to each other and can be mixed and matched in any way.

from stanc3.

bob-carpenter avatar bob-carpenter commented on July 29, 2024

from stanc3.

Related Issues (20)

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.