# Questions tagged [parsing]

This tag denotes challenges where parsing input is a large / the main part of the challenge.

204 questions
Filter by
Sorted by
Tagged with
236 views

### CDGLF: TMN to APL

In this challenge you will remove one of my least favorite features, operator precedence from traditional math notation, to acheive the syntax of one of my favorite languages, APL. The APL subset we ...
212 views

### Golfing Expressions

We can write mathematical expressions using the standard math operators (,),+,...
423 views

### Approx how many search results

When one performs a search query using Google, one of the first things you see is an approximation of how many results were found. Today, you'll be simulating this in as few bytes as possible. Input A ...
653 views

### Does this JavaScript function support keyword arguments?

JavaScript has no direct support for keyword arguments, but it supports argument object destructuring. It is standard to use a destructed final argument for keyword arguments. Here is an example: <...
2k views

### Help Stack Exchange transpose tables

Stack Exchange doesn't know how to transpose tables. Let's help. Given a markdown table, transpose it. Input assumptions: There will be at least two rows (including header) and two columns Either all ...
1k views

### Interpret Interval Notation

Interval notation is a way to write complicated range bounds more conveniently and concisely than writing an inequality. The challenge, should you choose to accept it, is to write a program or ...
1k views

### How Many Atoms?

How Many Atoms? Write the shortest code that when given a chemical formula as input, outputs the total number of atoms in the formula. Input A chemical formula in any reasonable format. Each chemical ...
694 views

### (1) Determine the amount of statues

Inspired by this stack of little statues that are currently on my desk at work, given to me by my colleagues from Sri Lanka when they visited The Netherlands: This is split into two different ...
228 views

### (2) Can the statues be stacked?

Inspired by this stack of little statues that are currently on my desk at work, given to me by my colleagues from Sri Lanka when they visited The Netherlands: This is split into two different ...
3k views

### Advent of Code 2020, Day 2, Part 1

Today, my girlfriend and I started with this year's Advent of Code to improve our Python. So far we only did Day 1 and the first part of Day 2. The latter, I found to be very fun, so, to spice it up a ...
577 views

### Day of Week - Natural language processing and date parsing

You'll get a human-readable question matching one of the following syntaxes, and are expected to print/return the corresponding result. Finding similarities between the human-readable inputs and ...
750 views

### Parse a Scala expression

Scala isn't a very commonly used language around here. Most of those who know it like it[citation needed], but some go :\ when they encounter its user-defined ...
945 views

### Parse a nested parentheses

Objective Mimic Haskell's reads :: ReadS (). Or in other words, parse nested parentheses. Since the target type is () (the type ...
2k views

### Compactify the query string

Introduction Just on Hacker news, John Resig contemplates transforming a query “foo=1&foo=2&foo=3&blah=a&blah=b” into one that looks like this: “foo=1,2,3&blah=a,b", https://...
606 views

### De-interleave log lines: HARD MODE

In the face of some regrettable rules that turned the original into a glorified sorting task, I am posting a more challenging variant. Shout out to Luis Mendo for the suggestion of how to improve the ...
2k views

### De-interleave log lines [duplicate]

You've inherited a server that runs several apps which all output to the same log. Your task is to de-interleave the lines of the log file by source. Fortunately, each line begins with a tag that ...
4k views

### Create a Boolean Calculator

Our boolean operators are AND, OR, XOR, NAND, ...
1k views

### Implement a UNIX file system and command line parser

Description Your task is to implement a simple UNIX command parser and file system. Your program will have to implement a file system that can be modified via commands. The starting directory of your ...
3k views

### Parse a Unicode vulgar fraction

Objective Given a string with single Unicode vulgar fraction, parse it to a rational number. Valid inputs A valid input is one of: ¼ U+00BC; one quarter ...
148 views

### Explicit-ify APL expressions involving trains

Related: Clearly parenthesize APL trains Background In the most basic form, APL has two kinds of tokens: arrays and functions. For this challenge, we will use a lowercase letter ...
4k views

### Maintain Social Distancing!

Task Given the situation with this global pandemic, you've been enlisted to help maintain social distancing. Your challenge, should you choose to accept it, is to write a program that takes in the ...
611 views

### Parse a variable star designation

The variable star designation is an identifier for a variable star (a star that fluctuates in brightness). It consists of either a 1-2 letter code or (when the letter code is no longer sufficient) a '...
568 views

### Keta Bracket Autocompletion

Special thanks to Bubbler and AdmBorkBork for supplying feedback about this challenge Keta (Keyboard tacit — clever naming, I know!) is a golfing language I’ve been working on recently. One of it’s ...
266 views

### Count the length of head movement

Once upon a time I wanted to order custom tokens for a board game. They say they can do it, and then they present me their price list. I was confused because they charge per inch of head movement, and ...
348 views

