view libinterp/parse-tree/module.mk @ 19010:3fb030666878 draft default tip dspies

Added special-case logical-indexing function * logical-index.h (New file) : Logical-indexing function. May be called on octave_value types via call_bool_index * nz-iterators.h : Add base-class nz_iterator for iterator types. Array has template bool for whether to internally store row-col or compute on the fly Add skip_ahead method which skips forward to the next nonzero after its argument Add flat_index for computing octave_idx_type index of current position (with assertion failure in the case of overflow) Move is_zero to separate file * ov-base-diag.cc, ov-base-mat.cc, ov-base-sparse.cc, ov-perm.cc (do_index_op): Add call to call_bool_index in logical-index.h * Array.h : Move forward-declaration for array_iterator to separate header file * dim-vector.cc (dim_max): Refers to idx-bounds.h (max_idx) * array-iter-decl.h (New file): Header file for forward declaration of array-iterator * direction.h : Add constants fdirc and bdirc to avoid having to reconstruct them * dv-utils.h, dv-utils.cc (New files) : Utility functions for querying and constructing dim-vectors * idx-bounds.h (New file) : Utility constants and functions for determining whether things will overflow the maximum allowed bounds * interp-idx.h (New function : to_flat_idx) : Converts row-col pair to linear index of octave_idx_type * is-zero.h (New file) : Function for determining whether an element is zero * logical-index.tst : Add tests for correct return-value dimensions and large sparse matrix behavior
author David Spies <dnspies@gmail.com>
date Fri, 25 Jul 2014 13:39:31 -0600
parents fe505ff21d5b
children
line wrap: on
line source

EXTRA_DIST += \
  parse-tree/module.mk \
  parse-tree/oct-parse.in.yy \
  parse-tree/octave.gperf

PARSER_INC = \
  parse-tree/lex.h \
  parse-tree/parse.h

PARSER_SRC = \
  parse-tree/lex.ll \
  parse-tree/oct-parse.yy

PARSE_TREE_INC = \
  parse-tree/pt-all.h \
  parse-tree/pt-arg-list.h \
  parse-tree/pt-array-list.h \
  parse-tree/pt-assign.h \
  parse-tree/pt-binop.h \
  parse-tree/pt-bp.h \
  parse-tree/pt-cbinop.h \
  parse-tree/pt-cell.h \
  parse-tree/pt-check.h \
  parse-tree/pt-classdef.h \
  parse-tree/pt-cmd.h \
  parse-tree/pt-colon.h \
  parse-tree/pt-const.h \
  parse-tree/pt-decl.h \
  parse-tree/pt-eval.h \
  parse-tree/pt-except.h \
  parse-tree/pt-exp.h \
  parse-tree/pt-fcn-handle.h \
  parse-tree/pt-funcall.h \
  parse-tree/pt-id.h \
  parse-tree/pt-idx.h \
  parse-tree/pt-jump.h \
  parse-tree/pt-loop.h \
  parse-tree/pt-mat.h \
  parse-tree/pt-misc.h \
  parse-tree/pt-pr-code.h \
  parse-tree/pt-select.h \
  parse-tree/pt-stmt.h \
  parse-tree/pt-unop.h \
  parse-tree/pt-walk.h \
  parse-tree/pt.h \
  parse-tree/token.h

PARSE_TREE_SRC = \
  parse-tree/pt-arg-list.cc \
  parse-tree/pt-array-list.cc \
  parse-tree/pt-assign.cc \
  parse-tree/pt-binop.cc \
  parse-tree/pt-bp.cc \
  parse-tree/pt-cbinop.cc \
  parse-tree/pt-cell.cc \
  parse-tree/pt-check.cc \
  parse-tree/pt-classdef.cc \
  parse-tree/pt-cmd.cc \
  parse-tree/pt-colon.cc \
  parse-tree/pt-const.cc \
  parse-tree/pt-decl.cc \
  parse-tree/pt-eval.cc \
  parse-tree/pt-except.cc \
  parse-tree/pt-exp.cc \
  parse-tree/pt-fcn-handle.cc \
  parse-tree/pt-funcall.cc \
  parse-tree/pt-id.cc \
  parse-tree/pt-idx.cc \
  parse-tree/pt-jump.cc \
  parse-tree/pt-loop.cc \
  parse-tree/pt-mat.cc \
  parse-tree/pt-misc.cc \
  parse-tree/pt-pr-code.cc \
  parse-tree/pt-select.cc \
  parse-tree/pt-stmt.cc \
  parse-tree/pt-unop.cc \
  parse-tree/pt.cc \
  parse-tree/token.cc

## Special rules for sources which must be built before rest of compilation.

## Don't use a pipeline to process gperf output since if gperf
## is missing but sed is not, the exit status of the pipeline
## will still be success and we will end up creating an empty
## oct-gperf.h file.
parse-tree/oct-gperf.h: parse-tree/octave.gperf
	$(GPERF) -t -C -D -G -L C++ -Z octave_kw_hash $< > $@-t1
	$(SED) 's,lookup\[,gperf_lookup[,' < $@-t1 > $@-t
	mv $@-t $@
	rm -f $@-t1

parse-tree/oct-parse.yy: parse-tree/oct-parse.in.yy
	case "$(BISON_API_PREFIX_DECL_STYLE)" in \
	  *api*) api_prefix_decl='%define api.prefix "octave_"'; ;; \
	  *name*) api_prefix_decl='%name-prefix="octave_"'; ;; \
	esac; \
	case "$(BISON_PUSH_PULL_DECL_STYLE)" in \
	  *quote*) quote='"' ;; \
	  *) quote="" ;; \
	esac; \
	case "$(BISON_PUSH_PULL_DECL_STYLE)" in \
	  *dash*) push_pull_decl="%define api.push-pull $${quote}both$${quote}"; ;; \
	  *underscore*) push_pull_decl="%define api.push_pull $${quote}both$${quote}"; ;; \
	esac; \
	$(SED) -e "s/%PUSH_PULL_DECL%/$$push_pull_decl/" \
	       -e "s/%API_PREFIX_DECL%/$$api_prefix_decl/" $< > $@-t
	mv $@-t $@

noinst_LTLIBRARIES += \
  parse-tree/libparse-tree.la \
  parse-tree/libparser.la

parse_tree_libparse_tree_la_SOURCES = $(PARSE_TREE_SRC)
parse_tree_libparse_tree_la_CPPFLAGS = $(liboctinterp_la_CPPFLAGS)

parse_tree_libparser_la_SOURCES = $(PARSER_SRC)
parse_tree_libparser_la_CPPFLAGS = $(liboctinterp_la_CPPFLAGS)
parse_tree_libparser_la_CXXFLAGS = \
  $(filter-out -Wold-style-cast, $(AM_CXXFLAGS))