Commit 08f97490 authored by Seblu's avatar Seblu
Browse files

----

ast printer est completement ecrit.
Il ne reste plus qu'a tester pour les noeuds qui ne sont pas encore parser.
----
PARSER:
pipeline OK
and/or OK
list OK
----
GRAMMAR
Changement pour coller a la xsi!
----
beaucoup d'autre truc
parent 6ede8e78
Loading
Loading
Loading
Loading

AUTHORS

0 → 100644
+1 −0
Original line number Diff line number Diff line
Sebastien Luttringer
 No newline at end of file
+3 −4
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ pipeline: ['!'] command ('|' ('\n')* command)*

command:	  simple_command
		| shell_command  (redirection)*
		| funcdec
		| funcdec (redirection)*

simple_command:   (prefix)+
		| (prefix)* (element)+
@@ -24,7 +24,7 @@ shell_command: '{' compound_list '}'
                | rule_case
                | rule_if

funcdec:	['function'] WORD '(' ')' ('\n')* shell_command (redirection)*
funcdec:	['function'] WORD '(' ')' ('\n')* shell_command

redirection:  	  [IONUMBER] '>' WORD
		| [IONUMBER] '<' WORD
@@ -62,4 +62,3 @@ do_group: 'do' compound_list 'done'
case_clause:	case_item (';;' (\n)* case_item)* [;;]

case_item:	['('] WORD ('|' WORD)* ')' ( ('\n')* | compound_list )
 No newline at end of file
+17 −1
Original line number Diff line number Diff line
----
Revoir les free dans le parser a cause de ast_destruct qui rentre dans les fils.
il faudrait ecrire des fonctions qui ne le fasse pas! Voir aussi au niveau de la
boucle general si ast_destruct est appele alors qu'une erreur de parse est surevenur
(le cas echeant, le supprimer)
----
Voir probleme de syntax que j'accepte lorsque un EOF apparait avant une quote
fermante. Le token est valide alors que sous bash non
----
ajotuer le prompt PS3 lorsque l'on parse sur plusieurs ligne
----
parse du case
----
parse du funcdec
----
corriger le bug
 ./42sh  </etc/bash/bashrc
 No newline at end of file
+24 −20
Original line number Diff line number Diff line
@@ -10,23 +10,22 @@ AC_CONFIG_AUX_DIR([build])
# Auto Make init
AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])

echo "Checking locale CFLAGS"
echo "checking CFLAGS..."
# Check platform
AC_CANONICAL_HOST

case $host_os in
  *netbsd*)
	AC_SUBST([CFLAGS], ['-Wall -Werror -W -ansi -pedantic'])
	CFLAGS='-Wall -Werror -W -ansi -pedantic'
	;;
  *osf*)
	AC_SUBST([CFLAGS], ['-Wall -Werror -W -ansi -pedantic -D_XOPEN_SOURCE=600'])
	CFLAGS='-Wall -Werror -W -ansi -pedantic -D_XOPEN_SOURCE=600'
	;;
  *solaris*)
	AC_SUBST([CFLAGS], ['-Wall -Werror -W -ansi -pedantic -D_XOPEN_SOURCE=600'])
	CFLAGS='-Wall -Werror -W -ansi -pedantic -D_XOPEN_SOURCE=600'
	;;
  *linux*)
	AC_SUBST([CFLAGS], ['-Wall -Werror -W -std=c99 -pedantic -D_XOPEN_SOURCE=600'])
	AC_SUBST([LDFLAGS], ['-static'])
	CFLAGS='-Wall -Werror -W -std=c99 -pedantic -D_XOPEN_SOURCE=600'
	;;
  *)
	pl="`uname -s`"
@@ -77,36 +76,41 @@ AC_TYPE_SIZE_T
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

AC_HEADER_STDBOOL
AC_STRUCT_TM

# Check for headers
AC_CHECK_HEADERS([sys/param.h unistd.h])
AC_CHECK_HEADERS([fcntl.h])
AC_CHECK_HEADERS([libintl.h])
AC_CHECK_HEADERS([stddef.h])
AC_CHECK_HEADERS([limits.h])

dnl Memo:
dnl AC ARG WITH(package, help-string, [action-if-given], [action-if-not-given])

AC_ARG_WITH([debug],
  [AS_HELP_STRING([--with-debug], [use -g and don't use -DNDEBUG -O3])],
  [dnl action-if-given: --with-debug => -g || --without-debug => -DNDEBUG
    if test x$withval = xyes; then
  [dnl action-if-given
       CFLAGS="$CFLAGS -g"
    else
      CFLAGS="$CFLAGS -DNDEBUG -O3"
    fi
  ],
  [dnl action-if-not-given: MAINTAINER_MODE => -g || !MAINTAINER_MODE => -DNDEBUG
    # If we are in maintainer mode, we want to have DEBUG (NDEBUG==NO DEBUG)
    # So we simply replace -DNDEBUG by -g
    if test x$MAINTAINER_MODE = xyes; then
      CFLAGS="$CFLAGS -g"
    else
  [dnl action-if-not-given
      CFLAGS="$CFLAGS -DNDEBUG -O3"
    fi
  ]
)

AC_ARG_WITH([efence],
  [AS_HELP_STRING([--with-efence], [link with lib efence])],
  [dnl action-if-given
       LDFLAGS="$LDFLAGS -lefence"
  ],
  [dnl action-if-not-given
       LDFLAGS="$LDFLAGS -static"
  ]
)

AC_SUBST([CFLAGS])
AC_SUBST([LDFLAGS])

# define Autoconf config header
AC_CONFIG_HEADERS([config.h])

doc/xcu_chap02.html

0 → 100644
+2872 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading