-
fperrad committed patchset 256 of module smc to the SMC - The State Machine Compiler CVS repository, changing 1 files.
2009-11-02 09:57:43 UTC by fperrad
-
cwrapp made 1 file-release changes.
2009-11-02 02:35:01 UTC by cwrapp
-
cwrapp made 2 file-release changes.
2009-11-02 02:33:01 UTC by cwrapp
-
Hello,
I created some time ago a SMC-based application, with SMC 5 (c++ target).
In a state transition, I define an action:
SetComment(ssString("TestString ["));
(ssString is a simple string class).
SMC 5 compiles the .sm file correctly; SMC 6 returns an error:
"User source code contains an unbalanced open, closing pair."
It seems that the square bracket...
2009-10-29 16:08:46 UTC by mida2
-
Hi,
I've created an .sm file for an intial test fsm, and I compiled it few times, but when finalised the .sm with adding a bunch of other transitions, I can see that the input lexer does not like _, @ or - in use. Is their a reason why these are not supported.
2009-10-22 14:56:05 UTC by pearlysoames
-
To use templates is very good idea, I was already experimenting with it for C# generator, because it is very natural. I wanted to create some kind of templates for method definition, if statement, try/finally block ...etc. It seemed to be easy, but I noticed that substituting strings was not enough - the generator uses a lot of decisions to print out something or not. We shall think carefully...
2009-10-18 12:19:19 UTC by kgreg99
-
Please see my remarks about "-rawaction" option in "Accessing static methods" forum.<p>I think approach you propose can solve exceptions handling. But I don't understand what you wrote for guards. How will the exception be passed to the sm code to be handled ? <p>The problem of guards is they must return boolean value. If we will allow any raw code inside of them...
2009-10-18 11:53:02 UTC by kgreg99
-
I agree with the idea to be able to enter "raw" code.
But penalty for using global option is too high - if one would like to access few static methods in the existing sm code he would need to modify the complete code by adding ctxt. everywhere where it is appropriate. Such a modification is not trivial and cannot be automated easily.
In my opinion raw code is far more exceptional in...
2009-10-17 22:40:43 UTC by kgreg99
-
One more thought about "-rawaction". How about adding a method FSMContext.redirect(State state) wherein the programmer could dynamically change the next state from within the transition actions? So if the transition's raw code catches an exception, the next state could be changed on the fly.
2009-10-17 14:00:25 UTC by cwrapp
-
Certainly SMC can be used to parse. SMC is used to lex (break the input into token) and parse .sm files. Further I have written my own XML parser using SMC. If you want to see how SMC works as a lexer and parser then download the SMC source distribution and go to the net/sf/smc/parser directory. Look at SmcLexer.sm and SmcParser.sm. The XML parser code is not currently available.
Parser code...
2009-10-17 13:57:16 UTC by cwrapp