Skip to content

Commit

Permalink
TokenValue::Indent, TokenValue::Unindent, TokenValue::Justify
Browse files Browse the repository at this point in the history
Classify them as formatting tokens.  Remove TokenValue::Artificial.
  • Loading branch information
GabrielDosReis committed Jan 15, 2017
1 parent b565626 commit 77be242
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 24 deletions.
20 changes: 10 additions & 10 deletions configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for OpenAxiom 1.5.0-2017-01-02.
# Generated by GNU Autoconf 2.69 for OpenAxiom 1.5.0-2017-01-15.
#
# Report bugs to <open-axiom-bugs@lists.sf.net>.
#
Expand Down Expand Up @@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='OpenAxiom'
PACKAGE_TARNAME='openaxiom'
PACKAGE_VERSION='1.5.0-2017-01-02'
PACKAGE_STRING='OpenAxiom 1.5.0-2017-01-02'
PACKAGE_VERSION='1.5.0-2017-01-15'
PACKAGE_STRING='OpenAxiom 1.5.0-2017-01-15'
PACKAGE_BUGREPORT='open-axiom-bugs@lists.sf.net'
PACKAGE_URL=''

Expand Down Expand Up @@ -1421,7 +1421,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures OpenAxiom 1.5.0-2017-01-02 to adapt to many kinds of systems.
\`configure' configures OpenAxiom 1.5.0-2017-01-15 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1496,7 +1496,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of OpenAxiom 1.5.0-2017-01-02:";;
short | recursive ) echo "Configuration of OpenAxiom 1.5.0-2017-01-15:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1613,7 +1613,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
OpenAxiom configure 1.5.0-2017-01-02
OpenAxiom configure 1.5.0-2017-01-15
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2430,7 +2430,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by OpenAxiom $as_me 1.5.0-2017-01-02, which was
It was created by OpenAxiom $as_me 1.5.0-2017-01-15, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ $0 $@
Expand Down Expand Up @@ -3449,7 +3449,7 @@ fi

# Define the identity of the package.
PACKAGE='openaxiom'
VERSION='1.5.0-2017-01-02'
VERSION='1.5.0-2017-01-15'


cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -20087,7 +20087,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by OpenAxiom $as_me 1.5.0-2017-01-02, which was
This file was extended by OpenAxiom $as_me 1.5.0-2017-01-15, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -20157,7 +20157,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
OpenAxiom config.status 1.5.0-2017-01-02
OpenAxiom config.status 1.5.0-2017-01-15
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -33,7 +33,7 @@ dnl Makefiles for building OpenAxiom interpreter, compiler, libraries, and
dnl auxiliary tools where appropriate.
dnl

AC_INIT([OpenAxiom], [1.5.0-2017-01-02],
AC_INIT([OpenAxiom], [1.5.0-2017-01-15],
[open-axiom-bugs@lists.sf.net])

dnl Most of the macros used in this configure.ac are defined in files
Expand Down
7 changes: 7 additions & 0 deletions src/ChangeLog
@@ -1,3 +1,10 @@
2017-01-15 Gabriel Dos Reis <gdr@axiomatics.org>

* include/open-axiom/token (TokenValue::Indent,
TokenValue::Unindent, TokenValue::Justify): Move definition to..
* include/open-axiom/token-value: ...here.
* syntax/token.cxx (operator<<): Adjust.

2017-01-02 Gabriel Dos Reis <gdr@axiomatics.org>

* lib/Makefile.in (core_SOURCES): Include files for IO,
Expand Down
4 changes: 0 additions & 4 deletions src/include/open-axiom/token
Expand Up @@ -66,10 +66,6 @@ namespace OpenAxiom {
#define OPENAXIOM_DEFINE_TOKEN(T, ...) T,
#include <open-axiom/token-value>
#undef OPENAXIOM_DEFINE_TOKEN
Artificial, // Tokens after this are artificial
Indent, // new line indentation, greater than previous
Unindent, // new line indentation, less than previous
Justify, // align indentation with preceding line.

EndOfStream // end of token stream
};
Expand Down
6 changes: 5 additions & 1 deletion src/include/open-axiom/token-value
@@ -1,5 +1,5 @@
// -*- C++ -*-
// Copyright (C) 2014, Gabriel Dos Reis.
// Copyright (C) 2014-2017, Gabriel Dos Reis.
// All rights reserved.
// Written by Gabriel Dos Reis.
//
Expand Down Expand Up @@ -144,3 +144,7 @@ OPENAXIOM_DEFINE_TOKEN(Until, "until", Keyword, Language::BootSpad)
OPENAXIOM_DEFINE_TOKEN(With, "with", Keyword, Language::Spad)
OPENAXIOM_DEFINE_TOKEN(Where, "where", Keyword, Language::BootSpad)
OPENAXIOM_DEFINE_TOKEN(While, "while", Keyword, Language::BootSpad)

OPENAXIOM_DEFINE_TOKEN(Indent, "<indent>", Formatting, Language::All)
OPENAXIOM_DEFINE_TOKEN(Unindent, "<unindent>", Formatting, Language::All)
OPENAXIOM_DEFINE_TOKEN(Justify, "<justify>", Formatting, Language::All)
11 changes: 3 additions & 8 deletions src/syntax/token.cxx
Expand Up @@ -101,15 +101,10 @@ namespace OpenAxiom {

std::ostream&
operator<<(std::ostream& os, TokenValue tv) {
if (tv < TokenValue::Artificial)
if (tv < TokenValue::EndOfStream)
os << token_map[uint8_t(tv)].text;
else switch (tv) {
case TokenValue::Indent: os << "%INDENT"; break;
case TokenValue::Unindent: os << "%UNIDENT"; break;
case TokenValue::Justify: os << "%JUSTIFY"; break;
default: os << "%ALIEN"; break;
}

else
os << "%ALIEN";
return os;
}

Expand Down

0 comments on commit 77be242

Please sign in to comment.