Files
harbour-core/harbour/samples/cccppc/parser.cls
1999-11-09 01:37:27 +00:00

64 lines
1.6 KiB
OpenEdge ABL
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// $Id$
//
//*******************************************************************
// parser.cls: Źltal nos elemz“ oszt ly.
// 1999, Csisz r Levente
// Az inputr˘l olvasott 'item'-eket egy parserBuffer-ben t rolja,
// s az 'item' attributumba is beolvassa.
// A pufferb“l az inputra vissza tud tenni 'item'-eket.
// A puffer karakter rszt meg tudja adni stringknt.
class PARSER TREADER
attrib item
attrib parserBuffer
rmethod readItem()
// Olvas egy elemet.
// Ret: Az elem, ha OK, nil, ha vge van a streamnek, vagy ha
// hiba volt.
nmethod putParserBuffer(anItem)
// Hozz ad egy elemet a puffer vghez Az elem lehet speci lis is.
nmethod getParserBuffer()
// Kivesz egy elemet a puffer elejr“l.
nmethod unputParserBuffer()
// Kivesz egy elemet a puffer vgr“l.
nmethod ungetParserBuffer(anItem)
// Betesz egy elemet a puffer elejre.
nmethod clearParserBuffer()
// T”rli a parserBuffer()-t.
nmethod rds()
// Olvas egy karatert a readInput()-al a lineBuf-ba.
// Az olvasott rtket a buf-ba is beleteszi, ha az nem az eof.
nmethod unrds(n)
// A buf utols˘ n elemt visszateszi az inputra. Az item-et t”rli.
// Azt adja vissza, hogy h ny elemet siker<65>lt visszatenni.
// Ha az n nil, akkor egyet tesz vissza.
nmethod strParserBuffer()
// Megadja a parserBuffer tartalm t stringknt.
// A nem stringeket eldobja.
nmethod arrayParserBuffer()
// Ad egy t”mb”t, amiben a parserBuffer tartalma van.
rmethod oinit(inputReader,name,errorStream)
metaclass
rmethod onew(inputReader,name,errorStream)