*** empty log message ***

Fri, 28 Dec 2001 04:55:47 +0000

author
eric
date
Fri, 28 Dec 2001 04:55:47 +0000
changeset 7
e1f52aa9f252
parent 6
72eb20f1a4ec
child 8
7288d2753c18

*** empty log message ***

parser.y file | annotate | diff | revisions
scanner.l file | annotate | diff | revisions
     1.1 --- a/parser.y	Fri Dec 28 04:44:15 2001 +0000
     1.2 +++ b/parser.y	Fri Dec 28 04:55:47 2001 +0000
     1.3 @@ -12,6 +12,8 @@
     1.4  %token <fp> FLOAT
     1.5  %token <string> STRING
     1.6  
     1.7 +%token ELIPSIS
     1.8 +
     1.9  %token EVEN
    1.10  %token ODD
    1.11  %token ALL
    1.12 @@ -32,16 +34,16 @@
    1.13  
    1.14  %%
    1.15  
    1.16 -statements: statement | statements statement;
    1.17 +statements: statement | statements statement ;
    1.18  
    1.19 -statement: input_statement | output_statement;
    1.20 +statement: input_statement | output_statement ;
    1.21  
    1.22  
    1.23 -range:	INTEGER ".." INTEGER
    1.24 -	| INTEGER;
    1.25 +range:	INTEGER ELIPSIS INTEGER
    1.26 +	| INTEGER ;
    1.27  
    1.28  ranges:	range
    1.29 -	| ranges ',' range;
    1.30 +	| ranges ',' range ;
    1.31  
    1.32  
    1.33  file_clause:
    1.34 @@ -60,23 +62,26 @@
    1.35  	SIZE FLOAT ',' FLOAT ';' ;
    1.36  
    1.37  part:
    1.38 -	EVEN | ODD | ALL;
    1.39 +	EVEN | ODD | ALL ;
    1.40  
    1.41  part_clause:
    1.42 -	part ';' ;
    1.43 +	part input_clause ;
    1.44  
    1.45  input_clause:
    1.46  	part_clause
    1.47  	| file_clause | image_clause | rotate_clause
    1.48 -	| crop_clause | size_clause;
    1.49 +	| crop_clause | size_clause
    1.50 +	| input_clause_list ;
    1.51  
    1.52  input_clauses:
    1.53  	input_clause
    1.54 -	| input_clauses input_clause;
    1.55 +	| input_clauses input_clause ;
    1.56 +
    1.57 +input_clause_list:
    1.58 +	'{' input_clauses '}' ;
    1.59  
    1.60  input_statement:
    1.61 -	INPUT '{' input_clauses '}' ;
    1.62 -
    1.63 +	INPUT input_clause ;
    1.64  
    1.65  page_clause:
    1.66  	PAGE ranges ';'
    1.67 @@ -86,12 +91,16 @@
    1.68  	BOOKMARK STRING ';' ;
    1.69  
    1.70  output_clause:
    1.71 -	page_clause | bookmark_clause;
    1.72 +	page_clause | bookmark_clause
    1.73 +	| output_clause_list ;
    1.74  
    1.75  output_clauses:
    1.76  	output_clause
    1.77 -	| output_clauses output_clause;
    1.78 +	| output_clauses output_clause ;
    1.79 +
    1.80 +output_clause_list:
    1.81 +	'{' output_clauses '}' ;
    1.82  
    1.83  output_statement:
    1.84 -	OUTPUT '{' output_clauses '}' ;
    1.85 +	OUTPUT output_clause ;
    1.86  
     2.1 --- a/scanner.l	Fri Dec 28 04:44:15 2001 +0000
     2.2 +++ b/scanner.l	Fri Dec 28 04:55:47 2001 +0000
     2.3 @@ -11,6 +11,8 @@
     2.4  
     2.5  %%
     2.6  
     2.7 +\.\.		{ return (ELIPSIS); }
     2.8 +
     2.9  {digit}+	{ yylval.integer = atoi (yytext); return (INTEGER); }
    2.10  
    2.11  all		{ return (ALL); }