Commit 4b043d0a authored by Kim Nguyễn's avatar Kim Nguyễn
Browse files

Remove leftover file and add a Makefile rule to build plugins.

parent 88146622
......@@ -115,10 +115,17 @@ endif
STDLIB_CD=$(shell ls stdlib/*.cd)
STDLIB_CDO=$(STDLIB_CD:.cd=.cdo)
STDLIB_ML=$(shell ls stdlib/*.ml)
STDLIB_CMO=$(STDLIB_ML:.ml=.cmo)
STDLIB_CMXS=$(STDLIB_ML:.ml=.cmxs)
STDLIB_OBJS := $(STDLIB_CMO)
INSTALL := install -c
ifeq ($(NATIVE),true)
STDLIB_OBJS += $(STDLIB_CMXS)
.PHONY: cduce_lib.cma stdlib
cduce_lib.cma:
$(HIDE)$(MAKE) NATIVE=false $@
......@@ -481,6 +488,10 @@ make_buildflags:
@echo "Build $@"
$(HIDE) $(CAMLC) -c $(SYNTAX_PARSER) $(INCLUDES) $<
%.cmxs: %.ml .buildflags
@echo "Build $@"
$(HIDE) $(CAMLOPT) -o $@ -shared $(SYNTAX_PARSER) $(INCLUDES) $<
include depend
cduceres.o: win32/cduce.rc win32/cduce_logo-bw.ico
......@@ -499,7 +510,7 @@ cduceres.o: win32/cduce.rc win32/cduce_logo-bw.ico
# Stdlib
stdlib: $(STDLIB_CDO)
stdlib: $(STDLIB_CMXS) $(STDLIB_CMO) $(STDLIB_CDO)
%.cdo: %.cd cduce
@echo "Build $@"
......
type space = ('\x20;'|'\x9;'|'\xD;'|'\xA;')
type digit = '0' -- '9'
type char = ('a' -- 'z' | 'A' -- 'Z' | digit | '<' | '>')
type cTi = "<xsd:complexType>"
let regexp ( s : String ) : String =
match s with
(* timezone_RE_raw *)
['Z'] -> "timezone_RE_raw +00:00"
| [ (x::('+'|'-'))? (h::digit)**2 ':' (m::digit)**2 ]
-> "timezone_RE_raw " @ x @ h @ ":" @ m
(* date_RE_raw *)
| [ (y::digit)**4 '-' (m::digit)**2 '-' (d::digit)**2 ]
-> "date_RE_raw " @ y @ "-" @ m @ "-" @ d
(* time_RE_raw *)
| [ (h::digit)**2 ':' (m::digit)**2 ':' (s::digit)**2 ]
-> "time_RE_raw " @ h @ ":" @ m @ ":" @ s
| [ '<xsd:complexType>' space*
'<xsd:sequence>' space*
('<xsd:element' space* ('name=\"'(n::char)*'\"') space* '>')* space*
'</xsd:element>' space*
'</xsd:sequence>' space*
'</xsd:complexType>' space* ]
-> "complexType > sequence > element > name : " @ n
"13:17:00"
"<xsd:complexType>
<xsd:sequence>
<xsd:element name=\"productName\">
</xsd:element>
</xsd:sequence>
</xsd:complexType>"
] in
List.iter println (List.map string_of (List.map regexp x))
;;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment