Pensare che ho scritto tanto sui parser sax, pensando che non sarebbero mai serviti a nessuno. Eppure se uno ci pensa, un parser sax ragiona esattamente come ragionerebbe una persona che si trova davanti un file, con tante righe scritte una dietro l’altra, e deve capire se quella riga si riferisca all’inizio di un prossimo record o se sia un campo di un record attuale.
Ad esempio, se io ho un file con
1. If a table does not have MANDT as part of the primary key, it is ____.
A: A structure
B: Invalid
C: Client-independent
D: Not mandatory
2. In regard to CALL, which of the following is NOT a valid statement?
A: CALL FUNCTION
B: CALL SCREEN
C: CALL TRANSACTION
D: CALL PROGRAM
3. An event starts with an event keyword and ends with:
A: Program execution.
B: END-OF-EVENT.
C: Another event keyword.
D: END-EVENT.
Da cosa capisco quando inizia un’altra domanda e quando invece una riga è una possibile risposta alla domanda precedente?
Il caso ha voluto che in quest’esempio la domanda occupi un rigo, poi le quattro righe successive sono le 4 opzioni possibili, e che ci sia un rigo vuoto per definire la fine della domanda. Ma poniamo il caso ci sia una domanda formulata in questo modo
6. The following code indicates:
SELECT fld1 fld2 FROM tab1 APPENDING TABLE itab
WHERE fld1 IN sfld1.
A: Add rows to the existing rows of itab.
B: Add rows to itab after first deleting any existing rows of itab.
C: Select rows from tab1 for matching itab entries.
D: Nothing, this is a syntax error.
7. You may change the following data object as shown below so that it equals 3.14.
CONSTANTS: PI type P decimals 2 value '3.1'.
PI = '3.14'.
A: True
B: False
Adesso come la mettiamo? Le domande si possono estendere su più righe, e le risposte possono non essere 4 ma solo 2 (vero o falso). Nessuna idea? Io una mezza idea me la sono fatta. (more…)