|
|
1.1 paf 1: %{
1.9 paf 2: #define YYSTYPE Array/*<op>*/ *
3: #define YYPARSE_PARAM pc
4: #define YYLEX_PARAM pc
5: #define YYDEBUG 1
1.1 paf 6: #define YYERROR_VERBOSE
1.9 paf 7: #define yyerror(msg) real_yyerror((parse_control *)pc, msg)
8: #define YYPRINT(file, type, value) yyprint(file, type, value)
1.1 paf 9:
10: #include <stdio.h>
11: #include <string.h>
12: #include <stdlib.h>
13:
14: #include "compile_tools.h"
1.8 paf 15: #include "pa_value.h"
1.12 paf 16: #include "pa_request.h"
1.1 paf 17:
1.9 paf 18: int real_yyerror(parse_control *pc, char *s);
19: static void yyprint(FILE *file, int type, YYSTYPE value);
1.1 paf 20: int yylex(YYSTYPE *lvalp, void *pc);
21:
22:
1.8 paf 23: // local convinient inplace typecast & var
1.9 paf 24: #define PC ((parse_control *)pc)
25: #define pool *PC->pool
1.1 paf 26: %}
27:
28: %pure_parser
29:
1.13 paf 30: %token EON
1.4 paf 31: %token STRING
1.1 paf 32: %token BOGUS
33:
34: %%
35:
1.10 paf 36: all:
37: one_big_piece {
1.8 paf 38: String& name_main=*new(pool) String(pool);
1.11 paf 39: name_main.APPEND_CONST(MAIN_METHOD_NAME);
1.8 paf 40: Array& param_names=*new(pool) Array(pool);
41: Array& local_names=*new(pool) Array(pool);
42: Method *method=new(pool) Method(pool, name_main, param_names, local_names, *$1);
43: *PC->methods+=method;
1.10 paf 44: }
45: | methods;
46:
47: methods: method | methods method;
48: one_big_piece: maybe_codes;
49:
50: method: '@' STRING bracketed_maybe_strings maybe_bracketed_strings maybe_comment '\n'
51: maybe_codes {
52: const String *name=LA2S($2);
53:
54: YYSTYPE params_names_code=$3;
55: Array& params_names=*new(pool) Array(pool);
56: for(int i=0; i<params_names_code->size(); i+=2)
57: params_names+=LA2S(params_names_code, i);
58:
59: YYSTYPE locals_names_code=$4;
60: Array& locals_names=*new(pool) Array(pool);
61: for(int i=0; i<locals_names_code->size(); i+=2)
62: locals_names+=LA2S(locals_names_code, i);
63:
64: Method *method=new(pool) Method(pool, *name, params_names, locals_names, *$7);
65: *PC->methods+=method;
1.8 paf 66: };
1.10 paf 67:
68: maybe_bracketed_strings: empty | bracketed_maybe_strings;
69: bracketed_maybe_strings: '[' maybe_strings ']' {$$=$2};
70: maybe_strings: empty | strings;
71: strings: STRING | strings ';' STRING { $$=$1; P($$, $3) };
72:
73: maybe_comment: empty | STRING;
1.1 paf 74:
75: /* codes */
76:
1.10 paf 77: maybe_codes: empty | codes;
78:
1.1 paf 79: codes: code | codes code {
80: $$=$1;
1.9 paf 81: P($$, $2);
1.1 paf 82: };
83: code: write_str_literal | action;
84: action: get | put | with | call;
85:
86: /* get */
87:
88: get: '$' any_name {
89: $$=$2; /* stack: resulting value */
1.17 paf 90: OP($$, OP_WRITE); /* value=pop; write(value) */
1.1 paf 91: };
92:
1.13 paf 93: any_name: name_without_curly_rdive EON | name_in_curly_rdive;
1.1 paf 94:
95: name_in_curly_rdive: '{' name_without_curly_rdive '}' { $$=$2 };
1.19 paf 96: name_without_curly_rdive: name_without_curly_rdive_read | name_without_curly_rdive_root;
97: name_without_curly_rdive_read: name_without_curly_rdive_code {
98: $$=N(pool);
1.22 ! paf 99: Array *diving_code=$1;
! 100: String *first_name=LA2S(diving_code);
! 101: if(first_name && *first_name=="self") {
! 102: OP($$, OP_WITH_SELF); /* stack: starting context */
! 103: P($$, diving_code,
! 104: /* skip over... */
! 105: diving_code->size()>2?3/*OP_+string+get_element*/:2/*OP_+string*/);
! 106: } else {
! 107: OP($$, OP_WITH_READ); /* stack: starting context */
! 108: P($$, diving_code);
! 109: }
! 110: /* diving code; stack: current context */
1.1 paf 111: };
1.19 paf 112: name_without_curly_rdive_root: ':' name_without_curly_rdive_code {
113: $$=N(pool);
114: OP($$, OP_WITH_ROOT); /* stack: starting context */
115: P($$, $2); /* diving code; stack: current context */
116: };
117: name_without_curly_rdive_code: name_advance2 | name_path name_advance2 { $$=$1; P($$, $2) };
1.1 paf 118:
119: /* put */
120:
121: put: '$' name_expr_dive '(' constructor_value ')' {
122: /*
123: TODO: подсмотреть в $3, и если там первым элементом self,
124: то выкинуть его и делать не OP_WITH_OP_WRITE, а WITH_SELF
125: если ничего не осталось - $self(xxx)
126: обругать
127: */
1.20 paf 128: $$=$2; /* stack: context,name */
129: P($$, $4); /* stack: context,name,constructor_value */
130: OP($$, OP_CONSTRUCT); /* value=pop; name=pop; context=pop; construct(context,name,value) */
131: };
132: name_expr_dive: name_expr_dive_write | name_expr_dive_root;
133: name_expr_dive_write: name_expr_dive_code {
1.8 paf 134: $$=N(pool);
1.3 paf 135: OP($$, OP_WITH_WRITE); /* stack: starting context */
1.20 paf 136: P($$, $1); /* diving code; stack: context,name */
137: };
138: name_expr_dive_root: ':' name_expr_dive_code {
139: $$=N(pool);
140: OP($$, OP_WITH_ROOT); /* stack: starting context */
1.9 paf 141: P($$, $2); /* diving code; stack: context,name */
1.1 paf 142: };
1.20 paf 143:
1.1 paf 144: constructor_value:
145: constructor_one_param_value
146: | constructor_two_params_value /* $var(=;2*2) $var(%d;2*2) $var(+;1) */
147: ;
148: constructor_one_param_value:
1.15 paf 149: empty /* optimized $var() case */
1.17 paf 150: | STRING /* optimized $var(STRING) case */
1.1 paf 151: | complex_constructor_param_value /* $var(something complex) */
152: ;
153: complex_constructor_param_value: complex_constructor_param_body {
1.8 paf 154: $$=N(pool);
1.3 paf 155: OP($$, OP_CREATE_EWPOOL); /* stack: empty write context */
1.9 paf 156: P($$, $1); /* some codes to that context */
157: OP($$, OP_REDUCE_EWPOOL); /* context=pop; stack: context.value() */
1.1 paf 158: };
159: complex_constructor_param_body:
160: codes__excluding_sole_str_literal
161: | codes__str__followed_by__excluding_sole_str_literal
162: ;
1.4 paf 163: constructor_two_params_value: STRING ';' constructor_one_param_value {
1.7 paf 164: char *operator_or_fmt=LA2S($1)->cstr();
1.8 paf 165: $$=N(pool);
1.9 paf 166: P($$, $1); /* stack: ncontext name operator_or_fmt */
1.3 paf 167: P($$, $3); /* stack: ncontext name operator_or_fmt expr */
1.1 paf 168: switch(operator_or_fmt[0]) {
169: case '=': case '%':
1.3 paf 170: OP($$, OP_EXPRESSION_EVAL);
1.1 paf 171: break;
172: case '+': case '-': case '*': case '/':
1.3 paf 173: OP($$, OP_MODIFY_EVAL);
1.1 paf 174: break;
175: default:
1.6 paf 176: strcpy(PC->error, "invalid modification operator");
177: YYERROR;
1.1 paf 178: }
179: /* stack: ncontext name value */
180: };
181:
182:
183: /* call */
184:
1.13 paf 185: call: '^' name_expr_dive store_params EON { /* ^field.$method{vasya} */
1.1 paf 186: /*
187: TODO: подсмотреть в $3, и если там в первом элементе первая буква ":"
188: то выкинуть её и делать не OP_WITH_READ, а WITH_ROOT
189: TODO: подсмотреть в $3, и если там первым элементом self,
190: то выкинуть его и делать не OP_WITH_READ, а WITH_SELF
191: TODO:
192: если первым в $3 идёт result
193: то
194: выкинуть его
195: если там ещё что-то осталось,
196: то
197: не OP_WITH_READ, а WITH_RESULT
198: иначе // ^result(value)
199: обругать безобразие
200: */
1.8 paf 201: $$=N(pool);
1.3 paf 202: OP($$, OP_WITH_READ); /* stack: starting context */
1.9 paf 203: P($$, $2); /* diving code; stack: context,method_name */
204: OP($$, OP_GET_METHOD_FRAME); /* stack: context,method_frame */
205: P($$, $3); /* filling method_frame.store_params */
206: OP($$, OP_CALL); /* method_frame=pop; ncontext=pop; call(ncontext,method_frame) */
1.1 paf 207: };
208:
1.9 paf 209: store_params: store_param | store_params store_param { $$=$1; P($$, $2) };
1.1 paf 210: store_param: store_round_param | store_curly_param;
211: store_round_param: '(' store_param_parts ')' {$$=$2};
1.9 paf 212: store_param_parts: store_param_part | store_param_parts ';' store_param_part { $$=$1; P($$, $3) };
1.1 paf 213: store_param_part: constructor_one_param_value {
214: $$=$1;
1.9 paf 215: OP($$, OP_STORE_PARAM);
1.1 paf 216: }
1.10 paf 217: store_curly_param: '{' maybe_codes '}' {
1.8 paf 218: $$=N(pool);
1.3 paf 219: OP($$, OP_CODE_ARRAY);
1.9 paf 220: AA($$, $2);
221: OP($$, OP_CREATE_JUNCTION);
222: OP($$, OP_STORE_PARAM);
1.1 paf 223: };
224:
225: /* name */
226:
1.20 paf 227: name_expr_dive_code: name_expr_value | name_path name_expr_value { $$=$1; P($$, $2) };
1.1 paf 228:
1.9 paf 229: name_path: name_step | name_path name_step { $$=$1; P($$, $2) };
1.1 paf 230: name_step: name_advance1 '.';
231: name_advance1: name_expr_value {
232: /* stack: context */
233: $$=$1; /* stack: context,name */
1.9 paf 234: OP($$, OP_GET_ELEMENT); /* name=pop; context=pop; stack: context.get_element(name) */
1.1 paf 235: };
236: name_advance2: name_expr_value {
237: /* stack: context */
238: $$=$1; /* stack: context,name */
1.9 paf 239: OP($$, OP_GET_ELEMENT); /* name=pop; context=pop; stack: context.get_element(name) */
1.1 paf 240: }
1.4 paf 241: | STRING BOGUS
1.1 paf 242: ;
243: name_expr_value:
1.4 paf 244: STRING /* subname_is_const */
1.1 paf 245: | name_expr_subvar_value /* $subname_is_var_value */
246: | name_expr_with_subvar_value /* xxx$part_of_subname_is_var_value[$...] */
247: ;
248: name_expr_subvar_value: '$' subvar_ref_name_rdive {
249: $$=$2;
1.9 paf 250: OP($$, OP_GET_ELEMENT);
1.1 paf 251: };
1.4 paf 252: name_expr_with_subvar_value: STRING subvar_get_writes {
1.8 paf 253: $$=N(pool);
1.3 paf 254: OP($$, OP_CREATE_EWPOOL);
1.9 paf 255: P($$, $1);
1.17 paf 256: OP($$, OP_WRITE);
1.9 paf 257: P($$, $2);
258: OP($$, OP_REDUCE_EWPOOL);
1.1 paf 259: };
1.18 paf 260: subvar_ref_name_rdive: subvar_ref_name_rdive_read | subvar_ref_name_rdive_root;
261: subvar_ref_name_rdive_read: STRING {
262: $$=N(pool);
263: OP($$, OP_WITH_READ);
1.9 paf 264: P($$, $1);
1.1 paf 265: };
1.18 paf 266: subvar_ref_name_rdive_root: ':' STRING {
267: $$=N(pool);
268: OP($$, OP_WITH_ROOT);
269: P($$, $2);
270: };
1.9 paf 271: subvar_get_writes: subvar__get_write | subvar_get_writes subvar__get_write { $$=$1; P($$, $2) };
1.1 paf 272: subvar__get_write: '$' subvar_ref_name_rdive {
273: $$=$2;
1.17 paf 274: OP($$, OP_GET_ELEMENT__WRITE);
1.1 paf 275: };
276:
277:
278: /* with */
279:
280: with: '$' name_without_curly_rdive '{' codes '}' {
281: $$=$2;
1.9 paf 282: OP($$, OP_CREATE_RWPOOL);
283: P($$, $4);
284: OP($$, OP_REDUCE_RWPOOL);
1.17 paf 285: OP($$, OP_WRITE);
1.1 paf 286: };
287:
288: /* codes_in_brackets */
289:
290: codes__str__followed_by__excluding_sole_str_literal:
291: write_str_literal codes__excluding_sole_str_literal {
292: $$=$1;
1.9 paf 293: P($$, $2);
1.1 paf 294: }
295: ;
296: codes__excluding_sole_str_literal:
297: action
298: | codes__excluding_sole_str_literal write_str_literal {
299: $$=$1;
1.9 paf 300: P($$, $2);
1.1 paf 301: }
302: ;
1.4 paf 303: write_str_literal: STRING {
1.1 paf 304: $$=$1;
1.17 paf 305: OP($$, OP_WRITE);
1.1 paf 306: };
307:
308: /* */
309:
1.8 paf 310: empty: /* empty */ { $$=N(pool) };
1.1 paf 311:
312: %%
313:
314: /*
315: 000$111(2222)00
316: 000$111{3333}00
1.9 paf 317: $,^: push,=0
1.1 paf 318: 1:( { break=pop
319: 2:( ) pop
320: 3:{ } pop
321:
322: 000^111(2222)4444{33333}4000
1.9 paf 323: $,^: push,=0
1.1 paf 324: 1:( { break=pop
325: 2:( )=4
326: 3:{ }=4
327: 4:[^({]=pop
328: */
329:
330: int yylex(YYSTYPE *lvalp, void *pc) {
331: #define lexical_brackets_nestage PC->brackets_nestages[PC->sp]
332:
333: register int c;
334: int result;
335:
336: if(PC->pending_state) {
337: result=PC->pending_state;
338: PC->pending_state=0;
339: return result;
340: }
341:
1.9 paf 342: char *begin=PC->source;
343: char *end;
344: int begin_line=PC->line;
1.1 paf 345: while(1) {
1.9 paf 346: c=*(end=(PC->source++));
1.1 paf 347:
1.4 paf 348: if(c=='\n') {
1.1 paf 349: PC->line++;
1.8 paf 350: PC->col=0;
1.10 paf 351: } else
1.4 paf 352: PC->col++;
1.1 paf 353:
354: /* escaping: ^^ ^$ ^; ^) ^} ^( ^{ */
355: if(c=='^') {
356: char pending_c=*PC->source;
357:
1.9 paf 358: if(pending_c=='^' || pending_c=='$' || pending_c==';' ||
359: pending_c=='(' || pending_c==')' ||
360: pending_c=='{' || pending_c=='}') {
1.1 paf 361: /* append piece till ^ */
1.9 paf 362: PC->string->APPEND(begin, end-begin, PC->file, begin_line);
1.1 paf 363: /* reset piece 'start' position & line */
1.9 paf 364: begin=PC->source/*^*/;
365: begin_line=PC->line;
1.1 paf 366: /* skip over ^ and _ */
367: PC->source+=2;
368: /* skip analysis = forced literal */
369: continue;
370: }
371: }
372: switch(PC->ls) {
1.10 paf 373:
374: // USER'S = NOT OURS
1.1 paf 375: case LS_USER:
376: if(c=='$') {
1.10 paf 377: push_LS(PC, LS_VAR_NAME_SIMPLE);
1.1 paf 378: result=c;
379: goto break2;
380: }
381: if(c=='^') {
1.10 paf 382: push_LS(PC, LS_METHOD_NAME);
383: result=c;
384: goto break2;
385: }
386: if(c=='@' && PC->col==0+1) {
1.1 paf 387: result=c;
1.10 paf 388: push_LS(PC, LS_DEF_NAME);
389: goto break2;
390: }
391:
392: break;
393:
394: // METHOD DEFINITION
395: case LS_DEF_NAME:
396: if(c=='[') {
397: result=c;
398: PC->ls=LS_DEF_PARAMS;
399: goto break2;
400: }
401: if(c=='\n') { // wrong. bailing out
402: result=c;
403: pop_LS(PC);
404: goto break2;
405: }
406: break;
407: case LS_DEF_PARAMS:
408: if(c==';') {
409: result=c;
410: goto break2;
411: }
412: if(c==']') {
413: result=c;
414: PC->ls=*PC->source=='['?LS_DEF_LOCALS:LS_DEF_COMMENT;
415: goto break2;
416: }
417: if(c=='\n') { // wrong. bailing out
418: result=c;
419: pop_LS(PC);
420: goto break2;
421: }
422: break;
423: case LS_DEF_LOCALS:
424: if(c=='[' || c==';') {
425: result=c;
426: goto break2;
427: }
428: if(c==']') {
429: result=c;
430: PC->ls=LS_DEF_COMMENT;
431: goto break2;
432: }
433: if(c=='\n') { // wrong. bailing out
434: result=c;
435: pop_LS(PC);
436: goto break2;
437: }
438: break;
439: case LS_DEF_COMMENT:
440: if(c=='\n') {
441: result=c;
442: pop_LS(PC);
1.1 paf 443: goto break2;
444: }
445: break;
446:
1.10 paf 447: // VARIABLE GET/PUT/WITH
1.1 paf 448: case LS_VAR_NAME_SIMPLE:
449: if(c==0 ||
450: c==' '|| c=='\t' || c=='\n' ||
451: c==')' || c=='}') {
452: pop_LS(PC);
1.4 paf 453: PC->source--; PC->col--;
1.13 paf 454: result=EON;
1.1 paf 455: goto break2;
456: }
1.13 paf 457: if(begin==end && c=='{') { /* ${name}, no need of EON, switching LS */
1.1 paf 458: PC->ls=LS_VAR_NAME_CURLY;
459: result=c;
460: goto break2;
461: }
1.18 paf 462: if(c==':') {
463: result=c;
464: goto break2;
465: }
1.1 paf 466: if(c=='(') {
467: PC->ls=LS_VAR_ROUND;
468: lexical_brackets_nestage=1;
469: result=c;
470: goto break2;
471: }
472: if(c=='{') {
473: PC->ls=LS_VAR_CURLY;
474: lexical_brackets_nestage=1;
475: result=c;
476: goto break2;
477: }
478: if(c=='.'/* name part delim */ || c=='$'/* name part subvar */) {
479: result=c;
480: goto break2;
481: }
482: break;
483: case LS_VAR_NAME_CURLY:
1.18 paf 484: if(c==':') {
485: result=c;
486: goto break2;
487: }
1.1 paf 488: if(c=='}') { /* ${name} finished, restoring LS */
489: pop_LS(PC);
490: result=c;
491: goto break2;
492: }
493: if(c=='.'/* name part delim */ || c=='$'/*name part subvar*/) {
494: result=c;
495: goto break2;
496: }
497: break;
498: case LS_VAR_ROUND:
499: if(c=='$') {
1.10 paf 500: push_LS(PC, LS_VAR_NAME_SIMPLE);
1.1 paf 501: result=c;
502: goto break2;
503: }
504: if(c=='^') {
1.10 paf 505: push_LS(PC, LS_METHOD_NAME);
1.1 paf 506: result=c;
507: goto break2;
508: }
509: if(c==')') {
510: if(--lexical_brackets_nestage==0) {
511: pop_LS(PC);
512: result=c;
513: goto break2;
514: }
515: }
516: if(c==';'/* operator_or_fmt;value delim */) {
517: result=c;
518: goto break2;
519: }
520: if(c=='(')
521: lexical_brackets_nestage++;
522: break;
523: case LS_VAR_CURLY:
524: if(c=='$') {
1.10 paf 525: push_LS(PC, LS_VAR_NAME_SIMPLE);
1.1 paf 526: result=c;
527: goto break2;
528: }
529: if(c=='^') {
1.10 paf 530: push_LS(PC, LS_METHOD_NAME);
1.1 paf 531: result=c;
532: goto break2;
533: }
534: if(c=='}')
535: if(--lexical_brackets_nestage==0) {
536: pop_LS(PC);
537: result=c;
538: goto break2;
539: }
540: if(c=='{')
541: lexical_brackets_nestage++;
542: break;
543:
1.10 paf 544: // METHOD CALL
1.1 paf 545: case LS_METHOD_NAME:
546: if(c=='(') {
547: PC->ls=LS_METHOD_ROUND;
548: lexical_brackets_nestage=1;
549: result=c;
550: goto break2;
551: }
552: if(c=='{') {
553: PC->ls=LS_METHOD_CURLY;
554: lexical_brackets_nestage=1;
555: result=c;
556: goto break2;
557: }
558: if(c=='.'/* name part delim */ || c=='$'/* name part subvar */) {
559: result=c;
560: goto break2;
561: }
562: break;
563: case LS_METHOD_ROUND:
564: if(c=='$') {
1.10 paf 565: push_LS(PC, LS_VAR_NAME_SIMPLE);
1.1 paf 566: result=c;
567: goto break2;
568: }
569: if(c=='^') {
1.10 paf 570: push_LS(PC, LS_METHOD_NAME);
1.1 paf 571: result=c;
572: goto break2;
573: }
574: if(c==';'/* param delim */) {
575: result=c;
576: goto break2;
577: }
578: if(c==')')
579: if(--lexical_brackets_nestage==0) {
580: PC->ls=LS_METHOD_AFTER;
581: result=c;
582: goto break2;
583: }
584: if(c=='(')
585: lexical_brackets_nestage++;
586: break;
587: case LS_METHOD_CURLY:
588: if(c=='$') {
1.10 paf 589: push_LS(PC, LS_VAR_NAME_SIMPLE);
1.1 paf 590: result=c;
591: goto break2;
592: }
593: if(c=='^') {
1.10 paf 594: push_LS(PC, LS_METHOD_NAME);
1.1 paf 595: result=c;
596: goto break2;
597: }
598: if(c=='}')
599: if(--lexical_brackets_nestage==0) {
600: PC->ls=LS_METHOD_AFTER;
601: result=c;
602: goto break2;
603: }
604: if(c=='{')
605: lexical_brackets_nestage++;
606: break;
607: case LS_METHOD_AFTER:
608: if(c=='(') {/* )( }( */
609: PC->ls=LS_METHOD_ROUND;
610: lexical_brackets_nestage=1;
611: result=c;
612: goto break2;
613: }
614: if(c=='{') {/* ){ }{ */
615: PC->ls=LS_METHOD_CURLY;
616: lexical_brackets_nestage=1;
617: result=c;
618: goto break2;
619: }
620: pop_LS(PC);
1.4 paf 621: PC->source--; PC->col--;
1.13 paf 622: result=EON;
1.1 paf 623: goto break2;
624: }
1.9 paf 625: if(c==0) {
1.1 paf 626: result=-1;
1.21 paf 627: // PC->source--; PC->col--;
1.1 paf 628: break;
629: }
630: }
631:
632: break2:
1.9 paf 633: if(begin==end)
1.1 paf 634: return result;
635: else {
636: PC->pending_state=result;
1.10 paf 637: // strip last \n before LS_DEF_NAME or EOF
638: if((c=='@' || c==0) && end[-1]=='\n')
639: end--;
640: // append last piece
1.9 paf 641: PC->string->APPEND(begin, end-begin, PC->file, begin_line/*, start_col*/);
1.17 paf 642: // create STRING value: array of OP_VALUE+vstring
643: *lvalp=L(new(pool) VString(PC->string));
1.10 paf 644: // new pieces storage
1.8 paf 645: PC->string=new(pool) String(pool);
1.10 paf 646: // go!
1.4 paf 647: return STRING;
1.1 paf 648: }
649: }
650:
1.9 paf 651: int real_yyerror(parse_control *pc, char *s) /* Called by yyparse on error */
1.1 paf 652: {
1.16 paf 653: //fprintf(stderr, "[%s]\n", s);
1.6 paf 654:
655: s[MAX_STRING-1]=0; strcpy(pc->error, s);
1.1 paf 656: return 1;
657: }
658:
659: static void
1.9 paf 660: yyprint(
1.1 paf 661: FILE *file,
662: int type,
663: YYSTYPE value)
664: {
1.9 paf 665: if(type==STRING)
666: fprintf(file, " \"%s\"", LA2S(value)->cstr());
1.1 paf 667: }
668: