Plan 9 from Bell Labs’s /usr/web/sources/contrib/nemo/octopus/port/x/regx.m

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Regx : module {
	PATH : con "/dis/o/regx.dis";

	NRange : con 10;
	Range : adt {
		q0 : int;
		q1 : int;
	};

	Rangeset : type array of Range;
	Infinity : con 16r7fffffff; 	# huge value for regexp address

	init : fn(d: Oxdat);

	rxinit : fn();
	rxcompile: fn(r : string) : int;
	rxexecute: fn(t : ref Tblks->Blks, r: string, startp : int, eof : int) : (int, Rangeset);
	rxbexecute: fn(t : ref Tblks->Blks, startp : int) : (int, Rangeset);
	isaddrc : fn(r : int) : int;
	isregexc : fn(r : int) : int;
	address : fn(t : ref Tblks->Blks, lim : Range, ar : Range, a0 : ref Tblks->Blks,
									a1 : string, q0 : int, q1 : int, eval : int) : (int, int, Range);
};

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.