File: instream.yy

package info (click to toggle)
ghostscript 10.05.1~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 93,508 kB
  • sloc: ansic: 908,895; python: 7,676; cpp: 6,534; cs: 6,457; sh: 6,168; java: 4,028; perl: 2,373; tcl: 1,639; makefile: 529; awk: 66; yacc: 18
file content (23 lines) | stat: -rw-r--r-- 593 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
%option prefix="yy"
%{
/*
  Scanner zum Einlesen von DSC Postscript Dateien
  von Carsten Hammer Hammer.Carsten@oce.de
 */
#include <stdio.h>
#include <malloc.h>
#include <string.h>
#define YY_DECL int yylex(char *buf,int *len)
%}
%x PAGES
%%
<INITIAL>.*\n			strncpy(buf,yytext,*len);*len=yyleng;return(1001);
<INITIAL>.*\n/"%%Page: 1 1"	BEGIN(PAGES);strncpy(buf,yytext,*len);*len=yyleng;return(1001);
<PAGES>\n			;
<PAGES>.*\n			strncpy(buf,yytext,*len);return(yyleng>*len?*len:yyleng);
<PAGES>.*\n/"%%Page:"		strncpy(buf,yytext,*len);*len=yyleng;return(1000);
%%

int yywrap(){
return(1);
}