blob: 0a8a33250305df019d372d162a07ad25463cb5ec (
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
/*
Copyright Dave Bone 1998 - 2014
All Rights Reserved.
No part of this document may be reproduced without written consent from the author.
FILE: rules_phrase.lex
Dates: 24 May 2004
Purpose: rules alphabet
Grammar being parsed:
rules
{
1+ rule definition where def is
rule-name [AD AB attributes] ([lhs,arbritrator syn. code])
{ <subrule defs>+ }
}
*/
/@
@i "/usr/local/yacco2/copyright.w"
@** |rules_phrase| grammar.\fbreak
Dispatcher to parse rules alphabet.
@/
fsm
(fsm-id "rules_phrase.lex"
,fsm-filename rules_phrase
,fsm-namespace NS_rules_phrase
,fsm-class Crules_phrase{
user-prefix-declaration
#include "rules_phrase_th.h"
#include "o2_externs.h"
***
user-declaration
public: yacco2::AST* cweb_marker__;
***
op
if(CWEB_MARKER != 0){
cweb_marker__ = CWEB_MARKER;
CWEB_MARKER=0;
}
***
constructor
cweb_marker__ = 0;
***
}
,fsm-version "1.0",fsm-date "3 Jun 2004",fsm-debug "false"
,fsm-comments "Dispatcher to parse the grammar's rules.")
@"/usr/local/yacco2/compiler/grammars/yacco2_T_includes.T"
rules{
Rrules_phrase (){
-> Rphrase
}
Rphrase (){
-> ||| "rules-phrase" NS_rules_phrase_th::TH_rules_phrase_th {
op
ADD_TOKEN_TO_PRODUCER_QUEUE(*sf->p2__);
***
}
-> ||| |?| NULL {
op
ADD_TOKEN_TO_ERROR_QUEUE(*sf->p2__);
***
}
-> |?| {
op
CAbs_lr1_sym* sym = new Err_no_open_parenthesis;
sym->set_rc(*rule_info__.parser__->current_token(),__FILE__,__LINE__);
ADD_TOKEN_TO_ERROR_QUEUE(*sym);
***
}
}
}// end of rules
|