1[![logo][logo-url]][reflex-url]
2
3The examples with Bison require the installation of [Bison][bison-url].
4
5Examples with RE/flex C++ lexer methods
6---------------------------------------
7
8- `minic.l,` `minic.y`, `minic.hpp`, and `minicdemo.c` Mini C compiler with Bison 3.2 C++ complete parser, generates Java bytecode in class files
9- `braille.l` a braille translator, inspired by the re2c example but extended and fixed to make it usable
10- `ptokens.l` and `pdefs.l` a Python source tokenizer
11- `calc.l` and `calc.y` calculator with Bison 3.2 bison-bridge parser, supports Unicode identifier variables, resolves input errors
12- `csv.l` scanner to parse CSV rows from a file into a C++ vector
13- `yaml.l` YAML 1.2 parser and writer
14- `indent1.l` indentation detection and reformatting example, basic
15- `indent2.l` indentation detection and reformatting example, advanced with start conditions
16- `unicode.l` a very simple Unicode word matcher to demonstrate Unicode matching
17- `scanstrings.l` demonstrates string and buffer scanning
18- `mmap.l` demonstrates mmap(2) to scan C/C++ source code files fast with RE/flex read-only memory scanning
19- `gz.l` demonstrates scanning zlib-compressed (and uncompressed) C/C++ source code files
20- `dos.l` demonstrates scanning DOS-formatted files with `reflex::BufferedInput::dos_streambuf`
21- `fastfind.l` demonstrates fast search for patterns in input, rather than scanning the input
22- `tag.l` simple lexer to print out all XML/HTML tags
23- `tag_lazy.l` simple lexer to print XML/HTML tags, uses lazy quants
24- `tag_lazystates.l` lexer to print XML tags, uses lazy quants and states
25- `tag_unicode.l` lexer to print XML tags, uses lazy quants and states, checks UTF-8 validity
26- `tag_tidy.l` lexer to tidy and normalize HTML
27- `cow.l` scanner to convert cows
28- `cows.l` scanner to convert cows, uses word boundary anchors
29- `reflexexample3.l` example RE/flex scanner adapted from the Flex documentation with C bison
30- `reflexexample3.lxx` example RE/flex scanner adapted from the Flex documentation with C++ bison
31- `reflexexample4.l` example RE/flex scanner adapted from the Flex documentation with C bison-bridge
32- `reflexexample4.lxx` example RE/flex scanner adapted from the Flex documentation with C++ bison-bridge
33- `reflexexample5.l` example RE/flex scanner adapted from the Flex documentation with C bison-bridge
34- `reflexexample5.lxx` example RE/flex scanner adapted from the Flex documentation with C++ bison-bridge
35- `reflexexample6.l` example RE/flex reentrant scanner with state stacks
36- `reflexexample7.l` example RE/flex scanner adapted from the Flex documentation with C bison-locations
37- `reflexexample7.lxx` example RE/flex scanner adapted from the Flex documentation with C++ bison-locations
38- `reflexexample8.l` example RE/flex scanner adapted from the Flex documentation with C bison-bridge and bison-locations
39- `reflexexample8.lxx` example RE/flex scanner adapted from the Flex documentation with C++ bison-bridge and bison-locations
40- `reflexexample9.lxx` example RE/flex scanner with Bison 3.0 %skeleton "lalr1.cc" C++ parser with bison-cc and bison-locations
41- `reflexexample10.l` example RE/flex scanner adapted from the Flex documentation to use multiple buffers
42- `reflexexample11.lxx` example RE/flex scanner with Bison 3.2 C++ bison-complete and bison-locations
43
44Examples with the backward-compatible Flex lexer functions
45----------------------------------------------------------
46
47- `json.l` JSON parser and writer
48- `ctokens.l` and `cdefs.l` a C/C++ source tokenizer
49- `jtokens.l` and `jdefs.l` a Java source tokenizer, meets the official Java Lexical Structure requirements
50- `readline.l` demonstrates scanning with readline(3) interactive input
51- `yyscanstrings.l` demonstrates string and buffer scanning
52- `echo.l` classic interactive scanner to echo input
53- `wc.l` word count example
54- `wcu.l` word count example with Unicode matching (RE/flex only)
55- `wcpp.l` word count example with lexer class variables
56- `wcwc.l` word count example with custom lexer class
57- `flexexample1.l` example taken from the Flex documentation
58- `flexexample2.l` example from <http://matt.might.net/articles/standalone-lexers-with-lex>
59- `flexexample3.l` example from the Flex documentation with C bison
60- `flexexample3.lxx` example from the Flex documentation with C++ bison
61- `flexexample4.l` example from the Flex documentation with C bison-bridge
62- `flexexample4.lxx` example from the Flex documentation with C++ bison-bridge
63- `flexexample5.l` example from the Flex documentation with C bison-bridge
64- `flexexample5.lxx` example from the Flex documentation with C++ bison-bridge
65- `flexexample6.l` example reentrant scanner with state stacks
66- `flexexample7.l` example from the Flex documentation with C bison-locations
67- `flexexample7.lxx` example from the Flex documentation with C++ bison-locations
68- `flexexample8.l` example from the Flex documentation with C bison-bridge and bison-locations
69- `flexexample8.lxx` example from the Flex documentation with C++ bison-bridge and bison-locations
70- `flexexample9.lxx` example Bison 3.0 %skeleton "lalr1.cc" C++ parser with bison-cc and bison-locations
71- `flexexample10.l` example from the Flex documentation to use multiple buffers
72- `reflexexample11.lxx` example reentrant scanner with Bison 3.2 C++ bison-complete and bison-locations
73
74Regex pattern matching with the easy-to-use RE/flex regex API
75-------------------------------------------------------------
76
77- `cards.cpp` RE/flex regex API demo: matches credit card numbers (uses the fast RE/flex regex matcher)
78- `cvt2utf` demonstrates `reflex::Input` UTF-8 normalization to convert files to UTF-8/16/32
79- `fastsearch.cpp` demonstrates super fast search with regex patterns compiled to C++ (typically much faster than any grep tool)
80- `ugrep.cpp` file searcher (simple version), [fully-featured high-performance version on GitHub](https://github.com/Genivia/ugrep)
81- `url_boost.cpp` RE/flex regex API demo: capture domain, path, and query keys from URLs (uses the Boost.Regex library)
82- `url_pcre2.cpp` RE/flex regex API demo: capture domain, path, and query keys from URLs (uses the PCRE2 library)
83
84[logo-url]: https://www.genivia.com/images/reflex-logo.png
85[reflex-url]: https://www.genivia.com/get-reflex.html
86[manual-url]: https://www.genivia.com/doc/reflex/html
87[bison-url]: http://dinosaur.compilertools.net/#bison
88