Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Frage zu LL(1) Grammatiken

Empfohlene Antworten

Veröffentlicht

Hallo,

ich stehe hier vor folgender noch-nicht ;-) LL(1) Grammatik:

Das ganze soll einfache arithmetische Ausdrücke behandeln:

E-> E + E

E -> E * E

E -> ( E )

E -> num

Alles aus den grossen E s sind terminalsymbole.

Nun hab ich folgendes als lösung:

Hier wurden die Linksrekursionen entfernt:

E -> num R

E -> ( E )

R -> + ER

R -> * ER

R -> epsilon

wieder ausser großbuchstaben alles Terminalymbole.

Diese Lösung verstehe ich allerdings nicht ganz, ich dachte immer wenn die Linksrekursionen entfernt wurden, sollte alles 100% eindeutig sein... ist es meiner meinung aber nicht weil der parser ja nicht weiss welche E-> bzw. welches R-> er nehmen sollte.

Hat da jemand einen Tipp für mich?

danke & lg

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.