Compiler Development (CMPSC 401)
Lexical Analysis: JFlex Janyl Jumadinova February 5, 2019
Janyl Jumadinova Compiler Development (CMPSC 401) February 5, 2019 1 / 9
Compiler Development (CMPSC 401) Lexical Analysis: JFlex Janyl - - PowerPoint PPT Presentation
Compiler Development (CMPSC 401) Lexical Analysis: JFlex Janyl Jumadinova February 5, 2019 Janyl Jumadinova Compiler Development (CMPSC 401) February 5, 2019 1 / 9 Getting jFlex jFlex package and documentation can be obtained from
Janyl Jumadinova Compiler Development (CMPSC 401) February 5, 2019 1 / 9
Janyl Jumadinova Compiler Development (CMPSC 401) February 5, 2019 2 / 9
1 User Code (e.g. import statements), included top of generated Java;
2 Options “Marcos” (named REs); code to be spliced into generated
3 Rule = Pattern + Action. 4 Pattern = Regular Expression. 5 Action = Snippet of Java code (Actions triggered whenever pattern
Janyl Jumadinova Compiler Development (CMPSC 401) February 5, 2019 3 / 9
Janyl Jumadinova Compiler Development (CMPSC 401) February 5, 2019 4 / 9
Janyl Jumadinova Compiler Development (CMPSC 401) February 5, 2019 5 / 9
Janyl Jumadinova Compiler Development (CMPSC 401) February 5, 2019 5 / 9
Janyl Jumadinova Compiler Development (CMPSC 401) February 5, 2019 6 / 9
Janyl Jumadinova Compiler Development (CMPSC 401) February 5, 2019 7 / 9
Janyl Jumadinova Compiler Development (CMPSC 401) February 5, 2019 8 / 9
Janyl Jumadinova Compiler Development (CMPSC 401) February 5, 2019 9 / 9