From 6397e2c27547bfbd048358f6460f85f74c0e7666 Mon Sep 17 00:00:00 2001 From: Alvaro Denis Date: Fri, 4 Jan 2019 16:56:10 -0500 Subject: [PATCH] update flex simple example link --- README.asciidoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.asciidoc b/README.asciidoc index 888bdca..06bb0d4 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -24,9 +24,8 @@ but it is especially suited for tokenizing Go code. == Example == -http://flex.sourceforge.net/manual/Simple-Examples.html[One simple example in -the Flex manual] is a scanner that counts characters and lines. The program is -similar in Nex: +https://westes.github.io/flex/manual/Simple-Examples.html#Simple-Examples[One simple example in the Flex manual] +is a scanner that counts characters and lines. The program is similar in Nex: ------------------------------------------ /\n/{ nLines++; nChars++ } @@ -88,13 +87,14 @@ and must run `nex` without the `-s` option: We could avoid defining a struct by using globals instead, but even then we need a throwaway definition of yySymType. -The yy prefix can be modified by adding `-y` option. When using yacc, it must use the same prefix: +The yy prefix can be modified by adding `-y` option. When using yacc, it must +use the same prefix: $ nex -p YY lc.nex && go tool yacc -p YY && go run lc.nn.go y.go == Toy Pascal == -The Flex manual also exhibits a http://flex.sourceforge.net/manual/Simple-Examples.html[scanner for a toy Pascal-like language], +The Flex manual also exhibits a https://westes.github.io/flex/manual/Simple-Examples.html#Simple-Examples[scanner for a toy Pascal-like language], though last I checked, its comment regex was a little buggy. Here is a modified Nex version, without string-to-number conversions: