summaryrefslogtreecommitdiff
path: root/web/yacco2/qa/rule_test2.dat
blob: d320e72c8d0be6c531303cb7bc77ab7d4beb82c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*	
FILE:		  rule_test2.dat
*/
fsm	
(fsm-id	"eol.lex",fsm-filename	eol,fsm-namespace NS_eol
,fsm-class		Ceol
,fsm-version	"1.0"	,fsm-date	"17 Juin 2003",fsm-debug	"false"
,fsm-comments	"end-of-line recognizer")
parallel-parser	
(	
  parallel-thread-function
    TH_eol
  ***
  parallel-la-boundary
    eolr // - "x0a" more efficient to use |.|
  ***
  code
#include <parallel_function_include_code.h>
  ***
)
@"c:/yacco2/compiler/grammars/yacco2_include_files.lex"
//
rules{
Reol AD AB(){
  -> xfa Rdelimiters {
    rhs-op
      ++yacco2::POS_IN_LINE_NO__;
      CAbs_lr1_sym* sym = new T_eol;
      sym->rc(abs_parser()->start_token(),abs_parser());     
      sym->set_line_no_and_pos_in_line(yacco2::LINE_NO__,yacco2::POS_IN_LINE_NO__);     
      RSVP(sym)
      ++yacco2::LINE_NO__;// next line no
      yacco2::POS_IN_LINE_NO__ = 0;// reset for next line
    ***
    }	
}

Rdelimiters AD AB(){
  ->  no-end-of-code
  ->  "x0a"
  ->  "x0d" |.|
  ->  "x0d" "x0a"
}
}// end of rules