parser.y

changeset 30
35fad7ec7732
parent 27
7a28031fe457
child 31
2cec996b38bc
     1.1 --- a/parser.y	Tue Jan 01 05:41:03 2002 +0000
     1.2 +++ b/parser.y	Tue Jan 01 06:11:43 2002 +0000
     1.3 @@ -47,6 +47,12 @@
     1.4  %token BOOKMARK
     1.5  %token OUTPUT
     1.6  
     1.7 +%token AUTHOR
     1.8 +%token CREATOR
     1.9 +%token TITLE
    1.10 +%token SUBJECT
    1.11 +%token KEYWORDS
    1.12 +
    1.13  %type <range> range
    1.14  %type <range> image_ranges
    1.15  %type <range> page_ranges
    1.16 @@ -151,8 +157,21 @@
    1.17  input_statement:
    1.18  	INPUT input_clauses ;
    1.19  
    1.20 +pdf_file_attribute:
    1.21 +	AUTHOR STRING { output_set_author ($2); }
    1.22 +	| CREATOR STRING { output_set_creator ($2); }
    1.23 +	| TITLE STRING { output_set_title ($2); }
    1.24 +	| SUBJECT STRING { output_set_subject ($2); }
    1.25 +	| KEYWORDS STRING { output_set_keywords ($2); } ;
    1.26 +
    1.27 +pdf_file_attributes:
    1.28 +	/* empty */
    1.29 +	| pdf_file_attribute
    1.30 +	| pdf_file_attributes pdf_file_attribute ;
    1.31 +
    1.32  output_file_clause:
    1.33 -	FILE_KEYWORD STRING  ';' { output_set_file ($2) } ;
    1.34 +	FILE_KEYWORD STRING { output_set_file ($2); }
    1.35 +	pdf_file_attributes ';'
    1.36  
    1.37  label_clause:
    1.38  	LABEL ';' { page_label_t label = { NULL, '\0' }; output_set_page_label (label); }