Skip to content

Commit

Permalink
Add offside-rule-with-brace.l, Makefile, & README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
IepIweidieng committed Jan 6, 2021
0 parents commit d6a1d8f
Show file tree
Hide file tree
Showing 3 changed files with 637 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
TARGET := offside-rule-with-brace-scanner

DEBUG :=
DEBUG_ := NO
DEBUG_MODE := ${DEBUG_${DEBUG}}DEBUG

CC := g++
CFLAGS_WARN := -std=c++11 -Wall -Wextra -pedantic-errors
CFLAGS_DEBUG := -ggdb3
CFLAGS_NODEBUG := -O2
CFLAGS := ${CFLAGS_WARN} ${CFLAGS_${DEBUG_MODE}}

LEX := flex
LFLAGS_DEBUG := -b -p -L
LFLAGS_NODEBUG := -Cfe
LFLAGS := ${LFLAGS_${DEBUG_MODE}}

VERBOSE :=
VERBOSE_ := @
Q := ${VERBOSE_${VERBOSE}}

all: ${TARGET}

${TARGET}: offside-rule-with-brace.yy.c
${Q}${CC} ${CFLAGS} -o $@ $<

%.yy.c: %.l
${Q}${LEX} ${LFLAGS} -o $@ $<

clean:
${Q}rm -f ${TARGET} *.yy.c
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Offside Rule with Brace

There are 5 different indentation tokens:
- `FRONT_INDENTED`
- Increases indentation level
- `NO_INDENTED`
- Do not affect indentation level
- `BACK_INDENTED`
- Decreases indentation level
- `SEMI_NO_INDENTED`
- Do not affect indentation level
- `SEMI_BACK_INDENTED`
- Decreases indentation **width**
Loading

0 comments on commit d6a1d8f

Please sign in to comment.