Merge git://spitspat.com/git/factor

release
Doug Coleman 2007-12-03 23:57:40 -06:00
commit c8ff8bfafb
12 changed files with 70 additions and 11 deletions

View File

@ -0,0 +1 @@
Doug Coleman

View File

@ -0,0 +1,10 @@
USING: editors io.launcher kernel math.parser namespaces ;
IN: editors.emeditor
: emeditor ( file line -- )
[
\ emeditor get-global % " /l " % #
" " % "\"" % % "\"" %
] "" make run-detached ;
[ emeditor ] edit-hook set-global

View File

@ -0,0 +1 @@
EmEditor integration

View File

@ -0,0 +1 @@
Doug Coleman

View File

@ -0,0 +1 @@
TED Notepad integration

View File

@ -0,0 +1,10 @@
USING: editors io.launcher kernel math.parser namespaces ;
IN: editors.ted-notepad
: ted-notepad ( file line -- )
[
\ ted-notepad get-global % " /l" % #
" " % %
] "" make run-detached ;
[ ted-notepad ] edit-hook set-global

View File

@ -0,0 +1 @@
Doug Coleman

View File

@ -0,0 +1 @@
UltraEdit editor integration

View File

@ -0,0 +1,12 @@
USING: editors io.launcher kernel math.parser namespaces ;
IN: editors.ultraedit
: ultraedit ( file line -- )
[
\ ultraedit get-global % " " % swap % "/" % # "/1" %
] "" make run-detached ;
! Put the path in your .factor-boot-rc
! "K:\\Program Files (x86)\\IDM Computer Solutions\\UltraEdit-32\\uedit32.exe" \ ultraedit set-global
[ ultraedit ] edit-hook set-global

View File

@ -149,9 +149,3 @@ IN: scratchpad
{ { } } [
"234" "1" token <+> parse list>array
] unit-test
[ "a" "a" token <!> parse-1 ] unit-test-fails
[ t ] [ "b" "a" token <!> parse-1 >boolean ] unit-test
[ t ] [ "b" "ab" token <!> parse-1 >boolean ] unit-test

View File

@ -2,6 +2,7 @@ USING: arrays combinators kernel lazy-lists math math.parser
namespaces parser parser-combinators parser-combinators.simple
promises quotations sequences combinators.lib strings macros
assocs prettyprint.backend ;
USE: io
IN: regexp
: or-predicates ( quots -- quot )
@ -40,7 +41,7 @@ MACRO: fast-member? ( str -- quot )
dup alpha? swap punct? or ;
: 'ordinary-char' ( -- parser )
[ "\\^*+?|(){}[" fast-member? not ] satisfy
[ "\\^*+?|(){}[$" fast-member? not ] satisfy
[ [ = ] curry ] <@ ;
: 'octal-digit' ( -- parser ) [ octal-digit? ] satisfy ;
@ -158,23 +159,39 @@ C: <group-result> group-result
'char' <|>
'character-class' <|> ;
: 'interval' ( -- parser )
: 'greedy-interval' ( -- parser )
'simple' 'integer' "{" "}" surrounded-by <&> [ first2 exactly-n ] <@
'simple' 'integer' "{" ",}" surrounded-by <&> [ first2 at-least-n ] <@ <|>
'simple' 'integer' "{," "}" surrounded-by <&> [ first2 at-most-n ] <@ <|>
'simple' 'integer' "," token <& 'integer' <&> "{" "}" surrounded-by <&> [ first2 first2 from-m-to-n ] <@ <|> ;
: 'repetition' ( -- parser )
: 'interval' ( -- parser )
'greedy-interval'
'greedy-interval' "?" token <& [ "reluctant {}" print ] <@ <|>
'greedy-interval' "+" token <& [ "possessive {}" print ] <@ <|> ;
: 'greedy-repetition' ( -- parser )
'simple' "*" token <& [ <*> ] <@
'simple' "+" token <& [ <+> ] <@ <|>
'simple' "?" token <& [ <?> ] <@ <|> ;
: 'repetition' ( -- parser )
'greedy-repetition'
'greedy-repetition' "?" token <& [ "reluctant" print ] <@ <|>
'greedy-repetition' "+" token <& [ "possessive" print ] <@ <|> ;
: 'term' ( -- parser )
'simple' 'repetition' 'interval' <|> <|>
<+> [ <and-parser> ] <@ ;
LAZY: 'regexp' ( -- parser )
'term' "|" token nonempty-list-of [ <or-parser> ] <@ ;
'term' "|" token nonempty-list-of [ <or-parser> ] <@
"^" token 'term' "|" token nonempty-list-of [ <or-parser> ] <@
&> [ "caret" print ] <@ <|>
'term' "|" token nonempty-list-of [ <or-parser> ] <@
"$" token <& [ "dollar" print ] <@ <|>
"^" token 'term' "|" token nonempty-list-of [ <or-parser> ] <@ &>
"$" token [ "caret dollar" print ] <@ <& <|> ;
TUPLE: regexp source parser ;

View File

@ -105,6 +105,7 @@ find_architecture() {
i386) ARCH=x86;;
i686) ARCH=x86;;
*86) ARCH=x86;;
*86_64) ARCH=x86;;
"Power Macintosh") ARCH=ppc;;
esac
}
@ -142,6 +143,9 @@ echo_build_info() {
set_build_info() {
if ! [[ -n $OS && -n $ARCH && -n $WORD ]] ; then
echo "OS: $OS"
echo "ARCH: $ARCH"
echo "WORD: $WORD"
echo "OS, ARCH, or WORD is empty. Please report this"
exit 5
fi
@ -170,6 +174,7 @@ git_clone() {
}
git_pull_factorcode() {
echo "Updating the git repository from factorcode.org..."
git pull git://factorcode.org/git/factor.git
check_ret git
}
@ -216,7 +221,7 @@ bootstrap() {
}
usage() {
echo "usage: $0 install|update"
echo "usage: $0 install|install-x11|update"
}
install() {
@ -244,8 +249,13 @@ update() {
bootstrap
}
install_libraries() {
sudo apt-get install libc6-dev libfreetype6-dev wget git-core git-doc libx11-dev glutg3-dev
}
case "$1" in
install) install ;;
install-x11) install_libraries; install ;;
update) update ;;
*) usage ;;
esac