I was doing some investigation into trig functions using compound angles recently, and noticed that the results are really long and tedious to write: $$\cos(A+B) = \cos A \cos B - \sin A \sin B \\ \... 8answers 491 views ### Output integer given a digital clock style input Input _ _ _ _ _ _ _ _ | _| _||_||_ |_ ||_||_|| | ||_ _| | _||_| ||_| _||_| output 1234567890 Rules ... 1answer 379 views ### Duct Tape a Regex Decider Your task is to create a program that determines whether a given string is a valid regular expression or not using code snippets sourced from sites on the StackExchange network. For the purposes of ... 2answers 360 views ### Interpreter for number theory, modulo n A sentence of number theory (for our purposes) is a sequence of the following symbols: 0 and ' (successor) - successor means <... 16answers 2k views ### MQTT subscription topic match Background MQTT (Message Queuing Telemetry Transport) is an ISO standard publish-subscribe-based messaging protocol (Wikipedia). Each message has a topic, such as the following examples: ... 9answers 802 views ### Jimmy needs a new pair of shoes! Jimmy has had a busy last week with all these platforms and ropes, and poor Jimmy doesn't even have legs or feet to stand on! Your job is to take a string containing multiple Jimmys and give them ... 27answers 7k views ### Can Jimmy hang on his rope? Yet another Jimmy challenge by his original father. See these other lovely challenges. As you all know, recently we've been seeing challenges related to Jimmy on platforms. Now, Jimmy is an acrobat ... 27answers 4k views ### Parse a C++14 integer literal According to http://en.cppreference.com/w/cpp/language/integer_literal, integer literals consist of a decimal/hex/octal/binary literal and a optional integer suffix, that is obviously completely ... 10answers 669 views ### Type-check an expression Given an infix expression, determine whether all constants are of the same type. Operators will consist only of these dyadic operators: +-/* Your program or ... 14answers 1k views ### Multiply Two Integer Polynomials Your task is to take two single-variable integer polynomial expressions and multiply them into their unsimplified first-term-major left-to-right expansion (A.K.A. FOIL in the case of binomials). Do ... 5answers 658 views ### Gotta Collect 'Em All Your task here will be to write a very dumb AI capable of fetching all treasures on a map. Map The map is defined as follow: (artist-mode™-powered) Basic case: <... 31answers 2k views ### Sum integers in a string [duplicate] Input A string. Output The sum of all integers in the line. Constraints 1≤Length of line≤500 Sample test Case Input the 5is 108 seCONd4 a Output ... 4answers 1k views ### What have we got? Inspired by, and in memory of, our beloved genius, R.I.P. He invented and implemented dfns — his magnum opus and the subject of the challenge. For the interested: latest full dfns documentation and ... 0answers 58 views ### Bracket checking [duplicate] Consider a string like: a.push(c.push("a",["ad","bd",2,{"ard",duo}]).pop().replace(2,"tg").enc([3,{2,adf},"atr"],5) Write a program that will verify whether a ... 1answer 412 views ### Fully Modular C: Grading You are a Computer Science professor teaching the C programming language. One principle you seek to impart to the students is modularity. Unfortunately, past classes have tended not to get the message,... 5answers 343 views ### Conjugation in Real Life In @Adám's Dyalog APL Extended, the (under) operator means conjugation: apply one function, then a second function, then the inverse of the first. It's fun to ... 3answers 310 views ### Unminify a Pythlike String Pyth is perhaps the most successful general-purpose golfing language. Though it is somewhat in decline as a result of newer languages, from 2014 to 2016 Pyth's concise syntax, constant updates, ... 0answers 297 views ### Captcha Capture [closed] Captchas aren't meant to be machine-readable, and that's terrible. It is time to end this obvious bout of unfounded hatred for machines just trying to let you know about great deals on ṗḧ@ṛḿ4ćëüẗ1ċäḷṡ ... 13answers 5k views ### Read out the C variable declaration Background Variable declaration statement in C consists of three parts: the name of the variable, its base type, and the type modifier(s). There are three kinds of type modifiers: Pointer ... 7answers 544 views ### Transpile Brainstract to Brainfuck Introduction Brainstract, a newly created dialect of Brainfuck adds a bit more elements to the syntax. In addition to the normal Brainfuck syntax, there are macros. To define a macro: ... 0answers 229 views ### Simulate Casio S-VPAM calulator [closed] It is 20th anniversary of Casio's S-VPAM calculators and it is worth celebrating. Task: Process input string as Casio S-VPAM calculator does. The infix notation and precedence of mathematical ... 10answers 713 views ### Decrypt the extended Wechsler format This challenge is based on a sandbox post by user48538. Since he is no longer active on this site, I took over this challenge. apgsearch, the distributed soup search program for Conway's Game of Life ... 2answers 196 views ### What associativity was it again Non-associative operators (for example the subtraction-operator) often are either left- or right associative, such that one has to write less parentheses. Consider for example the following:$$ a-b-c ...
1k views

You have come across an old Indian manuscript, one that describes mounds of buried treasure. The manuscript also tells you the location of the treasure, except that some crucial numbers have been ...