Commit Graph

149 Commits

Author SHA1 Message Date
FUKUZAWA-Tadashi 3bcaeb09b4 refactor heredoc identifier 2013-03-19 11:03:08 +09:00
FUKUZAWA-Tadashi 05e735595e implement literal %W %w %s
refactor string parsing
2013-03-19 11:03:07 +09:00
Masaki Muranaka 3aa3b4af90 Remove stdlib.h from mruby.h. It is for portability (care for freestanding environments).
This is a first step. It will be reduced stdlib.h in each files later.
2013-03-16 21:29:39 +09:00
Yukihiro Matz Matsumoto 243669308d obsolete mrb_object; opposite of bc870ce 2013-03-15 23:16:20 +09:00
Yukihiro Matz Matsumoto 9d0bbdb7f8 use size_t for string length C API 2013-03-14 19:33:38 +09:00
Yukihiro Matz Matsumoto 535a5489c7 remove PARANOID from comments 2013-03-14 18:47:59 +09:00
Yukihiro "Matz" Matsumoto 1ebebd304a Merge pull request #987 from monaka/pr-clean-up-parse.y-20130312
Clean up parse.y.
2013-03-14 02:46:48 -07:00
Masaki Muranaka dd29e05f8e Use int. They are no need to use unsigned/signed long. Think about 16bit architectures. 2013-03-12 20:00:48 +09:00
Masaki Muranaka 2c54cf2e59 Add comments for paradnoid (a.k.a. mission critical) engineers. 2013-03-12 19:59:12 +09:00
Masaki Muranaka e1d2f50e47 Remove a meaningless type cast. 2013-03-12 19:55:18 +09:00
Masaki Muranaka d62f497bdd Fix indents. 2013-03-12 17:23:41 +09:00
mattn 1d42e8caa8 Remove warning for regexp 2013-03-06 14:40:39 +09:00
Masaki Muranaka 5a025813b5 Include stdio.h in mrbconf.h instead of C extension sources. 2013-03-05 01:38:51 +09:00
kano4 d4c279aa8d Replace tabs with spaces 2013-03-04 21:45:47 +09:00
Yukihiro Matz Matsumoto abecb78144 allow reserved word for heredoc terminator 2013-03-04 10:07:42 +09:00
Yukihiro Matz Matsumoto 20a5d57d16 applied a patch from @cremo to support MSVC 2013-03-04 09:55:45 +09:00
Yukihiro Matz Matsumoto 02dba48367 Merge branch 'heredoc' of https://github.com/FUKUZAWA-Tadashi/mruby into FUKUZAWA-Tadashi-heredoc 2013-03-04 09:49:16 +09:00
FUKUZAWA-Tadashi 73309aefa5 delete trailing space 2013-03-03 21:08:59 +09:00
FUKUZAWA-Tadashi 1af4110f7d implement heredoc 2013-03-03 20:08:13 +09:00
Kouki Ooyatsu 1a7bb9dfa6 cleanup: delete commented out match_op() from parse.y 2013-03-03 03:22:59 +09:00
Yukihiro Matz Matsumoto 0c9d42e080 string interpolation in regex 2013-03-02 15:13:52 +09:00
Kouki Ooyatsu 1ea13483cb Regexp: %r notation bug fix. close #85.
be able to parse any delimiters.
variable expansion isn't supported yet.

 * sample code
