summaryrefslogtreecommitdiff
path: root/web/yacco2/diagrams/eol.txt
blob: e885f29314c2a6410422ece95b50d7a901cee87b (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
/*	
FILE:    eol.lex
Dates:   17 Juin 2003
Purpose: end-of-line recognizer
*/
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 |.|
  ***
)
@"c:/yacco2/compiler/grammars/yacco2_include_files.lex"

rules{
Reol AD AB(){
  -> Rdelimiters {
    rhs-op
      CAbs_lr1_sym* sym = new T_eol;
      sym->set_rc(*parser()->start_token(),*parser());     
      sym->set_line_no_and_pos_in_line(*parser()->start_token());     
      RSVP(sym)
    ***
    }	
}

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