[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Extending lengaje
From: |
Greg Wooledge |
Subject: |
Re: [Help-bash] Extending lengaje |
Date: |
Tue, 21 Aug 2018 08:51:31 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Mon, Aug 20, 2018 at 08:42:04PM -0700, Azael Reyes wrote:
> I'm experimenting with the code of bash to extend the input lenguaje(don't
> going to obfuscate with detail because is a experiment), I found the
> 'parse.y' file but I think need the lexical file, I'm expecting found some
> file like 'lex.l' or something similar, but there is not somethink like
> that.
Bash doesn't use lex/flex during its build process. It only uses bison
(yacc alternative), in this part of the Makefile:
y.tab.c: parse.y
# -if test -f y.tab.h; then mv -f y.tab.h old-y.tab.h; fi
$(YACC) -d $(srcdir)/parse.y
touch parser-built
# -if cmp -s old-y.tab.h y.tab.h; then mv old-y.tab.h y.tab.h; else cp -p
y.tab.h ${GRAM_H}; fi
y.tab.h: y.tab.c
@true
Whatever you're looking for, it's in the parse.y file or it doesn't exist
at all. I suggest paying close attention to every part where the word
"token" appears.