branch: externals/parser-generator commit aadb31ab2da0e22bd491fc4b803e8a0dac0d8061 Author: Christian Johansson <christ...@cvj.se> Commit: Christian Johansson <christ...@cvj.se>
Updated README.md about FOLLOW-sets --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fdbf223..204af73 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,16 @@ Calculate the e-free-first look-ahead number of terminals of sentential-form `S` ### FOLLOW(S) -*WIP* +Calculate the look-ahead number of terminals possibly following S. + +``` emacs-lisp +(parser--set-grammar '((S A B) (a c d f) ((S (A a)) (A B) (B (c f) d)) S)) +(parser--set-look-ahead-number 2) +(should + (equal + '((a)) + (parser--follow 'A))) +``` ## Test