We'll be in Hobbs 113.
/* Lex file to recognize integer literals and words Will Briggs CS 322 Spring 2018 */ %{ #include <stdio.h> %} %% [0123456789]+ printf("INT_LITERAL\n"); [a-zA-Z][a-zA-Z0-9]* printf("WORD\n"); %%All you need to know about C I/O is here.
5. Now, for grins, add the ability to your lex file to skip whitespace; and to recognize (),+-. Hint: if a character means something in lex (like + or ( ), put \ in front of it.
If you want to never have to type ./ for a command again:
cd ~
emacs .profile &
add this line to the end:
$PATH = "$PATH:."
and save.
To make editing easier, Escape, X, makefile-mode. There doesn't seem to be a lex mode, but makefile-mode is close enough. Modes tailor the editor to the type of program you're writing, especially in regard to tabbing.