Просмотр исходного кода

Merge pull request #1 from RiveraGroup/bugfix/updates_from_mauguston_20150412

got ZIP from from Mikhail Auguston 20150412
mikau2 11 лет назад
Родитель
Сommit
8b8cf5c405
2 измененных файлов с 19 добавлено и 7 удалено
  1. 18 6
      lexer.mp
  2. 1 1
      mp2.h

+ 18 - 6
lexer.mp

@@ -1,17 +1,29 @@
 /* from the ACM TOSEM paper draft 
- runs for scope 1 and 2, for scope 3 takes too long
+ runs for scope 1 and 2 (~16 sec), 
+ for scope 3 it takes much longer.
+ 
+ The iteration limits <n..m> should be used to curb 
+ traveling too far into the combinatorial ocean.
+  
+ When ENSURE construct will be added to the Text_input
+ constraining the numbers of Get_char and Unget_char further,
+ the number of traces will drop significantly, 
+ and hopefully will become affordable for scope 3.
+ Meanwhile, this example demonstrates that we should be 
+ carefull with selecting limits for iterations, 
+ to avoid going too far into combinatorial exploration without real need.
 */
 
 SCHEMA lexer
 
-ROOT Text_Input:  	(* String_processing *);
-	String_processing:	Get_string (+ Unget_char +);
+ROOT Text_Input:  	(*<1..2> String_processing *);
+	String_processing:	Get_string (+<1..2> Unget_char +);
 	Get_string:			(+<2..3> Get_char +);
 
-ROOT Token_processing: 	(* Token_recognition *);
+ROOT Token_processing: 	(*<1..2> Token_recognition *);
 	Token_recognition: 	{+ RegExpr_Match +}
-				(+ Unget_char +)  Fire_rule;
- 	RegExpr_Match:		(+ Get_char +);
+				(+<1..2> Unget_char +)  Fire_rule;
+ 	RegExpr_Match:		(+<2..3> Get_char +);
  	Fire_rule: 		[ Put_token ];
 
 COORDINATE 	$t: Token_recognition 	FROM 	Token_processing,

+ 1 - 1
mp2.h

@@ -5,7 +5,7 @@
  *  recursive descent trace generation
  *	common declarations and globals
  *
- *	last update: 03/26/15
+ *	last modified: 03/26/15
  */
 #include <iostream>
 #include <fstream>