Deleted Added
full compact
lex.l (240365) lex.l (250984)
1/* $FreeBSD: head/usr.bin/mkcsmapper/lex.l 240365 2012-09-11 16:32:31Z dim $ */
1/* $FreeBSD: head/usr.bin/mkcsmapper/lex.l 250984 2013-05-25 15:36:15Z ed $ */
2/* $NetBSD: lex.l,v 1.4 2006/02/09 22:03:15 dogcow Exp $ */
3
4%{
5/*-
6 * Copyright (c)2003 Citrus Project,
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without

--- 26 unchanged lines hidden (view full) ---

36#include <limits.h>
37#include <stdio.h>
38#include <stdlib.h>
39#include <string.h>
40
41#include "ldef.h"
42#include "yacc.h"
43
2/* $NetBSD: lex.l,v 1.4 2006/02/09 22:03:15 dogcow Exp $ */
3
4%{
5/*-
6 * Copyright (c)2003 Citrus Project,
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without

--- 26 unchanged lines hidden (view full) ---

36#include <limits.h>
37#include <stdio.h>
38#include <stdlib.h>
39#include <string.h>
40
41#include "ldef.h"
42#include "yacc.h"
43
44int line_number = 1;
44int linenumber = 1;
45%}
46%option noinput
47%option nounput
48
49%x COMMENT
50
51%%
52
53[ \t]+ { }
45%}
46%option noinput
47%option nounput
48
49%x COMMENT
50
51%%
52
53[ \t]+ { }
54#.*[\n]|"//".*[\n]|[\n] { line_number++; return (R_LN); }
54#.*[\n]|"//".*[\n]|[\n] { linenumber++; return (R_LN); }
55
56"/*" { BEGIN COMMENT; }
57<COMMENT>"*/" { BEGIN 0; }
55
56"/*" { BEGIN COMMENT; }
57<COMMENT>"*/" { BEGIN 0; }
58<COMMENT>[\n] { line_number++; }
58[\n] { linenumber++; }
59<COMMENT>. { }
60<COMMENT><<EOF>> {
61 yyerror("unexpected file end (unterminated comment)\n");
62 exit(1);
63 }
64
65"="|"/"|"-" { return ((int)yytext[0]); }
66

--- 41 unchanged lines hidden ---
59<COMMENT>. { }
60<COMMENT><<EOF>> {
61 yyerror("unexpected file end (unterminated comment)\n");
62 exit(1);
63 }
64
65"="|"/"|"-" { return ((int)yytext[0]); }
66

--- 41 unchanged lines hidden ---