dlg(1)
dlg(1) π the DFA Lexical Analyzer Generator, bestie
okay so this is a page from the PCCTS Manual Pages, and today we're talking about dlg β the DFA Lexical Analyzer Generator. she's a compiler-tools girlie and she's literally so good at her job. let's get into it π¦
β¨ NAME β¨
dlg β DFA Lexical Analyzer Generator
πΈ SYNTAX πΈ
dlg [options] lexical_spec [output_file]
π DESCRIPTION π
so dlg is the tool that produces fast deterministic finite automata for recognizing regular expressions in input. that's it, that's the vibe. she takes your regular expressions and turns them into a DFA that absolutely ate. no cap. π
π OPTIONS π
-CCβ generate C++ output. heads up bestie, in this case theoutput_fileis not specified. it's giving "we don't do that here." π-C[ level]β wherelevelis the compression level used:0means no compression1removes all unused characters from the transition table2maps equivalent characters into the same character classes
the suggestion on the table? use -C2, because it will significantly reduce the size of the dfa produced for the lexical analyzer. trust, it's the move. π₯
-mβ produces the header file for the lexical mode with a name other than the default name ofmode.h.-iβ an interactive, or as interactive as possible, parser is produced. a character is only obtained when required to decide which state to go to. some care must be taken to obtain accept states that do not require look ahead at the next character to determine if that is the stop state. and listen β any regular expression with a Kleene closure at the end is guaranteed to require another character of look ahead. so watch out for that one, she will make you peek π-clclassβ specify a class name for DLG to generate. the default isDLGLexer."class"will be a subclass ofDLGLexerBase; only used for-CC.-ciβ the automaton will treat upper and lower case characters identically. this is accomplished in the automaton; the characters in the lexical buffer are unmodified. so the vibe is case-insensitive but the actual data stays untouched π-csβ upper and lower case characters are treated as distinct. this is the default.-odirβ directory where output files should go (default="."). this is very nice for keeping the source directory clear of ANTLR and DLG spawn. clean girl aesthetic fr fr π§Ήβ¨-Wambiguityβ warns if more than one regular expression could match the same character sequence. the warnings give the numbers of the expressions in the dlg lexical specification file, and the numbering of the expressions starts at one. multiple warnings may be printed for the same expressions.-β used in place of file names to get input from standard in or send output to standard out. the little dash that does everything π«Ά
π SPECIAL CONSIDERATIONS π
okay this is the part where we get real for a sec.
Dlg works... we think. π there is no implicit guarantee of anything.
we reserve no legal rights to the software known as the Purdue Compiler Construction Tool Set (PCCTS) β PCCTS is in the public domain. an individual or company may do whatever they wish with source code distributed with PCCTS or the code generated by PCCTS, including the incorporation of PCCTS, or its output, into commercial software.
we encourage users to develop software with PCCTS. however, we do ask that credit is given to us for developing PCCTS. by "credit", we mean that if you incorporate our source code into one of your programs (commercial product, research project, or otherwise) that you acknowledge this fact somewhere in the documentation, research report, etc...
if you like PCCTS and have developed a nice tool with the output, please mention that you developed it using PCCTS.
as long as these guidelines are followed, we expect to continue enhancing this system and expect to make other tools available as they are completed. so like... be cool, give credit, everybody wins π
π FILES π
mode.hdlgauto.hdlgdef.h
π₯ SEE ALSO π₯
antlr(1)pccts(1)
π BUGS π
...this section is literally empty on the page. no bugs listed. we love a clean slate, we love a bug-free era, we're simply not going to question it π
that's the whole page bestie! this was dlg(1) from the PCCTS Manual Pages, and the footer says DLG, dated April 1994. yeah, she's vintage. a 1994 icon. periodt. πβ¨π
π¦ where this page comes from
- debian bookworm: pccts 1.33MR33-6.3
- debian trixie: pccts 1.33MR33-6.5 Β· public_domain
- ubuntu jammy: pccts 1.33MR33-6.1
- ubuntu noble: pccts 1.33MR33-6.3
- ubuntu questing: pccts 1.33MR33-6.5
- ubuntu resolute: pccts 1.33MR33-6.6 Β· public_domain
- ubuntu stonking: pccts 1.33MR33-6.6 Β· public_domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms