"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/host-ruby/rlhc-ruby.lm" between
ragel-7.0.0.11.tar.gz and ragel-7.0.0.12.tar.gz

About: Ragel compiles executable finite state machines from regular languages (C, C++, Obj-C, C#, D, Java, Go and Ruby). Development version.

rlhc-ruby.lm  (ragel-7.0.0.11):rlhc-ruby.lm  (ragel-7.0.0.12)
skipping to change at line 471 skipping to change at line 471
case [default_block] case [default_block]
{ {
send Parser send Parser
"end "end
"else "else
"begin "begin
"[stmt_list( Stmt.default_block._repeat_stmt )] "[stmt_list( Stmt.default_block._repeat_stmt )]
} }
case [goto_label] {} case [goto_label] {}
case [goto_stmt] {} case [goto_stmt] {}
case [entry_loop] {}
case [label_stmt] {}
case [AS: assign_stmt] case [AS: assign_stmt]
{ {
send Parser send Parser
"[lvalue(AS.LValue) AS.assign_op expr(AS.expr)]; "[lvalue(AS.LValue) AS.assign_op expr(AS.expr)];
} }
case [continue_stmt]
{
send Parser
"next;
}
default { default {
# catches unspecified cases # catches unspecified cases
send Parser [Stmt] send Parser [Stmt]
} }
} }
void stmt_list( StmtList: stmt* ) void stmt_list( StmtList: stmt* )
{ {
for Stmt: stmt in repeat( StmtList ) for Stmt: stmt in repeat( StmtList )
stmt( Stmt ) stmt( Stmt )
skipping to change at line 508 skipping to change at line 511
if RO { if RO {
send Output send Output
[RO] [RO]
} }
else { else {
send stderr send stderr
"failed to parse output: [Parser->error] "failed to parse output: [Parser->error]
} }
} }
void assign_labels( Prog: ref<any> )
{
N: int = 1
new Map: map<ident, label_stmt>()
for LabelStmt: label_stmt in Prog {
LabelStmt.Id = N
Map->insert( LabelStmt.ident, LabelStmt )
N = N + 1
}
for GotoStmt: goto_stmt in Prog {
LabelStmt: label_stmt = Map->find( GotoStmt.ident )
if ( LabelStmt )
GotoStmt.Id = LabelStmt.Id
}
}
void trans( Output: stream, Start: start ) void trans( Output: stream, Start: start )
{ {
assign_labels( Start )
ruby_trans( Output, Start ) ruby_trans( Output, Start )
} }
include 'rlhc-main.lm' include 'rlhc-main.lm'
 End of changes. 4 change blocks. 
20 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)