Comments (5)
@walkie I am actively investigating this now and interested in your perspective on how to handle this. I am thinking to follow the POSIX syntax:
- A token consisting of a single hyphen character is interpreted as an ordinary non-option argument. By convention, it is used to specify input from or output to the standard input and output streams.
https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
I'm also thinking that -o could be used to specify a target file.
Thoughts? Also I am just looking into structopt now so if you have guidance on how this can be easily done LMK, otherwise I'll dig in (which isn't a bad thing).
Thanks!
from frame_transpiler.
For argument parsing, you should probably use clap instead of structopt since that seems to be the standard now. The structopt docs even have a note saying that it's now in maintence mode and to use clap instead.
I don't have any strong opinion on the syntax, but following a standard seems like a 👍 to me. The other option might just be to do whatever is most natural/easiest with clap, since that's likely to follow the most common practice. (Those two options might be the same, in which case, even better!)
from frame_transpiler.
@walkie So I now think the actual proper standard is that the absence of a filename is the indicator to read from stdin. However currently framec takes the language parameter as a positional parameter, just like the filename and therefore not really distinguishable (unless I'm missing some subtlety to this).
So I'm thinking to make the language a mandatory option with value so:
framec -l rust < Spec.frm
Would this break a lot of tooling on your side?
from frame_transpiler.
We're not using the CLI at all, so it won't impact us. We call Exe::run_file
directly from a build.rs
file.
Only tangentially related to the issue here, but we actually have several different build.rs
files floating around for different projects that all do slight variants of the same thing. I'm currently abstracting the shared behavior out, and I plan to add it to the Frame repo as a new frame_build
crate. I'll add a README to that describing our pattern for integrating Frame state machines into larger Rust projects, which might be helpful for others hoping to use Frame+Rust.
I'll let you merge the PR on that one since it adds a new crate to the repo.
from frame_transpiler.
from frame_transpiler.
Related Issues (20)
- Simplify _do_transition()
- Event parameter scope syntax doesn't emit type HOT 1
- System Parameters not handled message parameter HOT 3
- Language attribute disabled HOT 1
- v0.10.0 Tasks
- System parameters don't throw errors HOT 1
- Arguments to calls to actions not validated with action parameter types
- Add annotation to relax signature checks.
- Remove "c# for bob generator" after c# upgrade
- Create preprocessor to capture attributes
- Explore event forwarding parameter issues
- Parser not catching transition parameter mismatches
- Issues w/ calls aliasing interface methods
- string literal not properly handled in golang HOT 1
- Change state with stack pop not handled in other languages expect rust. HOT 2
- Stack Pop method not specify the return type HOT 1
- Code generation for Stack is not implemented HOT 1
- Compartment pointer are not deep copied in stack.
- Need a import statement in framelang for language packages.
- Support complex property syntax including array
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frame_transpiler.