```
def matchpath(str)
  puts "#{str} is ..."

  if %r!img/! =~ str then
    puts "match"
  else
    puts "not match"
  end
end

matchpath("img/a.png") # => match
matchpath("/usr/local/bin") # => not match
matchpath("book/img/local") # => match
```
2013-02-28 11:16:15 +09:00
Yukihiro "Matz" Matsumoto 0852333900 Merge pull request #861 from cremno/regexp-parser-bugfix
regexp parsing bug if unknown option is used
2013-02-19 09:32:45 -08:00
Yukihiro "Matz" Matsumoto 85c10845e6 Merge pull request #855 from masamitsu-murase/support_parser_dump_for_regexp_literal
parser_dump supports NODE_REGEX.
2013-02-19 09:15:37 -08:00
Cremno e8de677338 s must not be freed, removed space in exc msg 2013-02-19 17:58:36 +01:00
Masamitsu MURASE 4abdb87b90 parser_dump supports NODE_REGEX. 2013-02-18 21:55:03 +09:00
Cremno 2942ad8eeb vars must be declared at the start of a block 2013-02-18 11:40:53 +01:00
mattn e0f25b1fda ready to pass second argument of Regexp.new 2013-02-15 13:55:41 +09:00
mattn b1a5146ea8 Pluggable Regexp 2013-02-15 04:38:27 +09:00
Carson McDonald 2ce3b31a8a Fix incorrect index use. nerr was being used for warning buffer check. 2013-02-07 07:27:59 -05:00
Carson McDonald 86eadb9637 Removed tests that look outdated. The mrb_compile_string they use is gone now. 2013-01-27 10:19:01 -05:00
Yukihiro "Matz" Matsumoto cc16bd7c0d Merge pull request #754 from masamitsu-murase/modify_undef_node
Modify handling of NODE_UNDEF.
2013-01-20 14:32:40 -08:00
Yukihiro "Matz" Matsumoto aaf5f3a0f5 Merge pull request #753 from masamitsu-murase/modify_handling_of_quoted_string_literal
Modify handling of quoted non-expanded string literal
2013-01-20 14:32:05 -08:00
Masamitsu MURASE 7195fb8716 Modify handling of NODE_UNDEF to accept multiple arguments. 2013-01-20 17:44:28 +09:00
Masamitsu MURASE 38b32a55c6 Modify handling of Quoted non-expanded literal strings. 2013-01-20 04:58:19 +09:00
Masamitsu MURASE 457f4ddca5 Modify handling of bodystmt. 2013-01-19 01:49:54 +09:00
Takashi Sogabe f0766e3632 Fix disappearance of command_call in case of statement without parentheses. 2013-01-16 14:43:37 +09:00
Yukihiro Matz Matsumoto 3be5bfbc7a nextc() might have problem on bytes higer than 0x80; close #628 2012-12-17 17:56:09 +09:00
Takashi Sogabe 7127bded17 Fix out of boundary scan in case of octal formatted string
This patch fixes a side effect of #2e7953536e
2012-12-05 16:26:46 +09:00
Takashi Sogabe 2e7953536e Fix loss of MSB in conditions of octal formatted string 2012-12-04 17:39:24 +09:00
Yukihiro Matz Matsumoto 191d1391c6 should wrap associ in aref_args; close #529 2012-11-12 18:28:33 +09:00
skandhas d232f4cc47 fix when mruby parse embedded rd document, mruby throw a syntax error. 2012-11-01 16:23:37 +08:00
Masaki Muranaka 1933e2660c Use substitution instead of memset in structure initialization. 2012-10-25 15:47:45 +09:00
Takashi Sogabe c2a6ff7af8 Fix wrong storage of data when hex-style string is loaded
This patch fixes corruption of data when hex-style string is
loaded.

I saw following phenomenon in an ubuntu/amd64 environment.

Test code:
str = "\x0\x1\x2\x03\x04\x05\x06\a\b\t\n\v\f\r\x0E\x0F\x10"
p str[-1] == "\0x10"

Output(binary program with mrbc -B):
false

Output(script with mruby):
true
2012-10-18 17:35:56 +09:00
Yukihiro Matsumoto 7171e5aa18 load_exec should return undef on syntax errors 2012-09-27 11:28:15 +09:00
Yukihiro Matsumoto 190fc76091 should not call mrb_parser_free() on NULL pointer 2012-09-26 08:15:09 +09:00
Yukihiro Matsumoto 540066c9e2 mrb_sym can be short integer; reduced 10KB 2012-09-12 16:20:32 +09:00
Yukihiro Matsumoto 4f7a1a167d remove memleaks using linked allocator 2012-09-03 08:34:31 +09:00
Yukihiro Matsumoto 8fb23fe67d improve local variable dump in parser_dump 2012-09-03 02:47:12 +09:00
Yukihiro Matsumoto e7661b978d manage line number in yacc rules, not in lexer 2012-09-01 23:52:16 +09:00