Parle\RLexer::push

(PECL parle >= 0.5.1)

Parle\RLexer::pushAdd a lexer rule

Beschreibung

public Parle\RLexer::push(string $regex, int $id): void
public Parle\RLexer::push(
    string $state,
    string $regex,
    int $id,
    string $newState
): void
public Parle\RLexer::push(string $state, string $regex, string $newState): void

Push a pattern for lexeme recognition.

A 'start state' and 'exit state' can be specified by using a suitable signature.

Parameter-Liste

regex

Regular expression used for token matching.

id

Token id. If the lexer instance is meant to be used standalone, this can be an arbitrary number. If the lexer instance is going to be passed to the parser, it has to be an id returned by Parle\RParser::tokenid().

state

State name. If '*' is used as start state, then the rule is applied to all lexer states.

newState

New state name, after the rule was applied.

If '.' is specified as the exit state, then the lexer state is unchanged when that rule matches. An exit state with '>' before the name means push. Use the signature without id for either continuation or to start matching, when a continuation or recursion is required.

If '<' is specified as exit state, it means pop. In that case, the signature containing the id can be used to identify the match. Note that even in the case an id is specified, the rule will finish first when all the previous pushes popped.

Rückgabewerte

Es wird kein Wert zurückgegeben.

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

Array auslesen

Scheinbar hast du das in einem der anderen Foren nicht gelesen: Crossposting bedeutet, dass ein und dieselbe Frage in mehreren Foren oder Newsgr ...

Geschrieben von scatello am 04.10.2025 18:10:01
Forum: PHP Developer Forum
Array auslesen

Du bist das Problem. Crosspostings werden in Foren grundsätzlich nicht gerne gesehen. Das habe ich ja verstanden, auch wenn ich das nicht vers ...

Geschrieben von Psygonis am 04.10.2025 17:34:39
Forum: PHP Developer Forum
Array auslesen

Was hast Du für ein Problem? Du bist das Problem. Crosspostings werden in Foren grundsätzlich nicht gerne gesehen.

Geschrieben von scatello am 04.10.2025 16:46:48
Forum: PHP Developer Forum
db Abfrage mit mehreren ids im WHERE

Moin. Wie die Fehlermeldung schon sagt, ist id "ambiguous" -> mehrdeutig. Weil "id" in tabelle1 und tabelle2 vorkommt. Im where einfach id durch ...

Geschrieben von MichaelKre am 04.10.2025 15:21:00
Forum: PHP Developer Forum