From e74e3ad12a9fb787441a67330261a102e6319e1c Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 30 Dec 2017 16:16:30 +0000 Subject: [PATCH 1/3] flex: add page --- pages/common/flex.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pages/common/flex.md diff --git a/pages/common/flex.md b/pages/common/flex.md new file mode 100644 index 000000000..36ed183dd --- /dev/null +++ b/pages/common/flex.md @@ -0,0 +1,16 @@ +# flex + +> Lexical analyser generator. Based on lex. +> Given the specification for a lexical analyser, generates C code implementing it. + +- Generate an analyser from a flex file: + +`lex {{analyser.l}}` + +- Specify the output file: + +`lex {{analyser.l}} --outfile {{analyser.c}}` + +- Compile a C file generated by flex: + +`cc {{path/to/lex.yy.c}} --output {{executable}}` From 4259a67135a8f6443e0fcef576f8d0121a23bde1 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 1 Jan 2018 10:52:18 +0000 Subject: [PATCH 2/3] Update flex.md --- pages/common/flex.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/flex.md b/pages/common/flex.md index 36ed183dd..9d8db23ed 100644 --- a/pages/common/flex.md +++ b/pages/common/flex.md @@ -5,11 +5,11 @@ - Generate an analyser from a flex file: -`lex {{analyser.l}}` +`flex {{analyser.l}}` - Specify the output file: -`lex {{analyser.l}} --outfile {{analyser.c}}` +`flex {{analyser.l}} --outfile {{analyser.c}}` - Compile a C file generated by flex: From 22285c622485a9a9afe3ad70d6236687569f1e92 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Mon, 1 Jan 2018 17:28:25 +0530 Subject: [PATCH 3/3] flex: put lex within backticks --- pages/common/flex.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/flex.md b/pages/common/flex.md index 9d8db23ed..8c67c07c0 100644 --- a/pages/common/flex.md +++ b/pages/common/flex.md @@ -1,6 +1,6 @@ # flex -> Lexical analyser generator. Based on lex. +> Lexical analyser generator. Based on `lex`. > Given the specification for a lexical analyser, generates C code implementing it. - Generate an analyser from a flex file: