Commit 946a1f9b authored by Alfons Laarman's avatar Alfons Laarman

compiler fix: parenthesis around program counter guards

parent ff31c5f7
...@@ -94,10 +94,9 @@ void dve_compiler::write_C(dve_expression_t & expr, std::ostream & ostr, std::st ...@@ -94,10 +94,9 @@ void dve_compiler::write_C(dve_expression_t & expr, std::ostream & ostr, std::st
break; break;
case T_DOT: case T_DOT:
ostr<<state_name<<"."; ostr << in_state(
ostr<<parent_table->get_process(parent_table->get_state(expr.get_ident_gid())-> parent_table->get_state(expr.get_ident_gid())->get_process_gid(),
get_process_gid())->get_name(); ostr<<".state"<<(ltsmin?".var":"")<<" == "; parent_table->get_state(expr.get_ident_gid())->get_lid(), state_name );
ostr<<parent_table->get_state(expr.get_ident_gid())->get_lid();
break; break;
case T_IMPLY: case T_IMPLY:
......
...@@ -175,7 +175,7 @@ struct dve_compiler: public dve_explicit_system_t ...@@ -175,7 +175,7 @@ struct dve_compiler: public dve_explicit_system_t
void block_end() { deindent(); line( "}" ); } void block_end() { deindent(); line( "}" ); }
std::string in_state( int process, int state, std::string from_state ) { std::string in_state( int process, int state, std::string from_state ) {
return process_state( process, from_state ) + " == " + wibble::str::fmt( state ); return "(" + process_state( process, from_state ) + " == " + wibble::str::fmt( state ) + ")";
} }
void setOutput( std::ostream &o ) { void setOutput( std::ostream &o ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment