PPT Slide
book ::= FIELD:f1 SLASH FIELD:f2 SLASH FIELD:f3 SLASH FIELD:f4 SLASH FIELD:f5 EOL
{: System.out.println("Title: " + f1);
System.out.println("Author: " + f2);
System.out.println("Date: " + f3);
System.out.println("ISBN: " + f4);
System.out.println("Publisher: " + f5);
Recall that when the lexer returned
the FIELD token it also returned the
value of that token. We can access that
value by appending a colon after the
token name and then an identifier.
In this case, f4 will contain the value
of this FIELD token. Note how we are
printing out this value in the action