summaryrefslogtreecommitdiff
path: root/web/yacco2/compiler/grammars/o2_code_end.lex
blob: ddb5f5e956b95f9b977c37218929027aae1dec39 (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
45
46
/*
  Copyright Dave Bone 1998 - 2014 
  All Rights Reserved. 
  No part of this document may be reproduced without written consent from the author.
	
FILE:    o2_code_end.lex
Date:    26 Nov 2002
Purpose: Yacco2's syntax directed end code marker
Correction: 1 June 2005 - add "*" removal from lookahead expression
		u never know what type of syning u'll get
*/
/@
@i "/usr/local/yacco2/copyright.w"
@** |o2_code_end| Thread.\fbreak
Yacco2's syntax directed ``end code'' marker.\fbreak
Why as a thread?
Cuz syntax-directed code is a character crawler
that sends out its scouts to survey the land of
variant strings, comments, and code-end marker.
@/
fsm	
(fsm-id "o2_code_end.lex",fsm-filename o2_code_end,fsm-namespace NS_o2_code_end
,fsm-class Co2_code_end
,fsm-version "1.0",fsm-date "30 dec 2002",fsm-debug "false"
,fsm-comments "Lexer syntax directed code end marker: \\threeasteric.")
parallel-parser	
( parallel-thread-function
     TH_o2_code_end
  ***
  parallel-la-boundary
    eolr - "*"
  ***
)
@"/usr/local/yacco2/compiler/grammars/yacco2_T_includes.T"

rules{
Ro2_code_end (){
  -> "*" "*" "*" {
    op
      T_eocode* mkr = new T_eocode;
      mkr->set_rc(*rule_info__.parser__->start_token__,__FILE__,__LINE__);
      RSVP(mkr);
    ***
    }
}
}// end of rules